Advertisement Jump to content
Sign in to follow this  

OpenGL normalization cube map

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

where can i get a normalization cube map for direct3d ??? the one that comes with the cg tutorial cd seems to be broken. all sides of the cube are light blue. i don't know how to access the pixels of a cubemap in direct3d and all functions that create a normalization cube map do it for opengl.

Share this post

Link to post
Share on other sites
Hi there Zische,
How are you doing buddy?

The Problem
A Normalization Cube Map
The Solution
NVidia Cube Map OpenGL
ATI Cube Map OpenGL

You might find some information there.
The ATI demo normalizes the cube map in the second pass of their tutorial. Maybe you can find some information there on how to do it yourself..

I hope those 2 articles help, you might also find one in the source if your lucky :)
Unfortunately I cannot find any normalization cube maps.

Share this post

Link to post
Share on other sites
I have a normalization cubemap in .dds format I could send you. It's the one I'm using in my project.

I tried to put it on my server and link it, but my hosting service seems to be down atm...

Share this post

Link to post
Share on other sites
You can also generate a cube normalizer algorithmically like this:

// create a callback
VOID WINAPI FillCubeNormalizer (D3DXVECTOR4* pOut, const D3DXVECTOR3* pTexCoord, const D3DXVECTOR3* pTexelSize, LPVOID pData)
D3DXVECTOR3 v (*pTexCoord);
D3DXVec3Normalize (&v, pTexCoord);
*pOut = D3DXVECTOR4 (v.x * 0.5f + 0.5f, v.y * 0.5f + 0.5f, v.z * 0.5f + 0.5f, 1.0f);

then invoke:

// callback is called once for each pixel
D3DXCreateCubeTexture ( ... , &cube);
D3DXFillCubeTexture (cube, FillCubeNormalizer, NULL);

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!