Here ar two unrelated questions:
I’m drawing a regular grid of per pixel lighted quads (just dot3) that to the user appear to always be in the x-y plane. In reality I use an ortho3d and glVertex3f calls with a computed Z value at each quad vertices that is just meaningful to transform the 3d vertex into 2d screen coordinates . I have no use of the interpolated z value at all. However i really need to store specific Z value for each texel of the quad that are not related to the orignal Z of the glVertex call. This could be 1’s for a zone of the quad, 2’s for another zone and so on.
I’ve not figured how to do this because my vertices are in 3d with already a Z. In 2d it is
quite easy : use multiple passes using the alpha test for each zone for example. Is there a
way to write to the zbuffer without using glVertex3f or a vertex program (I can’t use that) ? For now I’m using the stencil buffer as a pseudo zbuffer.
I’m drawing concave polygons tesselated with glu tesselator and when enabling GL_POLYGON_SMOOTH I
have the well known problem of artefacts at the edges of the concave polygon due to blending. I
tried the method described in the red book using GL_SRC_ALPHA_SATURATE but couldn’t make it
work. Anybody had it to work ? is it not too slow with a few complex concave polys ? Is there
a better solution ? I can’t use FSAA, which works great