• ### Popular Now

• 14
• 15
• 9
• 10
• 9

#### Archived

This topic is now archived and is closed to further replies.

# FX files and fixed-function parameters

This topic is 5189 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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);
...
}
}

technique t1 {
pass p0 {
}
}

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?

##### Share on other sites
quote:
and VS() references CamPos, then the t 1technique will do the right thing as I update the CAMPOS semantic, but the t 0will "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?

- Are you sure? This seems like an app bug to me, because I've used FX files with the FPP and it always correctly used my updated constants.

- I don't think you can define custom semantics, there's no CAMPOS semantic.

- Could you show the whole FX file? (or the VShader and the FFP setup, at least)

[edited by - Coder on January 7, 2004 4:04:21 AM]