diff --git a/src/shaders/hatch.wgsl b/src/shaders/hatch.wgsl index bec6b0765..6bee8df29 100644 --- a/src/shaders/hatch.wgsl +++ b/src/shaders/hatch.wgsl @@ -242,4 +242,8 @@ fn check_family( } } discard; + // Unreachable: `discard` kills the fragment before this runs, but + // DX12/FXC reports E_FAIL X3507 ("not all control paths return a + // value") without an explicit return after every terminal discard. + return vec4(0.0); } diff --git a/src/shaders/hatch_batched.wgsl b/src/shaders/hatch_batched.wgsl index 00ecc3b5c..f7933ab54 100644 --- a/src/shaders/hatch_batched.wgsl +++ b/src/shaders/hatch_batched.wgsl @@ -253,4 +253,8 @@ fn check_family( } } discard; + // Unreachable: `discard` kills the fragment before this runs, but + // DX12/FXC reports E_FAIL X3507 ("not all control paths return a + // value") without an explicit return after every terminal discard. + return vec4(0.0); }