Skip to content

Conversation

@slipher
Copy link
Member

@slipher slipher commented Jan 2, 2026

When the read-only depth buffer is used (if r_readonlyDepthBuffer is 2, or if it's 1 but the driver lacks certain extensions), the screenshots were done from the 3d rendering buffer instead of the final framebuffer. This caused screenshots to lack tonemapping, color grading and 2D rendering. Fix it by resetting GL_READ_FRAMEBUFFER to the default value after it is used.

When the read-only depth buffer is used (if r_readonlyDepthBuffer is 2,
or if it's 1 but the driver lacks certain extensions), the screenshots
were done from the 3d rendering buffer instead of the final framebuffer.
This caused screenshots to lack tonemapping, color grading and 2D
rendering. Fix it by resetting GL_READ_FRAMEBUFFER to the default value
after it is used.
@slipher slipher mentioned this pull request Jan 2, 2026
Copy link
Contributor

@VReaperV VReaperV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have any affected hardware, but code LGTM.

@slipher
Copy link
Member Author

slipher commented Jan 2, 2026

The code path can be tested on any hardware by setting r_readonlyDepthBuffer 2.

@VReaperV
Copy link
Contributor

VReaperV commented Jan 2, 2026

The code path can be tested on any hardware by setting r_readonlyDepthBuffer 2.

I see. This fixes the issue on my end.

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.

2 participants