I was wondering how to count an array in HSLS?
Say, I have an array declared in our effect file:
float2 Position[1];
And inside our source I set the parameter to something else
for instance:
Effect.Parameter["Position"].SetValue(MyVector2Array);
Under the shadering function how could I count the array? Would look similar to:
float4 PS_function(float2 tex : TEXCOORD0) : COLOR0
{ int Size = Position.Count(); }
Thanks in advance :]
The most simple way is to declare a constant that will define an array size: