Cube shadow mapping

Hi, is it possible to implement cube shadow mapping in opengl (especially with GLSL).

I’ve found examples with DirectX but not with OpenGL.

Thank you.

Delle

Yes. You need EXT_gpu_shader4 or OpenGL 3.0 to use shadowCube samplers.

Thank you.

Is there any code example I can use?

Delle

The basic idea is to loop over the cubemap faces in the GS, transform the input primitive into the clip space of the face, and set gl_Layer to the appropriately configured FBO cubemap target.

Haven’t tried it myself, so that’s going to be the extent of my input.

The basic idea is to loop over the cubemap faces in the GS, transform the input primitive into the clip space of the face, and set gl_Layer to the appropriately configured FBO cubemap target.

…sound easy… :stuck_out_tongue:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.