Cleanup: OSL style
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user