summaryrefslogtreecommitdiff
path: root/game/scenary/foliage.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-09-23 20:12:48 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-09-23 20:12:48 +0100
commitdbbfd39eef3b4d063ab7cdeb8d139b1bc11ba72c (patch)
tree0a880b2d14ac152014649d32088b73f17bf77297 /game/scenary/foliage.h
parentMerge branch 'sunpos' (diff)
parentPopulate all layers of shadow stencil with view from all around (diff)
downloadilt-dbbfd39eef3b4d063ab7cdeb8d139b1bc11ba72c.tar.bz2
ilt-dbbfd39eef3b4d063ab7cdeb8d139b1bc11ba72c.tar.xz
ilt-dbbfd39eef3b4d063ab7cdeb8d139b1bc11ba72c.zip
Psycho-rebased branch billboard-shadows on top of main
Diffstat (limited to 'game/scenary/foliage.h')
-rw-r--r--game/scenary/foliage.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h
index 0a4261c..824a644 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"
@@ -13,12 +14,15 @@ class Foliage : public Asset, public Renderable, public StdTypeDefs<Foliage> {
Mesh::Ptr bodyMesh;
Texture::Ptr texture;
glVertexArray instanceVAO;
+ glVertexArray instancePointVAO;
public:
using LocationVertex = std::pair<glm::mat3, GlobalPosition3D>;
mutable InstanceVertices<LocationVertex> 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:
friend Persistence::SelectionPtrBase<std::shared_ptr<Foliage>>;