X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Flighting.cpp;h=6957126b6c3bfeef3ad37192c541454fecde2eef;hb=0bd265b929f0b2a9289dd72262968ad8e7bc1a0d;hp=f6bb39ffce98ecd701b901c223bf1244e415a9ae;hpb=5a01404e40717c6c2cc389ed8357713e1f216f07;p=libs%2Fgl.git diff --git a/source/materials/lighting.cpp b/source/materials/lighting.cpp index f6bb39ff..6957126b 100644 --- a/source/materials/lighting.cpp +++ b/source/materials/lighting.cpp @@ -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<7; ++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); } }