Prevent rendering too much point light scattering

This commit is contained in:
Vincent Lejeune 2014-11-14 00:57:07 +01:00
parent e41ac3c7e5
commit 83d5c1e522

View File

@ -211,7 +211,7 @@ void IrrDriver::renderLightsScatter(unsigned pointlightcount)
LightShader::PointLightScatterShader::getInstance()->SetTextureUnits(irr_driver->getDepthStencilTexture());
LightShader::PointLightScatterShader::getInstance()->setUniforms(1. / (40. * start), col);
glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, pointlightcount);
glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, MIN2(pointlightcount, MAXLIGHT));
// ***
// That might be a performance issue but if disabled the quality is severly affected (the picture looks jagged)