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.
This commit is contained in:
Clément Foucault
2022-06-29 11:06:57 +02:00
parent 70c6beeafb
commit 40f40e9931

View File

@@ -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)