-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Stencil buffer fix #2325
Stencil buffer fix #2325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look fine to me. I'd just suggest that some spacing be added. I'm a bit surprised that RenderState didn't already copy those parameters.
Would you mind explaining what the bug turned out being exactly?
frontStencilMask=state.frontStencilMask; | ||
frontStencilReference=state.frontStencilReference; | ||
backStencilMask=state.backStencilMask; | ||
backStencilReference=state.backStencilReference; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spacing around '='.
state.frontStencilMask=frontStencilMask; | ||
state.frontStencilReference=frontStencilMask; | ||
state.backStencilMask=backStencilMask; | ||
state.backStencilReference=backStencilMask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spacing around '='.
state.frontStencilMask=additionalState.frontStencilMask; | ||
state.frontStencilReference=additionalState.frontStencilMask; | ||
state.backStencilMask=additionalState.backStencilMask; | ||
state.backStencilReference=additionalState.backStencilMask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spacing around '='.
Thanks for point out the spacing error. Since i added those values back in 2022, and the fix was already present in my local fork, it seems i forgot to commit them back then. As far i remember the original usecase used only Increment and NotEqual to 0 so it slipped trough the testing. |
This fixes the use of the stencil buffers.
As reference:
https://hub.jmonkeyengine.org/t/how-to-do-outline-with-stencil-buffer/47954/5
Also added the TestStencilOutline.java to the examples.
Note: Somehow the TestChooser app is overwriting the appsettings in the main method.
As a fix i added a postprocessor to the example application. This is not required when running
the test directly.