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

Render targets can use sRGB color buffer #6752

Merged
merged 12 commits into from
Jul 2, 2024
Merged

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Jun 26, 2024

partially implements #3715

  • when a color buffer with sRGB format (for example SRGBA8) is used by RenderTarget to render to, the generated shaders skip in-shader linear to gamma conversion, as hardware does it.
  • this is not implemented for the main backbuffer yet. Some explanation for this is here: Issues and possible improvements to transparency rendering #5943 but a separate PR will try to address it for WebGPU.
  • shaders of few examples are updated to work correctly in linear space, as sampling from render targets in those examples are linear values

Co-authored-by: Will Eastcott <will@playcanvas.com>
@mvaligursky mvaligursky requested review from willeastcott and a team July 1, 2024 15:38
Base automatically changed from mv-compressed-srgb to main July 1, 2024 15:46
@mvaligursky mvaligursky merged commit 68f5330 into main Jul 2, 2024
8 checks passed
@mvaligursky mvaligursky deleted the mv-srgb-render-target branch July 2, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants