Commit: 226685d3a0ca5d54c7bc4ca29d3ab5ff40acf3f1
Author: Clément Foucault
Date:   Sat Feb 3 02:14:36 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB226685d3a0ca5d54c7bc4ca29d3ab5ff40acf3f1

Eevee: Render: Fix hashed-alpha testing.

===================================================================

M       source/blender/draw/engines/eevee/eevee_engine.c
M       source/blender/draw/engines/eevee/eevee_materials.c
M       source/blender/draw/engines/eevee/eevee_render.c

===================================================================

diff --git a/source/blender/draw/engines/eevee/eevee_engine.c 
b/source/blender/draw/engines/eevee/eevee_engine.c
index 29e75ea2c45..1967762a36d 100644
--- a/source/blender/draw/engines/eevee/eevee_engine.c
+++ b/source/blender/draw/engines/eevee/eevee_engine.c
@@ -194,8 +194,8 @@ static void eevee_draw_background(void *vedata)
                {
                        BLI_halton_3D(primes, offset, 
stl->effects->taa_current_sample, r);
                        EEVEE_update_noise(psl, fbl, r);
-
                        EEVEE_volumes_set_jitter(sldata, 
stl->effects->taa_current_sample - 1);
+                       EEVEE_materials_init(sldata, stl, fbl);
                }
 
                /* Refresh Probes */
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c 
b/source/blender/draw/engines/eevee/eevee_materials.c
index 8f2a311c675..76f61778df7 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -593,16 +593,14 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, 
EEVEE_StorageList *stl, E
                eevee_init_noise_texture();
        }
 
-       /* Alpha hash scale: Non-flickering size if we are not refining the 
render. */
        if (!DRW_state_is_image_render() &&
-               (((stl->effects->enabled_effects & EFFECT_TAA) == 0) ||
-                (stl->effects->taa_current_sample == 1)))
+               ((stl->effects->enabled_effects & EFFECT_TAA) == 0))
        {
                e_data.alpha_hash_offset = 0.0f;
        }
        else {
                double r;
-               BLI_halton_1D(5, 0.0, stl->effects->taa_current_sample, &r);
+               BLI_halton_1D(5, 0.0, stl->effects->taa_current_sample - 1, &r);
                e_data.alpha_hash_offset = (float)r;
        }
 
diff --git a/source/blender/draw/engines/eevee/eevee_render.c 
b/source/blender/draw/engines/eevee/eevee_render.c
index c2c7959ae7e..3dd9313942f 100644
--- a/source/blender/draw/engines/eevee/eevee_render.c
+++ b/source/blender/draw/engines/eevee/eevee_render.c
@@ -428,6 +428,7 @@ void EEVEE_render_draw(EEVEE_Data *vedata, struct 
RenderEngine *engine, struct D
                EEVEE_update_noise(psl, fbl, r);
                EEVEE_temporal_sampling_matrices_calc(stl->effects, 
g_data->viewmat, g_data->persmat, r);
                EEVEE_volumes_set_jitter(sldata, 
stl->effects->taa_current_sample - 1);
+               EEVEE_materials_init(sldata, stl, fbl);
 
                /* Refresh Probes */
                while (EEVEE_lightprobes_all_probes_ready(sldata, vedata) == 
false) {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to