MaterialX
MaterialX copied to clipboard
glTF PBR Clearcoat interaction with Emission
closes #2592
This PR will darken the emission color by a weighted clearcoat fresnel factor from KHR_materials_clearcoat
coated_emission = emission * (1 - clearcoat * clearcoat_fresnel)
Screenshots of a red emissive material with a clearcoat.
|
|
||
|---|---|---|
| Before PR: No clearcoat fresnel interaction | After PR: Emission darken by clearcoat_fresnel | Reference rendered using gltf_sample_viewer |
Material
<gltf_pbr name="gltf_pbr_surfaceshader" type="surfaceshader">
<input name="metallic" type="float" value="0" />
<input name="emissive" type="color3" value="1, 0, 0" />
<input name="base_color" type="color3" value="0, 0, 0" />
<input name="clearcoat" type="float" value="1" />
<input name="clearcoat_roughness" type="float" value="0" />
</gltf_pbr>
Discussion:
I ended up implementing Schlick Fresnel returning floats using nodes. I was planning to use the generalized_schlick node, however they returned distribution functions, is there an option to use the included schlick nodes or is how I have dont it in the PR a good way?