mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Alternate rendertex handling
This commit is contained in:
parent
334af786f6
commit
8ed7a130ab
Binary file not shown.
@ -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 = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user