From e7c735418fad0df613f79507a2f0a87381a72e87 Mon Sep 17 00:00:00 2001 From: plagman Date: Sun, 2 Oct 2011 03:09:20 +0000 Subject: [PATCH] Polymer: Fix upside-down projective textures We need to Y-invert the projection texcoords when sampling from the lightmap. git-svn-id: https://svn.eduke32.com/eduke32@2055 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index b5283f77b..bd5625900 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -456,7 +456,7 @@ _prprogrambit prprogrambits[PR_BIT_COUNT] = { "uniform sampler2D lightMap;\n" "\n", // frag_prog - " lightTexel = texture2D(lightMap, gl_TexCoord[2].st / gl_TexCoord[2].q).rgb;\n" + " lightTexel = texture2D(lightMap, vec2(gl_TexCoord[2].s, -gl_TexCoord[2].t) / gl_TexCoord[2].q).rgb;\n" "\n", }, {