summaryrefslogtreecommitdiff
path: root/game/terrain.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 00:17:58 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 00:17:58 +0000
commit2bc4bcebc93e7211dfb84303888635f888ba8018 (patch)
tree3a349beadc079c544001f3a65ac0e26fe494f8e5 /game/terrain.h
parentCreate smoother terrain (diff)
downloadilt-2bc4bcebc93e7211dfb84303888635f888ba8018.tar.bz2
ilt-2bc4bcebc93e7211dfb84303888635f888ba8018.tar.xz
ilt-2bc4bcebc93e7211dfb84303888635f888ba8018.zip
Custom land and water shaders
Create sandy beaches, snow topped mountains and grassy hills with a single texture, coloured according to land height by a custom shader. Also use the land mass mesh with a new water texture and a custom shader to create rather nice looking water effect with depth, waves and motion.
Diffstat (limited to 'game/terrain.h')
-rw-r--r--game/terrain.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/game/terrain.h b/game/terrain.h
index 1aed1c5..2cec963 100644
--- a/game/terrain.h
+++ b/game/terrain.h
@@ -20,13 +20,13 @@ public:
void render(const Shader & shader) const override;
- void tick(TickDuration) override { }
+ void tick(TickDuration) override;
+ float waveCycle {0.F};
private:
static constexpr unsigned int NUM_BUFFERS {4};
void finish(unsigned int width, unsigned int height, std::vector<Vertex> &);
- void addWater(unsigned int width, unsigned int height, unsigned int resolution);
Collection<Mesh, false> meshes;
std::shared_ptr<Texture> grass, water;