Maximum color output

Started by
0 comments, last by Vanderry 9 years ago

Hello!

I'm attempting to create a classic RTS fog of war effect by rendering a number of circle gradients into a texture. It would appear black where there is no vision, white where there is an observer and an in between value for areas that have been explored and then left. The individual color channels could be used to store different stage values.

My first thought was to sample the texture in the shader, to make sure that the max(newColor, oldColor) is stored, but I have since learned that this is not supported by GLSL. OpenGL ES 2.0 doesn't seem to support glBlendEquation with GL_MAX. Might there be some other way that wouldn't require a second texture?

- David

Advertisement

I'm starting to think perhaps rendering 3D hemispheres/cones with depth test enabled might be a better solution.

This topic is closed to new replies.

Advertisement