Skip to content
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

Fix directional light shadow frustum culling near clip plane to infinity #12342

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

atlv24
Copy link
Contributor

@atlv24 atlv24 commented Mar 6, 2024

Objective

  • Fix slightly wrong logic from Meshlet prep #11442
  • Directional lights should not have a near clip plane

Solution

  • Push near clip out to infinity, so that the frustum normal is still available if its needed for whatever reason in shader
  • also opportunistically nabs a typo

@rparrett
Copy link
Contributor

rparrett commented Mar 6, 2024

Should this be on the 0.13.1 milestone?

@atlv24
Copy link
Contributor Author

atlv24 commented Mar 6, 2024

I dont mind if it is or isnt. This isnt particularly user facing, but if someone is trying to make a shader using this new feature on 0.13 they may run into this and pull some hair for a while before figuring it out.

@TrialDragon TrialDragon added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Mar 6, 2024
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 6, 2024
@alice-i-cecile alice-i-cecile added this to the 0.13.1 milestone Mar 6, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 6, 2024
Merged via the queue into bevyengine:main with commit 13d37c5 Mar 6, 2024
29 checks passed
mockersf pushed a commit that referenced this pull request Mar 8, 2024
…ity (#12342)

# Objective

- Fix slightly wrong logic from #11442
- Directional lights should not have a near clip plane

## Solution

- Push near clip out to infinity, so that the frustum normal is still
available if its needed for whatever reason in shader
- also opportunistically nabs a typo
spectria-limina pushed a commit to spectria-limina/bevy that referenced this pull request Mar 9, 2024
…ity (bevyengine#12342)

# Objective

- Fix slightly wrong logic from bevyengine#11442
- Directional lights should not have a near clip plane

## Solution

- Push near clip out to infinity, so that the frustum normal is still
available if its needed for whatever reason in shader
- also opportunistically nabs a typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants