-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shaderdef values break shader imports #6996
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
M-Needs-Migration-Guide
A breaking change to Bevy's public API that needs to be noted in a migration guide
Milestone
Comments
aevyrie
added
C-Bug
An unexpected or incorrect behavior
S-Needs-Triage
This issue needs to be labelled
labels
Dec 21, 2022
aevyrie
changed the title
Shaderdef Breaking Change
Shaderdef values break shader imports
Dec 21, 2022
aevyrie
added
A-Rendering
Drawing game state to the screen
M-Needs-Migration-Guide
A breaking change to Bevy's public API that needs to be noted in a migration guide
and removed
S-Needs-Triage
This issue needs to be labelled
labels
Dec 21, 2022
I've added this to the |
Yup, this is a duplicate, I was searching for shaderdefs and didn't find it. |
bors bot
pushed a commit
that referenced
this issue
Jan 30, 2023
# Objective - Fix `post_processing` and `shader_prepass` examples as they fail when compiling shaders due to missing shader defs - Fixes #6799 - Fixes #6996 - Fixes #7375 - Supercedes #6997 - Supercedes #7380 ## Solution - The prepass was broken due to a missing `MAX_CASCADES_PER_LIGHT` shader def. Add it. - The shader used in the `post_processing` example is applied to a 2D mesh, so use the correct mesh2d_view_bindings shader import.
bors bot
pushed a commit
that referenced
this issue
Jan 30, 2023
# Objective - Fix `post_processing` and `shader_prepass` examples as they fail when compiling shaders due to missing shader defs - Fixes #6799 - Fixes #6996 - Fixes #7375 - Supercedes #6997 - Supercedes #7380 ## Solution - The prepass was broken due to a missing `MAX_CASCADES_PER_LIGHT` shader def. Add it. - The shader used in the `post_processing` example is applied to a 2D mesh, so use the correct mesh2d_view_bindings shader import.
bors bot
pushed a commit
that referenced
this issue
Jan 30, 2023
# Objective - Fix `post_processing` and `shader_prepass` examples as they fail when compiling shaders due to missing shader defs - Fixes #6799 - Fixes #6996 - Fixes #7375 - Supercedes #6997 - Supercedes #7380 ## Solution - The prepass was broken due to a missing `MAX_CASCADES_PER_LIGHT` shader def. Add it. - The shader used in the `post_processing` example is applied to a 2D mesh, so use the correct mesh2d_view_bindings shader import.
bors bot
pushed a commit
that referenced
this issue
Jan 30, 2023
# Objective - Fix `post_processing` and `shader_prepass` examples as they fail when compiling shaders due to missing shader defs - Fixes #6799 - Fixes #6996 - Fixes #7375 - Supercedes #6997 - Supercedes #7380 ## Solution - The prepass was broken due to a missing `MAX_CASCADES_PER_LIGHT` shader def. Add it. - The shader used in the `post_processing` example is applied to a 2D mesh, so use the correct mesh2d_view_bindings shader import.
bors bot
pushed a commit
that referenced
this issue
Jan 30, 2023
# Objective - Fix `post_processing` and `shader_prepass` examples as they fail when compiling shaders due to missing shader defs - Fixes #6799 - Fixes #6996 - Fixes #7375 - Supercedes #6997 - Supercedes #7380 ## Solution - The prepass was broken due to a missing `MAX_CASCADES_PER_LIGHT` shader def. Add it. - The shader used in the `post_processing` example is applied to a 2D mesh, so use the correct mesh2d_view_bindings shader import.
bors bot
pushed a commit
that referenced
this issue
Jan 30, 2023
# Objective - Fix `post_processing` and `shader_prepass` examples as they fail when compiling shaders due to missing shader defs - Fixes #6799 - Fixes #6996 - Fixes #7375 - Supercedes #6997 - Supercedes #7380 ## Solution - The prepass was broken due to a missing `MAX_CASCADES_PER_LIGHT` shader def. Add it. - The shader used in the `post_processing` example is applied to a 2D mesh, so use the correct mesh2d_view_bindings shader import.
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this issue
Feb 1, 2023
# Objective - Fix `post_processing` and `shader_prepass` examples as they fail when compiling shaders due to missing shader defs - Fixes bevyengine#6799 - Fixes bevyengine#6996 - Fixes bevyengine#7375 - Supercedes bevyengine#6997 - Supercedes bevyengine#7380 ## Solution - The prepass was broken due to a missing `MAX_CASCADES_PER_LIGHT` shader def. Add it. - The shader used in the `post_processing` example is applied to a 2D mesh, so use the correct mesh2d_view_bindings shader import.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
M-Needs-Migration-Guide
A breaking change to Bevy's public API that needs to be noted in a migration guide
Bevy version
All commits after d44e865
What you did
Followed migration instructions in the PR.
What went wrong
Shader error with:
Additional information
It appears that PR #5900 breaks imports, because those imports now depend on shaderdefs which users may not have available. In my case, I was attempting to import:
so I could use the
View
struct, which was giving me the error posted above. The problem was that the import was bringingstruct
s into scope that referred to theMAX_DIRECTIONAL_LIGHTS
shaderdef, which my shader did not use. Specifically, it was erroring when it reachedstruct Lights
:The text was updated successfully, but these errors were encountered: