My effect shader contains this SAS binding for the directional light:
float4 lightDir
<
string SasBindAddress = "SAS.DIRECTIONALLIGHT[0].DIRECTION";
>;
float4 lightColor
<
string SasBindAddress = "SAS.DIRECTIONALLIGHT[0].COLOR";
>;
I'm setting up the directional light in my code like this:
sasContainer = new XSISASContainer();
sasContainer.DirectionalLights.Add(new XSISASDirectionalLight());
sasContainer.DirectionalLights[0].Color = Color.White.ToVector4();
sasContainer.DirectionalLights[0].Direction = new Vector4(Vector3.Forward, 0.0f);
When I run my application the scene is all black.
However, if I explicity bind the lightDir and lightColor effect parameters like this:
effect.Parameters["lightDir"].SetValue(sasContainer.DirectionalLights[0].Direction);
effect.Parameters["lightColor"].SetValue(sasContainer.DirectionalLights[0].Color);
Then everything works as expected. Has anyone else encountered anything similar?