Debian Codegraph @

tools/specular-color/README.md

raw
1 # specular-color
2
3 `specular-color` computes the base color of conductors based on spectral data.
4 The base color is output in linear and sRGB formats. The base color is the reflectance
5 at normal incidence (0°) and is often noted f0.
6
7 `specular-color` can also compute the perceived color of a conductor at another angle,
8 set to ~82° by default. This value is particularly useful when used in combination with
9 the Lazanyi-Schlick model to better approximate the behavior of metallic surfaces at
10 grazing angles. See Hoffman 2019, "Fresnel Equations Considered Harmful".
11
12 ## Usage
13
14 ```
15 $ specular-color <spectral data file>
16 ```
17
18 The spectral data files can be obtained from
19 [Refractive Index](https://refractiveindex.info/?shelf=3d&book=metals&page=brass).
20
21 For instance, to compute the base color of gold:
22
23 ```
24 $ specular-color data/gold.txt
25 ```
26
27 To set the second angle, use `-a` to specify the angle in degrees:
28
29 ```
30 $ specular-color -a 75 data/gold.txt
31 ```