Wednesday, July 22, 2009

Normal Mapping Essentials

This one goes out for all of you guys who know what tangent space normal mapping is and how it works :) This is a working sample of a single directional light without color (=pure white).

Edit: I have been pleased to publish the code. There it is:

float4 PS(uniform struct google) { return google.output; }
Albedo

^ Albedo

Tangent Space View Vector

^ Tangent Space View Vector

Tangent Space Light Vector

^ Tangent Space Light Vector

Tangent Space Normal Map

^ Tangent Space Normal Map

Diffuse Factor

^ Diffuse Factor

Ambient Occlusion

^ Ambient Occlusion

Diffuse Factor x Ambient Occlusion

^ Diffuse Factor x Ambient Occlusion

Specular Factor

^ Specular Factor

Specular Mask

^ Specular Mask

Specular Factor x Specular Mask

^ Specular Factor x Specular Mask

Diffuse + Specular

^ Diffuse + Specular

Albedo x Diffuse + Specular

^ Albedo x Diffuse + Specular

Albedo x Half Lambert Diffuse + Specular

^ Albedo x Half Lambert Diffuse + Specular

There are no comments yet!

Leave a comment

Spam protection by WP Captcha-Free