light: save poly edge planes for bouncelights

This commit is contained in:
Eric Wasylishen 2017-03-14 19:34:16 -06:00
parent 1d66039b2c
commit 33fbe56e12
2 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@
typedef struct {
std::vector<glm::vec3> poly;
std::vector<glm::vec4> poly_edgeplanes;
glm::vec3 pos;
std::map<int, glm::vec3> colorByStyle;
glm::vec3 componentwiseMaxColor; // cached maximum color in the colorByStyle, used for culling so we don't need to loop through colorByStyle

View File

@ -231,6 +231,7 @@ AddBounceLight(const vec3_t pos, const std::map<int, glm::vec3> &colorByStyle, c
bouncelight_t l;
l.poly = GLM_FacePoints(bsp, face);
l.poly_edgeplanes = GLM_MakeInwardFacingEdgePlanes(l.poly);
l.pos = vec3_t_to_glm(pos);
l.colorByStyle = colorByStyle;