-
Notifications
You must be signed in to change notification settings - Fork 1
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
Directional light and shadow #6
Directional light and shadow #6
Conversation
Normal maps are not included here as they require tangents in a vertex attribute.
From 'fintelia' on the Bevy Render Rework Round 2 discussion: "My understanding is that GPUs these days never use the "execute both branches and select the result" strategy. Rather, what they do is evaluate the branch condition on all threads of a warp, and jump over it if all of them evaluate to false. If even a single thread needs to execute the if statement body, however, then the remaining threads are paused until that is completed."
The StandardMaterial_ prefix is no longer needed
The uniform contains the view_projection matrix so this was incorrect.
Indexing was incorrect.
Still looking along the light's direction.
This demonstrates peter panning problems with shadows.
This rounds up the size to the struct's alignment. This allows interoperability with wgsl.
805f82d
to
bbb9a81
Compare
Updated, note that it depends on #18. |
Can we decouple this from #18? I'd like to hold off on taking dependencies on the crevice changes until we're certain they are the right path forward. |
I don’t have much time now as I am back at work. If I do this then I will not use crevice at all for problematic structs and will instead just use manual padding, manual sizes, and bytemuck. Is this ok? |
Never mind, I can't even take this approach because GpuLights is stored in a DynamicUniformVec which depends on the AsStd140 trait. |
Oddly this now seems to work without any changes to crevice from what we're already using. |
Pushed a few superficial changes:
|
I doubt these changes will be particularly contentious, so I'm merging in the interest of moving forward. But feel free to contest anything. These changes are easy to revert. Great work here! |
Ok. :)
Yeah, I had the same thought with wanting to use transforms and visible gizmos for tweaking them, I just didn't change it from how it was done in current bevy. I had made the direction pub on the perspective-infinite-reverse-rh branch updates because the inability to use our standard
I agree. I did this in the perspective-infinite-reverse-rh branch as well.
Yes, I agree. When we have the bounding volumes types internally, we can do this. I could do it already with bevy_mod_bounding but that's an external plugin. 🙂 |
No description provided.