diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-04-16 00:23:43 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-04-16 00:23:43 +0100 |
commit | 741bb027df58fd9f30f4d94cdaf2d6416e11e3ee (patch) | |
tree | 67a91f8c4f5394df90bf7ce149229bb85389749f /game/terrain.h | |
parent | Create terrain vertices per surface type (diff) | |
download | ilt-741bb027df58fd9f30f4d94cdaf2d6416e11e3ee.tar.bz2 ilt-741bb027df58fd9f30f4d94cdaf2d6416e11e3ee.tar.xz ilt-741bb027df58fd9f30f4d94cdaf2d6416e11e3ee.zip |
Custom vertex, vertex shader and fragment shader for landmass
Handles global position type, colourBias for surface types
Diffstat (limited to 'game/terrain.h')
-rw-r--r-- | game/terrain.h | 9 |
1 files changed, 8 insertions, 1 deletions
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 <gfx/models/mesh.h> #include <gfx/renderable.h> @@ -20,10 +21,16 @@ public: void tick(TickDuration) override; + struct Vertex { + GlobalPosition3D pos; + Normal3D normal; + RGB colourBias; + }; + private: void generateMeshes(); std::shared_ptr<GeoData> geoData; - Collection<Mesh, false> meshes; + Collection<MeshT<Vertex>, false> meshes; std::shared_ptr<Texture> grass; }; |