code cleanup: comment unused members of bmesh operator slots and some osl style edits.

This commit is contained in:
Campbell Barton
2012-11-20 14:31:58 +00:00
parent f92359cc29
commit 68e9fdeb81
5 changed files with 15 additions and 15 deletions

View File

@@ -43,9 +43,9 @@ color xyY_to_xyz(float x, float y, float Y)
color xyz_to_rgb(float x, float y, float z)
{
return color(3.240479 * x + -1.537150 * y + -0.498535 * z,
-0.969256 * x + 1.875991 * y + 0.041556 * z,
0.055648 * x + -0.204043 * y + 1.057311 * z);
return color( 3.240479 * x + -1.537150 * y + -0.498535 * z,
-0.969256 * x + 1.875991 * y + 0.041556 * z,
0.055648 * x + -0.204043 * y + 1.057311 * z);
}
float sky_angle_between(float thetav, float phiv, float theta, float phi)

View File

@@ -30,20 +30,20 @@ shader node_ward_bsdf(
/* rotate tangent around normal */
vector T = Tangent;
if(Rotation != 0.0)
if (Rotation != 0.0)
T = rotate(T, Rotation*2.0*M_PI, point(0.0, 0.0, 0.0), Normal);
/* compute roughness */
float RoughnessU, RoughnessV;
float aniso = clamp(Anisotropy, -0.99, 0.99);
if(aniso < 0.0) {
RoughnessU = Roughness/(1.0 + aniso);
RoughnessV = Roughness*(1.0 + aniso);
if (aniso < 0.0) {
RoughnessU = Roughness / (1.0 + aniso);
RoughnessV = Roughness * (1.0 + aniso);
}
else {
RoughnessU = Roughness*(1.0 - aniso);
RoughnessV = Roughness/(1.0 - aniso);
RoughnessU = Roughness * (1.0 - aniso);
RoughnessV = Roughness / (1.0 - aniso);
}
BSDF = Color * ward(Normal, T, RoughnessU, RoughnessV);