Open torsteingrindvik opened 6 months ago
Relatively new: 499c978
I have a wgsl shader which at the start has:
#import bevy_ui::ui_vertex_output::UiVertexOutput #import bevy_pbr::rand_f
When trying to use rand_f, an error happens:
rand_f
2024-03-06T10:39:12.086331Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader: error: required import 'bevy_pbr' not found ┌─ foo.wgsl:14:17 │ 14 │ let noise = rand_f(&rng); │ ^ │ = missing import 'bevy_pbr'
While typing out this issue I realized my mistake.
The import should be
#import bevy_pbr::utils::rand_f
not
#import bevy_pbr::rand_f
Improve the error message to state that bevy_pbr::rand_f does not exist, not the current message which is misleading.
bevy_pbr::rand_f
Needs to be filed under https://github.com/bevyengine/naga_oil
Bevy version
Relatively new: 499c978
What you did
I have a wgsl shader which at the start has:
What went wrong
When trying to use
rand_f
, an error happens:Additional information
Theories
While typing out this issue I realized my mistake.
The import should be
not
Suggested fix
Improve the error message to state that
bevy_pbr::rand_f
does not exist, not the current message which is misleading.