View Full Version : Apply gradient over mesh of antialiased primitives

05-04-2004, 04:13 AM
I am drawing 2D geometry (line and quad strip meshes) with a gradient, by using the stencil
buffer to draw the geometry and then a quad that has the gradient. But it doesn't work with
primitive antialiasing, probably since the stencil buffer can't use the coverage bits.
Could someone point to a previous topic that addresses this issue? I tried to find such a topic
but couldn't. Or maybe a different approach would work, by using a custom blend function?
Thank you.

Christian Schüler
05-04-2004, 05:38 AM
An alternative way of drawing a color gradient would be to make an 1D-gradient texture and use texgen to address this texture based on screen coordinates.