Skip to content

gamma#336

Merged
GooberRF merged 4 commits intoGooberRF:masterfrom
nickalreadyinuse:dx11gamma
Apr 7, 2026
Merged

gamma#336
GooberRF merged 4 commits intoGooberRF:masterfrom
nickalreadyinuse:dx11gamma

Conversation

@nickalreadyinuse
Copy link
Copy Markdown
Contributor

gamma

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 GammaPass and integrate it into Renderer::flip() using a new intermediate scene_texture_.
  • Extend shader management to support loading a vertex shader without an input layout (for SV_VertexID fullscreen 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@GooberRF GooberRF merged commit f8e7b89 into GooberRF:master Apr 7, 2026
6 checks passed
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.

3 participants