summaryrefslogtreecommitdiffstats
path: root/progs/glsl/CH11-toyball.frag.txt
diff options
context:
space:
mode:
Diffstat (limited to 'progs/glsl/CH11-toyball.frag.txt')
-rw-r--r--progs/glsl/CH11-toyball.frag.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/progs/glsl/CH11-toyball.frag.txt b/progs/glsl/CH11-toyball.frag.txt
index f3cac62fb3e..90ec1c27fc1 100644
--- a/progs/glsl/CH11-toyball.frag.txt
+++ b/progs/glsl/CH11-toyball.frag.txt
@@ -49,15 +49,14 @@ void main()
inorout += dot(distance, vec4(1.0));
distance.x = dot(p, HalfSpace4);
-// distance.y = StripeWidth - abs(p.z);
- distance.y = StripeWidth - abs(p.y);
+ distance.y = StripeWidth - abs(p.z);
distance = smoothstep(-FWidth, FWidth, distance);
inorout += distance.x;
inorout = clamp(inorout, 0.0, 1.0);
- surfColor = mix(Yellow, Blue, distance.y);
- surfColor = mix(surfColor, Red, inorout);
+ surfColor = mix(Yellow, Red, inorout);
+ surfColor = mix(surfColor, Blue, distance.y);
// normal = point on surface for sphere at (0,0,0)
normal = p;