Skip to content

Is it possible to set viewformat on a texture configuration? #14

@mreinstein

Description

@mreinstein

On Linux/Vulkan, the getPreferredFormat() returns bgra8unorm-srgb. On other platforms it returns the non -srgb equivalent format.

I want to avoid srgb because I have a bloom/HDR pipeline that specifies gamma correction manually, and the srgb format applies gamma correction automatically on the gpu. I'm essentially getting double gamma correction only on linux.

The webgpu spec defines (https://www.w3.org/TR/webgpu/#texture-view-format-compatible) bgra8unorm and bgra8unorm-srgb as view-format-compatible, and browsers allow this when the canvas is configured with viewFormats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions