forked from bartvdbraak/blender
Cycles / OSL:
* First batch of compile fixes for several shaders, mainly syntax errors.
This commit is contained in:
parent
748582f49e
commit
23dca13691
@ -40,7 +40,7 @@ float safe_log(float a, float b)
|
|||||||
|
|
||||||
shader node_math(
|
shader node_math(
|
||||||
string type = "Add",
|
string type = "Add",
|
||||||
int Clamp = false,
|
int Clamp = 0,
|
||||||
float Value1 = 0.0,
|
float Value1 = 0.0,
|
||||||
float Value2 = 0.0,
|
float Value2 = 0.0,
|
||||||
output float Value = 0.0)
|
output float Value = 0.0)
|
||||||
|
@ -280,7 +280,7 @@ color node_mix_clamp(color col)
|
|||||||
|
|
||||||
shader node_mix(
|
shader node_mix(
|
||||||
string type = "Mix",
|
string type = "Mix",
|
||||||
int Clamp = false,
|
int Clamp = 0,
|
||||||
float Fac = 0.5,
|
float Fac = 0.5,
|
||||||
color Color1 = color(0.0, 0.0, 0.0),
|
color Color1 = color(0.0, 0.0, 0.0),
|
||||||
color Color2 = color(0.0, 0.0, 0.0),
|
color Color2 = color(0.0, 0.0, 0.0),
|
||||||
|
@ -27,7 +27,7 @@ float noise(point p, string basis, float distortion, float detail)
|
|||||||
int hard = 0;
|
int hard = 0;
|
||||||
float fac = 0.0;
|
float fac = 0.0;
|
||||||
|
|
||||||
if(distortion != 0.0( {
|
if(distortion != 0.0) {
|
||||||
r[0] = noise_basis(p + point(13.5), basis) * distortion;
|
r[0] = noise_basis(p + point(13.5), basis) * distortion;
|
||||||
r[1] = noise_basis(p, basis) * distortion;
|
r[1] = noise_basis(p, basis) * distortion;
|
||||||
r[2] = noise_basis(p - point(13.5), basis) * distortion;
|
r[2] = noise_basis(p - point(13.5), basis) * distortion;
|
||||||
|
@ -22,7 +22,7 @@ shader node_normal(
|
|||||||
normal Direction = normal(0.0, 0.0, 0.0),
|
normal Direction = normal(0.0, 0.0, 0.0),
|
||||||
normal NormalIn = normal(0.0, 0.0, 0.0),
|
normal NormalIn = normal(0.0, 0.0, 0.0),
|
||||||
output normal NormalOut = normal(0.0, 0.0, 0.0),
|
output normal NormalOut = normal(0.0, 0.0, 0.0),
|
||||||
output float Dot = 1.0
|
output float Dot = 1.0)
|
||||||
{
|
{
|
||||||
Direction = normalize(Direction);
|
Direction = normalize(Direction);
|
||||||
NormalOut = Direction;
|
NormalOut = Direction;
|
||||||
|
@ -31,14 +31,14 @@ float wave(point p, float scale, string type, float detail, float distortion, fl
|
|||||||
float n = 0.0;
|
float n = 0.0;
|
||||||
|
|
||||||
if(type == "Bands") {
|
if(type == "Bands") {
|
||||||
n = (x + y + z)*10.0);
|
n = (x + y + z)*10.0;
|
||||||
}
|
}
|
||||||
else if(type == "Rings") {
|
else if(type == "Rings") {
|
||||||
n = (sqrt(x*x + y*y + z*z)*20.0);
|
n = (sqrt(x*x + y*y + z*z)*20.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(distortion != 0.0) {
|
if(distortion != 0.0) {
|
||||||
n = n +(distortion * noise_turbulence(p*dscale, "Perlin", detail, 0);
|
n = n +(distortion * noise_turbulence(p*dscale, "Perlin", detail, 0));
|
||||||
}
|
}
|
||||||
result = noise_wave("Sine", n);
|
result = noise_wave("Sine", n);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user