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

Crash when having a Directional Light with shadows enabled and a Orthographic Camera #7797

Closed
smellypengu opened this issue Feb 23, 2023 · 0 comments
Labels
A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash
Milestone

Comments

@smellypengu
Copy link

Bevy version

main

[Optional] Relevant system information

`AdapterInfo { name: "AMD Radeon RX 5700 XT", vendor: 4098, device: 29471, device_type: DiscreteGpu, driver: "AMD open-source driver", driver_info: "2022.Q4.4 (LLPC)", backend: Vulkan }`

What you did

Add a Directional Light with shadows enabled whilst having a Orthographic Camera.

What went wrong

Crash with a unwrap() on None value error at bevy_pbr/src/render/light.rs:1242:18.

Additional information

I was made aware that there is a TODO comment at bevy_pbr/src/light.rs#L417 which does explain why this is caused however this should be properly handled. (Plus I need this to be supported for what I'm working on :))

@smellypengu smellypengu added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 23, 2023
@james7132 james7132 added A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash and removed C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 23, 2023
@james7132 james7132 added this to the 0.10 milestone Feb 25, 2023
@bors bors bot closed this as completed in a39c223 Mar 2, 2023
Shfty pushed a commit to shfty-rust/bevy that referenced this issue Mar 19, 2023
…ne#7796)

# Objective

Fixes bevyengine#7797 

## Solution

This **seems** like a simple fix, but I'm not 100% confident and I may have messed up the math in some way. In particular, I'm not sure what I should be using for an FOV value.

However, this seems to be producing similar results to 0.9.

Here's the `orthographic` example with a default directional light.

edit: better screen grab below.
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 P-Crash A sudden unexpected crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants