From f42e0d78d63b8667b7ebdd66064b22f28019d855 Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Wed, 16 Dec 2020 01:11:32 -0800 Subject: [PATCH] Don't reuse textures, and don't keep them in RAM Hopefully fixes #28 --- .../Plugins/ConformalDecals.dll | Bin 82432 -> 81920 bytes Source/ConformalDecals/Text/TextRenderer.cs | 20 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/GameData/ConformalDecals/Plugins/ConformalDecals.dll b/GameData/ConformalDecals/Plugins/ConformalDecals.dll index f519f6acf5a1ee2f3390261e5efcc6fc08f67a2a..4096d2d229b76dee2d345c07405c6dffe7af68bd 100644 GIT binary patch delta 18099 zcmb7r33wG%(srHhyKlKmxXH~%Zq}RJtdQ*n5F#LiMcG6c5EDTpEQYW{fSU+LSv549 z;KHVYpre8!BOpO!WCQ^P6j3CI3WKQ3-~bBvS5-HN&i8-M|Leos^;XrXQ>V^3-F>?| zb+h$#b^52C@OEoj@C#`F{RBygRw)mlwDGwW`m+NB^jlWhR7iYUv)kN`+T&r)TD z2%>VYxYKZDDZo!nn;p`~Ar(8&Rt(^htJ?}NWb1X_K9QMnbtfcpbtz(GAR95OeCA#N zovLy}_1^?ovI-5U)!oo&Ger%o?v8?isW&gqP<ds`$#8f?b1_*90tIQA&TT2e3!r-#5sICF9RF?n* zJvO7u$|@Y9WsS?49f1m|b`R!Wy&q$*F}bWRTXj#g213|?_zJ1^eX<`wyUP|C=z_+q zaWBouy`ykOW+hL0?h=c3BE?~Mg`uZvY#Q@ z6A=s=T@fp)zd`0}x0VO6V-0%u8M37n&YNy!_Y zocK=`y;0TYQD8&hdv>b6zz1dQ@Th!eFkTAa`n9;6)jyz`7YwaVRA6|g%c+{He?()e zBN%$?@I>oRNa|?SkH4s#9=<~SOPTR-n)tV}?%^NAB}Exg;`kXoGG(duC@r7=D91-M zh|5Yv)g9uB@_bc`NRXLO_FLqN2luRNCKs}#%Fwn z^rrSVp?p0uJyP|oJ&u-a>$rhl7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Source/ConformalDecals/Text/TextRenderer.cs b/Source/ConformalDecals/Text/TextRenderer.cs index 6c1206a..f40f2b5 100644 --- a/Source/ConformalDecals/Text/TextRenderer.cs +++ b/Source/ConformalDecals/Text/TextRenderer.cs @@ -123,7 +123,6 @@ namespace ConformalDecals.Text { job.Start(); - Texture2D texture = null; if (job.OldText != null && RenderCache.TryGetValue(job.OldText, out var oldRender)) { // old output still exists @@ -132,7 +131,7 @@ namespace ConformalDecals.Text { if (oldRender.UserCount <= 0) { // this is the only usage of this output, so we are free to re-render into the texture - texture = oldRender.Texture; + Destroy(oldRender.Texture); RenderCache.Remove(job.OldText); } } @@ -145,7 +144,7 @@ namespace ConformalDecals.Text { else { renderNeeded = true; - renderOutput = RenderText(job.NewText, texture); + renderOutput = RenderText(job.NewText); RenderCache.Add(job.NewText, renderOutput); } @@ -156,7 +155,7 @@ namespace ConformalDecals.Text { } /// Render a piece of text to a given texture - public TextRenderOutput RenderText(DecalText text, Texture2D texture) { + public TextRenderOutput RenderText(DecalText text) { if (text == null) throw new ArgumentNullException(nameof(text)); if (_tmp == null) throw new InvalidOperationException("TextMeshPro object not yet created."); @@ -209,7 +208,7 @@ namespace ConformalDecals.Text { var size = bounds.size * PixelDensity; size.x = Mathf.Max(size.x, 0.1f); size.y = Mathf.Max(size.y, 0.1f); - + var textureSize = new Vector2Int { x = Mathf.NextPowerOfTwo((int) size.x), y = Mathf.NextPowerOfTwo((int) size.y) @@ -242,12 +241,7 @@ namespace ConformalDecals.Text { }; // SETUP TEXTURE - if (texture == null) { - texture = new Texture2D(textureSize.x, textureSize.y, textTextureFormat, true); - } - else if (texture.width != textureSize.x || texture.height != textureSize.y || texture.format != textTextureFormat) { - texture.Resize(textureSize.x, textureSize.y, textTextureFormat, true); - } + var texture = new Texture2D(textureSize.x, textureSize.y, textTextureFormat, true); // GENERATE PROJECTION MATRIX var halfSize = (Vector2) textureSize / PixelDensity / 2 / sizeRatio; @@ -275,11 +269,11 @@ namespace ConformalDecals.Text { var prevRT = RenderTexture.active; RenderTexture.active = renderTex; texture.ReadPixels(new Rect(0, 0, textureSize.x, textureSize.y), 0, 0, true); - texture.Apply(); + texture.Apply(false, true); RenderTexture.active = prevRT; GL.PopMatrix(); - + // RELEASE RENDERTEX renderTex.Release(); RenderTexture.Destroy(renderTex);