You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3340659 on 2017/03/09 by nick.bullard Submitting Template map with update to lighting. The direction of the light was not optimal for looking down X+ for screenshots, which is what the SSF actor does be default. Change 3340686 on 2017/03/09 by Nick.Bullard Updating Animaton/SetVertexColor map to use Template map setup. Change 3364139 on 2017/03/24 by Nick.Darnell Automation - Removing the option to disable taking screenshots, doesn't make sense to have that any more. Screenshot comparison in an intergal part of the tests now. Automation - The system now waits for the asset registry to finish loading assets before running tests. Change 3364149 on 2017/03/24 by Nick.Darnell Automation - Fixing a bug with the source control not reverting the state of screenshots before marking them for delete. Change 3364588 on 2017/03/24 by Nick.Darnell Removing the allow screenshots option. Change 3364591 on 2017/03/24 by Nick.Darnell Automation - Making the camera functional test actor respect the delay. Change 3364598 on 2017/03/24 by Nick.Darnell Automation - Disabling Noisy rendering features now actually disables TAA, instead of enabling FXAA. Change 3364723 on 2017/03/25 by Nick.Darnell Automation - Fixing the client functional test runner to pass object and package path so that in the editor we can reliably load a particular map with object path, but for actually opening the map we can use the package path when running the test since that is what works at editor and in a cooked game. Change 3366600 on 2017/03/27 by Nick.Bullard Adding FuntionalTest map back as selection in New Map window Change 3367590 on 2017/03/28 by Nick.Darnell Automation - Fixing a bug with initial tolerence levels. They showed as 'Low' in the UI, but the values were in fact all set to 0. So new screenshot tests had zero tolerence for pixel differences. Automation - Adding some documentation to Functional Test. Change 3367602 on 2017/03/28 by Nick.Darnell Automation - Forcing more things to stream in before the screenshots are taken. Change 3367604 on 2017/03/28 by Nick.Darnell Automation - Adding some flare to how disabled functional test actors appear in the editor. Change 3368024 on 2017/03/28 by mason.seay Added new test to map. Disabled since it hasn't ran at all Change 3368109 on 2017/03/28 by mason.seay Updating authorship on test actors Change 3369701 on 2017/03/29 by Nick.Bullard Removing old Ground Truth images. Investigating why new copies were made rather than replacing original. Change 3373253 on 2017/03/30 by Samuel.Proctor Test updates for Containers. Adding coverage for native containers Change 3373294 on 2017/03/30 by Nick.Darnell Automation - Fixing a bug with Tolerence levels set via blueprints, now properly configuring the tolerence amounts before the screenshot is taken. Change 3374355 on 2017/03/31 by Samuel.Proctor Added testing scenarios to the test actors and fixed a few typos. [CL 3376906 by Nick Darnell in Main branch]
197 lines
5.6 KiB
C++
197 lines
5.6 KiB
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "AutomationScreenshotOptions.generated.h"
|
|
|
|
UENUM(BlueprintType)
|
|
enum class EComparisonTolerance : uint8
|
|
{
|
|
Zero,
|
|
Low,
|
|
Medium,
|
|
High,
|
|
Custom
|
|
};
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FComparisonToleranceAmount
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
FComparisonToleranceAmount()
|
|
: Red(0)
|
|
, Green(0)
|
|
, Blue(0)
|
|
, Alpha(0)
|
|
, MinBrightness(0)
|
|
, MaxBrightness(255)
|
|
{
|
|
}
|
|
|
|
FComparisonToleranceAmount(uint8 R, uint8 G, uint8 B, uint8 A, uint8 InMinBrightness, uint8 InMaxBrightness)
|
|
: Red(R)
|
|
, Green(G)
|
|
, Blue(B)
|
|
, Alpha(A)
|
|
, MinBrightness(InMinBrightness)
|
|
, MaxBrightness(InMaxBrightness)
|
|
{
|
|
}
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category="Tolerance")
|
|
uint8 Red;
|
|
|
|
UPROPERTY(EditAnywhere, Category="Tolerance")
|
|
uint8 Green;
|
|
|
|
UPROPERTY(EditAnywhere, Category="Tolerance")
|
|
uint8 Blue;
|
|
|
|
UPROPERTY(EditAnywhere, Category="Tolerance")
|
|
uint8 Alpha;
|
|
|
|
UPROPERTY(EditAnywhere, Category="Tolerance")
|
|
uint8 MinBrightness;
|
|
|
|
UPROPERTY(EditAnywhere, Category="Tolerance")
|
|
uint8 MaxBrightness;
|
|
};
|
|
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FAutomationScreenshotOptions
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
FAutomationScreenshotOptions()
|
|
: Resolution(ForceInit)
|
|
, Delay(0.2f)
|
|
, bDisableNoisyRenderingFeatures(true)
|
|
, VisualizeBuffer(NAME_None)
|
|
, Tolerance(EComparisonTolerance::Zero)
|
|
, ToleranceAmount()
|
|
, MaximumLocalError(0.10f)
|
|
, MaximumGlobalError(0.02f)
|
|
, bIgnoreAntiAliasing(true)
|
|
, bIgnoreColors(false)
|
|
{
|
|
}
|
|
|
|
FAutomationScreenshotOptions(EComparisonTolerance InTolerance)
|
|
: Resolution(ForceInit)
|
|
, Delay(0.2f)
|
|
, bDisableNoisyRenderingFeatures(true)
|
|
, VisualizeBuffer(NAME_None)
|
|
, Tolerance(InTolerance)
|
|
, ToleranceAmount()
|
|
, MaximumLocalError(0.10f)
|
|
, MaximumGlobalError(0.02f)
|
|
, bIgnoreAntiAliasing(true)
|
|
, bIgnoreColors(false)
|
|
{
|
|
SetToleranceAmounts(InTolerance);
|
|
}
|
|
|
|
/**
|
|
* The desired resolution of the screenshot, if none is provided, it will use the default for the
|
|
* platform setup in the automation settings.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Screenshot")
|
|
FVector2D Resolution;
|
|
|
|
/**
|
|
* The delay before we take the screenshot.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Screenshot")
|
|
float Delay;
|
|
|
|
/**
|
|
* Disables Anti-Aliasing, Motion Blur, Screen Space Reflections, Eye Adaptation and Contact Shadows,
|
|
* because those features contribute a lot to the noise in the final rendered image. If you're explicitly
|
|
* looking for changes
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Screenshot")
|
|
bool bDisableNoisyRenderingFeatures;
|
|
|
|
/**
|
|
* Allows you to screenshot a buffer other than the default final lit scene image. Useful if you're
|
|
* trying to build a test for a specific GBuffer, that may be harder to tell if errors are introduced
|
|
* in it.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Screenshot")
|
|
FName VisualizeBuffer;
|
|
|
|
/**
|
|
* These are quick defaults for tolerance levels, we default to low, because generally there's some
|
|
* constant variability in every pixel's color introduced by TxAA.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Comparison")
|
|
EComparisonTolerance Tolerance;
|
|
|
|
/**
|
|
* For each channel and brightness levels you can control a region where the colors are found to be
|
|
* essentially the same. Generally this is necessary as modern rendering techniques tend to introduce
|
|
* noise constantly to hide aliasing.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Comparison")
|
|
FComparisonToleranceAmount ToleranceAmount;
|
|
|
|
/**
|
|
* After you've accounted for color tolerance changes, you now need to control for local acceptable error.
|
|
* Which depending on how pixels were colored on triangle edges may be a few percent of the image being
|
|
* outside the tolerance levels. Unlike the MaximumGlobalError, the MaximumLocalError works by focusing
|
|
* on a smaller subset of the image. These chunks will have be compared to the local error, in an attempt
|
|
* to locate hot spots of change that are important, that would be ignored by the global error.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Comparison", meta=( ClampMin = 0, ClampMax = 1, UIMin = 0, UIMax = 1 ))
|
|
float MaximumLocalError;
|
|
|
|
/**
|
|
* After you've accounted for color tolerance changes, you now need to control for total acceptable error.
|
|
* Which depending on how pixels were colored on triangle edges may be a few percent of the image being
|
|
* outside the tolerance levels.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Comparison", meta=( ClampMin = 0, ClampMax = 1, UIMin = 0, UIMax = 1 ))
|
|
float MaximumGlobalError;
|
|
|
|
/**
|
|
* If this is true, we search neighboring pixels looking for the expected pixel as what may have happened, is
|
|
* that the pixel shifted a little.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Comparison")
|
|
bool bIgnoreAntiAliasing;
|
|
|
|
/**
|
|
* If this is true, all we compare is luminance of the scene.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Comparison", AdvancedDisplay)
|
|
bool bIgnoreColors;
|
|
|
|
public:
|
|
void SetToleranceAmounts(EComparisonTolerance InTolerance)
|
|
{
|
|
switch ( InTolerance )
|
|
{
|
|
case EComparisonTolerance::Zero:
|
|
ToleranceAmount = FComparisonToleranceAmount(0, 0, 0, 0, 0, 255);
|
|
break;
|
|
case EComparisonTolerance::Low:
|
|
ToleranceAmount = FComparisonToleranceAmount(16, 16, 16, 16, 16, 240);
|
|
break;
|
|
case EComparisonTolerance::Medium:
|
|
ToleranceAmount = FComparisonToleranceAmount(24, 24, 24, 24, 24, 220);
|
|
break;
|
|
case EComparisonTolerance::High:
|
|
ToleranceAmount = FComparisonToleranceAmount(32, 32, 32, 32, 64, 96);
|
|
break;
|
|
}
|
|
}
|
|
};
|