summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneShader.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-02-28 13:49:27 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-02-28 13:54:13 +0000
commit9ecec749060a05705d7c7eb200949e17a84702a1 (patch)
treedb36f49685662d6c423eb196fc5e64c5f89f5daa /gfx/gl/sceneShader.h
parentUse RelativeDistance in Camera near/fear and expose member variables (diff)
downloadilt-9ecec749060a05705d7c7eb200949e17a84702a1.tar.bz2
ilt-9ecec749060a05705d7c7eb200949e17a84702a1.tar.xz
ilt-9ecec749060a05705d7c7eb200949e17a84702a1.zip
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.
Diffstat (limited to 'gfx/gl/sceneShader.h')
-rw-r--r--gfx/gl/sceneShader.h12
1 files changed, 12 insertions, 0 deletions
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;