Function HDR_Plane_Create( ObjectID As Dword )
If ObjectID < 1 Then ExitFunction
Local RTWidth As Float
Local RTHeight As Float
Local RTDepth As Float
Local PixelWidth As Float
// Grab view size data
Pick Screen 0 , 0 , 100.0
RTWidth = Get Pick Vector X()
RTHeight = Get Pick Vector Y()
RTDepth = Get Pick Vector Z()
PixelWidth = Get Pick Vector Y() / ( Screen Height() * 0.5 )
// Make and setup RT plane
If Object Exist(ObjectID) Then Delete Object ObjectID
Make Object Plain ObjectID , 200.0 , 200.0
Set Object Light ObjectID , 0
Set Object ObjectID, 1, 1, 0, 2, 0, 0, 0
Set Object Texture ObjectID, 2, 0
Set Object Fog ObjectID , 0
Set Object Ambient ObjectID , 0
set object transparency ObjectID,1
// Scale and offset to screen
Scale Limb ObjectID , 0 , RTWidth, RTHeight , 100.0
Offset Limb ObjectID , 0 , PixelWidth * 0.0 , PixelWidth * 0.0 , RTDepth
EndFunction
Function HDR_Plane_Update( ObjectID As Dword , CameraID As Dword )
// Orient the Render Target plane to the designated camera
Position Object ObjectID , Camera Position X(CameraID) , Camera Position Y(CameraID) , Camera Position Z(CameraID)
Set Object To Camera Orientation ObjectID
EndFunction
I use these functions.