normalization cube map

Started by
3 comments, last by Zische 18 years, 7 months ago
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.
Advertisement
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.
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...
You can also generate a cube normalizer algorithmically like this:

// create a callbackVOID 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 LPDIRECT3DCUBETEXTURE9 cube;D3DXCreateCubeTexture ( ... , &cube);D3DXFillCubeTexture (cube, FillCubeNormalizer, NULL);


thx, that helps a lot

This topic is closed to new replies.

Advertisement