What is the best way to create a gradient for 2G polygon, (linear, and radial) in OpenGL?
Thanks
How can you create textures for Radial Gradient on the fly?
Linear is very easy - you set different colors such as different numbers
red ---- red | | | | | | Blue for radial texture ---- blue
may be a better option
Make empty texture to generate it on the fly and fill it with function sqrt ((MAXX - x) ^ 2 + (Maxy - Y) ^ 2), then add color to it.
Comments
Post a Comment