1 Reply Latest reply on May 6, 2011 12:01 AM by frali

    OpenGL line smoothing corrupts triangle rendering

    kusmabite
      Driver bug

      I'm working on an OpenGL application, and I've recently encountered a problem where rendering a couple of lines with line-smoothing enabled affects other triangles in the scene in a very destructive way.

      It seems like the line-smoothing state on the lines somehow leak onto the triangles, causing the alpha output from the fragment shader to be replaced with a linear gradient from 0 -> 1 -> 0 for the triangles. If I change the line-width state, the shape of the gradient changes (seemingly sustaining at 1 for a longer period). The application does disable the line-smoothing state after the lines are drawn. Not that this should have mattered; the line-smoothing state should not affect non-line primitives anyway.

      Additionally, this problem comes and goes every couple of frames. It disappears completely if I do not enable line-smoothing for these completely unrelated lines.

      I am using Catalyst 11.1. I realize that this isn't up-to-date, but I had to down-grade because gl_FrontFacing is completely broken in 11.2 and upwards (statements like "gl_FrontFacing && !gl_FrontFacing" evaluates to true, already covered here).

      Can I expect a version in the near future where neither of these issues are present? And is there an older version where neither bugs are present that I can down-grade to without waiting?

      As an added side-bonus, I'd like to point out that all recent Catalyst drivers (and FireGL) drivers I've tested with flips the sign of the result of the dFdy-function when rendering to a Framebuffer Object. I've seen this issue reported more than two years ago, with claims from AMD that it should have been fixed. But it's still there, and you should really consider fixing it.

        • OpenGL line smoothing corrupts triangle rendering
          frali

          There are three problems reported by you.
          1. The line-smooth issue. It's hard to point out where the problem is without any codes. Did it work several months ago? Could you please try to narrow down the problem and send it to me?

          2. The gl_FrontFacing problem. It should be fixed in Cat11.5 and you have to wait for a few days.

          3. The sign of dFdy. I think it works in the driver. The sign is positive only when a render buffer is attached to the FBO. If you have the problem, please also send the program to me.

          My email address is frank.li@amd.com. Thanks for your feedback.