Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
do you need single value (same for all pixels) or do you need value per vertex? – Notabene Jun 6 '11 at 12:24
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... – Randomman159 Jun 6 '11 at 13:38
up vote 5 down vote accepted

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.

share|improve this answer
What if i just need an integer? I don't really need a multidimensional float. – Randomman159 Jun 6 '11 at 12:18
@Randomman: I'm pretty sure that you can give any input value TEXCOORD. semantics. – DeadMG Jun 6 '11 at 12:34
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. – Randomman159 Jun 6 '11 at 13:39
Marked as answer thanks again – Randomman159 Jun 6 '11 at 13:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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