Sign in to follow this  
rob1978

conversion from texture mapping space to world space

Recommended Posts

Hello, I'm working on relief mapping and I want to integrate it with shadow mapping. When for example I use bump mapping, I store world space position interpolated from vertex shader in position texture and later I use this texture to compute shadow mapping and lighting. When I use relief mapping, I compute texture coords offset based on heightmap texture, add it to original mapping and sample color texture at new coordinates. This gives nice paralax effect, but shadows on relief mappeded mesh looks very flat. I think that I need to store displaced world space position , so mesh will be shadowed correctly, but I don't know how to transform texture space offset computed by relief mapping to world space offset, which I will use to modify original pixel world space position. Please help! :) Rob

Share this post


Link to post
Share on other sites
http://opengl.org/resources/code/samples/sig99/advanced99/notes/node140.html

it's a good tutorial that briefly shows u how to transform into tangent space...there are also some people who have implemented a gpu-accelerated transformation, but i couldn't find anything on that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this