当前位置: 动力学知识库 > 问答 > 编程问答 >

java - OpenGL shadows without shadow mapping

问题描述:

I have been struggling with point light shadow mapping in 3D with OpenGL using the LWJGL for some time, especially because it's difficult to follow ultra-specific tutorials written for other languages! However, I have been asking myself whether it would be possible to create the illusion of shadows by setting the radius of a point light to the closest distance to a fragment in a certain direction. So, basically the opposite of shadow mapping, but by using per-pixel lighting you could achieve perfect shadows. Is there a term for this kind of lighting? If not, how do I set the radius of a light in only one direction (maybe in GLSL)?

网友答案:

Point lights don't have a radius (they are just points, used for calculating the local illumination of the fragment processed)

OpenGL has no objects (i.e. models), so whatever you think this might do: It doesn't.

分享给朋友:
您可能感兴趣的文章:
随机阅读: