JONATHAN DINERSTEIN wrote:
> 
>         As an example of the kind of rendering errors I want to get rid of,
> check out:
>         http://www.npl.com/~jon/
> 
> It is a jpeg so some amount of loss has happened, but you can still easily see
> the problem.  All I did was have GLUT draw a sphere of about 20 slices by 10
> stacks.  There is no specular or ambient, and I used the default settings for
> LIGHT0.
> 
> As you can see, except where the lighting is really bright, the seam between
> polygons is brighter than the interior of polygons.

This is called "Mach banding" and is a side effect of the way our eyes
perceive intensity changes.


> So, even when doing no
> specular, there's still some rather poor rendering.  I never got this kind of
> error in my own Gouraud engine, so my guess is that this is caused primarily by
> using fixed point math.  Am I wrong here???

The use of fixed point math in itself shouldn't be a problem.  But
one thing that occurs to me is this:  after Mesa computes vertex
colors from the lighting parameters, the color values are stored
as GLubytes.  Perhaps we should store fixed-point values instead
so that the fractional bits aren't lost before rasterization.

I'm not sure this will really help with the Mach banding though.


> If it helps at all, I uploaded my source file (VERY brief).  Also, I got
> virtually identical results between OpenGL under Windows and Mesa on my Linux
> box.

Thanks.  I don't think I'll have any time to investigate this
for a while though.

-Brian


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

Reply via email to