View Full Version : Buffers (color, depth, accumilation, stencil)
12-11-2003, 02:22 PM
i was wondering if someone could explain a basic non technical explanation of these buffers, as layman as possible, i am reading through the red book and was introduced to these early in the book, i tried skipping ahead but their is a lot of overhead to explain, i was just wondering what each was responsible for, thanks for any info you are willing to share.
12-11-2003, 04:40 PM
I can do that.
For EACH pixel of the GL window, these buffer store :
color : actually visible data for the humain eye, separated in 3 components (red,green,blue). can be of various precision(eg, 16bits, 24bits). The alpha may also fall in this buffer : its an extra data channel (8bits) to store transparency information. 1.0 means opaque , 0.0 totally invisible.
depth : store z distance from the near clipping plane (not exactly euclidian distance).
If you do 'glEnable(GL_DEPTH_TEST );', a distant mountain will never be drawn in front of a close tree.
stencil : with the stencil you can mark certain pixels, and subsequent renderings with only affect marked pixels.
Useful for doing mirror tricks : draw the scene, mark the mirror's pixels, and draw the reverted scene at the correct place. It is used too for "volume shadows" as in Doom3.
accumulation : never messed much with that one. Not much supported by hardware, apart from last radeons. Basicaly, it allows to 'accumulate' several renderings for motionblur, depth-of-blur, etc.
Hope it is not too technical, nor too simple.
[This message has been edited by ZbuffeR (edited 12-11-2003).]
12-12-2003, 07:24 AM
that's a perfect explanation for me, thanks for your time!
01-16-2004, 11:59 PM
But now im curious of the uses of the accumulation buffer... =)
motionblur i know what is. But what is depth-blur that you mention?
have a EXE or code to see in pratice?
01-17-2004, 08:03 AM
try finding an online version of the opengl super bible, it has a good explanation of the accum buffer, but it is advanced topic so you may have jump around on your reading to really understand it
try www.gametutorials.com (http://www.gametutorials.com)
they both have a lot of opengl tutorials from beginner to advance in the form of code, nehe site explains a lot more, but gametutorials has better code imo.
01-17-2004, 08:44 AM
I assume from depth-blur he means a depth of field style effect. Our eye can only focus on near things or far things, not both, but on a computer screen everything is equally well focused regardless of depth, a depth of field blur would address this
01-18-2004, 01:15 AM
I assume from depth-blur he means a depth of field style effect.
Yeah, you are right chowe6685, sorry, I made a mistake, I really meant depth of field (DOF).
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.