X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=sdr%2Flightmap.p.glsl;h=034da25d9b32323ee282442dc531d8ce8a31bdfe;hb=7d1500f05f8743920c04fce9c837e98e129654a3;hp=37b2abb5a63e396908b7da74a917608fc0dffcf8;hpb=405378c467bd3b73532bb6a0ea45ff6bf712f539;p=laserbrain_demo diff --git a/sdr/lightmap.p.glsl b/sdr/lightmap.p.glsl index 37b2abb..034da25 100644 --- a/sdr/lightmap.p.glsl +++ b/sdr/lightmap.p.glsl @@ -5,6 +5,7 @@ uniform sampler2D texmap; uniform sampler2D lightmap; #ifdef USE_MIRROR uniform sampler2D mirrortex; +uniform vec2 mirtex_offs; uniform vec2 mirtex_scale; uniform float reflectivity; #endif @@ -23,7 +24,7 @@ void main() #endif #ifdef USE_MIRROR - vec3 refl = texture2D(mirrortex, gl_FragCoord.xy * mirtex_scale).rgb; + vec3 refl = texture2D(mirrortex, (gl_FragCoord.xy + mirtex_offs) * mirtex_scale).rgb; diffuse += refl * reflectivity; // just add it to diffuse until we get another source of specularity #endif