Original Post
Hi Guys,
I've got a mesh that has two DWORDS as vertex data.
The second DWORD isn't relevant here (it's just a color, don't have a problem with that)
The first DWORD is a UBYTE4.
The first 3 Bytes of the DWORD are the x y z positions and the forth one is a special ID.
This ID is supposed to decide a few properties of the vertex.
For example the color.
So I have a uniform extern float4 gCoverColors[256] declared and filled.
Now the part where the stuff go wrong:
When I run this, I don't get any output.
But when I manually put gCoverColors[0] for example, It works correctly.
What is the problem and how can I fix it? I'm using VS 2.0
I've also tried to replace posL.w with values like posL.x and some others (from the second DWORD) and none workes although I know for sure that posL.x for example does have a valid value (since it is also being used for the position, which works just fine)
Thanks in advance,
Tigran
I've got a mesh that has two DWORDS as vertex data.
The second DWORD isn't relevant here (it's just a color, don't have a problem with that)
The first DWORD is a UBYTE4.
The first 3 Bytes of the DWORD are the x y z positions and the forth one is a special ID.
This ID is supposed to decide a few properties of the vertex.
For example the color.
So I have a uniform extern float4 gCoverColors[256] declared and filled.
Now the part where the stuff go wrong:
OutputVS CubeVS(float4 posL : POSITION0, float4 LightColor : COLOR0){ OutputVS outVS = (OutputVS)0; outVS.color = gCoverColors[posL.w]; // Also tried floor(posL.w), posL.a, posL[3] ... return outVS;}When I run this, I don't get any output.
But when I manually put gCoverColors[0] for example, It works correctly.
What is the problem and how can I fix it? I'm using VS 2.0
I've also tried to replace posL.w with values like posL.x and some others (from the second DWORD) and none workes although I know for sure that posL.x for example does have a valid value (since it is also being used for the position, which works just fine)
Thanks in advance,
Tigran