• entries
    169
  • comments
    54
  • views
    130844

Researching Direct3D9 Lighting

Sign in to follow this  

289 views

While doing some further research into the relation between a graphics API and the graphics driver, I came across this article: Mode Switching. I recommend reading it if you are interested in the things I discussed in the previous blog post.

I spent most of the day in research, mainly into the way lighting is performed in Direct3D9. Apparently you can set a material to specify ambient, diffuse, specular, and emissive colors, as well as the specular power. I originally thought that you had to pass this information in a vertex buffer. The layout of the MS3D file format makes a lot more sense now, since all of the colors are stored together rather than per vertex.

Another interesting thing I found out is that material colors specify how much of the incoming light affects the resulting color. Having a diffuse material color of (r:0.5 g:0.0 b:0.0) for example means that 50% of the red component of the light's diffuse color is used, and the green and blue components aren't used at all.

Reposted from http://invisiblegdev.blogspot.com/
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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