   question about volume texture
  Hi all,This might be a stupid and naive question: I 'd like to load a 3d volume texture on the GPU and fetch the texture value in the shader. The data stored in the volume texture is specified by myself, for example, a 4 by 4 by 4 array of rgb values. I tried to create such a volume texture: pd3dDevice->CreateVolumeTexture(4, 4, 4,1,0, D3DFMT_A16B16G16R16F, D3DPOOL_MANAGED, &pVolumeTexture,NULL);But I can's figure out how to load my data into the texture. I searched in the DirectX c++ doc, but haven't found an applicable way to do this. Would D3DXFillVolumeTexture(pVolumeTexture, LPD3DXFILL3D, NULL) work? How to define LPD3DXFILL3D then?Thanks,-timothy   
  You get call GetVolumeLevel, then use LockBox on that, and write the data you want.The D3DXFillVolumeTexture page in the docs has an example of what the function should look like.   ;  Thanks, I made it work by using LockBox.The code is a little ugly, still wondering why there is no better way to do this.Quote:Original post by ET3DYou get call GetVolumeLevel, then use LockBox on that, and write the data you want.The D3DXFillVolumeTexture page in the docs has an example of what the function should look like.