Data Fields | |
| WGPUComponentSwizzle | r |
| WGPUComponentSwizzle | g |
| WGPUComponentSwizzle | b |
| WGPUComponentSwizzle | a |
When accessed by a shader, the red/green/blue/alpha channels are replaced by the value corresponding to the component specified in r, g, b, and a, respectively unlike the JS API which uses a string of length four, with each character mapping to the texture view's red/green/blue/alpha channels.
Default values can be set using WGPU_TEXTURE_COMPONENT_SWIZZLE_INIT as initializer.
| WGPUComponentSwizzle WGPUTextureComponentSwizzle::r |
The value that replaces the red channel in the shader.
If set to WGPUComponentSwizzle_Undefined, defaults to WGPUComponentSwizzle_R.
The INIT macro sets this to WGPUComponentSwizzle_Undefined.
| WGPUComponentSwizzle WGPUTextureComponentSwizzle::g |
The value that replaces the green channel in the shader.
If set to WGPUComponentSwizzle_Undefined, defaults to WGPUComponentSwizzle_G.
The INIT macro sets this to WGPUComponentSwizzle_Undefined.
| WGPUComponentSwizzle WGPUTextureComponentSwizzle::b |
The value that replaces the blue channel in the shader.
If set to WGPUComponentSwizzle_Undefined, defaults to WGPUComponentSwizzle_B.
The INIT macro sets this to WGPUComponentSwizzle_Undefined.
| WGPUComponentSwizzle WGPUTextureComponentSwizzle::a |
The value that replaces the alpha channel in the shader.
If set to WGPUComponentSwizzle_Undefined, defaults to WGPUComponentSwizzle_A.
The INIT macro sets this to WGPUComponentSwizzle_Undefined.