From 741bb027df58fd9f30f4d94cdaf2d6416e11e3ee Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 16 Apr 2024 00:23:43 +0100 Subject: Custom vertex, vertex shader and fragment shader for landmass Handles global position type, colourBias for surface types --- game/terrain.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'game/terrain.h') diff --git a/game/terrain.h b/game/terrain.h index 54593fc..d088f89 100644 --- a/game/terrain.h +++ b/game/terrain.h @@ -2,6 +2,7 @@ #include "chronology.h" #include "collection.h" +#include "config/types.h" #include "game/worldobject.h" #include #include @@ -20,10 +21,16 @@ public: void tick(TickDuration) override; + struct Vertex { + GlobalPosition3D pos; + Normal3D normal; + RGB colourBias; + }; + private: void generateMeshes(); std::shared_ptr geoData; - Collection meshes; + Collection, false> meshes; std::shared_ptr grass; }; -- cgit v1.2.3