From d262ca2d30861e98c0bf7ebda70839deb90f1b27 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 21 Aug 2022 17:47:54 +0000 Subject: [PATCH] Merge branch 'cherry-pick-abb14df943304a954f734b6289fb48f4951ae242' into 'master' [Multiview][Postprocessor] omw_GetWorldPosFromUV() should use omw_GetDepth() See merge request OpenMW/openmw!2320 (cherry picked from commit 23e765954d29afbedf15c31c6ca3d9e4a539c6d7) 70e1efdd omw_GetWorldPosFromUV() should use omw_GetDepth() --- components/fx/pass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/fx/pass.cpp b/components/fx/pass.cpp index 27d6f6ef0a..461223a884 100644 --- a/components/fx/pass.cpp +++ b/components/fx/pass.cpp @@ -197,7 +197,7 @@ mat4 omw_InvProjectionMatrix() #if (OMW_REVERSE_Z == 1) float flippedDepth = 1.0 - depth; #else - float flippedDepth = omw_Texture2D(omw_SamplerDepth, uv).r * 2.0 - 1.0; + float flippedDepth = depth * 2.0 - 1.0; #endif vec4 clip_space = vec4(uv * 2.0 - 1.0, flippedDepth, 1.0); vec4 world_space = omw.invViewMatrix * (omw.invProjectionMatrix * clip_space);