Sign in to follow this  
Aqua Costa

[DirectX 10] Shader per sample instead of per sample

Recommended Posts

Aqua Costa    3692
How can I run my pixel shader per sample instead of per pixel? Im read somewhere that it was done in STALKER... They read a sample from a specific sample of MSAA pixel and write to a specific sample as well. I just dont want how it was done, I guess they used stencilling but I never used stenciling...

P.S. I was reading a text about steciling and they use values like 0xffffffff? what king of values is this?

Share this post


Link to post
Share on other sites
MJP    19786
On 10.1 and 11-level devices it happens automatically when you take SV_SampleIndex as an input to your pixel shader, or you mark an input with the "sample" interpolation attribute.

I suppose on a 10-level device you could do it like people have done for a stencil-routed K-Buffer. There's an article about that in ShaderX6, and Humus also has a sample on his website.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this