-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Fix normal map rendering issue on Adreno GPUs #15850 #17158
Conversation
Thanks! |
@JordyvanDortmont Please notice that this change was reverted via #17958. |
@Mugen87 Thanks for notifying me. We'll fork and patch the shader. |
It should be no problem to replace the shader chunk with Material.onBeforeCompile() if necessary. Also notice the discussion from here #17804 (comment). Using |
Yes, I intended to patch it this way as well, instead of forking.
So just to be sure, if For both cases we can check if there's an Adreno GPU and apply a fix. |
Yes. However, |
@WestLangley What do you think about generating an index in |
@Mugen87 If it doesn't require and index to produce reasonable results -- and I do not think it does -- then I'd just operate on the triangle soup directly. I'll file a PR and add |
In case anyone lands here, the Adreno bug is only when |
This fixes #15850 by checking if the material is double sided, if so we use an alternative for computing the possible normal inversion with
gl_FrontFacing
.The same issue was identified in #10331 and @bhouston also commented the fix I implemented on the blog post that was already being referenced in the shader code.