API

Enumeration TextureChannel

Specifies which channel of a texture to read for an operation. When a single channel is selected its scalar value is broadcast to RGB; alpha is either preserved from the original sample or replicated when A is chosen.

ValueSwizzle
RGBA(r, g, b, a) — no swizzle (default)
R(r, r, r, a)
G(g, g, g, a)
B(b, b, b, a)
A(a, a, a, a)
Index
A: 4

Broadcast the alpha channel to all four components: AAAA.

B: 3

Broadcast the blue channel to RGB; preserve alpha: BBBA.

G: 2

Broadcast the green channel to RGB; preserve alpha: GGGA.

R: 1

Broadcast the red channel to RGB; preserve alpha: RRRA.

RGBA: 0

Use all four channels as sampled (default).