Is there an easy way to get shadows in OpenGL?

后端 未结 2 2047
遇见更好的自我
遇见更好的自我 2021-02-04 06:04

I recently created some landscape code and added some diffuse lighting to the scene, however, to my disappointment, there are no shadows. I looked around the web for hours looki

2条回答
  •  天命终不由人
    2021-02-04 06:38

    No.

    The easiest way I know of involves using a pregenerated shadow texture that is overlaid onto the terrain using multitexturing. The complicated part is generating this texture, but if you don't use directional lighting, a simple "big blurry dot" is usually better than nothing.

提交回复
热议问题