Skip to content

Infer encodeLinear from the current render target#360

Open
mrxz wants to merge 2 commits into
sparkjsdev:mainfrom
mrxz:encode-linear
Open

Infer encodeLinear from the current render target#360
mrxz wants to merge 2 commits into
sparkjsdev:mainfrom
mrxz:encode-linear

Conversation

@mrxz
Copy link
Copy Markdown
Collaborator

@mrxz mrxz commented Jun 2, 2026

The encodeLinear property is used to toggle between outputting linear-sRGB and sRGB values. When rendering to the default framebuffer (or the WebXR framebuffer) it should be false, in all other cases (e.g. render to texture) it should be true. Instead of making this a configurable property, it can be automatically inferred from the currently bound render target.

This PR checks the currently bound render target to see if encodeLinear is needed or not.

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.

1 participant