Ken3000

Hi,

I would like to use gpu to convert the cubemap pixels and need to use the cubemap faces one by one as texture to do my shader. Does anyone know if i can read pixels from specific face of cubemap in shader Since I can't change the texture head in pc to set cubemap surface as texture. and in texCube(s,uvw) the uvw is the reflective vector.

Is there easy way to do it except lock the cubemap surface and copy data to a texture

Thanks.



Re: Game Technologies: Graphics read pixel of speficic face of cubemap in hlsl

BLANC Guillaume

uvw are used to select both the cube face and the pixel in the face. So it seems possible to write a hlsl function that convert a uv coordinate into a uvw according to the face number. I think this function should do something like a rotation of the pseudo 2d vector. Can you imagine it