• Advertisement
Sign in to follow this  

[HLSL] Primitive index inside a pixel shader?

This topic is 2287 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, is it possible to know to which triangle/vertex/primitive belongs the pixel currently being computed inside a pixel shader? I think it was not possible to do this under SM2.0 but I am not aware of the latest developments.
Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
You can [font="Arial"]use the [color="#2A2A2A"]SV_PrimitiveID and [/color][color="#2A2A2A"]SV_VertexID semantics to get these infos.[/color][/font]

Share this post


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

  • Advertisement