简体   繁体   中英

How to implement shadow for multiple pointLights in OpenGL ES 3.0 without using Geometry shader?

I am trying to implement shadows for multiple point lights in my scene. I was going throughthis tutorial, but in this they have used a cubemap and geometry shader to store the depth values of fragments.

I am using emscripten and in their documentation they have said they support only OpenGL ES 3.0 and OpenGL ES 3.0 doesn't support geometry shaders, geometry shaders are supported from OpenGL ES 3.2. So is there any other way to implement shadows for multiple pointLights without using geometry shader.

As already documented in that page:

Normally we'd attach a single face of a cubemap texture to the framebuffer object and render the scene 6 times, each time switching the depth buffer target of the framebuffer to a different cubemap face.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM