godot icon indicating copy to clipboard operation
godot copied to clipboard

Vulkan: SDFGI and the use of an Orthogonal Camera generates some artifacts on screen

Open hidemat opened this issue 3 years ago • 7 comments


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:

image

Steps to reproduce

Enable both SDFGI and an Orthogonal Camera, the artifacts appear after some time.

Minimal reproduction project

orthogonal_bug.zip

hidemat avatar Apr 26 '22 04:04 hidemat

This looks like different SDFGI cascade splits having slightly different brightness due to bounce lighting behaving differently depending on the cell size.

Calinou avatar Apr 26 '22 12:04 Calinou

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.

reduz avatar Apr 27 '22 16:04 reduz

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.

hidemat avatar Apr 28 '22 00:04 hidemat

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

Calinou avatar Apr 28 '22 14:04 Calinou

I can still reproduce this as of 4.0.beta7 (Linux, AMD Radeon RX 6900 XT with RADV). This also occurs with VoxelGI.

Calinou avatar Dec 08 '22 23:12 Calinou

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?

tlitookilakin avatar Feb 29 '24 23:02 tlitookilakin

Still reproducible in 4.2.1 stable.

Same in 4.3 dev snapshot 5

Kukuschi avatar May 01 '24 18:05 Kukuschi