Sign in to follow this  
j_7h0r

cubic environment mapping

Recommended Posts

j_7h0r    122
Hello there, i'm working on a project for school and i want to program a shader (using DirectX and CG) that implements environment mapping. I understand the theory and everything and i also have access to a vertex and a pixel shader but i can't figure out exactly what is a cube map. Is it only a simple skybox or do i have to implememt something more for my skybox to be understood as the cube map by directx? Also does anyone knows where i can find some source code that would prepare a scene for environment mapping (with Directx if possible)? thanx j.k.

Share this post


Link to post
Share on other sites
OrenGL    228
An enviroment map can be whatever texture you want. Since most often it's hard to see exactly the small details on the model you are rendering using enviroment mapping you can usually get away with having a precomputed enviroment map (for example your skybox). To be more "correct" (but expensive) you could recompute the skybox each frame.

You can use the MS office cube map that comes with the DirectX SDK. I think that the SDK might even have an example of enviroment mapping.

Share this post


Link to post
Share on other sites
j_7h0r    122
thanx...
but i'm still wondering how do i have to specify in the main program, to my shader that the skybox (or something else) is the environment that it has to map...
I'm new to shaders so maybe that's why i don't get it...

thanks again...

j.k.

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