public void Render(Shader LightShader) { if (this.Model != null) { if (this.Texture != null) { this.Texture.SetUnit(TextureTarget.Texture2D, TextureUnit.Texture0); LightShader.SetUniform("Material", TextureUnit.Texture0); } this.Model.Draw(Transform); } }
/// <summary> /// Sets up the textures for a currently active shader that involves the precomputed atmosphere. /// </summary> public void Setup(Shader Shader) { this.Inscatter.SetUnit(TextureTarget.Texture3D, TextureUnit.Texture0); this.Irradiance.SetUnit(TextureTarget.Texture2D, TextureUnit.Texture1); this.Transmittance.SetUnit(TextureTarget.Texture2D, TextureUnit.Texture2); Shader.SetUniform("Inscatter", TextureUnit.Texture0); Shader.SetUniform("Irradiance", TextureUnit.Texture1); Shader.SetUniform("Transmittance", TextureUnit.Texture2); }