On Sat, 4 Dec 1999, Keith Harrison wrote:

> 
> ----- Original Message -----
> From: Brad Grantham <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 30, 1999 6:57 AM
> Subject: Re: [Mesa-dev] Phong shading integration
> 
> 
> > > From [EMAIL PROTECTED]  Mon Nov 29 21:56:58 1999
> > > Hi everybody,
> > >
> > > I've been needing to produce non-realtime high quality output from
> > > OpenGL programs I've already written.  As a result, I'm adding Phong
> shading to
> > > Mesa.
> [SNIP]
> > You might be better off incorporating SGI's fragment lighting
> > extension into Mesa.  Go to
> > http://www.opengl.org/Documentation/Extensions.html for the spec
> > ("EXT_fragment_lighting").  Maybe contact Jon Leech at SGI
> > ([EMAIL PROTECTED]) to ask about whether SGI would care or even help.
> > (While you're at it, put in EXT_light_texture, too. :)
> [SNIP]
> 
> If you do implement Phong shading then keep in mind a couple of the most
> common speedups:
> 
> 1. Use double-step interpolation, with intermediate pixels being calculated
> from simple averaging.
> 2. The H test algorithm (Harrison et al., 1988). Basically, this test works
> out whether a polygon contains a specular highlight - if the test fails (no
> highlight) then you can use Gouraud instead.

Using the second optimisation means that you are stuck with gouraud's
linear interpolation which restricts the visual quality somewhat even for
triangles which don't contain a highlight. You also need to bear in mind
the edges of spotlight shadows when choosing whether to fall back to
gouraud.

--
Doug Rabson                             Mail:  [EMAIL PROTECTED]
Technical Director, Qube Software Ltd.  Phone: +44 171 289 4201



_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to