I'm pretty sure it's possible but i have no idea how.

Could anyone tell me how to make a custom semantic for a pixel shader.


  • \$\begingroup\$ do you need single value (same for all pixels) or do you need value per vertex? \$\endgroup\$
    – Notabene
    Commented Jun 6, 2011 at 12:24
  • \$\begingroup\$ Each vertex has a value set for it, just a texture index (basically it is which texture should be used on that vertex) and then each pixel needs its color set depending on the texture index. So yeah i just need an integer passed through the vertexshader and into the pixel shader... \$\endgroup\$
    – Joel
    Commented Jun 6, 2011 at 13:38
  • \$\begingroup\$ gamedev.stackexchange.com/questions/70821/… \$\endgroup\$
    – GeneralGDA
    Commented Feb 2, 2015 at 16:18

1 Answer 1


Typically, you just use TEXCOORD for any data that DX doesn't understand.


This page suggests that the system doesn't give a crap, effectively, what semantics you give to your pixel shader inputs.

  • \$\begingroup\$ What if i just need an integer? I don't really need a multidimensional float. \$\endgroup\$
    – Joel
    Commented Jun 6, 2011 at 12:18
  • \$\begingroup\$ @Randomman: I'm pretty sure that you can give any input value TEXCOORD. semantics. \$\endgroup\$
    – DeadMG
    Commented Jun 6, 2011 at 12:34
  • \$\begingroup\$ Yep k i got it :D ill just use it as a Vertex2D using the x value, because i have a feeling i will change it to need two values later anyway. \$\endgroup\$
    – Joel
    Commented Jun 6, 2011 at 13:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .