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>2017-09-12 19:32:29 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-09-12 19:32:29 +0300
commit8a5af5202c51e29284a03245d7331a4f2fe6d08f (patch)
treef953e01d8079437dd01c5104014aef24370c11e5 /source/blender/draw/engines/eevee/eevee_effects.c
parent79a1d74c78cff7ec402835e4c61850df0f3b1b29 (diff)
Eevee: Fix T52713: SSR not working in AMD
This was cause by a fairly funky unitialize buffer (last frame) that was causing NANs during the SSR resolve stage. They were then propagated to the whole image during the next swap. Bypassing the SSR completly if no valid history exists fixes the problem. Also disabling SSR data output in this case so we can have correct reflection in the 1st history buffer.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_effects.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_effects.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c
index 73c7b4e96b3..b18d6455893 100644
--- a/source/blender/draw/engines/eevee/eevee_effects.c
+++ b/source/blender/draw/engines/eevee/eevee_effects.c
@@ -1257,7 +1257,7 @@ void EEVEE_effects_do_ssr(EEVEE_SceneLayerData *UNUSED(sldata), EEVEE_Data *veda
EEVEE_TextureList *txl = vedata->txl;
EEVEE_EffectsInfo *effects = stl->effects;
- if ((effects->enabled_effects & EFFECT_SSR) != 0) {
+ if (((effects->enabled_effects & EFFECT_SSR) != 0) && stl->g_data->valid_double_buffer) {
DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
e_data.depth_src = dtxl->depth;
@@ -1266,14 +1266,8 @@ void EEVEE_effects_do_ssr(EEVEE_SceneLayerData *UNUSED(sldata), EEVEE_Data *veda
}
DRW_framebuffer_bind(fbl->screen_tracing_fb);
- if (stl->g_data->valid_double_buffer) {
- /* Raytrace. */
- DRW_draw_pass(psl->ssr_raytrace);
- }
- else {
- float clear_col[4] = {0.0f, 0.0f, -1.0f, 0.001f};
- DRW_framebuffer_clear(true, false, false, clear_col, 0.0f);
- }
+ /* Raytrace. */
+ DRW_draw_pass(psl->ssr_raytrace);
for (int i = 0; i < effects->ssr_ray_count; ++i) {
DRW_framebuffer_texture_detach(stl->g_data->ssr_hit_output[i]);