diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 09:16:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 09:17:13 +0300 |
commit | 108045faa01849115c54190ebed788faf36dcb56 (patch) | |
tree | 64d024b47b0dcb6850108377c55e96917645efe5 /intern/cycles/kernel | |
parent | 3076d95ba441cd32706a27d18922a30f8fd28b8a (diff) |
ClangFormat: format '#if 0' code in intern/
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/osl/osl_services.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/shaders/stdosl.h | 47 |
2 files changed, 38 insertions, 11 deletions
diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp index eb9f672fd8a..0257e18c3e8 100644 --- a/intern/cycles/kernel/osl/osl_services.cpp +++ b/intern/cycles/kernel/osl/osl_services.cpp @@ -733,7 +733,7 @@ bool OSLRenderServices::get_object_standard_attribute( return set_attribute_float3(f, type, derivatives, val); } #if 0 /* unsupported */ - else if(name == u_particle_rotation) { + else if (name == u_particle_rotation) { int particle_id = object_particle_id(kg, sd->object); float4 f = particle_rotation(kg, particle_id); return set_attribute_float4(f, type, derivatives, val); diff --git a/intern/cycles/kernel/shaders/stdosl.h b/intern/cycles/kernel/shaders/stdosl.h index 9b9720ffff9..2762b414ce4 100644 --- a/intern/cycles/kernel/shaders/stdosl.h +++ b/intern/cycles/kernel/shaders/stdosl.h @@ -235,15 +235,42 @@ int clamp(int x, int minval, int maxval) return max(min(x, maxval), minval); } #if 0 -normal mix (normal x, normal y, normal a) { return x*(1-a) + y*a; } -normal mix (normal x, normal y, float a) { return x*(1-a) + y*a; } -vector mix (vector x, vector y, vector a) { return x*(1-a) + y*a; } -vector mix (vector x, vector y, float a) { return x*(1-a) + y*a; } -point mix (point x, point y, point a) { return x*(1-a) + y*a; } -point mix (point x, point y, float a) { return x*(1-a) + y*a; } -color mix (color x, color y, color a) { return x*(1-a) + y*a; } -color mix (color x, color y, float a) { return x*(1-a) + y*a; } -float mix (float x, float y, float a) { return x*(1-a) + y*a; } +normal mix(normal x, normal y, normal a) +{ + return x * (1 - a) + y * a; +} +normal mix(normal x, normal y, float a) +{ + return x * (1 - a) + y * a; +} +vector mix(vector x, vector y, vector a) +{ + return x * (1 - a) + y * a; +} +vector mix(vector x, vector y, float a) +{ + return x * (1 - a) + y * a; +} +point mix(point x, point y, point a) +{ + return x * (1 - a) + y * a; +} +point mix(point x, point y, float a) +{ + return x * (1 - a) + y * a; +} +color mix(color x, color y, color a) +{ + return x * (1 - a) + y * a; +} +color mix(color x, color y, float a) +{ + return x * (1 - a) + y * a; +} +float mix(float x, float y, float a) +{ + return x * (1 - a) + y * a; +} #else normal mix(normal x, normal y, normal a) BUILTIN; normal mix(normal x, normal y, float a) BUILTIN; @@ -369,7 +396,7 @@ point rotate(point p, float angle, point a, point b) * anisotropic shader where angle is usually constant. */ #if 0 - sincos (angle, sinang, cosang); + sincos(angle, sinang, cosang); #else sinang = sin(angle); cosang = cos(angle); |