Skip to content

Fix texture format for uncompressed RenderStream formats#31

Merged
mark-beiline merged 2 commits into
devfrom
mark/fix-uncompress-v2
May 2, 2023
Merged

Fix texture format for uncompressed RenderStream formats#31
mark-beiline merged 2 commits into
devfrom
mark/fix-uncompress-v2

Conversation

@mark-beiline
Copy link
Copy Markdown
Collaborator

@mark-beiline mark-beiline commented May 1, 2023

Fixed RSPixelFormat.RS_FMT_RGBA32F => GraphicsFormat.R32G32B32A32_SFloat

Overall things are much simpler now, with only 1 conversion function in managed code, and 1 conversion function in native code.

Decided not to support fallback formats (using SystemInfo.GetCompatibleFormat) due to missing GraphicsFormat -> DXGI_FORMAT conversion function in Unity managed or native API.

A DXGI_FORMAT is used in the DX12 plugin to create a texture manually with the "shared" flag.

Output textures

When an SRGB variant exists, the output texture will have an SRGB format.

The data sampled from our output textures will always be SRGB, regardless of the format.

Input textures

Always linear, never use SRGB variants.

@mark-beiline mark-beiline merged commit 727a11b into dev May 2, 2023
@mark-beiline mark-beiline deleted the mark/fix-uncompress-v2 branch May 2, 2023 18:20
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