Skip to content

Commit

Permalink
Fix missing fragment entry point in default prepass shader
Browse files Browse the repository at this point in the history
  • Loading branch information
geieredgar committed Mar 2, 2023
1 parent a05160b commit 50cb4b2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/bevy_pbr/src/prepass/prepass.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ fn vertex(vertex: Vertex) -> VertexOutput {
}

#ifdef NORMAL_PREPASS

struct FragmentInput {
@location(1) world_normal: vec3<f32>,
}
Expand All @@ -81,4 +82,10 @@ struct FragmentInput {
fn fragment(in: FragmentInput) -> @location(0) vec4<f32> {
return vec4(in.world_normal * 0.5 + vec3(0.5), 1.0);
}

#else // NORMAL_PREPASS

@fragment
fn fragment(in: VertexOutput) {}

#endif // NORMAL_PREPASS

0 comments on commit 50cb4b2

Please sign in to comment.