Jump to content
  • Advertisement
Sign in to follow this  
iGrfx

if i use a texture, dx10 will automatically illuminate it?

This topic is 2778 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


here are some code came from SDK, i didn't found any lighting calc here, but i can see the object.I remeber that in dx9 if i don't set the light state or enable it with shader, i just saw a black screen.
any one could explain it?Thanks!

float4 PS( PS_INPUT input) : SV_Target

{

return txDiffuse.Sample( samLinear, input.Tex )* vMeshColor;

}

Share this post


Link to post
Share on other sites
Advertisement
When using shaders (which you have to do in DX10), there is no lighting, except what is done in the shader. If you shader doesn't include lighting code, then your objects won't be darkened/brightened by lights... They will be the colour that is output by that [font="Courier New"]return[/font] statement.

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!