Test screenshots through ViewportCapture: sRGB instead of the dark linear HDR frame
This commit is contained in:
1 parent
ce62db9553
commit
9bf0ec9de6
1 file changed
+2
-1
@@ -6,6 +6,7 @@ using Cthangover.Core.Settings;
|
|||||||
using Cthangover.Core.UI;
|
using Cthangover.Core.UI;
|
||||||
using Cthangover.Core.Utils;
|
using Cthangover.Core.Utils;
|
||||||
using Cthangover.Mods.Dialog;
|
using Cthangover.Mods.Dialog;
|
||||||
|
using Cthangover.Mods.Interface.View;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Cthangover.Mods.CthangoverGame.Tests
|
namespace Cthangover.Mods.CthangoverGame.Tests
|
||||||
@@ -257,7 +258,7 @@ namespace Cthangover.Mods.CthangoverGame.Tests
|
|||||||
if (string.IsNullOrEmpty(shotsDir) || DisplayServer.GetName() == "headless")
|
if (string.IsNullOrEmpty(shotsDir) || DisplayServer.GetName() == "headless")
|
||||||
return;
|
return;
|
||||||
DirAccess.MakeDirRecursiveAbsolute(shotsDir);
|
DirAccess.MakeDirRecursiveAbsolute(shotsDir);
|
||||||
GetViewport().GetTexture().GetImage()?.SavePng(shotsDir.TrimEnd('/') + "/" + name + ".png");
|
ViewportCapture.SavePng(GetViewport(), shotsDir.TrimEnd('/') + "/" + name + ".png");
|
||||||
GameLogger.Log("TEST", $"SiteShotsDriver: saved {name}.png");
|
GameLogger.Log("TEST", $"SiteShotsDriver: saved {name}.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user