From 9ecec749060a05705d7c7eb200949e17a84702a1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 28 Feb 2026 13:49:27 +0000 Subject: Add BillboardProgram to SceneShader The implementation is overly simple/incomplete, I'm not even convince what is there is right, but it's a decent start. --- gfx/gl/sceneShader.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gfx/gl/sceneShader.h') diff --git a/gfx/gl/sceneShader.h b/gfx/gl/sceneShader.h index 47d4397..faba4a4 100644 --- a/gfx/gl/sceneShader.h +++ b/gfx/gl/sceneShader.h @@ -32,6 +32,17 @@ class SceneShader { RequiredUniformLocation modelPosLoc {*this, "modelPos"}; }; + class BillboardProgram : public SceneProgram { + public: + BillboardProgram(); + + void use(RelativeDistance size, RelativePosition3D centre) const; + + private: + RequiredUniformLocation sizeLoc {*this, "size"}; + RequiredUniformLocation centreLoc {*this, "centre"}; + }; + class AbsolutePosProgram : public SceneProgram { public: using Program::use; @@ -74,6 +85,7 @@ public: BasicProgram basic; WaterProgram water; AbsolutePosProgram basicInst, absolute, spotLightInst, pointLightInst; + BillboardProgram billboard; LandmassProgram landmass; NetworkProgram networkStraight, networkCurve; -- cgit v1.3