X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Feffects%2Fshadowmap.cpp;h=cd9ad8274c7f6f61a7ee1a68347c5b4c4201f757;hb=40db45bc521aa8cc154d745ef4b51c1358124ad3;hp=11bb706e6afa3265562e277e3ac899783e888095;hpb=82282de52e8e8f3bbafefaf92bf76f53f2c2495e;p=libs%2Fgl.git diff --git a/source/effects/shadowmap.cpp b/source/effects/shadowmap.cpp index 11bb706e..cd9ad827 100644 --- a/source/effects/shadowmap.cpp +++ b/source/effects/shadowmap.cpp @@ -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("_linear_clamp_shadow.samp")) + sampler(Resources::get_global().get("_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("_linear_clamp_shadow.samp")) + sampler(Resources::get_global().get("_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()); }