light: save poly edge planes for bouncelights
This commit is contained in:
parent
1d66039b2c
commit
33fbe56e12
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue