-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix Rendering Issue in PBRTerrain #2365
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
This PR attempts to fix a rendering bug that a few jme have experienced on certain devices, as discussed in this thread: https://hub.jmonkeyengine.org/t/requesting-help-troubleshooting-pbrterrain-bug/47895 I believe the issue was due to a combination of things that were wrong with the process of reading normal maps, calculating tangents, and then blending them. The order of these operations is important, and I believe it is also important to normalize the normal value prior to blending each layer, which I previously was not doing. There's also some code that puts a normal map in the proper range, and this was being done improperly for tri-planar normal mapping. Once this PR is done I'll post back to that thread and request testing from the users who were experiencing the bug on their device.
…been coupled in the tangent calculation
I plan to merge this in the next 24 - 48 hours |
@yaRnMcDonuts: perhaps it's time to delete the branch |
I deleted the branch, and also went back through and deleted the branches in a couple other PRs where I forgot to do so. I also realized I've been forgetting to flag some PRs to the 3.8.0 milestone recently, but I'll make sure I am remembering to do this going forward. Thanks for flagging the PRs I've missed in the meantime! |
@yaRnMcDonuts: You're welcome. I think it's particularly important to make the milestones accurate before creating a release branch, since that's when the meaning of "future release" suddenly changes! |
…rendering issue This PR attempts to fix the issue that my previous PR unfortunately failed to fix: #2365 I have made some more minor changes to the shader code that might fix it. But I'm also going to update the PBRTerrain tests so users can easily toggle the DebugValuesMode debug view of each individual pbr layer so that issues like this are easier to troubleshoot in the future.
This PR attempts to fix a rendering bug that a few jme users have experienced on certain devices, as discussed in this thread: https://hub.jmonkeyengine.org/t/requesting-help-troubleshooting-pbrterrain-bug/47895
I believe the issue was due to a combination of things that were done incorrectly in the process of reading normal maps, calculating tangents, and then blending the normal values.
I believe it is also important to normalize the normal value prior to blending each layer, which I previously was not doing.
There's also some code that is necissary for putting a normal map in the proper range, and this was being done improperly for tri-planar normal mapping. It should be done 3 times (once per read) and then normalized, and this was incorrect previously.
Once this PR is done I'll post back to that thread and request testing from the users who were experiencing the bug on their device.