Original Post
It seems to me as if the fixed-function parameters (such as light direction) get baked when you first load the effect, whereas the same parameter for shaders gets updated correctly.
If I have
float3 CamPos : CAMPOS = { 0, 0, 0 };
technique t0 {
pass p0 {
LightPosition[0] = (CamPos);
...
VertexShader = NULL;
}
}
technique t1 {
pass p0 {
VertexShader = compile vs_1_1 VS();
}
}
and VS() references CamPos, then the t1 technique will do the right thing as I update the CAMPOS semantic, but the t0 will "bake" the light position at whatever the camera position was when I started.
What is the appropriate fix for this? Could I tag the LightPosition[0] argument using : CAMPOS semantic? Is this a known bug or limitation? Something I could be doing wrong that I could change?