Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.

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

color_material_indices

#
@group(constants::MATERIAL_BIND_GROUP)
@binding(0)
var<storage> color_material_indices: array<ColorMaterialBindings>

color_materials

#
@group(constants::MATERIAL_BIND_GROUP)
@binding(10)
var<storage> color_materials: array<ColorMaterial>

material

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

texture

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

texture_sampler

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

Structures

ColorMaterial

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

ColorMaterialBindings

#

The index table for bindless operation.

struct ColorMaterialBindings {
material: u32 ,
color_texture: u32 ,
color_sampler: u32 ,
}

Functions

fragment

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

alpha_discard

#
fn alpha_discard (
flags: u32
, 
alpha_cutoff: f32
, 
output_color: vec4<f32>
) -> vec4<f32>
Contents