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 stencil buffer does not exist #912

Merged
merged 1 commit into from
Mar 20, 2025
Merged

Fix stencil buffer does not exist #912

merged 1 commit into from
Mar 20, 2025

Conversation

Quarri6343
Copy link
Member

This PR fixes FBO is provided without stencil buffer when Angelica is loaded and StencilBits parameter is enabled on Forge

MixinFlameBuffer mixins frame buffer class, creates its own FBO with its own depth buffer.
However, it does not consider stencil buffer is also created in the targeted function if the configuration is enabled, so the Minecraft standard FBO will always be delivered without the stencil buffer.
(Gl11.glGetInteger(GL_STENCIL_BITS) is always zero)
I found some mods uses stencil buffer to scissor the edge of scroll bars on vanilla FBO, so I think this should be fixed

Bugged scroll bar from ModularUI:

8mb.video-U2Q-9xeVhgWG.mp4

@Quarri6343 Quarri6343 requested a review from mitchej123 March 20, 2025 13:36
@mitchej123 mitchej123 merged commit 0350ea2 into master Mar 20, 2025
1 check passed
@mitchej123 mitchej123 deleted the fix-stencil branch March 20, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants