Gravity Games
Newbie
Hello, I've been having yet another OpenGLES problem. This time I'm having trouble with additive blending for my lighting. For whatever reason, on one of my testing devices, the blending doesn't work at all (shows the original color), and on the other, the blending works incorrectly (the first color is replaced completely by the second).
Here's the relevant blending code:
If need be, I can tell you about/post code of the relevant shaders as well.
Here's the relevant blending code:
Code:
object.render(shader);
GLES20.glEnable(GLES20.GL_BLEND);
GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE);
GLES20.glDepthMask(false);
GLES20.glDepthFunc(GLES20.GL_EQUAL);
if(lights.size() > 0){
for(BaseLight light : lights){
object.render(light.getShader());
}
}
GLES20.glDepthFunc(GLES20.GL_LESS);
GLES20.glDepthMask(true);
GLES20.glDisable(GLES20.GL_BLEND);
If need be, I can tell you about/post code of the relevant shaders as well.