Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

color_material.wgsl

Constants

COLOR_MATERIAL_FLAGS_TEXTURE_BIT

#
const COLOR_MATERIAL_FLAGS_TEXTURE_BIT: u32 = 1u

COLOR_MATERIAL_FLAGS_ALPHA_MODE_RESERVED_BITS

#
const COLOR_MATERIAL_FLAGS_ALPHA_MODE_RESERVED_BITS: u32 = 3221225472u

COLOR_MATERIAL_FLAGS_ALPHA_MODE_OPAQUE

#
const COLOR_MATERIAL_FLAGS_ALPHA_MODE_OPAQUE: u32 = 0u

COLOR_MATERIAL_FLAGS_ALPHA_MODE_MASK

#
const COLOR_MATERIAL_FLAGS_ALPHA_MODE_MASK: u32 = 1073741824u

COLOR_MATERIAL_FLAGS_ALPHA_MODE_BLEND

#
const COLOR_MATERIAL_FLAGS_ALPHA_MODE_BLEND: u32 = 2147483648u

Bindings

material

#
@group(2)
@binding(0)
var<uniform> material: ColorMaterial

texture

#
@group(2)
@binding(1)
var texture: texture_2d<f32>

texture_sampler

#
@group(2)
@binding(2)
var texture_sampler: sampler

Structures

ColorMaterial

#
struct ColorMaterial {
color: vec4<f32> ,
uv_transform: mat3x3<f32> ,
flags: u32 ,
alpha_cutoff: f32 ,
}

Functions

fragment

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment ( ) ->
@location(0)
vec4<f32>

alpha_discard

#
fn alpha_discard (
output_color: vec4<f32>
) -> vec4<f32>