public PlanetShaderKey(PlanetSurfaceStyle style, bool hasAtmosphere, int eclipseShadowCount) { this.style = style; this.flags = hasAtmosphere ? ShaderFlags.Atmosphere : ShaderFlags.None; this.eclipseShadowCount = eclipseShadowCount; this.overlayTextureCount = 0; this.lightCount = 1; this.textures = SurfaceProperty.Diffuse; }
/// <summary> /// Get the planet shader for the specified surface style and defaults for other /// properties (no atmosphere, no shadows.) /// </summary> /// <param name="device">Direct3D device</param> /// <param name="style">Planet surface style</param> /// <returns>A Direct3D shader to produce the requested effect.</returns> public static PlanetShader11 GetPlanetShader(Device device, PlanetSurfaceStyle style, int eclipseShadowCount) { return GetPlanetShader(device, new PlanetShaderKey(style, false, eclipseShadowCount)); }