Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Nvidia, stencil buffers and 16bpp

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Germany
    Posts
    6

    Nvidia, stencil buffers and 16bpp

    I'm sure everybody knows this problem:
    Using stencil buffering on a TNT2 (for example) in 16bit colors gives you way slower fps than in 32bit color mode.
    From what I've read so far, I learned that in 16bpp there is no room for a stencil buffer (Nvidia), so it has to be emulated (read in some posts here).
    My question now is:
    is only the stencil buffer software or does the whole rendering process switch back to software emulation (no hardware acceleration)

    Any Nvidia-Developers here who could enlight me?

  2. #2
    Intern Contributor
    Join Date
    May 2001
    Posts
    58

    Re: Nvidia, stencil buffers and 16bpp

    Simply do *not* use stencil in 16bit depth-buffer mode on current NV chips. None of the 16bit depth buffers support stencil in HW, and as you've seen, frame-rate will be horribly software driven. If you Enum-All-Pixel-Formats, you may find a 24-8 DepthStencil buffer on a 16 Color screen, but most of the NV chips i have don't seem to offer this under OpenGL(Riva128, TNT1, GF1, GF2Go).

    However, GF3 does support the 24-8 DepthStencil with 16 bit Color (565). However, i strongly suspect that this is a driver issue as only my GF3 has the latest.

    What may be best in your situation is to always test your frame rate for an acceptable minimum speed, and if you can't achieve that over a reasonable time-measurement, then try a different pixel format.

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Germany
    Posts
    6

    Re: Nvidia, stencil buffers and 16bpp

    Thanx for your quick answer, but this wasn't exactly what I wanted to know!
    My question is:
    Is there a way to emulate a stencil buffer in software without doing the whole rendering in software (all but the stencil hardware accelerated)?

    I know, in 32bpp it is all hardware, but what happens in 16bpp when you use stencil buffering?

  4. #4
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: Nvidia, stencil buffers and 16bpp

    >>Is there a way to emulate a stencil buffer in software without doing the whole rendering in software (all but the stencil hardware accelerated)?<<

    thats what it actually does
    perhaps youre thinking that if u use the stencil buffer then everything will be done in software eg texturemapping etc but no they will still be done in hardware the stencil though will be done in software

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Germany
    Posts
    6

    Re: Nvidia, stencil buffers and 16bpp

    Thanx, that was exactly what I wanted to know!

  6. #6
    Junior Member Newbie
    Join Date
    Jan 2002
    Posts
    22

    Re: Nvidia, stencil buffers and 16bpp

    >>Is there a way to emulate a stencil buffer in software without doing the whole rendering in software (all but the stencil hardware accelerated)?<<

    thats what it actually does
    perhaps youre thinking that if u use the stencil buffer then everything will be done in software eg texturemapping etc but no they will still be done in hardware the stencil though will be done in software
    Are you sure about that ? We run some tests of our current title on a range of nVidia cards a few weeks ago. GeForce3 seemed to perform fine in 16 bit colour depth, but the other didn't.

    Performance drop was enormeous, so I suspect it was a full software fallback. I never heard of this special mode, where stencil is done in software. How do I activate it ? Is it restricted to certain cards, and how does it fit into the invariance of the OpenGL pipe ? It certainly sounds interesting, if it can speed up stenciling on those modes.

    Thanks !

    - Alex

  7. #7
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,444

    Re: Nvidia, stencil buffers and 16bpp

    Is there any reason to use 16bit framebuffer anymore?

  8. #8
    Junior Member Newbie
    Join Date
    Jan 2002
    Posts
    22

    Re: Nvidia, stencil buffers and 16bpp

    > Is there any reason to use 16bit framebuffer anymore?

    Some customers want that option, no matter what.

    - Alex

  9. #9
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Germany
    Posts
    6

    Re: Nvidia, stencil buffers and 16bpp

    Ironically the Geforce3 is the first Nvidia chip that supports stenciling in hardware while being in 16bpp mode. But with the fastest chip on market you don't really need 16bpp anymore...

    About the complete software fallback:
    Yes, it gets extremely slow, but where I saw it, it was way to fast for pure software IMHO

    Anyone who developed these chips here to enlight us?

  10. #10
    Senior Member OpenGL Pro
    Join Date
    Feb 2000
    Location
    France
    Posts
    1,118

    Re: Nvidia, stencil buffers and 16bpp

    It doesn't make any sense to have a mode where everything is hardware accelerated but the stencil buffer...

    I would say such a mode does not exist but I'd be happy if Matt or Cass can confirm that...

    Regards.

    Eric

Posting Permissions

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