summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2007-10-26 15:39:50 +0800
committerZou Nan hai <nanhai.zou@intel.com>2007-10-26 15:39:50 +0800
commit6ef27b88e6f767cd476676b33cb7c4ea6922234e (patch)
tree463d6a70b986cb62b3516ef6fd8e691f680f30ea /progs
parentff042bfdeeeb0a3d658d5ab1dbdcac7b67aac0f8 (diff)
parentde803f538c16096c9e241cfdddc092ac2aa2504e (diff)
Merge branch '965-glsl'
Conflicts: src/mesa/drivers/dri/i965/brw_sf.h src/mesa/drivers/dri/i965/intel_context.c
Diffstat (limited to 'progs')
-rw-r--r--progs/glsl/CH11-toyball.frag.txt7
-rw-r--r--progs/glsl/CH11-toyball.vert.txt7
2 files changed, 8 insertions, 6 deletions
diff --git a/progs/glsl/CH11-toyball.frag.txt b/progs/glsl/CH11-toyball.frag.txt
index 90ec1c27fc..f3cac62fb3 100644
--- a/progs/glsl/CH11-toyball.frag.txt
+++ b/progs/glsl/CH11-toyball.frag.txt
@@ -49,14 +49,15 @@ void main()
inorout += dot(distance, vec4(1.0));
distance.x = dot(p, HalfSpace4);
- distance.y = StripeWidth - abs(p.z);
+// distance.y = StripeWidth - abs(p.z);
+ distance.y = StripeWidth - abs(p.y);
distance = smoothstep(-FWidth, FWidth, distance);
inorout += distance.x;
inorout = clamp(inorout, 0.0, 1.0);
- surfColor = mix(Yellow, Red, inorout);
- surfColor = mix(surfColor, Blue, distance.y);
+ surfColor = mix(Yellow, Blue, distance.y);
+ surfColor = mix(surfColor, Red, inorout);
// normal = point on surface for sphere at (0,0,0)
normal = p;
diff --git a/progs/glsl/CH11-toyball.vert.txt b/progs/glsl/CH11-toyball.vert.txt
index b7da3ac839..a3ee1b0377 100644
--- a/progs/glsl/CH11-toyball.vert.txt
+++ b/progs/glsl/CH11-toyball.vert.txt
@@ -14,10 +14,11 @@ uniform vec4 BallCenter; // ball center in modelling coordinates
void main()
{
-//orig: ECposition = gl_ModelViewMatrix * gl_Vertex;
+ ECposition = gl_ModelViewMatrix * gl_Vertex;
- ECposition = gl_TextureMatrix[0] * gl_Vertex;
- ECposition = gl_ModelViewMatrix * ECposition;
+// ECposition = gl_TextureMatrix[0] * gl_Vertex;
+// ECposition = gl_MultiTexCoord0 * gl_Vertex;
+// ECposition = gl_ModelViewMatrix * ECposition;
ECballCenter = gl_ModelViewMatrix * BallCenter;
gl_Position = ftransform();