Transmission color doesn't affect the render result #11

Merged
Bogdan Nagirniak merged 1 commits from Vasyl-Pidhirskyi/blender-addons:BLEN-387 into materialx-addon 2023-05-16 20:16:22 +02:00
Showing only changes of commit 6013f95011 - Show all commits

View File

@ -9,10 +9,6 @@ from ..utils import get_mx_node_input_types
from . import log
SSS_MIN_RADIUS = 0.0001
DEFAULT_WHITE_COLOR = (1.0, 1.0, 1.0)
def enabled(val):
if val is None:
return False
@ -108,7 +104,7 @@ class ShaderNodeBsdfPrincipled(NodeParser):
if enabled(specular):
result.set_inputs({
'specular': specular,
'specular_color': DEFAULT_WHITE_COLOR,
'specular_color': base_color,
'specular_roughness': roughness,
'specular_IOR': ior,
'specular_anisotropy': anisotropic,
@ -118,7 +114,7 @@ class ShaderNodeBsdfPrincipled(NodeParser):
if enabled(transmission):
result.set_inputs({
'transmission': transmission,
'transmission_color': DEFAULT_WHITE_COLOR,
'transmission_color': base_color,
'transmission_extra_roughness': transmission_roughness,
})
@ -133,14 +129,14 @@ class ShaderNodeBsdfPrincipled(NodeParser):
if enabled(sheen):
result.set_inputs({
'sheen': sheen,
'sheen_color': DEFAULT_WHITE_COLOR,
'sheen_color': base_color,
'sheen_roughness': roughness,
})
if enabled(clearcoat):
result.set_inputs({
'coat': clearcoat,
'coat_color': DEFAULT_WHITE_COLOR,
'coat_color': base_color,
'coat_roughness': clearcoat_roughness,
'coat_IOR': ior,
'coat_anisotropy': anisotropic,