X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=sdr%2Flightmap.p.glsl;h=034da25d9b32323ee282442dc531d8ce8a31bdfe;hp=37b2abb5a63e396908b7da74a917608fc0dffcf8;hb=2829b50d6b3d9e97fc9399f5b6929f7d64021366;hpb=197bafc7f54795243d4c217c2efcf41f01d4100d 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