diff --git a/include/light/bounce.hh b/include/light/bounce.hh index 938d76c3..72a391ee 100644 --- a/include/light/bounce.hh +++ b/include/light/bounce.hh @@ -31,6 +31,7 @@ typedef struct { std::vector poly; + std::vector poly_edgeplanes; glm::vec3 pos; std::map colorByStyle; glm::vec3 componentwiseMaxColor; // cached maximum color in the colorByStyle, used for culling so we don't need to loop through colorByStyle diff --git a/light/bounce.cc b/light/bounce.cc index 29d26f44..e0be8506 100644 --- a/light/bounce.cc +++ b/light/bounce.cc @@ -231,6 +231,7 @@ AddBounceLight(const vec3_t pos, const std::map &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;