• Advertisement
Sign in to follow this  

Corrupt VS -> PS interpolants

This topic is 1908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I'm having this issue where artifacts show up around geometric edges (D3D10.1):


[img]http://www.dynamique.nl/pst/pixelwit.png[/img]

These blown-out pixels are caused by per-vertex occlusion values passed from a vertex shader. VS input values are all normalized values between 0.0 - 1.0. I perform no kind of processing on these values in the vertex shader, and they are used as simple multipliers in the PS, but for some reason these errors still occur. I'm writing these values out to a DXGI_FORMAT_R11G11B10_FLOAT render target, but any floating point rt shows the same symptoms.

Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Yes, I use MSAA. I've added the centroid modifier to the pixel shader inputs and this resolves the problem. Thanks.

Are there any implications (performance-wise etc.) for using this modifier?

Share this post


Link to post
Share on other sites
Not that I know of... There may be a very small extra cost, but if there is, it would likely be small - maybe just a clock cycle per pixel, etc...

This feature didn't exist in older API's, but I'm pretty sure DX10 supports it for this very reason; the 'traditional' interpolation scheme calculates values for pixel centres, but with MSAA, this position can be outside the edge of a triangle. So, the centroid option was added to allow you to state that you always want your interpolated values to be within the triangle's boundary.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement