X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fshadowmap.h;h=e142fc8cafdd56023459035f53d48e73205c997b;hb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;hp=c2c104aca9c69d4d32a669f4f508e4c4d5faa3d6;hpb=74e1414b1f86d6be0b0100b196b9b112cdda0435;p=libs%2Fgl.git diff --git a/source/shadowmap.h b/source/shadowmap.h index c2c104ac..e142fc8c 100644 --- a/source/shadowmap.h +++ b/source/shadowmap.h @@ -27,12 +27,15 @@ private: Framebuffer fbo; Matrix shadow_matrix; Texture2D depth_buf; + RefPtr sampler; Vector3 target; float radius; float depth_bias; mutable ProgramData shdata; bool rendered; + static WeakPtr shadow_sampler; + public: ShadowMap(unsigned, Renderable &, const Light &); @@ -52,6 +55,9 @@ public: thin objects from casting shadows on nearby sufraces. */ void set_depth_bias(float); + const Texture2D &get_depth_texture() const { return depth_buf; } + const Matrix &get_shadow_matrix() const { return shadow_matrix; } + virtual void setup_frame(Renderer &); virtual void finish_frame();