diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-03-09 13:24:16 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-03-10 19:57:09 +0300 |
commit | 9957096f35fcb9d63ae611464667638dcbfb6dd6 (patch) | |
tree | 040ac288e69047e57b190f3e01b224feb18a8d12 /source/blender/draw/engines/eevee/eevee_materials.c | |
parent | 79bc4962d376a37356752334d43021a18fbdba5b (diff) |
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.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_materials.c')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_materials.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index bc7db4b5df6..042fa621117 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -128,7 +128,8 @@ void EEVEE_material_bind_resources(DRWShadingGroup *shgrp, DRW_shgroup_uniform_float_copy( shgrp, "refractionDepth", (refract_depth) ? *refract_depth : 0.0); if (use_ssrefraction) { - DRW_shgroup_uniform_texture_ref(shgrp, "colorBuffer", &vedata->txl->filtered_radiance); + DRW_shgroup_uniform_texture_ref( + shgrp, "refractColorBuffer", &vedata->txl->filtered_radiance); } } if (use_alpha_blend) { |