To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 12915
12914  |  12916
Subject: 
Re: White noise around model with colored background
Newsgroups: 
lugnet.cad
Date: 
Tue, 21 Jun 2005 03:44:05 GMT
Viewed: 
1473 times
  
In lugnet.cad, Don Heyse wrote:
And I'm not sure I understand what you're saying about the linewidths.

Well, as you point out below, I was mostly wrong.  However, I suspect it will
still produce jaggies on the inside edge of the lines (but I could be wrong).
These would almost certainly go away with 2-pixel edge lines.  (These things are
very difficult to visualize.)


:^) I use glPolygonOffset to make sure the lines get drawn over the
polygons underneath.  (Plus I cheat a bit and add a bit more z to
antialiased edge lines so even skinny lines get drawn completely.)  As
far as I can tell even for skinny lines the AA partial coverage values
extend beyond the pixels used to draw the unantialiased polygons so
you do get something outside the polys even with the edge thickness
set to 1.  Think about it.  We'd have no halo if the AA pixels exactly
covered only the pixels drawn by the polygon pass.  Unless you've been
drawing the AA edge lines in the same pass as your opaque polygons.
Blech!

You're right.  But I still suspect the quality won't be as good this way as it
would be with the full blending and an opaque background.  Hard to be sure
without trying it out.


Yes, 2 passes only for the edge lines.  I see you went with the
blended ones first.  That was my thought originally before I got
sidetracked by the approach that doesn't use the stencil test.
Personally I think the stencil test is better, but I wanted to mention
both ways in case I come back here looking for a way to save on
graphics memory for skimpier hardware.

Actually, I don't think the stencil buffer uses any memory on any existing
graphics hardware.  It uses the last 8 bits of each 32-bit Z-buffer value, and
the Z-buffer only uses 24 bits.  I'm not sure any cards support full 32-bit
Z-buffer, so if you don't use it for stencil, I don't think it gets used at all.
Having said that, stencil buffers aren't required to be hardware-accelerated.
So it's at least theoretically possible to have a video card that won't have a
hardware-accelerated mode with a stencil buffer.  I suspect this doesn't happen,
though.


Anyhow, You'll probably also want to disable writing to the alpha
plane during the blended pass to preserve the 1's you wrote there
during the polygon pass.

Yeah, that would probably be a good idea.

So will there be an RC2?

I'm not sure yet.  However, I can guarantee that this feature won't be in it if
there is one.  I'm not adding any new features prior to the full 3.0 release.

--Travis



Message is in Reply To:
  Re: White noise around model with colored background
 
(...) And I'm not sure I understand what you're saying about the linewidths. :^) I use glPolygonOffset to make sure the lines get drawn over the polygons underneath. (Plus I cheat a bit and add a bit more z to antialiased edge lines so even skinny (...) (19 years ago, 20-Jun-05, to lugnet.cad)

18 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR