Lights: Make possible for gpu drivers to unroll loop.

GPU doesn't like indirect addressing and thus it's better to have unrolled loop. This is only possible for loop with a static iteration count.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14830 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
vincentlj
2013-12-29 18:37:45 +00:00
parent 4c725ac8f4
commit a2d1a86bac
3 changed files with 13 additions and 3 deletions

View File

@@ -364,7 +364,6 @@ void PointLightProvider::OnSetConstants(IMaterialRendererServices *srv, int)
srv->setVertexShaderConstant("col[0]", m_color.data(), m_color.size());
srv->setVertexShaderConstant("center[0]", m_pos.data(), m_pos.size());
srv->setVertexShaderConstant("viewm", m_view.pointer(), 16);
srv->setVertexShaderConstant("lightcount", &lightcount, 1);
if (!firstdone)
{