I waited a while but no one else replied to this one, so I'll give it
a try.

On Sat, Oct 25, 2003 at 12:08:48PM +0200, Morten Hustveit wrote:
| In the Radeon driver, TCL is currently enabled by default.  However, it seems 
| like there is no guarantee that the same set of vertices will be transformed 
| equally twice, so you get Z buffer artifacts when doing multipass rendering.
| 
| I am told that the DRI developers believes this is not a bug...

The OpenGL spec offers only very limited guarantees about consistent
transformation of vertices.  See Appendix A of the spec for the details.
If the case you have in mind falls within the constraints in Appendix A,
then you've found a bug.  Otherwise, the driver is OK and the DRI
developers are correct.

Note that the vertex programming extension has a special feature to
guarantee that the output vertex coordinates are the same as those that
would be produced by the fixed-function pipeline.  The Issues section of
the ARB_vertex_program spec has a good short discussion of the
invariance problems that drivers have to handle.

| I am told that the DRI developers believes this is not a bug, because you 
| should use glPolygonOffset when doing multipass rendering.  This is wrong.  

Well, it will solve some problems, so it's a good technique to keep in
mind.  You didn't provide details about the program you're working on,
so it's hard for me to say whether polygon offset is the right approach
in your case.

|                ...  glDepthFunc(GL_EQUAL) becomes pointless with the current 
| behavior.

See Appendix A.

| This tutorial at SGI describes multipass rendering without mentioning 
| glPolygonOffset, but recommending the use of glDepthFunc(GL_EQUAL):
| 
| http://www.sgi.com/software/opengl/advanced97/notes/node67.html

Notice that it says:

        OpenGL does not guarantee pixel exactness when various modes are
        enabled or disabled. This can manifest itself in undesirable
        ways during multipass algorithms. For example, enabling texture
        coordinate generation may cause fragments with different depth
        values to be generated compared to the case when texture
        coordinate generation is not enabled.

It goes on to say how to work around the problem for the particular
multipass rendering algorithm described in that section.  But the main
point is that there is no guarantee that you'll get the same depth
values if you change any significant rendering modes.  This is just
another way of expressing the information that's in Appendix A.

Allen


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to