这是indexloc提供的服务,不要输入任何密码
Skip to content

Sampling from MSAA textures #990

@kvark

Description

@kvark

I realized that the MSAA textures are in a weird position: they are "sampled texture" binding types on both the API and shaders sides today, but they can't really be sampled. In GLSL, they can also be "texel fetched", which corresponds to a texture_load in WGSL today, which the grammar only allows to happen on storage textures (with a TODO related to sampled and multi-sampled textures).

Proposal

Here is a way we could resolve this:

  1. have a separate "multisampled-texture" binding type, Edit: and remove the "multisampled" flag
  2. have a separate corresponding set of types on WGSL. That would mean texture_sample is no longer applicable to it, which is what we need.
  3. have texture_load functions overloaded to work on multisampled textures. They need an extra "sample ID" integer parameter for these overloads. They would also need to be overloaded for regular sampled textures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwgslWebGPU Shading Language Issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions