static void SetupAtmosphere(MyEffectVoxels shader, MyRenderVoxelCellBackground element)
        {
            shader.SetHasAtmosphere(element.HasAtmosphere);

            if (element.HasAtmosphere)
            {
                float depthScale = 0.2f;

                shader.SetInnerRadius(element.PlanetRadius);
                shader.SetOutherRadius(element.AtmosphereRadius);

                float scaleAtmosphere = 1.0f / (element.AtmosphereRadius - element.PlanetRadius);

                shader.SetScaleAtmosphere(scaleAtmosphere);
                shader.SetScaleAtmosphereOverScaleDepth(scaleAtmosphere / depthScale);

                Vector3 cameraToCenter = element.GetRelativeCameraPos(MyRenderCamera.Position);

                shader.SetRelativeCameraPos(cameraToCenter);

                shader.SetLightPos(-MySunGlare.GetSunDirection());
                shader.SetIsInside(element.IsInside(MyRenderCamera.Position));

                shader.SetScaleDepth(depthScale);

                shader.SetPositonToLeftBottomOffset(element.PositiontoLeftBottomOffset);

                shader.SetWavelength(element.AtmosphereWavelengths);
            }
        }
 public abstract void SetupVoxelMaterial(MyEffectVoxels shader, MyRenderVoxelBatch batch);
 public override void SetupVoxelMaterial(MyEffectVoxels effect, MyRenderVoxelBatch batch)
 {
     effect.UpdateVoxelTextures(MyRender.OverrideVoxelMaterial ?? batch.Material0);
 }
 public sealed override void SetupVoxelMaterial(MyEffectVoxels shader, MyRenderVoxelBatch batch)
 {
     throw new InvalidOperationException();
 }