Skip to main content
gamedev.net
🔒 Locked

cubic environment mapping

Started by j_7h0r Apr 21, 2006 at 8:32 PM 1 replies 650+ views
Original Post
j_7h0r
j_7h0r
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.
OrenGL
OrenGL
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.
Don't shoot! I'm with the science team.....
j_7h0r
j_7h0r
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.