[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/games/astrododge/data/shaders
From: Rivo Laks <rivolaks () hot ! ee>
Date: 2009-07-21 16:12:06
Message-ID: 1248192726.238790.18084.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1000592 by rivol:
Make point- and spotlights work again.
M +2 -1 light-point.vert
M +3 -2 light-spot.vert
--- trunk/playground/games/astrododge/data/shaders/light-point.vert #1000591:1000592
@@ -1,9 +1,10 @@
uniform vec3 lightPosition;
varying vec3 toLight;
+varying vec4 vertexEye;
void calculateLightVertex()
{
- toLight = lightPosition - (gl_ModelViewMatrix * gl_Vertex).xyz;
+ toLight = lightPosition - vertexEye.xyz;
}
--- trunk/playground/games/astrododge/data/shaders/light-spot.vert #1000591:1000592
@@ -1,9 +1,10 @@
varying vec3 toLight;
varying float vertexdist;
+varying vec4 vertexEye;
void calculateLightVertex()
{
- toLight = -(gl_ModelViewMatrix * gl_Vertex).xyz;
- vertexdist = length(gl_ModelViewMatrix * gl_Vertex);
+ toLight = -vertexEye.xyz;
+ vertexdist = length(toLight);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic