Jump to content
  • Advertisement
Sign in to follow this  
j_7h0r

cubic environment mapping

This topic is 4471 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!