godotengine / godotengine/godot

Jumping Shadows

Open
#90,175 7 comments 1 reaction 0 assignees View on GitHub
documentation topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

At first I thought it was due to a problem with the voxel engine I'm using, in which the effect is amplified for some reason. But after some tests without the voxel module I realized that the problem also occurs in the latest official version of Godot and in the latest commit of the master branch.

### System information

Windows 11 - NVIDIA GeForce RTX 4070 Laptop - Godot v4.2.1.stable - Vulkan (Forward+)

### Issue description

While I was trying to create a day and night cycle for my game I have discovered that when rotating a DirectionalLight3D slowly in the X axis the shadows start to make a very strange effect as if they were jumping.

https://github.com/godotengine/godot/assets/57621742/7ad15c65-f49b-4dcf-8863-99c3f8b1cff6

https://github.com/godotengine/godot/assets/57621742/9dce7a20-df95-4f14-b121-c2c93e6c2af2

### Steps to reproduce

1. Create a 3d scene.
2. Add some random objects.
3. Add a camera.
4. Add a DirectionalLight3D with the following script:

```gdscript
class_name Sun extends DirectionalLight3D

@export var speed: float = 0.01

func _process(delta) -> void:
rotate_x(speed * delta)
```

### Minimal reproduction project (MRP)

[mrp.zip](https://github.com/godotengine/godot/files/14855450/mrp.zip)

Contributor guide

Open the contributing guide

Research direction

Open the attached mrp.zip project and reproduce the shadow movement using the DirectionalLight3D script while rotating it on the X axis. Compare the behavior on Vulkan Forward+ with the reported Godot versions; done means identifying and addressing the jumping-shadow behavior without breaking the day/night rotation scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.