godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.16k stars 20.21k forks source link

Shadow line when using OmniLight at a specific angle #25750

Closed Alastor01 closed 1 year ago

Alastor01 commented 5 years ago

Godot version: Godot 3.1 Beta 3

OS/device including version:

Issue description:

Steps to reproduce:

Extra steps:

Minimal reproduction project:

clayjohn commented 5 years ago

I can confirm using intel integrated graphics.

eon-s commented 5 years ago

Same for amdgpu on linux, it seems like a limitation of the omnilight, put it a bit far from the surface and the line disappears.

I remember seeing other artifacts when the light on cube mode is too close to objects.

Alastor01 commented 5 years ago

@eon-s Ye, it would be problematic for FPS games using such light sources, as the artifact depends on exact location and rotation of camera in relation to OmniLight

dioptryk commented 5 years ago

I've had this problem recently on GTX 970, Godot 3.1.1-windows. I'm writing a 3d dungeon crawler game, shown from first person perspective; after adding a Camera (player) with a light (torch), I've had horrible striping artifacts, no matter the bias/shadow quality or other config options (you name it). The thing is, the OmniLight was a a child of Camera and was set at (0, 0, 0) in relation to parent. The moment I moved the light a bit (about 0.2 in all directions, simulating handling the torch in right hand, and my geometry scale is pretty small, person size < 1.0), voila - all the shadows started working instantly with no artifacts whatsoever (even the performance got better). I think this case should be documented (Camera-Light position relation).

KoBeWi commented 3 years ago

Still valid in 3.2.4 beta3 The project is broken on master (mesh is invisible).

clayjohn commented 1 year ago

Fixed in 4.0. The problem here comes from using dual paraboloid shadow mapping. Godot 4 now uses cubemap shadows by default and avoids this issue