public AtmosphereData(AtmosphereSettings settings, Texture transmittance, Texture irradiance, Texture inscatter) { // TODO: Texture dimension check Settings = settings; Transmittance = transmittance; Irradiance = irradiance; Inscatter = inscatter; Initialize(); }
public AtmosphereData(GraphicsDevice device, AtmosphereSettings settings) { Settings = settings; Transmittance = Texture.New2D(device, settings.TransmittanceSize.Width, settings.TransmittanceSize.Height, PixelFormat.R11G11B10_Float, TextureFlags.ShaderResource | TextureFlags.RenderTarget).DisposeBy(this); Inscatter = Texture.New3D(device, settings.SunZenithResolution * settings.ViewSunResolution, settings.ViewZenithResolution, settings.AltitudeResolution, PixelFormat.R32G32B32A32_Float, //R16G16B16A16_Float, TextureFlags.ShaderResource | TextureFlags.RenderTarget).DisposeBy(this); Irradiance = Texture.New2D(device, settings.SkySize.Width, settings.SkySize.Height, PixelFormat.R11G11B10_Float, TextureFlags.ShaderResource | TextureFlags.RenderTarget).DisposeBy(this); Initialize(); }