Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前我正在开发我的游戏,我被灯光和阴影困住了。我想出了如何只用 1 个光源制作阴影,但是如果你有更多光源怎么做呢?如何通过 OpenGL 8 光源限制?
我正在使用 C++、OpenGL 和 SDL。
这两个视频正是我想要的。
我的建议是跳过所有关于固定功能管道的教程,直接进入 GL3.3+ 时代:有关一些教程,请参见: https ://github.com/McNopper/OpenGL。
无论如何,如果您正在谈论阴影映射,那么您可以决定一个对象可以支持多少灯(即使是基于每个对象)并在您的着色器中: