Closed johanhelsing closed 2 years ago
Turns out this was because both the fragment shader and vertex shader share the same code, and if there are fwidth calls in functions (even though they are not called), the vertex shader fails to compile.
Can be fixed by just adding shader defs for the fragment pass and conditionally include the functions containing fwidth.
gfx-rs/wgpu#4368
I think this is a bug in wasm/naga.
A workaround in the meantime would be to just disable the derivative-based anti-alias fills on wasm. Perhaps it could be done with shader defines.