Page 1 of 1

C-buffer

PostPosted: Sep 17, 2003 @ 3:21pm
by MirekCz forgot his pass..
Ok I have read a lot about it and.. looks nice

So I draw my world front to back and use c-buffer for z-buffering and clipping polygons to what's already drawn.. so I end up with no overdraw, quite fast rendering engine... but...
What to do with semi-transparent polygons? How do I put them into this scheme? It seems pretty much impossible for me to do it without losing the advantage c-buffer gives me...?:(
Any clues how to solve it? or maybe c-buffer is a no-no if you put alpha-blended polygons on screen?

Thanks for hints.

PostPosted: Sep 17, 2003 @ 3:39pm
by refractor
Thinking out loud:

How about deferring any spans that need alpha-blending to a post-processing stage? I.e. don't use them to clip spans behind them but flag a span as being "blended" - just shove them into a stack somewhere and deal with them after everything else has been plotted.

Because you're using the stack, the alpha pixels the furthest away will be processed first, which should give the desired result?

PostPosted: Sep 17, 2003 @ 4:19pm
by Dan East

PostPosted: Sep 17, 2003 @ 10:06pm
by MirekCz forgot his pass..
thnx for this help, looks pretty fine... althrought slow with larger amouns of transparent polygons...

PS.Dan, did you look at IE5.0 CODE problems already? thanks...

PostPosted: Sep 17, 2003 @ 10:16pm
by Dan East
Not yet. I need to upload a test version to dexplor.com and see if that works. If it does then the problem is in the code wrapper and not the syntactic coloring.

Dan East

PostPosted: Sep 18, 2003 @ 3:20pm
by Phantom
If you want full z-buffer emulation, use an s-buffer. Paul Nettle has a document on it somewhere (the s-buffer faq). Inserting spans is more expensive, but you don't have to pass them sorted to the buffer. This also means you draw the contents of the buffer once you have fed it all the spans.

BTW, completely off-topic, I just ordered a brand new 1915. My 3630 has a stuck key (cola rust), dust under the screen, the stylus doesn't stay in it's spot, the adapter is broken so I use a (too light) replacement adapter, the battery works for 30 minutes or so AND my new laptop does not have a parallel connector so I could use IR only. :) Does anyone know how much a collectors item like this device is worth on eBay? ;)

PostPosted: Sep 18, 2003 @ 7:21pm
by MirekCz forgot his pass..

PostPosted: Sep 18, 2003 @ 7:33pm
by Dan East

PostPosted: Sep 19, 2003 @ 12:46pm
by refractor
Mirez, download the "Games programming black book" by Michael Abrash - it was released as freeware in PDF format (or look for his other Quake related DDJ articles). That explains the process he went through implementing the Quake engine.

I think that the main "issue" he dealt with was that the polygons in the scene must be abutting (i.e. they must not interpenetrate).

If you can't find the pdfs online, give me a yell and I'll dig out and mail you the relevant chapters.

PostPosted: Sep 19, 2003 @ 1:48pm
by Dan East