Skip to content
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 render states merging when additionalState is not set #2208

Merged
merged 1 commit into from
Mar 2, 2024

Conversation

riccardobl
Copy link
Member

@riccardobl riccardobl commented Mar 1, 2024

While testing some pbr code, i've noticed that something was off with lighting, after some convoluted debugging i've found that pr 5975b3f introduced a bug.

The tl;dr is that copyMergedTo changes the passed state when additionalState is set, but returns this when it isn't, causing mergedRenderState to not be updated at all.

This PR restores the original behavior of passing the returned state to applyRenderState instead of mergedRenderState.

@riccardobl riccardobl added the bug Something that is supposed to work, but doesn't. More severe than a "defect". label Mar 1, 2024
@stephengold
Copy link
Member

Note: it seems this issue was introduced by PR #2091.

@scenemax3d scenemax3d added this to the v3.7.0 milestone Mar 2, 2024
@scenemax3d scenemax3d merged commit c51ddf4 into jMonkeyEngine:master Mar 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect".
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants