bevyengine / bevyengine/bevy

Unresolved WESL import warning on web

Open
#25,363 3 comments 0 reactions 1 assignee Claimed by @taearls View on GitHub
A-Rendering C-Bug D-Shaders O-Web
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version and features

main

## What you did

`cargo r -p build-wasm-example shader_material --features webgpu`

## What went wrong

```
GET http://127.0.0.1:8000/assets/shaders/custom_material.wesl.meta 404 (Not Found)
INFO crates/bevy_render/src/renderer/mod.rs:309 AdapterInfo { name: "", vendor: 0, device: 0, device_type: Other, device_pci_bus_id: "", driver: "", driver_info: "", backend: BrowserWebGpu, subgroup_min_size: 64, subgroup_max_size: 64, transient_saves_memory: None, limit_bucket: None }
INFO crates/bevy_pbr/src/cluster/mod.rs:87 GPU clustering is supported on this device.
INFO crates/bevy_render/src/batching/gpu_preprocessing.rs:1470 Some GPU preprocessing are limited on this device.
GET http://127.0.0.1:8000/assets/shaders/custom_material_import/COLOR_MULTIPLIER.wesl 404 (Not Found)
GET http://127.0.0.1:8000/assets/shaders/custom_material_import.wesl.meta 404 (Not Found)
WARN crates/bevy_shader/src/shader_cache.rs:297 Shader `shaders/custom_material.wesl` has an unresolved import:error: module not found: `package::shaders::custom_material_import` (no shader registered for this module path) | = note: in package::shaders::custom_material (shaders/custom_material.wesl)
```

Rendering works and `custom_material_import.wesl` is loaded correctly, but bevy attempts to load `COLOR_MULTIPLIER.wesl`, but it's a declaration, not a file.

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.