Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2021-04-08 18:43:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-04-08 18:45:16 +0300
commit08ae545de433272827d6b244020efe677cf3670e (patch)
treef26dd76a678e37efbfe5d42cac4f0ea53360243b /source/blender/gpu/shaders/material
parent2e3b0e8a99eead1b3e8f731e7a7eb67761ec566a (diff)
Fix T87107 EEVEE: Principled BSDF doesn't handle negative specular
Negative speculars are evil.
Diffstat (limited to 'source/blender/gpu/shaders/material')
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl1
1 files changed, 1 insertions, 0 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 2e0515e324e..d77259638fd 100644
--- a/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl
+++ b/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl
@@ -55,6 +55,7 @@ void node_bsdf_principled(vec4 base_color,
float specular_weight = (1.0 - transmission);
clearcoat = max(clearcoat, 0.0);
transmission_roughness = 1.0 - (1.0 - roughness) * (1.0 - transmission_roughness);
+ specular = max(0.0, specular);
CLOSURE_VARS_DECLARE_4(Diffuse, Glossy, Glossy, Refraction);