Skip to content

#import bevy_pbr::pbr_functions error #8498

Answered by nicopap
stan4cb asked this question in Q&A
Discussion options

You must be logged in to vote

You need to add the following imports to your shader:

#import bevy_pbr::mesh_bindings
#import bevy_pbr::mesh_view_bindings
#import bevy_pbr::pbr_bindings

view is a uniform defined in mesh_view_bindings. It is not imported by either pbr_types or pbr_functions, therefore if you don't import mesh_view_bindings, it won't be available for them.

I expect that other functions in pbr_functions require other bindings defined in the files I listed.

In all fairness, it's a poorly documented side of bevy that is not intuitive.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by stan4cb
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
A-Rendering Drawing game state to the screen
2 participants