Cleanup: OSL style

This commit is contained in:
Campbell Barton
2016-02-17 21:36:54 +11:00
parent d6b77450ce
commit 88d4d0d070
5 changed files with 6 additions and 6 deletions

View File

@@ -106,6 +106,6 @@ shader node_magic_texture(
p = transform(mapping, p);
Color = magic(p * Scale, Depth, Distortion);
Fac = (Color[0] + Color[1] + Color[2]) * (1.0/3.0);
Fac = (Color[0] + Color[1] + Color[2]) * (1.0 / 3.0);
}

View File

@@ -21,7 +21,7 @@ float ramp_lookup(color ramp[RAMP_TABLE_SIZE], float at, int component)
{
if (at < 0.0 || at > 1.0) {
float t0, dy;
if(at < 0.0) {
if (at < 0.0) {
t0 = ramp[0][component];
dy = t0 - ramp[1][component];
at = -at;

View File

@@ -21,7 +21,7 @@ float ramp_lookup(color ramp[RAMP_TABLE_SIZE], float at, int component)
{
if (at < 0.0 || at > 1.0) {
float t0, dy;
if(at < 0.0) {
if (at < 0.0) {
t0 = ramp[0][component];
dy = t0 - ramp[1][component];
at = -at;

View File

@@ -35,8 +35,8 @@ shader node_voxel_texture(
if (getattribute("geom:generated_transform", tfm))
p = transform(tfm, p);
}
if(p[0] < 0.0 || p[1] < 0.0 || p[2] < 0.0 ||
p[0] > 1.0 || p[1] > 1.0 || p[2] > 1.0)
if (p[0] < 0.0 || p[1] < 0.0 || p[2] < 0.0 ||
p[0] > 1.0 || p[1] > 1.0 || p[2] > 1.0)
{
Density = 0;
Color = color(0, 0, 0);

View File

@@ -41,7 +41,7 @@ float wave(point p, string type, string profile, float detail, float distortion,
/* Saw profile */
n /= M_2PI;
n -= (int) n;
return (n < 0.0)? n + 1.0: n;
return (n < 0.0) ? n + 1.0 : n;
}
}