texkill is disabling Early Stencil in the Xbox 360?

Started by
12 comments, last by Beholder 13 years, 9 months ago
Quote:Original post by Hodgman
...in C++ we have to manually enable hi-stencil testing ...
is there any public c++ sdk for xbox 360 (link link link) or are you talking about some nda stuff?

Advertisement
The only public SDKs are homebrew stuff, which isn't very useful.
It's a shame, really. It would be great to have the real SDK for experimenting performance-critical stuff.
Have you tried 'reloading' the hi-stencil? You can do this by drawing a fullscreen quad using the current stencil buffer as a test. I'm not as familiar with XNA so I can't guarantee this is possible with what you're doing, but it would theoretically work a little something like this:

1. Draw your stencil-loading pass, using texkill. Hi-Z/Hi-Stencil will be disabled, but we'll get to that.

2. Draw a simple fullscreen quad, testing against current stencil but also writing to current stencil. Setup your stencil test/write to update each pixel with the exact same value that's currently in that pixel (note: this will only work if your stencil values are boolean - i.e. in a pass/fail state, but it shouldn't be a problem because hi-stencil requires this as well). This can be a super-fast pass that does even need a pixel shader. Since you aren't doing any pixel shader work, Hi-Stencil writes should be available.

3. Continue drawing, testing against an accurate Hi-Stencil.

This topic is closed to new replies.

Advertisement