[英]OpenGL C++ SDL 2D Shadows
Currently I'm working on my game, I'm stuck with lights and shadows. 目前,我正在开发游戏,但我仍然迷恋灯光和阴影。 I figured out how to make shadows with only 1 light source, but how to do it if you have more light sources?
我想出了如何仅用1个光源制作阴影,但是如果您有更多光源,该怎么办呢? How to pass OpenGL 8 light sources limit?
如何通过OpenGL 8光源限制?
I'm working with C++, OpenGL and SDL. 我正在使用C ++,OpenGL和SDL。
My suggestion is to skip all the tutorials about fixed function pipeline and go straight to the GL3.3+ era: see: https://github.com/McNopper/OpenGL for some tutorials. 我的建议是跳过所有有关固定功能管道的教程,直接进入GL3.3 +时代:有关某些教程,请参见: https : //github.com/McNopper/OpenGL 。
Anyway, if you are talking about shadow-mapping, then you decide how many lights an object can support (even on a per-object basis) and in your shader : 无论如何,如果您谈论的是阴影贴图,那么您就可以决定一个对象可以在着色器中支持多少个灯光(即使是基于每个对象):
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.