Make the prepass shader compile when lightmaps are present.#13402
Merged
alice-i-cecile merged 5 commits intobevyengine:mainfrom May 18, 2024
Merged
Make the prepass shader compile when lightmaps are present.#13402alice-i-cecile merged 5 commits intobevyengine:mainfrom
alice-i-cecile merged 5 commits intobevyengine:mainfrom
Conversation
Commit 3f5a090 added a reference to `STANDARD_MATERIAL_FLAGS_BASE_COLOR_UV_BIT`, a nonexistent identifier, in the alpha discard portion of the prepass shader. Moreover, the logic didn't make sense to me. I think the code was trying to choose between the two UV sets depending on which is present, so I made it do that.
cae2b30 to
d2e8dbb
Compare
Member
|
FYI @geckoxx <3 If you'd like to review this fix it would be much appreciated :) |
alice-i-cecile
approved these changes
May 17, 2024
Contributor
|
it should be using shader def |
Contributor
Author
|
@robtfm OK, I made that change. I believe that the Rust side is already defining that. |
pcwalton
added a commit
to pcwalton/bevy
that referenced
this pull request
May 17, 2024
This fixes the problem that led to bevyengine#13402. I'm not sure if this had any negative consequences, but it didn't replicate the prior behavior with the `Or` query filter, so I changed it to match.
Contributor
|
This seems correct. Sorry, I missed this when moving from using material flags to shader defs. |
IceSentry
approved these changes
May 17, 2024
robtfm
approved these changes
May 17, 2024
robtfm
reviewed
May 18, 2024
Contributor
robtfm
left a comment
There was a problem hiding this comment.
actually doesn't seem to work - error: Too many '# endif' lines. Each endif should be preceded by an if statement.
Contributor
Author
|
Marking as draft while I investigate. |
Contributor
|
The endif in line 27 should be removed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit 3f5a090 added a reference to
STANDARD_MATERIAL_FLAGS_BASE_COLOR_UV_BIT, a nonexistent identifier, in the alpha discard portion of the prepass shader. Moreover, the logic didn't make sense to me. I think the code was trying to choose between the two UV sets depending on which is present, so I made it do that.I noticed this when trying Bistro with #13277. I'm not sure why this issue didn't manifest itself before, but it's clearly a bug, so here's a fix. We should probably merge this before 0.14.