diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-06-30 02:32:00 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-06-30 02:32:00 +0300 |
commit | 062a843bfbe7c9d277a254a45a81c5a35e8d9b2e (patch) | |
tree | d52163a89d3d48a7a42c431a2a8e455502d26222 /source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl | |
parent | f28e59bd742e9cdea5d9cacc848d1759ef59f0a8 (diff) |
EEVEE: Fix undefined behavior when using BSDF nodes inside volume shaders
This should fix T76171 Eevee bsdf shaders glitches
Diffstat (limited to 'source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl index 3c85dc6456c..80ed4e1ef69 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl @@ -442,11 +442,13 @@ void node_bsdf_principled_glass(vec4 base_color, result.transmittance = vec3(1.0 - alpha); } #else +/* clang-format off */ /* Stub principled because it is not compatible with volumetrics. */ -# define node_bsdf_principled -# define node_bsdf_principled_dielectric -# define node_bsdf_principled_metallic -# define node_bsdf_principled_clearcoat -# define node_bsdf_principled_subsurface -# define node_bsdf_principled_glass +# define node_bsdf_principled(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, result) (result = CLOSURE_DEFAULT) +# define node_bsdf_principled_dielectric(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, result) (result = CLOSURE_DEFAULT) +# define node_bsdf_principled_metallic(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, result) (result = CLOSURE_DEFAULT) +# define node_bsdf_principled_clearcoat(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, result) (result = CLOSURE_DEFAULT) +# define node_bsdf_principled_subsurface(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, result) (result = CLOSURE_DEFAULT) +# define node_bsdf_principled_glass(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, result) (result = CLOSURE_DEFAULT) +/* clang-format on */ #endif |