Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_material_blackbody.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e257483f36475c63dad4fddba1fd96ddb792f628 (plain)
1
2
3
4
5
void node_blackbody(float temperature, sampler1DArray spectrummap, float layer, out vec4 color)
{
  float t = (temperature - 800.0) / (12000.0 - 800.0);
  color = vec4(texture(spectrummap, vec2(t, layer)).rgb, 1.0);
}