projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed reflections in VR
[laserbrain_demo]
/
sdr
/
lightmap.p.glsl
diff --git
a/sdr/lightmap.p.glsl
b/sdr/lightmap.p.glsl
index
37b2abb
..
034da25
100644
(file)
--- 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 sampler2D lightmap;
#ifdef USE_MIRROR
uniform sampler2D mirrortex;
+uniform vec2 mirtex_offs;
uniform vec2 mirtex_scale;
uniform float reflectivity;
#endif
uniform vec2 mirtex_scale;
uniform float reflectivity;
#endif
@@
-23,7
+24,7
@@
void main()
#endif
#ifdef USE_MIRROR
#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
diffuse += refl * reflectivity; // just add it to diffuse until we get another source of specularity
#endif