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>2022-06-29 12:06:57 +0300
committerThomas Dinges <blender@dingto.org>2022-06-29 17:18:20 +0300
commit7b0ccaed7f17b4e4f7acc4e1457c916ebaa1eeb1 (patch)
tree5c736940430c476e8e87052f7553f480de429f7c
parentf2a7be6e75db35f7d1945e4a0d443c0120f7b8cb (diff)
Fix T99128: EEVEE: Regression: Pixelated Environment Texture
Use view position to retreive world space direction to retain float precision. Candidate for 3.2.1 corrective release.
-rw-r--r--source/blender/draw/engines/eevee/shaders/surface_frag.glsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/surface_frag.glsl b/source/blender/draw/engines/eevee/shaders/surface_frag.glsl
index ace6c7d788d..2a212b757c2 100644
--- a/source/blender/draw/engines/eevee/shaders/surface_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/surface_frag.glsl
@@ -152,7 +152,8 @@ void main()
/* Only supported attrib for world/background shaders. */
vec3 attr_load_orco(vec4 orco)
{
- return g_data.P;
+ /* Retain precision better than g_data.P (see T99128). */
+ return transform_direction(ViewMatrixInverse, normalize(viewPosition));
}
/* Unsupported. */
vec4 attr_load_tangent(vec4 tangent)