Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm using hardware shadow mapping on JOGL based on the demo(HardwareShadowMapping) supplied by the distribution. After generating the shadow texture from lights point of view, I apply it to my scene with no problems.

What I'm looking for is soft shadows instead of pitch black shadows. Is there any way that I can change the alpha values while applying the shadow/depth texture? Btw I'm not an expert on OpenGL especially about custom shaders and I don't want to spend more time on understanding and developing custom shaders instead of the game.

Here's a screenshot of the application in case you come up with another solution to what I'm trying to achieve. The game is actually a hack&slash RTS hybrid.Here's the pseudo code of the gl event listener attached to shadow pbuffer.

  gl.glPolygonOffset(polygonOffsetFactor, polygonOffsetUnits);
  //render shadow casting geometry
  gl.glBindTexture(GL.GL_TEXTURE_2D, lightViewTextureID);
  gl.glCopyTexSubImage2D(GL.GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
  //I sense here a way of updating alpha values of this texture

Engine Application Sample

share|improve this question
Hi, still need help? – elect Aug 13 at 11:59
Not particularly after this long but an answer would be good for others looking for help – Gorky Aug 14 at 1:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.