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.
1import bevy_sprite_render::mesh2d::vertex_output::VertexOutput;
2// we can import items from shader modules in the assets folder with a relative path
3import super::custom_material_import::COLOR_MULTIPLIER;
5@group(constants::MATERIAL_BIND_GROUP) @binding(0) var<uniform> material_color: vec4<f32>;
6@group(constants::MATERIAL_BIND_GROUP) @binding(1) var base_color_texture: texture_2d<f32>;
7@group(constants::MATERIAL_BIND_GROUP) @binding(2) var base_color_sampler: sampler;
9@fragment
10fn fragment(mesh: VertexOutput) -> @location(0) vec4<f32> {
11 return material_color * textureSample(base_color_texture, base_color_sampler, mesh.uv) * COLOR_MULTIPLIER;
Contents