From f68067e101d596e59b39f94fafc39483f1c71233 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 17:24:40 -0700 Subject: add texture rotation --- progs/glsl/CH11-toyball.vert.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'progs/glsl/CH11-toyball.vert.txt') diff --git a/progs/glsl/CH11-toyball.vert.txt b/progs/glsl/CH11-toyball.vert.txt index 1aa7e9cac2..b7da3ac839 100644 --- a/progs/glsl/CH11-toyball.vert.txt +++ b/progs/glsl/CH11-toyball.vert.txt @@ -14,7 +14,11 @@ uniform vec4 BallCenter; // ball center in modelling coordinates void main() { - ECposition = gl_ModelViewMatrix * gl_Vertex; +//orig: ECposition = gl_ModelViewMatrix * gl_Vertex; + + ECposition = gl_TextureMatrix[0] * gl_Vertex; + ECposition = gl_ModelViewMatrix * ECposition; + ECballCenter = gl_ModelViewMatrix * BallCenter; gl_Position = ftransform(); } -- cgit v1.2.3