Skip to content

'bevy_render::maths' import path not found on web #19226

Closed
@Vrixyz

Description

@Vrixyz

Bevy version

main as of 1395152.

System information

cargo 1.87.0 (99624be96 2025-05-06)
MacOS Sequoia ; on arc

AdapterInfo { name: "ANGLE (Apple, ANGLE Metal Renderer: Apple M3 Pro, Unspecified Version)", vendor: 4203, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "WebGL 2.0 (OpenGL ES 3.0 Chromium)", backend: Gl }

What you did

Run cargo run --example extended_material --target wasm32-unknown-unknown

What went wrong

Example is not running correctly:

 INFO app: crates/bevy_render/src/batching/gpu_preprocessing.rs:1130 GPU preprocessing is not supported on this device. Falling back to CPU preprocessing.
 WARN app: crates/bevy_core_pipeline/src/oit/resolve/mod.rs:83 OrderIndependentTransparencyPlugin not loaded. GPU lacks support: DownlevelFlags::FRAGMENT_WRITABLE_STORAGE.
 WARN app: crates/bevy_pbr/src/ssao/mod.rs:92 ScreenSpaceAmbientOcclusionPlugin not loaded. GPU lacks support: TextureFormat::R16Float does not support TextureUsages::STORAGE_BINDING.
 WARN app: crates/bevy_pbr/src/atmosphere/mod.rs:170 AtmospherePlugin not loaded. GPU lacks support for compute shaders.
 INFO app: crates/bevy_core_pipeline/src/dof/mod.rs:824 Disabling depth of field on this platform because depth textures aren't supported correctly
ERROR app: crates/bevy_render/src/render_resource/pipeline_cache.rs:1034 failed to process shader:
error: required import 'bevy_render::maths' not found
    ┌─ crates/bevy_core_pipeline/src/tonemapping/tonemapping_shared.wgsl:335:13
    
335      color = powsafe(color * gain + lift, 1.0 / gamma);
                 ^
    
    = missing import 'bevy_render::maths'


ERROR app: crates/bevy_render/src/render_resource/pipeline_cache.rs:1034 failed to process shader:
error: required import 'bevy_render::maths' not found
   ┌─ crates/bevy_pbr/src/render/mesh_functions.wgsl:18:12
   
18      return affine3_to_square(mesh[instance_index].world_from_local);
               ^
   
   = missing import 'bevy_render::maths'

Additional notes

To be noted, on firefox on the same machine, I'm having the same error as:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorC-ExamplesAn addition or correction to our examplesO-WebSpecific to web (WASM) buildsO-WebGL2Specific to the WebGL2 render API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions