Page MenuHome

EEVEE: Random Flickering Materials
Closed, ResolvedPublic


System Information
Operating system: Darwin-17.2.0-x86_64-i386-64bit 64 Bits
Graphics card: NVIDIA GeForce GTX 1050 Ti OpenGL Engine NVIDIA Corporation 4.1 NVIDIA-10.27.6 378.

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-15 20:44, hash: rBaf51988115d4
Worked: (optional)

Short description of error
The rock material is flickering on some machines but not all. It flickers in the viewport and the render.
(Tested on 2 machines - Flickering on Mac, not flickering on Linux)

Exact steps for others to reproduce the error
Open the attached file and pivot around the viewport or scrub the timeline to see the material randomly flicker.
(see attached video and file)

Event Timeline

Germano Cavalcante (mano-wii) lowered the priority of this task from 90 to 50.

It seems to be a problem with the Principled BSDF node + Attribute "Col".
Here is a simplified file:

I cannot reproduce this setups. @Germano Cavalcante (mano-wii) could you investigate? Maybe it is related to the sRGB booleans in eevee_material.c.

The problem is that the pointer to the uniform used in DRW_shgroup_uniform_bool(...) in EEVEE_materials_cache_populate(...) is released before it is read by GPU_shader_uniform_vector_int(...).
Every time the DRW_cache_object_surface_material_get(...) is called for an object, the pointer in cache->auto_layer_is_srgb is released and another allocated in place.
But in the file we have intances and so the same object goes through EEVEE_cache_populate(...) in the same loop.
Thus shgroup now references the same uniform two times, but one with invalid pointer and other with valid pointer.

A solution would be to skip the mesh_cd_extract_auto_layers_names_and_srgb function for a same object.