2
0
Эх сурвалжийг харах

Adding auxgeom to the ASV test

mriegger 4 жил өмнө
parent
commit
d11aad4b3e

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

@@ -113,7 +113,7 @@ namespace AtomSampleViewer
             ScriptableImGui::Checkbox("Draw axis lines", &m_drawAxisLines);
             ScriptableImGui::Checkbox("Draw axis lines", &m_drawAxisLines);
             ScriptableImGui::Checkbox("Draw lines", &m_drawLines);
             ScriptableImGui::Checkbox("Draw lines", &m_drawLines);
             ScriptableImGui::Checkbox("Draw triangles", &m_drawTriangles);
             ScriptableImGui::Checkbox("Draw triangles", &m_drawTriangles);
-            ScriptableImGui::Checkbox("Draw shapex", &m_drawShapes);
+            ScriptableImGui::Checkbox("Draw shapes", &m_drawShapes);
             ScriptableImGui::Checkbox("Draw boxes", &m_drawBoxes);
             ScriptableImGui::Checkbox("Draw boxes", &m_drawBoxes);
             ScriptableImGui::Checkbox("Draw many primitives", &m_drawManyPrimitives);
             ScriptableImGui::Checkbox("Draw many primitives", &m_drawManyPrimitives);
             ScriptableImGui::Checkbox("Draw depth test primitives", &m_drawDepthTestPrimitives);
             ScriptableImGui::Checkbox("Draw depth test primitives", &m_drawDepthTestPrimitives);

+ 2 - 3
Gem/Code/Source/LightCullingExampleComponent.cpp

@@ -57,8 +57,7 @@ namespace AtomSampleViewer
     static const float TimingSmoothingFactor = 0.9f;
     static const float TimingSmoothingFactor = 0.9f;
     static const size_t MaxNumLights = 1024;
     static const size_t MaxNumLights = 1024;
     static const float AuxGeomDebugAlpha = 0.5f;
     static const float AuxGeomDebugAlpha = 0.5f;
-    static const AZ::Vector3 CameraStartPositionVespa = AZ::Vector3(3.37f, -1.44f, 1.82f);
-    static const AZ::Vector3 CameraStartPositionLongViewDownStreet = AZ::Vector3(-12.f, -35.5f, 0.7438f);
+    static const AZ::Vector3 CameraStartPosition = AZ::Vector3(-12.f, -35.5f, 0.7438f);
 
 
     AZ::Color LightCullingExampleComponent::GetRandomColor()
     AZ::Color LightCullingExampleComponent::GetRandomColor()
     {
     {
@@ -740,7 +739,7 @@ namespace AtomSampleViewer
     void LightCullingExampleComponent::MoveCameraToStartPosition()
     void LightCullingExampleComponent::MoveCameraToStartPosition()
     {
     {
         const AZ::Vector3 target = AZ::Vector3::CreateAxisZ();
         const AZ::Vector3 target = AZ::Vector3::CreateAxisZ();
-        const AZ::Transform transform = AZ::Transform::CreateLookAt(CameraStartPositionLongViewDownStreet, target, AZ::Transform::Axis::YPositive);
+        const AZ::Transform transform = AZ::Transform::CreateLookAt(CameraStartPosition, target, AZ::Transform::Axis::YPositive);
         AZ::TransformBus::Event(GetCameraEntityId(), &AZ::TransformBus::Events::SetWorldTM, transform);
         AZ::TransformBus::Event(GetCameraEntityId(), &AZ::TransformBus::Events::SetWorldTM, transform);
     }
     }
 
 

+ 45 - 0
Scripts/AuxGeom.bv.lua

@@ -0,0 +1,45 @@
+----------------------------------------------------------------------------------------------------
+--
+-- 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.
+--
+--
+----------------------------------------------------------------------------------------------------
+
+function TakeScreenShotBoxes()
+
+    NoClipCameraController_SetFov(DegToRad(70))
+    NoClipCameraController_SetHeading(DegToRad(-40))
+    NoClipCameraController_SetPitch(DegToRad(4))
+
+    IdleFrames(1) 
+    CaptureScreenshot(g_screenshotOutputFolder .. '/auxgeom_boxes.png')
+end
+
+function TakeScreenShotShapes()
+
+    NoClipCameraController_SetFov(DegToRad(70))
+    NoClipCameraController_SetHeading(DegToRad(-145))
+    NoClipCameraController_SetPitch(DegToRad(13.528164))
+
+    IdleFrames(1) 
+    CaptureScreenshot(g_screenshotOutputFolder .. '/auxgeom_shapes.png')
+end
+
+g_screenshotOutputFolder = ResolvePath('@user@/Scripts/Screenshots/AuxGeom/')
+Print('Saving screenshots to ' .. NormalizePath(g_screenshotOutputFolder))
+
+OpenSample('RPI/AuxGeom')
+ResizeViewport(800, 600)
+
+SelectImageComparisonToleranceLevel("Level G")
+TakeScreenShotBoxes()
+TakeScreenShotShapes()
+
+OpenSample(nil)

+ 3 - 0
Scripts/ExpectedScreenshots/AuxGeom/auxgeom_boxes.png

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

+ 3 - 0
Scripts/ExpectedScreenshots/AuxGeom/auxgeom_shapes.png

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

+ 1 - 0
Scripts/_FullTestSuite_.bv.lua

@@ -71,6 +71,7 @@ tests= {
 
 
     FastCheckSample('RHI/AlphaToCoverage'),
     FastCheckSample('RHI/AlphaToCoverage'),
     FastCheckSample('RHI/AsyncCompute'),
     FastCheckSample('RHI/AsyncCompute'),
+    FastCheckSample('RHI/AuxGeom'),
     FastCheckSample('RHI/BindlessPrototype'),
     FastCheckSample('RHI/BindlessPrototype'),
     FastCheckSample('RHI/Compute'),
     FastCheckSample('RHI/Compute'),
     FastCheckSample('RHI/CopyQueue'),
     FastCheckSample('RHI/CopyQueue'),