Не работают тени PointLight в ursina python!
Столкнулся с такой проблемой что если я создаю DirectionalLight
то тени появляются но если я использую PointLight
или AmbientLight
то теней нету.
Вот код:
from ursina import *
from ursina.shaders import lit_with_shadows_shader
from ursina.prefabs.first_person_controller import FirstPersonController
app = Ursina()
ground = Entity(model = 'plane', texture = 'carpet.jpg', collider = 'mesh', scale = (100, 1, 100), texture_scale=(32,32), shader=lit_with_shadows_shader)
cube = Entity(model = 'cube', color = color.green, y = 0.5, shader=lit_with_shadows_shader)
player = FirstPersonController()
player.fall_after = .3
player.gravity = 0.6
camera.fov = 100
#DirectionalLight(y=5, z=3, shadows=True, rotation=(45, -45, 45), color = color.rgba(100, 100, 100, 0.9))
PointLight(position= (0, 5, 0), color = color.rgba(100, 2, 100, 0.1), shadows = True)
#AmbientLight(color = color.rgba(100, 100, 100, 0.1))
Sky(texture = 'sky.jpg')
def update():
cube.rotation_x = cube.rotation_x - time.dt * 100
cube.z = cube.z - time.dt
app.run()
Источник: Stack Overflow на русском