Shader: Only clamp undefined or unsupported inputs of Principled BSDF #112895

Merged
Lukas Stockner merged 39 commits from Alaska/blender:clamp-tint into blender-v4.0-release 2023-10-31 03:14:14 +01:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 079c590f4c - Show all commits

View File

@ -259,7 +259,8 @@ ccl_device
* TIR is no concern here since we're always coming from the outside. */
float cosNT = sqrtf(1.0f - sqr(1.0f / coat_ior) * (1 - sqr(cosNI)));
float optical_depth = 1.0f / cosNT;
weight *= mix(one_spectrum(), power(rgb_to_spectrum(coat_tint), optical_depth), coat_weight);
weight *= mix(
one_spectrum(), power(rgb_to_spectrum(coat_tint), optical_depth), coat_weight);
}
}