2MGFX Unsupported parameter class

Hi, i’ve been trying to port my shaders from XNA to Monogame 3.5, but i’m having problems with Struct type parameters.
This:
struct DLight { float3 LightDirection; float4 LightColor; float LightIntensity; bool Shadows; float4x4 LightViewProjections[4]; }; DLight DirectionalLight; // <--- The error throwing line
will not compile. (with error “Unsupported parameter class!”)

simmilar topic was answered with “its not implemented yet”, so is that still the case?
What kind of alternative data structure would you recommend than?

Yes, as far as I know, this is still the case.

Instead of creating a struct you can store the data as individual effect parameters. For example:

float3 DirectionalLightDirection;
float4 DirectionalLightColor;
float DirectionalLightIntensity;
bool DirectionalShadows; 
float4x4 DirectionalLightViewProjections[4];

If you have more than one directional light, you need to create multiple arrays of parameters instead of one array of structs.

I added an issue for this…

We will have it fixed for the 3.6 release.

Ok, thanks for the info!