Skip to main content
GameDev.net gamedev.net
🔒 Locked

normalization cube map

Started by Zische Sep 13, 2005 at 10:43 PM 3 replies 1.3k views
Original Post
Zische
Zische
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.
Armadon
Armadon
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.
SimmerD
SimmerD
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...
Scoob Droolins
Scoob Droolins
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);


Zische
Zische
thx, that helps a lot

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.