Point light shadow acne/streaking since 5.6.282 (no normal bias, bias not adapted to three.js r185 depth shadows)
Is there an existing issue for this?
- [x] I have searched the existing issues
Describe the bug
Describe the bug Since updating to GDevelop 282, shadows from 3D point lights (Light3D extension, PointLight3D) show streaks / shadow acne on many surfaces, especially walls and floors close to the light and surfaces lit at grazing angles. Projects that looked fine before 282 now show it in every scene.
Cause (as far as I can tell)
- 282 ships three.js r185, where point light shadows use a cube depth texture (perspective, non-linear depth) instead of packed linear distance.
- PointLight3D still sets
shadow.bias = -value * biasMultiplier * inverseWorldScale, which used to be a linear depth offset. Now it's added to non-linear depth, so the effective world-space bias grows with distance²: almost nothing near the light (acne), much too much far away (detached shadows). Raising the bias can't fix both. shadow.normalBiasis never set (stays 0), and there's no property for it.
Suggested fix
Add a "Shadow normal bias" property to point (and spot) lights, like PR #9305 did for directional lights, and/or convert the bias for r185's depth-based point shadows.
Workaround confirmed: setting light.shadow.normalBias ≈ 0.02 (world units) via JavaScript removes the streaks.
GDevelop version: 5.6.287 (started in 5.6.282, fine in 5.6.281) Platform: Linux, desktop preview
Steps to reproduce
Steps to reproduce
- 3D scene with a PointLight3D, Shadow casting on, quality High (near plane 20, far 900).
- Put walls/floor within ~150 px of the light.
- Preview: streaks on nearby/grazing surfaces. Didn't happen before 282.
GDevelop platform
Desktop
GDevelop version
5.6.287 (started in 5.6.282, fine in 5.6.281)
Platform info
Platform: Desktop app (Linux, Arch, kernel 7.3.5), in-editor preview. GPU: NVIDIA RTX 2080 Ti
Additional context
No response
This should be fixed already: https://github.com/GDevelopApp/GDevelop-extensions/pull/2358 Make sure to upgrade your light extension to 3.0.0. If a starter/example game uses a point/spot light without a normal biais set to 1 by default (or another value), let me know by re-opening this issue :)