diff options
Diffstat (limited to 'intern')
4 files changed, 10 insertions, 9 deletions
diff --git a/intern/cycles/kernel/shaders/node_brightness.osl b/intern/cycles/kernel/shaders/node_brightness.osl index 2de3c94ecc1..7b1db8efbde 100644 --- a/intern/cycles/kernel/shaders/node_brightness.osl +++ b/intern/cycles/kernel/shaders/node_brightness.osl @@ -25,10 +25,10 @@ shader node_brightness( output color ColorOut = 0.8) { float a = 1.0 + Contrast; - float b = Bright - Contrast*0.5; + float b = Bright - Contrast * 0.5; - ColorOut[0] = max(a*ColorIn[0] + b, 0.0); - ColorOut[1] = max(a*ColorIn[1] + b, 0.0); - ColorOut[2] = max(a*ColorIn[2] + b, 0.0); + ColorOut[0] = max(a * ColorIn[0] + b, 0.0); + ColorOut[1] = max(a * ColorIn[1] + b, 0.0); + ColorOut[2] = max(a * ColorIn[2] + b, 0.0); } diff --git a/intern/cycles/kernel/shaders/node_normal_map.osl b/intern/cycles/kernel/shaders/node_normal_map.osl index 21382fab06f..4428a12ac41 100644 --- a/intern/cycles/kernel/shaders/node_normal_map.osl +++ b/intern/cycles/kernel/shaders/node_normal_map.osl @@ -35,9 +35,10 @@ shader node_normal_map( float tangent_sign; // get _unnormalized_ interpolated normal and tangent - if(!getattribute(attr_name, tangent) || + if (!getattribute(attr_name, tangent) || !getattribute(attr_sign_name, tangent_sign) || - !getattribute("geom:N", ninterp)) { + !getattribute("geom:N", ninterp)) + { Normal = normal(0, 0, 0); } else { diff --git a/intern/cycles/kernel/shaders/node_vector_curves.osl b/intern/cycles/kernel/shaders/node_vector_curves.osl index 94082287f4d..d1477467836 100644 --- a/intern/cycles/kernel/shaders/node_vector_curves.osl +++ b/intern/cycles/kernel/shaders/node_vector_curves.osl @@ -21,7 +21,7 @@ float ramp_lookup(color ramp[RAMP_TABLE_SIZE], float at, int component) { - float f = clamp((at + 1.0)*0.5, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1); + float f = clamp((at + 1.0) * 0.5, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1); /* clamp int as well in case of NaN */ int i = (int)f; @@ -34,7 +34,7 @@ float ramp_lookup(color ramp[RAMP_TABLE_SIZE], float at, int component) if (t > 0.0) result = (1.0 - t) * result + t * ramp[i + 1][component]; - return result*2.0 - 1.0; + return result * 2.0 - 1.0; } shader node_vector_curves( diff --git a/intern/cycles/kernel/shaders/node_ward_bsdf.osl b/intern/cycles/kernel/shaders/node_ward_bsdf.osl index bae55bcceaf..35c2b514328 100644 --- a/intern/cycles/kernel/shaders/node_ward_bsdf.osl +++ b/intern/cycles/kernel/shaders/node_ward_bsdf.osl @@ -31,7 +31,7 @@ shader node_ward_bsdf( vector T = Tangent; if (Rotation != 0.0) - T = rotate(T, Rotation*2.0*M_PI, point(0.0, 0.0, 0.0), Normal); + T = rotate(T, Rotation * 2.0 * M_PI, point(0.0, 0.0, 0.0), Normal); /* compute roughness */ float RoughnessU, RoughnessV; |