From cfdcfbb4aaa1e7c1cad36b9ac3ded6cc02fb1f14 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 2 Mar 2026 20:20:29 +0000 Subject: Calculate an appropriate billboardSize and useMeshClipDist Removes hard coded arbitrary numbers for 256px sq and 140m. --- game/scenary/foliage.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'game/scenary/foliage.h') diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h index 61bdb5b..c457404 100644 --- a/game/scenary/foliage.h +++ b/game/scenary/foliage.h @@ -1,9 +1,7 @@ #pragma once #include "assetFactory/asset.h" -#include "gfx/gl/billboardPainter.h" #include "gfx/gl/instanceVertices.h" -#include "gfx/gl/shadowStenciller.h" #include "gfx/models/texture.h" #include "gfx/renderable.h" @@ -32,13 +30,15 @@ public: void shadows(const ShadowMapper &, const Frustum &) const override; void updateStencil(const ShadowStenciller &) const override; void updateBillboard(const BillboardPainter &) const override; - glTexture shadowStencil = ShadowStenciller::createStencilTexture(256, 256); - glTextures<3> billboard = BillboardPainter::createBillBoardTextures(256, 256); protected: friend Persistence::SelectionPtrBase>; bool persist(Persistence::PersistenceStore & store) override; void postLoad() override; + GLsizei billboardSize {}; + RelativeDistance useMeshClipDist {}; + glTexture shadowStencil; + glTextures<3> billboard; private: InstanceVertices::PartitionResult instancePartitions; -- cgit v1.3