-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Make the prepass shader compile when lightmaps are present. #13402
Make the prepass shader compile when lightmaps are present. #13402
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
FYI @geckoxx <3 If you'd like to review this fix it would be much appreciated :) |
it should be using shader def |
@robtfm OK, I made that change. I believe that the Rust side is already defining that. |
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.
This seems correct. Sorry, I missed this when moving from using material flags to shader defs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually doesn't seem to work - error: Too many '# endif' lines. Each endif should be preceded by an if statement.
Marking as draft while I investigate. |
The endif in line 27 should be removed. |
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.