public void RenderizzaCieloStellato(float time, LogiX_Engine lxe, float TexDimension) { lxe.SetCullMode(CullMode.Clockwise); effect.Begin(FX.None); matrix = Matrix.Scaling(new Vector3(1000f,1000f,1000f)) * LogiX_Engine.Device.Transform.View * LogiX_Engine.Device.Transform.Projection; Matrix.TransposeMatrix(matrix); effect.SetValue(effectHandles[1], matrix); effect.SetValue(effectHandles[2], time/3); effect.SetValue(effectHandles[3], baseTexture[0]); effect.SetValue(effectHandles[4], baseTexture[1]); effect.SetValue(effectHandles[5], TexDimension); effect.CommitChanges(); effect.BeginPass(0); model.DrawSubset(0); effect.EndPass(); effect.End(); lxe.SetCullMode(CullMode.CounterClockwise); }
public void RenderizzaAlone(LogiX_Engine lxe, Camera cam) { lxe.SetCullMode(CullMode.Clockwise); lxe.SetLightMode(true, true); lxe.SetAlphaMode(); light.Direction = cam.Position; light.Enabled = true; light.SetDirectionalLight(); model.Scaling = new VertexData(0.48f, 0.48f, 0.48f); model.meshTexture = null; XTexture.ResetTextures(); model.SetModelMatrices(); Alone.SetMaterial(); model.DrawSubset(0); XMaterial.ResetMaterials(); model.UnSetModelMatrices(); light.Enabled = false; light.SetDirectionalLight(); lxe.UnSetAlphaMode(); lxe.SetLightMode(true, false); lxe.SetCullMode(CullMode.CounterClockwise); }
public void RenderizzaAtmosfera(float time, float RaggioAtmosferaRispettoPianeta, XMaterial mat, LogiX_Engine lxe) { lxe.SetAlphaMode(); lxe.SetCullMode(CullMode.Clockwise); lxe.AmbientLight = Color.FromArgb(255, 255, 255); lxe.SetLightMode(true, true); XTexture.ResetTextures(); TransformAtm(time, RaggioAtmosferaRispettoPianeta); mat.SetMaterial(); model.DrawSubset(0); XMaterial.ResetMaterials(); RestoreWorld(); lxe.AmbientLight = Color.FromArgb(0, 0, 0); lxe.SetCullMode(CullMode.CounterClockwise); lxe.UnSetAlphaMode(); lxe.SetLightMode(true, false); }