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-10-01 21:55:00 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-10-01 22:25:21 +0300
commit4847bcdbe10b4f7f84657749a651c3af3a430b1c (patch)
tree6355f26e441708d362d5599635ba30122faee5f2 /source/blender/draw/engines/eevee_next/shaders/eevee_nodetree_lib.glsl
parent520d111eca55941dd0924998927ec1a994895f54 (diff)
DRW: Split ViewProjectionMatrix in order to increase precisiontmp-drw-split-matrix
This also removes the need to compute the persmat and saves some memory from the `ViewInfos` struct. This is needed to allow multiview support. Initial testing found no major performance regression during vertex heavy workload. Differential Revision: https://developer.blender.org/D16125
Diffstat (limited to 'source/blender/draw/engines/eevee_next/shaders/eevee_nodetree_lib.glsl')
-rw-r--r--source/blender/draw/engines/eevee_next/shaders/eevee_nodetree_lib.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_nodetree_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_nodetree_lib.glsl
index dd047709afd..9422cb726b7 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_nodetree_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_nodetree_lib.glsl
@@ -344,7 +344,7 @@ vec3 coordinate_screen(vec3 P)
}
else {
/* TODO(fclem): Actual camera transform. */
- window.xy = project_point(ViewProjectionMatrix, P).xy * 0.5 + 0.5;
+ window.xy = project_point(ProjectionMatrix, transform_point(ViewMatrix, P)).xy * 0.5 + 0.5;
window.xy = window.xy * CameraTexCoFactors.xy + CameraTexCoFactors.zw;
}
return window;