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