Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: Buffers (color, depth, accumilation, stencil)

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2003
    Posts
    29

    Buffers (color, depth, accumilation, stencil)

    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.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Buffers (color, depth, accumilation, stencil)

    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).]

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2003
    Posts
    29

    Re: Buffers (color, depth, accumilation, stencil)

    that's a perfect explanation for me, thanks for your time!

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Belo Horizonte, MG, Brazil
    Posts
    2

    Re: Buffers (color, depth, accumilation, stencil)

    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?
    thanks!

  5. #5
    Junior Member Newbie
    Join Date
    Dec 2003
    Posts
    29

    Re: Buffers (color, depth, accumilation, stencil)

    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
    try nehe.gamedev.net
    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.

  6. #6
    Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    391

    Re: Buffers (color, depth, accumilation, stencil)

    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

  7. #7
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Buffers (color, depth, accumilation, stencil)

    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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •