   limit of TEXCOORD in HLSL
  Hi guys,I'm having some problems with HLSL.It happens that if I use this structure as the input of the pixel shader, it works:struct PS_INPUT{    float4 Position  : POSITION;float2 Texture   : TEXCOORD0;    float3 Light: TEXCOORD1;    float3 Normal    : TEXCOORD2;    float3 Camera    : TEXCOORD3;float3 Pos  : TEXCOORD4;};but it doesn't anymore if I exchange the position of the last two:struct PS_INPUT{    float4 Position  : POSITION;float2 Texture   : TEXCOORD0;    float3 Light: TEXCOORD1;    float3 Normal    : TEXCOORD2;    float3 Pos  : TEXCOORD3;    float3 Camera    : TEXCOORD4; };WHY !!?!?Is it a limit problem ? Something that I'm doing wrong ???thanks a lot guys!   
  Hi,There's a TEXCOORDN limit but I think it depends on device capabilities. For example, I use HD2600 Pro and I can't use TEXCOORD4, TEXCOORD5, TEXCOORD6 etc.Try using COLOR12, COLOR13 etc.   ;  What pixel shader version are you using? PS versions <= 1.3 have a limit of 4 texture samples, PS 1.4+ has 6 according to the Documentation.   ;Quote:Original post by programci_84Hi,There's a TEXCOORDN limit but I think it depends on device capabilities. For example, I use HD2600 Pro and I can't use TEXCOORD4, TEXCOORD5, TEXCOORD6 etc.Try using COLOR12, COLOR13 etc.I'm using a GeForce 6800.. it was a high-end card. I can't believe it has only four texture units. Anyway, I will try to use the COLORn that you suggested.Quote:Original post by Evil SteveWhat pixel shader version are you using? PS versions <= 1.3 have a limit of 4 texture samples, PS 1.4+ has 6 according to the Documentation.I'm loading the shaders with D3DXCompileShaderFromFile, where I specified the version "ps_2_0" and "vs_2_0". I tried to switch to the version 3 also, but nothing changed.thank you   ;  What does "works" and "doesn't work" mean?  If TEXCOORD4 can hold the data for your Position, there's absolutely no reason it would behave differently if you stored your Camera position in there.Have you used PIX to debug your shaders and actually see what's going on?   ;Quote:Original post by NiGoeaI'm using a GeForce 6800.. it was a high-end card. I can't believe it has only four texture units. Anyway, I will try to use the COLORn that you suggested.I have a GeForce 6800 too and it supports at least 6 texcoords.   ;Quote:Original post by jpventosoQuote:Original post by NiGoeaI'm using a GeForce 6800.. it was a high-end card. I can't believe it has only four texture units. Anyway, I will try to use the COLORn that you suggested.I have a GeForce 6800 too and it supports at least 6 texcoords.I have a 8600 and it supports 8 texcoords and 32 texture image units.   ;Quote:Original post by MJPWhat does "works" and "doesn't work" mean?  If TEXCOORD4 can hold the data for your Position, there's absolutely no reason it would behave differently if you stored your Camera position in there.Have you used PIX to debug your shaders and actually see what's going on?Actually, I'm not using the parameter Pos. So I don't care if it works or not, I only know that if I set the Camera to use TEXCOORD4, nothing works.[anyway, somehow, I resolved the problem. Thanks !]   