Jump to content
  • Advertisement
Sign in to follow this  
george7378

Beginning with cube maps

This topic is 2129 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

Hi everyone,

 

I'm trying to get a shader working for a new technique (to me) - environment mapping. I know that I need to render the world around me to a 'cube texture' and that I then need to sample that texture in my shader, but I don't really know where to start with cube maps. Can anyone recommend a good place to learn about them? Is there some good sample code which will show me how to render my scene to a cube texture?

 

Thanks!

Share this post


Link to post
Share on other sites
Advertisement

Hi, thanks belfegor and JasonZ, both of your sources have been great. I actually realised that my book 'Intro to DirectX 9.0c - A Shader Approach' has an EnvMap section. I think I have created a good EnvMap shader, but I just haven't got my program rendering to the cube map properly yet. Why can't there be a nice D3DX function to render to each face for you based on a specified 'up' direction and a chosen field of view for each face... ah well, I'll post a nice screenshot when it works :)

Share this post


Link to post
Share on other sites

Well, it works - thanks for the help :) That's another HLSL method under my belt :)

 

[attachment=17893:envmapdemo.jpg]

 

[attachment=17894:envmapdemo2.jpg]

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!