0 Members and 1 Guest are viewing this topic.
Private Type iVertex X As Single Y As Single Z As Single U As Single V As SingleEnd TypeDim vr_Sky() As iVertex
sn_Radius = 100in_Columns = 64in_Rows = 10ReDim vr_Sky(in_Rows * 2 * in_Columns * 3 - 1)For in_Column = 0 To in_Columns - 1 For in_Row = 0 To in_Rows - 1 Dim in_Address As Integer in_Address = 0 + in_Row * 2 * in_Columns * 3 'Go to row in_Address = in_Address + in_Column * 2 * 3 'Go to object vr_Sky(in_Address + 0).Y = Sin(RD(90 / in_Rows * (in_Row + 1))) * sn_Radius vr_Sky(in_Address + 1).Y = Sin(RD(90 / in_Rows * (in_Row + 0))) * sn_Radius vr_Sky(in_Address + 2).Y = Sin(RD(90 / in_Rows * (in_Row + 0))) * sn_Radius vr_Sky(in_Address + 3).Y = Sin(RD(90 / in_Rows * (in_Row + 1))) * sn_Radius vr_Sky(in_Address + 4).Y = Sin(RD(90 / in_Rows * (in_Row + 1))) * sn_Radius vr_Sky(in_Address + 5).Y = Sin(RD(90 / in_Rows * (in_Row + 0))) * sn_Radius vr_Sky(in_Address + 0).U = 1 / in_Columns * (in_Column + 0) vr_Sky(in_Address + 0).V = 1 - (1 / in_Rows * (in_Row + 1)) vr_Sky(in_Address + 1).U = 1 / in_Columns * (in_Column + 0) vr_Sky(in_Address + 1).V = 1 - (1 / in_Rows * (in_Row + 0)) vr_Sky(in_Address + 2).U = 1 / in_Columns * (in_Column + 1) vr_Sky(in_Address + 2).V = 1 - (1 / in_Rows * (in_Row + 0)) vr_Sky(in_Address + 3).U = 1 / in_Columns * (in_Column + 0) vr_Sky(in_Address + 3).V = 1 - (1 / in_Rows * (in_Row + 1)) vr_Sky(in_Address + 4).U = 1 / in_Columns * (in_Column + 1) vr_Sky(in_Address + 4).V = 1 - (1 / in_Rows * (in_Row + 1)) vr_Sky(in_Address + 5).U = 1 / in_Columns * (in_Column + 1) vr_Sky(in_Address + 5).V = 1 - (1 / in_Rows * (in_Row + 0)) vr_Sky(in_Address + 0).X = Sin(RD(360 / in_Columns * (in_Column + 0))) * sn_Radius / in_Rows * (in_Rows - in_Row - 1) vr_Sky(in_Address + 0).Z = Cos(RD(360 / in_Columns * (in_Column + 0))) * sn_Radius / in_Rows * (in_Rows - in_Row - 1) vr_Sky(in_Address + 1).X = Sin(RD(360 / in_Columns * (in_Column + 0))) * sn_Radius / in_Rows * (in_Rows - in_Row - 0) vr_Sky(in_Address + 1).Z = Cos(RD(360 / in_Columns * (in_Column + 0))) * sn_Radius / in_Rows * (in_Rows - in_Row - 0) vr_Sky(in_Address + 2).X = Sin(RD(360 / in_Columns * (in_Column + 1))) * sn_Radius / in_Rows * (in_Rows - in_Row - 0) vr_Sky(in_Address + 2).Z = Cos(RD(360 / in_Columns * (in_Column + 1))) * sn_Radius / in_Rows * (in_Rows - in_Row - 0) vr_Sky(in_Address + 3).X = Sin(RD(360 / in_Columns * (in_Column + 0))) * sn_Radius / in_Rows * (in_Rows - in_Row - 1) vr_Sky(in_Address + 3).Z = Cos(RD(360 / in_Columns * (in_Column + 0))) * sn_Radius / in_Rows * (in_Rows - in_Row - 1) vr_Sky(in_Address + 4).X = Sin(RD(360 / in_Columns * (in_Column + 1))) * sn_Radius / in_Rows * (in_Rows - in_Row - 1) vr_Sky(in_Address + 4).Z = Cos(RD(360 / in_Columns * (in_Column + 1))) * sn_Radius / in_Rows * (in_Rows - in_Row - 1) vr_Sky(in_Address + 5).X = Sin(RD(360 / in_Columns * (in_Column + 1))) * sn_Radius / in_Rows * (in_Rows - in_Row - 0) vr_Sky(in_Address + 5).Z = Cos(RD(360 / in_Columns * (in_Column + 1))) * sn_Radius / in_Rows * (in_Rows - in_Row - 0) Next in_RowNext in_ColumnSet dx_Sky = dx_Direct3DX.CreateTextureFromFile(dx_Device3D, "sky/day.bmp")
dx_Device3D.SetRenderState D3DRS_ZENABLE, 1dx_Device3D.SetRenderState D3DRS_ZWRITEENABLE, 0dx_Device3D.SetRenderState D3DRS_CULLMODE, D3DCULL_NONEdx_Device3D.SetRenderState D3DRS_CLIPPING, 0dx_Device3D.SetRenderState D3DRS_LIGHTING, 0dx_Device3D.SetRenderState D3DRS_FILLMODE, D3DFILL_SOLIDdx_Device3D.SetTexture 0, dx_Skydx_Device3D.SetVertexShader D3DFVF_XYZ Or D3DFVF_TEX1dx_Device3D.DrawPrimitiveUP D3DPT_TRIANGLELIST, (UBound(vr_Sky) + 1) / 3, vr_Sky(0), Len(vr_Sky(0))dx_Device3D.SetRenderState D3DRS_ZWRITEENABLE, 1dx_Device3D.SetTexture 0, Nothing
Could it be possible to have skies like that in VC/SA?
Nah, its more complex, either make a dff from the dome and load it using object.dat and the SCM so its around the camera object all the time or create a loaded binary (*.dll, *.asi) which is injected into GTA's render engine (thats what I would do). Read Spookys Speedo tutorial/source and you'll get what I mean.
SMF 2.0.19 | SMF © 2021, Simple Machines