Files
cglm/include/cglm/color.h
2019-05-25 09:12:08 +03:00

33 lines
540 B
C

/*
* Copyright (c), Recep Aslantas.
*
* MIT License (MIT), http://opensource.org/licenses/MIT
* Full license can be found in the LICENSE file
*/
#ifndef cglm_color_h
#define cglm_color_h
#include "common.h"
#include "vec3.h"
/*!
* @brief averages the color channels into one value
*
* @param[in] rgb RGB color
*/
CGLM_INLINE
float
glm_luminance(vec3 rgb) {
vec3 l = {0.212671f, 0.715160f, 0.072169f};
return glm_dot(rgb, l);
}
CGLM_INLINE
void
glm_normal(vec3 a, vec3 b, vec3 c, vec3 dest) {
}
#endif /* cglm_color_h */