godotengine / godot

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

OpenGL: Directional Shadow Splits debug draw mode is not implemented #46129

Open Calinou opened 3 years ago

Calinou commented 3 years ago

Godot version: Git 89a43d9c2

OS/device including version: Fedora 33, GeForce GTX 1080 (NVIDIA 460.39)

Issue description:

Following the removal of support for colored shadows to improve performance, the Directional Shadow Splits debug draw mode no longer works. It now displays exactly like the normal draw mode.

Back when colored shadows were supported, each split had different shadow colors thanks to this code:

https://github.com/godotengine/godot/blob/f91c4c08999cc79586d74973953202a2af4dd7ee/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp#L6319-L6354

Speaking of which, we should also remove the shadow color property from Light3D as it's no longer effective.

Steps to reproduce:

Select Debug Advanced… > Directional Shadow Splits in the 3D viewport's Perspective menu:

image

Minimal reproduction project: test_debug_draw_splits.zip

Calinou commented 1 week ago

This was fixed in 4.2.2 or earlier in Forward+ and Mobile, but the Compatibility rendering method is still missing an implementation of this debug draw mode.