Skip to main content
GameDev.net gamedev.net
🔒 Locked

Maximum color output

Started by Vanderry Apr 2, 2015 at 7:49 AM 0 replies 2.7k views
Original Post
Vanderry
Vanderry

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

Vanderry
Vanderry

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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.