Merging main and resolving conflicts

This commit is contained in:
jckand
2021-04-26 09:54:32 -05:00
109 changed files with 4710 additions and 5981 deletions
+53 -39
View File
@@ -16,39 +16,53 @@
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
add_subdirectory(assetpipeline)
add_subdirectory(atom_renderer)
## Physics ##
# DISABLED - see LYN-2536
#if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
# ly_add_pytest(
# NAME AutomatedTesting::PhysicsTests
# TEST_SUITE main
# TEST_SERIAL
# PATH ${CMAKE_CURRENT_LIST_DIR}/physics/TestSuite_Active.py
# TIMEOUT 3600
# RUNTIME_DEPENDENCIES
# Legacy::Editor
# Legacy::CryRenderNULL
# AZ::AssetProcessor
# AutomatedTesting.Assets
# COMPONENT
# Physics
# )
# ly_add_pytest(
# NAME AutomatedTesting::PhysicsTests_Sandbox
# TEST_SUITE sandbox
# TEST_SERIAL
# PATH ${CMAKE_CURRENT_LIST_DIR}/physics/TestSuite_Sandbox.py
# TIMEOUT 3600
# RUNTIME_DEPENDENCIES
# Legacy::Editor
# Legacy::CryRenderNULL
# AZ::AssetProcessor
# AutomatedTesting.Assets
# COMPONENT
# Physics
# )
#endif()
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_pytest(
NAME AutomatedTesting::PhysicsTests_Main
TEST_SUITE main
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/physics/TestSuite_Main.py
TIMEOUT 3600
RUNTIME_DEPENDENCIES
Legacy::Editor
Legacy::CryRenderNULL
AZ::AssetProcessor
AutomatedTesting.Assets
COMPONENT
Physics
)
ly_add_pytest(
NAME AutomatedTesting::PhysicsTests_Periodic
TEST_SUITE periodic
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/physics/TestSuite_Periodic.py
TIMEOUT 3600
RUNTIME_DEPENDENCIES
Legacy::Editor
Legacy::CryRenderNULL
AZ::AssetProcessor
AutomatedTesting.Assets
COMPONENT
Physics
)
ly_add_pytest(
NAME AutomatedTesting::PhysicsTests_Sandbox
TEST_SUITE sandbox
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/physics/TestSuite_Sandbox.py
TIMEOUT 3600
RUNTIME_DEPENDENCIES
Legacy::Editor
Legacy::CryRenderNULL
AZ::AssetProcessor
AutomatedTesting.Assets
COMPONENT
Physics
)
endif()
## ScriptCanvas ##
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
@@ -177,7 +191,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
## DynVeg ##
ly_add_pytest(
NAME DynamicVegetationTests_Main
NAME AutomatedTesting::DynamicVegetationTests_Main
TEST_SERIAL
TEST_SUITE main
PATH ${CMAKE_CURRENT_LIST_DIR}/largeworlds/dyn_veg
@@ -193,7 +207,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
)
ly_add_pytest(
NAME DynamicVegetationTests_Sandbox
NAME AutomatedTesting::DynamicVegetationTests_Sandbox
TEST_SERIAL
TEST_SUITE sandbox
PATH ${CMAKE_CURRENT_LIST_DIR}/largeworlds/dyn_veg
@@ -209,7 +223,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
)
ly_add_pytest(
NAME DynamicVegetationTests_Periodic
NAME AutomatedTesting::DynamicVegetationTests_Periodic
TEST_SERIAL
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/largeworlds/dyn_veg
@@ -225,7 +239,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
## LandscapeCanvas ##
ly_add_pytest(
NAME LandscapeCanvasTests_Main
NAME AutomatedTesting::LandscapeCanvasTests_Main
TEST_SERIAL
TEST_SUITE main
PATH ${CMAKE_CURRENT_LIST_DIR}/largeworlds/landscape_canvas
@@ -240,7 +254,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
)
ly_add_pytest(
NAME LandscapeCanvasTests_Periodic
NAME AutomatedTesting::LandscapeCanvasTests_Periodic
TEST_SERIAL
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/largeworlds/landscape_canvas
@@ -256,7 +270,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
## GradientSignal ##
ly_add_pytest(
NAME GradientSignalTests_Periodic
NAME AutomatedTesting::GradientSignalTests_Periodic
TEST_SERIAL
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/largeworlds/gradient_signal
@@ -274,7 +288,7 @@ endif()
## Editor ##
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_FOUNDATION_TEST_SUPPORTED)
ly_add_pytest(
NAME EditorTests_Periodic
NAME AutomatedTesting::EditorTests_Periodic
TEST_SUITE periodic
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/editor
@@ -292,7 +306,7 @@ endif()
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
# Unstable, SPEC-3838 will restore
#ly_add_pytest(
# NAME asset_load_benchmark_test
# NAME AutomatedTesting::asset_load_benchmark_test
# TEST_SERIAL
# TEST_SUITE benchmark
# PATH ${CMAKE_CURRENT_LIST_DIR}/streaming/benchmark/asset_load_benchmark_test.py
@@ -278,6 +278,12 @@ class Tracer:
self.function = args[3]
self.message = args[4]
def __str__(self):
return f"Warning: [{self.filename}:{self.function}:{self.line}]: [{self.window}] {self.message}"
def __repr__(self):
return f"[Warning: {self.message}]"
class ErrorInfo:
def __init__(self, args):
self.window = args[0]
@@ -285,6 +291,12 @@ class Tracer:
self.line = args[2]
self.function = args[3]
self.message = args[4]
def __str__(self):
return f"Error: [{self.filename}:{self.function}:{self.line}]: [{self.window}] {self.message}"
def __repr__(self):
return f"[Error: {self.message}]"
class AssertInfo:
def __init__(self, args):
@@ -292,6 +304,12 @@ class Tracer:
self.line = args[1]
self.function = args[2]
self.message = args[3]
def __str__(self):
return f"Assert: [{self.filename}:{self.function}:{self.line}]: {self.message}"
def __repr__(self):
return f"[Assert: {self.message}]"
def _on_warning(self, args):
warningInfo = Tracer.WarningInfo(args)
@@ -0,0 +1,40 @@
#
# 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.
#
################################################################################
# Atom Renderer: Automated Tests
# Runs EditorPythonBindings (hydra) scripts inside the Editor to verify test results for the Atom renderer.
################################################################################
if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedTesting IN_LIST LY_PROJECTS)
ly_add_pytest(
NAME AutomatedTesting::AtomRenderer_HydraTests_Main
TEST_SUITE main
PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_MainSuite.py
TEST_SERIAL
TIMEOUT 300
RUNTIME_DEPENDENCIES
AssetProcessor
AutomatedTesting.Assets
Editor
)
ly_add_pytest(
NAME AutomatedTesting::AtomRenderer_HydraTests_Sandbox
TEST_SUITE sandbox
PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_SandboxSuite.py
TEST_SERIAL
TIMEOUT 300
RUNTIME_DEPENDENCIES
AssetProcessor
AutomatedTesting.Assets
Editor
)
endif()
@@ -0,0 +1,10 @@
"""
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.
"""
@@ -0,0 +1,10 @@
"""
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.
"""
@@ -0,0 +1,271 @@
"""
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.
"""
# This module does a bulk test and update of many components at once.
# Each test case is listed below in the format:
# "Test Case ID: Test Case Title (URL)"
# C32078130: Tone Mapper (https://testrail.agscollab.com/index.php?/cases/view/32078130)
# C32078129: Light (https://testrail.agscollab.com/index.php?/cases/view/32078129)
# C32078131: Radius Weight Modifier (https://testrail.agscollab.com/index.php?/cases/view/32078131)
# C32078127: PostFX Layer (https://testrail.agscollab.com/index.php?/cases/view/32078127)
# C32078126: Point Light (https://testrail.agscollab.com/index.php?/cases/view/32078126)
# C32078125: Physical Sky (https://testrail.agscollab.com/index.php?/cases/view/32078125)
# C32078115: Global Skylight (IBL) (https://testrail.agscollab.com/index.php?/cases/view/32078115)
# C32078121: Exposure Control (https://testrail.agscollab.com/index.php?/cases/view/32078121)
# C32078120: Directional Light (https://testrail.agscollab.com/index.php?/cases/view/32078120)
# C32078119: DepthOfField (https://testrail.agscollab.com/index.php?/cases/view/32078119)
# C32078118: Decal (https://testrail.agscollab.com/index.php?/cases/view/32078118)
# C32078117: Area Light (https://testrail.agscollab.com/index.php?/cases/view/32078117)
import os
import sys
import azlmbr.math as math
import azlmbr.bus as bus
import azlmbr.paths
import azlmbr.asset as asset
import azlmbr.entity as entity
import azlmbr.legacy.general as general
import azlmbr.editor as editor
sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "PythonTests"))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.utils import TestHelper
from editor_python_test_tools.editor_test_helper import EditorTestHelper
EditorTestHelper = EditorTestHelper(log_prefix="AtomEditorComponents")
def run():
"""
Summary:
The below common tests are done for each of the components.
1) Addition of component to the entity
2) UNDO/REDO of addition of component
3) Enter/Exit game mode
4) Hide/Show entity containing component
5) Deletion of component
6) UNDO/REDO of deletion of component
Some additional tests for specific components include
1) Assigning value to some properties of each component
2) Verifying if the component is activated only when the required components are added
Expected Result:
1) Component can be added to an entity.
2) The addition of component can be undone and redone.
3) Game mode can be entered/exited without issue.
4) Entity with component can be hidden/shown.
5) Component can be deleted.
6) The deletion of component can be undone and redone.
7) Component is activated only when the required components are added
8) Values can be assigned to the properties of the component
:return: None
"""
def create_entity_undo_redo_component_addition(component_name):
new_entity = hydra.Entity(f"{component_name}")
new_entity.create_entity(math.Vector3(512.0, 512.0, 34.0), [component_name])
general.log(f"{component_name}_test: Component added to the entity: "
f"{hydra.has_components(new_entity.id, [component_name])}")
# undo component addition
general.undo()
TestHelper.wait_for_condition(lambda: not hydra.has_components(new_entity.id, [component_name]), 2.0)
general.log(f"{component_name}_test: Component removed after UNDO: "
f"{not hydra.has_components(new_entity.id, [component_name])}")
# redo component addition
general.redo()
TestHelper.wait_for_condition(lambda: hydra.has_components(new_entity.id, [component_name]), 2.0)
general.log(f"{component_name}_test: Component added after REDO: "
f"{hydra.has_components(new_entity.id, [component_name])}")
return new_entity
def verify_enter_exit_game_mode(component_name):
general.enter_game_mode()
TestHelper.wait_for_condition(lambda: general.is_in_game_mode(), 1.0)
general.log(f"{component_name}_test: Entered game mode: {general.is_in_game_mode()}")
general.exit_game_mode()
TestHelper.wait_for_condition(lambda: not general.is_in_game_mode(), 1.0)
general.log(f"{component_name}_test: Exit game mode: {not general.is_in_game_mode()}")
def verify_hide_unhide_entity(component_name, entity_obj):
def is_entity_hidden(entity_id):
return editor.EditorEntityInfoRequestBus(bus.Event, "IsHidden", entity_id)
editor.EditorEntityAPIBus(bus.Event, "SetVisibilityState", entity_obj.id, False)
general.idle_wait_frames(1)
general.log(f"{component_name}_test: Entity is hidden: {is_entity_hidden(entity_obj.id)}")
editor.EditorEntityAPIBus(bus.Event, "SetVisibilityState", entity_obj.id, True)
general.idle_wait_frames(1)
general.log(f"{component_name}_test: Entity is shown: {not is_entity_hidden(entity_obj.id)}")
def verify_deletion_undo_redo(component_name, entity_obj):
editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntityById", entity_obj.id)
TestHelper.wait_for_condition(lambda: not hydra.find_entity_by_name(entity_obj.name), 1.0)
general.log(f"{component_name}_test: Entity deleted: {not hydra.find_entity_by_name(entity_obj.name)}")
general.undo()
TestHelper.wait_for_condition(lambda: hydra.find_entity_by_name(entity_obj.name) is not None, 1.0)
general.log(f"{component_name}_test: UNDO entity deletion works: "
f"{hydra.find_entity_by_name(entity_obj.name) is not None}")
general.redo()
TestHelper.wait_for_condition(lambda: not hydra.find_entity_by_name(entity_obj.name), 1.0)
general.log(f"{component_name}_test: REDO entity deletion works: "
f"{not hydra.find_entity_by_name(entity_obj.name)}")
def verify_required_component_addition(entity_obj, components_to_add, component_name):
def is_component_enabled(entity_componentid_pair):
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", entity_componentid_pair)
general.log(
f"{component_name}_test: Entity disabled initially: "
f"{not is_component_enabled(entity_obj.components[0])}")
for component in components_to_add:
entity_obj.add_component(component)
TestHelper.wait_for_condition(lambda: is_component_enabled(entity_obj.components[0]), 1.0)
general.log(
f"{component_name}_test: Entity enabled after adding "
f"required components: {is_component_enabled(entity_obj.components[0])}"
)
def verify_set_property(entity_obj, path, value):
entity_obj.get_set_test(0, path, value)
# Wait for Editor idle loop before executing Python hydra scripts.
TestHelper.init_idle()
# Create a new level.
new_level_name = "tmp_level" # Specified in TestAllComponentsBasicTests.py
heightmap_resolution = 512
heightmap_meters_per_pixel = 1
terrain_texture_resolution = 412
use_terrain = False
# Return codes are ECreateLevelResult defined in CryEdit.h
return_code = general.create_level_no_prompt(
new_level_name, heightmap_resolution, heightmap_meters_per_pixel, terrain_texture_resolution, use_terrain)
if return_code == 1:
general.log(f"{new_level_name} level already exists")
elif return_code == 2:
general.log("Failed to create directory")
elif return_code == 3:
general.log("Directory length is too long")
elif return_code != 0:
general.log("Unknown error, failed to create level")
else:
general.log(f"{new_level_name} level created successfully")
EditorTestHelper.after_level_load(bypass_viewport_resize=True)
# Delete all existing entities initially
search_filter = azlmbr.entity.SearchFilter()
all_entities = entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter)
editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntities", all_entities)
class ComponentTests:
"""Test launcher for each component."""
def __init__(self, component_name, *additional_tests):
self.component_name = component_name
self.additional_tests = additional_tests
self.run_component_tests()
def run_component_tests(self):
# Run common and additional tests
entity_obj = create_entity_undo_redo_component_addition(self.component_name)
# Enter/Exit game mode test
verify_enter_exit_game_mode(self.component_name)
# Any additional tests are executed here
for test in self.additional_tests:
test(entity_obj)
# Hide/Unhide entity test
verify_hide_unhide_entity(self.component_name, entity_obj)
# Deletion/Undo/Redo test
verify_deletion_undo_redo(self.component_name, entity_obj)
# Area Light Component
area_light = "Area Light"
ComponentTests(
area_light, lambda entity_obj: verify_required_component_addition(
entity_obj, ["Capsule Shape"], area_light))
# Decal Component
material_asset_path = os.path.join("Materials", "decal", "aiirship_nose_number_decal.material")
material_asset = asset.AssetCatalogRequestBus(
bus.Broadcast, "GetAssetIdByPath", material_asset_path, math.Uuid(), False)
ComponentTests(
"Decal", lambda entity_obj: verify_set_property(
entity_obj, "Settings|Decal Settings|Material", material_asset))
# DepthOfField Component
camera_entity = hydra.Entity("camera_entity")
camera_entity.create_entity(math.Vector3(512.0, 512.0, 34.0), ["Camera"])
depth_of_field = "DepthOfField"
ComponentTests(
depth_of_field,
lambda entity_obj: verify_required_component_addition(entity_obj, ["PostFX Layer"], depth_of_field),
lambda entity_obj: verify_set_property(
entity_obj, "Controller|Configuration|Camera Entity", camera_entity.id))
# Directional Light Component
ComponentTests(
"Directional Light",
lambda entity_obj: verify_set_property(
entity_obj, "Controller|Configuration|Shadow|Camera", camera_entity.id))
# Exposure Control Component
ComponentTests(
"Exposure Control", lambda entity_obj: verify_required_component_addition(
entity_obj, ["PostFX Layer"], "Exposure Control"))
# Global Skylight (IBL) Component
diffuse_image_path = os.path.join("LightingPresets", "greenwich_park_02_4k_iblskyboxcm.exr.streamingimage")
diffuse_image_asset = asset.AssetCatalogRequestBus(
bus.Broadcast, "GetAssetIdByPath", diffuse_image_path, math.Uuid(), False)
specular_image_path = os.path.join("LightingPresets", "greenwich_park_02_4k_iblskyboxcm.exr.streamingimage")
specular_image_asset = asset.AssetCatalogRequestBus(
bus.Broadcast, "GetAssetIdByPath", specular_image_path, math.Uuid(), False)
ComponentTests(
"Global Skylight (IBL)",
lambda entity_obj: verify_set_property(
entity_obj, "Controller|Configuration|Diffuse Image", diffuse_image_asset),
lambda entity_obj: verify_set_property(
entity_obj, "Controller|Configuration|Specular Image", specular_image_asset))
# Physical Sky Component
ComponentTests("Physical Sky")
# Point Light Component
ComponentTests("Point Light")
# PostFX Layer Component
ComponentTests("PostFX Layer")
# Radius Weight Modifier Component
ComponentTests("Radius Weight Modifier")
# Spot Light Component
ComponentTests("Light")
if __name__ == "__main__":
run()
@@ -0,0 +1,44 @@
"""
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.
"""
import logging
import os
import pytest
import ly_test_tools.environment.file_system as file_system
import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
EDITOR_TIMEOUT = 60
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("level", ["tmp_level"])
class TestAtomEditorComponents(object):
@pytest.fixture(autouse=True)
def setup_teardown(self, request, workspace, project, level):
# Cleanup our temp level
file_system.delete(
[os.path.join(workspace.paths.engine_root(), project, "Levels", "AtomLevels", level)], True, True)
def teardown():
# Cleanup our temp level
file_system.delete(
[os.path.join(workspace.paths.engine_root(), project, "Levels", "AtomLevels", level)], True, True)
request.addfinalizer(teardown)
# It requires at least one test
def test_Dummy(self, request, editor, level, workspace, project, launcher_platform):
pass
@@ -0,0 +1,219 @@
"""
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.
"""
import logging
import os
import pytest
import ly_test_tools.environment.file_system as file_system
import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
EDITOR_TIMEOUT = 60
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("level", ["tmp_level"])
class TestAtomEditorComponents(object):
@pytest.fixture(autouse=True)
def setup_teardown(self, request, workspace, project, level):
# Cleanup our temp level
file_system.delete(
[os.path.join(workspace.paths.engine_root(), project, "Levels", "AtomLevels", level)], True, True)
def teardown():
# Cleanup our temp level
file_system.delete(
[os.path.join(workspace.paths.engine_root(), project, "Levels", "AtomLevels", level)], True, True)
request.addfinalizer(teardown)
@pytest.mark.test_case_id(
"C32078130", # Tone Mapper
"C32078129", # Light
"C32078131", # Radius Weight Modifier
"C32078127", # PostFX Layer
"C32078126", # Point Light
"C32078125", # Physical Sky
"C32078115", # Global Skylight (IBL)
"C32078121", # Exposure Control
"C32078120", # Directional Light
"C32078119", # DepthOfField
"C32078118") # Decal
def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform):
cfg_args = [level]
expected_lines = [
# Area Light Component
"Area Light Entity successfully created",
"Area Light_test: Component added to the entity: True",
"Area Light_test: Component removed after UNDO: True",
"Area Light_test: Component added after REDO: True",
"Area Light_test: Entered game mode: True",
"Area Light_test: Entity enabled after adding required components: True",
"Area Light_test: Entity is hidden: True",
"Area Light_test: Entity is shown: True",
"Area Light_test: Entity deleted: True",
"Area Light_test: UNDO entity deletion works: True",
"Area Light_test: REDO entity deletion works: True",
# Decal Component
"Decal Entity successfully created",
"Decal_test: Component added to the entity: True",
"Decal_test: Component removed after UNDO: True",
"Decal_test: Component added after REDO: True",
"Decal_test: Entered game mode: True",
"Decal_test: Exit game mode: True",
"Decal Settings|Decal Settings|Material: SUCCESS",
"Decal_test: Entity is hidden: True",
"Decal_test: Entity is shown: True",
"Decal_test: Entity deleted: True",
"Decal_test: UNDO entity deletion works: True",
"Decal_test: REDO entity deletion works: True",
# DepthOfField Component
"DepthOfField Entity successfully created",
"DepthOfField_test: Component added to the entity: True",
"DepthOfField_test: Component removed after UNDO: True",
"DepthOfField_test: Component added after REDO: True",
"DepthOfField_test: Entered game mode: True",
"DepthOfField_test: Exit game mode: True",
"DepthOfField_test: Entity disabled initially: True",
"DepthOfField_test: Entity enabled after adding required components: True",
"DepthOfField Controller|Configuration|Camera Entity: SUCCESS",
"DepthOfField_test: Entity is hidden: True",
"DepthOfField_test: Entity is shown: True",
"DepthOfField_test: Entity deleted: True",
"DepthOfField_test: UNDO entity deletion works: True",
"DepthOfField_test: REDO entity deletion works: True",
# Directional Light Component
"Directional Light Entity successfully created",
"Directional Light_test: Component added to the entity: True",
"Directional Light_test: Component removed after UNDO: True",
"Directional Light_test: Component added after REDO: True",
"Directional Light_test: Entered game mode: True",
"Directional Light_test: Exit game mode: True",
"Directional Light Controller|Configuration|Shadow|Camera: SUCCESS",
"Directional Light_test: Entity is hidden: True",
"Directional Light_test: Entity is shown: True",
"Directional Light_test: Entity deleted: True",
"Directional Light_test: UNDO entity deletion works: True",
"Directional Light_test: REDO entity deletion works: True",
# Exposure Control Component
"Exposure Control Entity successfully created",
"Exposure Control_test: Component added to the entity: True",
"Exposure Control_test: Component removed after UNDO: True",
"Exposure Control_test: Component added after REDO: True",
"Exposure Control_test: Entered game mode: True",
"Exposure Control_test: Exit game mode: True",
"Exposure Control_test: Entity disabled initially: True",
"Exposure Control_test: Entity enabled after adding required components: True",
"Exposure Control_test: Entity is hidden: True",
"Exposure Control_test: Entity is shown: True",
"Exposure Control_test: Entity deleted: True",
"Exposure Control_test: UNDO entity deletion works: True",
"Exposure Control_test: REDO entity deletion works: True",
# Global Skylight (IBL) Component
"Global Skylight (IBL) Entity successfully created",
"Global Skylight (IBL)_test: Component added to the entity: True",
"Global Skylight (IBL)_test: Component removed after UNDO: True",
"Global Skylight (IBL)_test: Component added after REDO: True",
"Global Skylight (IBL)_test: Entered game mode: True",
"Global Skylight (IBL)_test: Exit game mode: True",
"Global Skylight (IBL) Controller|Configuration|Diffuse Image: SUCCESS",
"Global Skylight (IBL) Controller|Configuration|Specular Image: SUCCESS",
"Global Skylight (IBL)_test: Entity is hidden: True",
"Global Skylight (IBL)_test: Entity is shown: True",
"Global Skylight (IBL)_test: Entity deleted: True",
"Global Skylight (IBL)_test: UNDO entity deletion works: True",
"Global Skylight (IBL)_test: REDO entity deletion works: True",
# Physical Sky Component
"Physical Sky Entity successfully created",
"Physical Sky component was added to entity",
"Entity has a Physical Sky component",
"Physical Sky_test: Component added to the entity: True",
"Physical Sky_test: Component removed after UNDO: True",
"Physical Sky_test: Component added after REDO: True",
"Physical Sky_test: Entered game mode: True",
"Physical Sky_test: Exit game mode: True",
"Physical Sky_test: Entity is hidden: True",
"Physical Sky_test: Entity is shown: True",
"Physical Sky_test: Entity deleted: True",
"Physical Sky_test: UNDO entity deletion works: True",
"Physical Sky_test: REDO entity deletion works: True",
# Point Light Component
"Point Light Entity successfully created",
"Point Light_test: Component added to the entity: True",
"Point Light_test: Component removed after UNDO: True",
"Point Light_test: Component added after REDO: True",
"Point Light_test: Entered game mode: True",
"Point Light_test: Exit game mode: True",
"Point Light_test: Entity is hidden: True",
"Point Light_test: Entity is shown: True",
"Point Light_test: Entity deleted: True",
"Point Light_test: UNDO entity deletion works: True",
"Point Light_test: REDO entity deletion works: True",
# PostFX Layer Component
"PostFX Layer Entity successfully created",
"PostFX Layer_test: Component added to the entity: True",
"PostFX Layer_test: Component removed after UNDO: True",
"PostFX Layer_test: Component added after REDO: True",
"PostFX Layer_test: Entered game mode: True",
"PostFX Layer_test: Exit game mode: True",
"PostFX Layer_test: Entity is hidden: True",
"PostFX Layer_test: Entity is shown: True",
"PostFX Layer_test: Entity deleted: True",
"PostFX Layer_test: UNDO entity deletion works: True",
"PostFX Layer_test: REDO entity deletion works: True",
# Radius Weight Modifier Component
"Radius Weight Modifier Entity successfully created",
"Radius Weight Modifier_test: Component added to the entity: True",
"Radius Weight Modifier_test: Component removed after UNDO: True",
"Radius Weight Modifier_test: Component added after REDO: True",
"Radius Weight Modifier_test: Entered game mode: True",
"Radius Weight Modifier_test: Exit game mode: True",
"Radius Weight Modifier_test: Entity is hidden: True",
"Radius Weight Modifier_test: Entity is shown: True",
"Radius Weight Modifier_test: Entity deleted: True",
"Radius Weight Modifier_test: UNDO entity deletion works: True",
"Radius Weight Modifier_test: REDO entity deletion works: True",
# Light Component
"Light Entity successfully created",
"Light_test: Component added to the entity: True",
"Light_test: Component removed after UNDO: True",
"Light_test: Component added after REDO: True",
"Light_test: Entered game mode: True",
"Light_test: Exit game mode: True",
"Light_test: Entity is hidden: True",
"Light_test: Entity is shown: True",
"Light_test: Entity deleted: True",
"Light_test: UNDO entity deletion works: True",
"Light_test: REDO entity deletion works: True",
]
unexpected_lines = [
"failed to open",
"Traceback (most recent call last):",
]
hydra.launch_and_validate_results(
request,
TEST_DIRECTORY,
editor,
"hydra_AtomEditorComponents_AddedToEntity.py",
timeout=EDITOR_TIMEOUT,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
null_renderer=True,
cfg_args=cfg_args,
)
@@ -94,13 +94,13 @@ class TestAutomationBase:
editor_starttime = time.time()
self.logger.debug("Running automated test")
testcase_module_filepath = self._get_testcase_module_filepath(testcase_module)
pycmd = ["--runpythontest", testcase_module_filepath, "-BatchMode", "-autotest_mode", "-NullRenderer"] + extra_cmdline_args
pycmd = ["--runpythontest", testcase_module_filepath, "-BatchMode", "-autotest_mode", "-rhi=null"] + extra_cmdline_args
editor.args.extend(pycmd) # args are added to the WinLauncher start command
editor.start(backupFiles = False, launch_ap = False)
try:
editor.wait(TestAutomationBase.MAX_TIMEOUT)
except WaitTimeoutError:
errors.append(TestRunError("TIMEOUT", "Editor did not close after {TestAutomationBase.MAX_TIMEOUT} seconds, verify the test is ending and the application didn't freeze"))
errors.append(TestRunError("TIMEOUT", f"Editor did not close after {TestAutomationBase.MAX_TIMEOUT} seconds, verify the test is ending and the application didn't freeze"))
editor.kill()
output = editor.get_output()
@@ -118,16 +118,16 @@ class TestAutomationBase:
else:
error_str = "Test failed, no output available..\n"
errors.append(TestRunError("FAILED TEST", error_str))
if return_code != TestAutomationBase.TEST_FAIL_RETCODE: # Crashed
if return_code and return_code != TestAutomationBase.TEST_FAIL_RETCODE: # Crashed
crash_info = "-- No crash log available --"
error_log = os.path.join(workspace.paths.project_log(), 'error.log')
crash_log = os.path.join(workspace.paths.project_log(), 'error.log')
try:
waiter.wait_for(lambda: os.path.exists(error_log), timeout=TestAutomationBase.WAIT_FOR_CRASH_LOG)
waiter.wait_for(lambda: os.path.exists(crash_log), timeout=TestAutomationBase.WAIT_FOR_CRASH_LOG)
except AssertionError:
pass
try:
with open(error_log) as f:
with open(crash_log) as f:
crash_info = f.read()
except Exception as ex:
crash_info += f"\n{str(ex)}"
@@ -24,7 +24,7 @@ class Tests():
# fmt: on
def run():
def C14861501_PhysXCollider_RenderMeshAutoAssigned():
"""
Summary:
Create entity with Mesh component and assign a render mesh to the Mesh component. Add Physics Collider component
@@ -61,7 +61,7 @@ def run():
from asset_utils import Asset
# Asset paths
STATIC_MESH = os.path.join("assets", "c14861501_physxcollider_rendermeshautoassigned", "spherebot", "r0-b_body.cgf")
STATIC_MESH = os.path.join("assets", "c14861501_physxcollider_rendermeshautoassigned", "spherebot", "r0-b_body.azmodel")
PHYSX_MESH = os.path.join(
"assets", "c14861501_physxcollider_rendermeshautoassigned", "spherebot", "r0-b_body.pxmesh"
)
@@ -80,8 +80,8 @@ def run():
# 4) Assign a render mesh asset to Mesh component (the fbx mesh having both Static mesh and PhysX collision Mesh)
mesh_asset = Asset.find_asset_by_path(STATIC_MESH)
mesh_component.set_component_property_value("MeshComponentRenderNode|Mesh asset", mesh_asset.id)
mesh_asset.id = mesh_component.get_component_property_value("MeshComponentRenderNode|Mesh asset")
mesh_component.set_component_property_value("Controller|Configuration|Mesh Asset", mesh_asset.id)
mesh_asset.id = mesh_component.get_component_property_value("Controller|Configuration|Mesh Asset")
Report.result(Tests.assign_mesh_asset, mesh_asset.get_path() == STATIC_MESH.replace(os.sep, "/"))
# 5) Add PhysX Collider component
@@ -95,4 +95,8 @@ def run():
if __name__ == "__main__":
run()
import ImportPathHelper as imports
imports.init()
from utils import Report
Report.start_test(C14861501_PhysXCollider_RenderMeshAutoAssigned)
@@ -62,8 +62,8 @@ def C14861502_PhysXCollider_AssetAutoAssigned():
# Open 3D Engine Imports
import azlmbr.legacy.general as general
MESH_ASSET_PATH = os.path.join("Objects", "SphereBot", "r0-b_body.cgf")
MESH_PROPERTY_PATH = "MeshComponentRenderNode|Mesh asset"
MESH_ASSET_PATH = os.path.join("Objects", "SphereBot", "r0-b_body.azmodel")
MESH_PROPERTY_PATH = "Controller|Configuration|Mesh Asset"
TESTED_PROPERTY_PATH = "Shape Configuration|Asset|PhysX Mesh"
helper.init_idle()
@@ -69,7 +69,7 @@ def run():
import azlmbr.asset as azasset
# Asset paths
STATIC_MESH = os.path.join("assets", "c14861504_rendermeshasset_withnopxasset", "test_asset.cgf")
STATIC_MESH = os.path.join("assets", "c14861504_rendermeshasset_withnopxasset", "test_asset.azmodel")
helper.init_idle()
# 1) Load the empty level
@@ -85,8 +85,8 @@ def run():
# 4) Assign a render mesh asset to Mesh component (the fbx mesh having both Static mesh and PhysX collision Mesh)
mesh_asset = Asset.find_asset_by_path(STATIC_MESH)
mesh_component.set_component_property_value("MeshComponentRenderNode|Mesh asset", mesh_asset.id)
mesh_asset.id = mesh_component.get_component_property_value("MeshComponentRenderNode|Mesh asset")
mesh_component.set_component_property_value("Controller|Configuration|Mesh Asset", mesh_asset.id)
mesh_asset.id = mesh_component.get_component_property_value("Controller|Configuration|Mesh Asset")
Report.result(Tests.assign_mesh_asset, mesh_asset.get_path() == STATIC_MESH.replace(os.sep, "/"))
# 5) Add PhysX Collider component
@@ -27,7 +27,7 @@ class Tests():
# fmt: on
def run():
def C4044695_PhysXCollider_AddMultipleSurfaceFbx():
"""
Summary:
Create entity with Mesh and PhysX Collider components and assign a fbx file in both the components.
@@ -45,12 +45,7 @@ def run():
4) Select the PhysicsAsset shape in the PhysX Collider component
5) Assign the fbx file in PhysX Mesh and Mesh component
6) Check if multiple material slots show up under Materials section in the PhysX Collider component
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
# Builtins
@@ -70,7 +65,7 @@ def run():
SURFACE_TAG_COUNT = 4 # Number of surface tags included in used asset
# Asset paths
STATIC_MESH = os.path.join("assets", "c4044695_physxcollider_addmultiplesurfacefbx", "test.cgf")
STATIC_MESH = os.path.join("assets", "c4044695_physxcollider_addmultiplesurfacefbx", "test.azmodel")
PHYSX_MESH = os.path.join("assets", "c4044695_physxcollider_addmultiplesurfacefbx", "test.pxmesh")
helper.init_idle()
@@ -100,8 +95,8 @@ def run():
Report.result(Tests.assign_px_mesh_asset, px_asset.get_path() == PHYSX_MESH.replace(os.sep, "/"))
mesh_asset = Asset.find_asset_by_path(STATIC_MESH)
mesh_component.set_component_property_value("MeshComponentRenderNode|Mesh asset", mesh_asset.id)
mesh_asset.id = mesh_component.get_component_property_value("MeshComponentRenderNode|Mesh asset")
mesh_component.set_component_property_value("Controller|Configuration|Mesh Asset", mesh_asset.id)
mesh_asset.id = mesh_component.get_component_property_value("Controller|Configuration|Mesh Asset")
Report.result(Tests.assign_mesh_asset, mesh_asset.get_path() == STATIC_MESH.replace(os.sep, "/"))
# 6) Check if multiple material slots show up under Materials section in the PhysX Collider component
@@ -116,4 +111,8 @@ def run():
if __name__ == "__main__":
run()
import ImportPathHelper as imports
imports.init()
from utils import Report
Report.start_test(C4044695_PhysXCollider_AddMultipleSurfaceFbx)
@@ -27,7 +27,7 @@ class Tests():
def C4976236_AddPhysxColliderComponent():
"""
Summary:
Load level with Entity having PhysX Collider component. Verify that editor remains stable in Game mode.
Opens an empty level and creates an Entity with PhysX Collider. Verify that editor remains stable in Game mode.
Expected Behavior:
The Editor is stable there are no warnings or errors.
@@ -37,16 +37,10 @@ def C4976236_AddPhysxColliderComponent():
2) Create test entity
3) Start the Tracer to catch any errors and warnings
4) Add the PhysX Collider component and change shape to box
5) Add Mesh component and an asset
6) Enter game mode
7) Verify there are no errors and warnings in the logs
8) Exit game mode
9) Close the editor
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
5) Enter game mode
6) Verify there are no errors and warnings in the logs
7) Exit game mode
8) Close the editor
:return: None
"""
@@ -60,7 +54,7 @@ def C4976236_AddPhysxColliderComponent():
from editor_python_test_tools.utils import TestHelper as helper
from editor_python_test_tools.utils import Tracer
from asset_utils import Asset
helper.init_idle()
# 1) Load the level
helper.open_level("Physics", "Base")
@@ -74,17 +68,12 @@ def C4976236_AddPhysxColliderComponent():
# 4) Add the PhysX Collider component and change shape to box
collider_component = test_entity.add_component("PhysX Collider")
Report.result(Tests.add_physx_collider, test_entity.has_component("PhysX Collider"))
collider_component.set_component_property_value('Shape Configuration|Shape', 1)
collider_component.set_component_property_value('Shape Configuration|Shape', azlmbr.physics.ShapeType_Box)
# 5) Add Mesh component and an asset
mesh_component = test_entity.add_component("Mesh")
asset = Asset.find_asset_by_path(r"Objects\default\primitive_cube.cgf")
mesh_component.set_component_property_value('MeshComponentRenderNode|Mesh asset', asset.id)
# 6) Enter game mode
# 5) Enter game mode
helper.enter_game_mode(Tests.enter_game_mode)
# 7) Verify there are no errors and warnings in the logs
# 6) Verify there are no errors and warnings in the logs
success_condition = not (section_tracer.has_errors or section_tracer.has_warnings)
Report.result(Tests.no_errors_and_warnings_found, success_condition)
if not success_condition:
@@ -92,9 +81,8 @@ def C4976236_AddPhysxColliderComponent():
Report.info(f"Warnings found: {section_tracer.warnings}")
if section_tracer.has_errors:
Report.info(f"Errors found: {section_tracer.errors}")
Report.failure(Tests.no_errors_and_warnings_found)
# 8) Exit game mode
# 7) Exit game mode
helper.exit_game_mode(Tests.exit_game_mode)
@@ -0,0 +1,37 @@
"""
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.
"""
# This suite consists of all test cases that are passing and have been verified.
import pytest
import os
import sys
from .FileManagement import FileManagement as fm
from ly_test_tools import LAUNCHERS
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
from base import TestAutomationBase
revert_physics_config = fm.file_revert_list(['physxdebugconfiguration.setreg', 'physxdefaultsceneconfiguration.setreg', 'physxsystemconfiguration.setreg'], 'AutomatedTesting/Registry')
@pytest.mark.SUITE_main
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(TestAutomationBase):
def test_C111111_RigidBody_EnablingGravityWorksUsingNotificationsPoC(self, request, workspace, editor, launcher_platform):
from . import C111111_RigidBody_EnablingGravityWorksUsingNotificationsPoC as test_module
self._run_test(request, workspace, editor, test_module)
@@ -27,26 +27,16 @@ from base import TestAutomationBase
revert_physics_config = fm.file_revert_list(['physxdebugconfiguration.setreg', 'physxdefaultsceneconfiguration.setreg', 'physxsystemconfiguration.setreg'], 'AutomatedTesting/Registry')
@pytest.mark.SUITE_main
@pytest.mark.SUITE_periodic
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(TestAutomationBase):
# Marking the test as an expected failure due to sporadic failure on Automated Review: SPEC-3146
# The test still runs, but a failure of the test doesn't result in the test run failing
@pytest.mark.xfail(
reason="This test seems to fail sometimes due to it being the first test in the testsuite, we'll duplicate it temporarly."
"Need to figure out the reason why this is the case")
@revert_physics_config
def test_C000000_RigidBody_EnablingGravityWorksPoC_DUPLICATE(self, request, workspace, editor, launcher_platform):
from . import C100000_RigidBody_EnablingGravityWorksPoC as test_module
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
def test_C3510642_Terrain_NotCollideWithTerrain(self, request, workspace, editor, launcher_platform):
from . import C3510642_Terrain_NotCollideWithTerrain as test_module
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
def test_C4976195_RigidBodies_InitialLinearVelocity(self, request, workspace, editor, launcher_platform):
from . import C4976195_RigidBodies_InitialLinearVelocity as test_module
@@ -530,8 +520,4 @@ class TestAutomation(TestAutomationBase):
def test_C100000_RigidBody_EnablingGravityWorksPoC(self, request, workspace, editor, launcher_platform):
from . import C100000_RigidBody_EnablingGravityWorksPoC as test_module
self._run_test(request, workspace, editor, test_module)
def test_C111111_RigidBody_EnablingGravityWorksUsingNotificationsPoC(self, request, workspace, editor, launcher_platform):
from . import C111111_RigidBody_EnablingGravityWorksUsingNotificationsPoC as test_module
self._run_test(request, workspace, editor, test_module)
self._run_test(request, workspace, editor, test_module)
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:75cb1c8454aafc3de81351450a9480f91cb98d926a6e47f87a5ffe91e1d5a7d5
size 4745
oid sha256:f63204a86af8bc0963a4823d047a2e222cc19aabd14570d0789dc90cdc82970c
size 2017
@@ -1,356 +1,356 @@
<TimeOfDay Time="13.5" TimeStart="13.5" TimeEnd="13.5" TimeAnimSpeed="0">
<Variable Name="Sun color" Color="0.99989021,0.99946922,0.9991194">
<Spline Keys="-0.000628322:(0.783538:0.89627:0.930341):36,0:(0.783538:0.887923:0.921582):36,0.229167:(0.783538:0.879623:0.921582):36,0.25:(0.947307:0.745404:0.577581):36,0.458333:(1:1:1):36,0.5625:(1:1:1):36,0.75:(0.947307:0.745404:0.577581):36,0.770833:(0.783538:0.879623:0.921582):36,1:(0.783538:0.89627:0.930556):36,"/>
<Variable Name="Sun color" Color="0.78353798,0.89626998,0.93034101">
<Spline Keys="-0.000628322:(0.783538:0.89627:0.930341):36"/>
</Variable>
<Variable Name="Sun intensity" Value="92366.68">
<Spline Keys="0:1000:36,0.229167:1000:36,0.5:120000:36,0.770833:1000:65572,0.999306:1000:36,"/>
<Variable Name="Sun intensity" Value="1000">
<Spline Keys="0:1000:36"/>
</Variable>
<Variable Name="Sun specular multiplier" Value="1">
<Spline Keys="0:1:36,0.25:1:36,0.5:1:36,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Fog color" Color="0.27049801,0.47353199,0.83076996">
<Spline Keys="0:(0.00651209:0.00972122:0.0137021):36,0.229167:(0.00604883:0.00972122:0.0137021):36,0.25:(0.270498:0.473532:0.83077):36,0.5:(0.270498:0.473532:0.83077):458788,0.75:(0.270498:0.473532:0.83077):36,0.770833:(0.00604883:0.00972122:0.0137021):36,1:(0.00651209:0.00972122:0.0137021):36,"/>
<Variable Name="Fog color" Color="0.0065120901,0.0097212195,0.0137021">
<Spline Keys="0:(0.00651209:0.00972122:0.0137021):36"/>
</Variable>
<Variable Name="Fog color multiplier" Value="1">
<Spline Keys="0:0.5:36,0.229167:0.5:36,0.25:1:36,0.5:1:36,0.75:1:36,0.770833:0.5:36,1:0.5:65572,"/>
<Variable Name="Fog color multiplier" Value="0.5">
<Spline Keys="0:0.5:36"/>
</Variable>
<Variable Name="Fog height (bottom)" Value="0">
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Fog layer density (bottom)" Value="1">
<Spline Keys="0:1:36,0.25:1:36,0.5:1:36,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Fog color (top)" Color="0.597202,0.72305501,0.91309899">
<Spline Keys="0:(0.00699541:0.00972122:0.0122865):36,0.229167:(0.00699541:0.00972122:0.0122865):36,0.25:(0.597202:0.723055:0.913099):36,0.5:(0.597202:0.723055:0.913099):458788,0.75:(0.597202:0.723055:0.913099):36,0.770833:(0.00699541:0.00972122:0.0122865):36,1:(0.00699541:0.00972122:0.0122865):36,"/>
<Variable Name="Fog color (top)" Color="0.0069954102,0.0097212195,0.0122865">
<Spline Keys="0:(0.00699541:0.00972122:0.0122865):36"/>
</Variable>
<Variable Name="Fog color (top) multiplier" Value="0.88389361">
<Spline Keys="-4.40702e-06:0.5:36,0.0297507:0.499195:36,0.229167:0.5:36,0.5:1:36,0.770833:0.5:36,1:0.5:36,"/>
<Variable Name="Fog color (top) multiplier" Value="0.5">
<Spline Keys="-4.40702e-06:0.5:36"/>
</Variable>
<Variable Name="Fog height (top)" Value="100.00001">
<Spline Keys="0:100:36,0.25:100:36,0.5:100:36,0.75:100:65572,1:100:36,"/>
<Variable Name="Fog height (top)" Value="100">
<Spline Keys="0:100:36"/>
</Variable>
<Variable Name="Fog layer density (top)" Value="9.9999997e-05">
<Spline Keys="0:0.0001:36,0.25:0.0001:36,0.5:0.0001:65572,0.75:0.0001:36,1:0.0001:36,"/>
<Spline Keys="0:0.0001:36"/>
</Variable>
<Variable Name="Fog color height offset" Value="0">
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:65572,"/>
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Fog color (radial)" Color="0.78592348,0.52744436,0.17234583">
<Spline Keys="0:(0:0:0):36,0.229167:(0.00439144:0.00367651:0.00334654):36,0.25:(0.838799:0.564712:0.184475):36,0.5:(0.768151:0.514918:0.168269):458788,0.75:(0.838799:0.564712:0.184475):36,0.770833:(0.00402472:0.00334654:0.00303527):36,1:(0:0:0):36,"/>
<Variable Name="Fog color (radial)" Color="0,0,0">
<Spline Keys="0:(0:0:0):36"/>
</Variable>
<Variable Name="Fog color (radial) multiplier" Value="6">
<Spline Keys="0:0:36,0.25:6:36,0.5:6:36,0.75:6:36,1:0:36,"/>
<Variable Name="Fog color (radial) multiplier" Value="0">
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Fog radial size" Value="0.85000002">
<Spline Keys="0:0:36,0.25:0.85:65572,0.5:0.85:36,0.75:0.85:36,1:0:36,"/>
<Variable Name="Fog radial size" Value="0">
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Fog radial lobe" Value="0.75">
<Spline Keys="0:0:36,0.25:0.75:36,0.5:0.75:36,0.75:0.75:65572,1:0:36,"/>
<Variable Name="Fog radial lobe" Value="0">
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Volumetric fog: Final density clamp" Value="1">
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Volumetric fog: Global density" Value="1.5">
<Spline Keys="0:1.5:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:1.5:36,"/>
<Spline Keys="0:1.5:36"/>
</Variable>
<Variable Name="Volumetric fog: Ramp start" Value="25.000002">
<Spline Keys="0:25:36,0.25:25:36,0.5:25:65572,0.75:25:36,1:25:36,"/>
<Variable Name="Volumetric fog: Ramp start" Value="25">
<Spline Keys="0:25:36"/>
</Variable>
<Variable Name="Volumetric fog: Ramp end" Value="1000.0001">
<Spline Keys="0:1000:36,0.25:1000:36,0.5:1000:65572,0.75:1000:36,1:1000:36,"/>
<Variable Name="Volumetric fog: Ramp end" Value="1000">
<Spline Keys="0:1000:36"/>
</Variable>
<Variable Name="Volumetric fog: Ramp influence" Value="0.69999993">
<Spline Keys="0:0.7:36,0.25:0.7:36,0.5:0.7:65572,0.75:0.7:36,1:0.7:36,"/>
<Variable Name="Volumetric fog: Ramp influence" Value="0.69999999">
<Spline Keys="0:0.7:36"/>
</Variable>
<Variable Name="Volumetric fog: Shadow darkening" Value="0.20000002">
<Spline Keys="0:0.2:36,0.25:0.2:36,0.5:0.2:65572,0.75:0.2:36,1:0.2:36,"/>
<Variable Name="Volumetric fog: Shadow darkening" Value="0.2">
<Spline Keys="0:0.2:36"/>
</Variable>
<Variable Name="Volumetric fog: Shadow darkening sun" Value="0.5">
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
<Spline Keys="0:0.5:36"/>
</Variable>
<Variable Name="Volumetric fog: Shadow darkening ambient" Value="1">
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Volumetric fog: Shadow range" Value="0.10000001">
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Volumetric fog: Shadow range" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Volumetric fog 2: Fog height (bottom)" Value="0">
<Spline Keys="0:0:0,1:0:0,"/>
<Spline Keys="0:0:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Fog layer density (bottom)" Value="1">
<Spline Keys="0:1:0,1:1:0,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Fog height (top)" Value="4000">
<Spline Keys="0:4000:0,1:4000:0,"/>
<Spline Keys="0:4000:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Fog layer density (top)" Value="9.9999997e-05">
<Spline Keys="0:0.0001:0,1:0.0001:0,"/>
<Spline Keys="0:0.0001:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Global fog density" Value="0.1">
<Spline Keys="0:0.1:0,1:0.1:0,"/>
<Spline Keys="0:0.1:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Ramp start" Value="0">
<Spline Keys="0:0:0,1:0:0,"/>
<Spline Keys="0:0:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Ramp end" Value="0">
<Spline Keys="0:0:0,1:0:0,"/>
<Spline Keys="0:0:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Fog albedo color (atmosphere)" Color="1,1,1">
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
<Spline Keys="0:(1:1:1):0"/>
</Variable>
<Variable Name="Volumetric fog 2: Anisotropy factor (atmosphere)" Value="0.60000002">
<Spline Keys="0:0.6:0,1:0.6:0,"/>
<Spline Keys="0:0.6:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Fog albedo color (sun radial)" Color="1,1,1">
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
<Spline Keys="0:(1:1:1):0"/>
</Variable>
<Variable Name="Volumetric fog 2: Anisotropy factor (sun radial)" Value="0.94999999">
<Spline Keys="0:0.95:0,1:0.95:0,"/>
<Spline Keys="0:0.95:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Blend factor for sun scattering" Value="1">
<Spline Keys="0:1:0,1:1:0,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Blend mode for sun scattering" Value="0">
<Spline Keys="0:0:0,1:0:0,"/>
<Spline Keys="0:0:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Fog albedo color (entities)" Color="1,1,1">
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
<Spline Keys="0:(1:1:1):0"/>
</Variable>
<Variable Name="Volumetric fog 2: Anisotropy factor (entities)" Value="0.60000002">
<Spline Keys="0:0.6:0,1:0.6:0,"/>
<Spline Keys="0:0.6:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Maximum range of ray-marching" Value="64">
<Spline Keys="0:64:0,1:64:0,"/>
<Spline Keys="0:64:0"/>
</Variable>
<Variable Name="Volumetric fog 2: In-scattering factor" Value="1">
<Spline Keys="0:1:0,1:1:0,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Extinction factor" Value="0.30000001">
<Spline Keys="0:0.3:0,1:0.3:0,"/>
<Spline Keys="0:0.3:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Analytical volumetric fog visibility" Value="0.5">
<Spline Keys="0:0.5:0,1:0.5:0,"/>
<Spline Keys="0:0.5:0"/>
</Variable>
<Variable Name="Volumetric fog 2: Final density clamp" Value="1">
<Spline Keys="0:1:0,0.5:1:36,1:1:0,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Sky light: Sun intensity" Color="1,1,1">
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.494381:(1:1:1):65572,0.5:(1:1:1):36,0.75:(1:1:1):36,1:(1:1:1):36,"/>
<Spline Keys="0:(1:1:1):36"/>
</Variable>
<Variable Name="Sky light: Sun intensity multiplier" Value="200.00002">
<Spline Keys="0:200:36,0.25:200:36,0.5:200:36,0.75:200:36,1:200:36,"/>
<Variable Name="Sky light: Sun intensity multiplier" Value="200">
<Spline Keys="0:200:36"/>
</Variable>
<Variable Name="Sky light: Mie scattering" Value="6.779707">
<Spline Keys="0:40:36,0.5:2:36,1:40:36,"/>
<Variable Name="Sky light: Mie scattering" Value="40">
<Spline Keys="0:40:36"/>
</Variable>
<Variable Name="Sky light: Rayleigh scattering" Value="0.20000002">
<Spline Keys="0:0.2:36,0.229167:0.2:36,0.25:1:36,0.291667:0.2:36,0.5:0.2:36,0.729167:0.2:36,0.75:1:36,0.770833:0.2:36,1:0.2:36,"/>
<Variable Name="Sky light: Rayleigh scattering" Value="0.2">
<Spline Keys="0:0.2:36"/>
</Variable>
<Variable Name="Sky light: Sun anisotropy factor" Value="-0.99989998">
<Spline Keys="0:-0.9999:36,0.25:-0.9999:36,0.5:-0.9999:65572,0.75:-0.9999:36,1:-0.9999:36,"/>
<Spline Keys="0:-0.9999:36"/>
</Variable>
<Variable Name="Sky light: Wavelength (R)" Value="694">
<Spline Keys="0:694:36,0.25:694:36,0.5:694:65572,0.75:694:36,1:694:36,"/>
<Spline Keys="0:694:36"/>
</Variable>
<Variable Name="Sky light: Wavelength (G)" Value="596.99994">
<Spline Keys="0:597:36,0.25:597:36,0.5:597:36,0.75:597:36,1:597:36,"/>
<Variable Name="Sky light: Wavelength (G)" Value="597">
<Spline Keys="0:597:36"/>
</Variable>
<Variable Name="Sky light: Wavelength (B)" Value="488">
<Spline Keys="0:488:36,0.25:488:36,0.5:488:65572,0.75:488:36,1:488:36,"/>
<Spline Keys="0:488:36"/>
</Variable>
<Variable Name="Night sky: Horizon color" Color="0.27049801,0.39157301,0.52711499">
<Spline Keys="0:(0.270498:0.391573:0.520996):36,0.25:(0.270498:0.391573:0.527115):36,0.5:(0.270498:0.391573:0.527115):262180,0.75:(0.270498:0.391573:0.527115):36,1:(0.270498:0.391573:0.520996):36,"/>
<Variable Name="Night sky: Horizon color" Color="0.27049801,0.39157301,0.52099597">
<Spline Keys="0:(0.270498:0.391573:0.520996):36"/>
</Variable>
<Variable Name="Night sky: Horizon color multiplier" Value="0">
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
<Variable Name="Night sky: Horizon color multiplier" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Night sky: Zenith color" Color="0.36130697,0.434154,0.46778399">
<Spline Keys="0:(0.361307:0.434154:0.467784):36,0.25:(0.361307:0.434154:0.467784):36,0.5:(0.361307:0.434154:0.467784):262180,0.75:(0.361307:0.434154:0.467784):36,1:(0.361307:0.434154:0.467784):36,"/>
<Variable Name="Night sky: Zenith color" Color="0.361307,0.434154,0.46778399">
<Spline Keys="0:(0.361307:0.434154:0.467784):36"/>
</Variable>
<Variable Name="Night sky: Zenith color multiplier" Value="0">
<Spline Keys="0:0.02:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.02:36,"/>
<Variable Name="Night sky: Zenith color multiplier" Value="0.02">
<Spline Keys="0:0.02:36"/>
</Variable>
<Variable Name="Night sky: Zenith shift" Value="0.5">
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
<Spline Keys="0:0.5:36"/>
</Variable>
<Variable Name="Night sky: Star intensity" Value="0">
<Spline Keys="0:3:36,0.25:0:36,0.5:0:65572,0.75:0:36,0.836647:1.03977:36,1:3:36,"/>
<Variable Name="Night sky: Star intensity" Value="3">
<Spline Keys="0:3:36"/>
</Variable>
<Variable Name="Night sky: Moon color" Color="1,1,1">
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.5:(1:1:1):458788,0.75:(1:1:1):36,1:(1:1:1):36,"/>
<Spline Keys="0:(1:1:1):36"/>
</Variable>
<Variable Name="Night sky: Moon color multiplier" Value="0">
<Spline Keys="0:0.4:36,0.25:0:36,0.5:0:36,0.75:0:65572,1:0.4:36,"/>
<Variable Name="Night sky: Moon color multiplier" Value="0.40000001">
<Spline Keys="0:0.4:36"/>
</Variable>
<Variable Name="Night sky: Moon inner corona color" Color="0.904661,1,1">
<Spline Keys="0:(0.89627:1:1):36,0.25:(0.904661:1:1):36,0.5:(0.904661:1:1):393252,0.75:(0.904661:1:1):36,0.836647:(0.89627:1:1):36,1:(0.89627:1:1):36,"/>
<Variable Name="Night sky: Moon inner corona color" Color="0.89626998,1,1">
<Spline Keys="0:(0.89627:1:1):36"/>
</Variable>
<Variable Name="Night sky: Moon inner corona color multiplier" Value="0">
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
<Variable Name="Night sky: Moon inner corona color multiplier" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Night sky: Moon inner corona scale" Value="0">
<Spline Keys="0:2:36,0.25:0:36,0.5:0:65572,0.75:0:36,0.836647:0.693178:36,1:2:36,"/>
<Variable Name="Night sky: Moon inner corona scale" Value="2">
<Spline Keys="0:2:36"/>
</Variable>
<Variable Name="Night sky: Moon outer corona color" Color="0.201556,0.22696599,0.25415203">
<Spline Keys="0:(0.198069:0.226966:0.250158):36,0.25:(0.201556:0.226966:0.254152):36,0.5:(0.201556:0.226966:0.254152):36,0.75:(0.201556:0.226966:0.254152):36,1:(0.198069:0.226966:0.250158):36,"/>
<Variable Name="Night sky: Moon outer corona color" Color="0.19806901,0.22696599,0.25015801">
<Spline Keys="0:(0.198069:0.226966:0.250158):36"/>
</Variable>
<Variable Name="Night sky: Moon outer corona color multiplier" Value="0">
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
<Variable Name="Night sky: Moon outer corona color multiplier" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Night sky: Moon outer corona scale" Value="0">
<Spline Keys="0:0.01:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.01:36,"/>
<Variable Name="Night sky: Moon outer corona scale" Value="0.0099999998">
<Spline Keys="0:0.01:36"/>
</Variable>
<Variable Name="Cloud shading: Sun light multiplier" Value="1">
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Cloud shading: Sun custom color" Color="0.83076996,0.76815104,0.65837508">
<Spline Keys="0:(0.737911:0.737911:0.737911):36,0.25:(0.83077:0.768151:0.658375):36,0.5:(0.83077:0.768151:0.658375):458788,0.75:(0.83077:0.768151:0.658375):36,1:(0.737911:0.737911:0.737911):36,"/>
<Variable Name="Cloud shading: Sun custom color" Color="0.73791099,0.73791099,0.73791099">
<Spline Keys="0:(0.737911:0.737911:0.737911):36"/>
</Variable>
<Variable Name="Cloud shading: Sun custom color multiplier" Value="1">
<Spline Keys="0:0.1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:0.1:36,"/>
<Variable Name="Cloud shading: Sun custom color multiplier" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Cloud shading: Sun custom color influence" Value="0">
<Spline Keys="0:0.5:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.5:36,"/>
<Variable Name="Cloud shading: Sun custom color influence" Value="0.5">
<Spline Keys="0:0.5:36"/>
</Variable>
<Variable Name="Sun shafts visibility" Value="0">
<Spline Keys="0:0:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0:36,"/>
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Sun rays visibility" Value="1.5">
<Spline Keys="0:1:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:1:36,"/>
<Variable Name="Sun rays visibility" Value="1">
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Sun rays attenuation" Value="1.5">
<Spline Keys="0:0.1:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:0.1:36,"/>
<Variable Name="Sun rays attenuation" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Sun rays suncolor influence" Value="0.5">
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
<Spline Keys="0:0.5:36"/>
</Variable>
<Variable Name="Sun rays custom color" Color="0.66538697,0.83879906,0.94730699">
<Spline Keys="0:(0.665387:0.838799:0.947307):36,0.25:(0.665387:0.838799:0.947307):36,0.5:(0.665387:0.838799:0.947307):458788,0.75:(0.665387:0.838799:0.947307):36,1:(0.665387:0.838799:0.947307):36,"/>
<Variable Name="Sun rays custom color" Color="0.66538697,0.838799,0.94730699">
<Spline Keys="0:(0.665387:0.838799:0.947307):36"/>
</Variable>
<Variable Name="Ocean fog color" Color="0.0012141101,0.0091340598,0.017642001">
<Spline Keys="0:(0.00121411:0.00913406:0.017642):36,0.25:(0.00121411:0.00913406:0.017642):36,0.5:(0.00121411:0.00913406:0.017642):458788,0.75:(0.00121411:0.00913406:0.017642):36,1:(0.00121411:0.00913406:0.017642):36,"/>
<Variable Name="Ocean fog color" Color="0.0012141099,0.0091340598,0.017642001">
<Spline Keys="0:(0.00121411:0.00913406:0.017642):36"/>
</Variable>
<Variable Name="Ocean fog color multiplier" Value="0.5">
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
<Spline Keys="0:0.5:36"/>
</Variable>
<Variable Name="Ocean fog density" Value="0.5">
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
<Spline Keys="0:0.5:36"/>
</Variable>
<Variable Name="Static skybox multiplier" Value="1">
<Spline Keys="0:1:0,1:1:0,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Film curve shoulder scale" Value="2.232213">
<Spline Keys="0:3:36,0.229167:3:36,0.5:2:36,0.770833:3:36,1:3:36,"/>
<Variable Name="Film curve shoulder scale" Value="3">
<Spline Keys="0:3:36"/>
</Variable>
<Variable Name="Film curve midtones scale" Value="0.88389361">
<Spline Keys="0:0.5:36,0.229167:0.5:36,0.5:1:36,0.770833:0.5:36,1:0.5:36,"/>
<Variable Name="Film curve midtones scale" Value="0.5">
<Spline Keys="0:0.5:36"/>
</Variable>
<Variable Name="Film curve toe scale" Value="1">
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Film curve whitepoint" Value="4">
<Spline Keys="0:4:36,0.25:4:36,0.5:4:65572,0.75:4:36,1:4:36,"/>
<Spline Keys="0:4:36"/>
</Variable>
<Variable Name="Saturation" Value="1">
<Spline Keys="0:0.8:36,0.229167:0.8:36,0.5:1:36,0.751391:1:65572,0.770833:0.8:36,1:0.8:36,"/>
<Variable Name="Saturation" Value="0.80000001">
<Spline Keys="0:0.8:36"/>
</Variable>
<Variable Name="Color balance" Color="1,1,1">
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.5:(1:1:1):36,0.75:(1:1:1):36,1:(1:1:1):36,"/>
<Spline Keys="0:(1:1:1):36"/>
</Variable>
<Variable Name="Scene key" Value="0.18000002">
<Spline Keys="0:0.18:36,0.25:0.18:36,0.5:0.18:65572,0.75:0.18:36,1:0.18:36,"/>
<Variable Name="Scene key" Value="0.18000001">
<Spline Keys="0:0.18:36"/>
</Variable>
<Variable Name="Min exposure" Value="1">
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Max exposure" Value="2.6142297">
<Spline Keys="0:2:36,0.229167:2:36,0.5:2.8:36,0.770833:2:36,1:2:36,"/>
<Variable Name="Max exposure" Value="2">
<Spline Keys="0:2:36"/>
</Variable>
<Variable Name="EV Min" Value="4.5">
<Spline Keys="0:4.5:0,1:4.5:0,"/>
<Spline Keys="0:4.5:0"/>
</Variable>
<Variable Name="EV Max" Value="17">
<Spline Keys="0:17:0,1:17:0,"/>
<Spline Keys="0:17:0"/>
</Variable>
<Variable Name="EV Auto compensation" Value="1.5">
<Spline Keys="0:1.5:0,1:1.5:0,"/>
<Spline Keys="0:1.5:0"/>
</Variable>
<Variable Name="Bloom amount" Value="0.30899152">
<Spline Keys="0:1:36,0.229167:1:36,0.5:0.1:36,0.770833:1:36,1:1:36,"/>
<Variable Name="Bloom amount" Value="1">
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Filters: grain" Value="0">
<Spline Keys="0:0.3:65572,0.229167:0.3:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0.3:36,"/>
<Variable Name="Filters: grain" Value="0.30000001">
<Spline Keys="0:0.3:65572"/>
</Variable>
<Variable Name="Filters: photofilter color" Color="0,0,0">
<Spline Keys="0:(0:0:0):36,0.25:(0:0:0):36,0.5:(0:0:0):458788,0.75:(0:0:0):36,1:(0:0:0):36,"/>
<Spline Keys="0:(0:0:0):36"/>
</Variable>
<Variable Name="Filters: photofilter density" Value="0">
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Dof: focus range" Value="500.00003">
<Spline Keys="0:500:36,0.25:500:36,0.5:500:65572,0.75:500:36,1:500:36,"/>
<Variable Name="Dof: focus range" Value="500">
<Spline Keys="0:500:36"/>
</Variable>
<Variable Name="Dof: blur amount" Value="0.10000001">
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Dof: blur amount" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Cascade 0: Bias" Value="0.10000001">
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Cascade 0: Bias" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Cascade 0: Slope Bias" Value="64">
<Spline Keys="0:64:36,0.25:64:36,0.5:64:65572,0.75:64:36,1:64:36,"/>
<Spline Keys="0:64:36"/>
</Variable>
<Variable Name="Cascade 1: Bias" Value="0.10000001">
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Cascade 1: Bias" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Cascade 1: Slope Bias" Value="23">
<Spline Keys="0:23:36,0.25:23:36,0.5:23:65572,0.75:23:36,1:23:36,"/>
<Spline Keys="0:23:36"/>
</Variable>
<Variable Name="Cascade 2: Bias" Value="0.10000001">
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Cascade 2: Bias" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Cascade 2: Slope Bias" Value="4">
<Spline Keys="0:4:36,0.25:4:36,0.5:4:65572,0.75:4:36,1:4:36,"/>
<Spline Keys="0:4:36"/>
</Variable>
<Variable Name="Cascade 3: Bias" Value="0.10000001">
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Cascade 3: Bias" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
<Variable Name="Cascade 3: Slope Bias" Value="1">
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:36"/>
</Variable>
<Variable Name="Cascade 4: Bias" Value="0.10000001">
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Cascade 4: Bias" Value="0.1">
<Spline Keys="0:0.1:0"/>
</Variable>
<Variable Name="Cascade 4: Slope Bias" Value="1">
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Cascade 5: Bias" Value="0.0099999998">
<Spline Keys="0:0.01:0,0.25:0.01:36,0.5:0.01:65572,0.75:0.01:36,1:0.01:36,"/>
<Spline Keys="0:0.01:0"/>
</Variable>
<Variable Name="Cascade 5: Slope Bias" Value="1">
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Cascade 6: Bias" Value="0.10000001">
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Cascade 6: Bias" Value="0.1">
<Spline Keys="0:0.1:0"/>
</Variable>
<Variable Name="Cascade 6: Slope Bias" Value="1">
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Cascade 7: Bias" Value="0.10000001">
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
<Variable Name="Cascade 7: Bias" Value="0.1">
<Spline Keys="0:0.1:0"/>
</Variable>
<Variable Name="Cascade 7: Slope Bias" Value="1">
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
<Spline Keys="0:1:0"/>
</Variable>
<Variable Name="Shadow jittering" Value="2.4999998">
<Spline Keys="0:5:36,0.25:2.5:36,0.5:2.5:65572,0.75:2.5:36,1:5:0,"/>
<Variable Name="Shadow jittering" Value="5">
<Spline Keys="0:5:36"/>
</Variable>
<Variable Name="HDR dynamic power factor" Value="0">
<Spline Keys="0:0:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0:36,"/>
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Sky brightening (terrain occlusion)" Value="0">
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
<Spline Keys="0:0:36"/>
</Variable>
<Variable Name="Sun color multiplier" Value="9.999999">
<Spline Keys="0:0.1:36,0.25:10:36,0.5:10:36,0.75:10:36,1:0.1:36,"/>
<Variable Name="Sun color multiplier" Value="0.1">
<Spline Keys="0:0.1:36"/>
</Variable>
</TimeOfDay>
+1 -1
View File
@@ -1,7 +1,7 @@
sys_game_name = "AutomatedTesting"
sys_localization_folder = Localization
ca_useIMG_CAF = 0
sys_asserts=2
sys_asserts=1
-- Enable warnings when asset loads take longer than the given millisecond threshold
cl_assetLoadWarningEnable=true
+1 -1
View File
@@ -1294,7 +1294,7 @@ bool CSystem::OpenRenderLibrary(int type, const SSystemInitParams& initParams)
const char* libname = "";
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
libname = "CryRenderOther";
libname = DLL_RENDERER_NULL;
}
else if (type == R_DX9_RENDERER)
{
@@ -131,78 +131,18 @@ void CTextureManager::LoadDefaultTextures()
#endif
};
// Reduced list of default textures to load.
const TextureEntry texturesFromFileReduced[] =
for (const TextureEntry& entry : texturesFromFile)
{
{"NoTextureCM", "EngineAssets/TextureMsg/ReplaceMeCM.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"White", "EngineAssets/Textures/White.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"Gray", "EngineAssets/Textures/Grey.dds", FT_DONT_RELEASE | FT_DONT_STREAM },
{"Black", "EngineAssets/Textures/Black.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"BlackAlpha", "EngineAssets/Textures/BlackAlpha.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"BlackCM", "EngineAssets/Textures/BlackCM.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"FlatBump", "EngineAssets/Textures/White_ddn.tif", FT_DONT_RELEASE | FT_DONT_STREAM | FT_TEX_NORMAL_MAP },
{"AverageMemoryUsage", "EngineAssets/Icons/AverageMemoryUsage.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"LowMemoryUsage", "EngineAssets/Icons/LowMemoryUsage.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"HighMemoryUsage", "EngineAssets/Icons/HighMemoryUsage.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"LivePreview", "EngineAssets/Icons/LivePreview.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
#if !defined(_RELEASE)
{"NoTexture", "EngineAssets/TextureMsg/ReplaceMe.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling", "EngineAssets/TextureMsg/TextureCompiling.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling_a", "EngineAssets/TextureMsg/TextureCompiling_a.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling_cm", "EngineAssets/TextureMsg/TextureCompiling_cm.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling_ddn", "EngineAssets/TextureMsg/TextureCompiling_ddn.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"IconTextureCompiling_ddna", "EngineAssets/TextureMsg/TextureCompiling_ddna.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"DefaultMergedDetail", "EngineAssets/Textures/GreyAlpha.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"MipMapDebug", "EngineAssets/TextureMsg/MipMapDebug.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorBlue", "EngineAssets/TextureMsg/color_Blue.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorCyan", "EngineAssets/TextureMsg/color_Cyan.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorGreen", "EngineAssets/TextureMsg/color_Green.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorPurple", "EngineAssets/TextureMsg/color_Purple.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorRed", "EngineAssets/TextureMsg/color_Red.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorWhite", "EngineAssets/TextureMsg/color_White.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorYellow", "EngineAssets/TextureMsg/color_Yellow.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorOrange", "EngineAssets/TextureMsg/color_Orange.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
{"ColorMagenta", "EngineAssets/TextureMsg/color_Magenta.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
#else
{"NoTexture", "EngineAssets/TextureMsg/ReplaceMeRelease.tif", FT_DONT_RELEASE | FT_DONT_STREAM },
#endif
};
// Loop over the appropriate texture list and load the textures, storing them in a map keyed by texture name.
// Use reduced subset of textures for Other.
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
for (const TextureEntry& entry : texturesFromFileReduced)
CTexture* pNewTexture = CTexture::ForName(entry.szFileName, entry.flags, eTF_Unknown);
if (pNewTexture)
{
// Use EF_LoadTexture rather than CTexture::ForName
CTexture* pNewTexture = static_cast<CTexture*>(gEnv->pRenderer->EF_LoadTexture(entry.szFileName, entry.flags));
if (pNewTexture)
{
CCryNameTSCRC texEntry(entry.szTextureName);
m_DefaultTextures[texEntry] = pNewTexture;
}
else
{
AZ_Assert(false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
AZ_Warning("[Shaders System]", false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
}
CCryNameTSCRC texEntry(entry.szTextureName);
m_DefaultTextures[texEntry] = pNewTexture;
}
}
else
{
for (const TextureEntry& entry : texturesFromFile)
else
{
CTexture* pNewTexture = CTexture::ForName(entry.szFileName, entry.flags, eTF_Unknown);
if (pNewTexture)
{
CCryNameTSCRC texEntry(entry.szTextureName);
m_DefaultTextures[texEntry] = pNewTexture;
}
else
{
AZ_Assert(false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
AZ_Warning("[Shaders System]", false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
}
AZ_Assert(false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
AZ_Warning("[Shaders System]", false, "Error - CTextureManager failed to load default texture %s", entry.szFileName);
}
}
@@ -26,6 +26,22 @@ namespace Physics
->Field("Scale", &ShapeConfiguration::m_scale)
;
}
if (auto behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
{
#define REFLECT_SHAPETYPE_ENUM_VALUE(EnumValue) \
behaviorContext->EnumProperty<(int)Physics::ShapeType::EnumValue>("ShapeType_"#EnumValue) \
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) \
->Attribute(AZ::Script::Attributes::Module, "physics");
// Note: Here we only expose the types that are available to the user in the editor
REFLECT_SHAPETYPE_ENUM_VALUE(Box);
REFLECT_SHAPETYPE_ENUM_VALUE(Sphere);
REFLECT_SHAPETYPE_ENUM_VALUE(Cylinder);
REFLECT_SHAPETYPE_ENUM_VALUE(PhysicsAsset);
#undef REFLECT_SHAPETYPE_ENUM_VALUE
}
}
void SphereShapeConfiguration::Reflect(AZ::ReflectContext* context)
@@ -139,8 +139,11 @@ namespace AzToolsFramework
}
else
{
QPixmap pixmap = thumbnail->GetPixmap(size);
painter->drawPixmap(point, pixmap.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
// Scaling and centering pixmap within bounds to preserve aspect ratio
const QPixmap pixmap = thumbnail->GetPixmap(size).scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
const QSize sizeDelta = size - pixmap.size();
const QPoint pointDelta = QPoint(sizeDelta.width() / 2, sizeDelta.height() / 2);
painter->drawPixmap(point + pointDelta, pixmap);
}
return m_iconSize;
}
@@ -71,20 +71,12 @@ namespace AzToolsFramework
SharedThumbnail thumbnail;
ThumbnailerRequestsBus::BroadcastResult(thumbnail, &ThumbnailerRequests::GetThumbnail, m_key, m_contextName.c_str());
QPainter painter(this);
QPixmap pixmap = thumbnail->GetPixmap();
// preserve thumbnail image's ratio, if the widget is wider than the image, center the image hotizontally
float aspectRatio = aznumeric_cast<float>(pixmap.width()) / pixmap.height();
int originalWidth = width();
int originalHeight = height();
int realHeight = qMin(aznumeric_cast<int>(originalWidth /aspectRatio), originalHeight);
int realWidth = aznumeric_cast<int>(realHeight * aspectRatio);
int x = (originalWidth - realWidth) / 2;
// pixmap needs to be manually scaled to produce smoother result and avoid looking pixelated
// using painter.setRenderHint(QPainter::SmoothPixmapTransform); does not seem to work
// Note: there is a potential issue with pixmap.scaled:
// it is multithreaded (using global threadPool) and blocking until finished.
// A deadlock will happen if global threadPool has no free threads available.
painter.drawPixmap(QPoint(x, 0), pixmap.scaled(realWidth, realHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
// Scaling and centering pixmap within bounds to preserve aspect ratio
const QPixmap pixmap = thumbnail->GetPixmap().scaled(size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
const QSize sizeDelta = size() - pixmap.size();
const QPoint pointDelta = QPoint(sizeDelta.width() / 2, sizeDelta.height() / 2);
painter.drawPixmap(pointDelta, pixmap);
}
QWidget::paintEvent(event);
}
@@ -9,17 +9,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
if (LY_MONOLITHIC_GAME) # only Atom is supported in monolithic
set(LY_BUILD_DEPENDENCIES
PUBLIC
Legacy::CryRenderOther
)
else()
set(LY_BUILD_DEPENDENCIES
PRIVATE
Legacy::CryRenderD3D11
)
endif()
set(LY_BUILD_DEPENDENCIES
PRIVATE
Legacy::CryRenderD3D11
)
set(ICON_FILE ${project_real_path}/Gem/Resources/GameSDK.ico)
if(NOT EXISTS ${ICON_FILE})
+7 -7
View File
@@ -5232,6 +5232,13 @@ extern "C" int AZ_DLL_EXPORT CryEditMain(int argc, char* argv[])
AzQtComponents::Utilities::HandleDpiAwareness(AzQtComponents::Utilities::SystemDpiAware);
Editor::EditorQtApplication app(argc, argv);
if (app.arguments().contains("-autotest_mode"))
{
// Nullroute all stdout to null for automated tests, this way we make sure
// that the test result output is not polluted with unrelated output data.
theApp->RedirectStdoutToNull();
}
// Hook the trace bus to catch errors, boot the AZ app after the QApplication is up
int ret = 0;
@@ -5249,13 +5256,6 @@ extern "C" int AZ_DLL_EXPORT CryEditMain(int argc, char* argv[])
return -1;
}
if (app.arguments().contains("-autotest_mode"))
{
// Nullroute all stdout to null for automated tests, this way we make sure
// that the test result output is not polluted with unrelated output data.
theApp->RedirectStdoutToNull();
}
AzToolsFramework::EditorEvents::Bus::Broadcast(&AzToolsFramework::EditorEvents::NotifyQtApplicationAvailable, &app);
#if defined(AZ_PLATFORM_MAC)
@@ -886,7 +886,6 @@ void EditorViewportWidget::OnBeginPrepareRender()
fov = 2 * atanf((h * tan(fov / 2)) / maxTargetHeight);
}
}
m_Camera.SetFrustum(w, h, fov, fNearZ, gEnv->p3DEngine->GetMaxViewDistance());
}
@@ -550,7 +550,6 @@ void CMaterialManager::ReloadDirtyMaterials()
}
}
}
}
//////////////////////////////////////////////////////////////////////////
@@ -11,5 +11,5 @@
set(LY_BUILD_DEPENDENCIES
PRIVATE
Legacy::CryRenderD3D11
)
Legacy::CryRenderNULL
)
-2
View File
@@ -1,2 +0,0 @@
#Ignore these directories
SDKs
@@ -1,22 +0,0 @@
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
and Clark Cooper
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-1
View File
@@ -1 +0,0 @@
MotionBuilder support was removed in CL 88235, please back it out if this decision is reversed. This was for bug LMBR-9220
@@ -14,6 +14,7 @@
#include <AzCore/Module/Module.h>
#include "ImageProcessingSystemComponent.h"
#include "ImageBuilderComponent.h"
#include "Thumbnail/ImageThumbnailSystemComponent.h"
namespace ImageProcessingAtom
{
@@ -28,8 +29,9 @@ namespace ImageProcessingAtom
{
// Push results of the components' ::CreateDescriptor() into m_descriptors here.
m_descriptors.insert(m_descriptors.end(), {
ImageProcessingSystemComponent::CreateDescriptor(), //system component for editor
BuilderPluginComponent::CreateDescriptor(), //builder component for AP
Thumbnails::ImageThumbnailSystemComponent::CreateDescriptor(),
ImageProcessingSystemComponent::CreateDescriptor(), // system component for editor
BuilderPluginComponent::CreateDescriptor(), // builder component for AP
});
}
@@ -40,6 +42,7 @@ namespace ImageProcessingAtom
{
return AZ::ComponentTypeList{
azrtti_typeid<ImageProcessingSystemComponent>(),
azrtti_typeid<Thumbnails::ImageThumbnailSystemComponent>(),
};
}
};
@@ -218,12 +218,10 @@ namespace ImageProcessingAtom
AZ::Data::Asset<AZ::RPI::StreamingImageAsset> imageAsset = Utils::LoadImageAsset(product->GetAssetId());
IImageObjectPtr image = Utils::LoadImageFromImageAsset(imageAsset);
AZStd::string productInfo;
QImage previewImage;
if (image)
{
// Add product image info
AZStd::string productInfo;
GetImageInfoString(imageAsset, productInfo);
m_fileinfo += QStringLiteral("\r\n");
@@ -242,11 +240,11 @@ namespace ImageProcessingAtom
m_fileinfo += GetFileSize(source->GetFullPath().c_str());
IImageObjectPtr image = IImageObjectPtr(LoadImageFromFile(source->GetFullPath()));
AZStd::string sourceInfo;
QImage previewImage;
if (image)
{
// Add source image info
AZStd::string sourceInfo;
GetImageInfoString(image, sourceInfo);
m_fileinfo += QStringLiteral("\r\n");
@@ -0,0 +1,140 @@
/*
* 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 <AssetBrowser/Thumbnails/ProductThumbnail.h>
#include <AssetBrowser/Thumbnails/SourceThumbnail.h>
#include <Atom/RPI.Reflect/Image/StreamingImageAsset.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
#include <QtConcurrent/QtConcurrent>
#include <Source/ImageLoader/ImageLoaders.h>
#include <Source/Thumbnail/ImageThumbnail.h>
namespace ImageProcessingAtom
{
namespace Thumbnails
{
const int ImageThumbnailSize = 200;
//////////////////////////////////////////////////////////////////////////
// ImageThumbnail
//////////////////////////////////////////////////////////////////////////
ImageThumbnail::ImageThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey key, int thumbnailSize)
: Thumbnail(key, thumbnailSize)
{
auto sourceKey = azrtti_cast<const AzToolsFramework::AssetBrowser::SourceThumbnailKey*>(key.data());
if (sourceKey)
{
bool foundIt = false;
AZStd::vector<AZ::Data::AssetInfo> productAssetInfo;
AzToolsFramework::AssetSystemRequestBus::BroadcastResult(
foundIt, &AzToolsFramework::AssetSystemRequestBus::Events::GetAssetsProducedBySourceUUID, sourceKey->GetSourceUuid(),
productAssetInfo);
for (const auto& assetInfo : productAssetInfo)
{
m_assetIds.insert(assetInfo.m_assetId);
}
}
auto productKey = azrtti_cast<const AzToolsFramework::AssetBrowser::ProductThumbnailKey*>(key.data());
if (productKey && productKey->GetAssetType() == AZ::RPI::StreamingImageAsset::RTTI_Type())
{
m_assetIds.insert(productKey->GetAssetId());
}
AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Handler::BusConnect(key);
AzFramework::AssetCatalogEventBus::Handler::BusConnect();
}
ImageThumbnail::~ImageThumbnail()
{
AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Handler::BusDisconnect();
AzFramework::AssetCatalogEventBus::Handler::BusDisconnect();
}
void ImageThumbnail::LoadThread()
{
AzToolsFramework::Thumbnailer::ThumbnailerRendererRequestBus::QueueEvent(
AZ::RPI::StreamingImageAsset::RTTI_Type(), &AzToolsFramework::Thumbnailer::ThumbnailerRendererRequests::RenderThumbnail,
m_key,
m_thumbnailSize);
// wait for response from thumbnail renderer
m_renderWait.acquire();
}
void ImageThumbnail::ThumbnailRendered(QPixmap& thumbnailImage)
{
m_pixmap = thumbnailImage;
m_renderWait.release();
}
void ImageThumbnail::ThumbnailFailedToRender()
{
m_state = State::Failed;
m_renderWait.release();
}
void ImageThumbnail::OnCatalogAssetChanged([[maybe_unused]] const AZ::Data::AssetId& assetId)
{
if (m_state == State::Ready && m_assetIds.find(assetId) != m_assetIds.end())
{
m_state = State::Unloaded;
Load();
}
}
//////////////////////////////////////////////////////////////////////////
// ImageThumbnailCache
//////////////////////////////////////////////////////////////////////////
ImageThumbnailCache::ImageThumbnailCache()
: ThumbnailCache<ImageThumbnail>()
{
}
ImageThumbnailCache::~ImageThumbnailCache() = default;
int ImageThumbnailCache::GetPriority() const
{
// Image thumbnails override default source thumbnails, so carry higher priority
return 1;
}
const char* ImageThumbnailCache::GetProviderName() const
{
return ProviderName;
}
bool ImageThumbnailCache::IsSupportedThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) const
{
auto sourceKey = azrtti_cast<const AzToolsFramework::AssetBrowser::SourceThumbnailKey*>(key.data());
if (sourceKey)
{
bool foundIt = false;
AZ::Data::AssetInfo assetInfo;
AZStd::string watchFolder;
AzToolsFramework::AssetSystemRequestBus::BroadcastResult(
foundIt, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourceUUID, sourceKey->GetSourceUuid(),
assetInfo, watchFolder);
if (foundIt)
{
AZStd::string ext;
AZ::StringFunc::Path::GetExtension(assetInfo.m_relativePath.c_str(), ext, false);
return IsExtensionSupported(ext.c_str());
}
}
auto productKey = azrtti_cast<const AzToolsFramework::AssetBrowser::ProductThumbnailKey*>(key.data());
return productKey && productKey->GetAssetType() == AZ::RPI::StreamingImageAsset::RTTI_Type();
}
} // namespace Thumbnails
} // namespace ImageProcessingAtom
@@ -0,0 +1,74 @@
/*
* 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.
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <AzCore/std/containers/unordered_set.h>
#include <AzCore/std/parallel/binary_semaphore.h>
#include <AzFramework/Asset/AssetCatalogBus.h>
#include <AzToolsFramework/Thumbnails/Thumbnail.h>
#include <AzToolsFramework/Thumbnails/ThumbnailerBus.h>
#endif
namespace ImageProcessingAtom
{
namespace Thumbnails
{
/**
* Custom image thumbnail that detects when an asset changes and updates the thumbnail
*/
class ImageThumbnail
: public AzToolsFramework::Thumbnailer::Thumbnail
, public AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Handler
, public AzFramework::AssetCatalogEventBus::Handler
{
Q_OBJECT
public:
ImageThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey key, int thumbnailSize);
~ImageThumbnail() override;
//! AzToolsFramework::ThumbnailerRendererNotificationBus::Handler overrides...
void ThumbnailRendered(QPixmap& thumbnailImage) override;
void ThumbnailFailedToRender() override;
protected:
void LoadThread() override;
private:
// AzFramework::AssetCatalogEventBus::Handler interface overrides...
void OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) override;
AZStd::binary_semaphore m_renderWait;
AZStd::unordered_set<AZ::Data::AssetId> m_assetIds;
};
/**
* Cache configuration for large image thumbnails
*/
class ImageThumbnailCache
: public AzToolsFramework::Thumbnailer::ThumbnailCache<ImageThumbnail>
{
public:
ImageThumbnailCache();
~ImageThumbnailCache() override;
int GetPriority() const override;
const char* GetProviderName() const override;
static constexpr const char* ProviderName = "Image Thumbnails";
protected:
bool IsSupportedThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) const override;
};
} // namespace Thumbnails
} // namespace ImageProcessingAtom
@@ -0,0 +1,180 @@
/*
* 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 "ImageProcessing_precompiled.h"
#include <AzCore/Serialization/EditContext.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Utils/Utils.h>
#include <AzFramework/Asset/AssetSystemBus.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
#include <AzToolsFramework/AssetBrowser/Thumbnails/ProductThumbnail.h>
#include <AzToolsFramework/AssetBrowser/Thumbnails/SourceThumbnail.h>
#include <AzToolsFramework/Thumbnails/ThumbnailContext.h>
#include <ImageLoader/ImageLoaders.h>
#include <Processing/ImageConvert.h>
#include <Processing/ImageToProcess.h>
#include <Processing/Utils.h>
#include <Thumbnail/ImageThumbnail.h>
#include <Thumbnail/ImageThumbnailSystemComponent.h>
namespace ImageProcessingAtom
{
namespace Thumbnails
{
void ImageThumbnailSystemComponent::Reflect(AZ::ReflectContext* context)
{
if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
{
serialize->Class<ImageThumbnailSystemComponent, AZ::Component>()
->Version(0);
if (AZ::EditContext* ec = serialize->GetEditContext())
{
ec->Class<ImageThumbnailSystemComponent>("ImageThumbnailSystemComponent", "System component for image thumbnails.")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
->Attribute(AZ::Edit::Attributes::AutoExpand, true);
}
}
}
void ImageThumbnailSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
{
provided.push_back(AZ_CRC_CE("ImageThumbnailSystem"));
}
void ImageThumbnailSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
{
incompatible.push_back(AZ_CRC_CE("ImageThumbnailSystem"));
}
void ImageThumbnailSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
{
required.push_back(AZ_CRC_CE("ThumbnailerService"));
}
void ImageThumbnailSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)
{
AZ_UNUSED(dependent);
}
void ImageThumbnailSystemComponent::Activate()
{
AzFramework::ApplicationLifecycleEvents::Bus::Handler::BusConnect();
AzToolsFramework::Thumbnailer::ThumbnailerRendererRequestBus::Handler::BusConnect(AZ::RPI::StreamingImageAsset::RTTI_Type());
SetupThumbnails();
}
void ImageThumbnailSystemComponent::Deactivate()
{
TeardownThumbnails();
AzToolsFramework::Thumbnailer::ThumbnailerRendererRequestBus::Handler::BusDisconnect();
AzFramework::ApplicationLifecycleEvents::Bus::Handler::BusDisconnect();
}
void ImageThumbnailSystemComponent::SetupThumbnails()
{
using namespace AzToolsFramework::Thumbnailer;
ThumbnailerRequestsBus::Broadcast(
&ThumbnailerRequests::RegisterThumbnailProvider, MAKE_TCACHE(Thumbnails::ImageThumbnailCache),
ThumbnailContext::DefaultContext);
}
void ImageThumbnailSystemComponent::TeardownThumbnails()
{
using namespace AzToolsFramework::Thumbnailer;
ThumbnailerRequestsBus::Broadcast(
&ThumbnailerRequests::UnregisterThumbnailProvider, Thumbnails::ImageThumbnailCache::ProviderName,
ThumbnailContext::DefaultContext);
}
void ImageThumbnailSystemComponent::OnApplicationAboutToStop()
{
TeardownThumbnails();
}
bool ImageThumbnailSystemComponent::Installed() const
{
return true;
}
void ImageThumbnailSystemComponent::RenderThumbnail(
AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize)
{
auto sourceKey = azrtti_cast<const AzToolsFramework::AssetBrowser::SourceThumbnailKey*>(thumbnailKey.data());
if (sourceKey)
{
bool foundIt = false;
AZ::Data::AssetInfo assetInfo;
AZStd::string watchFolder;
AzToolsFramework::AssetSystemRequestBus::BroadcastResult(
foundIt, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourceUUID, sourceKey->GetSourceUuid(),
assetInfo, watchFolder);
if (foundIt)
{
AZStd::string fullPath;
AZ::StringFunc::Path::Join(watchFolder.c_str(), assetInfo.m_relativePath.c_str(), fullPath);
if (RenerThumbnailFromImage(thumbnailKey, thumbnailSize, IImageObjectPtr(LoadImageFromFile(fullPath))))
{
return;
}
}
}
auto productKey = azrtti_cast<const AzToolsFramework::AssetBrowser::ProductThumbnailKey*>(thumbnailKey.data());
if (productKey)
{
if (RenerThumbnailFromImage(thumbnailKey, thumbnailSize, Utils::LoadImageFromImageAsset(productKey->GetAssetId())))
{
return;
}
}
AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Event(
thumbnailKey, &AzToolsFramework::Thumbnailer::ThumbnailerRendererNotifications::ThumbnailFailedToRender);
}
bool ImageThumbnailSystemComponent::RenerThumbnailFromImage(
AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize, IImageObjectPtr previewImage) const
{
if (!previewImage)
{
return false;
}
ImageToProcess imageToProcess(previewImage);
imageToProcess.ConvertFormat(ePixelFormat_R8G8B8A8);
previewImage = imageToProcess.Get();
AZ::u8* imageBuf = nullptr;
AZ::u32 mip = 0;
AZ::u32 pitch = 0;
previewImage->GetImagePointer(mip, imageBuf, pitch);
const AZ::u32 width = previewImage->GetWidth(mip);
const AZ::u32 height = previewImage->GetHeight(mip);
QImage image(imageBuf, width, height, pitch, QImage::Format_RGBA8888);
AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Event(
thumbnailKey, &AzToolsFramework::Thumbnailer::ThumbnailerRendererNotifications::ThumbnailRendered,
QPixmap::fromImage(image.scaled(QSize(thumbnailSize, thumbnailSize), Qt::KeepAspectRatio, Qt::SmoothTransformation)));
return true;
}
} // namespace Thumbnails
} // namespace ImageProcessingAtom
@@ -0,0 +1,59 @@
/*
* 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.
*
*/
#pragma once
#include <AzCore/Component/Component.h>
#include <AzFramework/Application/Application.h>
#include <AzToolsFramework/Thumbnails/Thumbnail.h>
#include <AzToolsFramework/Thumbnails/ThumbnailerBus.h>
namespace ImageProcessingAtom
{
namespace Thumbnails
{
//! System component for image thumbnails.
class ImageThumbnailSystemComponent
: public AZ::Component
, public AzFramework::ApplicationLifecycleEvents::Bus::Handler
, public AzToolsFramework::Thumbnailer::ThumbnailerRendererRequestBus::Handler
{
public:
AZ_COMPONENT(ImageThumbnailSystemComponent, "{C45D69BB-4A3B-49CF-916B-580F05CAA755}");
static void Reflect(AZ::ReflectContext* context);
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
protected:
// AZ::Component interface overrides...
void Activate() override;
void Deactivate() override;
private:
void SetupThumbnails();
void TeardownThumbnails();
// AzFramework::ApplicationLifecycleEvents overrides...
void OnApplicationAboutToStop() override;
// ThumbnailerRendererRequestsBus::Handler interface overrides...
bool Installed() const override;
void RenderThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize) override;
bool RenerThumbnailFromImage(
AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize, IImageObjectPtr previewImage) const;
};
} // namespace Thumbnails
} // namespace ImageProcessingAtom
@@ -133,4 +133,8 @@ set(FILES
Source/Compressors/CryTextureSquisher/ColorBlockRGBA4x4s.h
Source/Compressors/CryTextureSquisher/ColorBlockRGBA4x4c.h
Source/Compressors/CryTextureSquisher/ColorTypes.h
Source/Thumbnail/ImageThumbnail.cpp
Source/Thumbnail/ImageThumbnail.h
Source/Thumbnail/ImageThumbnailSystemComponent.cpp
Source/Thumbnail/ImageThumbnailSystemComponent.h
)
@@ -9,7 +9,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(LY_COMPILE_OPTIONS
PRIVATE
-xobjective-c++
set(GLAD_VULKAN_COMPILE_DEFINITIONS
VK_USE_PLATFORM_XCB_KHR
)
+1 -1
View File
@@ -188,11 +188,11 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
BUILD_DEPENDENCIES
PRIVATE
AZ::AzCore
Gem::Atom_RHI.Edit
Gem::Atom_RHI.Reflect
Gem::Atom_RHI.Public
Gem::Atom_RHI_Vulkan.Reflect
Gem::Atom_RHI_Vulkan.Builders.Static
Gem::Atom_RHI.Edit
)
endif()
@@ -10,3 +10,6 @@
*
*/
#pragma once
#include <xcb/xcb.h>
#include <xcb/xcbext.h>
@@ -1,6 +1,6 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or
* a third party where indicated.
* 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,
@@ -9,15 +9,13 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include "CryRenderOther_precompiled.h"
namespace Platform
{
WIN_HWND GetNativeWindowHandle()
{
return GetDesktopWindow();
}
}
#include <AzCore/base.h>
#include <AzCore/PlatformIncl.h>
#include <AzCore/std/algorithm.h>
#include <vulkan/vulkan.h>
#include <limits.h>
#include <RHI/Vulkan.h>
#define AZ_VULKAN_SURFACE_EXTENSION_NAME VK_KHR_XCB_SURFACE_EXTENSION_NAME
@@ -11,4 +11,5 @@
*/
#pragma once
#include <Atom_RHI_Vulkan_precompiled_Linux.h>
@@ -9,4 +9,4 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(PAL_TRAIT_ATOM_RHI_VULKAN_SUPPORTED FALSE)
set(PAL_TRAIT_ATOM_RHI_VULKAN_SUPPORTED TRUE)
@@ -0,0 +1,51 @@
/*
* 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 <Atom/RHI.Reflect/Vulkan/ReflectSystemComponent.h>
#include <Atom/RHI.Reflect/ReflectSystemComponent.h>
#include <AzCore/Module/Module.h>
#include <RHI.Builders/ShaderPlatformInterfaceSystemComponent.h>
namespace AZ
{
namespace Vulkan
{
//! Exposes Vulkan RHI Building components to the Asset Processor.
class BuilderModule final
: public AZ::Module
{
public:
AZ_RTTI(BuilderModule, "{C22CF1CB-59AA-4247-A983-BC371A7B0513}", AZ::Module);
BuilderModule()
{
m_descriptors.insert(m_descriptors.end(), {
ShaderPlatformInterfaceSystemComponent::CreateDescriptor()
});
}
AZ::ComponentTypeList GetRequiredSystemComponents() const override
{
return
{
azrtti_typeid<ShaderPlatformInterfaceSystemComponent>(),
};
}
};
} // namespace Vulkan
} // namespace AZ
// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
// The first parameter should be GemName_GemIdLower
// The second should be the fully qualified name of the class above
AZ_DECLARE_MODULE_CLASS(Gem_Atom_RHI_Vulkan_Builders, AZ::Vulkan::BuilderModule);
@@ -0,0 +1,36 @@
/*
* 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 "Atom_RHI_Vulkan_precompiled.h"
#include <RHI/Conversion.h>
#include <RHI/Instance.h>
#include <RHI/WSISurface.h>
namespace AZ
{
namespace Vulkan
{
RHI::ResultCode WSISurface::BuildNativeSurface()
{
Instance& instance = Instance::GetInstance();
VkXcbSurfaceCreateInfoKHR createInfo{};
createInfo.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR;
createInfo.pNext = nullptr;
createInfo.flags = 0;
createInfo.window = static_cast<xcb_window_t>(m_descriptor.m_windowHandle.GetIndex());
const VkResult result = vkCreateXcbSurfaceKHR(instance.GetNativeInstance(), &createInfo, nullptr, &m_nativeSurface);
AssertSuccess(result);
return ConvertResult(result);
}
}
}
@@ -11,7 +11,7 @@
*/
#pragma once
#define AZ_TRAIT_ATOM_SHADERBUILDER_DXC "Builders/DirectXShaderCompilerAz/dxc.exe"
#define AZ_TRAIT_ATOM_SHADERBUILDER_DXC "Builders/DirectXShaderCompilerAz/bin/dxc"
#define AZ_TRAIT_ATOM_VULKAN_DISABLE_DUAL_SOURCE_BLENDING 0
#define AZ_TRAIT_ATOM_VULKAN_DLL ""
#define AZ_TRAIT_ATOM_VULKAN_DLL_1 ""
@@ -10,4 +10,5 @@
#
set(FILES
RHI.Builders/BuilderModule_Linux.cpp
)
@@ -10,5 +10,4 @@
#
set(FILES
../Common/Unimplemented/Empty_Unimplemented.cpp
)
@@ -10,7 +10,7 @@
#
set(FILES
../Common/Unimplemented/ModuleStub_Unimplemented.cpp
RHI/WSISurface_Linux.cpp
Vulkan_Traits_Linux.h
Vulkan_Traits_Platform.h
)
@@ -10,5 +10,4 @@
#
set(FILES
../Common/Unimplemented/Empty_Unimplemented.cpp
)
+18 -16
View File
@@ -163,21 +163,23 @@ namespace AZ
uint32_t minorVersion = VK_VERSION_MINOR(physicalProperties.apiVersion);
// unbounded array functionality
VkPhysicalDeviceDescriptorIndexingFeatures descriptorIndexingFeatures = {};
VkPhysicalDeviceDescriptorIndexingFeaturesEXT descriptorIndexingFeatures = {};
descriptorIndexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES;
descriptorIndexingFeatures.shaderInputAttachmentArrayDynamicIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderUniformTexelBufferArrayDynamicIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderStorageTexelBufferArrayDynamicIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderUniformBufferArrayNonUniformIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderSampledImageArrayNonUniformIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderStorageBufferArrayNonUniformIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderStorageImageArrayNonUniformIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderInputAttachmentArrayNonUniformIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderUniformTexelBufferArrayNonUniformIndexing = VK_TRUE;
descriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing = VK_TRUE;
descriptorIndexingFeatures.descriptorBindingPartiallyBound = VK_TRUE;
descriptorIndexingFeatures.descriptorBindingVariableDescriptorCount = VK_TRUE;
descriptorIndexingFeatures.runtimeDescriptorArray = VK_TRUE;
const VkPhysicalDeviceDescriptorIndexingFeaturesEXT& physicalDeviceDescriptorIndexingFeatures =
physicalDevice.GetPhysicalDeviceDescriptorIndexingFeatures();
descriptorIndexingFeatures.shaderInputAttachmentArrayDynamicIndexing = physicalDeviceDescriptorIndexingFeatures.shaderInputAttachmentArrayDynamicIndexing;
descriptorIndexingFeatures.shaderUniformTexelBufferArrayDynamicIndexing = physicalDeviceDescriptorIndexingFeatures.shaderUniformTexelBufferArrayDynamicIndexing;
descriptorIndexingFeatures.shaderStorageTexelBufferArrayDynamicIndexing = physicalDeviceDescriptorIndexingFeatures.shaderStorageTexelBufferArrayDynamicIndexing;
descriptorIndexingFeatures.shaderUniformBufferArrayNonUniformIndexing = physicalDeviceDescriptorIndexingFeatures.shaderUniformBufferArrayNonUniformIndexing;
descriptorIndexingFeatures.shaderSampledImageArrayNonUniformIndexing = physicalDeviceDescriptorIndexingFeatures.shaderSampledImageArrayNonUniformIndexing;
descriptorIndexingFeatures.shaderStorageBufferArrayNonUniformIndexing = physicalDeviceDescriptorIndexingFeatures.shaderStorageBufferArrayNonUniformIndexing;
descriptorIndexingFeatures.shaderStorageImageArrayNonUniformIndexing = physicalDeviceDescriptorIndexingFeatures.shaderStorageImageArrayNonUniformIndexing;
descriptorIndexingFeatures.shaderInputAttachmentArrayNonUniformIndexing = physicalDeviceDescriptorIndexingFeatures.shaderInputAttachmentArrayNonUniformIndexing;
descriptorIndexingFeatures.shaderUniformTexelBufferArrayNonUniformIndexing = physicalDeviceDescriptorIndexingFeatures.shaderUniformTexelBufferArrayNonUniformIndexing;
descriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing = physicalDeviceDescriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing;
descriptorIndexingFeatures.descriptorBindingPartiallyBound = physicalDeviceDescriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing;
descriptorIndexingFeatures.descriptorBindingVariableDescriptorCount = physicalDeviceDescriptorIndexingFeatures.descriptorBindingVariableDescriptorCount;
descriptorIndexingFeatures.runtimeDescriptorArray = physicalDeviceDescriptorIndexingFeatures.runtimeDescriptorArray;
VkPhysicalDeviceDepthClipEnableFeaturesEXT depthClipEnabled = {};
depthClipEnabled.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT;
@@ -196,7 +198,7 @@ namespace AZ
// If we are running Vulkan >= 1.2, then we must use VkPhysicalDeviceVulkan12Features instead
// of VkPhysicalDeviceShaderFloat16Int8FeaturesKHR or VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR.
if (majorVersion >= 1 && minorVersion >= 2)
{
{
vulkan12Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES;
vulkan12Features.drawIndirectCount = physicalDevice.GetPhysicalDeviceVulkan12Features().drawIndirectCount;
vulkan12Features.shaderFloat16 = physicalDevice.GetPhysicalDeviceVulkan12Features().shaderFloat16;
@@ -205,7 +207,7 @@ namespace AZ
robustness2.pNext = &vulkan12Features;
}
else
{
{
float16Int8.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR;
float16Int8.shaderFloat16 = physicalDevice.GetPhysicalDeviceFloat16Int8Features().shaderFloat16;
@@ -133,6 +133,11 @@ namespace AZ
return m_float16Int8Features;
}
const VkPhysicalDeviceDescriptorIndexingFeaturesEXT& PhysicalDevice::GetPhysicalDeviceDescriptorIndexingFeatures() const
{
return m_descriptorIndexingFeatures;
}
const VkPhysicalDeviceVulkan12Features& PhysicalDevice::GetPhysicalDeviceVulkan12Features() const
{
return m_vulkan12Features;
@@ -233,6 +238,7 @@ namespace AZ
m_features.set(static_cast<size_t>(DeviceFeature::SeparateDepthStencil),
(m_separateDepthStencilFeatures.separateDepthStencilLayouts && VK_DEVICE_EXTENSION_SUPPORTED(KHR_separate_depth_stencil_layouts)) ||
(m_vulkan12Features.separateDepthStencilLayouts));
m_features.set(static_cast<size_t>(DeviceFeature::DescriptorIndexing), VK_DEVICE_EXTENSION_SUPPORTED(EXT_descriptor_indexing));
}
void PhysicalDevice::CompileMemoryStatistics(RHI::MemoryStatisticsBuilder& builder) const
@@ -266,9 +272,14 @@ namespace AZ
if (VK_INSTANCE_EXTENSION_SUPPORTED(KHR_get_physical_device_properties2))
{
// features
VkPhysicalDeviceDescriptorIndexingFeaturesEXT& descriptorIndexingFeatures = m_descriptorIndexingFeatures;
descriptorIndexingFeatures = {};
descriptorIndexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT;
VkPhysicalDeviceDepthClipEnableFeaturesEXT& dephClipEnableFeatures = m_dephClipEnableFeatures;
dephClipEnableFeatures = {};
dephClipEnableFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT;
descriptorIndexingFeatures.pNext = &dephClipEnableFeatures;
VkPhysicalDeviceRobustness2FeaturesEXT& robustness2Feature = m_robutness2Features;
robustness2Feature = {};
@@ -292,7 +303,7 @@ namespace AZ
VkPhysicalDeviceFeatures2 deviceFeatures2 = {};
deviceFeatures2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
deviceFeatures2.pNext = &dephClipEnableFeatures;
deviceFeatures2.pNext = &descriptorIndexingFeatures;
vkGetPhysicalDeviceFeatures2KHR(vkPhysicalDevice, &deviceFeatures2);
m_deviceFeatures = deviceFeatures2.features;
@@ -302,7 +313,7 @@ namespace AZ
m_conservativeRasterProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT;
deviceProps2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR;
deviceProps2.pNext = &m_conservativeRasterProperties;
m_rayTracingPipelineProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR;
m_conservativeRasterProperties.pNext = &m_rayTracingPipelineProperties;
@@ -34,6 +34,7 @@ namespace AZ
DrawIndirectCount,
NullDescriptor,
SeparateDepthStencil,
DescriptorIndexing,
Count // Must be last
};
@@ -57,6 +58,7 @@ namespace AZ
const VkPhysicalDeviceDepthClipEnableFeaturesEXT& GetPhysicalDeviceDepthClipEnableFeatures() const;
const VkPhysicalDeviceRobustness2FeaturesEXT& GetPhysicalDeviceRobutness2Features() const;
const VkPhysicalDeviceShaderFloat16Int8FeaturesKHR& GetPhysicalDeviceFloat16Int8Features() const;
const VkPhysicalDeviceDescriptorIndexingFeaturesEXT& GetPhysicalDeviceDescriptorIndexingFeatures() const;
const VkPhysicalDeviceVulkan12Features& GetPhysicalDeviceVulkan12Features() const;
const VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR& GetPhysicalDeviceSeparateDepthStencilFeatures() const;
const VkPhysicalDeviceAccelerationStructurePropertiesKHR& GetPhysicalDeviceAccelerationStructureProperties() const;
@@ -70,7 +72,6 @@ namespace AZ
private:
PhysicalDevice() = default;
void Init(VkPhysicalDevice vkPhysicalDevice);
///////////////////////////////////////////////////////////////////
@@ -88,6 +89,7 @@ namespace AZ
VkPhysicalDeviceDepthClipEnableFeaturesEXT m_dephClipEnableFeatures{};
VkPhysicalDeviceRobustness2FeaturesEXT m_robutness2Features{};
VkPhysicalDeviceShaderFloat16Int8FeaturesKHR m_float16Int8Features{};
VkPhysicalDeviceDescriptorIndexingFeaturesEXT m_descriptorIndexingFeatures{};
VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR m_separateDepthStencilFeatures{};
VkPhysicalDeviceAccelerationStructurePropertiesKHR m_accelerationStructureProperties{};
VkPhysicalDeviceRayTracingPipelinePropertiesKHR m_rayTracingPipelineProperties{};
-1
View File
@@ -15,5 +15,4 @@ add_subdirectory(AtomImGuiTools)
add_subdirectory(EMotionFXAtom)
add_subdirectory(AtomFont)
add_subdirectory(TechnicalArt)
add_subdirectory(CryRenderAtomShim)
add_subdirectory(AtomBridge)
@@ -1,29 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "CryRenderOther_precompiled.h"
#include "../Common/RendElements/CRELensOptics.h"
CRELensOptics::CRELensOptics(void)
{
mfSetType(eDATA_LensOptics);
mfUpdateFlags(FCEF_TRANSFORM);
}
CRELensOptics::~CRELensOptics(void) {}
bool CRELensOptics::mfCompile([[maybe_unused]] CParserBin& Parser, [[maybe_unused]] SParserFrame& Frame){ return true; }
void CRELensOptics::mfPrepare([[maybe_unused]] bool bCheckOverflow) {}
bool CRELensOptics::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm) { return true; }
@@ -1,192 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "CryRenderOther_precompiled.h"
//////////////////////////////////////////////////////////////////////////////////////
buffer_handle_t CDeviceBufferManager::Create_Locked(BUFFER_BIND_TYPE, BUFFER_USAGE, size_t)
{
return buffer_handle_t();
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::Destroy_Locked(buffer_handle_t)
{
}
//////////////////////////////////////////////////////////////////////////////////////
void* CDeviceBufferManager::BeginRead_Locked([[maybe_unused]] buffer_handle_t handle)
{
return nullptr;
}
//////////////////////////////////////////////////////////////////////////////////////
void* CDeviceBufferManager::BeginWrite_Locked([[maybe_unused]] buffer_handle_t handle)
{
return nullptr;
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::EndReadWrite_Locked([[maybe_unused]] buffer_handle_t handle)
{
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::UpdateBuffer_Locked([[maybe_unused]] buffer_handle_t handle, const void*, size_t)
{
return false;
}
//////////////////////////////////////////////////////////////////////////////////////
size_t CDeviceBufferManager::Size_Locked(buffer_handle_t)
{
return 0;
}
//////////////////////////////////////////////////////////////////////////////////////
CDeviceBufferManager::CDeviceBufferManager()
{
}
//////////////////////////////////////////////////////////////////////////////////////
CDeviceBufferManager::~CDeviceBufferManager()
{
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::LockDevMan()
{
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::UnlockDevMan()
{
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::Init()
{
return true;
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::Shutdown()
{
return true;
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::Sync([[maybe_unused]] uint32 framdid)
{
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::Update(uint32, [[maybe_unused]] bool called_during_loading)
{
}
//////////////////////////////////////////////////////////////////////////////////////
buffer_handle_t CDeviceBufferManager::Create(
[[maybe_unused]] BUFFER_BIND_TYPE type
, [[maybe_unused]] BUFFER_USAGE usage
, [[maybe_unused]] size_t size)
{
return ~0u;
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::Destroy([[maybe_unused]] buffer_handle_t handle)
{
}
//////////////////////////////////////////////////////////////////////////////////////
void* CDeviceBufferManager::BeginRead([[maybe_unused]] buffer_handle_t handle)
{
return NULL;
}
//////////////////////////////////////////////////////////////////////////////////////
void* CDeviceBufferManager::BeginWrite([[maybe_unused]] buffer_handle_t handle)
{
return NULL;
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::EndReadWrite([[maybe_unused]] buffer_handle_t handle)
{
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::UpdateBuffer([[maybe_unused]] buffer_handle_t handle, [[maybe_unused]] const void* src, [[maybe_unused]] size_t size)
{
return true;
}
/////////////////////////////////////////////////////////////
// Legacy interface
//
// Use with care, can be removed at any point!
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::ReleaseVBuffer(CVertexBuffer* pVB)
{
SAFE_DELETE(pVB);
}
//////////////////////////////////////////////////////////////////////////////////////
void CDeviceBufferManager::ReleaseIBuffer(CIndexBuffer* pIB)
{
SAFE_DELETE(pIB);
}
//////////////////////////////////////////////////////////////////////////////////////
CVertexBuffer* CDeviceBufferManager::CreateVBuffer([[maybe_unused]] size_t nVerts, const AZ::Vertex::Format& vertexFormat, [[maybe_unused]] const char* szName, [[maybe_unused]] BUFFER_USAGE usage)
{
CVertexBuffer* pVB = new CVertexBuffer(NULL, vertexFormat);
return pVB;
}
//////////////////////////////////////////////////////////////////////////////////////
CIndexBuffer* CDeviceBufferManager::CreateIBuffer([[maybe_unused]] size_t nInds, [[maybe_unused]] const char* szNam, [[maybe_unused]] BUFFER_USAGE usage)
{
CIndexBuffer* pIB = new CIndexBuffer(NULL);
return pIB;
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::UpdateVBuffer([[maybe_unused]] CVertexBuffer* pVB, [[maybe_unused]] void* pVerts, [[maybe_unused]] size_t nVerts)
{
return true;
}
//////////////////////////////////////////////////////////////////////////////////////
bool CDeviceBufferManager::UpdateIBuffer([[maybe_unused]] CIndexBuffer* pIB, [[maybe_unused]] void* pInds, [[maybe_unused]] size_t nInds)
{
return true;
}
//////////////////////////////////////////////////////////////////////////////////////
CVertexBuffer::~CVertexBuffer()
{
}
//////////////////////////////////////////////////////////////////////////////////////
CIndexBuffer::~CIndexBuffer()
{
}
namespace AzRHI
{
ConstantBuffer::~ConstantBuffer()
{}
void ConstantBuffer::AddRef()
{}
AZ::u32 ConstantBuffer::Release()
{
return 0;
}
}
@@ -1,258 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
/*
Todo:
* Erradicate StretchRect usage
* Cleanup code
* When we have a proper static branching support use it instead of shader switches inside code
*/
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include "I3DEngine.h"
#include "../Common/PostProcess/PostEffects.h"
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
AZStd::unique_ptr<CMotionBlur::ObjectMap> CMotionBlur::m_Objects[3];
CThreadSafeRendererContainer<CMotionBlur::ObjectMap::value_type> CMotionBlur::m_FillData[RT_COMMAND_BUF_COUNT];
bool CPostAA::Preprocess()
{
return true;
}
void CPostAA::Render()
{
}
void CMotionBlur::InsertNewElements()
{
}
void CMotionBlur::FreeData()
{
}
bool CMotionBlur::Preprocess()
{
return true;
}
void CMotionBlur::Render()
{
}
void CMotionBlur::GetPrevObjToWorldMat([[maybe_unused]] CRenderObject* pObj, Matrix44A& res)
{
res = Matrix44(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}
void CMotionBlur::OnBeginFrame()
{
}
bool CSunShafts::Preprocess()
{
return true;
}
void CSunShafts::Render()
{
}
void CFilterSharpening::Render()
{
}
void CFilterBlurring::Render()
{
}
void CUnderwaterGodRays::Render()
{
}
void CVolumetricScattering::Render()
{
}
void CWaterDroplets::Render()
{
}
void CWaterFlow::Render()
{
}
void CWaterRipples::AddHit([[maybe_unused]] const Vec3& vPos, [[maybe_unused]] const float scale, [[maybe_unused]] const float strength)
{
}
void CWaterRipples::DEBUG_DrawWaterHits()
{
}
bool CWaterRipples::Preprocess()
{
return true;
}
void CWaterRipples::Reset([[maybe_unused]] bool bOnSpecChange)
{
}
void CWaterRipples::Render()
{
}
void CScreenFrost::Render()
{
}
bool CRainDrops::Preprocess()
{
return true;
}
void CRainDrops::Render()
{
}
bool CFlashBang::Preprocess()
{
return true;
}
void CFlashBang::Render()
{
}
void CAlienInterference::Render()
{
}
void CGhostVision::Render()
{
}
void CHudSilhouettes::Render()
{
}
void CColorGrading::Render()
{
}
void CWaterVolume::Render()
{
}
void CSceneRain::CreateBuffers([[maybe_unused]] uint16 nVerts, [[maybe_unused]] void*& pINpVB, [[maybe_unused]] SVF_P3F_C4B_T2F* pVtxList)
{
}
int CSceneRain::CreateResources()
{
return 1;
}
void CSceneRain::Release()
{
}
void CSceneRain::Render()
{
}
bool CSceneSnow::Preprocess()
{
return true;
}
void CSceneSnow::Render()
{
}
int CSceneSnow::CreateResources()
{
return 1;
}
void CSceneSnow::Release()
{
}
void CImageGhosting::Render()
{
}
void CFilterKillCamera::Render()
{
}
void CUberGamePostProcess::Render()
{
}
void CSoftAlphaTest::Render()
{
}
void CScreenBlood::Render() { }
void CPost3DRenderer::Render()
{
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
namespace WaterVolumeStaticData
{
void GetMemoryUsage([[maybe_unused]] ICrySizer* pSizer){}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
bool CSceneRain::Preprocess() { return true; }
//void CSceneRain::Render() {}
void CSceneRain::Reset([[maybe_unused]] bool bOnSpecChange) {}
void CSceneRain::OnLostDevice() {}
const char* CSceneRain::GetName() const {return 0; }
const char* CRainDrops::GetName() const {return 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////
void CSceneSnow::Reset([[maybe_unused]] bool bOnSpecChange) {}
const char* CSceneSnow::GetName() const {return 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////
bool CREPostProcess::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
void ScreenFader::Render()
{
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1,164 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include "I3DEngine.h"
//=======================================================================
bool CRESky::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREHDRSky::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREFogVolume::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREWaterVolume::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
void CREWaterOcean::FrameUpdate()
{
}
void CREWaterOcean::Create([[maybe_unused]] uint32 nVerticesCount, [[maybe_unused]] SVF_P3F_C4B_T2F* pVertices, [[maybe_unused]] uint32 nIndicesCount, [[maybe_unused]] const void* pIndices, [[maybe_unused]] uint32 nIndexSizeof)
{
}
void CREWaterOcean::ReleaseOcean()
{
}
bool CREWaterOcean::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
CREOcclusionQuery::~CREOcclusionQuery()
{
mfReset();
}
void CREOcclusionQuery::mfReset()
{
m_nOcclusionID = 0;
}
uint32 CREOcclusionQuery::m_nQueriesPerFrameCounter = 0;
uint32 CREOcclusionQuery::m_nReadResultNowCounter = 0;
uint32 CREOcclusionQuery::m_nReadResultTryCounter = 0;
bool CREOcclusionQuery::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREOcclusionQuery::mfReadResult_Now(void)
{
return true;
}
bool CREOcclusionQuery::mfReadResult_Try([[maybe_unused]] uint32 nDefaultNumSamples)
{
return true;
}
bool CREOcclusionQuery::RT_ReadResult_Try([[maybe_unused]] uint32 nDefaultNumSamples)
{
return true;
}
bool CREMeshImpl::mfPreDraw([[maybe_unused]] SShaderPass* sl)
{
return true;
}
bool CREMeshImpl::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sl)
{
return true;
}
bool CREHDRProcess::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREDeferredShading::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
bool CREBeam::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sl)
{
return true;
}
bool CREImposter::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* pPass)
{
return true;
}
bool CRECloud::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* pPass)
{
return true;
}
bool CRECloud::UpdateImposter([[maybe_unused]] CRenderObject* pObj)
{
return true;
}
bool CRECloud::GenerateCloudImposter([[maybe_unused]] CShader* pShader, [[maybe_unused]] CShaderResources* pRes, [[maybe_unused]] CRenderObject* pObject)
{
return true;
}
bool CREImposter::UpdateImposter()
{
return true;
}
bool CREVolumeObject::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
#if !defined(EXCLUDE_DOCUMENTATION_PURPOSE)
bool CREPrismObject::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
#endif // EXCLUDE_DOCUMENTATION_PURPOSE
bool CREGameEffect::mfDraw([[maybe_unused]] CShader* ef, [[maybe_unused]] SShaderPass* sfm)
{
return true;
}
void CRELensOptics::ClearResources()
{
}
#if defined(USE_GEOM_CACHES)
bool CREGeomCache::mfDraw([[maybe_unused]] CShader* pShader, [[maybe_unused]] SShaderPass* pShaderPass)
{
return true;
}
#endif
@@ -1,192 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : NULL device specific implementation using shaders pipeline.
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include "Common/RenderView.h"
#include "RenderBus.h"
//============================================================================================
// Init Shaders rendering
void CAtomShimRenderer::EF_Init()
{
m_RP.m_MaxVerts = 600;
m_RP.m_MaxTris = 300;
//==================================================
// Init RenderObjects
{
m_RP.m_nNumObjectsInPool = 384; // magic number set by Cry. The regular pipe uses a constant set to 1024
if (m_RP.m_ObjectsPool != nullptr)
{
for (int j = 0; j < (int)(m_RP.m_nNumObjectsInPool * RT_COMMAND_BUF_COUNT); j++)
{
CRenderObject* pRendObj = &m_RP.m_ObjectsPool[j];
pRendObj->~CRenderObject();
}
CryModuleMemalignFree(m_RP.m_ObjectsPool);
}
// we use a plain allocation and placement new here to garantee the alignment, when using array new, the compiler can store it's size and break the alignment
m_RP.m_ObjectsPool = (CRenderObject*)CryModuleMemalign(sizeof(CRenderObject) * (m_RP.m_nNumObjectsInPool * RT_COMMAND_BUF_COUNT), 16);
for (int j = 0; j < (int)(m_RP.m_nNumObjectsInPool * RT_COMMAND_BUF_COUNT); j++)
{
new(&m_RP.m_ObjectsPool[j])CRenderObject();
}
CRenderObject** arrPrefill = (CRenderObject**)(alloca(m_RP.m_nNumObjectsInPool * sizeof(CRenderObject*)));
for (int j = 0; j < RT_COMMAND_BUF_COUNT; j++)
{
for (int k = 0; k < m_RP.m_nNumObjectsInPool; ++k)
{
arrPrefill[k] = &m_RP.m_ObjectsPool[j * m_RP.m_nNumObjectsInPool + k];
}
m_RP.m_TempObjects[j].PrefillContainer(arrPrefill, m_RP.m_nNumObjectsInPool);
m_RP.m_TempObjects[j].resize(0);
}
}
// Init identity RenderObject
SAFE_DELETE(m_RP.m_pIdendityRenderObject);
m_RP.m_pIdendityRenderObject = aznew CRenderObject();
m_RP.m_pIdendityRenderObject->Init();
m_RP.m_pIdendityRenderObject->m_II.m_AmbColor = Col_White;
m_RP.m_pIdendityRenderObject->m_II.m_Matrix.SetIdentity();
m_RP.m_pIdendityRenderObject->m_RState = 0;
m_RP.m_pIdendityRenderObject->m_ObjFlags |= FOB_RENDERER_IDENDITY_OBJECT;
}
void CAtomShimRenderer::FX_SetClipPlane ([[maybe_unused]] bool bEnable, [[maybe_unused]] float* pPlane, [[maybe_unused]] bool bRefract)
{
}
void CAtomShimRenderer::FX_PipelineShutdown([[maybe_unused]] bool bFastShutdown)
{
uint32 i, j;
for (int n = 0; n < 2; n++)
{
for (j = 0; j < 2; j++)
{
for (i = 0; i < CREClientPoly::m_PolysStorage[n][j].Num(); i++)
{
CREClientPoly::m_PolysStorage[n][j][i]->Release(false);
}
CREClientPoly::m_PolysStorage[n][j].Free();
}
}
}
void CAtomShimRenderer::EF_Release([[maybe_unused]] int nFlags)
{
}
//==========================================================================
void CAtomShimRenderer::FX_SetState(int st, int AlphaRef, [[maybe_unused]] int RestoreState)
{
m_RP.m_CurState = st;
m_RP.m_CurAlphaRef = AlphaRef;
}
void CRenderer::FX_SetStencilState([[maybe_unused]] int st, [[maybe_unused]] uint32 nStencRef, [[maybe_unused]] uint32 nStencMask, [[maybe_unused]] uint32 nStencWriteMask, [[maybe_unused]] bool bForceFullReadMask)
{
}
//=================================================================================
// Initialize of the new shader pipeline (only 2d)
void CRenderer::FX_Start([[maybe_unused]] CShader* ef, [[maybe_unused]] int nTech, [[maybe_unused]] CShaderResources* Res, [[maybe_unused]] IRenderElement* re)
{
m_RP.m_Frame++;
}
void CRenderer::FX_CheckOverflow([[maybe_unused]] int nVerts, [[maybe_unused]] int nInds, [[maybe_unused]] IRenderElement* re, [[maybe_unused]] int* nNewVerts, [[maybe_unused]] int* nNewInds)
{
}
uint32 CRenderer::EF_GetDeferredLightsNum([[maybe_unused]] const eDeferredLightType eLightType)
{
return 0;
}
int CRenderer::EF_AddDeferredLight([[maybe_unused]] const CDLight& pLight, float, [[maybe_unused]] const SRenderingPassInfo& passInfo, [[maybe_unused]] const SRendItemSorter& rendItemSorter)
{
return 0;
}
void CRenderer::EF_ClearDeferredLightsList()
{
}
void CRenderer::EF_ReleaseDeferredData()
{
}
uint8 CRenderer::EF_AddDeferredClipVolume([[maybe_unused]] const IClipVolume* pClipVolume)
{
return 0;
}
bool CRenderer::EF_SetDeferredClipVolumeBlendData([[maybe_unused]] const IClipVolume* pClipVolume, [[maybe_unused]] const SClipVolumeBlendInfo& blendInfo)
{
return false;
}
void CRenderer::EF_ClearDeferredClipVolumesList()
{
}
//========================================================================================
void CAtomShimRenderer::EF_EndEf3D([[maybe_unused]] const int nFlags, [[maybe_unused]] const int nPrecacheUpdateId, [[maybe_unused]] const int nNearPrecacheUpdateId, [[maybe_unused]] const SRenderingPassInfo& passInfo)
{
//m_RP.m_TI[m_RP.m_nFillThreadID].m_RealTime = iTimer->GetCurrTime();
EF_RemovePolysFromScene();
// Only render the UI Canvas and the Console on the main window
// If we're not in the editor, don't bother to check viewport.
if (!gEnv->IsEditor() || m_currContext == nullptr || m_currContext->m_isMainViewport)
{
EBUS_EVENT(AZ::RenderNotificationsBus, OnScene3DEnd);
}
int nThreadID = m_pRT->GetThreadList();
SRendItem::m_RecurseLevel[nThreadID]--;
}
//double timeFtoI, timeFtoL, timeQRound;
//int sSome;
void CAtomShimRenderer::EF_EndEf2D([[maybe_unused]] const bool bSort)
{
}
void CRenderView::PrepareForRendering() {}
void CRenderView::PrepareForWriting() {}
void CRenderView::ClearRenderItems() {}
void CRenderView::FreeRenderItems() {}
CRenderView::CRenderView() {}
CRenderView::~CRenderView() {}
@@ -1,688 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include "AtomShim_RenderAuxGeom.h"
#include <Atom/RPI.Public/AuxGeom/AuxGeomFeatureProcessorInterface.h>
#include <Atom/RPI.Public/RPISystemInterface.h>
#include <MathConversion.h>
CAtomShimRenderAuxGeom* CAtomShimRenderAuxGeom::s_pThis = NULL;
namespace
{
using DrawFunction = AZStd::function<void(const uint32* indices)>;
void Handle16BitIndices(const vtx_idx* ind, uint32_t numIndices, DrawFunction drawFunc)
{
constexpr bool copyIndicesToUint32 = sizeof(vtx_idx) != sizeof(uint32_t); // mobile platforms use 16 bit vtx_idx
if constexpr(copyIndicesToUint32)
{
uint32_t* indices = new uint32_t[numIndices];
for (int i = 0; i < numIndices; ++i)
{
indices[i] = ind[i];
}
drawFunc(indices);
delete[] indices;
}
else
{
// re-interpret because on mobile vtx_idx is a uint16
// Additionally the else case should not be taken on mobile
// because sizeof(uint16) < sizeof(uint32).
const uint32_t* indices = reinterpret_cast<const uint32_t*>(ind);
drawFunc(indices);
}
}
AZ::RPI::AuxGeomDraw::DrawStyle LyDrawStyleToAZDrawStyle(bool bSolid, EBoundingBoxDrawStyle bbDrawStyle)
{
AZ::RPI::AuxGeomDraw::DrawStyle drawStyle = AZ::RPI::AuxGeomDraw::DrawStyle::Solid;
if (!bSolid)
{
drawStyle = AZ::RPI::AuxGeomDraw::DrawStyle::Line;
}
else if (bbDrawStyle == eBBD_Extremes_Color_Encoded)
{
drawStyle = AZ::RPI::AuxGeomDraw::DrawStyle::Shaded; // Not the same but shows a difference
}
return drawStyle;
}
AZ::Aabb LyAABBToAZAabbWithFixup(const AABB& source)
{
AABB fixed;
fixed.min.x = AZStd::min(source.min.x, source.max.x);
fixed.min.y = AZStd::min(source.min.y, source.max.y);
fixed.min.z = AZStd::min(source.min.z, source.max.z);
fixed.max.x = AZStd::max(source.min.x, source.max.x);
fixed.max.y = AZStd::max(source.min.y, source.max.y);
fixed.max.z = AZStd::max(source.min.z, source.max.z);
return LyAABBToAZAabb(fixed);
}
}
CAtomShimRenderAuxGeom::CAtomShimRenderAuxGeom(CAtomShimRenderer& renderer)
: m_renderer(&renderer)
{
}
CAtomShimRenderAuxGeom::~CAtomShimRenderAuxGeom()
{
}
void CAtomShimRenderAuxGeom::BeginFrame()
{
}
void CAtomShimRenderAuxGeom::EndFrame()
{
}
void CAtomShimRenderAuxGeom::SetViewProjOverride(const AZ::Matrix4x4& viewProj)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
m_viewProjOverrideIndex = auxGeom->AddViewProjOverride(viewProj);
}
}
void CAtomShimRenderAuxGeom::UnsetViewProjOverride()
{
m_viewProjOverrideIndex = -1;
}
void CAtomShimRenderAuxGeom::SetRenderFlags(const SAuxGeomRenderFlags& renderFlags)
{
m_cryRenderFlags = renderFlags;
m_drawArgs.m_depthTest = renderFlags.GetDepthTestFlag() == EAuxGeomPublicRenderflags_DepthTest::e_DepthTestOff ?
AZ::RPI::AuxGeomDraw::DepthTest::Off : AZ::RPI::AuxGeomDraw::DepthTest::On;
}
SAuxGeomRenderFlags CAtomShimRenderAuxGeom::GetRenderFlags()
{
return m_cryRenderFlags;
}
void CAtomShimRenderAuxGeom::DrawPoint(const Vec3& v, const ColorB& col, uint8 size /* = 1 */)
{
DrawPoints(&v, 1, col, size);
}
void CAtomShimRenderAuxGeom::DrawPoints(const Vec3* v, uint32 numPoints, const ColorB* col, uint8 size /* = 1 */)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
AZ::Color* colors = new AZ::Color[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
colors[i] = LYColorBToAZColor(col[i]);
}
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs(m_drawArgs);
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_colors = colors;
drawArgs.m_colorCount = numPoints;
drawArgs.m_size = size;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawPoints(drawArgs);
delete[] points;
}
}
void CAtomShimRenderAuxGeom::DrawPoints(const Vec3* v, uint32 numPoints, const ColorB& col, uint8 size /* = 1 */)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
}
AZ::Color color = LYColorBToAZColor(col);
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs;
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_colors = &color;
drawArgs.m_colorCount = 1;
drawArgs.m_size = size;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawPoints(drawArgs);
delete[] points;
}
}
void CAtomShimRenderAuxGeom::DrawLine(const Vec3& v0, const ColorB& colV0, const Vec3& v1, const ColorB& colV1, float thickness /* = 1.0f */)
{
const Vec3 verts[2] = {v0, v1};
const ColorB colors[2] = {colV0, colV1};
DrawLines(verts, 2, colors, thickness);
}
void CAtomShimRenderAuxGeom::DrawLines(const Vec3* v, uint32 numPoints, const ColorB& col, float thickness /* = 1.0f */)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
}
AZ::Color color = LYColorBToAZColor(col);
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs(m_drawArgs);
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_colors = &color;
drawArgs.m_colorCount = 1;
drawArgs.m_size = thickness;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawLines(drawArgs);
delete[] points;
}
}
void CAtomShimRenderAuxGeom::DrawLines(const Vec3* v, uint32 numPoints, const ColorB* col, float thickness /* = 1.0f */)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
AZ::Color* colors = new AZ::Color[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
colors[i] = LYColorBToAZColor(col[i]);
}
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs(m_drawArgs);
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_colors = colors;
drawArgs.m_colorCount = numPoints;
drawArgs.m_size = thickness;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawLines(drawArgs);
delete[] points;
delete[] colors;
}
}
void CAtomShimRenderAuxGeom::DrawLines(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB& col, float thickness /* = 1.0f */)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
}
AZ::Color color = LYColorBToAZColor(col);
AZ::RPI::AuxGeomDraw::AuxGeomDynamicIndexedDrawArguments drawArgs(m_drawArgs);
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_indexCount = numIndices;
drawArgs.m_colors = &color;
drawArgs.m_colorCount = 1;
drawArgs.m_size = thickness;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
Handle16BitIndices(
ind, numIndices,
[&drawArgs, auxGeom](const uint32_t* indices)
{
drawArgs.m_indices = indices;
auxGeom->DrawLines(drawArgs);
}
);
delete[] points;
}
}
void CAtomShimRenderAuxGeom::DrawLines(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB* col, float thickness /* = 1.0f */)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
AZ::Color* colors = new AZ::Color[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
colors[i] = LYColorBToAZColor(col[i]);
}
AZ::RPI::AuxGeomDraw::AuxGeomDynamicIndexedDrawArguments drawArgs(m_drawArgs);
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_indexCount = numIndices;
drawArgs.m_colors = colors;
drawArgs.m_colorCount = numPoints;
drawArgs.m_size = thickness;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
Handle16BitIndices(
ind, numIndices,
[&drawArgs, auxGeom](const uint32_t* indices)
{
drawArgs.m_indices = indices;
auxGeom->DrawLines(drawArgs);
}
);
delete[] points;
delete[] colors;
}
}
void CAtomShimRenderAuxGeom::DrawPolyline(const Vec3* v, uint32 numPoints, bool closed, const ColorB& col, float thickness /* = 1.0f */)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
}
AZ::Color color = LYColorBToAZColor(col);
AZ::RPI::AuxGeomDraw::PolylineEnd polylineClosed = closed ? AZ::RPI::AuxGeomDraw::PolylineEnd::Closed : AZ::RPI::AuxGeomDraw::PolylineEnd::Open;
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs;
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_colors = &color;
drawArgs.m_colorCount = 1;
drawArgs.m_size = thickness;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawPolylines(drawArgs, polylineClosed);
delete[] points;
}
}
void CAtomShimRenderAuxGeom::DrawPolyline(const Vec3* v, uint32 numPoints, bool closed, const ColorB* col, float thickness /* = 1.0f */)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
AZ::Color* colors = new AZ::Color[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
colors[i] = LYColorBToAZColor(col[i]);
}
AZ::RPI::AuxGeomDraw::PolylineEnd polylineClosed = closed ? AZ::RPI::AuxGeomDraw::PolylineEnd::Closed : AZ::RPI::AuxGeomDraw::PolylineEnd::Open;
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs;
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_colors = colors;
drawArgs.m_colorCount = numPoints;
drawArgs.m_size = thickness;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawPolylines(drawArgs, polylineClosed);
delete[] points;
delete[] colors;
}
}
void CAtomShimRenderAuxGeom::DrawTriangle(const Vec3& v0, const ColorB& colV0, const Vec3& v1, const ColorB& colV1, const Vec3& v2, const ColorB& colV2)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3 points[3] =
{
LYVec3ToAZVec3(v0),
LYVec3ToAZVec3(v1),
LYVec3ToAZVec3(v2),
};
AZ::Color colors[3] =
{
LYColorBToAZColor(colV0),
LYColorBToAZColor(colV1),
LYColorBToAZColor(colV2),
};
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs;
drawArgs.m_verts = points;
drawArgs.m_vertCount = 3;
drawArgs.m_colors = colors;
drawArgs.m_colorCount = 3;
drawArgs.m_opacityType = (colV0.a == 0xFF && colV1.a == 0xFF && colV2.a == 0xFF) ? AZ::RPI::AuxGeomDraw::OpacityType::Opaque : AZ::RPI::AuxGeomDraw::OpacityType::Translucent;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawTriangles(drawArgs);
}
}
void CAtomShimRenderAuxGeom::DrawTriangles(const Vec3* v, uint32 numPoints, const ColorB& col)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
}
AZ::Color color = LYColorBToAZColor(col);
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs;
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_colors = &color;
drawArgs.m_colorCount = 1;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawTriangles(drawArgs);
delete[] points;
}
}
void CAtomShimRenderAuxGeom::DrawTriangles(const Vec3* v, uint32 numPoints, const ColorB* col)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
AZ::Color* colors = new AZ::Color[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
colors[i] = LYColorBToAZColor(col[i]);
}
AZ::RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments drawArgs;
drawArgs.m_verts = points;
drawArgs.m_vertCount = 3;
drawArgs.m_colors = colors;
drawArgs.m_colorCount = numPoints;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
auxGeom->DrawTriangles(drawArgs);
delete[] points;
delete[] colors;
}
}
void CAtomShimRenderAuxGeom::DrawTriangles(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB& col)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
}
AZ::Color color = LYColorBToAZColor(col);
AZ::RPI::AuxGeomDraw::AuxGeomDynamicIndexedDrawArguments drawArgs(m_drawArgs);
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_indexCount = numIndices;
drawArgs.m_colors = &color;
drawArgs.m_colorCount = 1;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
Handle16BitIndices(
ind, numIndices,
[&drawArgs, auxGeom](const uint32_t* indices)
{
drawArgs.m_indices = indices;
auxGeom->DrawTriangles(drawArgs);
}
);
delete[] points;
}
}
void CAtomShimRenderAuxGeom::DrawTriangles(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB* col)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Vector3* points = new AZ::Vector3[numPoints];
AZ::Color* colors = new AZ::Color[numPoints];
for (int i = 0; i < numPoints; ++i)
{
points[i] = LYVec3ToAZVec3(v[i]);
colors[i] = LYColorBToAZColor(col[i]);
}
AZ::RPI::AuxGeomDraw::AuxGeomDynamicIndexedDrawArguments drawArgs(m_drawArgs);
drawArgs.m_verts = points;
drawArgs.m_vertCount = numPoints;
drawArgs.m_indexCount = numIndices;
drawArgs.m_colors = colors;
drawArgs.m_colorCount = numPoints;
drawArgs.m_viewProjectionOverrideIndex = m_viewProjOverrideIndex;
Handle16BitIndices(
ind, numIndices,
[&drawArgs, auxGeom](const uint32_t* indices)
{
drawArgs.m_indices = indices;
auxGeom->DrawTriangles(drawArgs);
}
);
delete[] points;
delete[] colors;
}
}
void CAtomShimRenderAuxGeom::DrawQuad(float width, float height, const Matrix34& matWorld, const ColorB& col, bool drawShaded)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::RPI::AuxGeomDraw::DrawStyle drawStyle = drawShaded ? AZ::RPI::AuxGeomDraw::DrawStyle::Shaded : AZ::RPI::AuxGeomDraw::DrawStyle::Solid;
AZ::Matrix3x4 local2World = LYTransformToAZMatrix3x4(matWorld);
auxGeom->DrawQuad(width, height, local2World, LYColorBToAZColor(col), drawStyle, m_drawArgs.m_depthTest);
}
}
void CAtomShimRenderAuxGeom::DrawAABB(const AABB& aabb, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
auxGeom->DrawAabb(LyAABBToAZAabbWithFixup(aabb), LYColorBToAZColor(col), LyDrawStyleToAZDrawStyle(bSolid, bbDrawStyle), m_drawArgs.m_depthTest);
}
}
void CAtomShimRenderAuxGeom::DrawAABBs(const AABB* aabb, uint32 aabbCount, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
for (int i = 0; i < aabbCount; ++aabbCount)
{
auxGeom->DrawAabb(
LyAABBToAZAabbWithFixup(aabb[i]),
LYColorBToAZColor(col),
LyDrawStyleToAZDrawStyle(bSolid, bbDrawStyle),
m_drawArgs.m_depthTest,
AZ::RPI::AuxGeomDraw::DepthWrite::On,
AZ::RPI::AuxGeomDraw::FaceCullMode::Back,
m_viewProjOverrideIndex);
}
}
}
void CAtomShimRenderAuxGeom::DrawAABB(const AABB& aabb, const Matrix34& matWorld, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Matrix3x4 transform = LYTransformToAZMatrix3x4(matWorld);
auxGeom->DrawAabb(
LyAABBToAZAabbWithFixup(aabb),
transform,
LYColorBToAZColor(col),
LyDrawStyleToAZDrawStyle(bSolid, bbDrawStyle),
m_drawArgs.m_depthTest,
AZ::RPI::AuxGeomDraw::DepthWrite::On,
AZ::RPI::AuxGeomDraw::FaceCullMode::Back,
m_viewProjOverrideIndex);
}
}
void CAtomShimRenderAuxGeom::DrawOBB(const OBB& obb, const Vec3& pos, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
auxGeom->DrawObb(LyOBBtoAZObb(obb), LYVec3ToAZVec3(pos), LYColorBToAZColor(col), LyDrawStyleToAZDrawStyle(bSolid, bbDrawStyle), m_drawArgs.m_depthTest);
}
}
void CAtomShimRenderAuxGeom::DrawOBB(const OBB& obb, const Matrix34& matWorld, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::Matrix3x4 transform = LYTransformToAZMatrix3x4(matWorld);
auxGeom->DrawObb(LyOBBtoAZObb(obb), transform, LYColorBToAZColor(col), LyDrawStyleToAZDrawStyle(bSolid, bbDrawStyle), m_drawArgs.m_depthTest);
}
}
void CAtomShimRenderAuxGeom::DrawSphere(const Vec3& pos, float radius, const ColorB& col, bool drawShaded)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::RPI::AuxGeomDraw::DrawStyle drawStyle = drawShaded ? AZ::RPI::AuxGeomDraw::DrawStyle::Shaded : AZ::RPI::AuxGeomDraw::DrawStyle::Solid;
auxGeom->DrawSphere(LYVec3ToAZVec3(pos), radius, LYColorBToAZColor(col), drawStyle, m_drawArgs.m_depthTest);
}
}
void CAtomShimRenderAuxGeom::DrawDisk(const Vec3& pos, const Vec3& dir, float radius, const ColorB& col, bool drawShaded)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::RPI::AuxGeomDraw::DrawStyle drawStyle = drawShaded ? AZ::RPI::AuxGeomDraw::DrawStyle::Shaded : AZ::RPI::AuxGeomDraw::DrawStyle::Solid;
auxGeom->DrawDisk(LYVec3ToAZVec3(pos), LYVec3ToAZVec3(dir), radius, LYColorBToAZColor(col), drawStyle, m_drawArgs.m_depthTest);
}
}
void CAtomShimRenderAuxGeom::DrawCone(const Vec3& pos, const Vec3& dir, float radius, float height, const ColorB& col, bool drawShaded)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::RPI::AuxGeomDraw::DrawStyle drawStyle = drawShaded ? AZ::RPI::AuxGeomDraw::DrawStyle::Shaded : AZ::RPI::AuxGeomDraw::DrawStyle::Solid;
auxGeom->DrawCone(LYVec3ToAZVec3(pos), LYVec3ToAZVec3(dir), radius, height, LYColorBToAZColor(col), drawStyle, m_drawArgs.m_depthTest);
}
}
void CAtomShimRenderAuxGeom::DrawCylinder(const Vec3& pos, const Vec3& dir, float radius, float height, const ColorB& col, bool drawShaded)
{
auto defaultScene = AZ::RPI::RPISystemInterface::Get()->GetDefaultScene();
if (auto auxGeom = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(defaultScene))
{
AZ::RPI::AuxGeomDraw::DrawStyle drawStyle = drawShaded ? AZ::RPI::AuxGeomDraw::DrawStyle::Shaded : AZ::RPI::AuxGeomDraw::DrawStyle::Solid;
auxGeom->DrawCylinder(LYVec3ToAZVec3(pos), LYVec3ToAZVec3(dir), radius, height, LYColorBToAZColor(col), drawStyle, m_drawArgs.m_depthTest);
}
}
void CAtomShimRenderAuxGeom::DrawBone(const Vec3& p, const Vec3& c, ColorB col)
{
Vec3 vBoneVec = c - p;
float fBoneLength = vBoneVec.GetLength();
if (fBoneLength < 1e-4)
{
return;
}
Matrix33 m33 = Matrix33::CreateRotationV0V1(Vec3(1, 0, 0), vBoneVec / fBoneLength);
Matrix34 m34 = Matrix34(m33, p);
f32 t = min(0.01f, fBoneLength * 0.05f);
//bone points in x-direction
Vec3 s = Vec3(ZERO);
Vec3 m0 = Vec3(t, +t, +t);
Vec3 m1 = Vec3(t, -t, +t);
Vec3 m2 = Vec3(t, -t, -t);
Vec3 m3 = Vec3(t, +t, -t);
Vec3 e = Vec3(fBoneLength, 0, 0);
Vec3 VBuffer[6];
ColorB CBuffer[6];
VBuffer[0] = m34 * s;
CBuffer[0] = RGBA8(0xff, 0x1f, 0x1f, 0x00); //start of bone (joint)
VBuffer[1] = m34 * m0;
CBuffer[1] = col;
VBuffer[2] = m34 * m1;
CBuffer[2] = col;
VBuffer[3] = m34 * m2;
CBuffer[3] = col;
VBuffer[4] = m34 * m3;
CBuffer[4] = col;
VBuffer[5] = m34 * e;
CBuffer[5] = RGBA8(0x07, 0x0f, 0x1f, 0x00); //end of bone
DrawLine(VBuffer[0], CBuffer[0], VBuffer[1], CBuffer[1]);
DrawLine(VBuffer[0], CBuffer[0], VBuffer[2], CBuffer[2]);
DrawLine(VBuffer[0], CBuffer[0], VBuffer[3], CBuffer[3]);
DrawLine(VBuffer[0], CBuffer[0], VBuffer[4], CBuffer[4]);
DrawLine(VBuffer[1], CBuffer[1], VBuffer[2], CBuffer[2]);
DrawLine(VBuffer[2], CBuffer[2], VBuffer[3], CBuffer[3]);
DrawLine(VBuffer[3], CBuffer[3], VBuffer[4], CBuffer[4]);
DrawLine(VBuffer[4], CBuffer[4], VBuffer[1], CBuffer[1]);
DrawLine(VBuffer[5], CBuffer[5], VBuffer[1], CBuffer[1]);
DrawLine(VBuffer[5], CBuffer[5], VBuffer[2], CBuffer[2]);
DrawLine(VBuffer[5], CBuffer[5], VBuffer[3], CBuffer[3]);
DrawLine(VBuffer[5], CBuffer[5], VBuffer[4], CBuffer[4]);
}
@@ -1,105 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#ifndef CRYINCLUDE_CRYENGINE_RENDERDLL_XRENDERATOMSHIM_ATOMSHIMRENDERAUXGEOM_H
#define CRYINCLUDE_CRYENGINE_RENDERDLL_XRENDERATOMSHIM_ATOMSHIMRENDERAUXGEOM_H
#pragma once
#include "../Common/RenderAuxGeom.h"
#include <AzCore/Math/Matrix4x4.h>
#include <Atom/RPI.Public/AuxGeom/AuxGeomDraw.h>
class CAtomShimRenderer;
class ICrySizer;
class CAtomShimRenderAuxGeom
: public IRenderAuxGeom
{
public:
// interface
virtual void SetRenderFlags(const SAuxGeomRenderFlags& renderFlags);
virtual SAuxGeomRenderFlags GetRenderFlags();
virtual void Flush() {}
virtual void Commit([[maybe_unused]] uint frames = 0) {}
virtual void Process() {}
virtual void DrawPoint(const Vec3& v, const ColorB& col, uint8 size = 1);
virtual void DrawPoints(const Vec3* v, uint32 numPoints, const ColorB& col, uint8 size = 1);
virtual void DrawPoints(const Vec3* v, uint32 numPoints, const ColorB* col, uint8 size = 1);
virtual void DrawLine(const Vec3& v0, const ColorB& colV0, const Vec3& v1, const ColorB& colV1, float thickness = 1.0f);
virtual void DrawLines(const Vec3* v, uint32 numPoints, const ColorB& col, float thickness = 1.0f);
virtual void DrawLines(const Vec3* v, uint32 numPoints, const ColorB* col, float thickness = 1.0f);
virtual void DrawLines(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB& col, float thickness = 1.0f);
virtual void DrawLines(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB* col, float thickness = 1.0f);
virtual void DrawPolyline(const Vec3* v, uint32 numPoints, bool closed, const ColorB& col, float thickness = 1.0f);
virtual void DrawPolyline(const Vec3* v, uint32 numPoints, bool closed, const ColorB* col, float thickness = 1.0f);
virtual void DrawTriangle(const Vec3& v0, const ColorB& colV0, const Vec3& v1, const ColorB& colV1, const Vec3& v2, const ColorB& colV2);
virtual void DrawTriangles(const Vec3* v, uint32 numPoints, const ColorB& col);
virtual void DrawTriangles(const Vec3* v, uint32 numPoints, const ColorB* col);
virtual void DrawTriangles(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB& col);
virtual void DrawTriangles(const Vec3* v, uint32 numPoints, const vtx_idx* ind, uint32 numIndices, const ColorB* col);
virtual void DrawQuad(float width, float height, const Matrix34& matWorld, const ColorB& col, bool drawShaded = true);
virtual void DrawAABB(const AABB& aabb, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle);
virtual void DrawAABBs(const AABB* aabb, uint32 aabbCount, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle);
virtual void DrawAABB(const AABB& aabb, const Matrix34& matWorld, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle);
virtual void DrawOBB(const OBB& obb, const Vec3& pos, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle);
virtual void DrawOBB(const OBB& obb, const Matrix34& matWorld, bool bSolid, const ColorB& col, const EBoundingBoxDrawStyle& bbDrawStyle);
virtual void DrawSphere(const Vec3& pos, float radius, const ColorB& col, bool drawShaded = true);
virtual void DrawDisk(const Vec3& pos, const Vec3& dir, float radius, const ColorB& col, bool drawShaded = true);
virtual void DrawCone(const Vec3& pos, const Vec3& dir, float radius, float height, const ColorB& col, bool drawShaded = true);
virtual void DrawCylinder(const Vec3& pos, const Vec3& dir, float radius, float height, const ColorB& col, bool drawShaded = true);
virtual void DrawBone(const Vec3& rParent, const Vec3& rBone, ColorB col);
virtual void RenderText([[maybe_unused]] Vec3 pos, [[maybe_unused]] SDrawTextInfo& ti, [[maybe_unused]] const char* forma, [[maybe_unused]] va_list args) {}
virtual void RenderText_NoArgs([[maybe_unused]] Vec3 pos, [[maybe_unused]] SDrawTextInfo& ti, [[maybe_unused]] const char* text) {}
public:
static CAtomShimRenderAuxGeom* Create(CAtomShimRenderer& renderer)
{
if (s_pThis == NULL)
{
s_pThis = new CAtomShimRenderAuxGeom(renderer);
}
return s_pThis;
}
public:
~CAtomShimRenderAuxGeom();
void BeginFrame();
void EndFrame();
void SetViewProjOverride(const AZ::Matrix4x4& viewProj);
void UnsetViewProjOverride();
private:
CAtomShimRenderAuxGeom(CAtomShimRenderer& renderer);
int32_t m_viewProjOverrideIndex = -1;
AZ::RPI::AuxGeomDraw::AuxGeomDynamicIndexedDrawArguments m_drawArgs;
CAtomShimRenderer* m_renderer;
static CAtomShimRenderAuxGeom* s_pThis;
SAuxGeomRenderFlags m_cryRenderFlags;
};
#endif // NULL_RENDER_AUX_GEOM_H
File diff suppressed because it is too large Load Diff
@@ -1,617 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#ifndef NULL_RENDERER_H
#define NULL_RENDERER_H
#if _MSC_VER > 1000
# pragma once
#endif
/*
===========================================
The NULLRenderer interface Class
===========================================
*/
#define MAX_TEXTURE_STAGES 4
#include "CryArray.h"
#include "AtomShim_RenderAuxGeom.h"
#include <AzCore/Module/Module.h>
#include <AtomCore/Instance/Instance.h>
#include <Atom/RHI.Reflect/Base.h>
#include <Atom/RHI/ImageView.h>
#include <Atom/RPI.Public/DynamicDraw/DynamicDrawInterface.h>
#include <Atom/RPI.Public/Image/StreamingImage.h>
#include <AzFramework/Components/CameraBus.h>
// Forward declaration.
namespace AZ
{
namespace RHI
{
class Image;
}
namespace RPI
{
class Scene;
class RenderPipeline;
class WindowContext;
class View;
class ViewportContext;
}
}
//! A vector of these structs is used to keep track of the different viewports using Atom to render.
//! Each viewport currently has its own scene and pipeline.
struct AtomShimViewContext
{
HWND m_hWnd;
bool m_isMainViewport;
// width and height of the viewport.
// These are not fully used currently since each viewport window sends OnWindowResized messages to the WindowContext
// these could instead be sent via the AtomShim in future if desired.
int m_width;
int m_height;
AZ::RPI::Scene* m_scene = nullptr;
AZStd::shared_ptr<AZ::RPI::RenderPipeline> m_renderPipeline;
AZStd::shared_ptr<AZ::RPI::View> m_view;
};
#define ATOM_SHIM_TEXTURE_TYPE eTT_MaxTexType
struct AtomShimTexture
: public CTexture
, public AZ::Data::AssetBus::Handler
{
AtomShimTexture(uint32 nFlags) : CTexture(nFlags)
{
}
virtual ~AtomShimTexture();
void QueueForHotReload(const AZ::Data::AssetId& assetId);
void OnAssetReady(AZ::Data::Asset<AZ::Data::AssetData> asset) override;
void CreateFromStreamingImageAsset(const AZ::Data::Asset<AZ::RPI::StreamingImageAsset>& streamingImageAsset);
void CreateFromImage(const AZ::Data::Instance<AZ::RPI::Image>& image);
virtual void SetClamp(bool bEnable)
{
uint32 flags = GetFlags();
if (bEnable)
{
flags |= FT_STATE_CLAMP;
}
else
{
flags &= ~FT_STATE_CLAMP;
}
SetFlags(flags);
}
AZ::Data::Instance<AZ::RPI::Image> m_instance; // This is only set for textures loaded from an asset
AZ::RHI::Ptr<AZ::RHI::Image> m_image; // This is only set for textures created dynamically (e.g. font images)
AZ::RHI::Ptr<AZ::RHI::ImageView> m_imageView;
};
//////////////////////////////////////////////////////////////////////
class CAtomShimRenderer
: public CRenderer
, public AZ::Module // This is a base class so that StaticNames in the NameDictionary work in this DLL
, Camera::ActiveCameraRequestBus::Handler
{
public:
////---------------------------------------------------------------------------------------------------------------------
virtual SRenderPipeline* GetRenderPipeline() override { return nullptr; }
virtual SRenderThread* GetRenderThread() override { return nullptr; }
virtual void FX_SetState(int st, int AlphaRef = -1, int RestoreState = 0) override;
void SetCull([[maybe_unused]] ECull eCull, [[maybe_unused]] bool bSkipMirrorCull = false) override {}
virtual SDepthTexture* GetDepthBufferOrig() override { return nullptr; }
virtual uint32 GetBackBufferWidth() override { return 0; }
virtual uint32 GetBackBufferHeight() override { return 0; };
virtual const SRenderTileInfo* GetRenderTileInfo() const override { return nullptr; }
virtual void FX_CommitStates([[maybe_unused]] const SShaderTechnique* pTech, [[maybe_unused]] const SShaderPass* pPass, [[maybe_unused]] bool bUseMaterialState) override {}
virtual void FX_Commit([[maybe_unused]] bool bAllowDIP = false) override {}
virtual long FX_SetVertexDeclaration([[maybe_unused]] int StreamMask, [[maybe_unused]] const AZ::Vertex::Format& vertexFormat) override { return 0; }
virtual void FX_DrawIndexedPrimitive([[maybe_unused]] const eRenderPrimitiveType eType, [[maybe_unused]] const int nVBOffset, [[maybe_unused]] const int nMinVertexIndex, [[maybe_unused]] const int nVerticesCount, [[maybe_unused]] const int nStartIndex, [[maybe_unused]] const int nNumIndices, [[maybe_unused]] bool bInstanced = false) override {}
virtual SDepthTexture* FX_GetDepthSurface([[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] bool bAA, [[maybe_unused]] bool shaderResourceView = false) override { return nullptr; }
virtual long FX_SetIStream([[maybe_unused]] const void* pB, [[maybe_unused]] uint32 nOffs, [[maybe_unused]] RenderIndexType idxType) override { return -1; }
virtual long FX_SetVStream([[maybe_unused]] int nID, [[maybe_unused]] const void* pB, [[maybe_unused]] uint32 nOffs, [[maybe_unused]] uint32 nStride, [[maybe_unused]] uint32 nFreq = 1) override { return -1; }
virtual void FX_DrawPrimitive([[maybe_unused]] eRenderPrimitiveType eType, [[maybe_unused]] int nStartVertex, [[maybe_unused]] int nVerticesCount, [[maybe_unused]] int nInstanceVertices = 0) {}
virtual void DrawQuad3D([[maybe_unused]] const Vec3& v0, [[maybe_unused]] const Vec3& v1, [[maybe_unused]] const Vec3& v2, [[maybe_unused]] const Vec3& v3, [[maybe_unused]] const ColorF& color, [[maybe_unused]] float ftx0, [[maybe_unused]] float fty0, [[maybe_unused]] float ftx1, [[maybe_unused]] float fty1) override {}
virtual void DrawQuad([[maybe_unused]] float x0, [[maybe_unused]] float y0, [[maybe_unused]] float x1, [[maybe_unused]] float y1, [[maybe_unused]] const ColorF& color, [[maybe_unused]] float z = 1.0f, [[maybe_unused]] float s0 = 0.0f, [[maybe_unused]] float t0 = 0.0f, [[maybe_unused]] float s1 = 1.0f, [[maybe_unused]] float t1 = 1.0f) override {};
virtual void FX_ClearTarget(ITexture* pTex) override;
virtual void FX_ClearTarget(SDepthTexture* pTex) override;
virtual bool FX_SetRenderTarget(int nTarget, void* pTargetSurf, SDepthTexture* pDepthTarget, uint32 nTileCount = 1) override;
virtual bool FX_PushRenderTarget(int nTarget, void* pTargetSurf, SDepthTexture* pDepthTarget, uint32 nTileCount = 1) override;
virtual bool FX_SetRenderTarget(int nTarget, CTexture* pTarget, SDepthTexture* pDepthTarget, bool bPush = false, int nCMSide = -1, bool bScreenVP = false, uint32 nTileCount = 1) override;
virtual bool FX_PushRenderTarget(int nTarget, CTexture* pTarget, SDepthTexture* pDepthTarget, int nCMSide = -1, bool bScreenVP = false, uint32 nTileCount = 1) override;
virtual bool FX_RestoreRenderTarget(int nTarget) override;
virtual bool FX_PopRenderTarget(int nTarget) override;
virtual void FX_SetActiveRenderTargets([[maybe_unused]] bool bAllowDIP = false) override {}
virtual void EF_Scissor([[maybe_unused]] bool bEnable, [[maybe_unused]] int sX, [[maybe_unused]] int sY, [[maybe_unused]] int sWdt, [[maybe_unused]] int sHgt) override {};
virtual void FX_ResetPipe() override {};
////---------------------------------------------------------------------------------------------------------------------
CAtomShimRenderer();
virtual ~CAtomShimRenderer();
virtual WIN_HWND Init(int x, int y, int width, int height, unsigned int cbpp, int zbpp, int sbits, bool fullscreen, bool isEditor, WIN_HINSTANCE hinst, WIN_HWND Glhwnd = 0, bool bReInit = false, const SCustomRenderInitArgs* pCustomArgs = 0, bool bShaderCacheGen = false);
virtual WIN_HWND GetHWND();
virtual bool SetWindowIcon(const char* path);
virtual ERenderType GetRenderType() const override;
virtual const char* GetRenderDescription() const override;
/////////////////////////////////////////////////////////////////////////////////
// Render-context management
/////////////////////////////////////////////////////////////////////////////////
virtual bool SetCurrentContext(WIN_HWND hWnd);
virtual bool CreateContext(WIN_HWND hWnd, bool bAllowMSAA, int SSX, int SSY);
virtual bool DeleteContext(WIN_HWND hWnd);
virtual void MakeMainContextActive();
virtual WIN_HWND GetCurrentContextHWND() { return m_currContext ? m_currContext->m_hWnd : m_hWnd; }
virtual bool IsCurrentContextMainVP() { return m_currContext ? m_currContext->m_isMainViewport : true; }
virtual int GetCurrentContextViewportWidth() const { return -1; }
virtual int GetCurrentContextViewportHeight() const { return -1; }
/////////////////////////////////////////////////////////////////////////////////
virtual int CreateRenderTarget(const char* name, int nWidth, int nHeight, const ColorF& cClear, ETEX_Format eTF = eTF_R8G8B8A8);
virtual bool ResizeRenderTarget(int nHandle, int nWidth, int nHeight);
virtual bool DestroyRenderTarget(int nHandle);
virtual bool SetRenderTarget(int nHandle, SDepthTexture* pDepthSurf = nullptr);
virtual SDepthTexture* CreateDepthSurface(int nWidth, int nHeight, bool shaderResourceView = false);
virtual void DestroyDepthSurface(SDepthTexture* pDepthSurf);
virtual int GetOcclusionBuffer(uint16* pOutOcclBuffer, Matrix44* pmCamBuffe);
virtual void WaitForParticleBuffer(threadID nThreadId);
virtual void GetVideoMemoryUsageStats([[maybe_unused]] size_t& vidMemUsedThisFrame, [[maybe_unused]] size_t& vidMemUsedRecently, [[maybe_unused]] bool bGetPoolsSizes = false) {}
virtual void SetRenderTile([[maybe_unused]] f32 nTilesPosX, [[maybe_unused]] f32 nTilesPosY, [[maybe_unused]] f32 nTilesGridSizeX, [[maybe_unused]] f32 nTilesGridSizeY) {}
virtual void EF_InvokeShadowMapRenderJobs([[maybe_unused]] int nFlags){}
//! Fills array of all supported video formats (except low resolution formats)
//! Returns number of formats, also when called with NULL
virtual int EnumDisplayFormats(SDispFormat* Formats);
//! Return all supported by video card video AA formats
virtual int EnumAAFormats([[maybe_unused]] SAAFormat* Formats) { return 0; }
//! Changes resolution of the window/device (doen't require to reload the level
virtual bool ChangeResolution(int nNewWidth, int nNewHeight, int nNewColDepth, int nNewRefreshHZ, bool bFullScreen, bool bForce);
virtual Vec2 SetViewportDownscale([[maybe_unused]] float xscale, [[maybe_unused]] float yscale) { return Vec2(0, 0); }
virtual void SetCurDownscaleFactor([[maybe_unused]] Vec2 sf) {};
virtual EScreenAspectRatio GetScreenAspect([[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight) { return eAspect_4_3; }
virtual void SwitchToNativeResolutionBackbuffer() {}
virtual void ShutDown(bool bReInit = false);
virtual void ShutDownFast();
virtual void BeginFrame();
virtual void RenderDebug(bool bRernderStats = true);
virtual void EndFrame();
virtual void LimitFramerate([[maybe_unused]] const int maxFPS, [[maybe_unused]] const bool bUseSleep) {}
virtual void TryFlush();
virtual void Reset (void) {};
virtual void RT_ReleaseCB(void*){}
virtual void InitSystemResources(int nFlags);
virtual void ForceGC() {}
virtual void FlushPendingTextureTasks() {}
virtual void SetTexture(int tnum);
virtual void SetTexture(int tnum, int nUnit);
virtual void SetState(int State, int AlphaRef);
virtual void DrawStringU(IFFont_RenderProxy* pFont, float x, float y, float z, const char* pStr, bool asciiMultiLine, const STextDrawContext& ctx) const;
virtual void DrawDynVB(SVF_P3F_C4B_T2F* pBuf, uint16* pInds, int nVerts, int nInds, PublicRenderPrimitiveType nPrimType);
virtual void DrawDynUiPrimitiveList(DynUiPrimitiveList& primitives, int totalNumVertices, int totalNumIndices);
virtual void DrawBuffer(CVertexBuffer* pVBuf, CIndexBuffer* pIBuf, int nNumIndices, int nOffsIndex, const PublicRenderPrimitiveType nPrmode, int nVertStart = 0, int nVertStop = 0);
virtual void CheckError(const char* comment);
virtual void DrawLine([[maybe_unused]] const Vec3& vPos1, [[maybe_unused]] const Vec3& vPos2) {};
virtual void Graph([[maybe_unused]] byte* g, [[maybe_unused]] int x, [[maybe_unused]] int y, [[maybe_unused]] int wdt, [[maybe_unused]] int hgt, [[maybe_unused]] int nC, [[maybe_unused]] int type, [[maybe_unused]] const char* text, [[maybe_unused]] ColorF& color, [[maybe_unused]] float fScale) {};
virtual void SetCamera(const CCamera& cam);
virtual void SetViewport(int x, int y, int width, int height, int id = 0);
virtual void SetScissor(int x = 0, int y = 0, int width = 0, int height = 0);
virtual void GetViewport(int* x, int* y, int* width, int* height) const;
virtual void SetCullMode (int mode = R_CULL_BACK);
virtual bool EnableFog (bool enable);
virtual void SetFogColor(const ColorF& color);
virtual void EnableVSync(bool enable);
virtual void DrawPrimitivesInternal(CVertexBuffer* src, int vert_num, const eRenderPrimitiveType prim_type);
virtual void PushMatrix();
virtual void RotateMatrix(float a, float x, float y, float z);
virtual void RotateMatrix(const Vec3& angels);
virtual void TranslateMatrix(float x, float y, float z);
virtual void ScaleMatrix(float x, float y, float z);
virtual void TranslateMatrix(const Vec3& pos);
virtual void MultMatrix(const float* mat);
virtual void LoadMatrix(const Matrix34* src = 0);
virtual void PopMatrix();
virtual void EnableTMU(bool enable);
virtual void SelectTMU(int tnum);
virtual bool ChangeDisplay(unsigned int width, unsigned int height, unsigned int cbpp);
virtual void ChangeViewport(unsigned int x, unsigned int y, unsigned int width, unsigned int height, bool bMainViewport = false, float scaleWidth = 1.0f, float scaleHeight = 1.0f);
virtual bool SaveTga([[maybe_unused]] unsigned char* sourcedata, [[maybe_unused]] int sourceformat, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] const char* filename, [[maybe_unused]] bool flip) const { return false; }
//download an image to video memory. 0 in case of failure
virtual void CreateResourceAsync([[maybe_unused]] SResourceAsync* Resource) {};
virtual void ReleaseResourceAsync([[maybe_unused]] SResourceAsync* Resource) {};
void ReleaseResourceAsync(AZStd::unique_ptr<SResourceAsync> Resource) override {};
virtual unsigned int DownLoadToVideoMemory([[maybe_unused]] const byte* data, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] int d, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int nummipmap, [[maybe_unused]] ETEX_Type eTT, [[maybe_unused]] bool repeat = true, [[maybe_unused]] int filter = FILTER_BILINEAR, [[maybe_unused]] int Id = 0, [[maybe_unused]] const char* szCacheName = NULL, [[maybe_unused]] int flags = 0, [[maybe_unused]] EEndian eEndian = eLittleEndian, [[maybe_unused]] RectI* pRegion = NULL, [[maybe_unused]] bool bAsynDevTexCreation = false) { return 0; }
virtual unsigned int DownLoadToVideoMemory([[maybe_unused]] const byte* data, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int nummipmap, [[maybe_unused]] bool repeat = true, [[maybe_unused]] int filter = FILTER_BILINEAR, [[maybe_unused]] int Id = 0, [[maybe_unused]] const char* szCacheName = NULL, [[maybe_unused]] int flags = 0, [[maybe_unused]] EEndian eEndian = eLittleEndian, [[maybe_unused]] RectI* pRegion = NULL, [[maybe_unused]] bool bAsynDevTexCreation = false) { return 0; }
virtual unsigned int DownLoadToVideoMemoryCube([[maybe_unused]] const byte* data, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int nummipmap, [[maybe_unused]] bool repeat = true, [[maybe_unused]] int filter = FILTER_BILINEAR, [[maybe_unused]] int Id = 0, [[maybe_unused]] const char* szCacheName = NULL, [[maybe_unused]] int flags = 0, [[maybe_unused]] EEndian eEndian = eLittleEndian, [[maybe_unused]] RectI* pRegion = NULL, [[maybe_unused]] bool bAsynDevTexCreation = false) { return 0; }
virtual unsigned int DownLoadToVideoMemory3D([[maybe_unused]] const byte* data, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] int d, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int nummipmap, [[maybe_unused]] bool repeat = true, [[maybe_unused]] int filter = FILTER_BILINEAR, [[maybe_unused]] int Id = 0, [[maybe_unused]] const char* szCacheName = NULL, [[maybe_unused]] int flags = 0, [[maybe_unused]] EEndian eEndian = eLittleEndian, [[maybe_unused]] RectI* pRegion = NULL, [[maybe_unused]] bool bAsynDevTexCreation = false) { return 0; }
virtual void UpdateTextureInVideoMemory([[maybe_unused]] uint32 tnum, [[maybe_unused]] const byte* newdata, [[maybe_unused]] int posx, [[maybe_unused]] int posy, [[maybe_unused]] int w, [[maybe_unused]] int h, [[maybe_unused]] ETEX_Format eTFSrc = eTF_R8G8B8A8, [[maybe_unused]] int posz = 0, [[maybe_unused]] int sizez = 1){}
virtual bool SetGammaDelta(float fGamma);
virtual void RestoreGamma(void) {};
virtual void RemoveTexture([[maybe_unused]] unsigned int TextureId) {}
virtual void DeleteFont([[maybe_unused]] IFFont* font) {}
virtual void Draw2dImage(float xpos, float ypos, float w, float h, int texture_id, float s0 = 0, float t0 = 0, float s1 = 1, float t1 = 1, float angle = 0, float r = 1, float g = 1, float b = 1, float a = 1, float z = 1);
virtual void Push2dImage(float xpos, float ypos, float w, float h, int texture_id, float s0 = 0, float t0 = 0, float s1 = 1, float t1 = 1, float angle = 0, float r = 1, float g = 1, float b = 1, float a = 1, float z = 1, float stereoDepth = 0);
virtual void Draw2dImageList();
virtual void Draw2dImageStretchMode([[maybe_unused]] bool stretch) {};
virtual void DrawImage(float xpos, float ypos, float w, float h, int texture_id, float s0, float t0, float s1, float t1, float r, float g, float b, float a, bool filtered = true);
virtual void DrawImageWithUV(float xpos, float ypos, float z, float w, float h, int texture_id, float s[4], float t[4], float r, float g, float b, float a, bool filtered = true);
virtual void PushWireframeMode(int mode);
virtual void PopWireframeMode();
virtual void FX_PushWireframeMode(int mode);
virtual void FX_PopWireframeMode();
virtual void FX_SetWireframeMode(int mode);
virtual void FX_PreRender([[maybe_unused]] int Stage) override {}
virtual void FX_PostRender() override {}
virtual void ResetToDefault();
virtual void SetDefaultRenderStates() {}
virtual int GenerateAlphaGlowTexture(float k);
virtual void ApplyViewParameters(const CameraViewParameters&) override;
virtual void SetMaterialColor(float r, float g, float b, float a);
virtual void GetMemoryUsage(ICrySizer* Sizer);
// Project/UnProject. Returns true if successful.
virtual bool ProjectToScreen(float ptx, float pty, float ptz,
float* sx, float* sy, float* sz);
virtual int UnProject(float sx, float sy, float sz,
float* px, float* py, float* pz,
const float modelMatrix[16],
const float projMatrix[16],
const int viewport[4]);
virtual int UnProjectFromScreen(float sx, float sy, float sz,
float* px, float* py, float* pz);
// Shadow Mapping
virtual bool PrepareDepthMap(ShadowMapFrustum* SMSource, int nFrustumLOD = 0, bool bClearPool = false);
virtual void DrawAllShadowsOnTheScreen();
virtual void OnEntityDeleted([[maybe_unused]] IRenderNode* pRenderNode) {};
virtual void FX_SetClipPlane (bool bEnable, float* pPlane, bool bRefract);
virtual void SetColorOp(byte eCo, byte eAo, byte eCa, byte eAa);
virtual void EF_SetColorOp([[maybe_unused]] byte eCo, [[maybe_unused]] byte eAo, [[maybe_unused]] byte eCa, [[maybe_unused]] byte eAa) {};
virtual void SetSrgbWrite([[maybe_unused]] bool srgbWrite) {};
virtual void EF_SetSrgbWrite([[maybe_unused]] bool sRGBWrite) {};
//for editor
virtual void GetModelViewMatrix(float* mat);
virtual void GetProjectionMatrix(float* mat);
//for texture
virtual ITexture* EF_LoadTexture(const char* nameTex, uint32 flags = 0);
virtual ITexture* EF_LoadDefaultTexture(const char* nameTex);
virtual void DrawQuad(const Vec3& right, const Vec3& up, const Vec3& origin, int nFlipMode = 0);
virtual void DrawQuad(float dy, float dx, float dz, float x, float y, float z);
// NOTE: deprecated
virtual void ClearTargetsImmediately(uint32 nFlags);
virtual void ClearTargetsImmediately(uint32 nFlags, const ColorF& Colors, float fDepth);
virtual void ClearTargetsImmediately(uint32 nFlags, const ColorF& Colors);
virtual void ClearTargetsImmediately(uint32 nFlags, float fDepth);
virtual void ClearTargetsLater(uint32 nFlags);
virtual void ClearTargetsLater(uint32 nFlags, const ColorF& Colors, float fDepth);
virtual void ClearTargetsLater(uint32 nFlags, const ColorF& Colors);
virtual void ClearTargetsLater(uint32 nFlags, float fDepth);
virtual void ReadFrameBuffer(unsigned char* pRGB, int nImageX, int nSizeX, int nSizeY, ERB_Type eRBType, bool bRGBA, int nScaledX = -1, int nScaledY = -1);
virtual void ReadFrameBufferFast(uint32* pDstARGBA8, int dstWidth, int dstHeight, bool BGRA = true);
virtual bool CaptureFrameBufferFast(unsigned char* pDstRGBA8, int destinationWidth, int destinationHeight);
virtual bool CopyFrameBufferFast(unsigned char* pDstRGBA8, int destinationWidth, int destinationHeight);
virtual bool RegisterCaptureFrame(ICaptureFrameListener* pCapture);
virtual bool UnRegisterCaptureFrame(ICaptureFrameListener* pCapture);
virtual bool InitCaptureFrameBufferFast(uint32 bufferWidth, uint32 bufferHeight);
virtual void CloseCaptureFrameBufferFast(void);
virtual void CaptureFrameBufferCallBack(void);
virtual void ReleaseHWShaders() {}
virtual void PrintResourcesLeaks() {}
//misc
virtual bool ScreenShot(const char* filename = NULL, int width = 0);
virtual void Set2DMode(uint32 orthoWidth, uint32 orthoHeight, TransformationMatrices& backupMatrices, float znear = -1e10f, float zfar = 1e10f);
virtual void Unset2DMode(const TransformationMatrices& restoringMatrices);
virtual void Set2DModeNonZeroTopLeft(float orthoLeft, float orthoTop, float orthoWidth, float orthoHeight, TransformationMatrices& backupMatrices, float znear = -1e10f, float zfar = 1e10f);
virtual int ScreenToTexture(int nTexID);
virtual void DrawPoints([[maybe_unused]] Vec3 v[], [[maybe_unused]] int nump, [[maybe_unused]] ColorF& col, [[maybe_unused]] int flags) {};
virtual void DrawLines([[maybe_unused]] Vec3 v[], [[maybe_unused]] int nump, [[maybe_unused]] ColorF& col, [[maybe_unused]] int flags, [[maybe_unused]] float fGround) {};
virtual void RefreshSystemShaders() {}
// Shaders/Shaders support
// RE - RenderElement
virtual void EF_Release(int nFlags);
virtual void FX_PipelineShutdown(bool bFastShutdown = false);
//==========================================================
// external interface for shaders
//==========================================================
virtual bool EF_SetLightHole(Vec3 vPos, Vec3 vNormal, int idTex, float fScale = 1.0f, bool bAdditive = true);
// Draw all shaded REs in the list
virtual void EF_EndEf3D (int nFlags, int nPrecacheUpdateId, int nNearPrecacheUpdateId, const SRenderingPassInfo& passInfo);
// 2d interface for shaders
virtual void EF_EndEf2D(bool bSort);
virtual bool EF_PrecacheResource(SShaderItem* pSI, float fMipFactor, float fTimeToReady, int Flags, int nUpdateId, int nCounter);
virtual bool EF_PrecacheResource(ITexture* pTP, float fDist, float fTimeToReady, int Flags, int nUpdateId, int nCounter);
virtual void PrecacheResources();
virtual void PostLevelLoading() {}
virtual void PostLevelUnload() {}
virtual ITexture* EF_CreateCompositeTexture(int type, const char* szName, int nWidth, int nHeight, int nDepth, int nMips, int nFlags, ETEX_Format eTF, const STexComposition* pCompositions, size_t nCompositions, int8 nPriority = -1);
void EF_Init();
virtual IDynTexture* MakeDynTextureFromShadowBuffer(int nSize, IDynTexture* pDynTexture);
virtual void MakeSprite(IDynTexture*& rTexturePtr, float _fSpriteDistance, int nTexSize, float angle, float angle2, IStatObj* pStatObj, const float fBrightnessMultiplier, SRendParams& rParms);
virtual uint32 RenderOccludersIntoBuffer([[maybe_unused]] const CCamera& viewCam, [[maybe_unused]] int nTexSize, [[maybe_unused]] PodArray<IRenderNode*>& lstOccluders, [[maybe_unused]] float* pBuffer) { return 0; }
virtual IRenderAuxGeom* GetIRenderAuxGeom([[maybe_unused]] void* jobID = 0)
{
return m_pAtomShimRenderAuxGeom;
}
virtual IColorGradingController* GetIColorGradingController();
virtual IStereoRenderer* GetIStereoRenderer();
virtual ITexture* Create2DTexture(const char* name, int width, int height, int numMips, int flags, unsigned char* data, ETEX_Format format);
//////////////////////////////////////////////////////////////////////
// All font functions are not implemented since the font is rendered by AtomFont
int FontCreateTexture(
[[maybe_unused]] int Width, [[maybe_unused]] int Height, [[maybe_unused]] byte* pData,
[[maybe_unused]] ETEX_Format eTF = eTF_R8G8B8A8, [[maybe_unused]] bool genMips = false,
[[maybe_unused]] const char* textureName = nullptr) override
{
return -1;
}
bool FontUpdateTexture(
[[maybe_unused]] int nTexId, [[maybe_unused]] int X, [[maybe_unused]] int Y, [[maybe_unused]] int USize, [[maybe_unused]] int VSize,
[[maybe_unused]] byte* pData) override
{
return true;
}
void FontSetTexture([[maybe_unused]] int nTexId, [[maybe_unused]] int nFilterMode) override { }
void FontSetRenderingState([[maybe_unused]] bool overrideViewProjMatrices, [[maybe_unused]] TransformationMatrices& backupMatrices) override { }
void FontSetBlending([[maybe_unused]] int src, [[maybe_unused]] int dst, [[maybe_unused]] int baseState) override { }
void FontRestoreRenderingState([[maybe_unused]] bool overrideViewProjMatrices, [[maybe_unused]] const TransformationMatrices& restoringMatrices) override { }
virtual void GetLogVBuffers(void) {}
virtual void RT_PresentFast() {}
virtual void RT_ForceSwapBuffers() {}
virtual void RT_SwitchToNativeResolutionBackbuffer([[maybe_unused]] bool resolveBackBuffer) {}
virtual void RT_BeginFrame() {}
virtual void RT_EndFrame() {}
virtual void RT_Init() {}
virtual void RT_ShutDown([[maybe_unused]] uint32 nFlags) {}
virtual bool RT_CreateDevice() { return true; }
virtual void RT_Reset() {}
virtual void RT_SetCull([[maybe_unused]] int nMode) {}
virtual void RT_SetScissor([[maybe_unused]] bool bEnable, [[maybe_unused]] int x, [[maybe_unused]] int y, [[maybe_unused]] int width, [[maybe_unused]] int height){}
virtual void RT_RenderScene([[maybe_unused]] int nFlags, [[maybe_unused]] SThreadInfo& TI, [[maybe_unused]] RenderFunc pRenderFunc) {}
virtual void RT_PrepareStereo([[maybe_unused]] int mode, [[maybe_unused]] int output) {}
virtual void RT_CopyToStereoTex([[maybe_unused]] int channel) {}
virtual void RT_UpdateTrackingStates() {}
virtual void RT_DisplayStereo() {}
virtual void RT_SetCameraInfo() {}
virtual void RT_SetStereoCamera() {}
virtual void RT_ReadFrameBuffer([[maybe_unused]] unsigned char* pRGB, [[maybe_unused]] int nImageX, [[maybe_unused]] int nSizeX, [[maybe_unused]] int nSizeY, [[maybe_unused]] ERB_Type eRBType, [[maybe_unused]] bool bRGBA, [[maybe_unused]] int nScaledX, [[maybe_unused]] int nScaledY) {}
virtual void RT_RenderScene([[maybe_unused]] int nFlags, [[maybe_unused]] SThreadInfo& TI, [[maybe_unused]] int nR, [[maybe_unused]] RenderFunc pRenderFunc) {};
virtual void RT_CreateResource([[maybe_unused]] SResourceAsync* Res) {};
virtual void RT_ReleaseResource([[maybe_unused]] SResourceAsync* Res) {};
virtual void RT_ReleaseRenderResources() {};
virtual void RT_UnbindResources() {};
virtual void RT_UnbindTMUs() {};
virtual void RT_PrecacheDefaultShaders() {};
virtual void RT_CreateRenderResources() {};
virtual void RT_ClearTarget([[maybe_unused]] ITexture* pTex, [[maybe_unused]] const ColorF& color) {};
virtual void RT_RenderDebug([[maybe_unused]] bool bRenderStats = true) {};
virtual HRESULT RT_CreateVertexBuffer([[maybe_unused]] UINT Length, [[maybe_unused]] DWORD Usage, [[maybe_unused]] DWORD FVF, [[maybe_unused]] UINT Pool, [[maybe_unused]] void** ppVertexBuffer, [[maybe_unused]] HANDLE* pSharedHandle) { return S_OK; }
virtual HRESULT RT_CreateIndexBuffer([[maybe_unused]] UINT Length, [[maybe_unused]] DWORD Usage, [[maybe_unused]] DWORD Format, [[maybe_unused]] UINT Pool, [[maybe_unused]] void** ppVertexBuffer, [[maybe_unused]] HANDLE* pSharedHandle) { return S_OK; };
virtual HRESULT RT_CreateVertexShader([[maybe_unused]] DWORD* pBuf, [[maybe_unused]] void** pShader, [[maybe_unused]] void* pInst) { return S_OK; };
virtual HRESULT RT_CreatePixelShader([[maybe_unused]] DWORD* pBuf, [[maybe_unused]] void** pShader) { return S_OK; };
virtual void RT_ReleaseVBStream([[maybe_unused]] void* pVB, [[maybe_unused]] int nStream) {};
virtual void RT_DrawDynVB([[maybe_unused]] int Pool, [[maybe_unused]] uint32 nVerts) {}
virtual void RT_DrawDynVB([[maybe_unused]] SVF_P3F_C4B_T2F* pBuf, [[maybe_unused]] uint16* pInds, [[maybe_unused]] uint32 nVerts, [[maybe_unused]] uint32 nInds, [[maybe_unused]] const PublicRenderPrimitiveType nPrimType) {}
virtual void RT_DrawDynVBUI([[maybe_unused]] SVF_P2F_C4B_T2F_F4B* pBuf, [[maybe_unused]] uint16* pInds, [[maybe_unused]] uint32 nVerts, [[maybe_unused]] uint32 nInds, [[maybe_unused]] const PublicRenderPrimitiveType nPrimType) {}
virtual void RT_DrawStringU([[maybe_unused]] IFFont_RenderProxy* pFont, [[maybe_unused]] float x, [[maybe_unused]] float y, [[maybe_unused]] float z, [[maybe_unused]] const char* pStr, [[maybe_unused]] bool asciiMultiLine, [[maybe_unused]] const STextDrawContext& ctx) const {}
virtual void RT_DrawLines([[maybe_unused]] Vec3 v[], [[maybe_unused]] int nump, [[maybe_unused]] ColorF& col, [[maybe_unused]] int flags, [[maybe_unused]] float fGround) {}
virtual void RT_Draw2dImage([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] CTexture* pTexture, [[maybe_unused]] float s0, [[maybe_unused]] float t0, [[maybe_unused]] float s1, [[maybe_unused]] float t1, [[maybe_unused]] float angle, [[maybe_unused]] DWORD col, [[maybe_unused]] float z) {}
virtual void RT_Push2dImage([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] CTexture* pTexture, [[maybe_unused]] float s0, [[maybe_unused]] float t0, [[maybe_unused]] float s1, [[maybe_unused]] float t1, [[maybe_unused]] float angle, [[maybe_unused]] DWORD col, [[maybe_unused]] float z, [[maybe_unused]] float stereoDepth) {}
virtual void RT_Draw2dImageList() {}
virtual void RT_Draw2dImageStretchMode([[maybe_unused]] bool bStretch) {}
virtual void RT_DrawImageWithUV([[maybe_unused]] float xpos, [[maybe_unused]] float ypos, [[maybe_unused]] float z, [[maybe_unused]] float w, [[maybe_unused]] float h, [[maybe_unused]] int texture_id, [[maybe_unused]] float* s, [[maybe_unused]] float* t, [[maybe_unused]] DWORD col, [[maybe_unused]] bool filtered = true) {}
virtual void EF_ClearTargetsImmediately([[maybe_unused]] uint32 nFlags) {}
virtual void EF_ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors, [[maybe_unused]] float fDepth, [[maybe_unused]] uint8 nStencil) {}
virtual void EF_ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors) {}
virtual void EF_ClearTargetsImmediately([[maybe_unused]] uint32 nFlags, [[maybe_unused]] float fDepth, [[maybe_unused]] uint8 nStencil) {}
virtual void EF_ClearTargetsLater([[maybe_unused]] uint32 nFlags) {}
virtual void EF_ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors, [[maybe_unused]] float fDepth, [[maybe_unused]] uint8 nStencil) {}
virtual void EF_ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] const ColorF& Colors) {}
virtual void EF_ClearTargetsLater([[maybe_unused]] uint32 nFlags, [[maybe_unused]] float fDepth, [[maybe_unused]] uint8 nStencil) {}
virtual void RT_PushRenderTarget([[maybe_unused]] int nTarget, [[maybe_unused]] CTexture* pTex, [[maybe_unused]] SDepthTexture* pDS, [[maybe_unused]] int nS) {};
virtual void RT_PopRenderTarget([[maybe_unused]] int nTarget) {};
virtual void RT_SetViewport([[maybe_unused]] int x, [[maybe_unused]] int y, [[maybe_unused]] int width, [[maybe_unused]] int height, [[maybe_unused]] int id) {}
virtual void RT_SetRendererCVar([[maybe_unused]] ICVar* pCVar, [[maybe_unused]] const char* pArgText, [[maybe_unused]] const bool bSilentMode = false) {};
virtual void SetRendererCVar([[maybe_unused]] ICVar* pCVar, [[maybe_unused]] const char* pArgText, [[maybe_unused]] bool bSilentMode = false) {};
virtual void SetMatrices(float* pProjMat, float* pViewMat);
virtual void PushProfileMarker([[maybe_unused]] const char* label) {}
virtual void PopProfileMarker([[maybe_unused]] const char* label) {}
virtual void RT_InsertGpuCallback([[maybe_unused]] uint32 context, [[maybe_unused]] GpuCallbackFunc callback) {}
virtual void EnablePipelineProfiler([[maybe_unused]] bool bEnable) {}
virtual IOpticsElementBase* CreateOptics([[maybe_unused]] EFlareType type) const { return NULL; }
virtual bool BakeMesh([[maybe_unused]] const SMeshBakingInputParams* pInputParams, [[maybe_unused]] SMeshBakingOutput* pReturnValues) { return false; }
virtual PerInstanceConstantBufferPool* GetPerInstanceConstantBufferPoolPointer() override { return nullptr; }
IDynTexture* CreateDynTexture2(uint32 nWidth, uint32 nHeight, uint32 nTexFlags, const char* szSource, ETexPool eTexPool) override;
virtual void BeginProfilerSection([[maybe_unused]] const char* name, [[maybe_unused]] uint32 eProfileLabelFlags = 0) override {}
virtual void EndProfilerSection([[maybe_unused]] const char* name) override {}
virtual void AddProfilerLabel([[maybe_unused]] const char* name) override {}
#ifdef SUPPORT_HW_MOUSE_CURSOR
virtual IHWMouseCursor* GetIHWMouseCursor() { return NULL; }
#endif
virtual void StartLoadtimePlayback([[maybe_unused]] ILoadtimeCallback* pCallback) {}
virtual void StopLoadtimePlayback() {}
// used to track current textures
void SetTextureForUnit(int unit, int textureId);
void RT_DrawVideoRenderer([[maybe_unused]] AZ::VideoRenderer::IVideoRenderer* pVideoRenderer, [[maybe_unused]] const AZ::VideoRenderer::DrawArguments& drawArguments) override {}
private:
static constexpr char LogName[] = "CAtomShimRenderer";
//! Camera::ActiveCameraSystemRequestBus::Handler overrides...
const AZ::Transform& GetActiveCameraTransform() override;
const Camera::Configuration& GetActiveCameraConfiguration() override;
void CacheCameraTransform(const CCamera& camera);
void CacheCameraConfiguration(const CCamera& camamera);
HWND m_hWnd = nullptr; // The main app window
AZStd::string m_rendererDescription;
CAtomShimRenderAuxGeom* m_pAtomShimRenderAuxGeom;
IColorGradingController* m_pAtomShimColorGradingController;
IStereoRenderer* m_pAtomShimStereoRenderer;
AZ::RHI::Ptr<AZ::RPI::DynamicDrawContext> m_dynamicDraw;
AZ::RPI::ShaderVariantId m_shaderVariantWrap;
AZ::RPI::ShaderVariantId m_shaderVariantClamp;
// cached input indices for dynamic draw's draw srg
AZ::RHI::ShaderInputNameIndex m_imageInputIndex = "m_texture";
AZ::RHI::ShaderInputNameIndex m_viewProjInputIndex = "m_worldToProj";
AZStd::unordered_map<WIN_HWND, AtomShimViewContext*> m_viewContexts;
AtomShimViewContext* m_currContext = nullptr;
int m_renderPipelineNameSuffix = 1;
AtomShimTexture* m_currentTextureForUnit[32];
bool m_clampFlagPerTextureUnit[32];
int m_currentFontTextureId = -1;
bool m_isFinalInitializationDone = false;
bool m_isInFrame = false; // True when between calls to BeginFrame and EndFrame
int m_isIn2dModeCounter = 0;
AZ::Transform m_cameraTransform = AZ::Transform::CreateIdentity();
Camera::Configuration m_cameraConfiguration;
AZStd::shared_ptr<AZ::RPI::ViewportContext> m_viewportContext;
static AtomShimTexture* CastITextureToAtomShimTexture(ITexture* texture)
{
// If GetDevTexture returns a non-null value then this is not an AtomShim texture
if (!(texture && !texture->GetDevTexture()))
{
return nullptr;
}
return static_cast<AtomShimTexture*>(texture);
}
};
//=============================================================================
extern CAtomShimRenderer* gcpAtomShim;
#endif //NULL_RENDERER
@@ -1,162 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include "I3DEngine.h"
//============================================================================
bool CShader::FXSetTechnique([[maybe_unused]] const CCryNameTSCRC& szName)
{
return true;
}
bool CShader::FXSetPSFloat([[maybe_unused]] const CCryNameR& NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetPSFloat([[maybe_unused]] const char* NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetVSFloat([[maybe_unused]] const CCryNameR& NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetVSFloat([[maybe_unused]] const char* NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetGSFloat([[maybe_unused]] const CCryNameR& NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetGSFloat([[maybe_unused]] const char* NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetCSFloat([[maybe_unused]] const CCryNameR& NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXSetCSFloat([[maybe_unused]] const char* NameParam, [[maybe_unused]] const Vec4* fParams, [[maybe_unused]] int nParams)
{
return true;
}
bool CShader::FXBegin([[maybe_unused]] uint32* uiPassCount, [[maybe_unused]] uint32 nFlags)
{
return true;
}
bool CShader::FXBeginPass([[maybe_unused]] uint32 uiPass)
{
return true;
}
bool CShader::FXEndPass()
{
return true;
}
bool CShader::FXEnd()
{
return true;
}
bool CShader::FXCommit([[maybe_unused]] const uint32 nFlags)
{
return true;
}
//===================================================================================
FXShaderCache CHWShader::m_ShaderCache;
FXShaderCacheNames CHWShader::m_ShaderCacheList;
void CRenderer::RefreshSystemShaders()
{
}
SShaderCache::~SShaderCache()
{
CHWShader::m_ShaderCache.erase(m_Name);
SAFE_DELETE(m_pRes[CACHE_USER]);
SAFE_DELETE(m_pRes[CACHE_READONLY]);
}
SShaderCache* CHWShader::mfInitCache([[maybe_unused]] const char* name, [[maybe_unused]] CHWShader* pSH, [[maybe_unused]] bool bCheckValid, [[maybe_unused]] uint32 CRC32, [[maybe_unused]] bool bReadOnly, [[maybe_unused]] bool bAsync)
{
return NULL;
}
#if !defined(CONSOLE)
bool CHWShader::mfOptimiseCacheFile([[maybe_unused]] SShaderCache* pCache, [[maybe_unused]] bool bForce, [[maybe_unused]] SOptimiseStats* Stats)
{
return true;
}
#endif
bool CHWShader::PreactivateShaders()
{
bool bRes = true;
return bRes;
}
void CHWShader::RT_PreactivateShaders()
{
}
const char* CHWShader::GetCurrentShaderCombinations([[maybe_unused]] bool bLevel)
{
return "";
}
void CHWShader::mfFlushPendedShadersWait([[maybe_unused]] int nMaxAllowed)
{
}
void CShaderResources::Rebuild([[maybe_unused]] IShader* pSH, [[maybe_unused]] AzRHI::ConstantBufferUsage usage)
{
}
void CShaderResources::CloneConstants([[maybe_unused]] const IRenderShaderResources* pSrc)
{
}
void CShaderResources::ReleaseConstants()
{
}
void CShaderResources::UpdateConstants([[maybe_unused]] IShader* pSH)
{
}
void CShader::mfFlushPendedShaders()
{
}
void SShaderCache::Cleanup(void)
{
}
void CShaderResources::AdjustForSpec()
{
}
@@ -1,36 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : Implementation of the shadow maps using NULL device specific implementation
// shadow map calculations
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include "../Common/Shadow_Renderer.h"
#include "I3DEngine.h"
IDynTexture* CAtomShimRenderer::MakeDynTextureFromShadowBuffer([[maybe_unused]] int nSize, [[maybe_unused]] IDynTexture* pDynTexture)
{
return NULL;
}
bool CAtomShimRenderer::PrepareDepthMap([[maybe_unused]] ShadowMapFrustum* SMSource, [[maybe_unused]] int nFrustumLOD, [[maybe_unused]] bool bClearPool)
{
return true;
}
void CAtomShimRenderer::DrawAllShadowsOnTheScreen()
{
}
@@ -1,190 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : NULL device specific implementation and extensions handling.
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include <AzCore/std/algorithm.h>
#include <AzCore/std/string/conversions.h>
#include <AzCore/Math/MatrixUtils.h>
#include <AzFramework/Scene/Scene.h>
#include <AzFramework/Scene/SceneSystemBus.h>
#include <AzFramework/Windowing/WindowBus.h>
#include <Atom/RPI.Public/RenderPipeline.h>
#include <Atom/RPI.Public/Scene.h>
#include <Atom/RHI/RHISystemInterface.h>
#include <Atom/RPI.Public/WindowContext.h>
#include <Atom/RPI.Public/Shader/ShaderResourceGroup.h>
#include <Atom/RPI.Public/View.h>
#include <Atom/RPI.Public/AuxGeom/AuxGeomFeatureProcessorInterface.h>
#include <Atom/RPI.Reflect/Asset/AssetUtils.h>
bool CAtomShimRenderer::SetGammaDelta(const float fGamma)
{
m_fDeltaGamma = fGamma;
return true;
}
int CAtomShimRenderer::EnumDisplayFormats([[maybe_unused]] SDispFormat* Formats)
{
return 0;
}
bool CAtomShimRenderer::ChangeResolution([[maybe_unused]] int nNewWidth, [[maybe_unused]] int nNewHeight, [[maybe_unused]] int nNewColDepth, [[maybe_unused]] int nNewRefreshHZ, [[maybe_unused]] bool bFullScreen, [[maybe_unused]] bool bForce)
{
return false;
}
WIN_HWND CAtomShimRenderer::Init([[maybe_unused]] int x, [[maybe_unused]] int y, int width, int height, [[maybe_unused]] unsigned int cbpp, [[maybe_unused]] int zbpp, [[maybe_unused]] int sbits, [[maybe_unused]] bool fullscreen, [[maybe_unused]] bool isEditor, [[maybe_unused]] WIN_HINSTANCE hinst, WIN_HWND Glhwnd, [[maybe_unused]] bool bReInit, [[maybe_unused]] const SCustomRenderInitArgs* pCustomArgs, [[maybe_unused]] bool bShaderCacheGen)
{
//=======================================
// Add init code here
//=======================================
FX_SetWireframeMode(R_SOLID_MODE);
m_width = width;
m_height = height;
m_backbufferWidth = width;
m_backbufferHeight = height;
m_nativeWidth = width;
m_nativeHeight = height;
m_Features |= RFT_HW_NVIDIA;
m_hWnd = (HWND)Glhwnd;
if (!g_shaderGeneralHeap)
{
g_shaderGeneralHeap = CryGetIMemoryManager()->CreateGeneralExpandingMemoryHeap(4 * 1024 * 1024, 0, "Shader General");
}
iLog->Log("Init Shaders\n");
gRenDev->m_cEF.mfInit();
EF_Init();
#if NULL_SYSTEM_TRAIT_INIT_RETURNTHIS
return (WIN_HWND)this;//it just get checked against NULL anyway
#else
return (WIN_HWND)GetDesktopWindow();
#endif
}
bool CAtomShimRenderer::SetCurrentContext(WIN_HWND hWnd)
{
auto itr = m_viewContexts.find(hWnd);
if (itr == m_viewContexts.end())
{
return false;
}
m_currContext = itr->second;
return true;
}
bool CAtomShimRenderer::CreateContext(WIN_HWND hWnd, bool /* bAllowMSAA */, int /* SSX */, int /* SSY */)
{
if (m_viewContexts.find(hWnd) != m_viewContexts.end())
{
return true;
}
AZ::RPI::RenderPipelinePtr renderPipeline = AZ::RPI::RPISystemInterface::Get()->GetRenderPipelineForWindow(hWnd);
if (!renderPipeline)
{
return false;
}
AtomShimViewContext* pContext = new AtomShimViewContext;
pContext->m_hWnd = (HWND)hWnd;
pContext->m_width = m_width;
pContext->m_height = m_height;
pContext->m_isMainViewport = !gEnv->IsEditor();
pContext->m_renderPipeline = renderPipeline;
pContext->m_view = renderPipeline->GetDefaultView();
pContext->m_scene = renderPipeline->GetScene();
m_viewContexts[hWnd] = pContext;
m_currContext = pContext;
return true;
}
bool CAtomShimRenderer::DeleteContext(WIN_HWND hWnd)
{
// Attempt to find matching context with this window handle
auto contextToDeleteIter = m_viewContexts.find(hWnd);
if (contextToDeleteIter == m_viewContexts.end())
{
return false;
}
AtomShimViewContext* contextToDelete = contextToDeleteIter->second;
// remove this context from the map of contexts
m_viewContexts.erase(contextToDeleteIter);
// If we are deleting the current context then set current context to the first one still in list (if any are left)
if (m_currContext == contextToDelete)
{
if (m_viewContexts.empty())
{
m_currContext = nullptr;
m_width = 0;
m_height = 0;
}
else
{
m_currContext = m_viewContexts.begin()->second;
m_width = m_currContext->m_width;
m_height = m_currContext->m_height;
}
}
delete contextToDelete;
return true;
}
void CAtomShimRenderer::MakeMainContextActive()
{
if (m_viewContexts.empty())
{
return;
}
m_currContext = m_viewContexts.begin()->second;
}
void CAtomShimRenderer::ShutDown([[maybe_unused]] bool bReInit)
{
iLog = nullptr;
FreeResources(FRR_ALL);
FX_PipelineShutdown();
}
void CAtomShimRenderer::ShutDownFast()
{
FX_PipelineShutdown();
}
@@ -1,363 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : NULL device specific texture manager implementation.
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include <Atom/RHI/Factory.h>
#include <Atom/RPI.Public/Image/ImageSystemInterface.h>
//=================================================================================
///////////////////////////////////////////////////////////////////////////////////
void CAtomShimRenderer::MakeSprite(IDynTexture*& rTexturePtr, [[maybe_unused]] float _fSpriteDistance, [[maybe_unused]] int nTexSize, [[maybe_unused]] float angle, [[maybe_unused]] float angle2, [[maybe_unused]] IStatObj* pStatObj, [[maybe_unused]] const float fBrightnessMultiplier, [[maybe_unused]] SRendParams& rParms)
{
rTexturePtr = NULL;
}
int CAtomShimRenderer::GenerateAlphaGlowTexture([[maybe_unused]] float k)
{
return 0;
}
bool CAtomShimRenderer::EF_SetLightHole([[maybe_unused]] Vec3 vPos, [[maybe_unused]] Vec3 vNormal, [[maybe_unused]] int idTex, [[maybe_unused]] float fScale, [[maybe_unused]] bool bAdditive)
{
return false;
}
bool CAtomShimRenderer::EF_PrecacheResource([[maybe_unused]] ITexture* pTP, [[maybe_unused]] float fDist, [[maybe_unused]] float fTimeToReady, [[maybe_unused]] int Flags, [[maybe_unused]] int nUpdateId, [[maybe_unused]] int nCounter)
{
return false;
}
bool CTexture::RenderEnvironmentCMHDR([[maybe_unused]] int size, [[maybe_unused]] Vec3& Pos, [[maybe_unused]] TArray<unsigned short>& vecData)
{
return true;
}
void CTexture::Apply([[maybe_unused]] int nTUnit, [[maybe_unused]] int nState, [[maybe_unused]] int nTMatSlot, [[maybe_unused]] int nSUnit, [[maybe_unused]] SResourceView::KeyType nResViewKey, [[maybe_unused]] EHWShaderClass eSHClass)
{
}
#if defined(TEXTURE_GET_SYSTEM_COPY_SUPPORT)
byte* CTexture::Convert([[maybe_unused]] const byte* pSrc, [[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] int nMips, [[maybe_unused]] ETEX_Format eTFSrc, [[maybe_unused]] ETEX_Format eTFDst, [[maybe_unused]] int& nOutSize, [[maybe_unused]] bool bLinear)
{
return NULL;
}
#endif
void CTexture::ReleaseDeviceTexture([[maybe_unused]] bool bKeepLastMips, [[maybe_unused]] bool bFromUnload)
{
}
bool CTexture::Clear([[maybe_unused]] const ColorF& color)
{
return true;
}
void CTexture::SetTexStates()
{
STexState s;
const bool noMipFiltering = m_nMips <= 1 && !(m_nFlags & FT_FORCE_MIPS);
s.m_nMinFilter = FILTER_LINEAR;
s.m_nMagFilter = FILTER_LINEAR;
s.m_nMipFilter = noMipFiltering ? FILTER_NONE : FILTER_LINEAR;
const int addrMode = (m_nFlags & FT_STATE_CLAMP || m_eTT == eTT_Cube) ? TADDR_CLAMP : TADDR_WRAP;
s.SetClampMode(addrMode, addrMode, addrMode);
m_nDefState = (uint16)CTexture::GetTexState(s);
}
bool CTexture::CreateDeviceTexture([[maybe_unused]] const byte* pData[6])
{
return true;
}
void* CTexture::CreateDeviceResourceView([[maybe_unused]] const SResourceView& rv)
{
return NULL;
}
ETEX_Format CTexture::ClosestFormatSupported(ETEX_Format eTFDst)
{
return eTFDst;
}
bool CTexture::SetFilterMode(int nFilter)
{
return s_sDefState.SetFilterMode(nFilter);
}
bool CTexture::CreateRenderTarget([[maybe_unused]] ETEX_Format eTF, [[maybe_unused]] const ColorF& cClear)
{
return true;
}
bool CTexture::SetClampingMode(int nAddressU, int nAddressV, int nAddressW)
{
return s_sDefState.SetClampMode(nAddressU, nAddressV, nAddressW);
}
void CTexture::UpdateTexStates()
{
}
void CTexture::GenerateCachedShadowMaps()
{
}
void CTexture::Readback([[maybe_unused]] AZ::u32 subresourceIndex, StagingHook callback)
{
}
//======================================================================================
void SEnvTexture::Release()
{
}
void SEnvTexture::RT_SetMatrix(void)
{
}
bool SDynTexture::RestoreRT([[maybe_unused]] int nRT, [[maybe_unused]] bool bPop)
{
return true;
}
bool SDynTexture::ClearRT()
{
return true;
}
bool SDynTexture2::ClearRT()
{
return true;
}
bool SDynTexture::SetRT([[maybe_unused]] int nRT, [[maybe_unused]] bool bPush, [[maybe_unused]] SDepthTexture* pDepthSurf, [[maybe_unused]] bool bScreenVP)
{
return true;
}
bool SDynTexture2::SetRT([[maybe_unused]] int nRT, [[maybe_unused]] bool bPush, [[maybe_unused]] SDepthTexture* pDepthSurf, [[maybe_unused]] bool bScreenVP)
{
return true;
}
bool SDynTexture2::RestoreRT([[maybe_unused]] int nRT, [[maybe_unused]] bool bPop)
{
return true;
}
bool SDynTexture2::SetRectStates()
{
return true;
}
//===============================================================================
void STexState::PostCreate()
{
}
void STexState::Destroy()
{
}
void STexState::Init(const STexState& src)
{
memcpy(this, &src, sizeof(src));
}
void STexState::SetComparisonFilter([[maybe_unused]] bool bEnable)
{
}
bool STexState::SetClampMode(int nAddressU, int nAddressV, int nAddressW)
{
m_nAddressU = nAddressU;
m_nAddressV = nAddressV;
m_nAddressW = nAddressW;
return true;
}
bool STexState::SetFilterMode([[maybe_unused]] int nFilter)
{
m_nMinFilter = 0;
m_nMagFilter = 0;
m_nMipFilter = 0;
return true;
}
void STexState::SetBorderColor(DWORD dwColor)
{
m_dwBorderColor = dwColor;
}
SDepthTexture::~SDepthTexture()
{
}
void SDepthTexture::Release([[maybe_unused]] bool bReleaseTex)
{
}
ETEX_Format CTexture::TexFormatFromDeviceFormat([[maybe_unused]] D3DFormat nFormat)
{
return eTF_Unknown;
}
bool CTexture::RT_CreateDeviceTexture([[maybe_unused]] const byte* pData[6])
{
return true;
}
void CTexture::UpdateTextureRegion([[maybe_unused]] const uint8_t* data, [[maybe_unused]] int X, [[maybe_unused]] int Y, [[maybe_unused]] int Z, [[maybe_unused]] int USize, [[maybe_unused]] int VSize, [[maybe_unused]] int ZSize, [[maybe_unused]] ETEX_Format eTFSrc)
{
}
void CTexture::RT_UpdateTextureRegion([[maybe_unused]] const uint8_t* data, [[maybe_unused]] int X, [[maybe_unused]] int Y, [[maybe_unused]] int Z, [[maybe_unused]] int USize, [[maybe_unused]] int VSize, [[maybe_unused]] int ZSize, [[maybe_unused]] ETEX_Format eTFSrc)
{
}
void CTexture::Unbind()
{
}
bool SDynTexture::RT_SetRT([[maybe_unused]] int nRT, [[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] bool bPush, [[maybe_unused]] bool bScreenVP)
{
return true;
}
bool SDynTexture::RT_Update([[maybe_unused]] int nNewWidth, [[maybe_unused]] int nNewHeight)
{
return true;
}
void CTexture::ReleaseSystemTargets(void) {}
void CTexture::ReleaseMiscTargets(void) {}
void CTexture::CreateSystemTargets(void) {}
//===============================================================================
namespace TextureHelpers
{
bool VerifyTexSuffix([[maybe_unused]] EEfResTextures texSlot, [[maybe_unused]] const char* texPath)
{
return false;
}
bool VerifyTexSuffix([[maybe_unused]] EEfResTextures texSlot, [[maybe_unused]] const string& texPath)
{
return false;
}
const char* LookupTexSuffix([[maybe_unused]] EEfResTextures texSlot)
{
return nullptr;
}
int8 LookupTexPriority([[maybe_unused]] EEfResTextures texSlot)
{
return 0;
}
CTexture* LookupTexDefault([[maybe_unused]] EEfResTextures texSlot)
{
return nullptr;
}
CTexture* LookupTexBlank([[maybe_unused]] EEfResTextures texSlot)
{
return nullptr;
}
}
bool CTexture::Clear() { return true; }
uint32 CDeviceTexture::TextureDataSize([[maybe_unused]] uint32 nWidth, [[maybe_unused]] uint32 nHeight, [[maybe_unused]] uint32 nDepth, [[maybe_unused]] uint32 nMips, [[maybe_unused]] uint32 nSlices, [[maybe_unused]] const ETEX_Format eTF)
{
return 0;
}
AtomShimTexture::~AtomShimTexture()
{
if(AZ::Data::AssetBus::Handler::BusIsConnected())
{
AZ::Data::AssetBus::Handler::BusDisconnect();
}
}
// Hot-reloading support for the AtomShimTexture.
// This only supports OnAssetReady, not OnAssetReloaded, because it is only intended to handle the case where a texture has not been processed or does not exist.
// The RPI::StreamingImage will handle re-loading if the file changes after it has been loaded initially
void AtomShimTexture::QueueForHotReload(const AZ::Data::AssetId& assetId)
{
AZ::Data::AssetBus::Handler::BusConnect(assetId);
// Lyshine may try to load a texture before the ImageSystem wasn't ready
if (AZ::RPI::ImageSystemInterface::Get())
{
CreateFromImage(AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::Magenta));
}
}
void AtomShimTexture::OnAssetReady(AZ::Data::Asset<AZ::Data::AssetData> asset)
{
AZ::Data::AssetBus::Handler::BusDisconnect(asset.GetId());
AZ::Data::Asset<AZ::RPI::StreamingImageAsset> imageAsset = asset;
AZ_Assert(imageAsset, "This should be a streaming image asset");
CreateFromStreamingImageAsset(imageAsset);
}
void AtomShimTexture::CreateFromStreamingImageAsset(const AZ::Data::Asset<AZ::RPI::StreamingImageAsset>& imageAsset)
{
AZ::Data::Instance<AZ::RPI::Image> image = AZ::RPI::StreamingImage::FindOrCreate(imageAsset);
if (!image)
{
AZ_Error("CAtomShimRenderer", false, "Failed to find or create an image instance from image asset '%s'", imageAsset.GetHint().c_str());
return;
}
CreateFromImage(image);
}
void AtomShimTexture::CreateFromImage(const AZ::Data::Instance<AZ::RPI::Image>& image)
{
AZ::RHI::Format rhiViewFormat = AZ::RHI::Format::Unknown;
AZ::RHI::ImageViewDescriptor viewDesc = AZ::RHI::ImageViewDescriptor(rhiViewFormat);
AZ::RHI::Image* rhiImage = image->GetRHIImage();
AZ::RHI::Ptr<AZ::RHI::ImageView> imageView = rhiImage->GetImageView(viewDesc);
if(!imageView.get())
{
AZ_Assert(false, "Failed to acquire an image view");
return;
}
m_instance = image;
m_image = rhiImage;
m_imageView = imageView;
SetWidth(rhiImage->GetDescriptor().m_size.m_width);
SetHeight(rhiImage->GetDescriptor().m_size.m_height);
}
@@ -1,98 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#include "CryRenderOther_precompiled.h"
#include "AtomShim_Renderer.h"
#include "../Common/Textures/TextureStreamPool.h"
//===============================================================================
bool STexPoolItem::IsStillUsedByGPU([[maybe_unused]] uint32 nCurTick)
{
return false;
}
STexPoolItem::~STexPoolItem()
{
}
void CTexture::InitStreamingDev()
{
}
void CTexture::StreamExpandMip([[maybe_unused]] const void* pRawData, [[maybe_unused]] int nMip, [[maybe_unused]] int nBaseMipOffset, [[maybe_unused]] int nSideDelta)
{
}
void CTexture::StreamCopyMipsTexToTex([[maybe_unused]] STexPoolItem* pSrcItem, [[maybe_unused]] int nMipSrc, [[maybe_unused]] STexPoolItem* pDestItem, [[maybe_unused]] int nMipDest, [[maybe_unused]] int nNumMips)
{
}
bool CTexture::StreamPrepare_Platform()
{
return true;
}
int CTexture::StreamTrim([[maybe_unused]] int nToMip)
{
return 0;
}
// Just remove item from the texture object and keep Item in Pool list for future use
// This function doesn't release API texture
void CTexture::StreamRemoveFromPool()
{
}
void CTexture::StreamCopyMipsTexToMem([[maybe_unused]] int nStartMip, [[maybe_unused]] int nEndMip, [[maybe_unused]] bool bToDevice, [[maybe_unused]] STexPoolItem* pNewPoolItem)
{
}
STexPoolItem* CTexture::StreamGetPoolItem([[maybe_unused]] int nStartMip, [[maybe_unused]] int nMips, [[maybe_unused]] bool bShouldBeCreated, [[maybe_unused]] bool bCreateFromMipData, [[maybe_unused]] bool bCanCreate, [[maybe_unused]] bool bForStreamOut)
{
return NULL;
}
void CTexture::StreamAssignPoolItem([[maybe_unused]] STexPoolItem* pItem, [[maybe_unused]] int nMinMip)
{
}
CTextureStreamPoolMgr::CTextureStreamPoolMgr()
{
}
CTextureStreamPoolMgr::~CTextureStreamPoolMgr()
{
}
void CTextureStreamPoolMgr::Flush()
{
}
STexPoolItem* CTextureStreamPoolMgr::GetPoolItem([[maybe_unused]] int nWidth, [[maybe_unused]] int nHeight, [[maybe_unused]] int nArraySize, [[maybe_unused]] int nMips, [[maybe_unused]] ETEX_Format eTF, [[maybe_unused]] bool bIsSRGB, [[maybe_unused]] ETEX_Type eTT, [[maybe_unused]] bool bShouldBeCreated, [[maybe_unused]] const char* sName, [[maybe_unused]] STextureInfo* pTI, [[maybe_unused]] bool bCanCreate, [[maybe_unused]] bool bWaitForIdle)
{
return NULL;
}
void CTextureStreamPoolMgr::ReleaseItem([[maybe_unused]] STexPoolItem* pItem)
{
}
void CTextureStreamPoolMgr::GarbageCollect([[maybe_unused]] size_t* nCurTexPoolSize, [[maybe_unused]] size_t nLowerPoolLimit, [[maybe_unused]] int nMaxItemsToFree)
{
}
void CTextureStreamPoolMgr::GetMemoryUsage([[maybe_unused]] ICrySizer* pSizer)
{
}
@@ -1,45 +0,0 @@
#
# 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.
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # For PAL_TRAIT_ATOM_CRYRENDEROTHER_SUPPORTED
if(NOT PAL_TRAIT_ATOM_CRYRENDEROTHER_SUPPORTED)
return()
endif()
ly_add_target(
NAME CryRenderOther ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
NAMESPACE Legacy
FILES_CMAKE
atom_shim_renderer_files.cmake
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
PLATFORM_INCLUDE_FILES
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
INCLUDE_DIRECTORIES
PRIVATE
.
PCH
BUILD_DEPENDENCIES
PUBLIC
AZ::AzCore
Legacy::CryCommon
Legacy::CryRender.Headers
Legacy::CryRenderNULL.Static
AZ::AtomCore
Gem::Atom_RHI.Reflect
Gem::Atom_RPI.Public
)
# Atom_AtomBridge.Static is the one that drives loading CryRenderOther, however, CryRenderOther
# is not enabled in every platform, so we define the dependency here
ly_add_dependencies(Atom_AtomBridge.Static CryRenderOther)
@@ -1,111 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Russian resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
#ifdef _WIN32
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
#pragma code_page(1251)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // Russian resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// German (Germany) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000904b0"
BEGIN
VALUE "CompanyName", "Amazon.com, Inc."
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "LegalCopyright", "Portions of this file Copyright (c) Amazon.com, Inc. or its affiliates. All Rights Reserved. Original file Copyright (c) Crytek GMBH. Used under license by Amazon.com, Inc. and its affiliates."
VALUE "ProductName", "Lumberyard"
VALUE "ProductVersion", "1, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x9, 1200
END
END
#endif // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
@@ -1,49 +0,0 @@
/*
* 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.
*
*/
#pragma once
#include <Common/RendererDefs.h>
#include <Cry_Math.h>
#include <Cry_Geo.h>
#include <StlUtils.h>
#include "Common/DevBuffer.h"
#include "XRenderD3D9/DeviceManager/DeviceManager.h"
#include <VertexFormats.h>
#include "Common/CommonRender.h"
#include <IRenderAuxGeom.h>
#include "Common/Shaders/ShaderComponents.h"
#include "Common/Shaders/Shader.h"
#include "Common/Shaders/CShader.h"
#include "Common/RenderMesh.h"
#include "Common/RenderPipeline.h"
#include "Common/RenderThread.h"
#include "Common/Renderer.h"
#include "Common/Textures/Texture.h"
#include "Common/OcclQuery.h"
#include "Common/PostProcess/PostProcess.h"
// All handled render elements (except common ones included in "RendElement.h")
#include "Common/RendElements/CREBeam.h"
#include "Common/RendElements/CREClientPoly.h"
#include "Common/RendElements/CRELensOptics.h"
#include "Common/RendElements/CREHDRProcess.h"
#include "Common/RendElements/CRECloud.h"
#include "Common/RendElements/CREDeferredShading.h"
#include "Common/RendElements/CREMeshImpl.h"
@@ -1,12 +0,0 @@
#
# 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(PAL_TRAIT_ATOM_CRYRENDEROTHER_SUPPORTED TRUE)
@@ -1,11 +0,0 @@
#
# 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,14 +0,0 @@
#
# 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(FILES
../Common/Unimplemented/AtomShim_Renderer_Unimplemented.cpp
)
@@ -1,22 +0,0 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or
* a third party where indicated.
*
* 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 "CryRenderOther_precompiled.h"
namespace Platform
{
WIN_HWND GetNativeWindowHandle()
{
return NULL;
}
}
@@ -1,12 +0,0 @@
#
# 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(PAL_TRAIT_ATOM_CRYRENDEROTHER_SUPPORTED TRUE)
@@ -1,11 +0,0 @@
#
# 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,14 +0,0 @@
#
# 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(FILES
../Common/Unimplemented/AtomShim_Renderer_Unimplemented.cpp
)
@@ -1,31 +0,0 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or
* a third party where indicated.
*
* 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 "CryRenderOther_precompiled.h"
#import <AppKit/AppKit.h>
bool UIDeviceIsTablet()
{
return false;
}
bool UIKitGetPrimaryPhysicalDisplayDimensions(int& o_widthPixels, int& o_heightPixels)
{
NSScreen* nativeScreen = [NSScreen mainScreen];
CGRect screenBounds = [nativeScreen frame];
CGFloat screenScale = [nativeScreen backingScaleFactor];
o_widthPixels = static_cast<int>(screenBounds.size.width * screenScale);
o_heightPixels = static_cast<int>(screenBounds.size.height * screenScale);
return true;
}
@@ -1,12 +0,0 @@
#
# 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(PAL_TRAIT_ATOM_CRYRENDEROTHER_SUPPORTED TRUE)
@@ -1,15 +0,0 @@
#
# 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(FILES
../Common/Unimplemented/AtomShim_Renderer_Unimplemented.cpp
AtomShim_Renderer_Mac.cpp
)
@@ -1,12 +0,0 @@
#
# 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(PAL_TRAIT_ATOM_CRYRENDEROTHER_SUPPORTED TRUE)
@@ -1,14 +0,0 @@
#
# 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
)
@@ -1,14 +0,0 @@
#
# 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(FILES
AtomShim_Renderer_Windows.cpp
)
@@ -1,85 +0,0 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or
* a third party where indicated.
*
* 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 "CryRenderOther_precompiled.h"
#import <UIKit/UIKit.h>
using NativeScreenType = UIScreen;
using NativeWindowType = UIWindow;
bool UIDeviceIsTablet()
{
if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
{
return true;
}
return false;
}
bool UIKitGetPrimaryPhysicalDisplayDimensions(int& o_widthPixels, int& o_heightPixels)
{
UIScreen* nativeScreen = [UIScreen mainScreen];
CGRect screenBounds = [nativeScreen bounds];
CGFloat screenScale = [nativeScreen scale];
o_widthPixels = static_cast<int>(screenBounds.size.width * screenScale);
o_heightPixels = static_cast<int>(screenBounds.size.height * screenScale);
const bool isScreenLandscape = o_widthPixels > o_heightPixels;
UIInterfaceOrientation uiOrientation = UIInterfaceOrientationUnknown;
#if defined(__IPHONE_13_0) || defined(__TVOS_13_0)
if(@available(iOS 13.0, tvOS 13.0, *))
{
UIWindow* foundWindow = nil;
//Find the key window
NSArray* windows = [[UIApplication sharedApplication] windows];
for (UIWindow* window in windows)
{
if (window.isKeyWindow)
{
foundWindow = window;
break;
}
}
//Check if the key window is found
if(foundWindow)
{
uiOrientation = foundWindow.windowScene.interfaceOrientation;
}
else
{
//If no key window is found create a temporary window in order to extract the orientation
//This can happen as this function gets called before the renderer is initialized
CGRect screenBounds = [[UIScreen mainScreen] bounds];
UIWindow* tempWindow = [[UIWindow alloc] initWithFrame: screenBounds];
uiOrientation = tempWindow.windowScene.interfaceOrientation;
[tempWindow release];
}
}
#else
uiOrientation = UIApplication.sharedApplication.statusBarOrientation;
#endif
const bool isInterfaceLandscape = UIInterfaceOrientationIsLandscape(uiOrientation);
if (isScreenLandscape != isInterfaceLandscape)
{
const int width = o_widthPixels;
o_widthPixels = o_heightPixels;
o_heightPixels = width;
}
return true;
}
@@ -1,12 +0,0 @@
#
# 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(PAL_TRAIT_ATOM_CRYRENDEROTHER_SUPPORTED TRUE)
@@ -1,15 +0,0 @@
#
# 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_COMPILE_OPTIONS
PRIVATE
-xobjective-c++
)
@@ -1,15 +0,0 @@
#
# 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(FILES
../Common/Unimplemented/AtomShim_Renderer_Unimplemented.cpp
AtomShim_Renderer_iOS.cpp
)
@@ -1,29 +0,0 @@
#
# 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(FILES
AtomShim_DevBuffer.cpp
AtomShim_PostProcess.cpp
AtomShim_Renderer.cpp
AtomShim_RendPipeline.cpp
AtomShim_RERender.cpp
AtomShim_Shaders.cpp
AtomShim_Shadows.cpp
AtomShim_System.cpp
AtomShim_Textures.cpp
AtomShim_TexturesStreaming.cpp
AtomShim_RenderAuxGeom.cpp
AtomShim_Renderer.h
AtomShim_RenderAuxGeom.h
resource.h
AtomShim_CRELensOptics.cpp
PCH/CryRenderOther_precompiled.h
)
@@ -1,25 +0,0 @@
/*
* 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.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
#define VS_VERSION_INFO 1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
@@ -653,8 +653,8 @@ namespace EditorPythonBindings
}
else
{
// something when wrong with executing the test script
AZ::Debug::Trace::Terminate(1);
// something went wrong with executing the test script
AZ::Debug::Trace::Terminate(0xF);
}
}
@@ -88,33 +88,33 @@ namespace PhysX
editContext->Class<EditorProxyShapeConfig>(
"EditorProxyShapeConfig", "PhysX Base shape collider")
->DataElement(AZ::Edit::UIHandlers::ComboBox, &EditorProxyShapeConfig::m_shapeType, "Shape", "The shape of the collider")
->EnumAttribute(Physics::ShapeType::Sphere, "Sphere")
->EnumAttribute(Physics::ShapeType::Box, "Box")
->EnumAttribute(Physics::ShapeType::Capsule, "Capsule")
->EnumAttribute(Physics::ShapeType::PhysicsAsset, "PhysicsAsset")
->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree)
// note: we do not want the user to be able to change shape types while in ComponentMode (there will
// potentially be different ComponentModes for different shape types)
->Attribute(AZ::Edit::Attributes::ReadOnly, &AzToolsFramework::ComponentModeFramework::InComponentMode)
->EnumAttribute(Physics::ShapeType::Sphere, "Sphere")
->EnumAttribute(Physics::ShapeType::Box, "Box")
->EnumAttribute(Physics::ShapeType::Capsule, "Capsule")
->EnumAttribute(Physics::ShapeType::PhysicsAsset, "PhysicsAsset")
->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree)
// note: we do not want the user to be able to change shape types while in ComponentMode (there will
// potentially be different ComponentModes for different shape types)
->Attribute(AZ::Edit::Attributes::ReadOnly, &AzToolsFramework::ComponentModeFramework::InComponentMode)
->DataElement(AZ::Edit::UIHandlers::Default, &EditorProxyShapeConfig::m_sphere, "Sphere", "Configuration of sphere shape")
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::IsSphereConfig)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::IsSphereConfig)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->DataElement(AZ::Edit::UIHandlers::Default, &EditorProxyShapeConfig::m_box, "Box", "Configuration of box shape")
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::IsBoxConfig)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::IsBoxConfig)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->DataElement(AZ::Edit::UIHandlers::Default, &EditorProxyShapeConfig::m_capsule, "Capsule", "Configuration of capsule shape")
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::IsCapsuleConfig)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::IsCapsuleConfig)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->DataElement(AZ::Edit::UIHandlers::Default, &EditorProxyShapeConfig::m_physicsAsset, "Asset", "Configuration of asset shape")
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::IsAssetConfig)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::IsAssetConfig)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->DataElement(AZ::Edit::UIHandlers::Default, &EditorProxyShapeConfig::m_subdivisionLevel, "Subdivision level",
"The level of subdivision if a primitive shape is replaced with a convex mesh due to scaling")
->Attribute(AZ::Edit::Attributes::Min, Utils::MinCapsuleSubdivisionLevel)
->Attribute(AZ::Edit::Attributes::Max, Utils::MaxCapsuleSubdivisionLevel)
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::ShowingSubdivisionLevel)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
->Attribute(AZ::Edit::Attributes::Min, Utils::MinCapsuleSubdivisionLevel)
->Attribute(AZ::Edit::Attributes::Max, Utils::MaxCapsuleSubdivisionLevel)
->Attribute(AZ::Edit::Attributes::Visibility, &EditorProxyShapeConfig::ShowingSubdivisionLevel)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorProxyShapeConfig::OnConfigurationChanged)
;
}
}
@@ -80,6 +80,13 @@ namespace ScriptCanvasEditor
QObject::connect(ui->slotName, &QLineEdit::returnPressed, this, &SlotTypeSelectorWidget::OnReturnPressed);
QObject::connect(ui->slotName, &QLineEdit::textChanged, this, &SlotTypeSelectorWidget::OnNameChanged);
QObject::connect(ui->variablePalette, &QTableView::clicked, this, [this]() { ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); });
QObject::connect(ui->variablePalette, &VariablePaletteTableView::CreateNamedVariable, this, [this](const AZStd::string& variableName, const ScriptCanvas::Data::Type& variableType)
{
// only emitted on container types
OnCreateVariable(variableType);
OnNameChanged(variableName.c_str());
accept();
});
// Tell the widget to auto create our context menu, for now
setContextMenuPolicy(Qt::ActionsContextMenu);
@@ -127,7 +127,7 @@ namespace ScriptCanvas
return false;
}
if (!(datum == rhs.datum))
if (!(datum.GetType() == rhs.datum.GetType()))
{
return false;
}
@@ -0,0 +1,567 @@
<ObjectStream version="3">
<Class name="ScriptCanvasData" version="4" type="{1072E894-0C67-4091-8B64-F7DB324AD13C}">
<Class name="AZStd::unique_ptr" field="m_scriptCanvas" type="{8FFB6D85-994F-5262-BA1C-D0082A7F65C5}">
<Class name="AZ::Entity" field="element" version="2" type="{75651658-8663-478D-9090-2432DFCAFA44}">
<Class name="EntityId" field="Id" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23932320617243" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="AZStd::string" field="Name" value="LY_SC_UnitTest_FunctionContainerInputTest" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::vector" field="Components" type="{13D58FF9-1088-5C69-9A1F-C2A144B57B78}">
<Class name="Graph" field="element" version="8" type="{4D755CA9-AB92-462C-B24F-0B3376F19967}">
<Class name="Graph" field="BaseClass1" version="17" type="{C3267D77-EEDC-490E-9E42-F1D1F473E184}">
<Class name="AZ::Component" field="BaseClass1" type="{EDFCB2CF-F75D-43BE-B26B-F35821B29247}">
<Class name="AZ::u64" field="Id" value="3038816695528949663" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="GraphData" field="m_graphData" version="4" type="{ADCB5EB5-8D3F-42ED-8F65-EAB58A82C381}">
<Class name="AZStd::unordered_set" field="m_nodes" type="{27BF7BD3-6E17-5619-9363-3FC3D9A5369D}">
<Class name="AZ::Entity" field="element" version="2" type="{75651658-8663-478D-9090-2432DFCAFA44}">
<Class name="EntityId" field="Id" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23936615584539" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="AZStd::string" field="Name" value="SC-Node(Start)" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::vector" field="Components" type="{13D58FF9-1088-5C69-9A1F-C2A144B57B78}">
<Class name="Start" field="element" version="2" type="{F200B22A-5903-483A-BF63-5241BC03632B}">
<Class name="Node" field="BaseClass1" version="14" type="{52B454AE-FA7E-4FE9-87D3-A1CAB235C691}">
<Class name="AZ::Component" field="BaseClass1" type="{EDFCB2CF-F75D-43BE-B26B-F35821B29247}">
<Class name="AZ::u64" field="Id" value="5997007499607139380" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="AZStd::list" field="Slots" type="{E01B3091-9B44-571A-A87B-7D0E2768D774}">
<Class name="Slot" field="element" version="21" type="{FBFE0F02-4C26-475F-A28B-18D3A533C13C}">
<Class name="bool" field="IsOverload" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="isVisibile" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="SlotId" field="id" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{29A7EA49-1E9F-4EA0-9FEB-182CA4513385}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="int" field="DynamicTypeOverride" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AZStd::vector" field="contracts" type="{C87136AF-3259-590C-9519-D1C4C75F1C86}">
<Class name="AZStd::unique_ptr" field="element" type="{75F9EC0D-D8D6-5410-BD79-960E22076B03}">
<Class name="SlotTypeContract" field="element" type="{084B4F2A-AB34-4931-9269-E3614FC1CDFA}">
<Class name="Contract" field="BaseClass1" type="{93846E60-BD7E-438A-B970-5C4AA591CF93}"/>
</Class>
</Class>
</Class>
<Class name="AZStd::string" field="slotName" value="Out" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="toolTip" value="Signaled when the entity that owns this graph is fully activated." type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="Type" field="DisplayDataType" version="2" type="{0EADF8F5-8AB8-42E9-9C50-F5C78255C817}">
<Class name="unsigned int" field="m_type" value="2" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZ::Uuid" field="m_azType" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="Crc32" field="DisplayGroup" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="SlotDescriptor" field="Descriptor" version="1" type="{FBF1C3A7-AA74-420F-BBE4-29F78D6EA262}">
<Class name="int" field="ConnectionType" value="2" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="int" field="SlotType" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
<Class name="bool" field="IsLatent" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="Crc32" field="DynamicGroup" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="int" field="DataType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="bool" field="IsReference" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="VariableId" field="VariableReference" type="{CA57A57B-E510-4C09-B952-1F43742166AE}">
<Class name="AZ::Uuid" field="m_id" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="bool" field="IsUserAdded" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</Class>
<Class name="AZStd::list" field="Datums" type="{36259B04-FAAB-5E8A-B7BF-A5E2EA5A9B3A}"/>
<Class name="int" field="NodeDisabledFlag" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
</Class>
</Class>
<Class name="bool" field="IsDependencyReady" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="IsRuntimeActive" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
<Class name="AZ::Entity" field="element" version="2" type="{75651658-8663-478D-9090-2432DFCAFA44}">
<Class name="EntityId" field="Id" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23940910551835" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="AZStd::string" field="Name" value="FunctionCallNode" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::vector" field="Components" type="{13D58FF9-1088-5C69-9A1F-C2A144B57B78}">
<Class name="FunctionCallNode" field="element" version="6" type="{ECFDD30E-A16D-4435-97B7-B2A4DF3C543A}">
<Class name="Node" field="BaseClass1" version="14" type="{52B454AE-FA7E-4FE9-87D3-A1CAB235C691}">
<Class name="AZ::Component" field="BaseClass1" type="{EDFCB2CF-F75D-43BE-B26B-F35821B29247}">
<Class name="AZ::u64" field="Id" value="8507359226232004165" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="AZStd::list" field="Slots" type="{E01B3091-9B44-571A-A87B-7D0E2768D774}">
<Class name="Slot" field="element" version="21" type="{FBFE0F02-4C26-475F-A28B-18D3A533C13C}">
<Class name="bool" field="IsOverload" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="isVisibile" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="SlotId" field="id" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{D64E21F2-DB93-4083-9097-175C030CE23A}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="int" field="DynamicTypeOverride" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AZStd::vector" field="contracts" type="{C87136AF-3259-590C-9519-D1C4C75F1C86}">
<Class name="AZStd::unique_ptr" field="element" type="{75F9EC0D-D8D6-5410-BD79-960E22076B03}">
<Class name="SlotTypeContract" field="element" type="{084B4F2A-AB34-4931-9269-E3614FC1CDFA}">
<Class name="Contract" field="BaseClass1" type="{93846E60-BD7E-438A-B970-5C4AA591CF93}"/>
</Class>
</Class>
</Class>
<Class name="AZStd::string" field="slotName" value="New Input 1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="toolTip" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="Type" field="DisplayDataType" version="2" type="{0EADF8F5-8AB8-42E9-9C50-F5C78255C817}">
<Class name="unsigned int" field="m_type" value="2" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZ::Uuid" field="m_azType" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="Crc32" field="DisplayGroup" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="756956357" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="SlotDescriptor" field="Descriptor" version="1" type="{FBF1C3A7-AA74-420F-BBE4-29F78D6EA262}">
<Class name="int" field="ConnectionType" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="int" field="SlotType" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
<Class name="bool" field="IsLatent" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="Crc32" field="DynamicGroup" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="int" field="DataType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="bool" field="IsReference" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="VariableId" field="VariableReference" type="{CA57A57B-E510-4C09-B952-1F43742166AE}">
<Class name="AZ::Uuid" field="m_id" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="bool" field="IsUserAdded" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
<Class name="Slot" field="element" version="21" type="{FBFE0F02-4C26-475F-A28B-18D3A533C13C}">
<Class name="bool" field="IsOverload" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="isVisibile" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="SlotId" field="id" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{8AD9C45A-2C79-412C-B5A6-7345D5C874CE}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="int" field="DynamicTypeOverride" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AZStd::vector" field="contracts" type="{C87136AF-3259-590C-9519-D1C4C75F1C86}">
<Class name="AZStd::unique_ptr" field="element" type="{75F9EC0D-D8D6-5410-BD79-960E22076B03}">
<Class name="SlotTypeContract" field="element" type="{084B4F2A-AB34-4931-9269-E3614FC1CDFA}">
<Class name="Contract" field="BaseClass1" type="{93846E60-BD7E-438A-B970-5C4AA591CF93}"/>
</Class>
</Class>
<Class name="AZStd::unique_ptr" field="element" type="{75F9EC0D-D8D6-5410-BD79-960E22076B03}">
<Class name="ExclusivePureDataContract" field="element" type="{E48A0B26-B6B7-4AF3-9341-9E5C5C1F0DE8}">
<Class name="Contract" field="BaseClass1" type="{93846E60-BD7E-438A-B970-5C4AA591CF93}"/>
</Class>
</Class>
</Class>
<Class name="AZStd::string" field="slotName" value="TwoStrings" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="toolTip" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="Type" field="DisplayDataType" version="2" type="{0EADF8F5-8AB8-42E9-9C50-F5C78255C817}">
<Class name="unsigned int" field="m_type" value="2" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZ::Uuid" field="m_azType" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="Crc32" field="DisplayGroup" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="756956357" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="SlotDescriptor" field="Descriptor" version="1" type="{FBF1C3A7-AA74-420F-BBE4-29F78D6EA262}">
<Class name="int" field="ConnectionType" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="int" field="SlotType" value="2" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
<Class name="bool" field="IsLatent" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="Crc32" field="DynamicGroup" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="int" field="DataType" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="bool" field="IsReference" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="VariableId" field="VariableReference" type="{CA57A57B-E510-4C09-B952-1F43742166AE}">
<Class name="AZ::Uuid" field="m_id" value="{613FF258-EE61-4B4B-A859-71529C793A86}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="bool" field="IsUserAdded" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
<Class name="Slot" field="element" version="21" type="{FBFE0F02-4C26-475F-A28B-18D3A533C13C}">
<Class name="bool" field="IsOverload" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="isVisibile" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="SlotId" field="id" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{573AA2ED-7A0B-4AED-9515-975C09034AF3}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="int" field="DynamicTypeOverride" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AZStd::vector" field="contracts" type="{C87136AF-3259-590C-9519-D1C4C75F1C86}">
<Class name="AZStd::unique_ptr" field="element" type="{75F9EC0D-D8D6-5410-BD79-960E22076B03}">
<Class name="SlotTypeContract" field="element" type="{084B4F2A-AB34-4931-9269-E3614FC1CDFA}">
<Class name="Contract" field="BaseClass1" type="{93846E60-BD7E-438A-B970-5C4AA591CF93}"/>
</Class>
</Class>
</Class>
<Class name="AZStd::string" field="slotName" value="New Input 1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="toolTip" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="Type" field="DisplayDataType" version="2" type="{0EADF8F5-8AB8-42E9-9C50-F5C78255C817}">
<Class name="unsigned int" field="m_type" value="2" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZ::Uuid" field="m_azType" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="Crc32" field="DisplayGroup" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="756956357" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="SlotDescriptor" field="Descriptor" version="1" type="{FBF1C3A7-AA74-420F-BBE4-29F78D6EA262}">
<Class name="int" field="ConnectionType" value="2" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="int" field="SlotType" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
<Class name="bool" field="IsLatent" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="Crc32" field="DynamicGroup" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="int" field="DataType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="bool" field="IsReference" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="VariableId" field="VariableReference" type="{CA57A57B-E510-4C09-B952-1F43742166AE}">
<Class name="AZ::Uuid" field="m_id" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="bool" field="IsUserAdded" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</Class>
<Class name="AZStd::list" field="Datums" type="{36259B04-FAAB-5E8A-B7BF-A5E2EA5A9B3A}">
<Class name="Datum" field="element" version="6" type="{8B836FC0-98A8-4A81-8651-35C7CA125451}">
<Class name="bool" field="m_isUntypedStorage" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="Type" field="m_type" version="2" type="{0EADF8F5-8AB8-42E9-9C50-F5C78255C817}">
<Class name="unsigned int" field="m_type" value="4" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZ::Uuid" field="m_azType" value="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="int" field="m_originality" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="any" field="m_datumStorage" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::intrusive_ptr" field="m_data" type="{2349F1C2-6C74-54C9-8B7E-CBE24DDE8850}">
<Class name="BehaviorContextObject" field="element" type="{B735214D-5182-4536-B748-61EC83C1F007}">
<Class name="unsigned int" field="m_flags" value="2" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="any" field="m_object" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::vector" field="m_data" type="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}"/>
</Class>
</Class>
</Class>
</Class>
<Class name="AZStd::string" field="m_datumLabel" value="TwoStrings" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="int" field="NodeDisabledFlag" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
<Class name="AZ::Uuid" field="m_sourceId" value="{9EB1BA2F-A076-4E98-8843-3298249B8B16}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="Asset" field="m_asset" value="id={BE2463C7-E9F3-5545-A44C-0548D2AF7C7F}:dfe6dc72,type={E22967AC-7673-4778-9125-AF49D82CAF9F},hint={scriptcanvas/unittests/ly_sc_unittest_functioncontainerinputfunction.scriptcanvas_fn_compiled},loadBehavior=2" version="2" type="{77A19D40-8731-4D3C-9041-1B43047366A4}"/>
<Class name="Map" field="m_slotExecutionMap" version="1" type="{BAA81EAF-E35A-4F19-B73A-699B91DB113C}">
<Class name="AZStd::vector" field="ins" type="{733E7AAD-19AD-5FAE-A634-B3B6EB0D3ED3}">
<Class name="In" field="element" version="1" type="{4AAAEB0B-6367-46E5-B05D-E76EF884E16F}">
<Class name="SlotId" field="_slotId" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{D64E21F2-DB93-4083-9097-175C030CE23A}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="AZStd::vector" field="_inputs" type="{ED971363-ECC9-5B7D-A9E7-C70BEF283BC0}">
<Class name="Input" field="element" type="{4E52A04D-C9FC-477F-8065-35F96A972CD6}">
<Class name="SlotId" field="_slotId" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{8AD9C45A-2C79-412C-B5A6-7345D5C874CE}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="VariableId" field="_interfaceSourceId" type="{CA57A57B-E510-4C09-B952-1F43742166AE}">
<Class name="AZ::Uuid" field="m_id" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
</Class>
<Class name="AZStd::vector" field="_outs" type="{5970B601-529F-5E37-99F2-942F34360771}">
<Class name="Out" field="element" version="1" type="{DD3D2547-868C-40DF-A37C-F60BE06FFFBA}">
<Class name="SlotId" field="_slotId" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{573AA2ED-7A0B-4AED-9515-975C09034AF3}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="AZStd::string" field="_name" value="New Input 1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::vector" field="_outputs" type="{275A1212-6B40-5045-BA6D-39FF976D6634}"/>
<Class name="Return" field="_returnValues" version="1" type="{8CD09346-BF99-4B34-91EA-C553549F7639}">
<Class name="AZStd::vector" field="_values" type="{ED971363-ECC9-5B7D-A9E7-C70BEF283BC0}"/>
</Class>
<Class name="AZ::Uuid" field="_interfaceSourceId" value="{9EB1BA2F-A076-4E98-E720-CF3AE720CF3A}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="AZStd::string" field="_parsedName" value="NewInput1_scvm" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZ::Uuid" field="_interfaceSourceId" value="{9EB1BA2F-A076-4E98-8843-3298249B8B16}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="AZStd::vector" field="latents" type="{5970B601-529F-5E37-99F2-942F34360771}"/>
</Class>
<Class name="SubgraphInterface" field="m_slotExecutionMapSourceInterface" version="7" type="{52B27A11-8294-4A6F-BFCF-6C1582649DB2}">
<Class name="bool" field="areAllChildrenPure" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="hasOnGraphStart" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="isActiveDefaultObject" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="AZStd::vector" field="ins" type="{16DA1AFC-705E-559D-8CF0-2E939187BB4B}">
<Class name="In" field="element" version="1" type="{DFDA32F7-41D2-45BB-8ADF-876679053836}">
<Class name="AZStd::string" field="displayName" value="New Input 1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="parsedName" value="NewInput1_scvm" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::vector" field="inputs" type="{A7E036E1-781C-5FF3-B5E2-5F7CCA518624}">
<Class name="Input" field="element" type="{627448C3-D018-422E-B133-A1169BB44306}">
<Class name="AZStd::string" field="displayName" value="TwoStrings" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="parsedName" value="TwoStrings_scvm" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="Datum" field="datum" version="6" type="{8B836FC0-98A8-4A81-8651-35C7CA125451}">
<Class name="bool" field="m_isUntypedStorage" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="Type" field="m_type" version="2" type="{0EADF8F5-8AB8-42E9-9C50-F5C78255C817}">
<Class name="unsigned int" field="m_type" value="4" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZ::Uuid" field="m_azType" value="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="int" field="m_originality" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="any" field="m_datumStorage" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::intrusive_ptr" field="m_data" type="{2349F1C2-6C74-54C9-8B7E-CBE24DDE8850}">
<Class name="BehaviorContextObject" field="element" type="{B735214D-5182-4536-B748-61EC83C1F007}">
<Class name="unsigned int" field="m_flags" value="2" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="any" field="m_object" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::vector" field="m_data" type="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}"/>
</Class>
</Class>
</Class>
</Class>
<Class name="AZStd::string" field="m_datumLabel" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="VariableId" field="sourceID" type="{CA57A57B-E510-4C09-B952-1F43742166AE}">
<Class name="AZ::Uuid" field="m_id" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
</Class>
<Class name="AZStd::vector" field="outs" type="{CA41DC3D-DBB4-5EA5-A9AA-91EC2056766E}">
<Class name="Out" field="element" version="1" type="{6175D897-C06D-48B5-8775-388B232D429D}">
<Class name="AZStd::string" field="displayName" value="New Input 1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="parsedName" value="NewInput1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::vector" field="outputs" type="{5457916A-40A0-5DF0-9742-1DEECFEE5C48}"/>
<Class name="AZStd::vector" field="returnValues" type="{A7E036E1-781C-5FF3-B5E2-5F7CCA518624}"/>
<Class name="AZ::Uuid" field="sourceID" value="{9EB1BA2F-A076-4E98-E720-CF3AE720CF3A}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="bool" field="isPure" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="AZ::Uuid" field="sourceID" value="{9EB1BA2F-A076-4E98-8843-3298249B8B16}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="AZStd::vector" field="latents" type="{CA41DC3D-DBB4-5EA5-A9AA-91EC2056766E}"/>
<Class name="AZStd::vector" field="outKeys" type="{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}">
<Class name="Crc32" field="element" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="756956357" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
</Class>
<Class name="AZStd::vector" field="namespacePath" type="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}">
<Class name="AZStd::string" field="element" value="scriptcanvas" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="element" value="unittests" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="element" value="ly_sc_unittest_functioncontainerinputfunction_VM" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="unsigned int" field="executionCharacteristics" value="1" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="bool" field="requiresConstructionParameters" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="requiresConstructionParametersForDependencies" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</Class>
</Class>
<Class name="bool" field="IsDependencyReady" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="IsRuntimeActive" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</Class>
<Class name="AZStd::vector" field="m_connections" type="{21786AF0-2606-5B9A-86EB-0892E2820E6C}">
<Class name="AZ::Entity" field="element" version="2" type="{75651658-8663-478D-9090-2432DFCAFA44}">
<Class name="EntityId" field="Id" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23945205519131" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="AZStd::string" field="Name" value="srcEndpoint=(On Graph Start: Out), destEndpoint=(Function Call Node: New Input 1)" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::vector" field="Components" type="{13D58FF9-1088-5C69-9A1F-C2A144B57B78}">
<Class name="Connection" field="element" type="{64CA5016-E803-4AC4-9A36-BDA2C890C6EB}">
<Class name="AZ::Component" field="BaseClass1" type="{EDFCB2CF-F75D-43BE-B26B-F35821B29247}">
<Class name="AZ::u64" field="Id" value="9452717911445906062" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="Endpoint" field="sourceEndpoint" version="1" type="{91D4ADAC-56FE-4D82-B9AF-6975D21435C8}">
<Class name="EntityId" field="nodeId" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23936615584539" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="SlotId" field="slotId" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{29A7EA49-1E9F-4EA0-9FEB-182CA4513385}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="Endpoint" field="targetEndpoint" version="1" type="{91D4ADAC-56FE-4D82-B9AF-6975D21435C8}">
<Class name="EntityId" field="nodeId" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23940910551835" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="SlotId" field="slotId" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{D64E21F2-DB93-4083-9097-175C030CE23A}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
</Class>
</Class>
<Class name="bool" field="IsDependencyReady" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="IsRuntimeActive" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</Class>
<Class name="AZStd::unordered_map" field="m_dependentAssets" type="{1BC78FA9-1D82-5F17-BD28-C35D1F4FA737}"/>
<Class name="AZStd::vector" field="m_scriptEventAssets" type="{479100D9-6931-5E23-8494-5A28EF2FCD8A}"/>
</Class>
<Class name="unsigned char" field="executionMode" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
<Class name="AZ::Uuid" field="m_assetType" value="{3E2AC8CD-713F-453E-967F-29517F331784}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="bool" field="isFunctionGraph" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="SlotId" field="versionData" version="2" type="{14C629F6-467B-46FE-8B63-48FDFCA42175}">
<Class name="AZ::Uuid" field="m_id" value="{01000000-0100-0000-0000-0000703B00A8}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="unsigned int" field="m_variableCounter" value="3" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="bool" field="m_saveFormatConverted" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="AZStd::unordered_map" field="GraphCanvasData" type="{0005D26C-B35A-5C30-B60C-5716482946CB}">
<Class name="AZStd::pair" field="element" type="{22EBF919-A826-58E5-8EF6-15CA70D620BB}">
<Class name="EntityId" field="value1" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23932320617243" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="EntitySaveDataContainer" field="value2" version="2" type="{DCCDA882-AF72-49C3-9AAD-BA601322BFBC}">
<Class name="AZStd::unordered_map" field="ComponentData" type="{318313BB-1036-5630-AFC4-FCBD54818E6D}">
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{5F84B500-8C45-40D1-8EFC-A5306B241444}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="SceneComponentSaveData" field="value2" version="3" type="{5F84B500-8C45-40D1-8EFC-A5306B241444}">
<Class name="AZStd::vector" field="Constructs" type="{60BF495A-9BEF-5429-836B-37ADEA39CEA0}"/>
<Class name="ViewParams" field="ViewParams" version="1" type="{D016BF86-DFBB-4AF0-AD26-27F6AB737740}">
<Class name="double" field="Scale" value="1.0000000" type="{110C4B14-11A8-4E9D-8638-5051013A56AC}"/>
<Class name="float" field="AnchorX" value="379.0000000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
<Class name="float" field="AnchorY" value="45.0000000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
</Class>
<Class name="unsigned int" field="BookmarkCounter" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
</Class>
</Class>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{22EBF919-A826-58E5-8EF6-15CA70D620BB}">
<Class name="EntityId" field="value1" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23936615584539" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="EntitySaveDataContainer" field="value2" version="2" type="{DCCDA882-AF72-49C3-9AAD-BA601322BFBC}">
<Class name="AZStd::unordered_map" field="ComponentData" type="{318313BB-1036-5630-AFC4-FCBD54818E6D}">
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{24CB38BB-1705-4EC5-8F63-B574571B4DCD}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="NodeSaveData" field="value2" version="1" type="{24CB38BB-1705-4EC5-8F63-B574571B4DCD}">
<Class name="bool" field="HideUnusedSlots" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{7CC444B1-F9B3-41B5-841B-0C4F2179F111}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="GeometrySaveData" field="value2" version="1" type="{7CC444B1-F9B3-41B5-841B-0C4F2179F111}">
<Class name="Vector2" field="Position" value="500.0000000 220.0000000" type="{3D80F623-C85C-4741-90D0-E4E66164E6BF}"/>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="StylingComponentSaveData" field="value2" version="1" type="{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}">
<Class name="ComponentSaveData" field="BaseClass1" version="1" type="{359ACEC7-D0FA-4FC0-8B59-3755BB1A9836}"/>
<Class name="AZStd::string" field="SubStyle" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{328FF15C-C302-458F-A43D-E1794DE0904E}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="GeneralNodeTitleComponentSaveData" field="value2" version="1" type="{328FF15C-C302-458F-A43D-E1794DE0904E}">
<Class name="ComponentSaveData" field="BaseClass1" version="1" type="{359ACEC7-D0FA-4FC0-8B59-3755BB1A9836}"/>
<Class name="AZStd::string" field="PaletteOverride" value="TimeNodeTitlePalette" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{B1F49A35-8408-40DA-B79E-F1E3B64322CE}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="PersistentIdComponentSaveData" field="value2" version="1" type="{B1F49A35-8408-40DA-B79E-F1E3B64322CE}">
<Class name="ComponentSaveData" field="BaseClass1" version="1" type="{359ACEC7-D0FA-4FC0-8B59-3755BB1A9836}"/>
<Class name="AZ::Uuid" field="PersistentId" value="{B596CF69-DAFD-4C88-BAC1-78EB7D36D7B4}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
</Class>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{22EBF919-A826-58E5-8EF6-15CA70D620BB}">
<Class name="EntityId" field="value1" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="23940910551835" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="EntitySaveDataContainer" field="value2" version="2" type="{DCCDA882-AF72-49C3-9AAD-BA601322BFBC}">
<Class name="AZStd::unordered_map" field="ComponentData" type="{318313BB-1036-5630-AFC4-FCBD54818E6D}">
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{B1F49A35-8408-40DA-B79E-F1E3B64322CE}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="PersistentIdComponentSaveData" field="value2" version="1" type="{B1F49A35-8408-40DA-B79E-F1E3B64322CE}">
<Class name="ComponentSaveData" field="BaseClass1" version="1" type="{359ACEC7-D0FA-4FC0-8B59-3755BB1A9836}"/>
<Class name="AZ::Uuid" field="PersistentId" value="{8DE27A94-F02C-43B7-BB3D-5611D319E41B}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{328FF15C-C302-458F-A43D-E1794DE0904E}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="GeneralNodeTitleComponentSaveData" field="value2" version="1" type="{328FF15C-C302-458F-A43D-E1794DE0904E}">
<Class name="ComponentSaveData" field="BaseClass1" version="1" type="{359ACEC7-D0FA-4FC0-8B59-3755BB1A9836}"/>
<Class name="AZStd::string" field="PaletteOverride" value="MethodNodeTitlePalette" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="StylingComponentSaveData" field="value2" version="1" type="{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}">
<Class name="ComponentSaveData" field="BaseClass1" version="1" type="{359ACEC7-D0FA-4FC0-8B59-3755BB1A9836}"/>
<Class name="AZStd::string" field="SubStyle" value=".method" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{7CC444B1-F9B3-41B5-841B-0C4F2179F111}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="GeometrySaveData" field="value2" version="1" type="{7CC444B1-F9B3-41B5-841B-0C4F2179F111}">
<Class name="Vector2" field="Position" value="700.0000000 240.0000000" type="{3D80F623-C85C-4741-90D0-E4E66164E6BF}"/>
</Class>
</Class>
<Class name="AZStd::pair" field="element" type="{CE78FEBD-1B9D-5A3E-9B95-BD8DD8CCCD4B}">
<Class name="AZ::Uuid" field="value1" value="{24CB38BB-1705-4EC5-8F63-B574571B4DCD}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="NodeSaveData" field="value2" version="1" type="{24CB38BB-1705-4EC5-8F63-B574571B4DCD}">
<Class name="bool" field="HideUnusedSlots" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</Class>
</Class>
</Class>
</Class>
</Class>
<Class name="AZStd::unordered_map" field="CRCCacheMap" type="{2376BDB0-D7B6-586B-A603-42BE703EB2C9}"/>
<Class name="GraphStatisticsHelper" field="StatisticsHelper" version="1" type="{7D5B7A65-F749-493E-BA5C-6B8724791F03}">
<Class name="AZStd::unordered_map" field="InstanceCounter" type="{9EC84E0A-F296-5212-8B69-4DE48E695D61}">
<Class name="AZStd::pair" field="element" type="{0CE5EF6F-834D-519F-B2EC-C2763B8BB99C}">
<Class name="AZ::u64" field="value1" value="4199610336680704683" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
<Class name="int" field="value2" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
<Class name="AZStd::pair" field="element" type="{0CE5EF6F-834D-519F-B2EC-C2763B8BB99C}">
<Class name="AZ::u64" field="value1" value="7721683751185626951" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
<Class name="int" field="value2" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
</Class>
</Class>
<Class name="int" field="GraphCanvasSaveVersion" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
</Class>
<Class name="EditorGraphVariableManagerComponent" field="element" type="{86B7CC96-9830-4BD1-85C3-0C0BD0BFBEE7}">
<Class name="GraphVariableManagerComponent" field="BaseClass1" version="3" type="{825DC28D-667D-43D0-AF11-73681351DD2F}">
<Class name="AZ::Component" field="BaseClass1" type="{EDFCB2CF-F75D-43BE-B26B-F35821B29247}">
<Class name="AZ::u64" field="Id" value="15760920460852482896" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="VariableData" field="m_variableData" version="3" type="{4F80659A-CD11-424E-BF04-AF02ABAC06B0}">
<Class name="AZStd::unordered_map" field="m_nameVariableMap" type="{6C3A5734-6C27-5033-B033-D5CAD11DE55A}">
<Class name="AZStd::pair" field="element" type="{E64D2110-EB38-5AE1-9B1D-3C06A10C7D6A}">
<Class name="VariableId" field="value1" type="{CA57A57B-E510-4C09-B952-1F43742166AE}">
<Class name="AZ::Uuid" field="m_id" value="{613FF258-EE61-4B4B-A859-71529C793A86}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="GraphVariable" field="value2" version="4" type="{5BDC128B-8355-479C-8FA8-4BFFAB6915A8}">
<Class name="Datum" field="Datum" version="6" type="{8B836FC0-98A8-4A81-8651-35C7CA125451}">
<Class name="bool" field="m_isUntypedStorage" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="Type" field="m_type" version="2" type="{0EADF8F5-8AB8-42E9-9C50-F5C78255C817}">
<Class name="unsigned int" field="m_type" value="4" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZ::Uuid" field="m_azType" value="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="int" field="m_originality" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="any" field="m_datumStorage" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::intrusive_ptr" field="m_data" type="{2349F1C2-6C74-54C9-8B7E-CBE24DDE8850}">
<Class name="BehaviorContextObject" field="element" type="{B735214D-5182-4536-B748-61EC83C1F007}">
<Class name="unsigned int" field="m_flags" value="2" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="any" field="m_object" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::vector" field="m_data" type="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}">
<Class name="AZStd::string" field="element" value="Sweet" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::string" field="element" value="Cool" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
</Class>
</Class>
</Class>
<Class name="AZStd::string" field="m_datumLabel" value="Array&lt;String&gt;" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="Crc32" field="InputControlVisibility" type="{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}">
<Class name="unsigned int" field="Value" value="2755429085" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="AZStd::string" field="ExposureCategory" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="int" field="SortPriority" value="-1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="ReplicaNetworkProperties" field="ReplicaNetProps" version="1" type="{4F055551-DD75-4877-93CE-E80C844FC155}">
<Class name="bool" field="m_isSynchronized" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
<Class name="VariableId" field="VariableId" type="{CA57A57B-E510-4C09-B952-1F43742166AE}">
<Class name="AZ::Uuid" field="m_id" value="{613FF258-EE61-4B4B-A859-71529C793A86}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
<Class name="AZStd::string" field="VariableName" value="Variable 3" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned char" field="Scope" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
<Class name="unsigned char" field="InitialValueSource" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
</Class>
</Class>
</Class>
</Class>
<Class name="AZStd::unordered_map" field="CopiedVariableRemapping" type="{723F81A5-0980-50C7-8B1F-BE646339362B}"/>
</Class>
</Class>
</Class>
<Class name="bool" field="IsDependencyReady" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="IsRuntimeActive" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</Class>
</Class>
</ObjectStream>
@@ -130,6 +130,11 @@ TEST_F(ScriptCanvasTestFixture, InterpretedEventHandlerDisconnect)
RunUnitTestGraph("LY_SC_UnitTest_EventHandlerDisconnect", runSpec);
}
TEST_F(ScriptCanvasTestFixture, FunctionContainerInputTest)
{
RunUnitTestGraph("LY_SC_UnitTest_FunctionContainerInputTest");
}
TEST_F(ScriptCanvasTestFixture, InterpretedFixBoundMultipleResults)
{
RunUnitTestGraph("LY_SC_UnitTest_FixBoundMultipleResults");
@@ -22,7 +22,7 @@ def _get_test_launcher_cmd(build_dir=None):
"""
build_arg = ""
if build_dir:
build_arg = f"--build-directory {build_dir} "
build_arg = f" --build-directory {build_dir} "
python_runner = "python.cmd"
if not WINDOWS:

Some files were not shown because too many files have changed in this diff Show More