Skip to content

Commit

Permalink
WebGL2: fix import path for unpack_unorm3x4_plus_unorm_20_ (bevyengin…
Browse files Browse the repository at this point in the history
…e#10251)

# Objective

- Fixes bevyengine#10250 

```
[Log] ERROR crates/bevy_render/src/render_resource/pipeline_cache.rs:823 failed to process shader: (wasm_example.js, line 376)
error: no definition in scope for identifier: 'bevy_pbr::pbr_deferred_functions::unpack_unorm3x4_plus_unorm_20_'
   ┌─ crates/bevy_pbr/src/deferred/deferred_lighting.wgsl:44:20
   │
44 │     frag_coord.z = bevy_pbr::pbr_deferred_functions::unpack_unorm3x4_plus_unorm_20_(deferred_data.b).w;
   │                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown identifier
   │
   = no definition in scope for identifier: 'bevy_pbr::pbr_deferred_functions::unpack_unorm3x4_plus_unorm_20_'
```

## Solution

- Fix the import path

The "gray" issue is since bevyengine#9258 on macOS 

... at least they're not white anymore
<img width="1294" alt="Screenshot 2023-10-25 at 00 14 11"
src="https://github.com/bevyengine/bevy/assets/8672791/df1a1138-c26c-4417-9b49-a00fbb8561d7">
  • Loading branch information
mockersf authored and Ray Redondo committed Jan 9, 2024
1 parent 5b3b7b2 commit b1fa14c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_pbr/src/deferred/deferred_lighting.wgsl
Expand Up @@ -2,7 +2,8 @@
prepass_utils,
pbr_types::STANDARD_MATERIAL_FLAGS_UNLIT_BIT,
pbr_functions,
pbr_deferred_functions::{pbr_input_from_deferred_gbuffer, unpack_unorm3x4_plus_unorm_20_},
pbr_deferred_functions::pbr_input_from_deferred_gbuffer,
pbr_deferred_types::unpack_unorm3x4_plus_unorm_20_,
mesh_view_bindings::deferred_prepass_texture,
}

Expand Down

0 comments on commit b1fa14c

Please sign in to comment.