-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix for clearcoat blending #1775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Update to latest Khronos master
@romainguy @sebavan @proog128 I've been following the email discussion. Are you guys OK with this PR? |
I'm trying to get an A/B screenshot of the difference. I'm doing something wrong though because all of my clearcoat is washed out & overexposed now... |
So in my implementation, Also it looks like the sample clearcoat shader in Substance Painter matches what's in master here, not this current change. Still investigating... |
We used a squared Fresnel attenuation for a while in Filament as an attempt to account for loss of energy when entering and exiting the clear coat layer. I believe Unity HDRP does this still. May Substance does the same? |
It's not square though. There's no Fresnel term on the IBL being reflected in There is a Fresnel term on a punctual light reflected in clearcoat, but that's For me, this PR makes IBL on the coat come in at full strength, with no Fresnel effect at all. |
Is the formula not implying it should be done for both analytical and ibl the same ? In Babylon we actually use the exact same in IBL :
|
but as a small diff, we do not apply it to emissive that we consider taking over everything else |
I found the difference! My own code was following the Substance Painter example, which uses a clearcoat specular color of |
I think I'm good with this PR. Let's leave it open until @proog128 and others have had a day to process and comment. |
Just to make sure:
This will produce some energy (because the base layer Fresnel is computed with VdotH), but the general structure is OK (matches this comment). Alternatives:
|
Yes. I wonder if the PR needs to capture some of this discussion, particularly that |
This has enough approvals though, so I'll merge it and make some additional tweaks in a new PR. |
Small follow-up in #1776. |
No description provided.