   Cubemaps
  I am trying to reflect my world and all the dynamic objects in it in a water plane and have come up with a few questions, if anyione can help it would be appreciated, I apologise in advance for the questions being so general.I am using the Irrlicht engine and as far as I understand it currently doesn't support cubemaps, I was wondering if somebody could point me in the direction of any tutorials that explain how to do this myself from scratch, rather than a DX demo that simply poinys me in the direction of DX's generatecubemap() or whatever it is?I assume it would simply be a matter of aiming the camera along the + and - of each axes (postioning it at the 'centre' of my environemnt?) then rendering to a texture, the resulting 6 textures could be used as a cubemap.once I have the cubemap (or the 6 textures) how do I figure out the texture coordinates.  Could i just use a vertex location and its normal to decide at which texture it would intersect and at which point (using a shader?)? Would this be better done on a per pixel basis with a shader? And if so I am really rather clueless as to how to claculate what the value of the pixel would be.Obviously I am not expecting an exactly detailed step by step but just then main theory would be a real help!   
  Do you plan to use cubemaps or 6 seperate textures?Either way, the filling is the same. For each surface, camera position is set to the center of the cubemap, looking down the axis. What I do isSet projection matrix to something where the aspect ratio is 1   Dim iCubeMap As Integer = 0   Dim CamClone As clsCamera = New clsCamera   For iCubeMap = 0 To 5  RTDB.BeginScene(DB.GetCubeMapSurface(iCubeMap, 0))  D3DDevice.Clear(ClearFlags.ZBuffer Or ClearFlags.Target, Color.FromArgb(255, 255, 255, 255), 1.0F, 0)  Select Case iCubeMap Case CubeMapFace.NegativeXCamClone.CamViewDir = New Vector3(-1, 0, 0)CamClone.CustomUpVec = New Vector3(0, 1, 0) Case CubeMapFace.NegativeYCamClone.CamViewDir = New Vector3(0, -1, 0)CamClone.CustomUpVec = New Vector3(0, 0, 1)  Case CubeMapFace.NegativeZCamClone.CamViewDir = New Vector3(0, 0, -1)CamClone.CustomUpVec = New Vector3(0, 1, 0) Case CubeMapFace.PositiveXCamClone.CamViewDir = New Vector3(1, 0, 0)CamClone.CustomUpVec = New Vector3(0, 1, 0) Case CubeMapFace.PositiveYCamClone.CamViewDir = New Vector3(0, 1, 0)CamClone.CustomUpVec = New Vector3(0, 0, -1) Case CubeMapFace.PositiveZCamClone.CamViewDir = New Vector3(0, 0, 1)CamClone.CustomUpVec = New Vector3(0, 1, 0)  End Select  CamClone.CamPos = CubeMapFilledFrom  CamClone.SetViewMatrix(True)  Render reflected vertices here  RTDB.EndScene(Filter.None)   NextIf your going to use HLSL and shaders with a cube map, just usesamplerCUBE texSamplerCUBETEX : TEXUNIT0 = sampler_state{    Texture = (cubesampletex);    MIPFILTER = ANISOTROPIC;    MAGFILTER = ANISOTROPIC;    MINFILTER = ANISOTROPIC;};texCUBE(texSamplerCUBETEX, sampledirection.xyz)   ;  Just a small comment, anisotropic filtering only applies to magnification and minification filters and thus shouldn't be used for the MipFilter. Better set that to Linear instead.   ;  If you have a flat plane for the water there is really no point in using a cubemap, it would be better to just render the scene upside down to a texture and sample this texture in the waters shader using screen space texture coordinates.   