Brad Grantham wrote:
> 
> > 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.  I'd like to do this right, though, so that it can be a standard part of
> > the distribution.  Granted, it won't fit into the standard OpenGL architecture,
> > but I think it would be worth having =).
> 
> Actually, a form of it does.  See below.
> 
> >       Anyway, here's my plans.  Please let me know if anything is off so I
> > can do this right the first time:
> >
> >       o Define GL_PHONG in gl.h as 0x1D02.  Currently unused, immediately
> >               precedes GL_SMOOTH.
> 
> 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. :)
> 
> Fragment lighting adds another set of lights which work on the
> fragment (i.e. pixel) level and have slightly different semantics.
> This is presumably better suited for hardware implementations.  (I
> understand you may want to short-circuit this to get to helping your
> program.)


You should check out the spec for EXT_frament_lighting at
http://reality.sgi.com/ljp_engr/registry/EXT/fragment_lighting.txt

There's some IP/patent issues to consider.

Code-wise, the main things you'll need are normal vector and
eye-coordinate interpolation across triangles.  Eye coordinate
interpolation might be kind of complicated with respect to
perspective projection.  I'd have to carefully read the spec
to know how precise these interpolations must be.

-Brian


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

Reply via email to