Is there a certain order structure members must be in HLSL in order to be accessed properly by the XNA framework?
If I have:
struct Light
{
float4 position;
float4 color;
float3 direction;
float range;
float falloff;
};
Light light;
and then in code I have:
EffectParameter lightParameter = effect.Parameters["light"];
EffectParameter colorParameter = lightParameter.StructureMembers["color"]
Setting the value of the colorParameter doesn't properly set the color parameter. e.g. if I set a cyanish color, I get a reddish color. And I get different results when I move the structure members around. It's almost like the values I'm setting are bleeding into adjacent parameters or aren't "aligned" properly.