diff --git a/crest/Assets/Crest/Crest/Scripts/LodData/OceanDepthCache.cs b/crest/Assets/Crest/Crest/Scripts/LodData/OceanDepthCache.cs index 13285132a..dc8622a4f 100644 --- a/crest/Assets/Crest/Crest/Scripts/LodData/OceanDepthCache.cs +++ b/crest/Assets/Crest/Crest/Scripts/LodData/OceanDepthCache.cs @@ -433,6 +433,8 @@ public override void OnInspectorGUI() ti.wrapMode = TextureWrapMode.Clamp; // Values are slightly different with NPOT Scale applied. ti.npotScale = TextureImporterNPOTScale.None; + // Round up so it encompasses desired resolution. + ti.maxTextureSize = Mathf.RoundToInt(Mathf.Pow(2f, Mathf.Ceil(Mathf.Log(dc._resolution, 2f)))); ti.SaveAndReimport(); Debug.Log("Crest: Cache saved to " + path, AssetDatabase.LoadAssetAtPath(path));