From 83a41165f9cdac6582ee390103b6e50df42deddc Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Sun, 10 Sep 2023 18:57:10 -0400 Subject: [PATCH] Preload classic water texture --- src/terrain.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/terrain.cpp b/src/terrain.cpp index d0ab0723cb6..6e87707c1d4 100644 --- a/src/terrain.cpp +++ b/src/terrain.cpp @@ -936,6 +936,12 @@ void loadWaterTextures(int maxTerrainTextureSize) ASSERT(waterTexturesHigh.tex_sm != nullptr, "Failed to load water specular maps"); } } + else if (terrainShaderQuality == TerrainShaderQuality::CLASSIC) + { + // preload classic water texture + auto pWaterTexClassic = getWaterClassicTexture(); + ASSERT_OR_RETURN(, pWaterTexClassic != nullptr, "Failed to load classic water texture?"); + } else { ASSERT_OR_RETURN(, false, "Unexpected terrainShaderQuality: %u", static_cast(terrainShaderQuality));