linebender / bevy_vello

An integration to render with Vello in Bevy game engine.
https://linebender.org/bevy_vello/
Apache License 2.0
117 stars 12 forks source link

Remove bevy asset meta data check #17

Closed Pengiie closed 8 months ago

Pengiie commented 8 months ago

Due to this error/related issue on wasm builds with the new bevy assetv2 pipeline, the recommended solution was to disable asset meta data checks.

simbleau commented 8 months ago

This is definitely a step closer, since thankfully it compiles! However I'm not seeing the squid, weirdly enough.

image

There's also some validation warnings I'm seeing, almost certainly the case for why we don't see the squid:

127.0.0.1/:1 Tint WGSL reader failure: :780:40 error: value -1 cannot be represented as 'u32'
                    let delta = select(u32(-1), 1u, is_down) << ((delta_pix & 3u) << 3u);
                                       ^^^^^^^

 - While validating [ShaderModuleDescriptor "fine_msaa16"]
 - While calling [Device].CreateShaderModule([ShaderModuleDescriptor "fine_msaa16"]).

127.0.0.1/:1 1 error(s) generated while compiling the shader:
:780:40 error: value -1 cannot be represented as 'u32'
                    let delta = select(u32(-1), 1u, is_down) << ((delta_pix & 3u) << 3u);
                                       ^^^^^^^

127.0.0.1/:1 [Invalid ShaderModule "fine_msaa16"] is invalid.
 - While validating compute stage ([Invalid ShaderModule "fine_msaa16"], entryPoint: main).
 - While calling [Device].CreateComputePipeline([ComputePipelineDescriptor "fine_msaa16"]).

demo-72aa4d43f3099d1ceabd15af0fd97de11e45775835e0dba2c345a584ce8bf11dfadacf47b6dcb04bf8222bab467ea90d.js:432 INFO src/assets/asset_loader.rs:89 finished parsing json asset path = "../assets/squid.json";size = "(1024.0, 1024.0)";
249[Invalid ComputePipeline "fine_msaa16"] is invalid.
 - While encoding [ComputePassEncoder].SetPipeline([Invalid ComputePipeline "fine_msaa16"]).

249[Invalid CommandBuffer "render_to_texture" from CommandEncoder "render_to_texture"] is invalid.
 - While calling [Queue].Submit([[Invalid CommandBuffer "render_to_texture" from CommandEncoder "render_to_texture"]])

127.0.0.1/:1 WebGPU: too many warnings, no more warnings will be reported to the console for this GPUDevice.

@seabassjh Any thoughts?

simbleau commented 8 months ago

Aha, this was a misconfigured AA setting. Sending some patch code now...

https://github.com/vectorgameexperts/bevy-vello/commit/4510e0d4b2f0210b0c2b298729c0708c5069a433

image