Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r--intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_environment_texture.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_glass_bsdf.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_glossy_bsdf.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_gradient_texture.osl16
-rw-r--r--intern/cycles/kernel/shaders/node_hair_bsdf.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_image_texture.osl10
-rw-r--r--intern/cycles/kernel/shaders/node_math.osl40
-rw-r--r--intern/cycles/kernel/shaders/node_mix.osl38
-rw-r--r--intern/cycles/kernel/shaders/node_musgrave_texture.osl8
-rw-r--r--intern/cycles/kernel/shaders/node_normal_map.osl12
-rw-r--r--intern/cycles/kernel/shaders/node_refraction_bsdf.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_sky_texture.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_subsurface_scattering.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_tangent.osl12
-rw-r--r--intern/cycles/kernel/shaders/node_toon_bsdf.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_uv_map.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_vector_math.osl14
-rw-r--r--intern/cycles/kernel/shaders/node_vector_transform.osl8
-rw-r--r--intern/cycles/kernel/shaders/node_voronoi_texture.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_wave_texture.osl10
21 files changed, 112 insertions, 112 deletions
diff --git a/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl b/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl
index 281ed4e8726..f7f89543aa9 100644
--- a/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl
@@ -45,9 +45,9 @@ shader node_anisotropic_bsdf(
RoughnessV = Roughness / (1.0 - aniso);
}
- if (distribution == "Sharp")
+ if (distribution == "sharp")
BSDF = Color * reflection(Normal);
- else if (distribution == "Beckmann")
+ else if (distribution == "beckmann")
BSDF = Color * microfacet_beckmann_aniso(Normal, T, RoughnessU, RoughnessV);
else if (distribution == "GGX")
BSDF = Color * microfacet_ggx_aniso(Normal, T, RoughnessU, RoughnessV);
diff --git a/intern/cycles/kernel/shaders/node_environment_texture.osl b/intern/cycles/kernel/shaders/node_environment_texture.osl
index 3a0b782c98e..0a7f602226d 100644
--- a/intern/cycles/kernel/shaders/node_environment_texture.osl
+++ b/intern/cycles/kernel/shaders/node_environment_texture.osl
@@ -44,7 +44,7 @@ shader node_environment_texture(
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
vector Vector = P,
string filename = "",
- string projection = "Equirectangular",
+ string projection = "equirectangular",
string interpolation = "linear",
string color_space = "sRGB",
int is_float = 1,
@@ -59,7 +59,7 @@ shader node_environment_texture(
p = normalize(p);
- if (projection == "Equirectangular")
+ if (projection == "equirectangular")
p = environment_texture_direction_to_equirectangular(p);
else
p = environment_texture_direction_to_mirrorball(p);
diff --git a/intern/cycles/kernel/shaders/node_glass_bsdf.osl b/intern/cycles/kernel/shaders/node_glass_bsdf.osl
index 68bc107cc5e..8fd0a2fd714 100644
--- a/intern/cycles/kernel/shaders/node_glass_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_glass_bsdf.osl
@@ -19,7 +19,7 @@
shader node_glass_bsdf(
color Color = 0.8,
- string distribution = "Sharp",
+ string distribution = "sharp",
float Roughness = 0.2,
float IOR = 1.45,
normal Normal = N,
@@ -30,9 +30,9 @@ shader node_glass_bsdf(
float cosi = dot(I, Normal);
float Fr = fresnel_dielectric_cos(cosi, eta);
- if (distribution == "Sharp")
+ if (distribution == "sharp")
BSDF = Color * (Fr * reflection(Normal) + (1.0 - Fr) * refraction(Normal, eta));
- else if (distribution == "Beckmann")
+ else if (distribution == "beckmann")
BSDF = Color * (Fr * microfacet_beckmann(Normal, Roughness) +
(1.0 - Fr) * microfacet_beckmann_refraction(Normal, Roughness, eta));
else if (distribution == "GGX")
diff --git a/intern/cycles/kernel/shaders/node_glossy_bsdf.osl b/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
index d3250b32d0b..cc2a66fd46a 100644
--- a/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
@@ -24,9 +24,9 @@ shader node_glossy_bsdf(
normal Normal = N,
output closure color BSDF = 0)
{
- if (distribution == "Sharp")
+ if (distribution == "sharp")
BSDF = Color * reflection(Normal);
- else if (distribution == "Beckmann")
+ else if (distribution == "beckmann")
BSDF = Color * microfacet_beckmann(Normal, Roughness);
else if (distribution == "GGX")
BSDF = Color * microfacet_ggx(Normal, Roughness);
diff --git a/intern/cycles/kernel/shaders/node_gradient_texture.osl b/intern/cycles/kernel/shaders/node_gradient_texture.osl
index 69e2ee54bdf..f458937a18f 100644
--- a/intern/cycles/kernel/shaders/node_gradient_texture.osl
+++ b/intern/cycles/kernel/shaders/node_gradient_texture.osl
@@ -29,31 +29,31 @@ float gradient(point p, string type)
float result = 0.0;
- if (type == "Linear") {
+ if (type == "linear") {
result = x;
}
- else if (type == "Quadratic") {
+ else if (type == "quadratic") {
float r = max(x, 0.0);
result = r * r;
}
- else if (type == "Easing") {
+ else if (type == "easing") {
float r = min(max(x, 0.0), 1.0);
float t = r * r;
result = (3.0 * t - 2.0 * t * r);
}
- else if (type == "Diagonal") {
+ else if (type == "diagonal") {
result = (x + y) * 0.5;
}
- else if (type == "Radial") {
+ else if (type == "radial") {
result = atan2(y, x) / M_2PI + 0.5;
}
else {
float r = max(1.0 - sqrt(x * x + y * y + z * z), 0.0);
- if (type == "Quadratic Sphere")
+ if (type == "quadratic_sphere")
result = r * r;
- else if (type == "Spherical")
+ else if (type == "spherical")
result = r;
}
@@ -63,7 +63,7 @@ float gradient(point p, string type)
shader node_gradient_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
- string type = "Linear",
+ string type = "linear",
point Vector = P,
output float Fac = 0.0,
output color Color = 0.0)
diff --git a/intern/cycles/kernel/shaders/node_hair_bsdf.osl b/intern/cycles/kernel/shaders/node_hair_bsdf.osl
index 54d4cb67c3b..c8cb88f0c0b 100644
--- a/intern/cycles/kernel/shaders/node_hair_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_hair_bsdf.osl
@@ -20,7 +20,7 @@
shader node_hair_bsdf(
color Color = 0.8,
- string component = "Reflection",
+ string component = "reflection",
float Offset = 0.0,
float RoughnessU = 0.1,
float RoughnessV = 1.0,
@@ -37,7 +37,7 @@ shader node_hair_bsdf(
BSDF = transparent();
}
else {
- if (component == "Reflection")
+ if (component == "reflection")
BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
else
BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
@@ -48,7 +48,7 @@ shader node_hair_bsdf(
BSDF = transparent();
}
else {
- if (component == "Reflection")
+ if (component == "reflection")
BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, dPdu, -Offset);
else
BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, dPdu, -Offset);
diff --git a/intern/cycles/kernel/shaders/node_image_texture.osl b/intern/cycles/kernel/shaders/node_image_texture.osl
index d09174ff5d3..a00401845c8 100644
--- a/intern/cycles/kernel/shaders/node_image_texture.osl
+++ b/intern/cycles/kernel/shaders/node_image_texture.osl
@@ -86,7 +86,7 @@ shader node_image_texture(
point Vector = P,
string filename = "",
string color_space = "sRGB",
- string projection = "Flat",
+ string projection = "flat",
string interpolation = "smartcubic",
string wrap = "periodic",
float projection_blend = 0.0,
@@ -100,7 +100,7 @@ shader node_image_texture(
if (use_mapping)
p = transform(mapping, p);
- if (projection == "Flat") {
+ if (projection == "flat") {
Color = image_texture_lookup(filename,
color_space,
p[0], p[1],
@@ -110,7 +110,7 @@ shader node_image_texture(
interpolation,
wrap);
}
- else if (projection == "Box") {
+ else if (projection == "box") {
/* object space normal */
vector Nob = transform("world", "object", N);
@@ -210,7 +210,7 @@ shader node_image_texture(
Alpha += weight[2] * tmp_alpha;
}
}
- else if (projection == "Sphere") {
+ else if (projection == "sphere") {
point projected = map_to_sphere(texco_remap_square(p));
Color = image_texture_lookup(filename,
color_space,
@@ -221,7 +221,7 @@ shader node_image_texture(
interpolation,
wrap);
}
- else if (projection == "Tube") {
+ else if (projection == "tube") {
point projected = map_to_tube(texco_remap_square(p));
Color = image_texture_lookup(filename,
color_space,
diff --git a/intern/cycles/kernel/shaders/node_math.osl b/intern/cycles/kernel/shaders/node_math.osl
index 85eac0b97a6..f309ef7c6f3 100644
--- a/intern/cycles/kernel/shaders/node_math.osl
+++ b/intern/cycles/kernel/shaders/node_math.osl
@@ -49,7 +49,7 @@ float safe_log(float a, float b)
}
shader node_math(
- string type = "Add",
+ string type = "add",
int use_clamp = 0,
float Value1 = 0.0,
float Value2 = 0.0,
@@ -57,43 +57,43 @@ shader node_math(
{
/* OSL asin, acos, pow check for values that could give rise to nan */
- if (type == "Add")
+ if (type == "add")
Value = Value1 + Value2;
- else if (type == "Subtract")
+ else if (type == "subtract")
Value = Value1 - Value2;
- else if (type == "Multiply")
+ else if (type == "multiply")
Value = Value1 * Value2;
- else if (type == "Divide")
+ else if (type == "divide")
Value = safe_divide(Value1, Value2);
- else if (type == "Sine")
+ else if (type == "sine")
Value = sin(Value1);
- else if (type == "Cosine")
+ else if (type == "cosine")
Value = cos(Value1);
- else if (type == "Tangent")
+ else if (type == "tangent")
Value = tan(Value1);
- else if (type == "Arcsine")
+ else if (type == "arcsine")
Value = asin(Value1);
- else if (type == "Arccosine")
+ else if (type == "arccosine")
Value = acos(Value1);
- else if (type == "Arctangent")
+ else if (type == "arctangent")
Value = atan(Value1);
- else if (type == "Power")
+ else if (type == "power")
Value = pow(Value1, Value2);
- else if (type == "Logarithm")
+ else if (type == "logarithm")
Value = safe_log(Value1, Value2);
- else if (type == "Minimum")
+ else if (type == "minimum")
Value = min(Value1, Value2);
- else if (type == "Maximum")
+ else if (type == "maximum")
Value = max(Value1, Value2);
- else if (type == "Round")
+ else if (type == "round")
Value = floor(Value1 + 0.5);
- else if (type == "Less Than")
+ else if (type == "less_than")
Value = Value1 < Value2;
- else if (type == "Greater Than")
+ else if (type == "greater_than")
Value = Value1 > Value2;
- else if (type == "Modulo")
+ else if (type == "modulo")
Value = safe_modulo(Value1, Value2);
- else if (type == "Absolute")
+ else if (type == "absolute")
Value = fabs(Value1);
if (use_clamp)
diff --git a/intern/cycles/kernel/shaders/node_mix.osl b/intern/cycles/kernel/shaders/node_mix.osl
index 4a66748ed6a..0862c34b6e1 100644
--- a/intern/cycles/kernel/shaders/node_mix.osl
+++ b/intern/cycles/kernel/shaders/node_mix.osl
@@ -277,7 +277,7 @@ color node_mix_clamp(color col)
}
shader node_mix(
- string type = "Mix",
+ string type = "mix",
int use_clamp = 0,
float Fac = 0.5,
color Color1 = 0.0,
@@ -286,41 +286,41 @@ shader node_mix(
{
float t = clamp(Fac, 0.0, 1.0);
- if (type == "Mix")
+ if (type == "mix")
Color = node_mix_blend(t, Color1, Color2);
- if (type == "Add")
+ if (type == "add")
Color = node_mix_add(t, Color1, Color2);
- if (type == "Multiply")
+ if (type == "multiply")
Color = node_mix_mul(t, Color1, Color2);
- if (type == "Screen")
+ if (type == "screen")
Color = node_mix_screen(t, Color1, Color2);
- if (type == "Overlay")
+ if (type == "overlay")
Color = node_mix_overlay(t, Color1, Color2);
- if (type == "Subtract")
+ if (type == "subtract")
Color = node_mix_sub(t, Color1, Color2);
- if (type == "Divide")
+ if (type == "divide")
Color = node_mix_div(t, Color1, Color2);
- if (type == "Difference")
+ if (type == "difference")
Color = node_mix_diff(t, Color1, Color2);
- if (type == "Darken")
+ if (type == "darken")
Color = node_mix_dark(t, Color1, Color2);
- if (type == "Lighten")
+ if (type == "lighten")
Color = node_mix_light(t, Color1, Color2);
- if (type == "Dodge")
+ if (type == "dodge")
Color = node_mix_dodge(t, Color1, Color2);
- if (type == "Burn")
+ if (type == "burn")
Color = node_mix_burn(t, Color1, Color2);
- if (type == "Hue")
+ if (type == "hue")
Color = node_mix_hue(t, Color1, Color2);
- if (type == "Saturation")
+ if (type == "saturation")
Color = node_mix_sat(t, Color1, Color2);
- if (type == "Value")
+ if (type == "value")
Color = node_mix_val (t, Color1, Color2);
- if (type == "Color")
+ if (type == "color")
Color = node_mix_color(t, Color1, Color2);
- if (type == "Soft Light")
+ if (type == "soft_light")
Color = node_mix_soft(t, Color1, Color2);
- if (type == "Linear Light")
+ if (type == "linear_light")
Color = node_mix_linear(t, Color1, Color2);
if (use_clamp)
diff --git a/intern/cycles/kernel/shaders/node_musgrave_texture.osl b/intern/cycles/kernel/shaders/node_musgrave_texture.osl
index 2f9f62bcfe8..91f4fba5898 100644
--- a/intern/cycles/kernel/shaders/node_musgrave_texture.osl
+++ b/intern/cycles/kernel/shaders/node_musgrave_texture.osl
@@ -210,15 +210,15 @@ shader node_musgrave_texture(
p = p * Scale;
- if (type == "Multifractal")
+ if (type == "multifractal")
Fac = intensity * noise_musgrave_multi_fractal(p, dimension, lacunarity, octaves);
else if (type == "fBM")
Fac = intensity * noise_musgrave_fBm(p, dimension, lacunarity, octaves);
- else if (type == "Hybrid Multifractal")
+ else if (type == "hybrid_multifractal")
Fac = intensity * noise_musgrave_hybrid_multi_fractal(p, dimension, lacunarity, octaves, Offset, Gain);
- else if (type == "Ridged Multifractal")
+ else if (type == "ridged_multifractal")
Fac = intensity * noise_musgrave_ridged_multi_fractal(p, dimension, lacunarity, octaves, Offset, Gain);
- else if (type == "Hetero Terrain")
+ else if (type == "hetero_terrain")
Fac = intensity * noise_musgrave_hetero_terrain(p, dimension, lacunarity, octaves, Offset);
Color = color(Fac, Fac, Fac);
diff --git a/intern/cycles/kernel/shaders/node_normal_map.osl b/intern/cycles/kernel/shaders/node_normal_map.osl
index 01be566fb20..f95e9fcfe3c 100644
--- a/intern/cycles/kernel/shaders/node_normal_map.osl
+++ b/intern/cycles/kernel/shaders/node_normal_map.osl
@@ -20,14 +20,14 @@ shader node_normal_map(
normal NormalIn = N,
float Strength = 1.0,
color Color = color(0.5, 0.5, 1.0),
- string space = "Tangent",
+ string space = "tangent",
string attr_name = "geom:tangent",
string attr_sign_name = "geom:tangent_sign",
output normal Normal = NormalIn)
{
color mcolor = 2.0 * color(Color[0] - 0.5, Color[1] - 0.5, Color[2] - 0.5);
- if (space == "Tangent") {
+ if (space == "tangent") {
vector tangent;
vector ninterp;
float tangent_sign;
@@ -53,20 +53,20 @@ shader node_normal_map(
Normal = normal(0, 0, 0);
}
}
- else if (space == "Object") {
+ else if (space == "object") {
Normal = normalize(transform("object", "world", vector(mcolor)));
}
- else if (space == "World") {
+ else if (space == "world") {
Normal = normalize(vector(mcolor));
}
- else if (space == "Blender Object") {
+ else if (space == "blender_object") {
/* strange blender convention */
mcolor[1] = -mcolor[1];
mcolor[2] = -mcolor[2];
Normal = normalize(transform("object", "world", vector(mcolor)));
}
- else if (space == "Blender World") {
+ else if (space == "blender_world") {
/* strange blender convention */
mcolor[1] = -mcolor[1];
mcolor[2] = -mcolor[2];
diff --git a/intern/cycles/kernel/shaders/node_refraction_bsdf.osl b/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
index d458ca730a4..828becf1818 100644
--- a/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
@@ -18,7 +18,7 @@
shader node_refraction_bsdf(
color Color = 0.8,
- string distribution = "Sharp",
+ string distribution = "sharp",
float Roughness = 0.2,
float IOR = 1.45,
normal Normal = N,
@@ -27,9 +27,9 @@ shader node_refraction_bsdf(
float f = max(IOR, 1e-5);
float eta = backfacing() ? 1.0 / f : f;
- if (distribution == "Sharp")
+ if (distribution == "sharp")
BSDF = Color * refraction(Normal, eta);
- else if (distribution == "Beckmann")
+ else if (distribution == "beckmann")
BSDF = Color * microfacet_beckmann_refraction(Normal, Roughness, eta);
else if (distribution == "GGX")
BSDF = Color * microfacet_ggx_refraction(Normal, Roughness, eta);
diff --git a/intern/cycles/kernel/shaders/node_sky_texture.osl b/intern/cycles/kernel/shaders/node_sky_texture.osl
index 05eed23bea8..a6c187d15f2 100644
--- a/intern/cycles/kernel/shaders/node_sky_texture.osl
+++ b/intern/cycles/kernel/shaders/node_sky_texture.osl
@@ -111,7 +111,7 @@ shader node_sky_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
vector Vector = P,
- string sky_model = "Hosek / Wilkie",
+ string type = "hosek_wilkie",
float theta = 0.0,
float phi = 0.0,
color radiance = color(0.0, 0.0, 0.0),
@@ -125,7 +125,7 @@ shader node_sky_texture(
if (use_mapping)
p = transform(mapping, p);
- if (sky_model == "Hosek / Wilkie")
+ if (type == "hosek_wilkie")
Color = sky_radiance_new(p, phi, theta, radiance, config_x, config_y, config_z);
else
Color = sky_radiance_old(p, phi, theta, radiance, config_x, config_y, config_z);
diff --git a/intern/cycles/kernel/shaders/node_subsurface_scattering.osl b/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
index 1877c7e595f..5ba8f34021d 100644
--- a/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
+++ b/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
@@ -22,13 +22,13 @@ shader node_subsurface_scattering(
vector Radius = vector(0.1, 0.1, 0.1),
float TextureBlur = 0.0,
float Sharpness = 0.0,
- string falloff = "Cubic",
+ string falloff = "cubic",
normal Normal = N,
output closure color BSSRDF = 0)
{
- if (falloff == "Gaussian")
+ if (falloff == "gaussian")
BSSRDF = Color * bssrdf_gaussian(Normal, Scale * Radius, TextureBlur);
- else if (falloff == "Cubic")
+ else if (falloff == "cubic")
BSSRDF = Color * bssrdf_cubic(Normal, Scale * Radius, TextureBlur, Sharpness);
else
BSSRDF = Color * bssrdf_burley(Normal, Scale * Radius, TextureBlur, Color);
diff --git a/intern/cycles/kernel/shaders/node_tangent.osl b/intern/cycles/kernel/shaders/node_tangent.osl
index 53a47396f9f..c527070a2c8 100644
--- a/intern/cycles/kernel/shaders/node_tangent.osl
+++ b/intern/cycles/kernel/shaders/node_tangent.osl
@@ -19,24 +19,24 @@
shader node_tangent(
normal NormalIn = N,
string attr_name = "geom:tangent",
- string direction_type = "Radial",
- string axis = "Z",
+ string direction_type = "radial",
+ string axis = "z",
output normal Tangent = normalize(dPdu))
{
vector T;
- if (direction_type == "UV Map") {
+ if (direction_type == "uv_map") {
getattribute(attr_name, T);
}
- else if (direction_type == "Radial") {
+ else if (direction_type == "radial") {
point generated;
if (!getattribute("geom:generated", generated))
generated = P;
- if (axis == "X")
+ if (axis == "x")
T = vector(0.0, -(generated[2] - 0.5), (generated[1] - 0.5));
- else if (axis == "Y")
+ else if (axis == "y")
T = vector(-(generated[2] - 0.5), 0.0, (generated[0] - 0.5));
else
T = vector(-(generated[1] - 0.5), (generated[0] - 0.5), 0.0);
diff --git a/intern/cycles/kernel/shaders/node_toon_bsdf.osl b/intern/cycles/kernel/shaders/node_toon_bsdf.osl
index 75c5d06f847..ae68a463e46 100644
--- a/intern/cycles/kernel/shaders/node_toon_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_toon_bsdf.osl
@@ -18,15 +18,15 @@
shader node_toon_bsdf(
color Color = 0.8,
- string component = "Diffuse",
+ string component = "diffuse",
float Size = 0.5,
float Smooth = 0.0,
normal Normal = N,
output closure color BSDF = 0)
{
- if (component == "Diffuse")
+ if (component == "diffuse")
BSDF = Color * diffuse_toon(Normal, Size, Smooth);
- else if (component == "Glossy")
+ else if (component == "glossy")
BSDF = Color * glossy_toon(Normal, Size, Smooth);
}
diff --git a/intern/cycles/kernel/shaders/node_uv_map.osl b/intern/cycles/kernel/shaders/node_uv_map.osl
index 77e2e8d12d7..b46b2e73457 100644
--- a/intern/cycles/kernel/shaders/node_uv_map.osl
+++ b/intern/cycles/kernel/shaders/node_uv_map.osl
@@ -18,7 +18,7 @@
shader node_uv_map(
int from_dupli = 0,
- string name = "",
+ string attribute = "",
string bump_offset = "center",
output point UV = point(0.0, 0.0, 0.0))
{
@@ -26,10 +26,10 @@ shader node_uv_map(
getattribute("geom:dupli_uv", UV);
}
else {
- if (name == "")
+ if (attribute == "")
getattribute("geom:uv", UV);
else
- getattribute(name, UV);
+ getattribute(attribute, UV);
}
if (bump_offset == "dx") {
diff --git a/intern/cycles/kernel/shaders/node_vector_math.osl b/intern/cycles/kernel/shaders/node_vector_math.osl
index f83412dc0f7..a7e3637402e 100644
--- a/intern/cycles/kernel/shaders/node_vector_math.osl
+++ b/intern/cycles/kernel/shaders/node_vector_math.osl
@@ -17,33 +17,33 @@
#include "stdosl.h"
shader node_vector_math(
- string type = "Add",
+ string type = "add",
vector Vector1 = vector(0.0, 0.0, 0.0),
vector Vector2 = vector(0.0, 0.0, 0.0),
output float Value = 0.0,
output vector Vector = vector(0.0, 0.0, 0.0))
{
- if (type == "Add") {
+ if (type == "add") {
Vector = Vector1 + Vector2;
Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2])) / 3.0;
}
- else if (type == "Subtract") {
+ else if (type == "subtract") {
Vector = Vector1 - Vector2;
Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2])) / 3.0;
}
- else if (type == "Average") {
+ else if (type == "average") {
Value = length(Vector1 + Vector2);
Vector = normalize(Vector1 + Vector2);
}
- else if (type == "Dot Product") {
+ else if (type == "dot_product") {
Value = dot(Vector1, Vector2);
}
- else if (type == "Cross Product") {
+ else if (type == "cross_product") {
vector c = cross(Vector1, Vector2);
Value = length(c);
Vector = normalize(c);
}
- else if (type == "Normalize") {
+ else if (type == "normalize") {
Value = length(Vector1);
Vector = normalize(Vector1);
}
diff --git a/intern/cycles/kernel/shaders/node_vector_transform.osl b/intern/cycles/kernel/shaders/node_vector_transform.osl
index 8ebaa31ab25..afb95b340d1 100644
--- a/intern/cycles/kernel/shaders/node_vector_transform.osl
+++ b/intern/cycles/kernel/shaders/node_vector_transform.osl
@@ -17,18 +17,18 @@
#include "stdosl.h"
shader node_vector_transform(
- string type = "Vector",
+ string type = "vector",
string convert_from = "world",
string convert_to = "object",
vector VectorIn = vector(0.0, 0.0, 0.0),
output vector VectorOut = vector(0.0, 0.0, 0.0))
{
- if (type == "Vector" || type == "Normal") {
+ if (type == "vector" || type == "normal") {
VectorOut = transform(convert_from, convert_to, VectorIn);
- if (type == "Normal")
+ if (type == "normal")
VectorOut = normalize(VectorOut);
}
- else if (type == "Point") {
+ else if (type == "point") {
point Point = (point)VectorIn;
VectorOut = transform(convert_from, convert_to, Point);
}
diff --git a/intern/cycles/kernel/shaders/node_voronoi_texture.osl b/intern/cycles/kernel/shaders/node_voronoi_texture.osl
index bacdd593c7c..0c3b95ae4d0 100644
--- a/intern/cycles/kernel/shaders/node_voronoi_texture.osl
+++ b/intern/cycles/kernel/shaders/node_voronoi_texture.osl
@@ -22,7 +22,7 @@
shader node_voronoi_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
- string coloring = "Intensity",
+ string coloring = "intensity",
float Scale = 5.0,
point Vector = P,
output float Fac = 0.0,
@@ -40,7 +40,7 @@ shader node_voronoi_texture(
voronoi(p * Scale, 1.0, da, pa);
/* Colored output */
- if (coloring == "Intensity") {
+ if (coloring == "intensity") {
Fac = fabs(da[0]);
Color = color(Fac);
}
diff --git a/intern/cycles/kernel/shaders/node_wave_texture.osl b/intern/cycles/kernel/shaders/node_wave_texture.osl
index a07742faefc..71bc9324705 100644
--- a/intern/cycles/kernel/shaders/node_wave_texture.osl
+++ b/intern/cycles/kernel/shaders/node_wave_texture.osl
@@ -23,10 +23,10 @@ float wave(point p, string type, string profile, float detail, float distortion,
{
float n = 0.0;
- if (type == "Bands") {
+ if (type == "bands") {
n = (p[0] + p[1] + p[2]) * 10.0;
}
- else if (type == "Rings") {
+ else if (type == "rings") {
n = length(p) * 20.0;
}
@@ -34,7 +34,7 @@ float wave(point p, string type, string profile, float detail, float distortion,
n = n + (distortion * noise_turbulence(p * dscale, detail, 0));
}
- if (profile == "Sine") {
+ if (profile == "sine") {
return 0.5 + 0.5 * sin(n);
}
else {
@@ -48,8 +48,8 @@ float wave(point p, string type, string profile, float detail, float distortion,
shader node_wave_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
- string type = "Bands",
- string profile = "Sine",
+ string type = "bands",
+ string profile = "sine",
float Scale = 5.0,
float Distortion = 0.0,
float Detail = 2.0,