mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Another attempt at fixing the planet glitch
This commit is contained in:
parent
8ed7a130ab
commit
e6856124e7
Binary file not shown.
@ -272,14 +272,16 @@ namespace ConformalDecals.Text {
|
||||
}
|
||||
|
||||
// COPY TEXTURE BACK INTO RAM
|
||||
var prevRT = RenderTexture.active;
|
||||
RenderTexture.active = renderTex;
|
||||
texture.ReadPixels(new Rect(0, 0, textureSize.x, textureSize.y), 0, 0, true);
|
||||
texture.Apply();
|
||||
RenderTexture.active = prevRT;
|
||||
|
||||
GL.Clear(false, true, Color.black); //KSP doesnt clear render textures before using them so we need to clear afterwards, as well. Thanks Squad.
|
||||
GL.PopMatrix();
|
||||
|
||||
// RELEASE RENDERTEX
|
||||
renderTex.Release();
|
||||
RenderTexture.Destroy(renderTex);
|
||||
|
||||
// CLEAR SUBMESHES
|
||||
|
Loading…
Reference in New Issue
Block a user