A Quick Custom Material question
by Ron Nelson · in Torque Game Engine Advanced · 03/12/2008 (9:22 pm) · 2 replies
Could someone please provide me with an example of bump mapping used in a Custom Material?
Thanks in advance.
Thanks in advance.
#2
in fragment shader:
diffuse_color is your diffuse map
bump_color is your bump map
03/16/2008 (1:18 pm)
Ron, use the dot3 bump code:in fragment shader:
float diffuse_color = lightDirection.z > 0 ? saturate(dot(bump_color, lightDirection)) : 0;
diffuse_color is your diffuse map
bump_color is your bump map
Torque 3D Owner Eric Forhan
I don't have any of the code handy but I do know that the TGEA demo has some which uses custom materials like that.