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-05 21:28:51 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-10-05 21:29:12 +0300
commit6306d747b770685f38f95bc57f8681335ddfa506 (patch)
tree71a54752a9400149535d7a3a95652fe9e1a86c0c /source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
parent74ff0aeea0180dfd89b98f15dacf0dd0c8fa8dfd (diff)
DRW: Split ViewProjectionMatrix in order to increase precision
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. Test file: {F13610017} Results: | Platform | Master | Split Matrix| | Linux + Mesa + AMD W6600 | 48 fps | 47 fps | | Macbook Pro M1 | 50 fps | 51 fps | | Linux + NVidia 1080Ti | 51 fps | 52 fps | | Linux + Radeon Vega 64 | 25.6 fps | 26.7 fps | Increased precision when far from origin: {F13610024} {F13610025} Reviewed By: jbakker Differential Revision: https://developer.blender.org/D16125
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
index e1035af37be..6c1a95bba49 100644
--- a/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
@@ -203,7 +203,7 @@ vec3 probe_evaluate_planar(int id, PlanarData pd, vec3 P, vec3 N, vec3 V, float
vec3 ref_pos = point_on_plane + proj_ref;
/* Reproject to find texture coords. */
- vec4 refco = ViewProjectionMatrix * vec4(ref_pos, 1.0);
+ vec4 refco = ProjectionMatrix * (ViewMatrix * vec4(ref_pos, 1.0));
refco.xy /= refco.w;
/* TODO: If we support non-ssr planar reflection, we should blur them with gaussian