Interpolating Colors in Lighting Mode?

Mark VandeWettering markv at gauss.Princeton.EDU
Sat Nov 3 06:40:21 AEST 1990


Is there any way to make the SGI interpolate colors AND perform shading
calculations at the same time?  For instance, if I am drawing triangles
and wish to interpolate the colors, I do something like:

	lmcolor(LMC_DIFFUSE) ;

	....

	bgnpolygon() ;
		n3f(normal) ;		/* some normal for the poly	*/
		c3f(c1) ;		/* a color + vertex */
		v3f(v1) ;
		c3f(c2) ;		/* a color + vertex */
		v3f(v2) ;
		c3f(c3) ;		/* a color + vertex */
		v3f(v3) ;
	endpolygon() ;

But the resulting triangle, while shaded, only has a single flat color.

Any ideas?

mark (markv at acm.princeton.edu)
Mark VandeWettering
markv at acm.princeton.edu



More information about the Comp.sys.sgi mailing list