[Merged by Bors] - Per-light toggleable shadow mapping#3126
Closed
superdump wants to merge 3 commits intobevyengine:pipelined-renderingfrom
Closed
[Merged by Bors] - Per-light toggleable shadow mapping#3126superdump wants to merge 3 commits intobevyengine:pipelined-renderingfrom
superdump wants to merge 3 commits intobevyengine:pipelined-renderingfrom
Conversation
a6b8b4a to
d869760
Compare
64 tasks
d869760 to
fc0a2c2
Compare
fc0a2c2 to
760f279
Compare
cart
reviewed
Nov 19, 2021
Member
|
With the exception of the comment above this looks good to me! |
cart
reviewed
Nov 19, 2021
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Nov 19, 2021
# 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>
Contributor
|
Pull request successfully merged into pipelined-rendering. Build succeeded: |
Contributor
|
@superdump @cart This PR disables all shadows in the examples. Was that intentional? Examples checked:
|
Contributor
Author
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. :) |
This was referenced Nov 27, 2021
bors bot
pushed a commit
that referenced
this pull request
Nov 27, 2021
# Objective - As mentioned in #3126, shadows need to be readded in examples ## Solution - Add shadows in examples
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.
Objective
Allow shadow mapping to be enabled/disabled per-light.
Solution
shadows_enabledboolean property toPointLightandDirectionalLightcomponents.ViewLight->ShadowView, the bulk ofViewLightsmembers ->ViewShadowBindings, the entities Vec inViewLights->ViewLightEntities, the uniform offset inViewLightsforGpuLights->ViewLightsUniformOffset