Selaa lähdekoodia

Merge branch 'main' into Atom/santorac/PomHeightOffset-ATOM-14495

Conflicts:
Scripts/ParallaxTest.bv.lua
Chris Santora 4 vuotta sitten
vanhempi
commit
323a3042dd
100 muutettua tiedostoa jossa 569 lisäystä ja 211 poistoa
  1. 4 1
      .gitignore
  2. 2 0
      Gem/Code/CMakeLists.txt
  3. 4 27
      Gem/Code/Source/Automation/ScriptReporter.cpp
  4. 6 6
      Gem/Code/Source/Automation/ScriptReporter.h
  5. 1 1
      Gem/Code/Source/MultiRenderPipelineExampleComponent.cpp
  6. 12 11
      Gem/Code/Source/MultiSceneExampleComponent.cpp
  7. 1 1
      Gem/Code/Source/MultiSceneExampleComponent.h
  8. 1 1
      Gem/Code/Source/MultiViewSingleSceneAuxGeomExampleComponent.cpp
  9. 16 0
      Gem/Code/Source/Platform/Android/SSRExampleComponent_Traits_Platform.h
  10. 22 0
      Gem/Code/Source/Platform/Android/ScriptReporter_Android.cpp
  11. 16 0
      Gem/Code/Source/Platform/Android/TriangleConstantBufferExampleComponent_Traits_Platform.h
  12. 3 0
      Gem/Code/Source/Platform/Android/atomsampleviewer_android_files.cmake
  13. 11 0
      Gem/Code/Source/Platform/Android/platform_android.cmake
  14. 13 0
      Gem/Code/Source/Platform/Linux/SSRExampleComponent_Traits_Platform.h
  15. 22 0
      Gem/Code/Source/Platform/Linux/ScriptReporter_Linux.cpp
  16. 14 0
      Gem/Code/Source/Platform/Linux/TriangleConstantBufferExampleComponent_Traits_Platform.h
  17. 3 0
      Gem/Code/Source/Platform/Linux/atomsampleviewer_linux_files.cmake
  18. 11 0
      Gem/Code/Source/Platform/Linux/platform_linux.cmake
  19. 13 0
      Gem/Code/Source/Platform/Mac/SSRExampleComponent_Traits_Platform.h
  20. 22 0
      Gem/Code/Source/Platform/Mac/ScriptReporter_Mac.cpp
  21. 14 0
      Gem/Code/Source/Platform/Mac/TriangleConstantBufferExampleComponent_Traits_Platform.h
  22. 3 0
      Gem/Code/Source/Platform/Mac/atomsampleviewer_mac_files.cmake
  23. 11 0
      Gem/Code/Source/Platform/Mac/platform_mac.cmake
  24. 13 0
      Gem/Code/Source/Platform/Windows/SSRExampleComponent_Traits_Platform.h
  25. 53 0
      Gem/Code/Source/Platform/Windows/ScriptReporter_Windows.cpp
  26. 14 0
      Gem/Code/Source/Platform/Windows/TriangleConstantBufferExampleComponent_Traits_Platform.h
  27. 3 0
      Gem/Code/Source/Platform/Windows/atomsampleviewer_windows_files.cmake
  28. 16 0
      Gem/Code/Source/Platform/Windows/platform_windows.cmake
  29. 13 0
      Gem/Code/Source/Platform/iOS/SSRExampleComponent_Traits_Platform.h
  30. 22 0
      Gem/Code/Source/Platform/iOS/ScriptReporter_iOS.cpp
  31. 14 0
      Gem/Code/Source/Platform/iOS/TriangleConstantBufferExampleComponent_Traits_Platform.h
  32. 3 0
      Gem/Code/Source/Platform/iOS/atomsampleviewer_ios_files.cmake
  33. 11 0
      Gem/Code/Source/Platform/iOS/platform_ios.cmake
  34. 1 1
      Gem/Code/Source/RHI/AsyncComputeExampleComponent.cpp
  35. 3 3
      Gem/Code/Source/RHI/BindlessPrototypeExampleComponent.cpp
  36. 2 2
      Gem/Code/Source/RHI/IndirectRenderingExampleComponent.cpp
  37. 4 4
      Gem/Code/Source/RHI/QueryExampleComponent.cpp
  38. 8 8
      Gem/Code/Source/RHI/SphericalHarmonicsExampleComponent.cpp
  39. 1 1
      Gem/Code/Source/RHI/Texture3dExampleComponent.cpp
  40. 5 5
      Gem/Code/Source/RHI/TextureExampleComponent.cpp
  41. 4 2
      Gem/Code/Source/RHI/TrianglesConstantBufferExampleComponent.cpp
  42. 3 1
      Gem/Code/Source/SSRExampleComponent.cpp
  43. 16 12
      Gem/Code/Source/SampleComponentManager.cpp
  44. 57 22
      Materials/DynamicMaterialTest/EmissiveMaterial.azsl
  45. 0 7
      Passes/CheckerboardPipeline.pass
  46. 0 7
      Passes/MSAA_RPI_Pipeline_Core.pass
  47. 0 7
      Passes/MainPipeline_Mobile.pass
  48. 0 7
      Passes/No_MSAA_RPI_Pipeline.pass
  49. 4 0
      Passes/PassTemplates.azasset
  50. 1 1
      Scripts/AreaLightTest.bv.lua
  51. 1 1
      Scripts/CheckerboardTest.bv.lua
  52. 1 1
      Scripts/CullingAndLod.bv.lua
  53. 1 1
      Scripts/Decals.bv.lua
  54. 1 1
      Scripts/DiffuseGITest.bv.lua
  55. 1 1
      Scripts/DynamicDraw.bv.lua
  56. 2 2
      Scripts/DynamicMaterialTest.bv.lua
  57. 3 0
      Scripts/ExpectedScreenshots/AreaLights/capsule_vary_metal.png
  58. 0 3
      Scripts/ExpectedScreenshots/AreaLights/capsule_vary_metal.ppm
  59. 3 0
      Scripts/ExpectedScreenshots/AreaLights/capsule_vary_rough_metal.png
  60. 0 3
      Scripts/ExpectedScreenshots/AreaLights/capsule_vary_rough_metal.ppm
  61. 3 0
      Scripts/ExpectedScreenshots/AreaLights/capsule_vary_rough_nonmetal.png
  62. 0 3
      Scripts/ExpectedScreenshots/AreaLights/capsule_vary_rough_nonmetal.ppm
  63. 3 0
      Scripts/ExpectedScreenshots/AreaLights/disk_vary_metal.png
  64. 0 3
      Scripts/ExpectedScreenshots/AreaLights/disk_vary_metal.ppm
  65. 3 0
      Scripts/ExpectedScreenshots/AreaLights/disk_vary_rough_metal.png
  66. 0 3
      Scripts/ExpectedScreenshots/AreaLights/disk_vary_rough_metal.ppm
  67. 3 0
      Scripts/ExpectedScreenshots/AreaLights/disk_vary_rough_nonmetal.png
  68. 0 3
      Scripts/ExpectedScreenshots/AreaLights/disk_vary_rough_nonmetal.ppm
  69. 3 0
      Scripts/ExpectedScreenshots/AreaLights/point_vary_metal.png
  70. 0 3
      Scripts/ExpectedScreenshots/AreaLights/point_vary_metal.ppm
  71. 3 0
      Scripts/ExpectedScreenshots/AreaLights/point_vary_rough_metal.png
  72. 0 3
      Scripts/ExpectedScreenshots/AreaLights/point_vary_rough_metal.ppm
  73. 3 0
      Scripts/ExpectedScreenshots/AreaLights/point_vary_rough_nonmetal.png
  74. 0 3
      Scripts/ExpectedScreenshots/AreaLights/point_vary_rough_nonmetal.ppm
  75. 3 0
      Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_metal.png
  76. 0 3
      Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_metal.ppm
  77. 3 0
      Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_rough_metal.png
  78. 0 3
      Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_rough_metal.ppm
  79. 3 0
      Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_rough_nonmetal.png
  80. 0 3
      Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_rough_nonmetal.ppm
  81. 3 0
      Scripts/ExpectedScreenshots/AreaLights/polygon_vary_metal.png
  82. 0 3
      Scripts/ExpectedScreenshots/AreaLights/polygon_vary_metal.ppm
  83. 3 0
      Scripts/ExpectedScreenshots/AreaLights/polygon_vary_rough_metal.png
  84. 0 3
      Scripts/ExpectedScreenshots/AreaLights/polygon_vary_rough_metal.ppm
  85. 3 0
      Scripts/ExpectedScreenshots/AreaLights/polygon_vary_rough_nonmetal.png
  86. 0 3
      Scripts/ExpectedScreenshots/AreaLights/polygon_vary_rough_nonmetal.ppm
  87. 3 0
      Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_metal.png
  88. 0 3
      Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_metal.ppm
  89. 3 0
      Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_rough_metal.png
  90. 0 3
      Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_rough_metal.ppm
  91. 3 0
      Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_rough_nonmetal.png
  92. 0 3
      Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_rough_nonmetal.ppm
  93. 3 0
      Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_metal.png
  94. 0 3
      Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_metal.ppm
  95. 3 0
      Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_rough_metal.png
  96. 0 3
      Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_rough_metal.ppm
  97. 3 0
      Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_rough_nonmetal.png
  98. 0 3
      Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_rough_nonmetal.ppm
  99. 3 0
      Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_vary_metal.png
  100. 0 3
      Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_vary_metal.ppm

