X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fshadowmap.cpp;h=0e32210f49a044a36f4977fc1e069854ee42f57a;hb=929a2d975be0590503fe6701526dd9536e60e026;hp=515830461cd02b9ec103038336e34ee7d6f11269;hpb=e3695cd86df434014dce1622851f713a128e9821;p=libs%2Fgl.git diff --git a/source/shadowmap.cpp b/source/shadowmap.cpp index 51583046..0e32210f 100644 --- a/source/shadowmap.cpp +++ b/source/shadowmap.cpp @@ -24,7 +24,7 @@ ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l): depth_buf.set_compare_enabled(true); depth_buf.set_compare_func(LEQUAL); depth_buf.set_wrap(CLAMP_TO_EDGE); - depth_buf.storage(DEPTH_COMPONENT, size, size); + depth_buf.storage(DEPTH_COMPONENT, size, size, 1); fbo.attach(DEPTH_ATTACHMENT, depth_buf, 0); fbo.require_complete(); @@ -99,7 +99,7 @@ void ShadowMap::render(Renderer &renderer, const Tag &tag) const unsigned unit = renderer.allocate_effect_texunit(); int iunit = unit; - shdata.uniform("shadow", iunit); + shdata.uniform("shadow_map", iunit); Bind _bind_depth(depth_buf, unit);