Skip to content

Question: Can we create a linear-space views of SRGB textures or SRGB views of linear-space textures? #3030

@yanchith

Description

@yanchith

I have a pipeline that is SRGB aware, but after a certain point I'd like to treat it as Rgba8Unorm, because I composite UI on top, and there's colors there that users set in code, so their eye does the correction already.

Tried to achieve this with a texture that is Rgba8Unorm, but creating an Rgba8UnormSrgb write view and a Rgba8Unorm read view. Unfortunately, the validator doesn't like it much:

thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Texture::create_view
    Unable to view texture Rgba8Unorm as Rgba8UnormSrgb

Is there a reason this shouldn't be working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: validationIssues related to validation, diagnostics, and error handlingtype: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions