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@if(CUBEMAP_ARRAY)
4@group(constants::MATERIAL_BIND_GROUP) @binding(0) var base_color_texture: texture_cube_array<f32>;
5@else
6@group(constants::MATERIAL_BIND_GROUP) @binding(0) var base_color_texture: texture_cube<f32>;
8@group(constants::MATERIAL_BIND_GROUP) @binding(1) var base_color_sampler: sampler;
10@fragment
11fn fragment(
12 mesh: VertexOutput,
13) -> @location(0) vec4<f32> {
14 let fragment_position_view_lh = mesh.world_position.xyz * vec3<f32>(1.0, 1.0, -1.0);
15 return textureSample(
16 base_color_texture,
17 base_color_sampler,
18 fragment_position_view_lh
19 );
Contents