From 9957096f35fcb9d63ae611464667638dcbfb6dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 9 Mar 2021 11:24:16 +0100 Subject: EEVEE: ScreenSpaceReflections: Improve hit quality This changes the hitBuffer to store `ReflectionDir * HitTime, invPdf` just as the reference presentation. This avoids issues when the hit refinement produce a coordinate that does not land on the correct surface. We now store the pdf in the same texture and store it inversed so we can remove some ALU from the resolve shader. This also rewrite the resolve shader to not be vectorized to improve readability and scalability. --- source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl') diff --git a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl index 24de4520207..b3174afc799 100644 --- a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl @@ -69,3 +69,5 @@ layout(std140) uniform common_block #define ssrQuality ssrParameters.x #define ssrThickness ssrParameters.y #define ssrPixelSize ssrParameters.zw + +#define ssrUvScale hizUvScale.zw -- cgit v1.2.3