Skip to content

OpenGL: Consolidate depth–stencil buffers (Strategy 2)#7360

Merged
wookieejedi merged 4 commits intoscp-fs2open:masterfrom
LuytenFS:consolidate-depth-stencil-buffers
Apr 15, 2026
Merged

OpenGL: Consolidate depth–stencil buffers (Strategy 2)#7360
wookieejedi merged 4 commits intoscp-fs2open:masterfrom
LuytenFS:consolidate-depth-stencil-buffers

Conversation

@LuytenFS
Copy link
Copy Markdown
Contributor

@LuytenFS LuytenFS commented Apr 7, 2026

This tackles #7325 and partially implements Strategy 2, the build succeeds and in‑game behavior appears normal. The main goal of this PR is to get feedback on whether this approach is on the right track for Strategy 2 before extending the changes to other depth/stencil buffers. This is not complete however.

@wookieejedi wookieejedi added cleanup A modification or rewrite of code to make it more understandable or easier to maintain. graphics A feature or issue related to graphics (2d and 3d) labels Apr 7, 2026
Copy link
Copy Markdown
Member

@BMagnu BMagnu left a comment

Choose a reason for hiding this comment

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

Yeah, this looks reasonably good.
Ran tests in cases that are known to read from stencils, as well as depth (such as volumetric nebulae). Seems all fine, and the renderdoc looks good too.
This works to remove the two unnecessary textures as the first step to closing the issue. Further thought on when to use depth vs position.z can and should be done in a different PR as to not muddle this cleanup.

@LuytenFS
Copy link
Copy Markdown
Contributor Author

Ah! Good to know. So going further would mean having to do it in a different PR you say? So this remains as is am guessing?

@BMagnu
Copy link
Copy Markdown
Member

BMagnu commented Apr 15, 2026

Yup.
This is an easy way to compartmentalize these changes, so it makes it tidy ^^

@wookieejedi wookieejedi merged commit e9c86b1 into scp-fs2open:master Apr 15, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup A modification or rewrite of code to make it more understandable or easier to maintain. graphics A feature or issue related to graphics (2d and 3d)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants