Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scene_lighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def __init__(self, ursina, player, sun_direction = (0.75, -1, 0.5), sun_color =
shadow_filter_radius = 3.0, shadow_filter_samples = 10.0, soft_shadows = True,
sky_texture = None, sky_color = (1.0, 1.0, 1.0, 1.5), gamma = 2.0):

super().__init__()

self.player = player
self.shadow_camera_direction_offset = (shadow_size / 2.0) * shadow_camera_direction_offset

Expand Down Expand Up @@ -110,4 +112,4 @@ def createNoiseTexture(tex_size):


def update(self):
self.shadow_cam_np.setPos(self.player.world_position + camera.forward.normalized() * self.shadow_camera_direction_offset)
self.shadow_cam_np.setPos(self.player.world_position + camera.forward.normalized() * self.shadow_camera_direction_offset)