• Advertisement
Sign in to follow this  

Lighting render state in effect file

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using the following effect file: technique TSomeTechnique { pass P0 { Lighting = true; Texture[0] = (BaseTexture); ColorOp[0] = Modulate; ColorArg1[0] = Texture; ColorArg2[0] = Diffuse; ColorOp[1] = Disable; ShadeMode = Gouraud; VertexShader = compile vs_1_1 VSFixedFunctionPipelineEmulation(); PixelShader = NULL; } } If I run the application as shown above, I get black screen. If the line "Lighting = true" is changed to "Lighting = false", I get normal image (texture * diffuse, where diffuse is calculated by VSFixedFunctionPipelineEmulation). As far as I know, LIGHTING render state only matters if no vertex shader is used. Am I missing something here? Thank you

Share this post


Link to post
Share on other sites
Advertisement
Your assertions sound correct to me. Having a valid vertex shader set to the device should automagically disable the fixed function route (unless you're sending pre-transformed vertices down the pipeline - are you?).

One thing to try - use PIX to generate a call-stream capture and then scroll to the specific Draw**() call. PIX should allow you to examine all of the device's render-states and configuration at the time the draw call is processed. Use this to verify that the device is indeed configured how you expect it (do a simple 'diff' between "lighting=true" and "lighting=false" states). It might not make much sense, but it is always possible the Effects Framework is doing something unexpected behind the scenes...

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement