3
\$\begingroup\$

What does the hull shader attribute [patchsize(12)] do? MSDN fails to mention it. Do I have to use it? Should I use it?

\$\endgroup\$
3
  • \$\begingroup\$ I don't use it and tessellation works perfect. I will try it out however, because never heard of it. \$\endgroup\$ – János Turánszki Feb 21 '14 at 19:13
  • \$\begingroup\$ Incomplete documentation should be punishable. Really. As for tessellation - yeah, mine seems to work just fine too without it, but I'm curious what it does (or maybe did and is deprecated now?). \$\endgroup\$ – NPS Feb 21 '14 at 19:18
  • \$\begingroup\$ Well, tried it but does not make any difference to me (tried a bunch of values like 12, 0, 100, 1000). I think it might be deprecated. \$\endgroup\$ – János Turánszki Feb 21 '14 at 19:25
4
\$\begingroup\$

patchsize appears to describe the number of control points per patch, and seems to be largely ignored (as unnecessary) by the actual compiler. It's possible that at one point it was used as an optimization hint, but doesn't seem to have much practical use.

All real-world examples I can find eschew the attribute. The fact that it appears to only be referred to in the documentation here suggests that the tech writer who created that documentation was given an old bit of example code.

I'd say it's safe to ignore it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.