if i use a texture, dx10 will automatically illuminate it?
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;
}
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.
In DirectX 10 there isnt any automatic lighting calculations...
You have to do everything for yourself.
Check the DirectX SDK tutorials or read this website.
You have to do everything for yourself.
Check the DirectX SDK tutorials or read this website.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement