sprite_material.wgsl
Constants
Bindings
@group(#{MATERIAL_BIND_GROUP})
@binding(1)
var
texture:
texture_2d<f32>
Structures
struct
Vertex
{
}
struct
SpriteMaterial
{
}
Functions
@vertex
Processes each 3D point in a model before it's drawn
@fragment
Calculates the final color of each pixel on the screen
Takes a point p from an interval [a, b] and maps it to a portion of the tile [c, d]
Takes a point p from an interval [a, b] and translates it to the interval [c, d]
Maps a point p from [a, b] to [c, d], tiling it if stretch_value is not 0.