engine
engine copied to clipboard
Render targets can use sRGB color buffer
partially implements https://github.com/playcanvas/engine/issues/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: https://github.com/playcanvas/engine/issues/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