Saturday, November 3, 2012

Shading

Started work on the fragment shader. Extended flat shading to diffuse as well as specular shading. Included multiple directional light sources with light color. Also, did some stream compaction to save on threads during fragment shading - removed all useless pixels which were not adding to the data in the framebuffer. The number of threads reduced from 640,000 to 63,000 for the images below.

Diffuse Shading

Specular+Diffuse Shading

Multiple lights with different colors


 

No comments:

Post a Comment