Skip to content

Commit 86e4393

Browse files
committed
Hi-res screenshots use global antialiasing setting
- Instead of hardcoded 16x multisampling, `screenshot_highres` will capture the screen with current MSAA value set by user - Might be useful when user needs to take a hi-res screenshot with no antialiasing at all
1 parent 7774ffc commit 86e4393

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

engine/Sandbox.Engine/Systems/Render/Multimedia/ScreenshotService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using NativeEngine;
2+
using Sandbox.Engine.Settings;
23
using Sandbox.UI;
34
using System.Collections.Concurrent;
45
using System.IO;
@@ -130,7 +131,7 @@ public static void TakeHighResScreenshot( Scene scene, int width, int height )
130131

131132
ResizeUI( camera, requestedSize );
132133

133-
renderTarget = RenderTarget.GetTemporary( width, height, ImageFormat.Default, ImageFormat.Default, MultisampleAmount.Multisample16x, 1, "HighResScreenshot" );
134+
renderTarget = RenderTarget.GetTemporary( width, height, ImageFormat.Default, ImageFormat.Default, RenderSettings.Instance.AntiAliasQuality, 1, "HighResScreenshot" );
134135
if ( renderTarget is null )
135136
{
136137
Log.Warning( "Failed to create render target for high-res screenshot." );

0 commit comments

Comments
 (0)