mirror of
https://github.com/bevyengine/bevy
synced 2025-01-08 19:29:04 +00:00
4065098586
# Objective - since #13523, UI is broken in WebGPU ``` Compilation log for [Invalid ShaderModule (unlabeled)]: 1 error(s) generated while compiling the shader: :108:27 error: 'textureSample' must only be called from uniform control flow let texture_color_1 = textureSample(sprite_texture, sprite_sampler, in_2.uv); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :151:19 note: called by 'draw_background' from 'fragment' let _e5 = draw_background(in); ^^^^^^^^^^^^^^^^^^^ :147:5 note: control flow depends on possibly non-uniform value if _e3 { ^^ :146:23 note: parameter 'in' of 'fragment' may be non-uniform let _e3 = enabled(in.flags, BORDER); ``` ## Solution - call `textureSample` from outside the if. both branches are using the same parameters |
||
---|---|---|
.. | ||
mod.rs | ||
pipeline.rs | ||
render_pass.rs | ||
ui.wgsl | ||
ui_material.wgsl | ||
ui_material_pipeline.rs | ||
ui_vertex_output.wgsl |