-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Per-light toggleable shadow mapping #3126
[Merged by Bors] - Per-light toggleable shadow mapping #3126
Conversation
a6b8b4a
to
d869760
Compare
d869760
to
fc0a2c2
Compare
fc0a2c2
to
760f279
Compare
With the exception of the comment above this looks good to me! |
bors r+ |
# Objective Allow shadow mapping to be enabled/disabled per-light. ## Solution - NOTE: This PR is on top of #3072 - Add `shadows_enabled` boolean property to `PointLight` and `DirectionalLight` components. - Do not update the frusta for the light if shadows are disabled. - Do not check for visible entities for the light if shadows are disabled. - Do not fetch shadows for lights with shadows disabled. - I reworked a few types for clarity: `ViewLight` -> `ShadowView`, the bulk of `ViewLights` members -> `ViewShadowBindings`, the entities Vec in `ViewLights` -> `ViewLightEntities`, the uniform offset in `ViewLights` for `GpuLights` -> `ViewLightsUniformOffset` Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Pull request successfully merged into pipelined-rendering. Build succeeded: |
@superdump @cart This PR disables all shadows in the examples. Was that intentional? Examples checked:
|
I’ll reenable them when the branch is merged into main. After discussion above it was decided to flip the default to disabled and the impact on examples was overlooked. :) |
# Objective - As mentioned in #3126, shadows need to be readded in examples ## Solution - Add shadows in examples
Objective
Allow shadow mapping to be enabled/disabled per-light.
Solution
shadows_enabled
boolean property toPointLight
andDirectionalLight
components.ViewLight
->ShadowView
, the bulk ofViewLights
members ->ViewShadowBindings
, the entities Vec inViewLights
->ViewLightEntities
, the uniform offset inViewLights
forGpuLights
->ViewLightsUniformOffset