Alternate rendertex handling

This commit is contained in:
Andrew Cassidy 2020-11-22 20:18:16 -08:00
parent 334af786f6
commit 8ed7a130ab
2 changed files with 2 additions and 3 deletions

View File

@ -255,8 +255,7 @@ namespace ConformalDecals.Text {
bounds.center.y - halfSize.y, bounds.center.y + halfSize.y, -1, 1); bounds.center.y - halfSize.y, bounds.center.y + halfSize.y, -1, 1);
// GET RENDERTEX // GET RENDERTEX
var renderTex = RenderTexture.GetTemporary(textureSize.x, textureSize.y, 0, textRenderTextureFormat, RenderTextureReadWrite.Linear, 1); var renderTex = new RenderTexture(textureSize.x, textureSize.y, 0, textRenderTextureFormat, RenderTextureReadWrite.Linear) {autoGenerateMips = false};
renderTex.autoGenerateMips = false;
// RENDER // RENDER
Graphics.SetRenderTarget(renderTex); Graphics.SetRenderTarget(renderTex);
@ -281,7 +280,7 @@ namespace ConformalDecals.Text {
GL.PopMatrix(); GL.PopMatrix();
// RELEASE RENDERTEX // RELEASE RENDERTEX
RenderTexture.ReleaseTemporary(renderTex); RenderTexture.Destroy(renderTex);
// CLEAR SUBMESHES // CLEAR SUBMESHES
_tmp.text = ""; _tmp.text = "";