OmniLight3Ds with very pixel-y shadows

The formulas for calculating spotlights and point lights are also problematic. They should use a local coordinate system relative to the camera’s position, rather than the camera’s local coordinate system. This would prevent the shadows from changing based on the viewing direction.

1 Like

You mean by compiling the Godot editor myself?

This is an engine issue; you have to compile it yourself. I compiled my own editor because I needed to implement many features in C++.

Does it only happen when the geometry is far from the origin?

Rotating the camera should trigger the bug. To make it more obvious, you can use directional lighting and enable soft shadows to test. This bug has been around for three or four years.

My code modifications have resolved all the shadow-related issues. You can modify the GLSL code yourself if needed.

Have you given thought to making a PR for those fixes and submit them to Godot’s GitHub?
I mean if it fixes the bugs without bringing regressions or new ones, it should be a shoo-in.
Cheers !

2 Likes

I’m not very familiar with the GitHub submission process, and my comments are all over the place. If anyone is familiar with the process, could you please help me create a pull request and submit it?

The coordinates of the camera are -60/1/10, I don’t think that’s far from the origin.

Here’s what the docs say about PRs, maybe it helps?