diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-01-03 22:41:14 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-01-04 12:43:54 +0300 |
commit | 4df11e3c70688ea3759793946d998bf2e8d55c45 (patch) | |
tree | 62bd1a89c423fcd6fcf2e353659b46ac929a51eb /source | |
parent | 5ab2fc65c6d6ac10d298b2c648cf32ee50366741 (diff) |
Eevee: SSR: Fix ssr nor working in ogl render.
Diffstat (limited to 'source')
3 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c index fed8460e008..685252f884a 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.c +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c @@ -1645,6 +1645,9 @@ void EEVEE_lightprobes_refresh(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) else if (true) { /* TODO if at least one probe needs refresh */ lightprobes_refresh_all_no_world(sldata, vedata); } + + /* Disable SSR if we cannot read previous frame */ + sldata->probes->ssr_toggle = vedata->stl->g_data->valid_double_buffer; } void EEVEE_lightprobes_free(void) diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index e402fdb3306..0aea80f5471 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -354,7 +354,7 @@ static void add_standard_uniforms( DRWShadingGroup *shgrp, EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, int *ssr_id, float *refract_depth, bool use_ssrefraction, bool use_alpha_blend, bool use_sss) { - if (ssr_id == NULL || !vedata->stl->g_data->valid_double_buffer) { + if (ssr_id == NULL) { static int no_ssr = -1.0f; ssr_id = &no_ssr; } diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl index 218ab5a169a..a9350dbc632 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl @@ -691,7 +691,6 @@ Closure closure_mix(Closure cl1, Closure cl2, float fac) } else { cl.ssr_data = mix(vec4(vec3(0.0), cl2.ssr_data.w), cl2.ssr_data.xyzw, fac); /* do not blend roughness */ - cl.ssr_data = mix(vec4(vec3(0.0), cl2.ssr_data.w), cl2.ssr_data.xyzw, fac); /* do not blend roughness */ cl.ssr_normal = cl2.ssr_normal; cl.ssr_id = cl2.ssr_id; } |