Lights, loops, and tangent space
Hey everyone,
I have hit a wall when trying to implement bump mapping for a small amount of lights. I would like to take advantage of the loop instruction in later shader models, but when I use bump mapping I naturally have to pass the light information between VS and FS. Is there a way to combine looping and accessing the lights info from TEXCOORDS?
It might be easier for you to just pass the TBN->World matrix into your pixel shader and transform the tangent space normal into world space, and do your lighting there. A constant 3 texcoords used, as opposed to n coords for n lights.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement