From 00d3ccedefb1a5efb3d2d4625a2b68446703fbab Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 28 Sep 2014 21:02:28 +0300 Subject: [PATCH] Exclude EnvironMap effect itself when creating the map This avoids an unnecessary texture bind/unbind cycle if the EnvironmentMap is contained within its own environment. --- source/environmentmap.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/environmentmap.cpp b/source/environmentmap.cpp index f61d2c40..ae98719f 100644 --- a/source/environmentmap.cpp +++ b/source/environmentmap.cpp @@ -51,6 +51,7 @@ void EnvironmentMap::setup_frame() const camera.set_up_direction(env_tex.get_t_direction(face)); Renderer env_renderer(&camera); env_renderer.exclude(renderable); + env_renderer.exclude(*this); env_renderer.render(environment); } Framebuffer::unbind(); -- 2.45.2