Fixed remaining syntax errors in OSL files. node_sepcomb_rgb.osl is split into 2...
[blender.git] / intern / cycles / kernel / osl / nodes / node_gamma.osl
index 4dae07d70bc50e760b2edb092e55265c97d82052..d55e908b0b73cbf56c5392dd7d7e322f7a5f7cae 100644 (file)
 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);
 }