diff options
author | Clément Foucault <fclem> | 2022-09-05 10:16:59 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-09-05 10:18:44 +0300 |
commit | f0166bc168ed637a1ab74c90ad6b63e89ca6da8e (patch) | |
tree | e2640a6c2be9bcdc95d3c5481201e5830985623a /source/blender/draw/engines/eevee/shaders | |
parent | b0d9b6f6df230dce727200cb9909da7638d6caba (diff) |
Fix T100775: Regression: EEVEE world environment is stretched when using orthographic view
It was using normalized vector instead of `viewCameraVec` which account for
orthographic views.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D15861
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/surface_frag.glsl | 2 |
1 files changed, 1 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 2a212b757c2..f72ec3064ab 100644 --- a/source/blender/draw/engines/eevee/shaders/surface_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/surface_frag.glsl @@ -153,7 +153,7 @@ void main() vec3 attr_load_orco(vec4 orco) { /* Retain precision better than g_data.P (see T99128). */ - return transform_direction(ViewMatrixInverse, normalize(viewPosition)); + return -normal_view_to_world(viewCameraVec(viewPosition)); } /* Unsupported. */ vec4 attr_load_tangent(vec4 tangent) |