Open zakorgy opened 3 years ago
The global light with orthographic projection for light and shadow was added in https://github.com/zakorgy/voxel-editor/pull/17 Also sampler2DShadow was replaced with sampler2D in that PR, because it produces a better result
The current shadow implementation uses shadow mapping (render the screen from the lights view to a deth buffer, and use that depth to calucalte shadow), but is a bit hacky in the shader. There are many more ways it can be improved: