erebus

view liberebus/src/color.h @ 31:53a98c148bf8

- introduced SurfaceGeometry to carry all the geometric information input to BRDF sampling and evaluation functions. - made Reflectance keep an (optional) pointer to its material - simplified PhongRefl::sample_dir, with the help of SurfaceGeometry - worked around microsoft's broken std::thread implementation's deadlock on join
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 07 Jun 2014 09:14:17 +0300
parents 474a0244f57d
children bab25c0ce337
line source
1 #ifndef COLOR_H_
2 #define COLOR_H_
4 #include "vmath/vector.h"
6 typedef Vector4 Color;
8 inline float color_luminance(const Color &c) { return c[0] * 0.2126 + c[1] * 0.7152 + c[2] * 0.0722; }
10 #endif // COLOR_H_