Forráskód Böngészése

ATOM-14765 Add More Texture Preset Masks

In the engine, we updated the image preset settings to fix various issues with the file masks. Some texture maps were getting processed incorrectly. Due to these changes, we have to update AtomSampleViewer to accommodate these changes.
- Updated some of the offical baseline screenshots, especially for test cases that use parallax.
- Updated the default parallax factor for the Features/Parallax test sample, as well as the test script. Since the image processing has changed and a gamma correction is no longer applied, we need a stronger factor to get a similar depth.
- Also, added a checkbox to AtomSampleViewer test results dialog to make the "Update" buttons always visible. This allows you to update the official baseline screenshot even if the test is passing, but you know the baseline needs to be udpated.
Chris Santora 4 éve
szülő
commit
11f6e92d1b

+ 4 - 2
Gem/Code/Source/Automation/ScriptReporter.cpp

@@ -446,6 +446,8 @@ namespace AtomSampleViewer
             ImGui::Combo("Display", &displayOption, DiplayOptions, AZ_ARRAY_SIZE(DiplayOptions));
             ImGui::Combo("Display", &displayOption, DiplayOptions, AZ_ARRAY_SIZE(DiplayOptions));
             m_displayOption = (DisplayOption)displayOption;
             m_displayOption = (DisplayOption)displayOption;
 
 
+            ImGui::Checkbox("Force Show 'Update' Buttons", &m_forceShowUpdateButtons);
+
             bool showWarnings = (m_displayOption == DisplayOption::AllResults) || (m_displayOption == DisplayOption::WarningsAndErrors);
             bool showWarnings = (m_displayOption == DisplayOption::AllResults) || (m_displayOption == DisplayOption::WarningsAndErrors);
             bool showAll = (m_displayOption == DisplayOption::AllResults);
             bool showAll = (m_displayOption == DisplayOption::AllResults);
 
 
@@ -610,7 +612,7 @@ namespace AtomSampleViewer
                                 ShowDiffButton("View Diff", screenshotResult.m_officialBaselineScreenshotFilePath, screenshotResult.m_screenshotFilePath);
                                 ShowDiffButton("View Diff", screenshotResult.m_officialBaselineScreenshotFilePath, screenshotResult.m_screenshotFilePath);
                                 ImGui::PopID();
                                 ImGui::PopID();
 
 
