From c3b339da673601c283abf9222b5e8f66ba80a688 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 23 Jul 2019 10:04:00 +0300 Subject: [PATCH] Allow access to ShadowMap's texture and matrix from outside This is necessary if a postprocessor wants to access the shadow map for deferred shading. --- source/shadowmap.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/shadowmap.h b/source/shadowmap.h index c2c104ac..fe36fca0 100644 --- a/source/shadowmap.h +++ b/source/shadowmap.h @@ -52,6 +52,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(); -- 2.45.2