-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
in progressIssue is in progressIssue is in progress
Description
Default component mapping is fine in most cases, but, for example, when a texture format is actually single channel, and shader always treats textures as Texture2D<float4>, the sampled value is float4(r, 0, 0, 0) instead of float4(r, r, r, r), it would be convenient if add component mapping in TextureView or just create SRV in backends like this:
mapping = DEFAULT_SHADER_COMPONENT_MAPPING;
if (GetNumComponents(format) == 1) {
mapping = ENCODE_SHADER_COMPONENT_MAPPING(R, R, R, R);
}
Metadata
Metadata
Assignees
Labels
in progressIssue is in progressIssue is in progress