]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/lighting.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / materials / lighting.cpp
index f6bb39ffce98ecd701b901c223bf1244e415a9ae..d8e5400626ae43eb26221ebd92bd748bb8043972 100644 (file)
@@ -18,12 +18,13 @@ Lighting::Lighting()
        set_fog_color(Color(0.0f, 0.0f, 0.0f, 0.0f));
        set_fog_density(0.0f);
 
-       for(unsigned i=0; i<8; ++i)
+       for(unsigned i=0; i<6; ++i)
        {
                string base = format("light_sources[%d]", i);
                shdata.uniform(base+".position", Vector4(0, 0, 1, 0));
                shdata.uniform(base+".color", 0.0f, 0.0f, 0.0f);
                shdata.uniform(base+".type", 0);
+               shdata.uniform(base+".attenuation", 1.0f, 0.0f, 0.0f);
        }
 }