From 15ab4204c8200dab98058da2296f8746ec75f293 Mon Sep 17 00:00:00 2001 From: Dale Eidd Date: Sun, 8 May 2022 15:27:07 -0700 Subject: [PATCH 1/2] Fix baked texture size limit Texture import settings could restrict size. --- crest/Assets/Crest/Crest/Scripts/LodData/OceanDepthCache.cs | 2 ++ 1 file changed, 2 insertions(+) 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)); From 84783b538083025c32b606fa851d07642aeec353 Mon Sep 17 00:00:00 2001 From: Dale Eidd Date: Sun, 8 May 2022 15:29:40 -0700 Subject: [PATCH 2/2] Docs: release notes --- docs/about/history.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/about/history.rst b/docs/about/history.rst index be02103c2..97a57c315 100644 --- a/docs/about/history.rst +++ b/docs/about/history.rst @@ -34,6 +34,7 @@ Fixed - Fix several *Texture2D* and *RenderTexture* memory and reference leaks. - Fix excessively long build times when no *Underwater Renderer* is present in scene. - Fix *Underwater Renderer* not working with varying water level. + - Fix *Ocean Depth Cache* baked texture size being restricted by texture import settings. .. only:: birp