diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-03 19:47:46 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-03 19:48:31 +0000 |
commit | c3eea71370eb94cff1fd96185458643fab6eb2c5 (patch) | |
tree | cb331dd81d9cb36d69e1b659353796ec170a78e4 /game/terrain.cpp | |
parent | Rename Shader to SceneShader (diff) | |
download | ilt-c3eea71370eb94cff1fd96185458643fab6eb2c5.tar.bz2 ilt-c3eea71370eb94cff1fd96185458643fab6eb2c5.tar.xz ilt-c3eea71370eb94cff1fd96185458643fab6eb2c5.zip |
Restructure how shaders are worked with
Needs a tidy-up
Diffstat (limited to 'game/terrain.cpp')
-rw-r--r-- | game/terrain.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/game/terrain.cpp b/game/terrain.cpp index 911a541..31f7fb1 100644 --- a/game/terrain.cpp +++ b/game/terrain.cpp @@ -85,12 +85,11 @@ Terrain::tick(TickDuration dur) void Terrain::render(const SceneShader & shader) const { - shader.setModel(Location {}, SceneShader::Program::LandMass); + shader.landmass.use(); grass->bind(); meshes.apply(&Mesh::Draw); - shader.setModel(Location {}, SceneShader::Program::Water); - shader.setUniform("waves", {waveCycle, 0, 0}); + shader.water.use(waveCycle); water->bind(); meshes.apply(&Mesh::Draw); } |