X-Git-Url: https://git.blender.org/gitweb/gitweb.cgi/blender.git/blobdiff_plain/ebbfc46bea44c8900eca3deedd25bb990d1fa923..092f6344c3e63fed511acf71e059cdc39867f227:/intern/cycles/kernel/osl/nodes/node_gamma.osl diff --git a/intern/cycles/kernel/osl/nodes/node_gamma.osl b/intern/cycles/kernel/osl/nodes/node_gamma.osl index 4dae07d70bc..d55e908b0b7 100644 --- a/intern/cycles/kernel/osl/nodes/node_gamma.osl +++ b/intern/cycles/kernel/osl/nodes/node_gamma.osl @@ -21,13 +21,7 @@ shader node_gamma( color ColorIn = color(0.8, 0.8, 0.8), float Gamma = 1.0, - output ColorOut = color(0.8, 0.8, 0.8) + output color ColorOut = color(0.0, 0.0, 0.0)) { - int i; - for (i=0;i<3;i++) { - if (ColorIn[i] > 0.0) - ColorIn[i] = powf(ColorIn[i], Gamma); - } - - ColorOut = ColorIn; + ColorOut = pow(ColorIn, Gamma); }