CYOS zip download stores shaders in ShadersStoreWGSL, even with WebGL

I tried zip download using CYOS.
https://cyos.babylonjs.com/
Strangely enough, even if WebGL1/2 is selected as the 3D API, shaders seem to be stored in ShadersStoreWGSL.

I suggest revising the logic to ensure that the shaders are stored in the appropriate location based on the selected API in the dropdown menu, rather than relying on whether the WebGPU API is supported or not.

interesting! yes, this should not be “supported” but “used”. I’ll check that, thanks :slight_smile:

1 Like

Should work now!

make gpu work correctly by RaananW · Pull Request #10 · BabylonJS/CYOS (github.com)

1 Like

Thank you for the improvement.

I tried zip downloading with WebGL2/WebGPU respectively.
I confirmed that shaders are stored in different stores: ShadersStore/ShadersStoreWGSL.
I have confirmed that running the WebGL2 zip download result on a local server works correctly.

However, an unexpected error seems to occur when executing the WebGPU zip download result on the local server. Am I using something wrong?

webgpuCacheBindGroups.ts:259 Uncaught TypeError: Failed to execute 'createBindGroup' on 'GPUDevice': Failed to read the 'entries' property from 'GPUBindGroupDescriptor': Failed to read the 'resource' property from 'GPUBindGroupEntry': Required member is undefined.
    at e.getBindGroups (webgpuCacheBindGroups.ts:259:42)
    at t._draw (webgpuEngine.ts:3229:50)
    at t.drawElementsType (webgpuEngine.ts:3302:14)
    at t._draw (mesh.ts:1815:20)
    at t._processRendering (mesh.ts:2140:22)
    at t.render (mesh.ts:2439:14)
    at e.render (subMesh.ts:427:29)
    at e._RenderSorted (renderingGroup.ts:275:21)
    at e._renderOpaqueSorted (renderingGroup.ts:205:31)
    at e.render (renderingGroup.ts:144:18)

I tried porting it to PlayGround, but got the same error.

1 Like

checking!

1 Like

can you share the index.html you downloaded?

Attached is the zip file when downloaded.

sample (19).zip (220.2 KB)

The environment is as below.
Web Browser: Chrome 119
CYOS Settings:

  • TEMPLATES: Phong
  • MESHES: Sphere
  • 3D API: WebGPU

ok! that’s a simple fix. i’ll push it very soon :slight_smile:

UPDATE - being deployed, should be fine in a few minutes

2 Likes