+ 4 - 1
.gitignore

@@ -1,3 +1,6 @@
 _savebackup/
 .mayaSwatches/
-*.swatches
+*.swatches
+[Bb]uild/
+[Cc]ache/
+[Uu]ser/

+ 2 - 0
Gem/Code/CMakeLists.txt

@@ -33,6 +33,8 @@ ly_add_target(
     FILES_CMAKE
         atomsampleviewergem_private_files.cmake
         ${pal_dir}/atomsampleviewer_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
+    PLATFORM_INCLUDE_FILES
+        ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
     INCLUDE_DIRECTORIES
         PUBLIC
             Lib

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

@@ -12,7 +12,6 @@
 
 #include <Automation/ScriptReporter.h>
 #include <Utils/Utils.h>
-#include <Atom/Utils/PpmFile.h>
 #include <imgui/imgui.h>
 #include <Atom/RHI/Factory.h>
 #include <AzFramework/API/ApplicationAPI.h>
@@ -97,7 +96,7 @@ namespace AtomSampleViewer
             }
 
             // Turn it back into a full path
-            path = Utils::ResolvePath("@assets@" + path);
+            path = Utils::ResolvePath("@devassets@" + path);
 
             return path;
         }
@@ -756,28 +755,6 @@ namespace AtomSampleViewer
         ReportScriptIssue(fullMessage, traceLevel);
     }
 
