Quote:Original post by Hodgmanis there any public c++ sdk for xbox 360 (link link link) or are you talking about some nda stuff?
...in C++ we have to manually enable hi-stencil testing ...
texkill is disabling Early Stencil in the Xbox 360?
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.
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
Popular Topics
Advertisement