Sign in to follow this  

Shaders an lightning

This topic is 4434 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 having problems using the standard ligthing of DirectX and HLSL, what i mean is when the terrain has the shaders on, the ligthing stop working. and all the othrer things of the engine turn to black.. Is this a standard issue? ( you can't mix HLSL and normal lightning ( D3DLIGHT9 ) ) or is code problem? ( which if it is the case i will post the necesary code ) Thanks in advance..

Share this post


Link to post
Share on other sites
As documented in the D3D documentation, when you use vertex shaders, fixed-function vertex processing (where lighting is included) is disabled. For each call to DrawIndexedPrimitives() (or another draw call), you can choose between one and the other -- if you've called SetVertexShader(shader), or have applied a .fx file with a vertex shader, then fixed function is off. If you call SetVertexShader(NULL), then fixed-function is on again.

Share this post


Link to post
Share on other sites

This topic is 4434 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this