Jump to content
  • Advertisement
Sign in to follow this  
Vanderry

OpenGL Maximum color output

This topic is 1273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement

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

Edited by Vanderry

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!