Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-03-12 17:45:44 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-12 18:01:23 +0300
commitaaeca5d87244bca2832b86d60457f0568acf1427 (patch)
tree1a06cfe4459de9077ba82c941eeaa712f58d593f /source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
parentccb4484ea346d640fcd583ced9137313382390ad (diff)
Eevee: Planar Ref.: Invert view matrix to remove triangle front face flip
This was the cause of some issue with normal mapping. This way is cleaner since it does not modify the state of the drawcalls and other ad-hoc solutions to fix the problems down the road. Unfortunately, it does require to fix every sampling coordinate for this texture. Fix T62215: flipped normals in reflection plane
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
index a991e640a79..7881079e258 100644
--- a/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
@@ -200,7 +200,8 @@ vec3 probe_evaluate_planar(
/* TODO: If we support non-ssr planar reflection, we should blur them with gaussian
* and chose the right mip depending on the cone footprint after projection */
- vec3 sample = textureLod(probePlanars, vec3(refco.xy * 0.5 + 0.5, id), 0.0).rgb;
+ /* NOTE: X is inverted here to compensate inverted drawing. */
+ vec3 sample = textureLod(probePlanars, vec3(refco.xy * vec2(-0.5, 0.5) + 0.5, id), 0.0).rgb;
return sample;
}