hw_skymodel/
lib.rs

1//! # Hosek-Wilkie Skylight Model
2//!
3//! This crate contains a pure Rust implementation of [Hosek-Wilkie Skylight
4//! Model](https://cgg.mff.cuni.cz/projects/SkylightModelling/). This
5//! implementation is intended to be used in interactive computer graphics
6//! applications, which is why we made the following changes compared to the
7//! original ANSI C implementation:
8//!
9//! - Only RGB datasets and functions are included. Interactive applications
10//!   don't typically deal with spectral forms and non-RGB color space, which is
11//!   why they were excluded from this implementation.
12//! - Arithmetic and storage precision is lowered from `f64` to `f32`. Lower
13//!   precision has a minimal impact in visual quality, while improving storage
14//!   and computational costs.
15//! - Removed solar radiance and "alien-like worlds" functionality.
16//!
17
18/// RGB version of the model.
19pub mod rgb;