-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
"Force Blinn over GGX" option not useful anymore #22637
Comments
@reduz Similar optimization (from Filament docs) for the anisotropic case was also adapted in that same PR so it's now too slow now. Maybe anisotropy can be enabled in GLES2 now (assuming there aren't any other limitations)? |
Actually, Burley+GGX can probably be made faster than Blinn+Lambert, such that "Force Lambert over Burley" option can also be removed. The expensive part of Burley is the calculation of H (and cLdotH), which involves division for normalization, but these are actually already calculated in both GGX and Blinn. If we simply reuse those values (which are calculated in the same function block), the cost of Burley becomes 14 multiplications, 3 additions, 2 subtractions whereas Lambert is 1 division, 1 multiplication, 3 additions, 1 max() call. Given how slow division tends to be, forcing Lambert over Burley probably won't be worth it. |
I went ahead and refactored the calculation of H, L.H and N.H #22639 to avoid double calculations |
This has been completed correct? |
Yes |
Solved by #22639. |
Ah, no, it's not solved. What I mean is everything required for obsoleting forced Blinn+Lambert is done. This issue is about actually making them obsolete (or removing them altogether) which hasn't been done |
The optimized GGX merged in #22483 is faster than Blinn (which uses exp2 and pow), so this option should be removed, or at least should be disabled by default in GLES2.
An alternative and useful option would be to force low-quality approximation for GGX over the usual one.
The text was updated successfully, but these errors were encountered: