We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dd57014 + 1b20671 commit 6b2d401Copy full SHA for 6b2d401
1 file changed
src/fragment.wgsl
@@ -3,8 +3,10 @@
3
struct FragmentOutput {
4
@location(0) colour: vec4<f32>,
5
#ifdef FLAT_DEPTH
6
+#ifndef FLOOD_INIT
7
@builtin(frag_depth) frag_depth: f32,
8
#endif
9
+#endif
10
};
11
12
#ifdef ALPHA_MASK_TEXTURE
@@ -24,13 +26,15 @@ fn fragment(vertex: VertexOutput) -> FragmentOutput {
24
26
25
27
28
29
30
out.frag_depth = vertex.flat_depth;
31
32
33
#ifdef VOLUME
34
out.colour = vertex.volume_colour;
35
36
#ifdef FLOOD_INIT
- out.colour = vec4<f32>(vertex.position.xy, out.frag_depth, 0.0);
37
+ out.colour = vec4<f32>(vertex.position.xy, vertex.flat_depth, 0.0);
38
39
return out;
40
}
0 commit comments