blob: 6d7d1eaed44da7004e5dddad038522f65a51c1b9 (
plain)
1
2
3
4
5
6
7
8
|
#include "lightDirection.h"
#include "maths.h"
LightDirection::LightDirection(const Direction2D sunPos) :
pos {sunPos}, vec {glm::mat3 {rotate_yp(pi + sunPos.x, -sunPos.y)} * north},
vert {-glm::clamp(-1.F, 0.F, vec.z - 0.1F)}
{
}
|