From 900d19a41bc1886e7a809d99d6119b12235a4f0a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 20 Jul 2024 10:57:17 +0100 Subject: Initial commit of basic shadow depth map creation --- game/scenary/foliage.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'game/scenary/foliage.h') diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h index 0a4261c..5367d44 100644 --- a/game/scenary/foliage.h +++ b/game/scenary/foliage.h @@ -2,6 +2,7 @@ #include "assetFactory/asset.h" #include "gfx/gl/instanceVertices.h" +#include "gfx/gl/shadowStenciller.h" #include "gfx/models/texture.h" #include "gfx/renderable.h" @@ -19,6 +20,7 @@ public: mutable InstanceVertices instances; void render(const SceneShader &) const override; void shadows(const ShadowMapper &) const override; + glTexture shadowStencil = ShadowStenciller::createStencilTexture(256, 256); protected: friend Persistence::SelectionPtrBase>; -- cgit v1.2.3 From 172beac34e82c86f8c16b8a1be5fca9d7ccfc0d1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 18 Aug 2024 16:14:29 +0100 Subject: Update asset stencils from shadow mapper --- game/scenary/foliage.h | 1 + 1 file changed, 1 insertion(+) (limited to 'game/scenary/foliage.h') diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h index 5367d44..fa6c63b 100644 --- a/game/scenary/foliage.h +++ b/game/scenary/foliage.h @@ -20,6 +20,7 @@ public: mutable InstanceVertices instances; void render(const SceneShader &) const override; void shadows(const ShadowMapper &) const override; + void updateStencil(const ShadowStenciller &) const override; glTexture shadowStencil = ShadowStenciller::createStencilTexture(256, 256); protected: -- cgit v1.2.3 From 362c6952742eb01e32fdeb2ec26a2fe463e5001c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 26 Aug 2024 13:47:22 +0100 Subject: Add a foliage vertex array for just the location data --- game/scenary/foliage.h | 1 + 1 file changed, 1 insertion(+) (limited to 'game/scenary/foliage.h') diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h index fa6c63b..824a644 100644 --- a/game/scenary/foliage.h +++ b/game/scenary/foliage.h @@ -14,6 +14,7 @@ class Foliage : public Asset, public Renderable, public StdTypeDefs { Mesh::Ptr bodyMesh; Texture::Ptr texture; glVertexArray instanceVAO; + glVertexArray instancePointVAO; public: using LocationVertex = std::pair; -- cgit v1.2.3