-                                if (!screenshotPassed && ImGui::Button("Update"))
+                                if ((!screenshotPassed || m_forceShowUpdateButtons) && ImGui::Button("Update##Official"))
                                 {
                                 {
                                     if (screenshotResult.m_localComparisonResult.m_resultCode == ImageComparisonResult::ResultCode::FileNotFound)
                                     if (screenshotResult.m_localComparisonResult.m_resultCode == ImageComparisonResult::ResultCode::FileNotFound)
                                     {
                                     {
@@ -649,7 +651,7 @@ namespace AtomSampleViewer
                                 ShowDiffButton("View Diff", screenshotResult.m_localBaselineScreenshotFilePath, screenshotResult.m_screenshotFilePath);
                                 ShowDiffButton("View Diff", screenshotResult.m_localBaselineScreenshotFilePath, screenshotResult.m_screenshotFilePath);
                                 ImGui::PopID();
                                 ImGui::PopID();
 
 
-                                if (localBaselineWarning && ImGui::Button("Update"))
+                                if ((localBaselineWarning || m_forceShowUpdateButtons) && ImGui::Button("Update##Local"))
                                 {
                                 {
                                     if (screenshotResult.m_localComparisonResult.m_resultCode == ImageComparisonResult::ResultCode::FileNotFound)
                                     if (screenshotResult.m_localComparisonResult.m_resultCode == ImageComparisonResult::ResultCode::FileNotFound)
                                     {
                                     {

+ 1 - 0
Gem/Code/Source/Automation/ScriptReporter.h

@@ -248,6 +248,7 @@ namespace AtomSampleViewer
         AZStd::vector<size_t> m_currentScriptIndexStack; //< Tracks which of the scripts in m_scriptReports is currently active
         AZStd::vector<size_t> m_currentScriptIndexStack; //< Tracks which of the scripts in m_scriptReports is currently active
         bool m_showReportDialog = false;
         bool m_showReportDialog = false;
         DisplayOption m_displayOption = DisplayOption::AllResults;
         DisplayOption m_displayOption = DisplayOption::AllResults;
+        bool m_forceShowUpdateButtons = false; //< By default, the "Update" buttons are visible only for failed screenshots. This forces them to be visible.
         AZStd::string m_officialBaselineSourceFolder; //< Used for updating official baseline screenshots
         AZStd::string m_officialBaselineSourceFolder; //< Used for updating official baseline screenshots
     };
     };
 
 

+ 1 - 1
Gem/Code/Source/ParallaxMappingExampleComponent.h

@@ -104,7 +104,7 @@ namespace AtomSampleViewer
         // parallax setting
         // parallax setting
         bool m_parallaxEnable = true;
         bool m_parallaxEnable = true;
         bool m_pdoEnable = true;
         bool m_pdoEnable = true;
-        float m_parallaxFactor = 0.03f;
+        float m_parallaxFactor = 0.05f;
         // see StandardPbr.materialtype for the full enum list.
         // see StandardPbr.materialtype for the full enum list.
         int m_parallaxAlgorithm = 2; // POM
         int m_parallaxAlgorithm = 2; // POM
         int m_parallaxQuality = 2;   // High
         int m_parallaxQuality = 2;   // High

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_1.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:bb07edf4d5f0d5b012466431328d4baae4b388f45337352bfc3abfcb1d530405
+oid sha256:b3554310eb4971d160135bdf6b55425e6b48d9d13d73b5ed2743e6281443c646
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_2.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:a09a0503040c4b2d161793b420ba578b03350af42078c26d5a7a8c5832d13eb8
+oid sha256:45a7a3ab9e53e5adb9bd5a831e8217fbe601b5de7dbc9a4d4411381e486becb0
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_2ndUv_1.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:b23c815e236789364abde51fa1f2e815170f4c912c144950aa437174e24ae67b
+oid sha256:bb2d98078c164a58d6fe82ed16a9575c7af9e178ec214913d4064524d9d988d1
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_2ndUv_2.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:b23c815e236789364abde51fa1f2e815170f4c912c144950aa437174e24ae67b
+oid sha256:bb2d98078c164a58d6fe82ed16a9575c7af9e178ec214913d4064524d9d988d1
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_3.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:3bd9dee4cf47cad33bb1b2b0f6c6c7dde5bcf6a97f6e87d722ae6c6e409f614e
+oid sha256:a41fd4458f738e2de8ba65e44bf62cf1d099725f6b1aff80047c42f04d1aec2d
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_4.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:9a55b0f7d13ab0e32fcf3866dc543e8a7a51626530182416425fd5c95b833cab
+oid sha256:8e038646c2f8d81eb37b625862a66597892dd61f2b5e0e7cc5983c585978c2e8
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_5.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:286cc4973b9fb0b69c56daf84d50a5414a4bd306cac600c29388657c72301381
+oid sha256:e344253c8b2d9c2f877ab17a16c9d3c0ce1b78dd0fb3ca030787cebd8b3cb751
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_6.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:96cd31bdc9d548d7ea4a61d3d46c9456409de31cf56e7717c618b16fb98ae1d6
+oid sha256:3809bcfe1172ad022d6f3226125f25f54bcde2ae683f34d1f21291837e99423d
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/ParallaxTest/screenshot_7.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:cec1d6c2a10583f6f0957aefa80622cb67a33e533a40da34996cef8944da1a10
+oid sha256:b4d762b981a5780e08aa5711ffdf93f118ca4d5c4f20053938aaa13d8150f09a
 size 4320016
 size 4320016

+ 1 - 1
Scripts/ExpectedScreenshots/StandardMultilayerPBR/001_manyfeatures.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:0e9bf9384a8edb7900c60c3974bfe48dd6f4cfde9635378699fc5698b5d97b2f
+oid sha256:0effac819706bc2d0f9ec9ac469491e7afb3675416b5c2be39b85fa2491a6ebc
 size 2994018
 size 2994018

+ 1 - 1
Scripts/ExpectedScreenshots/StandardMultilayerPBR/002_parallaxpdo.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:f125933fe0101f9a9b77689cd924d0da0699f21eb57d27280ed3117cb809db99
+oid sha256:e35256d78b158e2bd17fa04fb53f8125d1964ff4be2fe7d58b95af4742a3c8d7
 size 2994018
 size 2994018

+ 1 - 1
Scripts/ExpectedScreenshots/StandardMultilayerPBR/003_debug_depthmaps.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:53e73705a57506fa56a6c76e7403c877318ef422d61b64e6ba9e14bc71badfbb
+oid sha256:a9ac442fb3ed6406ea70aaa1321959a663aa1ca8526f9cd2b482bbe2930812ad
 size 2994018
 size 2994018

+ 1 - 1
Scripts/ExpectedScreenshots/StandardMultilayerPBR/004_usevertexcolors.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:c066a5c11991398643db3dafa0627986a047d0a82878e926fbdee2ae4fc312cc
+oid sha256:c3fff207d39d2ded8c1bebe03304ac9a702c29cf86b76f1ccc3f37dcc0039d47
 size 2994018
 size 2994018

+ 1 - 1
Scripts/ExpectedScreenshots/StandardMultilayerPBR/004_usevertexcolors_modelhasnovertexcolors.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:c3c68a224e8f0ebfdd8398e756a9a44dec8d8bcd9945c7e24955145833ebb852
+oid sha256:b9016c4500a1678f572a40467cfb90df950388bc3bb511dfce5f58ae2f88f9d8
 size 2994018
 size 2994018

+ 1 - 1
Scripts/ExpectedScreenshots/StandardPBR/012_parallax_pom.ppm

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:7c4fbd4c5a97282f7be77bed12aeafe4bf6c3a1b15b2c68a3601ffbe183b8207
+oid sha256:9cf2dd7612bb0ea15358f0418c9f1bad7580ba4e5b790a4286831003eb3b7f3e
 size 2994018
 size 2994018

+ 1 - 0
Scripts/ParallaxTest.bv.lua

@@ -20,6 +20,7 @@ ResizeViewport(1600, 900)
 SelectImageComparisonToleranceLevel("Level I")
 SelectImageComparisonToleranceLevel("Level I")
 SetImguiValue('Lighting/Auto Rotation', false)
 SetImguiValue('Lighting/Auto Rotation', false)
 SetImguiValue('Lighting/Direction', DegToRad(110))
 SetImguiValue('Lighting/Direction', DegToRad(110))
+SetImguiValue('Parallax Setting/Factor', 0.05)
 
 
 SetImguiValue('Parallax Setting/Enable Pdo', false)
 SetImguiValue('Parallax Setting/Enable Pdo', false)
 IdleFrames(2)
 IdleFrames(2)