* Port over new code tables from Cycles * Convert Rec.709 to scene linear for lookup table. * Move code for wavelength and blackbody to IMB so they can access the required transforms, which are not in blenlib. * Remove clamping from blackbody shader to bypass the texture read. Since it's variable now easiest to just always read from the texture than pass additional parameters. * Fold XYZ to RGB conversion into the wavelength table. Ref T68926
6 lines
218 B
GLSL
6 lines
218 B
GLSL
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);
|
|
}
|