Skip to main content

alpha_address

Function alpha_address 

Source
pub const fn alpha_address(alpha_idx: u32, width: u32) -> AlphaAddress
Expand description

The address of alpha value alpha_idx in an alpha texture width texels wide.

Alpha values are laid out linearly: 16 per texel, texels left to right then top to bottom, so a value’s byte offset equals its index and a texel-boundary or row-boundary crossing needs no padding.