Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a shader-based gamma correction post-process to the D3D11 renderer by rendering the scene into an intermediate texture and then drawing a fullscreen pass to the swap-chain back buffer with gamma applied.
Changes:
- Add new fullscreen VS/PS shaders (
gamma_vs,gamma_ps) and include them in shader build + packfile. - Introduce a D3D11
GammaPassand integrate it intoRenderer::flip()using a new intermediatescene_texture_. - Extend shader management to support loading a vertex shader without an input layout (for
SV_VertexIDfullscreen draws).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/shaders/gamma_vs.hlsl | New fullscreen-triangle vertex shader for gamma pass. |
| resources/shaders/gamma_ps.hlsl | New pixel shader applying gamma correction to sampled scene color. |
| resources/shaders/CMakeLists.txt | Builds the new gamma VS/PS shader binaries. |
| resources/CMakeLists.txt | Packages gamma shader binaries into the resources packfile. |
| game_patch/graphics/d3d11/gr_d3d11.h | Adds scene texture + backbuffer RTV members and GammaPass integration points. |
| game_patch/graphics/d3d11/gr_d3d11.cpp | Renders scene to an intermediate texture and runs gamma pass before Present. |
| game_patch/graphics/d3d11/gr_d3d11_shader.h | Adds gamma shader IDs and a “vertex shader only” loader API. |
| game_patch/graphics/d3d11/gr_d3d11_shader.cpp | Implements load_vertex_shader_only() for no-input-layout shaders. |
| game_patch/graphics/d3d11/gr_d3d11_gamma.h | Declares the GammaPass post-process class. |
| game_patch/graphics/d3d11/gr_d3d11_gamma.cpp | Implements gamma post-process rendering (fullscreen draw). |
| game_patch/CMakeLists.txt | Adds gamma pass source files to the build. |
| docs/CHANGELOG.md | Notes the new D3D11 gamma control feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gamma