Skip to main content

LightingOption

Enum LightingOption 

Source
#[non_exhaustive]
pub enum LightingOption { None, Flat, Smooth, Bounce, }
Expand description

How to display light in a Space; part of a GraphicsOptions.

§Serialization stability warning

This type implements [serde::Serialize] and [serde::Deserialize], but serialization support is still experimental (as is the game data model in general). We do not guarantee that future versions of all-is-cubes will be able to deserialize data which is serialized by this version.

Additionally, the serialization schema is designed with serde_json in mind. It is not guaranteed that using a different data format crate, which may use a different subset of the information exposed via [serde::Serialize], will produce stable results.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

None

No lighting: objects will be displayed with their intrinsically defined surface color, as if illuminated by a white light with luminance 1.0 everywhere.

§

Flat

Light is taken from the volume immediately above a cube face. Edges between cubes are visible.

§

Smooth

Light is interpolated across surfaces, between adjacent cubes.

§

Bounce

Compute per-pixel rather than per-block illumination.

This option has the most physical accuracy, but may be very slow or unsupported. If unsupported, the renderer should substitute [Smooth][Self::Smooth].