MeshPhysicalMaterial: Added clearcoat support for rect area lights.#32809
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
Can you also provide a fiddle that allows use to verify the change? Like a simple scene with a clear coat material and a rect area light? |
Sure, but is there any documentation how I can make the fiddle use the build attached to this PR? |
|
It's sufficient to show how it's not working with the current release. I can then test this change locally. |
…rF90 rather than always 1
e68f0bc to
d6f6a00
Compare
|
I have added a fiddle here: https://jsfiddle.net/TobiasNoell/jprxayeb/47/ |
|
Small advice: In general, when you file a PR that updates a material's shader, it's good to share before/after screenshots in the initial comment so the community immediately sees what the PR is about. |
|
I have also generalized the LTC formula to cope with materials that have a specularF90 that is not one |
When I understand the code correctly, the F90 value was previously hard coded to |
The rational behind this is that in the LTC approximation (https://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf) the Schlick approximation was used but with a hardcoded setting of F90 = 1, The more general term with F90 would be which would yield to this update |
|
Nice! @TobiasNoell I was working on this before the holidays: #32496 Need to find some time to get back to it. |


Description
directRectAreamethod inPhysicalLightingModeldid not consider a materials' clearcoat settings. Thus, a material appeared without clearcoat if being illuminated by rect area light sources.