vange-rs icon indicating copy to clipboard operation
vange-rs copied to clipboard

Support for wasm32-unknown-unknown target (WebGL)

Open caiiiycuk opened this issue 3 years ago • 6 comments

I tried to update wgpu to 0.11.0 (in order to support WebGL in future). I fixed some initialization code and now it compiles but render black screen, can you please point me what I did wrong.

Platform: linux Renderer: vulkan

caiiiycuk avatar Nov 18 '21 11:11 caiiiycuk

Also _pad: vec2 in shader seems unused, I renamed it to apad because shader won’t compile

caiiiycuk avatar Nov 18 '21 11:11 caiiiycuk

Please rebase!

kvark avatar Nov 18 '21 22:11 kvark

Everything looks working, but seems render is not fit for webgl, have this issue:

road.js:1416 panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_bind_group_layout
      note: label = `Shape`
    binding 0 entry is invalid
    Downlevel flags VERTEX_STORAGE are required but not supported on the device.
This is not an invalid use of WebGPU: the underlying API or device does not support enough features to be a fully compliant implementation. A subset of the features can still be used. If you are running this program on native and not in a browser and wish to work around this issue, call Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current platform supports.

caiiiycuk avatar Nov 19 '21 10:11 caiiiycuk

Please file this separately, I'll address it shortly.

kvark avatar Nov 19 '21 15:11 kvark

#150

caiiiycuk avatar Nov 20 '21 04:11 caiiiycuk

Please comment what to fix, I will update README.md soon

caiiiycuk avatar Dec 09 '21 17:12 caiiiycuk