Skip to content

Commit

Permalink
Texture re render (#228)
Browse files Browse the repository at this point in the history
* Add missing bundle and missing configuration

* Cache texture before re-rendering
  • Loading branch information
konraddysput authored Sep 6, 2024
1 parent eec2617 commit f081bd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Runtime/Model/Database/BacktraceDatabaseAttachmentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ private string GetScreenshotPath(string dataPrefix)
// Create a render texture to render into
RenderTexture rt = RenderTexture.GetTemporary(targetWidth, targetHeight);

RenderTexture previousActiveRT = RenderTexture.active;

if (SystemInfo.graphicsUVStartsAtTop)
{
Graphics.Blit(screenTexture, rt, new Vector2(1.0f, -1.0f), new Vector2(0.0f, 1.0f));
Expand All @@ -130,7 +132,6 @@ private string GetScreenshotPath(string dataPrefix)
Graphics.Blit(screenTexture, rt);
}

RenderTexture previousActiveRT = RenderTexture.active;
RenderTexture.active = rt;

// Create a texture & read data from the active RenderTexture
Expand Down

0 comments on commit f081bd0

Please sign in to comment.