godot
godot copied to clipboard
Vulkan: SDFGI and the use of an Orthogonal Camera generates some artifacts on screen
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version
Godot 4 alpha 6
System information
Windows 10 NVIDIA GeForce GTX 1050
Issue description
When I enable both SDFGI and an Orthogonal Camera, I don't immediately get artifacts on screen, but they appear with time. The following image shows subtle lines where there should be a smooth color:

Steps to reproduce
Enable both SDFGI and an Orthogonal Camera, the artifacts appear after some time.
Minimal reproduction project
This looks like different SDFGI cascade splits having slightly different brightness due to bounce lighting behaving differently depending on the cell size.
I have the feeling SDGI should simply not work in orthogonal mode, or at least I have no idea how it could be made to work.
I realize I have no idea what I'm talking about here, but maybe my idea will spark some other ideas?
It occurs to me that maybe the SDFGI grid could align with the orthogonal camera's normal.
Again, I have no idea how it works.
I can confirm this on 4.0.alpha 22aab5f64 (Linux, NVIDIA 510.60.02).
Perspective editor camera
Looks correct.
https://user-images.githubusercontent.com/180032/165775823-b94906ca-33be-468a-93d7-17e5d63771dd.mp4
Orthogonal editor camera
No GI at all appears.
https://user-images.githubusercontent.com/180032/165775840-1e05ede4-d43c-4030-94d5-91701d515790.mp4
Orthogonal Camera3D preview
Wrong GI appears. Tweaking Zfar/Znear/Size doesn't help.
Note: If Update Continuously is disabled in the Editor Settings, you may see not GI at all if you were previously using the editor's orthogonal camera.
https://user-images.githubusercontent.com/180032/165775845-8207c876-63a4-4aef-9261-3d14767b918a.mp4
I can still reproduce this as of 4.0.beta7 (Linux, AMD Radeon RX 6900 XT with RADV). This also occurs with VoxelGI.
Still reproducible in 4.2.1 stable. Turning on probe visualization, the probes appear to project correctly. Turning on cascade visualization, the cascades seem to be mostly correct but enormously inflated. Seems to be about 6-8x maybe?
Still reproducible in 4.2.1 stable.
Same in 4.3 dev snapshot 5