pub enum TextureMode {
Mask,
Color,
}Expand description
纹理矩形(文字字形 / 图片)的采样模式
TexturedRect 与 text pipeline 共用一个 shader(text.wgsl),instance 里带
mode 标志,fragment 按模式选 alpha 来源:
Mask:alpha 取纹理 R 通道(glyph atlas R8 / SVG 单色 tint coverage), 输出color.rgb,alpha =color.a × tex.r— 一份 coverage 纹理任意着色Color:纹理是直通(straight)RGBA 彩色位图(SVG 全彩 / PNG 图片), 输出tex.rgb × color.rgb,alpha =tex.a × color.a
Variants§
Trait Implementations§
Source§impl Clone for TextureMode
impl Clone for TextureMode
impl Copy for TextureMode
Source§impl Debug for TextureMode
impl Debug for TextureMode
impl Eq for TextureMode
Source§impl PartialEq for TextureMode
impl PartialEq for TextureMode
impl StructuralPartialEq for TextureMode
Auto Trait Implementations§
impl Forget for TextureMode
impl Freeze for TextureMode
impl Move for TextureMode
impl RefUnwindSafe for TextureMode
impl Send for TextureMode
impl Sync for TextureMode
impl Unpin for TextureMode
impl UnsafeUnpin for TextureMode
impl UnwindSafe for TextureMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more