Files
test/source/blender/gpu/shaders/material/gpu_shader_material_transparent.glsl
Clément Foucault 062a843bfb EEVEE: Fix undefined behavior when using BSDF nodes inside volume shaders
This should fix T76171 Eevee bsdf shaders glitches
2020-06-30 01:32:00 +02:00

12 lines
326 B
GLSL

#ifndef VOLUMETRICS
void node_bsdf_transparent(vec4 color, out Closure result)
{
result = CLOSURE_DEFAULT;
result.radiance = vec3(0.0);
result.transmittance = abs(color.rgb);
}
#else
/* Stub transparent because it is not compatible with volumetrics. */
# define node_bsdf_transparent(a, b) (b = CLOSURE_DEFAULT)
#endif