From af37ab51ecc1abda30ea4a960d2e16386cac0ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 25 Oct 2023 02:18:45 +0200 Subject: [PATCH] WebGL2: fix import path for unpack_unorm3x4_plus_unorm_20_ (#10251) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective - Fixes #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 #9258 on macOS ... at least they're not white anymore Screenshot 2023-10-25 at 00 14 11 --- crates/bevy_pbr/src/deferred/deferred_lighting.wgsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/deferred/deferred_lighting.wgsl b/crates/bevy_pbr/src/deferred/deferred_lighting.wgsl index 2b8221a45f..bf837bab55 100644 --- a/crates/bevy_pbr/src/deferred/deferred_lighting.wgsl +++ b/crates/bevy_pbr/src/deferred/deferred_lighting.wgsl @@ -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, }