Jump to content
  • Advertisement
Sign in to follow this  
idloco

Shaders an lightning

This topic is 4622 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!