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_pbr::render::forward_io::VertexOutput;
3@group(constants::MATERIAL_BIND_GROUP) @binding(0) var depth_texture: texture_depth_2d;
4@group(constants::MATERIAL_BIND_GROUP) @binding(1) var depth_sampler: sampler_comparison;
6@fragment
7fn fragment(input: VertexOutput) -> @location(0) vec4<f32> {
8 // Just draw the depth.
9 let st = vec2<i32>(input.uv * vec2<f32>(textureDimensions(depth_texture).xy));
10 return vec4(vec3(textureLoad(depth_texture, st, 0)), 1.0);
Contents