compute-toys/wgpu-compute-toy

No images found when running some examples

sophia-long opened this issue · 1 comments

I attempted to test some examples, and most of them ran perfectly. However, I found that some examples require texture images. These examples run successfully when the images are sourced from URLs. However, when attempting to use local images, the examples generate an 'image not found' error. For instance, the '/fabrice/utils.wgsl' example includes a JSON file:

{
    "uniforms": [],
    "textures": [
        {
            "img": "/textures/font0.png"
        },
        {
            "img": "/textures/london.jpg"
        }
    ],
    "float32Enabled": false
}

It appears that the 'font0.png' and 'london.jpg' files are not present in the project's directory structure. How can this issue be resolved?

Additionally, does the 'wgpu-compute-toy' project support cube maps, in addition to 2D textures?

It should be trying to fetch those from the website, eg https://compute.toys/textures/london.jpg

If you want a local copy of those files, they can be found in https://github.com/compute-toys/compute.toys/tree/master/public/textures

We don't currently have any support for cubemaps