style cleanup

This commit is contained in:
Campbell Barton 2012-10-18 04:51:37 +00:00
parent 9d260eedeb
commit 812b17f306
6 changed files with 22 additions and 24 deletions

@ -41,8 +41,8 @@ float brick(point p, float mortar_size, float bias,
rownum = (int)floor(p[1] / row_height);
if (offset_frequency && squash_frequency) {
brick_width *= ((int)(rownum) % squash_frequency ) ? 1.0 : squash_amount; /* squash */
offset = ((int)(rownum) % offset_frequency ) ? 0 : (brick_width * offset_amount); /* offset */
brick_width *= ((int)(rownum) % squash_frequency) ? 1.0 : squash_amount; /* squash */
offset = ((int)(rownum) % offset_frequency) ? 0 : (brick_width * offset_amount); /* offset */
}
bricknum = (int)floor((p[0] + offset) / brick_width);

@ -25,7 +25,7 @@ shader node_fresnel(
output float Fac = 0.0)
{
float f = max(IOR, 1.0 + 1e-5);
float eta = backfacing()? 1.0 / f: f;
float eta = backfacing() ? 1.0 / f: f;
Fac = fresnel_dielectric(I, Normal, eta);
}

@ -28,7 +28,7 @@ shader node_glass_bsdf(
output closure color BSDF = diffuse(Normal))
{
float f = max(IOR, 1.0 + 1e-5);
float eta = backfacing()? 1.0 / f: f;
float eta = backfacing() ? 1.0 / f: f;
float Fr = fresnel_dielectric(I, Normal, eta);
if (distribution == "Sharp")

@ -29,7 +29,7 @@ shader node_layer_weight(
/* Fresnel */
float eta = max(1.0 - Blend, 1e-5);
eta = backfacing()? eta: 1.0 / eta;
eta = backfacing() ? eta : 1.0 / eta;
Fresnel = fresnel_dielectric(I, Normal, eta);
/* Facing */
@ -37,7 +37,7 @@ shader node_layer_weight(
if (blend != 0.5) {
blend = clamp(blend, 0.0, 1.0);
blend = (blend < 0.5)? 2.0 * blend: 0.5 / (1.0 - blend);
blend = (blend < 0.5) ? 2.0 * blend : 0.5 / (1.0 - blend);
Facing = pow(Facing, blend);
}

@ -19,15 +19,14 @@
#include "stdosl.h"
shader node_object_info(
output point Location = point(0.0, 0.0, 0.0),
output float ObjectIndex = 0.0,
output float MaterialIndex = 0.0,
output float Random = 0.0
)
output point Location = point(0.0, 0.0, 0.0),
output float ObjectIndex = 0.0,
output float MaterialIndex = 0.0,
output float Random = 0.0)
{
getattribute("std::object_location", Location);
getattribute("std::object_index", ObjectIndex);
getattribute("std::material_index", MaterialIndex);
getattribute("std::object_random", Random);
getattribute("std::object_location", Location);
getattribute("std::object_index", ObjectIndex);
getattribute("std::material_index", MaterialIndex);
getattribute("std::object_random", Random);
}

@ -25,15 +25,14 @@ shader node_particle_info(
output point Location = point(0.0, 0.0, 0.0),
output float Size = 0.0,
output vector Velocity = point(0.0, 0.0, 0.0),
output vector AngularVelocity = point(0.0, 0.0, 0.0)
)
output vector AngularVelocity = point(0.0, 0.0, 0.0))
{
getattribute("std::particle_index", Index);
getattribute("std::particle_age", Age);
getattribute("std::particle_lifetime", Lifetime);
getattribute("std::particle_location", Location);
getattribute("std::particle_size", Size);
getattribute("std::particle_velocity", Velocity);
getattribute("std::particle_angular_velocity", AngularVelocity);
getattribute("std::particle_index", Index);
getattribute("std::particle_age", Age);
getattribute("std::particle_lifetime", Lifetime);
getattribute("std::particle_location", Location);
getattribute("std::particle_size", Size);
getattribute("std::particle_velocity", Velocity);
getattribute("std::particle_angular_velocity", AngularVelocity);
}