HLSL If Statement

Started by
13 comments, last by DJTN 12 years, 1 month ago
SM3 is guaranteed to give you eight general float4 interpolators (TEXCOORD0-7) and two colour interpolators (COLOR0/1) that may have 8 bit precision.
That requirement is defined by the D3D software.
Advertisement

SM3 is guaranteed to give you eight general float4 interpolators (TEXCOORD0-7) and two colour interpolators (COLOR0/1) that may have 8 bit precision.
That requirement is defined by the D3D software.


Hmmm - I was working off this page: http://msdn.microsoft.com/en-us/library/windows/desktop/bb172920%28v=vs.85%29.aspx which seems to contradict your links a little.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

until you write what the compiler says this looks more like a tv quiz show than a thread to help.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

ERROR: Invalid register number: 10. Max allowed for v# register is 9. Compilation failed

-Which is what I suspected after mhagain's comment and realizing that nothing changed in this working shader except the addition of a TEXCOORD in my VS output struc.

Thanks to mhagain for pointing me in the right direction and MJP, sorry it took so long to post the error as I had an issue that took priority yesterday afternoon.


For anyone else that finds this thread, you can only have 10 input slots with PS 3.0 and DX 9.

ERROR: Invalid register number: 10. Max allowed for v# register is 9. Compilation failed

-Which is what I suspected after mhagain's comment and realizing that nothing changed in this working shader except the addition of a TEXCOORD in my VS output struc.

Thanks to mhagain for pointing me in the right direction and MJP, sorry it took so long to post the error as I had an issue that took priority yesterday afternoon.


For anyone else that finds this thread, you can only have 10 input slots with PS 3.0 and DX 9.


Oh, and I should also note that my solution will be to pack 2 slots into 1 as I use 2 float2s that take up 2 slots. I will combine them into one leaving me an open slot to use for the blending data. I'll just have to clearly document and comment the shader as to what this new var consist of as well as be creative when naming the thing for future reference.

Thanks again,
DJTN

This topic is closed to new replies.

Advertisement