-    bool ScriptReporter::LoadPpmData(ImageComparisonResult& imageComparisonResult, const AZStd::string& path, AZStd::vector<uint8_t>& buffer, AZ::RHI::Size& size, AZ::RHI::Format& format, TraceLevel traceLevel)
-    {
-        const size_t maxFileSize = 1024 * 1024 * 25;
-
-        auto readScreenshotFileResult = AZ::Utils::ReadFile<AZStd::vector<uint8_t>>(path, maxFileSize);
-        if (!readScreenshotFileResult.IsSuccess())
-        {
-            ReportScriptIssue(AZStd::string::format("Screenshot check failed. %s", readScreenshotFileResult.GetError().c_str()), traceLevel);
-            imageComparisonResult.m_resultCode = ImageComparisonResult::ResultCode::FileNotFound;
-            return false;
-        }
-
-        if (!AZ::Utils::PpmFile::CreateImageBufferFromPpm(readScreenshotFileResult.GetValue(), buffer, size, format))
-        {
-            ReportScriptIssue(AZStd::string::format("Screenshot check failed. Failed to read file '%s'", path.c_str()), traceLevel);
-            imageComparisonResult.m_resultCode = ImageComparisonResult::ResultCode::FileNotLoaded;
-            return false;
-        }
-
-        return true;
-    }
-
     bool ScriptReporter::DiffImages(ImageComparisonResult& imageComparisonResult, const AZStd::string& expectedImageFilePath, const AZStd::string& actualImageFilePath, TraceLevel traceLevel)
     {
         using namespace AZ::Utils;
@@ -785,7 +762,7 @@ namespace AtomSampleViewer
         AZStd::vector<uint8_t> actualImageBuffer;
         AZ::RHI::Size actualImageSize;
         AZ::RHI::Format actualImageFormat;
-        if (!LoadPpmData(imageComparisonResult, actualImageFilePath, actualImageBuffer, actualImageSize, actualImageFormat, traceLevel))
+        if (!LoadPngData(imageComparisonResult, actualImageFilePath, actualImageBuffer, actualImageSize, actualImageFormat, traceLevel))
         {
             return false;
         }
@@ -793,7 +770,7 @@ namespace AtomSampleViewer
         AZStd::vector<uint8_t> expectedImageBuffer;
         AZ::RHI::Size expectedImageSize;
         AZ::RHI::Format expectedImageFormat;
-        if (!LoadPpmData(imageComparisonResult, expectedImageFilePath, expectedImageBuffer, expectedImageSize, expectedImageFormat, traceLevel))
+        if (!LoadPngData(imageComparisonResult, expectedImageFilePath, expectedImageBuffer, expectedImageSize, expectedImageFormat, traceLevel))
         {
             return false;
         }
@@ -939,7 +916,7 @@ namespace AtomSampleViewer
         AZStd::string sourceFolderPath = AZStd::string::format("%s\\%s", m_officialBaselineSourceFolder.c_str(), reversePathComponents[1].c_str());
 
         // Source file path
-        // ".../AtomSampleViewer/Scripts/ExpectedScreenshots/MyTestFolder/" + "MyTest.ppm"
+        // ".../AtomSampleViewer/Scripts/ExpectedScreenshots/MyTestFolder/" + "MyTest.png"
         AZStd::string sourceFilePath = AZStd::string::format("%s\\%s", sourceFolderPath.c_str(), reversePathComponents[0].c_str());
 
         m_fileIoErrorHandler.BusConnect();

+ 6 - 6
Gem/Code/Source/Automation/ScriptReporter.h

@@ -202,14 +202,14 @@ namespace AtomSampleViewer
         static void ReportScriptIssue(const AZStd::string& message, TraceLevel traceLevel);
         static void ReportScreenshotComparisonIssue(const AZStd::string& message, const AZStd::string& expectedImageFilePath, const AZStd::string& actualImageFilePath, TraceLevel traceLevel);
 
-        // Loads image data from a .ppm file.
+        // Loads image data from a .png file.
         // @param imageComparisonResult will be set to an error code if the function fails
-        // @param path the path the .ppm file
-        // @param buffer will be filled with the raw image data from the .ppm file
-        // @param size will be set to the image size of the .ppm file
-        // @param format will be set to the pixel format of the .ppm file
+        // @param path the path the .png file
+        // @param buffer will be filled with the raw image data from the .png file
+        // @param size will be set to the image size of the .png file
+        // @param format will be set to the pixel format of the .png file
         // @return true if the file was loaded successfully
-        static bool LoadPpmData(ImageComparisonResult& imageComparisonResult, const AZStd::string& path, AZStd::vector<uint8_t>& buffer, AZ::RHI::Size& size, AZ::RHI::Format& format, TraceLevel traceLevel);
+        static bool LoadPngData(ImageComparisonResult& imageComparisonResult, const AZStd::string& path, AZStd::vector<uint8_t>& buffer, AZ::RHI::Size& size, AZ::RHI::Format& format, TraceLevel traceLevel);
 
         // Compares two image files and updates the ImageComparisonResult accordingly.
         // Returns false if an error prevented the comparison.

+ 1 - 1
Gem/Code/Source/MultiRenderPipelineExampleComponent.cpp

@@ -35,7 +35,7 @@
 #include <AzCore/Component/Entity.h>
 
 #include <AzFramework/Components/TransformComponent.h>
-#include <AzFramework/Scene/SceneSystemBus.h>
+#include <AzFramework/Scene/SceneSystemInterface.h>
 #include <AzFramework/Entity/GameEntityContextComponent.h>
 
 #include <EntityUtilityFunctions.h>

+ 12 - 11
Gem/Code/Source/MultiSceneExampleComponent.cpp

@@ -28,7 +28,7 @@
 #include <AzCore/Component/Entity.h>
 
 #include <AzFramework/Components/TransformComponent.h>
-#include <AzFramework/Scene/SceneSystemBus.h>
+#include <AzFramework/Scene/SceneSystemInterface.h>
 #include <AzFramework/Entity/GameEntityContextComponent.h>
 
 #include <SampleComponentConfig.h>
@@ -54,14 +54,13 @@ namespace AtomSampleViewer
         m_entityContext->InitContext();
 
         // Create the scene
-        Outcome<AzFramework::Scene*, AZStd::string> createSceneOutcome = Failure<AZStd::string>("SceneSystemRequests bus not responding.");
-        AzFramework::SceneSystemRequestBus::BroadcastResult(createSceneOutcome, &AzFramework::SceneSystemRequests::CreateScene, m_sceneName);
+        auto sceneSystem = AzFramework::SceneSystemInterface::Get();
+        AZ_Assert(sceneSystem, "Unable to retrieve scene system.");
+        Outcome<AZStd::shared_ptr<AzFramework::Scene>, AZStd::string> createSceneOutcome = sceneSystem->CreateScene(m_sceneName);
         AZ_Assert(createSceneOutcome, "%s", createSceneOutcome.GetError().data());
-        m_frameworkScene = createSceneOutcome.GetValue();
-        bool success = false;
-        AzFramework::SceneSystemRequestBus::BroadcastResult(success, &AzFramework::SceneSystemRequests::SetSceneForEntityContextId, m_entityContext->GetContextId(), m_frameworkScene);
-        AZ_Assert(success, "Unable to set entity context on AzFramework::Scene: %s", m_sceneName.c_str());
-
+        m_frameworkScene = createSceneOutcome.TakeValue();
+        m_frameworkScene->SetSubsystem<AzFramework::EntityContext::SceneStorageType>(m_entityContext.get());
+        
         // Create a NativeWindow and WindowContext
         m_nativeWindow = AZStd::make_unique<AzFramework::NativeWindow>("Multi Scene: Second Window", AzFramework::WindowGeometry(0, 0, 1280, 720));
         m_nativeWindow->Activate();
@@ -113,7 +112,7 @@ namespace AtomSampleViewer
         m_scene->SetShaderResourceGroupCallback(srgCallback);
 
         // Link our RPI::Scene to the AzFramework::Scene
-        m_frameworkScene->SetSubsystem(m_scene.get());
+        m_frameworkScene->SetSubsystem(m_scene);
 
         // Create a custom pipeline descriptor
         RPI::RenderPipelineDescriptor pipelineDesc;
@@ -351,8 +350,10 @@ namespace AtomSampleViewer
         m_scene->Deactivate();
         m_scene->RemoveRenderPipeline(m_pipeline->GetId());
         RPI::RPISystemInterface::Get()->UnregisterScene(m_scene);
-        bool sceneRemovedSuccessfully = false;
-        AzFramework::SceneSystemRequestBus::BroadcastResult(sceneRemovedSuccessfully, &AzFramework::SceneSystemRequests::RemoveScene, m_sceneName);
+        auto sceneSystem = AzFramework::SceneSystemInterface::Get();
+        AZ_Assert(sceneSystem, "Scene system wasn't found to remove scene '%s' from.", m_sceneName.c_str());
+        [[maybe_unused]] bool sceneRemovedSuccessfully = sceneSystem->RemoveScene(m_sceneName);
+        AZ_Assert(sceneRemovedSuccessfully, "Unable to remove scene '%s'.", m_sceneName.c_str());
         m_scene = nullptr;
 
         m_windowContext->Shutdown();

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

@@ -66,7 +66,7 @@ namespace AtomSampleViewer
         AZStd::shared_ptr<AZ::RPI::WindowContext> m_windowContext;
         AZStd::unique_ptr<AzFramework::EntityContext> m_entityContext;
         AZStd::string m_sceneName;
-        AzFramework::Scene* m_frameworkScene = nullptr;
+        AZStd::shared_ptr<AzFramework::Scene> m_frameworkScene;
         AZ::RPI::ScenePtr m_scene;
         AZ::RPI::RenderPipelinePtr m_pipeline;
 

+ 1 - 1
Gem/Code/Source/MultiViewSingleSceneAuxGeomExampleComponent.cpp

@@ -32,7 +32,7 @@
 #include <AzCore/Component/Entity.h>
 
 #include <AzFramework/Components/TransformComponent.h>
-#include <AzFramework/Scene/SceneSystemBus.h>
+#include <AzFramework/Scene/SceneSystemInterface.h>
 
 #include <SampleComponentConfig.h>
 #include <SampleComponentManager.h>

+ 16 - 0
Gem/Code/Source/Platform/Android/SSRExampleComponent_Traits_Platform.h

@@ -0,0 +1,16 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+// Mali devices have a memory limitation of vertex buffer (180MB), so low resolution mesh model is needed.
+// https://community.arm.com/developer/tools-software/graphics/b/blog/posts/memory-limits-with-vulkan-on-mali-gpus
+// [ATOM-14947]
+#define ATOMSAMPLEVIEWER_TRAIT_SSR_SAMPLE_LUCY_MODEL_NAME                       "objects/lucy/lucy_low.azmodel"

+ 22 - 0
Gem/Code/Source/Platform/Android/ScriptReporter_Android.cpp

@@ -0,0 +1,22 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#include <Automation/ScriptReporter.h>
+#include <AzCore/Utils/Utils.h>
+
+namespace AtomSampleViewer
+{
+    bool ScriptReporter::LoadPngData([[maybe_unused]] ImageComparisonResult& imageComparisonResult, [[maybe_unused]] const AZStd::string& path, [[maybe_unused]] AZStd::vector<uint8_t>& buffer, [[maybe_unused]] AZ::RHI::Size& size, [[maybe_unused]] AZ::RHI::Format& format, [[maybe_unused]] TraceLevel traceLevel)
+    {
+        return false;
+    }
+} 

+ 16 - 0
Gem/Code/Source/Platform/Android/TriangleConstantBufferExampleComponent_Traits_Platform.h

@@ -0,0 +1,16 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+// https://jira.agscollab.com/browse/ATOM-14949
+// The number need to be within the uniform limitations of android devices with lower specs where 15 total would be the lower bound on the devices.
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_SINGLE_CONSTANT_BUFFER_SIZE       6u  
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_MULTIPLE_CONSTANT_BUFFER_SIZE     6u

+ 3 - 0
Gem/Code/Source/Platform/Android/atomsampleviewer_android_files.cmake

@@ -12,7 +12,10 @@
 set(FILES
     AtomSampleViewerOptions_Android.cpp
     MultiThreadComponent_Traits_Platform.h
+    SSRExampleComponent_Traits_Platform.h
+    TriangleConstantBufferExampleComponent_Traits_Platform.h
     SampleComponentManager_Android.cpp
     StreamingImageExampleComponent_Android.cpp
     Utils_Android.cpp
+    ScriptReporter_Android.cpp
 )

+ 11 - 0
Gem/Code/Source/Platform/Android/platform_android.cmake

@@ -0,0 +1,11 @@
+#
+# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+# its licensors.
+#
+# For complete copyright and license terms please see the LICENSE at the root of this
+# distribution (the "License"). All use of this software is governed by the License,
+# or, if provided, by the license below or the license accompanying this file. Do not
+# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#
+

+ 13 - 0
Gem/Code/Source/Platform/Linux/SSRExampleComponent_Traits_Platform.h

@@ -0,0 +1,13 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#define ATOMSAMPLEVIEWER_TRAIT_SSR_SAMPLE_LUCY_MODEL_NAME                       "objects/lucy/lucy_high.azmodel"

+ 22 - 0
Gem/Code/Source/Platform/Linux/ScriptReporter_Linux.cpp

@@ -0,0 +1,22 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#include <Automation/ScriptReporter.h>
+#include <AzCore/Utils/Utils.h>
+
+namespace AtomSampleViewer
+{
+    bool ScriptReporter::LoadPngData([[maybe_unused]] ImageComparisonResult& imageComparisonResult, [[maybe_unused]] const AZStd::string& path, [[maybe_unused]] AZStd::vector<uint8_t>& buffer, [[maybe_unused]] AZ::RHI::Size& size, [[maybe_unused]] AZ::RHI::Format& format, [[maybe_unused]] TraceLevel traceLevel)
+    {
+        return false;
+    }
+} 

+ 14 - 0
Gem/Code/Source/Platform/Linux/TriangleConstantBufferExampleComponent_Traits_Platform.h

@@ -0,0 +1,14 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_SINGLE_CONSTANT_BUFFER_SIZE       15u  
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_MULTIPLE_CONSTANT_BUFFER_SIZE     15u    

+ 3 - 0
Gem/Code/Source/Platform/Linux/atomsampleviewer_linux_files.cmake

@@ -12,7 +12,10 @@
 set(FILES
     AtomSampleViewerOptions_Linux.cpp
     MultiThreadComponent_Traits_Platform.h
+    SSRExampleComponent_Traits_Platform.h
+    TriangleConstantBufferExampleComponent_Traits_Platform.h
     SampleComponentManager_Linux.cpp
     StreamingImageExampleComponent_Linux.cpp
     Utils_Linux.cpp
+    ScriptReporter_Linux.cpp
 )

+ 11 - 0
Gem/Code/Source/Platform/Linux/platform_linux.cmake

@@ -0,0 +1,11 @@
+#
+# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+# its licensors.
+#
+# For complete copyright and license terms please see the LICENSE at the root of this
+# distribution (the "License"). All use of this software is governed by the License,
+# or, if provided, by the license below or the license accompanying this file. Do not
+# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#
+

+ 13 - 0
Gem/Code/Source/Platform/Mac/SSRExampleComponent_Traits_Platform.h

@@ -0,0 +1,13 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#define ATOMSAMPLEVIEWER_TRAIT_SSR_SAMPLE_LUCY_MODEL_NAME                       "objects/lucy/lucy_high.azmodel"

+ 22 - 0
Gem/Code/Source/Platform/Mac/ScriptReporter_Mac.cpp

@@ -0,0 +1,22 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#include <Automation/ScriptReporter.h>
+#include <AzCore/Utils/Utils.h>
+
+namespace AtomSampleViewer
+{
+    bool ScriptReporter::LoadPngData([[maybe_unused]] ImageComparisonResult& imageComparisonResult, [[maybe_unused]] const AZStd::string& path, [[maybe_unused]] AZStd::vector<uint8_t>& buffer, [[maybe_unused]] AZ::RHI::Size& size, [[maybe_unused]] AZ::RHI::Format& format, [[maybe_unused]] TraceLevel traceLevel)
+    {
+        return false;
+    }
+}

+ 14 - 0
Gem/Code/Source/Platform/Mac/TriangleConstantBufferExampleComponent_Traits_Platform.h

@@ -0,0 +1,14 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_SINGLE_CONSTANT_BUFFER_SIZE       15u  
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_MULTIPLE_CONSTANT_BUFFER_SIZE     15u

+ 3 - 0
Gem/Code/Source/Platform/Mac/atomsampleviewer_mac_files.cmake

@@ -13,9 +13,12 @@ set(FILES
     ../../../../Resources/MacLauncher/Info.plist
     AtomSampleViewerOptions_Mac.cpp
     MultiThreadComponent_Traits_Platform.h
+    SSRExampleComponent_Traits_Platform.h
+    TriangleConstantBufferExampleComponent_Traits_Platform.h
     SampleComponentManager_Mac.cpp
     StreamingImageExampleComponent_Mac.cpp
     Utils_Mac.cpp
+    ScriptReporter_Mac.cpp
 )
 
 set(LY_COMPILE_OPTIONS

+ 11 - 0
Gem/Code/Source/Platform/Mac/platform_mac.cmake

@@ -0,0 +1,11 @@
+#
+# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+# its licensors.
+#
+# For complete copyright and license terms please see the LICENSE at the root of this
+# distribution (the "License"). All use of this software is governed by the License,
+# or, if provided, by the license below or the license accompanying this file. Do not
+# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#
+

+ 13 - 0
Gem/Code/Source/Platform/Windows/SSRExampleComponent_Traits_Platform.h

@@ -0,0 +1,13 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#define ATOMSAMPLEVIEWER_TRAIT_SSR_SAMPLE_LUCY_MODEL_NAME                       "objects/lucy/lucy_high.azmodel"

+ 53 - 0
Gem/Code/Source/Platform/Windows/ScriptReporter_Windows.cpp

@@ -0,0 +1,53 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#include <Automation/ScriptReporter.h>
+#include <AzCore/Utils/Utils.h>
+#include <OpenImageIO/imageio.h>
+
+namespace AtomSampleViewer
+{
+    bool ScriptReporter::LoadPngData(ImageComparisonResult& imageComparisonResult, const AZStd::string& path, AZStd::vector<uint8_t>& buffer, AZ::RHI::Size& size, AZ::RHI::Format& format, TraceLevel traceLevel)
+    {
+        using namespace OIIO;
+
+        const size_t maxFileSize = 1024 * 1024 * 25;
+
+        auto readScreenshotFileResult = AZ::Utils::ReadFile<AZStd::vector<uint8_t>>(path, maxFileSize);
+        if (!readScreenshotFileResult.IsSuccess())
+        {
+            ReportScriptIssue(AZStd::string::format("Screenshot check failed. %s", readScreenshotFileResult.GetError().c_str()), traceLevel);
+            imageComparisonResult.m_resultCode = ImageComparisonResult::ResultCode::FileNotFound;
+            return false;
+        }
+
+        auto in = ImageInput::open(path.c_str());
+        if (in)
+        {
+            const ImageSpec& spec = in->spec();
+            size.m_width = spec.width;
+            size.m_height = spec.height;
+            size.m_depth = spec.depth;
+            format = AZ::RHI::Format::R8G8B8A8_UNORM;
+            buffer.resize(spec.width * spec.height * spec.nchannels);
+            if (!in->read_image(TypeDesc::UINT8, &buffer[0]))
+            {
+                ReportScriptIssue(AZStd::string::format("Screenshot check failed. Failed to read file '%s'", path.c_str()), traceLevel);
+                imageComparisonResult.m_resultCode = ImageComparisonResult::ResultCode::FileNotLoaded;
+                return false;
+            } 
+            in->close();
+        }
+
+        return true;
+    }
+}

+ 14 - 0
Gem/Code/Source/Platform/Windows/TriangleConstantBufferExampleComponent_Traits_Platform.h

@@ -0,0 +1,14 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_SINGLE_CONSTANT_BUFFER_SIZE       15u  
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_MULTIPLE_CONSTANT_BUFFER_SIZE     15u

+ 3 - 0
Gem/Code/Source/Platform/Windows/atomsampleviewer_windows_files.cmake

@@ -12,7 +12,10 @@
 set(FILES
     AtomSampleViewerOptions_Windows.cpp
     MultiThreadComponent_Traits_Platform.h
+    SSRExampleComponent_Traits_Platform.h
+    TriangleConstantBufferExampleComponent_Traits_Platform.h
     SampleComponentManager_Windows.cpp
     StreamingImageExampleComponent_Windows.cpp
     Utils_Windows.cpp
+    ScriptReporter_Windows.cpp
 )

+ 16 - 0
Gem/Code/Source/Platform/Windows/platform_windows.cmake

@@ -0,0 +1,16 @@
+#
+# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+# its licensors.
+#
+# For complete copyright and license terms please see the LICENSE at the root of this
+# distribution (the "License"). All use of this software is governed by the License,
+# or, if provided, by the license below or the license accompanying this file. Do not
+# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#
+
+set(LY_BUILD_DEPENDENCIES
+    PRIVATE
+        3rdParty::OpenImageIO
+        3rdParty::ilmbase
+)

+ 13 - 0
Gem/Code/Source/Platform/iOS/SSRExampleComponent_Traits_Platform.h

@@ -0,0 +1,13 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#define ATOMSAMPLEVIEWER_TRAIT_SSR_SAMPLE_LUCY_MODEL_NAME                       "objects/lucy/lucy_high.azmodel"

+ 22 - 0
Gem/Code/Source/Platform/iOS/ScriptReporter_iOS.cpp

@@ -0,0 +1,22 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#include <Automation/ScriptReporter.h>
+#include <AzCore/Utils/Utils.h>
+
+namespace AtomSampleViewer
+{
+    bool ScriptReporter::LoadPngData([[maybe_unused]] ImageComparisonResult& imageComparisonResult, [[maybe_unused]] const AZStd::string& path, [[maybe_unused]] AZStd::vector<uint8_t>& buffer, [[maybe_unused]] AZ::RHI::Size& size, [[maybe_unused]] AZ::RHI::Format& format, [[maybe_unused]] TraceLevel traceLevel)
+    {
+        return false;
+    }
+} 

+ 14 - 0
Gem/Code/Source/Platform/iOS/TriangleConstantBufferExampleComponent_Traits_Platform.h

@@ -0,0 +1,14 @@
+/*
+* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+* its licensors.
+*
+* For complete copyright and license terms please see the LICENSE at the root of this
+* distribution (the "License"). All use of this software is governed by the License,
+* or, if provided, by the license below or the license accompanying this file. Do not
+* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*
+*/
+
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_SINGLE_CONSTANT_BUFFER_SIZE       15u  
+#define ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_MULTIPLE_CONSTANT_BUFFER_SIZE     15u

+ 3 - 0
Gem/Code/Source/Platform/iOS/atomsampleviewer_ios_files.cmake

@@ -13,9 +13,12 @@ set(FILES
     ../../../../Resources/IOSLauncher/Info.plist
     AtomSampleViewerOptions_iOS.cpp
     MultiThreadComponent_Traits_Platform.h
+    SSRExampleComponent_Traits_Platform.h
+    TriangleConstantBufferExampleComponent_Traits_Platform.h
     SampleComponentManager_iOS.cpp
     StreamingImageExampleComponent_iOS.cpp
     Utils_iOS.cpp
+    ScriptReporter_iOS.cpp
 )
 
 set(LY_COMPILE_OPTIONS

+ 11 - 0
Gem/Code/Source/Platform/iOS/platform_ios.cmake

@@ -0,0 +1,11 @@
+#
+# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+# its licensors.
+#
+# For complete copyright and license terms please see the LICENSE at the root of this
+# distribution (the "License"). All use of this software is governed by the License,
+# or, if provided, by the license below or the license accompanying this file. Do not
+# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#
+

+ 1 - 1
Gem/Code/Source/RHI/AsyncComputeExampleComponent.cpp

@@ -126,7 +126,7 @@ namespace AtomSampleViewer
 
         if (m_imguiSidebar.Begin())
         {
-            ImGui::Checkbox("Enable/Disable Async Compute", &m_asyncComputeEnabled);
+            ScriptableImGui::Checkbox("Enable/Disable Async Compute", &m_asyncComputeEnabled);
             m_imguiSidebar.End();
         }
     }

+ 3 - 3
Gem/Code/Source/RHI/BindlessPrototypeExampleComponent.cpp

@@ -166,17 +166,17 @@ namespace AtomSampleViewer
             ImGui::Spacing();
 
             ImGui::Text("Lattice Depth");
-            latticeChanged |= ImGui::SliderInt("##LatticeDepth", &m_objectCountDepth, 1, m_maxObjectPerAxis);
+            latticeChanged |= ScriptableImGui::SliderInt("##LatticeDepth", &m_objectCountDepth, 1, m_maxObjectPerAxis);
 
             ImGui::Spacing();
 
             static bool enableDynamicUpdates = true;
             bool previousEnableDynamicUpdates = enableDynamicUpdates;
-            ImGui::Checkbox("Enable Dynamic Updates", &enableDynamicUpdates);
+            ScriptableImGui::Checkbox("Enable Dynamic Updates", &enableDynamicUpdates);
 
             ImGui::Separator();
 
-            bool randomizeMaterials = ImGui::Button("RandomizeMaterials");
+            bool randomizeMaterials = ScriptableImGui::Button("RandomizeMaterials");
 
             ImGui::Separator();
 

+ 2 - 2
Gem/Code/Source/RHI/IndirectRenderingExampleComponent.cpp

@@ -1003,8 +1003,8 @@ namespace AtomSampleViewer
     void IndirectRenderingExampleComponent::DrawSampleSettings()
     {
         ImGui::Spacing();
-        ImGui::SliderFloat("Cull Offset", &m_cullOffset, 0.f, 1.f);
-        if (ImGui::SliderInt("Num Objects", reinterpret_cast<int*>(&m_numObjects), 1, s_maxNumberOfObjects))
+        ScriptableImGui::SliderFloat("Cull Offset", &m_cullOffset, 0.f, 1.f);
+        if (ScriptableImGui::SliderInt("Num Objects", reinterpret_cast<int*>(&m_numObjects), 1, s_maxNumberOfObjects))
         {
             m_updateIndirectDispatchArguments = true;
         }

+ 4 - 4
Gem/Code/Source/RHI/QueryExampleComponent.cpp

@@ -647,23 +647,23 @@ namespace AtomSampleViewer
         }
         int current_item = static_cast<int>(m_currentType);
         ImGui::Text("Type");
-        ImGui::Combo("", &current_item, items.data(), static_cast<int>(items.size()));
+        ScriptableImGui::Combo("", &current_item, items.data(), static_cast<int>(items.size()));
         SetQueryType(static_cast<QueryType>(current_item));
         if (m_currentType == QueryType::Occlusion && features.m_occlusionQueryPrecise)
         {
             // Precision occlusion is only available for the Occlusion query type
-            ImGui::Checkbox("Enable Precision occlusion", &m_precisionOcclusionEnabled);
+            ScriptableImGui::Checkbox("Enable Precision occlusion", &m_precisionOcclusionEnabled);
         }
 
         auto& supportedQueries = features.m_queryTypesMask[static_cast<uint32_t>(AZ::RHI::HardwareQueueClass::Graphics)];
         if (AZ::RHI::CheckBitsAll(supportedQueries, AZ::RHI::QueryTypeFlags::Timestamp))
         {
-            ImGui::Checkbox("Enable Timestamp queries", &m_timestampEnabled);
+            ScriptableImGui::Checkbox("Enable Timestamp queries", &m_timestampEnabled);
         }
 
         if (AZ::RHI::CheckBitsAll(supportedQueries, AZ::RHI::QueryTypeFlags::PipelineStatistics))
         {
-            ImGui::Checkbox("Enable Statistics queries", &m_pipelineStatisticsEnabled);
+            ScriptableImGui::Checkbox("Enable Statistics queries", &m_pipelineStatisticsEnabled);
         }
 
         if (m_precisionOcclusionEnabled)

+ 8 - 8
Gem/Code/Source/RHI/SphericalHarmonicsExampleComponent.cpp

@@ -520,7 +520,7 @@ namespace AtomSampleViewer
 
         std::stringstream ss;
         ss << "Switch to " << (m_mode ? "Render" : "Demo") << " mode";
-        if (ImGui::Button(ss.str().c_str()))
+        if (ScriptableImGui::Button(ss.str().c_str()))
         {
             m_mode = !m_mode;
         }
@@ -561,7 +561,7 @@ namespace AtomSampleViewer
                 m_updateDemoSRG = true;
             }
 
-            if (ImGui::Checkbox("Distortion", &m_shaderInputEnableDistortion))
+            if (ScriptableImGui::Checkbox("Distortion", &m_shaderInputEnableDistortion))
             {
                 m_updateDemoSRG = true;
             }
@@ -578,19 +578,19 @@ namespace AtomSampleViewer
             static const float deg2rad = (AZ::Constants::Pi / 180.0);
             if (m_shaderInputPresetIndex == SHExampleComponent::FakeLightRotation)
             {
-                if (ImGui::SliderInt("Set X rotation", &angle[0], 0, 360))
+                if (ScriptableImGui::SliderInt("Set X rotation", &angle[0], 0, 360))
                 {
                     m_shaderInputRotationAngle.SetX(angle[0] * deg2rad);
                     m_updateRenderSRG = true;
                 }
 
-                if (ImGui::SliderInt("Set Y rotation", &angle[1], 0, 360))
+                if (ScriptableImGui::SliderInt("Set Y rotation", &angle[1], 0, 360))
                 {
                     m_shaderInputRotationAngle.SetZ(angle[1] * deg2rad);
                     m_updateRenderSRG = true;
                 }
 
-                if (ImGui::SliderInt("Set Z rotation", &angle[2], 0, 360))
+                if (ScriptableImGui::SliderInt("Set Z rotation", &angle[2], 0, 360))
                 {
                     // since SH computation assume z-up frame
                     m_shaderInputRotationAngle.SetY(angle[2] * deg2rad);
@@ -600,14 +600,14 @@ namespace AtomSampleViewer
 
             ss = std::stringstream();
             ss << (m_shaderInputEnableGammaCorrection ? "Disable" : "Enable") << " Gamma Correction";
-            if (ImGui::Button(ss.str().c_str()))
+            if (ScriptableImGui::Button(ss.str().c_str()))
             {
                 m_shaderInputEnableGammaCorrection = !m_shaderInputEnableGammaCorrection;
                 m_updateRenderSRG = true;
             }
 
             static float sliderFloatValue = 1.0f;
-            if (ImGui::SliderFloat("set exposure", &sliderFloatValue, 0.1f, 2.0f, "ratio = %.1f"))
+            if (ScriptableImGui::SliderFloat("set exposure", &sliderFloatValue, 0.1f, 2.0f, "ratio = %.1f"))
             {
                 m_shaderInputExposure = sliderFloatValue;
                 m_updateRenderSRG = true;
@@ -643,7 +643,7 @@ namespace AtomSampleViewer
                     }
                 }
 
-                if (ImGui::Button("Recompute"))
+                if (ScriptableImGui::Button("Recompute"))
                 {
                     fakeLightDone = false;
                     m_recomputeFakeLight = true;

+ 1 - 1
Gem/Code/Source/RHI/Texture3dExampleComponent.cpp

@@ -284,7 +284,7 @@ namespace AtomSampleViewer
             for (int32_t i = 0; i < static_cast<int32_t>(m_imageLayout.m_size.m_depth); i++)
             {
                 const AZStd::string label = AZStd::string::format("Image Slice %d", i);
-                ImGui::RadioButton(label.c_str(), &m_sliceIndex, i);
+                ScriptableImGui::RadioButton(label.c_str(), &m_sliceIndex, i);
             }
 
             m_imguiSidebar.End();

+ 5 - 5
Gem/Code/Source/RHI/TextureExampleComponent.cpp

@@ -302,14 +302,14 @@ namespace AtomSampleViewer
         ImGui::Text("UV Settings");
         float vec2[2];
         m_uvOffset.StoreToFloat2(vec2);
-        if (ImGui::SliderFloat2("UV Offset", vec2, -2.0f, 2.0, "%.1f"))
+        if (ScriptableImGui::SliderFloat2("UV Offset", vec2, -2.0f, 2.0, "%.1f"))
         {
             m_uvOffset.Set(vec2[0], vec2[1]);
             m_updateSRG = true;
         }  
 
         m_uvScale.StoreToFloat2(vec2);
-        if (ImGui::SliderFloat2("UV Scale", vec2, 0, 2, "%.1f"))
+        if (ScriptableImGui::SliderFloat2("UV Scale", vec2, 0, 2, "%.1f"))
         {
             m_uvScale.Set(vec2[0], vec2[1]);
             m_updateSRG = true;
@@ -318,7 +318,7 @@ namespace AtomSampleViewer
         ImGui::Separator();
         ImGui::NewLine();
         ImGui::Text("Dynamic Sampler");
-        if (ImGui::Checkbox("Use static sampler", &m_useStaticSampler))
+        if (ScriptableImGui::Checkbox("Use static sampler", &m_useStaticSampler))
         {
             m_updateSRG = true;
         }
@@ -327,7 +327,7 @@ namespace AtomSampleViewer
         {            
             const AZStd::vector<const char*> addressMode = { "Wrap", "Mirror", "Clamp", "Border", "MirrorOnce" };
             int current_item = static_cast<int>(m_samplerState.m_addressU);
-            if (ImGui::Combo("Address Mode", &current_item, addressMode.data(), static_cast<int>(addressMode.size())))
+            if (ScriptableImGui::Combo("Address Mode", &current_item, addressMode.data(), static_cast<int>(addressMode.size())))
             {
                 m_samplerState.m_addressU = m_samplerState.m_addressV = m_samplerState.m_addressW = static_cast<AZ::RHI::AddressMode>(current_item);
                 m_updateSRG = true;
@@ -337,7 +337,7 @@ namespace AtomSampleViewer
             {
                 const AZStd::vector<const char*> borderColor = { "OpaqueBlack", "TransparentBlack", "OpaqueWhite" };
                 current_item = static_cast<int>(m_samplerState.m_borderColor);
-                if (ImGui::Combo("BorderColor", &current_item, borderColor.data(), static_cast<int>(borderColor.size())))
+                if (ScriptableImGui::Combo("BorderColor", &current_item, borderColor.data(), static_cast<int>(borderColor.size())))
                 {
                     m_samplerState.m_borderColor = static_cast<AZ::RHI::BorderColor>(current_item);
                     m_updateSRG = true;

+ 4 - 2
Gem/Code/Source/RHI/TrianglesConstantBufferExampleComponent.cpp

@@ -26,15 +26,17 @@
 
 #include <AzCore/Serialization/SerializeContext.h>
 
+#include <TriangleConstantBufferExampleComponent_Traits_Platform.h>
+
 namespace AtomSampleViewer
 {
     const char* TrianglesConstantBufferExampleComponent::s_trianglesConstantBufferExampleName = "TrianglesConstantBufferExample";
     // The number of triangles that are represented with a single constant buffer, that contains multiple buffer views;
     // each view containing a partial view of the constant buffer
-    const uint32_t TrianglesConstantBufferExampleComponent::s_numberOfTrianglesSingleCB = 15u;
+    const uint32_t TrianglesConstantBufferExampleComponent::s_numberOfTrianglesSingleCB = ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_SINGLE_CONSTANT_BUFFER_SIZE;
     // The number of triangles that are represented with multiple constant buffers;
     // each having their own constant buffer and view containing the whole buffer
-    const uint32_t TrianglesConstantBufferExampleComponent::s_numberOfTrianglesMultipleCB = 15u;
+    const uint32_t TrianglesConstantBufferExampleComponent::s_numberOfTrianglesMultipleCB = ATOMSAMPLEVIEWER_TRAIT_TRIANGLE_CONSTANT_BUFFER_SAMPLE_MULTIPLE_CONSTANT_BUFFER_SIZE;
     // The total number of views and triangles that will be rendered for this sample
     const uint32_t TrianglesConstantBufferExampleComponent::s_numberOfTrianglesTotal = s_numberOfTrianglesSingleCB + s_numberOfTrianglesMultipleCB;
 

+ 3 - 1
Gem/Code/Source/SSRExampleComponent.cpp

@@ -22,6 +22,8 @@
 #include <Automation/ScriptRunnerBus.h>
 #include <Utils/Utils.h>
 
+#include <SSRExampleComponent_Traits_Platform.h>
+
 namespace AtomSampleViewer
 {
     void SSRExampleComponent::Reflect(AZ::ReflectContext* context)
@@ -93,7 +95,7 @@ namespace AtomSampleViewer
         // statue
         {
             AZ::Data::Asset<AZ::RPI::MaterialAsset> materialAsset = AZ::RPI::AssetUtils::GetAssetByProductPath<AZ::RPI::MaterialAsset>("objects/lucy/lucy_stone.azmaterial", AZ::RPI::AssetUtils::TraceLevel::Assert);
-            AZ::Data::Asset<AZ::RPI::ModelAsset> modelAsset = AZ::RPI::AssetUtils::GetAssetByProductPath<AZ::RPI::ModelAsset>("objects/lucy/lucy_high.azmodel", AZ::RPI::AssetUtils::TraceLevel::Assert);
+            AZ::Data::Asset<AZ::RPI::ModelAsset> modelAsset = AZ::RPI::AssetUtils::GetAssetByProductPath<AZ::RPI::ModelAsset>(ATOMSAMPLEVIEWER_TRAIT_SSR_SAMPLE_LUCY_MODEL_NAME, AZ::RPI::AssetUtils::TraceLevel::Assert);
             AZ::Transform transform = AZ::Transform::CreateIdentity();
             transform *= AZ::Transform::CreateRotationZ(AZ::Constants::Pi);
             transform.SetTranslation(0.0f, 0.0f, -0.05f);

+ 16 - 12
Gem/Code/Source/SampleComponentManager.cpp

@@ -115,7 +115,7 @@
 #include <AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h>
 #include <AzFramework/Entity/GameEntityContextBus.h>
 #include <AzFramework/Scene/Scene.h>
-#include <AzFramework/Scene/SceneSystemBus.h>
+#include <AzFramework/Scene/SceneSystemInterface.h>
 
 #include <Passes/RayTracingAmbientOcclusionPass.h>
 
@@ -416,7 +416,7 @@ namespace AtomSampleViewer
 
         m_imguiFrameCaptureSaver.SetDefaultFolder(screenshotFolder);
         m_imguiFrameCaptureSaver.SetDefaultFileName("screenshot");
-        m_imguiFrameCaptureSaver.SetAvailableExtensions({"ppm", "dds"});
+        m_imguiFrameCaptureSaver.SetAvailableExtensions({"png", "ppm", "dds"});
         m_imguiFrameCaptureSaver.Activate();
 
         SampleComponentManagerRequestBus::Handler::BusConnect();
@@ -1145,7 +1145,7 @@ namespace AtomSampleViewer
                 ImGui::Checkbox("Hide ImGui", &hideImGuiFromFrameCapture);
 
                 ImGuiSaveFilePath::WidgetSettings settings;
-                settings.m_labels.m_filePath = "File Path (.ppm or .dds):";
+                settings.m_labels.m_filePath = "File Path (.png, .ppm, or .dds):";
                 m_imguiFrameCaptureSaver.Tick(settings);
 
                 if (ImGui::Button("Capture"))
@@ -1440,12 +1440,13 @@ namespace AtomSampleViewer
         m_rpiScene->SetShaderResourceGroupCallback(callback);
 
         // Bind m_rpiScene to the GameEntityContext's AzFramework::Scene so the RPI Scene can be found by the entity context
-        AZStd::vector<AzFramework::Scene*> scenes;
-        AzFramework::SceneSystemRequestBus::BroadcastResult(scenes, &AzFramework::SceneSystemRequests::GetAllScenes);
-        AZ_Assert(scenes.size() > 0, "Error: Scenes missing during system component initialization"); // This should never happen unless scene creation has changed.
+        auto sceneSystem = AzFramework::SceneSystemInterface::Get();
+        AZ_Assert(sceneSystem, "SampleComponentManager requires an implementation of the scene system.");
+        AZStd::shared_ptr<AzFramework::Scene> mainScene = sceneSystem->GetScene(AzFramework::Scene::MainSceneName);
+        AZ_Assert(mainScene, "Main scene missing during system component initialization"); // This should never happen unless scene creation has changed.
         // Add RPI::Scene as a sub system for the default AzFramework Scene
-        const uint32_t DefaultAzSceneIndex = 0;
-        scenes[DefaultAzSceneIndex]->SetSubsystem(m_rpiScene.get());
+        [[maybe_unused]] bool result = mainScene->SetSubsystem(m_rpiScene);
+        AZ_Assert(result, "SampleComponentManager failed to register the RPI scene with the general scene.");
 
         m_rpiScene->Activate();
 
@@ -1484,10 +1485,13 @@ namespace AtomSampleViewer
         {
             RPI::RPISystemInterface::Get()->UnregisterScene(m_rpiScene);
 
-            AZStd::vector<AzFramework::Scene*> scenes;
-            AzFramework::SceneSystemRequestBus::BroadcastResult(scenes, &AzFramework::SceneSystemRequests::GetAllScenes);
-            scenes[0]->UnsetSubsystem<RPI::Scene>();
-
+            auto sceneSystem = AzFramework::SceneSystemInterface::Get();
+            AZ_Assert(sceneSystem, "Scene system was destroyed before SampleComponentManager was able to unregister the RPI scene.");
+            AZStd::shared_ptr<AzFramework::Scene> scene = sceneSystem->GetScene(AzFramework::Scene::MainSceneName);
+            AZ_Assert(scene, "The main scene wasn't found in the scene system.");
+            [[maybe_unused]] bool result = scene->UnsetSubsystem(m_rpiScene);
+            AZ_Assert(result, "SampleComponentManager failed to unregister its RPI scene from the general scene.");
+            
             m_rpiScene = nullptr;
         }
     }

+ 57 - 22
Materials/DynamicMaterialTest/EmissiveMaterial.azsl

@@ -13,10 +13,12 @@
 #include <viewsrg.srgi>
 #include <Atom/Features/PBR/AlphaUtils.azsli>
 #include <Atom/Features/PBR/DefaultObjectSrg.azsli>
+#include <Atom/Features/PBR/ForwardPassSrg.azsli>
 #include <Atom/Features/PBR/ForwardPassOutput.azsli>
 #include <Atom/Features/ColorManagement/TransformColor.azsli>
 #include <Atom/Features/SrgSemantics.azsli>
-#include <Atom/Features/ColorManagement/TransformColor.azsli>
+#include <Atom/Features/PBR/Lighting/StandardLighting.azsli>
+#include <Atom/Features/PBR/Decals.azsli>
 
 ShaderResourceGroup MaterialSrg : SRG_PerMaterial
 {
@@ -54,7 +56,6 @@ struct VSOutput
     float3 m_shadowCoords[ViewSrg::MaxCascadeCount] : UV3;
 };
 
-#include <Atom/Features/PBR/LightingModel.azsli>
 #include <Atom/Features/Vertex/VertexHelper.azsli>
 option bool o_emissive_useTexture; 
 
@@ -69,33 +70,69 @@ VSOutput MainVS(VSInput IN)
 
 ForwardPassOutput MainPS(VSOutput IN)
 {
-    ForwardPassOutput OUT;
+    // ------- Surface -------
+
+    Surface surface;
     
-    const float3 baseColor = {0.05,0.05,0.05};
-    const float metallic = 0.0;
-    const float roughness = 1.0;
-    const float specularF0Factor = 0.5;
-    const float3 normal = normalize(IN.m_normal);
-    const float occlusion = 1;
-    const float clearCoatFactor = 0.0;
-    const float clearCoatRoughness = 0.0;
-    const float3 clearCoatNormal = {0,0,0};
-    const float4 transmissionTintThickness = {0,0,0,0};
-    const float4 transmissionParams = {0,0,0,0};
-    const float2 anisotropy = 0.0;	// Does not affect calculations unless 'o_enableAnisotropy' is enabled
-    const float alpha = 1.0;
+    // Position, Normal, Roughness
+    surface.position = IN.m_worldPosition.xyz;
+    surface.normal = normalize(IN.m_normal);
+    surface.roughnessLinear = 1.0f;
+    surface.CalculateRoughnessA();
+
+    // Albedo, SpecularF0
+    const float3 baseColor = float3(0.05f, 0.05f, 0.05f);
+    const float metallic = 0.0f;
+    const float specularF0Factor = 0.5f;
+    surface.SetAlbedoAndSpecularF0(baseColor, specularF0Factor, metallic);
+
+    // Clear Coat, Transmission
+    surface.clearCoat.InitializeToZero();
+    surface.transmission.InitializeToZero();
 
+    // ------- LightingData -------
+
+    LightingData lightingData;
+
+    // Light iterator
+    lightingData.tileIterator.Init(IN.m_position, PassSrg::m_lightListRemapped, PassSrg::m_tileLightData);
+    lightingData.Init(surface.position, surface.normal, surface.roughnessLinear);
+
+    // Shadow, Occlusion
+    lightingData.shadowCoords = IN.m_shadowCoords;
+
+    // Emissive
     float3 emissive = MaterialSrg::m_emissiveColor.rgb * MaterialSrg::m_emissiveIntensity;
     if (o_emissive_useTexture)
     {
         float4 sampledValue = MaterialSrg::m_emissiveMap.Sample(MaterialSrg::m_sampler, IN.m_uv);
         emissive *= TransformColor(sampledValue.rgb, ColorSpaceId::LinearSRGB, ColorSpaceId::ACEScg);
     }
+    lightingData.emissiveLighting = emissive;
+
+    // Diffuse and Specular response
+    lightingData.specularResponse = FresnelSchlickWithRoughness(lightingData.NdotV, surface.specularF0, surface.roughnessLinear);
+    lightingData.diffuseResponse = 1.0f - lightingData.specularResponse;
 
-    PbrLightingOutput lightingOutput = PbrLighting(IN, 
-        baseColor, metallic, roughness, specularF0Factor, 
-        normal, IN.m_tangent, IN.m_bitangent, anisotropy,
-        emissive, occlusion, occlusion, transmissionTintThickness, transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, OpacityMode::Opaque);
+    const float alpha = 1.0f;
+
+    // ------- Lighting Calculation -------
+
+    // Apply Decals
+    ApplyDecals(lightingData.tileIterator, surface);
+
+    // Apply Direct Lighting
+    ApplyDirectLighting(surface, lightingData);
+
+    // Apply Image Based Lighting (IBL)
+    ApplyIBL(surface, lightingData);
+
+    // Finalize Lighting
+    lightingData.FinalizeLighting(surface.transmission.tint);
+
+    PbrLightingOutput lightingOutput = GetPbrLightingOutput(surface, lightingData, alpha);
+
+    ForwardPassOutput OUT;
 
     OUT.m_diffuseColor = lightingOutput.m_diffuseColor;
     OUT.m_diffuseColor.w = -1; // Subsurface scattering is disabled
@@ -103,8 +140,6 @@ ForwardPassOutput MainPS(VSOutput IN)
     OUT.m_specularF0 = lightingOutput.m_specularF0;
     OUT.m_albedo = lightingOutput.m_albedo;
     OUT.m_normal = lightingOutput.m_normal;
-    OUT.m_scatterDistance = float3(0,0,0);
-
     return OUT;
 }
 

+ 0 - 7
Passes/CheckerboardPipeline.pass

@@ -345,13 +345,6 @@
                                 "Attachment": "AlbedoOutput"
                             }
                         },
-                        {
-                            "LocalSlot": "ClearCoatNormalInput",
-                            "AttachmentRef": {
-                                "Pass": "ForwardMSAAPass",
-                                "Attachment": "ClearCoatNormalOutput"
-                            }
-                        },
                         {
                             "LocalSlot": "DepthStencilInputOutput",
                             "AttachmentRef": {

+ 0 - 7
Passes/MSAA_RPI_Pipeline_Core.pass

@@ -174,13 +174,6 @@
                                 "Attachment": "AlbedoOutput"
                             }
                         },
-                        {
-                            "LocalSlot": "ClearCoatNormalInput",
-                            "AttachmentRef": {
-                                "Pass": "ForwardMSAAPass",
-                                "Attachment": "ClearCoatNormalOutput"
-                            }
-                        },
                         {
                             "LocalSlot": "DepthStencilInputOutput",
                             "AttachmentRef": {

+ 0 - 7
Passes/MainPipeline_Mobile.pass

@@ -295,13 +295,6 @@
                                 "Attachment": "AlbedoOutput"
                             }
                         },
-                        {
-                            "LocalSlot": "ClearCoatNormalInput",
-                            "AttachmentRef": {
-                                "Pass": "ForwardPass",
-                                "Attachment": "ClearCoatNormalOutput"
-                            }
-                        },
                         {
                             "LocalSlot": "DepthStencilInputOutput",
                             "AttachmentRef": {

+ 0 - 7
Passes/No_MSAA_RPI_Pipeline.pass

@@ -214,13 +214,6 @@
                                 "Attachment": "AlbedoOutput"
                             }
                         },
-                        {
-                            "LocalSlot": "ClearCoatNormalInput",
-                            "AttachmentRef": {
-                                "Pass": "ForwardPass",
-                                "Attachment": "ClearCoatNormalOutput"
-                            }
-                        },
                         {
                             "LocalSlot": "DepthStencilInputOutput",
                             "AttachmentRef": {

+ 4 - 0
Passes/PassTemplates.azasset

@@ -36,6 +36,10 @@
                 "Name": "ForwardMSAAPassTemplate",
                 "Path": "Passes/ForwardMSAA.pass"
             },
+            {
+                "Name": "ForwardSubsurfaceMSAAPassTemplate",
+                "Path": "Passes/ForwardSubsurfaceMSAA.pass"
+            },
             {
                 "Name": "CascadedShadowmapsTemplate",
                 "Path": "Passes/CascadedShadowmaps.pass"

+ 1 - 1
Scripts/AreaLightTest.bv.lua

@@ -156,7 +156,7 @@ do
         materialSetupFunction()
         
         IdleFrames(1) 
-        CaptureScreenshot(g_screenshotOutputFolder .. '/' .. lightName .. '_' .. materialName ..'.ppm')
+        CaptureScreenshot(g_screenshotOutputFolder .. '/' .. lightName .. '_' .. materialName ..'.png')
     end
 end
 

+ 1 - 1
Scripts/CheckerboardTest.bv.lua

@@ -22,6 +22,6 @@ SelectImageComparisonToleranceLevel("Level F")
 
 IdleFrames(10) 
 
-CaptureScreenshot(g_screenshotOutputFolder .. 'frame1.ppm')
+CaptureScreenshot(g_screenshotOutputFolder .. 'frame1.png')
 
 OpenSample(nil)

+ 1 - 1
Scripts/CullingAndLod.bv.lua

@@ -22,7 +22,7 @@ SelectImageComparisonToleranceLevel("Level G")
 
 SetImguiValue("Begin Verification", true)
 IdleFrames(5)
-CaptureScreenshot(g_screenshotOutputFolder .. '/screenshot_1.ppm')
+CaptureScreenshot(g_screenshotOutputFolder .. '/screenshot_1.png')
 IdleFrames(1)
 SetImguiValue("End Verification", true)
 IdleFrames(1) -- make sure all outstanding imgui comamnds are processed before closing sample.

+ 1 - 1
Scripts/Decals.bv.lua

@@ -13,7 +13,7 @@
 ----------------------------------------------------------------------------------------------------
 
 function TakeScreenshots()
-    CaptureScreenshot(g_screenshotOutputFolder .. '/screenshot_decals.ppm')
+    CaptureScreenshot(g_screenshotOutputFolder .. '/screenshot_decals.png')
 end
 
 g_screenshotOutputFolder = ResolvePath('@user@/Scripts/Screenshots/Decals/')

+ 1 - 1
Scripts/DiffuseGITest.bv.lua

@@ -24,7 +24,7 @@ else
 
     IdleSeconds(5)
 
-    CaptureScreenshot(g_screenshotOutputFolder .. '/screenshot_cornellbox.ppm')
+    CaptureScreenshot(g_screenshotOutputFolder .. '/screenshot_cornellbox.png')
 end
 
 OpenSample(nil)

+ 1 - 1
Scripts/DynamicDraw.bv.lua

@@ -21,6 +21,6 @@ ResizeViewport(800, 500)
 -- Vulkan's line width is different than dx12's 
 SelectImageComparisonToleranceLevel("Level F") 
 
-CaptureScreenshot(g_screenshotOutputFolder .. '/screenshot_1.ppm')
+CaptureScreenshot(g_screenshotOutputFolder .. '/screenshot_1.png')
 
 OpenSample(nil)

+ 2 - 2
Scripts/DynamicMaterialTest.bv.lua

@@ -40,13 +40,13 @@ function TakeScreenshotSeries(filenamePrefix)
     -- Note we pause while taking the screenshot so that IO delays won't impact the timing of the sample
 
     SetImguiValue("Pause", true)
-    CaptureScreenshot(g_screenshotOutputFolder .. filenamePrefix .. '_A.ppm')
+    CaptureScreenshot(g_screenshotOutputFolder .. filenamePrefix .. '_A.png')
     SetImguiValue("Pause", false)
 
     IdleSeconds(1.0)
 
     SetImguiValue("Pause", true)
-    CaptureScreenshot(g_screenshotOutputFolder .. filenamePrefix .. '_B.ppm')
+    CaptureScreenshot(g_screenshotOutputFolder .. filenamePrefix .. '_B.png')
     SetImguiValue("Pause", false)
 end
 

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/capsule_vary_metal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:21e6ffecb313eac751c6412ceff8edf1f2c29627bedbbd663fb589f2ec366626
+size 24382

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/capsule_vary_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:23e9edc17b2174aca55a480aae830ffb7cce59f9ee901f12b3fb4e3e10b3e5fc
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/capsule_vary_rough_metal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/capsule_vary_rough_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:604c150074b09aeefb55ee21e30aec3f9f5e5d59f63b05a3a5e78957b8fea327
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/capsule_vary_rough_nonmetal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:879114026f9bb34dff4870f66fb04866b122e8e56e606b0fb25b2f7bb6887019
+size 24717

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/capsule_vary_rough_nonmetal.ppm

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

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/disk_vary_metal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2d8b81a1e0bd2cfd5ce172d7ca2749a31b840f6e94793a5ada6f1fc7c0c59e91
+size 21534

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/disk_vary_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:17f95456b85c3c57b33a5473003d2c5d7232c1542121a1ed2a79c4a8b09b3591
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/disk_vary_rough_metal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4af7caedcfca038c3215f3a73e956bd8c1e4b1ce4a5675115ba4ba5cbc678a1a
+size 19123

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/disk_vary_rough_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8bc559f0174b912bead5f410ffaf4cf1c8a18c94320562d78652ca007b7dd8d5
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/disk_vary_rough_nonmetal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/disk_vary_rough_nonmetal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:55891650068ec37c34b7140e803c0f8e96bc98b1498d8621f58509152fa0a57d
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/point_vary_metal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/point_vary_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9ce436f9862e7b4d77341fa69bdfa27b005fdae71841a5d07223ab0d26939eee
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/point_vary_rough_metal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/point_vary_rough_metal.ppm

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

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/point_vary_rough_nonmetal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c715e64a286047ac7cf586499048813decbf3b0ec698e3dbb7786a5e383dd2f
+size 24851

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/point_vary_rough_nonmetal.ppm

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

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_metal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1058907319613bab356d42b0a5bc4be5c575d59aef92ee1b3ee7ad8e2d10a30e
+size 34086

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:16a705f2bdf895868c0fefdf6f7599a7d7ecec91f2ba8db434305f2ca9e551cc
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_rough_metal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_rough_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:017032e737a39b59817a2fbd377e6a3f1c5ec5f545ffa7d5d21353066d312bd8
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_rough_nonmetal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/polygon_double_sided_vary_rough_nonmetal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9f6ba6a2823b062bf71a6f9848d2f999f8ac0b4eb0849ce4cee1c2c4fe1ea5e9
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/polygon_vary_metal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/polygon_vary_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5c4830a1ef500c890539df5861587a51a14a33d3bb0018bcdd815be54deacc46
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/polygon_vary_rough_metal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6839349300877bc32ce505613a00752d92fb7639398ac215752728ee1411a75c
+size 23514

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/polygon_vary_rough_metal.ppm

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

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/polygon_vary_rough_nonmetal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/polygon_vary_rough_nonmetal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:82722a70a69de7ba17569631e6d64ff77ff5b295895a4ccea6f102268f026174
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_metal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9c0c215055d629726ccf25df52040a958e1546985bd4a4eac0e948beda3109c3
+size 22440

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:970fa025b67ebea664a0f8b2efb4a106631179bfb86f87d1f6d00c334d9cbde2
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_rough_metal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_rough_metal.ppm

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

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_rough_nonmetal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/quad_approx_vary_rough_nonmetal.ppm

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

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_metal.png

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

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_metal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4875af8c4d90eef31c4f209a33ceda0d83b75492f53488146f5ad26c778c164a
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_rough_metal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:34f37e668238066c98a58d593596527e2c2dd07554630245bdd1bd5b9fa949d6
+size 24119

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_rough_metal.ppm

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

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_rough_nonmetal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:86b1a8a10d5f807faaaa19efdd329af8942b4fdbcef77013576feeb9489b4e31
+size 32455

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_approx_vary_rough_nonmetal.ppm

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7edb2b1d57158396583abc1f150b64c90f4f9f5c30361bbde7527ad41328134e
-size 1920016

+ 3 - 0
Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_vary_metal.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:32cd6cadf769f9ff807b46df673b2d85ec6b3ad4b05b050a0efee1d70456669b
+size 33097

+ 0 - 3
Scripts/ExpectedScreenshots/AreaLights/quad_double_sided_vary_metal.ppm

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

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä