Jump to content
  • Advertisement
Sign in to follow this  
Mille

Alpha channel in cube (enviroment) map

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

Hey all I'm a bit confused, I want to create a cube map which includes the alpha channel. That is, when I later in the pixel shader code calls: float4 color = texCUBE(myCubeMapSampler, myVector); then color.a is NOT just 0 in all directions. But I'm unsure how to achieve this. I create the cube texture using CreateCubeTexture(256, 1, D3DUSAGE_RENDERTARGET, ...) with format A8R8G8B8, and renders the cube map as explained in the DirectX docs. This works fine, but the alpha channel is just zero all over in my cube (environment) map. Any help is appreciated ..

Share this post


Link to post
Share on other sites
Advertisement
Hi,

If you create your cube map with the texture tool (included in the SDK) and export it as a .dds with an alpha channel, then you'll just have to load it with a D3DXCreateTextureFromFile() and you'll have your alpha channel.

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!