2012/07/10

12-07-10 Lights with shaders


Continuing with the work i have from yesterday I've successfully apply lighting from 3 sources to the scene based on the 6th Directx SDK tutorial and Rastertek tutorial # 9 (http://rastertek.com/dx10tut09.html).

In this scene we have Ambient light set as a gray
( 0.1, 0.1, 0.1, 1.0)
a red light rotating arround X
( 0.5, 0.0, 0.0, 1.0)
and a green light rotating arround Y
( 0.0, 0.5, 0.0, 1.0)

These lights affects the triangles that are facing them (calculated by normals) according to its color, the neat stuff is that once both meet they cast a yellow light. as one would expect from real lights :D



Yo soy Alberto y ese ha sido mi post. Happy Codding!

No hay comentarios: