Search
lxdream.org :: lxdream :: r652:231ca5cbd397
lxdream 0.9.1
released Jun 29
Download Now
changeset652:231ca5cbd397 lxdream-render
parent651:95a9cf98785b
child1066:ddffe9d2b332
authornkeynes
dateWed Mar 26 11:56:12 2008 +0000 (11 years ago)
branchlxdream-render
Fix perspective correction (at least for those with shader support)
src/pvr2/gl_slsrc.c
src/pvr2/vertex.glsl
1.1 --- a/src/pvr2/gl_slsrc.c Sun Mar 16 05:42:24 2008 +0000
1.2 +++ b/src/pvr2/gl_slsrc.c Wed Mar 26 11:56:12 2008 +0000
1.3 @@ -6,8 +6,9 @@
1.4 \n\
1.5 void main()\n\
1.6 {\n\
1.7 - gl_Position = ftransform();\n\
1.8 -// gl_Position.z = log(gl_Vertex.z);\n\
1.9 + vec4 tmp = ftransform();\n\
1.10 + float w = gl_Vertex.z;\n\
1.11 + gl_Position = tmp * w;\n\
1.12 gl_FrontColor = gl_Color;\n\
1.13 gl_FrontSecondaryColor = gl_SecondaryColor;\n\
1.14 gl_TexCoord[0] = gl_MultiTexCoord0;\n\
2.1 --- a/src/pvr2/vertex.glsl Sun Mar 16 05:42:24 2008 +0000
2.2 +++ b/src/pvr2/vertex.glsl Wed Mar 26 11:56:12 2008 +0000
2.3 @@ -2,8 +2,9 @@
2.4
2.5 void main()
2.6 {
2.7 - gl_Position = ftransform();
2.8 -// gl_Position.z = log(gl_Vertex.z);
2.9 + vec4 tmp = ftransform();
2.10 + float w = gl_Vertex.z;
2.11 + gl_Position = tmp * w;
2.12 gl_FrontColor = gl_Color;
2.13 gl_FrontSecondaryColor = gl_SecondaryColor;
2.14 gl_TexCoord[0] = gl_MultiTexCoord0;
.