Color Theory & Programmable Pipeline¶
Color Theory¶
What is Color?¶
- Color is the brain's reaction to a specific visual stimulus
- 观察者的主观感知 subjective sensation experienced by the observer
- 取决于光的物理性质、与材料的交互、人类视觉系统和大脑对由此产生的现象的解读
-
Physics of Light
-
Wave Model or Particle Model
-
通常使用particle model,认为光由光子构成
-
-
Properties of Light
-
\(E=hf\)
-
Photon behavior is cyclic and has a repeated pattern
-
\(\lambda=\dfrac{c}{f}\)
-
Each photon has a wavelength associated with it and the perceived color of light depends on this wavelength
-
光强取决于present的photon数量
-
-
Spectral Energy Distribution Curve
- Human eyes are sensitive to wavelengths in the range 330-770nm
-
Perception of Color
- spectral sensitivity curves of cones: \(r=\int f(x)s(x)dx\)
Color Model¶
- RGB
- CMYK: Cyan/Maagenta/Yellow/Black
- HSV: Hue/Saturation/Value
Programming Pipeline¶

- Programmable stage: vertex, assembly, fragment
- shader

GLSL¶
-
uniform variables: set by the program that can be changed at runtime, but are constant across each execution of the shader
-
attribute variables: properties of a vertex, input of vertex shader
- varying variables: