Skip to content

Commit 2f9af5c

Browse files
authored
Merge pull request #293 from aws-lumberyard-dev/cgalvan/gitflow_211130_atomsampleviewer_main
Merged `stabilization/2110` to `main`
2 parents 8aa0aae + 2d34bf6 commit 2f9af5c

File tree

625 files changed

+5395
-4751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

625 files changed

+5395
-4751
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
2-
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
#
2+
# Copyright (c) Contributors to the Open 3D Engine Project.
3+
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
#
45
# SPDX-License-Identifier: Apache-2.0 OR MIT
56
#
67
#

EngineFinder.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
2-
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
#
2+
# Copyright (c) Contributors to the Open 3D Engine Project.
3+
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
#
45
# SPDX-License-Identifier: Apache-2.0 OR MIT
56
#
67
#

Gem/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
2-
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
#
2+
# Copyright (c) Contributors to the Open 3D Engine Project.
3+
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
#
45
# SPDX-License-Identifier: Apache-2.0 OR MIT
56
#
67
#

Gem/Code/CMakeLists.txt

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
2-
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
#
2+
# Copyright (c) Contributors to the Open 3D Engine Project.
3+
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
#
45
# SPDX-License-Identifier: Apache-2.0 OR MIT
56
#
67
#
@@ -43,6 +44,7 @@ ly_add_target(
4344
Gem::Atom_Feature_Common.Static
4445
Gem::Atom_Component_DebugCamera.Static
4546
Gem::AtomSampleViewer.Lib.Static
47+
Gem::Profiler.Static
4648
)
4749

4850
ly_add_target(
@@ -139,31 +141,10 @@ endif()
139141
################################################################################
140142
# Gem dependencies
141143
################################################################################
142-
# The GameLauncher uses "Clients" gem variants:
143-
ly_enable_gems(PROJECT_NAME AtomSampleViewer GEM_FILE enabled_gems.cmake
144-
TARGETS AtomSampleViewer.GameLauncher
145-
VARIANTS Clients)
144+
145+
ly_enable_gems(PROJECT_NAME AtomSampleViewer GEM_FILE enabled_gems.cmake)
146146

147147
# If we build a server, then apply the gems to the server
148148
if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
149-
# if we're making a server, then add the "Server" gem variants to it:
150-
ly_enable_gems(PROJECT_NAME AtomSampleViewer GEM_FILE enabled_gems.cmake
151-
TARGETS AtomSampleViewer.ServerLauncher
152-
VARIANTS Servers)
153-
154149
set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS AtomSampleViewer)
155150
endif()
156-
157-
if (PAL_TRAIT_BUILD_HOST_TOOLS)
158-
# The Editor uses "Tools" gem variants:
159-
ly_enable_gems(
160-
PROJECT_NAME AtomSampleViewer GEM_FILE enabled_gems.cmake
161-
TARGETS Editor
162-
VARIANTS Tools)
163-
164-
# The pipeline tools use "Builders" gem variants:
165-
ly_enable_gems(
166-
PROJECT_NAME AtomSampleViewer GEM_FILE enabled_gems.cmake
167-
TARGETS AssetBuilder AssetProcessor AssetProcessorBatch
168-
VARIANTS Builders)
169-
endif()

Gem/Code/Lib/MaterialFunctors/StacksShaderCollectionFunctor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
*
2+
* Copyright (c) Contributors to the Open 3D Engine Project.
3+
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
*
45
* SPDX-License-Identifier: Apache-2.0 OR MIT
56
*
67
*/

Gem/Code/Lib/MaterialFunctors/StacksShaderCollectionFunctor.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
*
2+
* Copyright (c) Contributors to the Open 3D Engine Project.
3+
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
*
45
* SPDX-License-Identifier: Apache-2.0 OR MIT
56
*
67
*/
@@ -22,7 +23,8 @@ namespace AtomSampleViewer
2223
AZ_RTTI(StacksShaderCollectionFunctor, "{4E51A7D5-7DF1-4402-8975-F6C9DFDEDC1E}", AZ::RPI::MaterialFunctor);
2324

2425
static void Reflect(AZ::ReflectContext* context);
25-
26+
27+
using AZ::RPI::MaterialFunctor::Process;
2628
void Process(RuntimeContext& context) override;
2729

2830
private:

Gem/Code/Lib/MaterialFunctors/StacksShaderInputFunctor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
*
2+
* Copyright (c) Contributors to the Open 3D Engine Project.
3+
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
*
45
* SPDX-License-Identifier: Apache-2.0 OR MIT
56
*
67
*/

Gem/Code/Lib/MaterialFunctors/StacksShaderInputFunctor.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
*
2+
* Copyright (c) Contributors to the Open 3D Engine Project.
3+
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
*
45
* SPDX-License-Identifier: Apache-2.0 OR MIT
56
*
67
*/
@@ -23,7 +24,8 @@ namespace AtomSampleViewer
2324
AZ_RTTI(StacksShaderInputFunctor, "{7F607170-1BC2-4510-A252-8A665FC02052}", AZ::RPI::MaterialFunctor);
2425

2526
static void Reflect(AZ::ReflectContext* context);
26-
27+
28+
using AZ::RPI::MaterialFunctor::Process;
2729
void Process(RuntimeContext& context) override;
2830

2931
private:

Gem/Code/Source/AreaLightExampleComponent.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
*
2+
* Copyright (c) Contributors to the Open 3D Engine Project.
3+
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
*
45
* SPDX-License-Identifier: Apache-2.0 OR MIT
56
*
67
*/
@@ -62,16 +63,15 @@ namespace AtomSampleViewer
6263
void AreaLightExampleComponent::Activate()
6364
{
6465
// Get Feature processors
65-
AZ::RPI::ScenePtr scene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
66-
m_meshFeatureProcessor = scene->GetFeatureProcessor<AZ::Render::MeshFeatureProcessorInterface>();
67-
m_pointLightFeatureProcessor = scene->GetFeatureProcessor<AZ::Render::PointLightFeatureProcessorInterface>();
68-
m_diskLightFeatureProcessor = scene->GetFeatureProcessor<AZ::Render::DiskLightFeatureProcessorInterface>();
69-
m_capsuleLightFeatureProcessor = scene->GetFeatureProcessor<AZ::Render::CapsuleLightFeatureProcessorInterface>();
70-
m_polygonLightFeatureProcessor = scene->GetFeatureProcessor<AZ::Render::PolygonLightFeatureProcessorInterface>();
71-
m_quadLightFeatureProcessor = scene->GetFeatureProcessor<AZ::Render::QuadLightFeatureProcessorInterface>();
72-
m_skyBoxFeatureProcessor = scene->GetFeatureProcessor<AZ::Render::SkyBoxFeatureProcessorInterface>();
66+
m_meshFeatureProcessor = m_scene->GetFeatureProcessor<AZ::Render::MeshFeatureProcessorInterface>();
67+
m_pointLightFeatureProcessor = m_scene->GetFeatureProcessor<AZ::Render::PointLightFeatureProcessorInterface>();
68+
m_diskLightFeatureProcessor = m_scene->GetFeatureProcessor<AZ::Render::DiskLightFeatureProcessorInterface>();
69+
m_capsuleLightFeatureProcessor = m_scene->GetFeatureProcessor<AZ::Render::CapsuleLightFeatureProcessorInterface>();
70+
m_polygonLightFeatureProcessor = m_scene->GetFeatureProcessor<AZ::Render::PolygonLightFeatureProcessorInterface>();
71+
m_quadLightFeatureProcessor = m_scene->GetFeatureProcessor<AZ::Render::QuadLightFeatureProcessorInterface>();
72+
m_skyBoxFeatureProcessor = m_scene->GetFeatureProcessor<AZ::Render::SkyBoxFeatureProcessorInterface>();
7373

74-
m_auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(scene);
74+
m_auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(m_scene);
7575

7676
// Create background
7777
m_skyBoxFeatureProcessor->SetSkyboxMode(AZ::Render::SkyBoxMode::Cubemap);
@@ -99,7 +99,7 @@ namespace AtomSampleViewer
9999
azrtti_typeid<AZ::Debug::NoClipControllerComponent>());
100100

101101
// Sidebar
102-
m_materialBrowser.SetFilter([this](const AZ::Data::AssetInfo& assetInfo)
102+
m_materialBrowser.SetFilter([](const AZ::Data::AssetInfo& assetInfo)
103103
{
104104
return assetInfo.m_assetType == azrtti_typeid<AZ::RPI::MaterialAsset>() &&
105105
assetInfo.m_assetId.m_subId == 0; // no materials generated from models.
@@ -368,7 +368,7 @@ namespace AtomSampleViewer
368368
TransformVertices(points, m_config.GetRotationQuaternion(), position);
369369

370370
AZ::Vector3 direction = m_config.GetRotationQuaternion().TransformVector(AZ::Vector3::CreateAxisZ());
371-
m_polygonLightFeatureProcessor->SetPolygonPoints(handle, points.data(), points.size(), direction);
371+
m_polygonLightFeatureProcessor->SetPolygonPoints(handle, points.data(), static_cast<uint32_t>(points.size()), direction);
372372
}
373373
}
374374

@@ -436,7 +436,7 @@ namespace AtomSampleViewer
436436
for (uint32_t i = 0; i < vertexCount; ++i)
437437
{
438438
// Get a point on the circle and scale it by the min or max radius for every other point.
439-
AZ::Vector3 point = GetCirclePoint(i, vertexCount) * minMaxRadius[i % 2];
439+
AZ::Vector3 point = GetCirclePoint(static_cast<float>(i), static_cast<float>(vertexCount)) * minMaxRadius[i % 2];
440440
points.push_back(point);
441441
}
442442
return points;
@@ -452,8 +452,8 @@ namespace AtomSampleViewer
452452
{
453453
uint32_t nextI = (i + 1) % vertexCount;
454454

455-
AZ::Vector3 p0 = GetCirclePoint(i, vertexCount) * minMaxRadius[i % 2];
456-
AZ::Vector3 p1 = GetCirclePoint(nextI, vertexCount) * minMaxRadius[nextI % 2];
455+
AZ::Vector3 p0 = GetCirclePoint(static_cast<float>(i), static_cast<float>(vertexCount)) * minMaxRadius[i % 2];
456+
AZ::Vector3 p1 = GetCirclePoint(static_cast<float>(nextI), static_cast<float>(vertexCount)) * minMaxRadius[nextI % 2];
457457

458458
tris.push_back(p0);
459459
tris.push_back(p1);
@@ -833,7 +833,7 @@ namespace AtomSampleViewer
833833
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments args;
834834
args.m_colorCount = 1;
835835
args.m_colors = &nitsColor;
836-
args.m_vertCount = tris.size();
836+
args.m_vertCount = static_cast<uint32_t>(tris.size());
837837
args.m_verts = tris.data();
838838
m_auxGeom->DrawTriangles(args);
839839
break;

Gem/Code/Source/AreaLightExampleComponent.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
3-
*
2+
* Copyright (c) Contributors to the Open 3D Engine Project.
3+
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
*
45
* SPDX-License-Identifier: Apache-2.0 OR MIT
56
*
67
*/

0 commit comments

Comments
 (0)