I'm starting to work with shaders and wanted to upgrade bevy_atmosphere for private purpose for my project and ran into this issue
error: failed to build a valid final module: Entry point fragment at Fragment is invalid
┌─ C:\Users\Elias\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_pbr-0.11.0\src\render\mesh_vertex_output.wgsl:3:1
│
3 │ ╭ struct MeshVertexOutput {
4 │ │ // this is `clip position` when the struct is used as a vertex stage output
5 │ │ // and `frag coord` when used as a fragment stage input
6 │ │ @builtin(position) position: vec4<f32>,
7 │ │ @location(0) world_position: vec4<f32>,
8 │ │ @location(1) world_normal: vec3<f32>,
│ ╰────────────────────────────────────────^ naga::Type [3]
│
= Argument 1 varying error
= Built-in Position { invariant: false } is present more than once
@group(1) @binding(0)
var sky_texture: texture_cube<f32>;
@group(1) @binding(1)
var sky_sampler: sampler;
#import bevy_pbr::mesh_vertex_output MeshVertexOutput
@fragment
fn fragment(
@builtin(position) position: vec4<f32>,
mesh: MeshVertexOutput
) -> @location(0) vec4<f32> {
let color = textureSample(sky_texture, sky_sampler, mesh.world_normal).xyz;
#ifdef DITHER
return vec4<f32>(color + dither(position.xy), 1f);
#else
return vec4<f32>(color, 1f);
#endif
}