wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

Make Water Visible in Water Example on WebGL

Open zicklag opened this issue 3 years ago • 1 comments

Uses a separate entrypoint for the water fragment shader on WebGL to avoid the unsupported depth calculation.

Connections Addresses #2032

Description Uses an alternate fragment shader entrypoint on for the water example on WebGL. Looks slightly worse, but actually renders the water.

This should mean we could put this example on the website with the others.

Testing Tested in my browser: Brave Browser 97.1.34.80 unknown ( a Chrome derivative )

image

Tested on Ubuntu 20.04 Vulkan that the example still works normally after the change.


BTW, love the new cargo run-wasm utility, and the cleaner @binding syntax for WGSL. :)

zicklag avatar Jun 04 '22 21:06 zicklag

I'm not sure if there is a way to check for depth stencil support on OpenGL, but I also had to add the downlevel flag in the GL backend, and I just set the flag if the target wasn't wasm.

Let me know if there's a way I should detect RODS for OpenGL.

zicklag avatar Jun 05 '22 21:06 zicklag

Poke from triage: what's the status of this PR? Does the problem still exist?

cwfitzgerald avatar Oct 08 '22 05:10 cwfitzgerald

I haven't tested recently, but as far as I know the problem still exists, but I ran out of time to work on it and fix the remaining concerns.

zicklag avatar Oct 08 '22 13:10 zicklag

As this MR is currently stale, I'm going to close it for triage purposes. Please feel-free to re-open there is renewed interest in landing these changes!

cwfitzgerald avatar Sep 14 '23 20:09 cwfitzgerald