mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-25 19:39:42 +00:00
Merge branch 'cherry-pick-abb14df943304a954f734b6289fb48f4951ae242' into 'master'
[Multiview][Postprocessor] omw_GetWorldPosFromUV() should use omw_GetDepth() See merge request OpenMW/openmw!2320 (cherry picked from commit23e765954d
)70e1efdd
omw_GetWorldPosFromUV() should use omw_GetDepth()
This commit is contained in:
parent
071b66999d
commit
d262ca2d30
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue