conversion from texture mapping space to world space

Started by
0 comments, last by TheArmchairPhysicist 17 years ago
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
Advertisement
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.

This topic is closed to new replies.

Advertisement