Search code examples
pythongame-engineshadowursinabloom

Ursina Python Engine: Lighting, Shadows And Bloom Effects


I Am New To Ursana Engine And I Don't Know It Properly. But I Can Make Games In It. But The Problem Is That My Game Doesn't Have Any <Shadows, Glow, Lighting or Bloom>. So My Game Looks Dead.

Is There Any Way To Make My Game Look Good Using <Shadows, Glow, Lighting and Bloom> In Ursana Engine?


Solution

  • You have to import shaders from ursina and then apply directional light.

    from ursina import *
    from ursina.shaders import lit_with_shadows_shader 
    
    app = Ursina()
    EditorCamera()
    Entity(model='plane', scale=10, color=color.gray, 
    shader=lit_with_shadows_shader)
    Entity(model='cube', y=1, shader=lit_with_shadows_shader)
    pivot = Entity()
    DirectionalLight(parent=pivot, y=2, z=3, shadows=True, rotation=(45, -45, 45))
    
    app.run()