hw-skymodel

A pure Rust implementation of Hosek-Wilkie Skylight Model

2 releases

0.1.1 Feb 9, 2023
0.1.0 Feb 9, 2023

#231 in Rendering


Used in raydiance

MIT license

41KB
214 lines

hw-skymodel

A pure Rust implementation of Hosek-Wilkie Skylight Model.


lib.rs:

Hosek-Wilkie Skylight Model

This crate contains a pure Rust implementation of Hosek-Wilkie Skylight Model. This implementation is intended to be used in interactive computer graphics applications, which is why we made the following changes compared to the original ANSI C implementation:

  • Only RGB datasets and functions are included. Interactive applications don't typically deal with spectral forms and non-RGB color space, which is why they were excluded from this implementation.
  • Arithmetic and storage precision is lowered from f64 to f32. Lower precision has a minimal impact in visual quality, while improving storage and computational costs.
  • Removed solar radiance and "alien-like worlds" functionality.

Dependencies

~0.6–1MB
~22K SLoC