Need a light?

Published June 08, 2006
Advertisement
Added four screenshots from Alien Vendetta for the screenshot crowd.

Today's post is about lighting. I know I went over lighting before, however my implementation sucked.

Basically what I was doing before was that when a sectors light level(0-255) changed, I looped through every vertex in the sector and changed its colour value.

My new method is to enable D3D lighting and when each subsector's render function is called, change the RenderState.AmbientColor property.

Device.RenderState.AmbientColor = Drawing.Color.FromArgb( 255, Sector.LightLevel, Sector.LightLevel, Sector.LightLevel ).ToArgb();

One call instead of what could have been hundreds, much better.



Previous Entry The Number of the Beast
Next Entry Beam me up!
0 likes 5 comments

Comments

Rob Loach
Blinky!
June 08, 2006 07:52 PM
Sir Sapo
Nice new avatar!
June 08, 2006 11:07 PM
HopeDagger
The project is really starting to take shape; soon cleaving its way from the tech-demo realm into 'omg a gaem!' land. And that's one 'omg a gaem!' land I can't wait to explore! [smile]
June 08, 2006 11:45 PM
Scet
Quote:Original post by Sir Sapo
Nice new avatar!


Thanks.

Quote:Original post by HopeDagger
The project is really starting to take shape; soon cleaving its way from the tech-demo realm into 'omg a gaem!' land. And that's one 'omg a gaem!' land I can't wait to explore! [smile]


We're still a long way off, it's only just past the tech-demo stage.

June 09, 2006 05:52 AM
benryves
Nice. [smile]
June 09, 2006 06:29 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement