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

Projection::invert fails with Condition "0.0 == r3[3]" is true #100850

Closed
stuartcarnie opened this issue Dec 27, 2024 · 4 comments · Fixed by #100862
Closed

Projection::invert fails with Condition "0.0 == r3[3]" is true #100850

stuartcarnie opened this issue Dec 27, 2024 · 4 comments · Fixed by #100862

Comments

@stuartcarnie
Copy link
Contributor

stuartcarnie commented Dec 27, 2024

Tested versions

Godot Engine v4.4.dev7.official.46c8f8c5c - https://godotengine.org
Metal 3.2 - Forward+ - Using Device #0: Apple - Apple M1 Max (Apple7)

System information

Godot v4.4.dev7 - macOS Sequoia (15.2.0) - Multi-window, 2 monitors - Metal (Forward+) - integrated Apple M1 Max (Apple7) - Apple M1 Max (10 threads)

Issue description

Logs are spammed with the following:

ERROR: Condition "0.0 == r3[3]" is true.
   at: invert (/Volumes/Data/projects/games/godot/core/math/projection.cpp:758)
ERROR: Condition "0.0 == r3[3]" is true.
   at: invert (/Volumes/Data/projects/games/godot/core/math/projection.cpp:758)

Steps to reproduce

  1. Start TPS-Demo
  2. Fire weapon so that it hits the ground1
  3. Shortly after bullet collides, logs will be spammed with the above errors

Image

Minimal reproduction project (MRP)

TPS-Demo is where I observed this behaviour

Footnotes

  1. It doesn't happen on all shots, and appears mostly when hitting the ground

@matheusmdx
Copy link
Contributor

Oh my, someone that read the issue guidelines! Jokes aside, this seems to be a regression between the 4.4 dev 6 and 4.4 dev 7, i'll bisect right now.

@matheusmdx
Copy link
Contributor

Bisected to #100319, @Flarkk

Image

@clayjohn clayjohn added this to the 4.4 milestone Dec 27, 2024
@clayjohn clayjohn moved this from Unassessed to Bad in 4.x Release Blockers Dec 27, 2024
Flarkk added a commit to Flarkk/godot that referenced this issue Dec 27, 2024
@Flarkk
Copy link
Contributor

Flarkk commented Dec 27, 2024

I think I messed up the light range and the shadow range in #100319.

Lights with 0 or very small range may break the shadow projection matrix by placing the far plane before the near plane. This is what likely happens in the TPS demo when a bullet collides and the impact light range is animated.

Just pushed a quick draft (#100862). Will test it properly tomorrow - night time here.

Flarkk added a commit to Flarkk/godot that referenced this issue Dec 27, 2024
@Flarkk
Copy link
Contributor

Flarkk commented Dec 28, 2024

Just opened the fix #100862 for reviews. Should be okay now.
Yesterday night I was right on the above intuition, but wrong on the way to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
Development

Successfully merging a pull request may close this issue.

5 participants