gpt4 book ai didi

python - Ursina Python 引擎 : Lighting, 阴影和光晕效果

转载 作者:行者123 更新时间:2023-12-05 09:03:16 25 4
gpt4 key购买 nike

我是 Ursana 引擎的新手,而且我不太了解它。但我可以在其中制作游戏。但问题是我的游戏没有任何 。所以我的游戏看起来已经死了。

在 Ursana Engine 中使用 有什么方法可以让我的游戏看起来不错吗?

最佳答案

您必须从 ursina 导入着色器,然后应用定向光。

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()

关于python - Ursina Python 引擎 : Lighting, 阴影和光晕效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70139918/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com