]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/shadowmap.cpp
Set shadowmap darkness to 1.0 by default
[libs/gl.git] / source / effects / shadowmap.cpp
index 11bb706e6afa3265562e277e3ac899783e888095..cd9ad8274c7f6f61a7ee1a68347c5b4c4201f757 100644 (file)
@@ -13,20 +13,20 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-ShadowMap::ShadowMap(Resources &resources, unsigned s, Renderable &r, const Light &l, Renderable &c):
+ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l, Renderable &c):
        Effect(r),
        light(l),
        shadow_caster(c),
-       sampler(resources.get<Sampler>("_linear_clamp_shadow.samp"))
+       sampler(Resources::get_global().get<Sampler>("_linear_clamp_shadow.samp"))
 {
        init(s);
 }
 
-ShadowMap::ShadowMap(Resources &resources, unsigned s, Renderable &r, const Light &l):
+ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l):
        Effect(r),
        light(l),
        shadow_caster(r),
-       sampler(resources.get<Sampler>("_linear_clamp_shadow.samp"))
+       sampler(Resources::get_global().get<Sampler>("_linear_clamp_shadow.samp"))
 {
        init(s);
 }
@@ -42,7 +42,7 @@ void ShadowMap::init(unsigned s)
        fbo.attach(DEPTH_ATTACHMENT, depth_buf, 0);
        fbo.require_complete();
 
-       set_darkness(0.7);
+       set_darkness(1.0f);
        shdata.uniform("shd_world_matrix", Matrix());
 }