Test screenshots through ViewportCapture: sRGB instead of the dark linear HDR frame
This commit is contained in:
1 parent
10214416ad
commit
281b722667
1 file changed
+2
-1
@@ -7,6 +7,7 @@ using Cthangover.Core.Games;
|
|||||||
using Cthangover.Core.Scenes;
|
using Cthangover.Core.Scenes;
|
||||||
using Cthangover.Core.Settings;
|
using Cthangover.Core.Settings;
|
||||||
using Cthangover.Core.Utils;
|
using Cthangover.Core.Utils;
|
||||||
|
using Cthangover.Mods.Interface.View;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Cthangover.Mods.Rpg.Tests
|
namespace Cthangover.Mods.Rpg.Tests
|
||||||
@@ -287,7 +288,7 @@ namespace Cthangover.Mods.Rpg.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('/') + "/rpg_" + name + ".png");
|
ViewportCapture.SavePng(GetViewport(), shotsDir.TrimEnd('/') + "/rpg_" + name + ".png");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Finish()
|
private void Finish()
|
||||||
|
|||||||
Reference in new issue
Block a user