Hiya everyone
I've just tried to get my first basic phong shader running in XNA. It's identical to the example in Tutorial 1, except I've added two more lights to the scene as I'd like to mimic XNA's BasicEffect.
I'm getting the following error during compile:
Here's the lines throwing the error:Code:error X3017: 'Light_directional_main': cannot implicitly convert from 'float4' to 'struct{13}'
And here's the method it's referencing:Code:float4 msl_Light_directional_1_result; float4 msl_Light_directional_1_light_shadow; Light_directional_main(msl_Light_directional_1_color, msl_Light_directional_1_intensity, msl_Light_directional_1_result, msl_Light_directional_1_light_shadow);
I'm only just beginning to get my head around HLSL and I'm not sure what Struct{13} is yet. Can anyone help explain or fix this?Code:void Light_directional_main( inout State state, float4 msl_color, float msl_intensity, out float4 msl_result, out float4 msl_light_shadow) { { msl_result = (msl_color * msl_intensity); msl_light_shadow = (float4(1,1,1,1)); } }


Reply With Quote