-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Strange Lighting Issues in 4.2 Beta using Compatibility Mode #83528
Comments
You can disable shadow rendering to get similar rendering to 4.1. 4.1 did not support shadows when using the Compatibility rendering method, while 4.2 does. Can you reproduce this if you remove the |
Can you point me to that setting? I dug around a lot but didn't find one that works.
Yes, deleting the |
There are two likely culprits
|
The preview DirectionalLight3D (which is used if the scene has no DirectionalLight3D node) always has shadows enabled. |
Using a DirectionalLight3D appears to disable the "preview DirectionaLight3D", but the issue remains. The comparison between Compatibility and Forward+ still demonstrates the issue with 4.2 Beta's compatibility renderer |
Godot version
v4.2.beta3.official [e8d57af]
System information
Godot v4.2.beta3 - Windows 10.0.22621 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 Ti (NVIDIA; 31.0.15.4584) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)
Issue description
Strange lighting issues only in Compatibility Mode on 4.2 Beta.
Notice the strange box on the upper left corner and the triangles on the walls.
This is just using an Omni Light with only these settings changed:
These issues do NOT show up in ANY mode in 4.1, and do not show up in Mobile or Forward+ modes in 4.2 Beta.
4.2 Compatibility, strange lighting issues:
4.1 Compatibility, no issues:
4.2 Forward+, no issues:
4.2 Mobile, no issues:
It seems like some enhancement of the Compatibility mode has resulted in worse behavior, but I'm not sure how to obtain the working 4.1 Compatibility behavior in 4.2, or how to obtain the Forward+ or Mobile behavior.
This is mainly annoying because the Compatibility results are also what I see when doing an HTML5 export, which looks fine in 4.1, but looks bad in 4.2.
Steps to reproduce
Use Compatibility mode or export any mode to HTML5 in 4.2 Beta and use an Omni or Directional Light with possibly complex imported meshes.
I have included a demo project below.
Minimal reproduction project
This file includes two projects, one in 4.1 and one in 4.2, but they are identical. The 4.2 project was an upgrade from the 4.1 project. I included them both though so that it is easy to open both at the same time.
LightingIssueProjects.zip
EDIT: Just to be entirely clear, here are the lighting issues I am referring to:
I realize these may be artifacts of settings or bad meshes, but since it doesn't happen in any mode in 4.1 or in any other mode in 4.2, it seems like a regression.
Update: FYI: Same issue in Beta 3, in case it matters.
Update: I've built a minimum example of the mesh that demonstrates the issue:
It appears to be related to how the "light" bounces off of those 45 degree angled bits on the edges of the block. If I remove both of them, the odd box in the upper left corner goes away.
This also works fine in 4.1 and fine in 4.2 Forward+ or Mobile rendering, so it is still some issue with 4.2 Beta's Compatibility renderer.
It is interesting that these odd results happen even if the light isn't aimed at the surface where they occur!
Here is the project that the screenshot above is from. I used a directional light instead of omni, as that appears to disable the "global" light. I also added a camera.
minimum-example.zip
The text was updated successfully, but these errors were encountered: