Aug 31, 2014 at 6:34 PM
Edited Aug 31, 2014 at 6:44 PM
IEffectLights is intended to set up the light's parameters. SpecularPower is actually a property of the material, not the lights themselves. So you can set the light specular color via SetLightSpecularColor, but you'd control the specular power as part
of setting up the effect's material settings.
What you want here seems to be an IEffectMaterial interface which would implement the following methods
void SetDiffuseColor(FXMVECTOR value);
void SetEmissiveColor(FXMVECTOR value);
void SetSpecularColor(FXMVECTOR value);
void SetSpecularPower(float value);
void SetAlpha(float value);
It would really only make sense to use the interface for BasicEffect, SkinnedEffect, and DGSLEffect.
It's not in the original design due the assumption you would be setting material properties at the point you created the effect and you know the effect type, but in practice you may have to deal with some scenarios where you have either a BasicEffect or a SkinnedEffect
(or DGSLEffect if you are mixing DGSLEffectFactory and EffectFactory in the same app) such as fixing up a loaded model.
This is a little divergent from the original intent of the interfaces. You usually define the material at effect creation time, and then you have to provide the view matrices, the lights setup, fog settings, and skinning matrices when you go to render each
object. That's why we have these four interfaces in the first place to avoid the need to write special-path rendering code for every effect type.
If that's what you want, please up-vote the work item.