SGI VGX Texturing
Bob Drebin
rad at home.asd.sgi.com
Fri Mar 1 04:29:15 AEST 1991
You have to be careful when using scrsubdivide(). As noted in the man page:
When the screen size of subdivided polygons is limited, either by minsize
or by maxsize, adjacent polygons can subdivide differently such that
newly created vertices on their shared boundary do not coincide. In this
case, some pixels at their shared boundary may not be scan converted by
either polygon.
I can suggest two solutions:
1) Only use maxz to control subdivision. Disable minsize and maxsize
by setting them to zero. This will prevent T-verticies from being
generated, which cause the pixel dropouts.
2) Use anti-aliased lines. Draw your scene using your current scrsubdivide
parameters, then redraw the outlines of troublesome polygons using
anti-aliased lines.
For example:
/* draw the scene */
zbuffer(TRUE);
blendfunction(BF_ONE,BF_ZERO);
scrsubdivide(SS_ON,myparms);
draw_terrain();
scrsubdivide(SS_OFF,myparms);
draw_nontextured_stuff();
/* redraw outlines of textured polys */
blendfunction(BF_SA,BF_MSA);
polymode(PYM_LINE);
linesmooth(SML_ON);
scrsubdivide(SS_ON,myparms);
draw_terrain();
Hope this helps.
Bob Drebin, SGI
P.S.: The function polysmooth does not work with textured polygons. This
is noted in its man page.
More information about the Comp.sys.sgi
mailing list