Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Corrupt VS -> PS interpolants


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 eppo   Crossbones+   -  Reputation: 2629

Like
0Likes
Like

Posted 29 October 2012 - 01:04 PM

Hi,

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


Posted Image

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?

Sponsor:

#2 Hodgman   Moderators   -  Reputation: 31939

Like
1Likes
Like

Posted 29 October 2012 - 08:27 PM

Are you also using MSAA? If so, it could be because of non-centroid interpolation.

#3 eppo   Crossbones+   -  Reputation: 2629

Like
1Likes
Like

Posted 30 October 2012 - 04:52 AM

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?

#4 Hodgman   Moderators   -  Reputation: 31939

Like
0Likes
Like

Posted 30 October 2012 - 05:21 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS