diff --git a/AutomatedTesting/Assets/ImageGradients/image_grad_test_gsi.png b/AutomatedTesting/Assets/ImageGradients/image_grad_test_gsi.png new file mode 100644 index 0000000000..228aa877ce --- /dev/null +++ b/AutomatedTesting/Assets/ImageGradients/image_grad_test_gsi.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:171f38d536d7b805cc644513d22dae5552a4eef2bffb88e97e089898cf769530 +size 2126 diff --git a/AutomatedTesting/Assets/ImageGradients/lumberyard_gsi.png b/AutomatedTesting/Assets/ImageGradients/lumberyard_gsi.png deleted file mode 100644 index eab76f1f78..0000000000 --- a/AutomatedTesting/Assets/ImageGradients/lumberyard_gsi.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6388466c97009fd3993e5d3b59a2b0961f623c6becbd0a12a0a5eb7bd8da5d4e -size 12302 diff --git a/AutomatedTesting/Gem/Editor/Scripts/__init__.py b/AutomatedTesting/Gem/Editor/Scripts/__init__.py new file mode 100644 index 0000000000..79f8fa4422 --- /dev/null +++ b/AutomatedTesting/Gem/Editor/Scripts/__init__.py @@ -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. +""" diff --git a/AutomatedTesting/Gem/Editor/Scripts/bootstrap.py b/AutomatedTesting/Gem/Editor/Scripts/bootstrap.py new file mode 100644 index 0000000000..e41f9c1767 --- /dev/null +++ b/AutomatedTesting/Gem/Editor/Scripts/bootstrap.py @@ -0,0 +1,13 @@ +""" +All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +its licensors. + +For complete copyright and license terms please see the LICENSE at the root of this +distribution (the "License"). All use of this software is governed by the License, +or, if provided, by the license below or the license accompanying this file. Do not +remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +""" +import sys, os +sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../../PythonTests') +from PythonAssetBuilder import bootstrap_tests diff --git a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt index b7a5f85087..c23d92d60a 100644 --- a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt @@ -134,11 +134,30 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) ) endif() +## Python Asset Builder ## +if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) + ly_add_pytest( + NAME AutomatedTesting::PythonAssetBuilder + TEST_SUITE periodic + TEST_SERIAL + PATH ${CMAKE_CURRENT_LIST_DIR}/PythonAssetBuilder + TIMEOUT 3600 + RUNTIME_DEPENDENCIES + Legacy::Editor + Legacy::CryRenderNULL + AZ::AssetProcessor + AutomatedTesting.Assets + Gem::EditorPythonBindings.Editor + Gem::PythonAssetBuilder.Editor + COMPONENT TestTools + ) +endif() + ## Blast ## if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_pytest( NAME AutomatedTesting::BlastTests - TEST_SUITE sandbox + TEST_SUITE periodic TEST_SERIAL TRUE PATH ${CMAKE_CURRENT_LIST_DIR}/Blast/TestSuite_Active.py TIMEOUT 3600 diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py new file mode 100644 index 0000000000..e914182542 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py @@ -0,0 +1,57 @@ +""" +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 launches the AssetProcessor and Editor then attempts to find the expected +# assets created by a Python Asset Builder and the output of a scene pipeline script +# +import sys +import os +import pytest +import logging +pytest.importorskip('ly_test_tools') + +import ly_test_tools.environment.file_system as file_system +import ly_test_tools.log.log_monitor +import ly_test_tools.environment.waiter as waiter + +@pytest.mark.SUITE_sandbox +@pytest.mark.parametrize('launcher_platform', ['windows_editor']) +@pytest.mark.parametrize('project', ['AutomatedTesting']) +@pytest.mark.parametrize('level', ['auto_test']) +class TestPythonAssetProcessing(object): + def test_DetectPythonCreatedAsset(self, request, editor, level, launcher_platform): + unexpected_lines = [] + expected_lines = [ + 'Mock asset exists', + 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found', + 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_X_negative.azmodel) found', + 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_X_positive.azmodel) found', + 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found', + 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found', + 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found', + 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found', + 'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found' + ] + timeout = 180 + halt_on_unexpected = False + test_directory = os.path.join(os.path.dirname(__file__)) + testFile = os.path.join(test_directory, 'AssetBuilder_test_case.py') + editor.args.extend(['-NullRenderer', "--skipWelcomeScreenDialog", "--autotest_mode", "--runpythontest", testFile]) + + with editor.start(): + editorlog_file = os.path.join(editor.workspace.paths.project_log(), 'Editor.log') + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(editor, editorlog_file) + waiter.wait_for( + lambda: editor.is_alive(), + timeout, + exc=("Log file '{}' was never opened by another process.".format(editorlog_file)), + interval=1) + log_monitor.monitor_log_for_lines(expected_lines, unexpected_lines, halt_on_unexpected, timeout) diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py new file mode 100644 index 0000000000..54857c2067 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py @@ -0,0 +1,52 @@ +""" +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 azlmbr.bus +import azlmbr.asset +import azlmbr.editor +import azlmbr.math +import azlmbr.legacy.general + +def raise_and_stop(msg): + print (msg) + azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt') + +# These tests are meant to check that the test_asset.mock source asset turned into +# a test_asset.mock_asset product asset via the Python asset builder system +mockAssetType = azlmbr.math.Uuid_CreateString('{9274AD17-3212-4651-9F3B-7DCCB080E467}', 0) +mockAssetPath = 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset' +assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', mockAssetPath, mockAssetType, False) +if (assetId.is_valid() is False): + raise_and_stop(f'Mock AssetId is not valid! Got {assetId.to_string()} instead') + +if (assetId.to_string().endswith(':54c06b89') is False): + raise_and_stop(f'Mock AssetId has unexpected sub-id for {mockAssetPath}!') + +print ('Mock asset exists') + +# These tests detect if the geom_group.fbx file turns into a number of azmodel product assets +def test_azmodel_product(generatedModelAssetPath, expectedSubId): + azModelAssetType = azlmbr.math.Uuid_CreateString('{2C7477B6-69C5-45BE-8163-BCD6A275B6D8}', 0) + assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False) + assetIdString = assetId.to_string() + if (assetIdString.endswith(':' + expectedSubId) is False): + raise_and_stop(f'Asset has unexpected asset ID ({assetIdString}) for ({generatedModelAssetPath})!') + else: + print(f'Expected subId for asset ({generatedModelAssetPath}) found') + +test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel', '10412075') +test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_X_positive.azmodel', '10d16e68') +test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_X_negative.azmodel', '10a71973') +test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_Y_positive.azmodel', '10130556') +test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_Y_negative.azmodel', '1065724d') +test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_Z_positive.azmodel', '1024be55') +test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_Z_negative.azmodel', '1052c94e') + +azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt') diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/__init__.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/__init__.py new file mode 100644 index 0000000000..6ed3dc4bda --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/__init__.py @@ -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. +""" \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/bootstrap_tests.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/bootstrap_tests.py new file mode 100644 index 0000000000..9e7b738a4d --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/bootstrap_tests.py @@ -0,0 +1,17 @@ +""" +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 os +import sys +try: + sys.path.append(os.path.dirname(os.path.abspath(__file__))) + import mock_asset_builder +except: + print ('skipping asset builder testing via mock_asset_builder') diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/export_chunks_builder.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/export_chunks_builder.py new file mode 100644 index 0000000000..ad68a486b1 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/export_chunks_builder.py @@ -0,0 +1,88 @@ +""" +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 uuid, os +import azlmbr.scene as sceneApi +import azlmbr.scene.graph +from scene_api import scene_data as sceneData + +def get_mesh_node_names(sceneGraph): + meshDataList = [] + node = sceneGraph.get_root() + children = [] + + while node.IsValid(): + # store children to process after siblings + if sceneGraph.has_node_child(node): + children.append(sceneGraph.get_node_child(node)) + + # store any node that has mesh data content + nodeContent = sceneGraph.get_node_content(node) + if nodeContent is not None and nodeContent.CastWithTypeName('MeshData'): + if sceneGraph.is_node_end_point(node) is False: + meshDataList.append(sceneData.SceneGraphName(sceneGraph.get_node_name(node))) + + # advance to next node + if sceneGraph.has_node_sibling(node): + node = sceneGraph.get_node_sibling(node) + elif children: + node = children.pop() + else: + node = azlmbr.scene.graph.NodeIndex() + + return meshDataList + +def update_manifest(scene): + graph = sceneData.SceneGraph(scene.graph) + meshNameList = get_mesh_node_names(graph) + sceneManifest = sceneData.SceneManifest() + sourceFilenameOnly = os.path.basename(scene.sourceFilename) + sourceFilenameOnly = sourceFilenameOnly.replace('.','_') + + for activeMeshIndex in range(len(meshNameList)): + chunkName = meshNameList[activeMeshIndex] + chunkPath = chunkName.get_path() + meshGroupName = '{}_{}'.format(sourceFilenameOnly, chunkName.get_name()) + meshGroup = sceneManifest.add_mesh_group(meshGroupName) + meshGroup['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, sourceFilenameOnly + chunkPath)) + '}' + sceneManifest.mesh_group_add_comment(meshGroup, 'auto generated by scene manifest') + sceneManifest.mesh_group_add_advanced_coordinate_system(meshGroup, None, None, None, 1.0) + + # create selection node list + pathSet = set() + for meshIndex in range(len(meshNameList)): + targetPath = meshNameList[meshIndex].get_path() + if (activeMeshIndex == meshIndex): + sceneManifest.mesh_group_select_node(meshGroup, targetPath) + else: + if targetPath not in pathSet: + pathSet.update(targetPath) + sceneManifest.mesh_group_unselect_node(meshGroup, targetPath) + + return sceneManifest.export() + +mySceneJobHandler = None + +def on_update_manifest(args): + scene = args[0] + result = update_manifest(scene) + global mySceneJobHandler + mySceneJobHandler.disconnect() + mySceneJobHandler = None + return result + +def main(): + global mySceneJobHandler + mySceneJobHandler = sceneApi.ScriptBuildingNotificationBusHandler() + mySceneJobHandler.connect() + mySceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest) + +if __name__ == "__main__": + main() diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/geom_group.fbx b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/geom_group.fbx new file mode 100644 index 0000000000..8945a5505a --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/geom_group.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66d38948309ef273adf74b63eaa38f8fc2e2bdfbab3933d2ee082ce6a8cb108e +size 30496 diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/geom_group.fbx.assetinfo b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/geom_group.fbx.assetinfo new file mode 100644 index 0000000000..707c6f3705 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/geom_group.fbx.assetinfo @@ -0,0 +1,9 @@ +{ + "values": + [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "Gem/PythonTests/PythonAssetBuilder/export_chunks_builder.py" + } + ] +} diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/mock_asset_builder.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/mock_asset_builder.py new file mode 100644 index 0000000000..3b695e3ccd --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/mock_asset_builder.py @@ -0,0 +1,121 @@ +""" +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 azlmbr.asset +import azlmbr.asset.builder +import azlmbr.bus +import azlmbr.math +import os, traceback, binascii, sys + +jobKeyName = 'Mock Asset' + +def log_exception_traceback(): + exc_type, exc_value, exc_tb = sys.exc_info() + data = traceback.format_exception(exc_type, exc_value, exc_tb) + print(str(data)) + +# creates a single job to compile for each platform +def create_jobs(request): + # create job descriptor for each platform + jobDescriptorList = [] + for platformInfo in request.enabledPlatforms: + jobDesc = azlmbr.asset.builder.JobDescriptor() + jobDesc.jobKey = jobKeyName + jobDesc.set_platform_identifier(platformInfo.identifier) + jobDescriptorList.append(jobDesc) + + response = azlmbr.asset.builder.CreateJobsResponse() + response.result = azlmbr.asset.builder.CreateJobsResponse_ResultSuccess + response.createJobOutputs = jobDescriptorList + return response + +def on_create_jobs(args): + try: + request = args[0] + return create_jobs(request) + except: + log_exception_traceback() + # returing back a default CreateJobsResponse() records an asset error + return azlmbr.asset.builder.CreateJobsResponse() + +def process_file(request): + # prepare output folder + basePath, _ = os.path.split(request.sourceFile) + outputPath = os.path.join(request.tempDirPath, basePath) + os.makedirs(outputPath, exist_ok=True) + + # write out a mock file + basePath, sourceFile = os.path.split(request.sourceFile) + mockFilename = os.path.splitext(sourceFile)[0] + '.mock_asset' + mockFilename = os.path.join(basePath, mockFilename) + mockFilename = mockFilename.replace('\\', '/') + tempFilename = os.path.join(request.tempDirPath, mockFilename) + + # write out a tempFilename like a JSON + fileOutput = open(tempFilename, "w") + fileOutput.write('{}') + fileOutput.close() + + # generate a product asset file entry + subId = binascii.crc32(mockFilename.encode()) + mockAssetType = azlmbr.math.Uuid_CreateString('{9274AD17-3212-4651-9F3B-7DCCB080E467}', 0) + product = azlmbr.asset.builder.JobProduct(mockFilename, mockAssetType, subId) + product.dependenciesHandled = True + productOutputs = [] + productOutputs.append(product) + + # fill out response object + response = azlmbr.asset.builder.ProcessJobResponse() + response.outputProducts = productOutputs + response.resultCode = azlmbr.asset.builder.ProcessJobResponse_Success + response.dependenciesHandled = True + return response + +# using the incoming 'request' find the type of job via 'jobKey' to determine what to do +def on_process_job(args): + try: + request = args[0] + if (request.jobDescription.jobKey.startswith(jobKeyName)): + return process_file(request) + except: + log_exception_traceback() + # returning back an empty ProcessJobResponse() will record an error + return azlmbr.asset.builder.ProcessJobResponse() + +# register asset builder +def register_asset_builder(busId): + assetPattern = azlmbr.asset.builder.AssetBuilderPattern() + assetPattern.pattern = '*.mock' + assetPattern.type = azlmbr.asset.builder.AssetBuilderPattern_Wildcard + + builderDescriptor = azlmbr.asset.builder.AssetBuilderDesc() + builderDescriptor.name = "Mock Builder" + builderDescriptor.patterns = [assetPattern] + builderDescriptor.busId = busId + builderDescriptor.version = 1 + + outcome = azlmbr.asset.builder.PythonAssetBuilderRequestBus(azlmbr.bus.Broadcast, 'RegisterAssetBuilder', builderDescriptor) + if outcome.IsSuccess(): + # created the asset builder to hook into the notification bus + handler = azlmbr.asset.builder.PythonBuilderNotificationBusHandler() + handler.connect(busId) + handler.add_callback('OnCreateJobsRequest', on_create_jobs) + handler.add_callback('OnProcessJobRequest', on_process_job) + return handler + +# create the asset builder handler +busIdString = '{CF5C74C1-9ED4-5851-95B1-0B15090DBEC7}' +busId = azlmbr.math.Uuid_CreateString(busIdString, 0) +handler = None +try: + handler = register_asset_builder(busId) +except: + handler = None + log_exception_traceback() diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/test_asset.mock b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/test_asset.mock new file mode 100644 index 0000000000..6d6a52e643 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/test_asset.mock @@ -0,0 +1 @@ +mock data \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_ProcessedImageAssignedSuccessfully.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_ProcessedImageAssignedSuccessfully.py index 6b4a8bf17c..ccc8c3f101 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_ProcessedImageAssignedSuccessfully.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_ProcessedImageAssignedSuccessfully.py @@ -77,13 +77,13 @@ class TestImageGradient(EditorTestHelper): # 3) Assign the processed gradient signal image as the Image Gradient's image asset and verify success # First, check for the base image in the workspace - base_image = "lumberyard_gsi.png" + base_image = "image_grad_test_gsi.png" base_image_path = os.path.join("AutomatedTesting", "Assets", "ImageGradients", base_image) if os.path.isfile(base_image_path): print(f"{base_image} was found in the workspace") # Next, assign the processed image to the Image Gradient's Image Asset property - processed_image_path = os.path.join("Assets", "ImageGradients", "lumberyard_gsi.gradimage") + processed_image_path = os.path.join("Assets", "ImageGradients", "image_grad_test_gsi.gradimage") asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", processed_image_path, math.Uuid(), False) hydra.get_set_test(image_gradient_entity, 0, "Configuration|Image Asset", asset_id) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_ImageGradient.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_ImageGradient.py index 11712f8b65..8fc582c2c8 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_ImageGradient.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_ImageGradient.py @@ -57,7 +57,7 @@ class TestImageGradientRequiresShape(object): "Entity has a Image Gradient component", "Entity has a Gradient Transform Modifier component", "Entity has a Box Shape component", - "lumberyard_gsi.png was found in the workspace", + "image_grad_test_gsi.png was found in the workspace", "Entity Configuration|Image Asset: SUCCESS", "ImageGradient_ProcessedImageAssignedSucessfully: result=SUCCESS", ] diff --git a/AutomatedTesting/LightingPresets/greenwich_park_02.lightingconfig.json b/AutomatedTesting/LightingPresets/greenwich_park_02.lightingconfig.json index 1646dd18a2..bfb92bbb6f 100644 --- a/AutomatedTesting/LightingPresets/greenwich_park_02.lightingconfig.json +++ b/AutomatedTesting/LightingPresets/greenwich_park_02.lightingconfig.json @@ -1,7 +1,6 @@ { "configurations": [ { - "autoSelect": false, "displayName": "Greenwich Park 02", "skyboxImageAsset": { "assetId": { @@ -64,7 +63,6 @@ "shadowCatcherOpacity": 0.20000000298023225 }, { - "autoSelect": false, "displayName": "Greenwich Park 02 (Alt)", "skyboxImageAsset": { "assetId": { diff --git a/CMakeLists.txt b/CMakeLists.txt index 6da92f9c2d..18fb86ff09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ if(CMAKE_VERSION VERSION_EQUAL 3.19) endif() include(cmake/Version.cmake) +include(cmake/OutputDirectory.cmake) if(NOT PROJECT_NAME) project(O3DE @@ -30,7 +31,7 @@ if(NOT PROJECT_NAME) ) endif() -include(cmake/Initialize.cmake) +include(cmake/GeneralSettings.cmake) include(cmake/FileUtil.cmake) include(cmake/PAL.cmake) include(cmake/PALTools.cmake) diff --git a/Code/CryEngine/CryCommon/IMovieSystem.h b/Code/CryEngine/CryCommon/IMovieSystem.h index 654ccfd240..7a1125ae2b 100644 --- a/Code/CryEngine/CryCommon/IMovieSystem.h +++ b/Code/CryEngine/CryCommon/IMovieSystem.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -914,9 +915,18 @@ struct IAnimStringTable */ struct IAnimSequence { - AZ_RTTI(IAnimSequence, "{A60F95F5-5A4A-47DB-B3BB-525BBC0BC8DB}") + AZ_RTTI(IAnimSequence, "{A60F95F5-5A4A-47DB-B3BB-525BBC0BC8DB}"); + AZ_CLASS_ALLOCATOR(IAnimSequence, AZ::SystemAllocator, 0); - static const int kSequenceVersion = 4; + static const int kSequenceVersion = 5; + + static void Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) + { + serializeContext->Class(); + } + } //! Flags used for SetFlags(),GetFlags(),SetParentFlags(),GetParentFlags() methods. enum EAnimSequenceFlags diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp index b8d3e12712..c55f565615 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp @@ -178,14 +178,16 @@ namespace AZ //! on an update to '/Amazon/AzCore/Bootstrap/project_path' key. struct UpdateProjectSettingsEventHandler { - UpdateProjectSettingsEventHandler(AZ::SettingsRegistryInterface& registry) + UpdateProjectSettingsEventHandler(AZ::SettingsRegistryInterface& registry, AZ::CommandLine& commandLine) : m_registry{ registry } + , m_commandLine{ commandLine } { } void operator()(AZStd::string_view path, AZ::SettingsRegistryInterface::Type) { using FixedValueString = AZ::SettingsRegistryInterface::FixedValueString; + // #1 Update the project settings when the project path is set const auto projectPathKey = FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; AZ::IO::FixedMaxPath newProjectPath; if (SettingsRegistryMergeUtils::IsPathAncestorDescendantOrEqual(projectPathKey, path) @@ -194,6 +196,7 @@ namespace AZ UpdateProjectSettingsFromProjectPath(AZ::IO::PathView(newProjectPath)); } + // #2 Update the project specialization when the project name is set const auto projectNameKey = FixedValueString(AZ::SettingsRegistryMergeUtils::ProjectSettingsRootKey) + "/project_name"; FixedValueString newProjectName; if (SettingsRegistryMergeUtils::IsPathAncestorDescendantOrEqual(projectNameKey, path) @@ -201,6 +204,12 @@ namespace AZ { UpdateProjectSpecializationFromProjectName(newProjectName); } + + // #3 Update the ComponentApplication CommandLine instance when the command line settings are merged into the Settings Registry + if (path == AZ::SettingsRegistryMergeUtils::CommandLineValueChangedKey) + { + UpdateCommandLine(); + } } //! Add the project name as a specialization underneath the /Amazon/AzCore/Settings/Specializations path @@ -233,10 +242,16 @@ namespace AZ AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(m_registry); } + void UpdateCommandLine() + { + AZ::SettingsRegistryMergeUtils::GetCommandLineFromRegistry(m_registry, m_commandLine); + } + private: AZ::IO::FixedMaxPath m_oldProjectPath; AZ::SettingsRegistryInterface::FixedValueString m_oldProjectName; AZ::SettingsRegistryInterface& m_registry; + AZ::CommandLine& m_commandLine; }; void ComponentApplication::Descriptor::AllocatorRemapping::Reflect(ReflectContext* context, ComponentApplication* app) @@ -326,6 +341,16 @@ namespace AZ ; } } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->EBus("ComponentApplicationBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Components") + + ->Event("GetEntityName", &ComponentApplicationBus::Events::GetEntityName) + ->Event("SetEntityName", &ComponentApplicationBus::Events::SetEntityName); + } } //========================================================================= @@ -415,6 +440,12 @@ namespace AZ // Add the Command Line arguments into the SettingsRegistry SettingsRegistryMergeUtils::StoreCommandLineToRegistry(*m_settingsRegistry, m_commandLine); + // Add a notifier to update the project_settings when + // 1. The 'project_path' key changes + // 2. The project specialization when the 'project-name' key changes + // 3. The ComponentApplication command line when the command line is stored to the registry + m_projectChangedHandler = m_settingsRegistry->RegisterNotifier(UpdateProjectSettingsEventHandler{ *m_settingsRegistry, m_commandLine }); + // Merge Command Line arguments constexpr bool executeRegDumpCommands = false; SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands); @@ -429,10 +460,6 @@ namespace AZ // for the application root. CalculateAppRoot(); - // Add a notifier to update the /Amazon/AzCore/Settings/Specializations - // when the 'project_path' property changes within the SettingsRegistry - m_projectChangedHandler = m_settingsRegistry->RegisterNotifier(UpdateProjectSettingsEventHandler{ *m_settingsRegistry }); - // Merge the bootstrap.cfg file into the Settings Registry as soon as the OSAllocator has been created. SettingsRegistryMergeUtils::MergeSettingsToRegistry_Bootstrap(*m_settingsRegistry); SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(*m_settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {}); @@ -909,6 +936,8 @@ namespace AZ SettingsRegistryMergeUtils::MergeSettingsToRegistry_ProjectUserRegistry(registry, AZ_TRAIT_OS_PLATFORM_CODENAME, specializations, &scratchBuffer); SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(registry, m_commandLine, true); #endif + // Update the Runtime file paths in case the "{BootstrapSettingsRootKey}/assets" key was overriden by a setting registry + AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(registry); } void ComponentApplication::SetSettingsRegistrySpecializations(SettingsRegistryInterface::Specializations& specializations) @@ -1031,6 +1060,20 @@ namespace AZ return AZStd::string(); } + //========================================================================= + // SetEntityName + //========================================================================= + bool ComponentApplication::SetEntityName(const EntityId& id, const AZStd::string_view name) + { + Entity* entity = FindEntity(id); + if (entity) + { + entity->SetName(name); + return true; + } + return false; + } + //========================================================================= // EnumerateEntities //========================================================================= diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h index ef5c813573..3ebcf39d95 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h @@ -209,6 +209,7 @@ namespace AZ bool DeleteEntity(const EntityId& id) override; Entity* FindEntity(const EntityId& id) override; AZStd::string GetEntityName(const EntityId& id) override; + bool SetEntityName(const EntityId& id, const AZStd::string_view name) override; void EnumerateEntities(const ComponentApplicationRequests::EntityCallback& callback) override; ComponentApplication* GetApplication() override { return this; } /// Returns the serialize context that has been registered with the app, if there is one. diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h index d0f161aa39..3582e6ebb8 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h @@ -130,7 +130,13 @@ namespace AZ //! @param entity A reference to the entity whose name you are seeking. //! @return The name of the entity with the specified entity ID. //! If no entity is found for the specified ID, it returns an empty string. - virtual AZStd::string GetEntityName(const EntityId& id) { (void)id; return AZStd::string(); }; + virtual AZStd::string GetEntityName(const EntityId& id) { (void)id; return AZStd::string(); } + + //! Sets the name of the entity that has the specified entity ID. + //! Entity names are not enforced to be unique. + //! @param entityId A reference to the entity whose name you want to change. + //! @return True if the name was changed successfully, false if it wasn't. + virtual bool SetEntityName([[maybe_unused]] const EntityId& id, [[maybe_unused]] const AZStd::string_view name) { return false; } //! The type that AZ::ComponentApplicationRequests::EnumerateEntities uses to //! pass entity callbacks to the application for enumeration. diff --git a/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp b/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp index ca09f8b453..143fe59ca7 100644 --- a/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp @@ -258,7 +258,8 @@ namespace AZ Method("CreateFromMatrix3x3", &Quaternion::CreateFromMatrix3x3)-> Method("CreateFromMatrix4x4", &Quaternion::CreateFromMatrix4x4)-> Method("CreateFromAxisAngle", &Quaternion::CreateFromAxisAngle)-> - Method("CreateShortestArc", &Quaternion::CreateShortestArc) + Method("CreateShortestArc", &Quaternion::CreateShortestArc)-> + Method("CreateFromEulerAnglesDegrees", &Quaternion::CreateFromEulerAnglesDegrees) ; } } diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.cpp b/Code/Framework/AzCore/AzCore/Math/Transform.cpp index 77d8658d0f..bb3f764492 100644 --- a/Code/Framework/AzCore/AzCore/Math/Transform.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Transform.cpp @@ -250,6 +250,7 @@ namespace AZ Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> Attribute(Script::Attributes::GenericConstructorOverride, &Internal::TransformDefaultConstructor)-> + Constructor()-> Method("GetBasis", &Transform::GetBasis)-> Method("GetBasisX", &Transform::GetBasisX)-> Method("GetBasisY", &Transform::GetBasisY)-> diff --git a/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.cpp b/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.cpp new file mode 100644 index 0000000000..63aad1ecf4 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.cpp @@ -0,0 +1,340 @@ +/* +* 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 +#include + +#include + +namespace AZ +{ + inline namespace PlatformDefaults + { + static const char* PlatformNames[PlatformId::NumPlatformIds] = { PlatformPC, PlatformES3, PlatformIOS, PlatformOSX, PlatformProvo, PlatformSalem, PlatformJasper, PlatformServer, PlatformAll, PlatformAllClient }; + + const char* PlatformIdToPalFolder(AZ::PlatformId platform) + { +#ifdef IOS +#define AZ_REDEFINE_IOS_AT_END IOS +#undef IOS +#endif + switch (platform) + { + case AZ::PC: + return "PC"; + case AZ::ES3: + return "Android"; + case AZ::IOS: + return "iOS"; + case AZ::OSX: + return "Mac"; + case AZ::PROVO: + return "Provo"; + case AZ::SALEM: + return "Salem"; + case AZ::JASPER: + return "Jasper"; + case AZ::SERVER: + return "Server"; + case AZ::ALL: + case AZ::ALL_CLIENT: + case AZ::NumPlatformIds: + case AZ::Invalid: + default: + return ""; + } + +#ifdef AZ_REDEFINE_IOS_AT_END +#define IOS AZ_REDEFINE_IOS_AT_END +#endif + } + + const char* OSPlatformToDefaultAssetPlatform(AZStd::string_view osPlatform) + { + if (osPlatform == PlatformCodeNameWindows || osPlatform == PlatformCodeNameLinux) + { + return PlatformPC; + } + else if (osPlatform == PlatformCodeNameMac) + { + return PlatformOSX; + } + else if (osPlatform == PlatformCodeNameAndroid) + { + return PlatformES3; + } + else if (osPlatform == PlatformCodeNameiOS) + { + return PlatformIOS; + } + else if (osPlatform == PlatformCodeNameProvo) + { + return PlatformProvo; + } + else if (osPlatform == PlatformCodeNameSalem) + { + return PlatformSalem; + } + else if (osPlatform == PlatformCodeNameJasper) + { + return PlatformJasper; + } + + AZ_Error("PlatformDefault", false, R"(Supplied OS platform "%.*s" does not have a corresponding default asset platform)", + aznumeric_cast(osPlatform.size()), osPlatform.data()); + return ""; + } + + PlatformFlags PlatformHelper::GetPlatformFlagFromPlatformIndex(PlatformId platformIndex) + { + if (platformIndex < 0 || platformIndex > PlatformId::NumPlatformIds) + { + return PlatformFlags::Platform_NONE; + } + if (platformIndex == PlatformId::ALL) + { + return PlatformFlags::Platform_ALL; + } + if (platformIndex == PlatformId::ALL_CLIENT) + { + return PlatformFlags::Platform_ALL_CLIENT; + } + return static_cast(1 << platformIndex); + } + + AZStd::fixed_vector PlatformHelper::GetPlatforms(PlatformFlags platformFlags) + { + AZStd::fixed_vector platforms; + for (int platformNum = 0; platformNum < PlatformId::NumPlatformIds; ++platformNum) + { + const bool isAllPlatforms = PlatformId::ALL == static_cast(platformNum) + && ((platformFlags & PlatformFlags::Platform_ALL) != PlatformFlags::Platform_NONE); + + const bool isAllClientPlatforms = PlatformId::ALL_CLIENT == static_cast(platformNum) + && ((platformFlags & PlatformFlags::Platform_ALL_CLIENT) != PlatformFlags::Platform_NONE); + + if (isAllPlatforms || isAllClientPlatforms + || (platformFlags & static_cast(1 << platformNum)) != PlatformFlags::Platform_NONE) + { + platforms.push_back(PlatformNames[platformNum]); + } + } + + return platforms; + } + + AZStd::fixed_vector PlatformHelper::GetPlatformsInterpreted(PlatformFlags platformFlags) + { + return GetPlatforms(GetPlatformFlagsInterpreted(platformFlags)); + } + + AZStd::fixed_vector PlatformHelper::GetPlatformIndices(PlatformFlags platformFlags) + { + AZStd::fixed_vector platformIndices; + for (int i = 0; i < PlatformId::NumPlatformIds; i++) + { + PlatformId index = static_cast(i); + if ((GetPlatformFlagFromPlatformIndex(index) & platformFlags) != PlatformFlags::Platform_NONE) + { + platformIndices.emplace_back(index); + } + } + return platformIndices; + } + + AZStd::fixed_vector PlatformHelper::GetPlatformIndicesInterpreted(PlatformFlags platformFlags) + { + return GetPlatformIndices(GetPlatformFlagsInterpreted(platformFlags)); + } + + PlatformFlags PlatformHelper::GetPlatformFlag(AZStd::string_view platform) + { + int platformIndex = GetPlatformIndexFromName(platform); + if (platformIndex == PlatformId::Invalid) + { + AZ_Error("PlatformDefault", false, "Invalid Platform ( %.*s ).\n", static_cast(platform.length()), platform.data()); + return PlatformFlags::Platform_NONE; + } + + if (platformIndex == PlatformId::ALL) + { + return PlatformFlags::Platform_ALL; + } + + if (platformIndex == PlatformId::ALL_CLIENT) + { + return PlatformFlags::Platform_ALL_CLIENT; + } + + return static_cast(1 << platformIndex); + } + + const char* PlatformHelper::GetPlatformName(PlatformId platform) + { + if (platform < 0 || platform > PlatformId::NumPlatformIds) + { + return "invalid"; + } + return PlatformNames[platform]; + } + + void PlatformHelper::AppendPlatformCodeNames(AZStd::fixed_vector& platformCodes, AZStd::string_view platformId) + { + PlatformId platform = GetPlatformIdFromName(platformId); + AZ_Assert(platform != PlatformId::Invalid, "Unsupported Platform ID: %.*s", static_cast(platformId.length()), platformId.data()); + AppendPlatformCodeNames(platformCodes, platform); + } + + void PlatformHelper::AppendPlatformCodeNames(AZStd::fixed_vector& platformCodes, PlatformId platformId) + { + // The IOS SDK has a macro that defines IOS as 1 which causes the enum below to be incorrectly converted to "PlatformId::1". +#pragma push_macro("IOS") +#undef IOS + // To reduce work the Asset Processor groups assets that can be shared between hardware platforms together. For this + // reason "PC" can for instance cover both the Windows and Linux platforms and "IOS" can cover AppleTV and iOS. + switch (platformId) + { + case PlatformId::PC: + platformCodes.emplace_back(PlatformCodeNameWindows); + platformCodes.emplace_back(PlatformCodeNameLinux); + break; + case PlatformId::ES3: + platformCodes.emplace_back(PlatformCodeNameAndroid); + break; + case PlatformId::IOS: + platformCodes.emplace_back(PlatformCodeNameiOS); + break; + case PlatformId::OSX: + platformCodes.emplace_back(PlatformCodeNameMac); + break; + case PlatformId::PROVO: + platformCodes.emplace_back(PlatformCodeNameProvo); + break; + case PlatformId::SALEM: + platformCodes.emplace_back(PlatformCodeNameSalem); + break; + case PlatformId::JASPER: + platformCodes.emplace_back(PlatformCodeNameJasper); + break; + case PlatformId::SERVER: + // Server is not a hardware platform + break; + default: + AZ_Assert(false, "Unsupported Platform ID: %i", platformId); + break; + } +#pragma pop_macro("IOS") + } + + int PlatformHelper::GetPlatformIndexFromName(AZStd::string_view platformName) + { + for (int idx = 0; idx < PlatformId::NumPlatformIds; idx++) + { + if (platformName == PlatformNames[idx]) + { + return idx; + } + } + + return PlatformId::Invalid; + } + + PlatformId PlatformHelper::GetPlatformIdFromName(AZStd::string_view platformName) + { + return aznumeric_caster(GetPlatformIndexFromName(platformName)); + } + + AssetPlatformCombinedString PlatformHelper::GetCommaSeparatedPlatformList(PlatformFlags platformFlags) + { + AZStd::fixed_vector platformNames = GetPlatforms(platformFlags); + AssetPlatformCombinedString platformsString; + AZ::StringFunc::Join(platformsString, platformNames.begin(), platformNames.end(), ", "); + return platformsString; + } + + PlatformFlags PlatformHelper::GetPlatformFlagsInterpreted(PlatformFlags platformFlags) + { + PlatformFlags returnFlags = PlatformFlags::Platform_NONE; + + if ((platformFlags & PlatformFlags::Platform_ALL) != PlatformFlags::Platform_NONE) + { + for (int i = 0; i < NumPlatforms; ++i) + { + auto platformId = static_cast(i); + + if (platformId != PlatformId::ALL && platformId != PlatformId::ALL_CLIENT) + { + returnFlags |= GetPlatformFlagFromPlatformIndex(platformId); + } + } + } + else if ((platformFlags & PlatformFlags::Platform_ALL_CLIENT) != PlatformFlags::Platform_NONE) + { + for (int i = 0; i < NumPlatforms; ++i) + { + auto platformId = static_cast(i); + + if (platformId != PlatformId::ALL && platformId != PlatformId::ALL_CLIENT && platformId != PlatformId::SERVER) + { + returnFlags |= GetPlatformFlagFromPlatformIndex(platformId); + } + } + } + else + { + returnFlags = platformFlags; + } + + return returnFlags; + } + + bool PlatformHelper::IsSpecialPlatform(PlatformFlags platformFlags) + { + return (platformFlags & PlatformFlags::Platform_ALL) != PlatformFlags::Platform_NONE + || (platformFlags & PlatformFlags::Platform_ALL_CLIENT) != PlatformFlags::Platform_NONE; + } + + bool HasFlagHelper(PlatformFlags flags, PlatformFlags checkPlatform) + { + return (flags & checkPlatform) == checkPlatform; + } + + + bool PlatformHelper::HasPlatformFlag(PlatformFlags flags, PlatformId checkPlatform) + { + // If checkPlatform contains any kind of invalid id, just exit out here + if (checkPlatform == PlatformId::Invalid || checkPlatform == NumPlatforms) + { + return false; + } + + // ALL_CLIENT + SERVER = ALL + if (HasFlagHelper(flags, PlatformFlags::Platform_ALL_CLIENT | PlatformFlags::Platform_SERVER)) + { + flags = PlatformFlags::Platform_ALL; + } + + if (HasFlagHelper(flags, PlatformFlags::Platform_ALL)) + { + // It doesn't matter what checkPlatform is set to in this case, just return true + return true; + } + + if (HasFlagHelper(flags, PlatformFlags::Platform_ALL_CLIENT)) + { + return checkPlatform != PlatformId::SERVER; + } + + return HasFlagHelper(flags, GetPlatformFlagFromPlatformIndex(checkPlatform)); + } + } +} diff --git a/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.h b/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.h new file mode 100644 index 0000000000..2d67c860cd --- /dev/null +++ b/Code/Framework/AzCore/AzCore/PlatformId/PlatformDefaults.h @@ -0,0 +1,157 @@ +/* +* 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 +#include +#include +#include +#include + +// On IOS builds IOS will be defined and interfere with the below enums +#pragma push_macro("IOS") +#undef IOS + +namespace AZ +{ + inline namespace PlatformDefaults + { + constexpr char PlatformPC[] = "pc"; + constexpr char PlatformES3[] = "es3"; + constexpr char PlatformIOS[] = "ios"; + constexpr char PlatformOSX[] = "osx_gl"; + constexpr char PlatformProvo[] = "provo"; + constexpr char PlatformSalem[] = "salem"; + constexpr char PlatformJasper[] = "jasper"; + constexpr char PlatformServer[] = "server"; + + constexpr char PlatformCodeNameWindows[] = "Windows"; + constexpr char PlatformCodeNameLinux[] = "Linux"; + constexpr char PlatformCodeNameAndroid[] = "Android"; + constexpr char PlatformCodeNameiOS[] = "iOS"; + constexpr char PlatformCodeNameMac[] = "Mac"; + constexpr char PlatformCodeNameProvo[] = "Provo"; + constexpr char PlatformCodeNameSalem[] = "Salem"; + constexpr char PlatformCodeNameJasper[] = "Jasper"; + constexpr char PlatformAll[] = "all"; + constexpr char PlatformAllClient[] = "all_client"; + + // Used for the capacity of a fixed vector to store the code names of platforms + // The value needs to be higher than the number of unique OS platforms that are supported(at this time 8) + constexpr size_t MaxPlatformCodeNames = 16; + + //! This platform enum have platform values in sequence and can also be used to get the platform count. + AZ_ENUM_WITH_UNDERLYING_TYPE(PlatformId, int, + (Invalid, -1), + PC, + ES3, + IOS, + OSX, + PROVO, + SALEM, + JASPER, + SERVER, // Corresponds to the customer's flavor of "server" which could be windows, ubuntu, etc + ALL, + ALL_CLIENT, + + // Add new platforms above this + NumPlatformIds + ); + constexpr int NumClientPlatforms = 7; + constexpr int NumPlatforms = NumClientPlatforms + 1; // 1 "Server" platform currently + enum class PlatformFlags : AZ::u32 + { + Platform_NONE = 0x00, + Platform_PC = 1 << PlatformId::PC, + Platform_ES3 = 1 << PlatformId::ES3, + Platform_IOS = 1 << PlatformId::IOS, + Platform_OSX = 1 << PlatformId::OSX, + Platform_PROVO = 1 << PlatformId::PROVO, + Platform_SALEM = 1 << PlatformId::SALEM, + Platform_JASPER = 1 << PlatformId::JASPER, + Platform_SERVER = 1 << PlatformId::SERVER, + + // A special platform that will always correspond to all platforms, even if new ones are added + Platform_ALL = 1ULL << 30, + + // A special platform that will always correspond to all non-server platforms, even if new ones are added + Platform_ALL_CLIENT = 1ULL << 31, + + AllNamedPlatforms = Platform_PC | Platform_ES3 | Platform_IOS | Platform_OSX | Platform_PROVO | Platform_SALEM | Platform_JASPER | Platform_SERVER, + }; + + AZ_DEFINE_ENUM_BITWISE_OPERATORS(PlatformFlags); + + // 32 characters should be more than enough to store a platform name + using AssetPlatformFixedString = AZStd::fixed_string<32>; + // Fixed string which can store a comma separated list of platforms names + // Additional byte is added to take into account the comma + using AssetPlatformCombinedString = AZStd::fixed_string < (AssetPlatformFixedString{}.max_size() + 1)* PlatformId::NumPlatformIds > ; + + const char* PlatformIdToPalFolder(PlatformId platform); + + const char* OSPlatformToDefaultAssetPlatform(AZStd::string_view osPlatform); + + //! Platform Helper is an utility class that can be used to retrieve platform related information + class PlatformHelper + { + public: + + //! Given a platformIndex returns the platform name + static const char* GetPlatformName(PlatformId platform); + + //! Converts the platform name to the platform code names as defined in AZ_TRAIT_OS_PLATFORM_CODENAME. + static void AppendPlatformCodeNames(AZStd::fixed_vector& platformCodes, AZStd::string_view platformName); + + //! Converts the platform name to the platform code names as defined in AZ_TRAIT_OS_PLATFORM_CODENAME. + static void AppendPlatformCodeNames(AZStd::fixed_vector& platformCodes, PlatformId platformId); + + //! Given a platform name returns a platform index. + //! If the platform is not found, the method returns -1. + static int GetPlatformIndexFromName(AZStd::string_view platformName); + + //! Given a platform name returns a platform id. + //! If the platform is not found, the method returns -1. + static PlatformId GetPlatformIdFromName(AZStd::string_view platformName); + + //! Given a platformIndex returns the platformFlags + static PlatformFlags GetPlatformFlagFromPlatformIndex(PlatformId platform); + + //! Given a platformFlags returns all the platform identifiers that are set. + static AZStd::fixed_vector GetPlatforms(PlatformFlags platformFlags); + //! Given a platformFlags returns all the platform identifiers that are set, with special flags interpreted. Do not use the result for saving + static AZStd::fixed_vector GetPlatformsInterpreted(PlatformFlags platformFlags); + + //! Given a platformFlags return a list of PlatformId indices + static AZStd::fixed_vector GetPlatformIndices(PlatformFlags platformFlags); + //! Given a platformFlags return a list of PlatformId indices, with special flags interpreted. Do not use the result for saving + static AZStd::fixed_vector GetPlatformIndicesInterpreted(PlatformFlags platformFlags); + + //! Given a platform identifier returns its corresponding platform flag. + static PlatformFlags GetPlatformFlag(AZStd::string_view platform); + + //! Given any platformFlags returns a string listing the input platforms + static AssetPlatformCombinedString GetCommaSeparatedPlatformList(PlatformFlags platformFlags); + + //! If platformFlags contains any special flags, they are removed and replaced with the normal flags they represent + static PlatformFlags GetPlatformFlagsInterpreted(PlatformFlags platformFlags); + + //! Returns true if platformFlags contains any special flags + static bool IsSpecialPlatform(PlatformFlags platformFlags); + + //! Returns true if platformFlags has checkPlatform flag set. + static bool HasPlatformFlag(PlatformFlags platformFlags, PlatformId checkPlatform); + }; + } +} +#pragma pop_macro("IOS") diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp index 392e95bf6e..27f6f222dd 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -132,23 +133,14 @@ namespace AZ::Internal AZ::IO::FixedMaxPath ScanUpRootLocator(AZStd::string_view rootFileToLocate) { - - AZStd::fixed_string executableDir; - if (AZ::Utils::GetExecutableDirectory(executableDir.data(), executableDir.capacity()) == Utils::ExecutablePathResult::Success) - { - // Update the size value of the executable directory fixed string to correctly be the length of the null-terminated string - // stored within it - executableDir.resize_no_construct(AZStd::char_traits::length(executableDir.data())); - } - - AZ::IO::FixedMaxPath engineRootCandidate{ executableDir }; + AZ::IO::FixedMaxPath rootCandidate{ AZ::Utils::GetExecutableDirectory() }; bool rootPathVisited = false; do { - if (AZ::IO::SystemFile::Exists((engineRootCandidate / rootFileToLocate).c_str())) + if (AZ::IO::SystemFile::Exists((rootCandidate / rootFileToLocate).c_str())) { - return engineRootCandidate; + return rootCandidate; } // Note for posix filesystems the parent directory of '/' is '/' and for windows @@ -156,38 +148,69 @@ namespace AZ::Internal // Validate that the parent directory isn't itself, that would imply // that it is the filesystem root path - AZ::IO::PathView parentPath = engineRootCandidate.ParentPath(); - rootPathVisited = (engineRootCandidate == parentPath); + AZ::IO::PathView parentPath = rootCandidate.ParentPath(); + rootPathVisited = (rootCandidate == parentPath); // Recurse upwards one directory - engineRootCandidate = AZStd::move(parentPath); + rootCandidate = AZStd::move(parentPath); } while (!rootPathVisited); return {}; } + void InjectSettingToCommandLineFront(AZ::SettingsRegistryInterface& settingsRegistry, + AZStd::string_view path, AZStd::string_view value) + { + AZ::CommandLine commandLine; + AZ::SettingsRegistryMergeUtils::GetCommandLineFromRegistry(settingsRegistry, commandLine); + AZ::CommandLine::ParamContainer paramContainer; + commandLine.Dump(paramContainer); + + auto projectPathOverride = AZStd::string::format(R"(--regset="%.*s=%.*s")", + aznumeric_cast(path.size()), path.data(), aznumeric_cast(value.size()), value.data()); + paramContainer.emplace(paramContainer.begin(), AZStd::move(projectPathOverride)); + commandLine.Parse(paramContainer); + AZ::SettingsRegistryMergeUtils::StoreCommandLineToRegistry(settingsRegistry, commandLine); + } } // namespace AZ::Internal namespace AZ::SettingsRegistryMergeUtils { + constexpr AZStd::string_view InternalScanUpEngineRootKey{ "/O3DE/Settings/Internal/engine_root_scan_up_path" }; + constexpr AZStd::string_view InternalScanUpProjectRootKey{ "/O3DE/Settings/Internal/project_root_scan_up_path" }; + AZ::IO::FixedMaxPath FindEngineRoot(SettingsRegistryInterface& settingsRegistry) { AZ::IO::FixedMaxPath engineRoot; - // This is the 'external' engine root key, as in passed from command-line or .setreg files. auto engineRootKey = SettingsRegistryInterface::FixedValueString::format("%s/engine_path", BootstrapSettingsRootKey); + + // Step 1 Run the scan upwards logic once to find the location of the engine.json if it exist + // Once this step is run the {InternalScanUpEngineRootKey} is set in the Settings Registry + // to have this scan logic only run once InternalScanUpEngineRootKey the supplied registry + if (settingsRegistry.GetType(InternalScanUpEngineRootKey) == SettingsRegistryInterface::Type::NoType) + { + // We can scan up from exe directory to find engine.json, use that for engine root if it exists. + engineRoot = Internal::ScanUpRootLocator("engine.json"); + // Set the {InternalScanUpEngineRootKey} to make sure this code path isn't called again for this settings registry + settingsRegistry.Set(InternalScanUpEngineRootKey, engineRoot.Native()); + if (!engineRoot.empty()) + { + settingsRegistry.Set(engineRootKey, engineRoot.Native()); + // Inject the engine root into the front of the command line settings + Internal::InjectSettingToCommandLineFront(settingsRegistry, engineRootKey, engineRoot.Native()); + return engineRoot; + } + } + + // Step 2 check if the engine_path key has been supplied if (settingsRegistry.Get(engineRoot.Native(), engineRootKey); !engineRoot.empty()) { return engineRoot; } - // We can scan up from exe directory to find engine.json, use that for engine root if it exists. - if (engineRoot = Internal::ScanUpRootLocator("engine.json"); !engineRoot.empty()) - { - settingsRegistry.Set(engineRootKey, engineRoot.c_str()); - return engineRoot; - } - + // Step 3 locate the project root and attempt to find the engine root using the registered engine + // for the project in the project.json file AZ::IO::FixedMaxPath projectRoot = FindProjectRoot(settingsRegistry); if (projectRoot.empty()) { @@ -207,16 +230,30 @@ namespace AZ::SettingsRegistryMergeUtils AZ::IO::FixedMaxPath FindProjectRoot(SettingsRegistryInterface& settingsRegistry) { AZ::IO::FixedMaxPath projectRoot; - // This is the 'external' project root key, as in passed from command-line or .setreg files. - auto projectRootKey = SettingsRegistryInterface::FixedValueString::format("%s/project_path", BootstrapSettingsRootKey); - if (settingsRegistry.Get(projectRoot.Native(), projectRootKey)) + const auto projectRootKey = SettingsRegistryInterface::FixedValueString::format("%s/project_path", BootstrapSettingsRootKey); + + // Step 1 Run the scan upwards logic once to find the location of the project.json if it exist + // Once this step is run the {InternalScanUpProjectRootKey} is set in the Settings Registry + // to have this scan logic only run once for the supplied registry + // SettingsRegistryInterface::GetType is used to check if a key is set + if (settingsRegistry.GetType(InternalScanUpProjectRootKey) == SettingsRegistryInterface::Type::NoType) { - return projectRoot; + projectRoot = Internal::ScanUpRootLocator("project.json"); + // Set the {InternalScanUpProjectRootKey} to make sure this code path isn't called again for this settings registry + settingsRegistry.Set(InternalScanUpProjectRootKey, projectRoot.Native()); + if (!projectRoot.empty()) + { + settingsRegistry.Set(projectRootKey, projectRoot.c_str()); + // Inject the project root into the front of the command line settings + Internal::InjectSettingToCommandLineFront(settingsRegistry, projectRootKey, projectRoot.Native()); + return projectRoot; + } } - if (projectRoot = Internal::ScanUpRootLocator("project.json"); !projectRoot.empty()) + // Step 2 Check the project-path key + // This is the project path root key, as in passed from command-line or .setreg files. + if (settingsRegistry.Get(projectRoot.Native(), projectRootKey)) { - settingsRegistry.Set(projectRootKey, projectRoot.c_str()); return projectRoot; } @@ -463,24 +500,13 @@ namespace AZ::SettingsRegistryMergeUtils void MergeSettingsToRegistry_Bootstrap(SettingsRegistryInterface& registry) { ConfigParserSettings parserSettings; - parserSettings.m_commentPrefixFunc = [](AZStd::string_view line) -> AZStd::string_view - { - constexpr AZStd::string_view commentPrefixes[]{ "--", ";","#" }; - for (AZStd::string_view commentPrefix : commentPrefixes) - { - if (size_t commentOffset = line.find(commentPrefix); commentOffset != AZStd::string_view::npos) - { - return line.substr(0, commentOffset); - } - } - return line; - }; parserSettings.m_registryRootPointerPath = BootstrapSettingsRootKey; MergeSettingsToRegistry_ConfigFile(registry, "bootstrap.cfg", parserSettings); } void MergeSettingsToRegistry_AddRuntimeFilePaths(SettingsRegistryInterface& registry) { + using FixedValueString = AZ::SettingsRegistryInterface::FixedValueString; // Binary folder AZ::IO::FixedMaxPath path = AZ::Utils::GetExecutableDirectory(); registry.Set(FilePathKey_BinaryFolder, path.LexicallyNormal().Native()); @@ -489,27 +515,25 @@ namespace AZ::SettingsRegistryMergeUtils AZ::IO::FixedMaxPath engineRoot = FindEngineRoot(registry); registry.Set(FilePathKey_EngineRootFolder, engineRoot.LexicallyNormal().Native()); - constexpr size_t bufferSize = 64; - auto buffer = AZStd::fixed_string::format("%s/project_path", BootstrapSettingsRootKey); - - AZ::SettingsRegistryInterface::FixedValueString projectPathKey(buffer); + auto projectPathKey = FixedValueString::format("%s/project_path", BootstrapSettingsRootKey); SettingsRegistryInterface::FixedValueString projectPathValue; if (registry.Get(projectPathValue, projectPathKey)) { // Cache folder // Get the name of the asset platform assigned by the bootstrap. First check for platform version such as "windows_assets" // and if that's missing just get "assets". - constexpr char platformName[] = AZ_TRAIT_OS_PLATFORM_CODENAME_LOWER; - - SettingsRegistryInterface::FixedValueString assetPlatform; - buffer = AZStd::fixed_string::format("%s/%s_assets", BootstrapSettingsRootKey, platformName); - AZStd::string_view assetPlatformKey(buffer); - if (!registry.Get(assetPlatform, assetPlatformKey)) + FixedValueString assetPlatform; + if (auto assetPlatformKey = FixedValueString::format("%s/%s_assets", BootstrapSettingsRootKey, AZ_TRAIT_OS_PLATFORM_CODENAME_LOWER); + !registry.Get(assetPlatform, assetPlatformKey)) { - buffer = AZStd::fixed_string::format("%s/assets", BootstrapSettingsRootKey); - assetPlatformKey = AZStd::string_view(buffer); + assetPlatformKey = FixedValueString::format("%s/assets", BootstrapSettingsRootKey); registry.Get(assetPlatform, assetPlatformKey); } + if (assetPlatform.empty()) + { + // Use the platform codename to retrieve the default asset platform value + assetPlatform = AZ::OSPlatformToDefaultAssetPlatform(AZ_TRAIT_OS_PLATFORM_CODENAME); + } // Project path - corresponds to the @devassets@ alias // NOTE: Here we append to engineRoot, but if projectPathValue is absolute then engineRoot is discarded. @@ -549,8 +573,7 @@ namespace AZ::SettingsRegistryMergeUtils { // Cache: project root - no corresponding fileIO alias, but this is where the asset database lives. // A registry override is accepted using the "project_cache_path" key. - buffer = AZStd::fixed_string::format("%s/project_cache_path", BootstrapSettingsRootKey); - AZStd::string_view projectCacheRootOverrideKey(buffer); + auto projectCacheRootOverrideKey = FixedValueString::format("%s/project_cache_path", BootstrapSettingsRootKey); // Clear path to make sure that the `project_cache_path` value isn't concatenated to the project path path.clear(); if (registry.Get(path.Native(), projectCacheRootOverrideKey)) @@ -807,6 +830,11 @@ namespace AZ::SettingsRegistryMergeUtils ++argumentIndex; commandLinePath.resize(commandLineRootSize); } + + // This key is used allow Notification Handlers to know when the command line has been updated within the + // registry. The value itself is meaningless. The JSON path of {CommandLineValueChangedKey} + // being passed to the Notification Event Handler indicates that the command line has be updated + registry.Set(CommandLineValueChangedKey, true); } bool GetCommandLineFromRegistry(SettingsRegistryInterface& registry, AZ::CommandLine& commandLine) @@ -823,10 +851,16 @@ namespace AZ::SettingsRegistryMergeUtils } else if (valueName == "Value" && !value.empty()) { - m_arguments.push_back(value); + // Make sure value types are in quotes in case they start with a command option prefix + m_arguments.push_back(QuoteArgument(value)); } } + AZStd::string QuoteArgument(AZStd::string_view arg) + { + return !arg.empty() ? AZStd::string::format(R"("%.*s")", aznumeric_cast(arg.size()), arg.data()) : AZStd::string{ arg }; + } + // The first parameter is skipped by the ComamndLine::Parse function so initialize // the container with one empty element AZ::CommandLine::ParamContainer m_arguments{ 1 }; diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h index dad6c36d0f..10b3c2f18b 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h @@ -57,6 +57,9 @@ namespace AZ::SettingsRegistryMergeUtils //! Root key for where command line are stored at within the settings registry inline static constexpr char CommandLineRootKey[] = "/Amazon/AzCore/Runtime/CommandLine"; + //! Key set to trigger a notification that the CommandLine has been stored within the settings registry + //! The value of the key has no meaning. Notification Handlers only need to check if the key was supplied + inline static constexpr char CommandLineValueChangedKey[] = "/Amazon/AzCore/Runtime/CommandLineChanged"; //! Root key where raw project settings (project.json) file is merged to settings registry inline static constexpr char ProjectSettingsRootKey[] = "/Amazon/Project/Settings"; @@ -74,6 +77,20 @@ namespace AZ::SettingsRegistryMergeUtils //! If it's still not found, attempt to find the project (by similar means) then reconcile the //! engine root by inspecting project.json and the engine manifest file. AZ::IO::FixedMaxPath FindEngineRoot(SettingsRegistryInterface& settingsRegistry); + + //! The algorithm that is used to find the project root is as follows + //! 1. The first time this function is it performs a upward scan for a project.json file from + //! the executable directory and if found stores that path to an internal key. + //! In the same step it injects the path into the front of list of command line parameters + //! using the --regset="{BootstrapSettingsRootKey}/project_path=" value + //! 2. Next the "{BootstrapSettingsRootKey}/project_path" is checked to see if it has a project path set + //! + //! The order in which the project path settings are overridden proceeds in the following order + //! 1. project_path set in the /bootstrap.cfg file + //! 2. project_path set in a *.setreg/*.setregpatch file + //! 3. project_path found by scanning upwards from the executable directory to the project.json path + //! 4. project_path set on the Command line via either --regset="{BootstrapSettingsRootKey}/project_path=" + //! or --project_path= AZ::IO::FixedMaxPath FindProjectRoot(SettingsRegistryInterface& settingsRegistry); //! Query the specializations that will be used when loading the Settings Registry. diff --git a/Code/Framework/AzCore/AzCore/azcore_files.cmake b/Code/Framework/AzCore/AzCore/azcore_files.cmake index e100b240c2..5357ed66a6 100644 --- a/Code/Framework/AzCore/AzCore/azcore_files.cmake +++ b/Code/Framework/AzCore/AzCore/azcore_files.cmake @@ -607,6 +607,8 @@ set(FILES Utils/Utils.h Script/lua/lua.h Memory/HeapSchema.cpp + PlatformId/PlatformDefaults.h + PlatformId/PlatformDefaults.cpp PlatformId/PlatformId.h PlatformId/PlatformId.cpp Socket/AzSocket_fwd.h diff --git a/Code/Framework/AzCore/CMakeLists.txt b/Code/Framework/AzCore/CMakeLists.txt index c77205a760..db2c79f0c9 100644 --- a/Code/Framework/AzCore/CMakeLists.txt +++ b/Code/Framework/AzCore/CMakeLists.txt @@ -40,14 +40,13 @@ ly_add_target( ${common_dir} ${AZ_CORE_RADTELEMETRY_INCLUDE_DIRECTORIES} BUILD_DEPENDENCIES - PRIVATE - 3rdParty::zlib - 3rdParty::zstd - 3rdParty::cityhash PUBLIC 3rdParty::Lua 3rdParty::RapidJSON 3rdParty::RapidXML + 3rdParty::zlib + 3rdParty::zstd + 3rdParty::cityhash ${AZ_CORE_RADTELEMETRY_BUILD_DEPENDENCIES} ) ly_add_source_properties( diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Character.h b/Code/Framework/AzFramework/AzFramework/Physics/Character.h index c43c6de9e8..d6f67706f4 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Character.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/Character.h @@ -28,7 +28,7 @@ namespace Physics class CharacterColliderNodeConfiguration { public: - AZ_RTTI(CharacterColliderNodeConfiguration, "{C16F3301-0979-400C-B734-692D83755C39}"); + AZ_RTTI(Physics::CharacterColliderNodeConfiguration, "{C16F3301-0979-400C-B734-692D83755C39}"); AZ_CLASS_ALLOCATOR_DECL virtual ~CharacterColliderNodeConfiguration() = default; @@ -42,7 +42,7 @@ namespace Physics class CharacterColliderConfiguration { public: - AZ_RTTI(CharacterColliderConfiguration, "{4DFF1434-DF5B-4ED5-BE0F-D3E66F9B331A}"); + AZ_RTTI(Physics::CharacterColliderConfiguration, "{4DFF1434-DF5B-4ED5-BE0F-D3E66F9B331A}"); AZ_CLASS_ALLOCATOR_DECL virtual ~CharacterColliderConfiguration() = default; @@ -63,21 +63,23 @@ namespace Physics { public: AZ_CLASS_ALLOCATOR(CharacterConfiguration, AZ::SystemAllocator, 0); - AZ_RTTI(CharacterConfiguration, "{58D5A6CA-113B-4AC3-8D53-239DB0C4E240}", AzPhysics::SimulatedBodyConfiguration); + AZ_RTTI(Physics::CharacterConfiguration, "{58D5A6CA-113B-4AC3-8D53-239DB0C4E240}", AzPhysics::SimulatedBodyConfiguration); virtual ~CharacterConfiguration() = default; static void Reflect(AZ::ReflectContext* context); - AzPhysics::CollisionGroups::Id m_collisionGroupId; ///< Which layers does this character collide with. - AzPhysics::CollisionLayer m_collisionLayer; ///< Which collision layer is this character on. - MaterialSelection m_materialSelection; ///< Material selected from library for the body associated with the character. - AZ::Vector3 m_upDirection = AZ::Vector3::CreateAxisZ(); ///< Up direction for character orientation and step behavior. - float m_maximumSlopeAngle = 30.0f; ///< The maximum slope on which the character can move, in degrees. - float m_stepHeight = 0.5f; ///< Affects what size steps the character can climb. - float m_minimumMovementDistance = 0.001f; ///< To avoid jittering, the controller will not attempt to move distances below this. - float m_maximumSpeed = 100.0f; ///< If the accumulated requested velocity for a tick exceeds this magnitude, it will be clamped. - AZStd::string m_colliderTag; ///< Used to identify the collider associated with the character controller. + AzPhysics::CollisionGroups::Id m_collisionGroupId; //!< Which layers does this character collide with. + AzPhysics::CollisionLayer m_collisionLayer; //!< Which collision layer is this character on. + MaterialSelection m_materialSelection; //!< Material selected from library for the body associated with the character. + AZ::Vector3 m_upDirection = AZ::Vector3::CreateAxisZ(); //!< Up direction for character orientation and step behavior. + float m_maximumSlopeAngle = 30.0f; //!< The maximum slope on which the character can move, in degrees. + float m_stepHeight = 0.5f; //!< Affects what size steps the character can climb. + float m_minimumMovementDistance = 0.001f; //!< To avoid jittering, the controller will not attempt to move distances below this. + float m_maximumSpeed = 100.0f; //!< If the accumulated requested velocity for a tick exceeds this magnitude, it will be clamped. + AZStd::string m_colliderTag; //!< Used to identify the collider associated with the character controller. + AZStd::shared_ptr m_shapeConfig = nullptr; //!< The shape to use when creating the character controller. + AZStd::vector> m_colliders; //!< The list of colliders to attach to the character controller. }; /// Basic implementation of common character-style needs as a WorldBody. Is not a full-functional ship-ready @@ -88,7 +90,7 @@ namespace Physics { public: AZ_CLASS_ALLOCATOR(Character, AZ::SystemAllocator, 0); - AZ_RTTI(Character, "{962E37A1-3401-4672-B896-0A6157CFAC97}", AzPhysics::SimulatedBody); + AZ_RTTI(Physics::Character, "{962E37A1-3401-4672-B896-0A6157CFAC97}", AzPhysics::SimulatedBody); ~Character() override = default; diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Configuration/SimulatedBodyConfiguration.h b/Code/Framework/AzFramework/AzFramework/Physics/Configuration/SimulatedBodyConfiguration.h index 47b05089de..203590adbb 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Configuration/SimulatedBodyConfiguration.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/Configuration/SimulatedBodyConfiguration.h @@ -29,7 +29,7 @@ namespace AzPhysics struct SimulatedBodyConfiguration { AZ_CLASS_ALLOCATOR_DECL; - AZ_RTTI(SimulatedBodyConfiguration, "{52844E3D-79C8-4F34-AF63-5C45ADE77F85}"); + AZ_RTTI(AzPhysics::SimulatedBodyConfiguration, "{52844E3D-79C8-4F34-AF63-5C45ADE77F85}"); static void Reflect(AZ::ReflectContext* context); SimulatedBodyConfiguration() = default; diff --git a/Code/Framework/AzFramework/AzFramework/Physics/SystemBus.h b/Code/Framework/AzFramework/AzFramework/Physics/SystemBus.h index 717f9e023c..f198551148 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/SystemBus.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/SystemBus.h @@ -246,26 +246,6 @@ namespace Physics using SystemRequests = System; using SystemRequestBus = AZ::EBus; - /// Physics character system global requests. - class CharacterSystemRequests - : public AZ::EBusTraits - { - public: - // EBusTraits - // singleton pattern - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - - virtual ~CharacterSystemRequests() = default; - - /// Creates the physics representation used to handle basic character interactions (also known as a character - /// controller). - virtual AZStd::unique_ptr CreateCharacter(const CharacterConfiguration& characterConfig, - const ShapeConfiguration& shapeConfig, AzPhysics::SceneHandle& sceneHandle) = 0; - }; - - typedef AZ::EBus CharacterSystemRequestBus; - /// Physics system global debug requests. class SystemDebugRequests : public AZ::EBusTraits diff --git a/Code/Framework/AzFramework/AzFramework/Platform/PlatformDefaults.cpp b/Code/Framework/AzFramework/AzFramework/Platform/PlatformDefaults.cpp deleted file mode 100644 index 81154bae35..0000000000 --- a/Code/Framework/AzFramework/AzFramework/Platform/PlatformDefaults.cpp +++ /dev/null @@ -1,338 +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. -* -*/ - -#include -#include - -#include - -namespace AzFramework -{ - static const char* PlatformNames[PlatformId::NumPlatformIds] = { PlatformPC, PlatformES3, PlatformIOS, PlatformOSX, PlatformProvo, PlatformSalem, PlatformJasper, PlatformServer, PlatformAll, PlatformAllClient }; - - const char* PlatformIdToPalFolder(AzFramework::PlatformId platform) - { -#ifdef IOS -#define AZ_REDEFINE_IOS_AT_END IOS -#undef IOS -#endif - switch (platform) - { - case AzFramework::PC: - return "PC"; - case AzFramework::ES3: - return "Android"; - case AzFramework::IOS: - return "iOS"; - case AzFramework::OSX: - return "Mac"; - case AzFramework::PROVO: - return "Provo"; - case AzFramework::SALEM: - return "Salem"; - case AzFramework::JASPER: - return "Jasper"; - case AzFramework::SERVER: - return "Server"; - case AzFramework::ALL: - case AzFramework::ALL_CLIENT: - case AzFramework::NumPlatformIds: - case AzFramework::Invalid: - default: - return ""; - } - -#ifdef AZ_REDEFINE_IOS_AT_END -#define IOS AZ_REDEFINE_IOS_AT_END -#endif - } - - const char* OSPlatformToDefaultAssetPlatform(AZStd::string_view osPlatform) - { - if (osPlatform == PlatformCodeNameWindows || osPlatform == PlatformCodeNameLinux) - { - return PlatformPC; - } - else if (osPlatform == PlatformCodeNameMac) - { - return PlatformOSX; - } - else if (osPlatform == PlatformCodeNameAndroid) - { - return PlatformES3; - } - else if (osPlatform == PlatformCodeNameiOS) - { - return PlatformIOS; - } - else if (osPlatform == PlatformCodeNameProvo) - { - return PlatformProvo; - } - else if (osPlatform == PlatformCodeNameSalem) - { - return PlatformSalem; - } - else if (osPlatform == PlatformCodeNameJasper) - { - return PlatformJasper; - } - - AZ_Error("PlatformDefault", false, R"(Supplied OS platform "%.*s" does not have a corresponding default asset platform)", - aznumeric_cast(osPlatform.size()), osPlatform.data()); - return ""; - } - - PlatformFlags PlatformHelper::GetPlatformFlagFromPlatformIndex(PlatformId platformIndex) - { - if (platformIndex < 0 || platformIndex > PlatformId::NumPlatformIds) - { - return PlatformFlags::Platform_NONE; - } - if (platformIndex == PlatformId::ALL) - { - return PlatformFlags::Platform_ALL; - } - if (platformIndex == PlatformId::ALL_CLIENT) - { - return PlatformFlags::Platform_ALL_CLIENT; - } - return static_cast(1 << platformIndex); - } - - AZStd::fixed_vector PlatformHelper::GetPlatforms(PlatformFlags platformFlags) - { - AZStd::fixed_vector platforms; - for (int platformNum = 0; platformNum < PlatformId::NumPlatformIds; ++platformNum) - { - const bool isAllPlatforms = PlatformId::ALL == static_cast(platformNum) - && ((platformFlags & PlatformFlags::Platform_ALL) != PlatformFlags::Platform_NONE); - - const bool isAllClientPlatforms = PlatformId::ALL_CLIENT == static_cast(platformNum) - && ((platformFlags & PlatformFlags::Platform_ALL_CLIENT) != PlatformFlags::Platform_NONE); - - if (isAllPlatforms || isAllClientPlatforms - || (platformFlags & static_cast(1 << platformNum)) != PlatformFlags::Platform_NONE) - { - platforms.push_back(PlatformNames[platformNum]); - } - } - - return platforms; - } - - AZStd::fixed_vector PlatformHelper::GetPlatformsInterpreted(PlatformFlags platformFlags) - { - return GetPlatforms(GetPlatformFlagsInterpreted(platformFlags)); - } - - AZStd::fixed_vector PlatformHelper::GetPlatformIndices(PlatformFlags platformFlags) - { - AZStd::fixed_vector platformIndices; - for (int i = 0; i < PlatformId::NumPlatformIds; i++) - { - PlatformId index = static_cast(i); - if ((GetPlatformFlagFromPlatformIndex(index) & platformFlags) != PlatformFlags::Platform_NONE) - { - platformIndices.emplace_back(index); - } - } - return platformIndices; - } - - AZStd::fixed_vector PlatformHelper::GetPlatformIndicesInterpreted(PlatformFlags platformFlags) - { - return GetPlatformIndices(GetPlatformFlagsInterpreted(platformFlags)); - } - - PlatformFlags PlatformHelper::GetPlatformFlag(AZStd::string_view platform) - { - int platformIndex = GetPlatformIndexFromName(platform); - if (platformIndex == PlatformId::Invalid) - { - AZ_Error("PlatformDefault", false, "Invalid Platform ( %.*s ).\n", static_cast(platform.length()), platform.data()); - return PlatformFlags::Platform_NONE; - } - - if(platformIndex == PlatformId::ALL) - { - return PlatformFlags::Platform_ALL; - } - - if (platformIndex == PlatformId::ALL_CLIENT) - { - return PlatformFlags::Platform_ALL_CLIENT; - } - - return static_cast(1 << platformIndex); - } - - const char* PlatformHelper::GetPlatformName(PlatformId platform) - { - if (platform < 0 || platform > PlatformId::NumPlatformIds) - { - return "invalid"; - } - return PlatformNames[platform]; - } - - void PlatformHelper::AppendPlatformCodeNames(AZStd::fixed_vector& platformCodes, AZStd::string_view platformId) - { - PlatformId platform = GetPlatformIdFromName(platformId); - AZ_Assert(platform != PlatformId::Invalid, "Unsupported Platform ID: %.*s", static_cast(platformId.length()), platformId.data()); - AppendPlatformCodeNames(platformCodes, platform); - } - - void PlatformHelper::AppendPlatformCodeNames(AZStd::fixed_vector& platformCodes, PlatformId platformId) - { -// The IOS SDK has a macro that defines IOS as 1 which causes the enum below to be incorrectly converted to "PlatformId::1". -#pragma push_macro("IOS") -#undef IOS - // To reduce work the Asset Processor groups assets that can be shared between hardware platforms together. For this - // reason "PC" can for instance cover both the Windows and Linux platforms and "IOS" can cover AppleTV and iOS. - switch (platformId) - { - case PlatformId::PC: - platformCodes.emplace_back(PlatformCodeNameWindows); - platformCodes.emplace_back(PlatformCodeNameLinux); - break; - case PlatformId::ES3: - platformCodes.emplace_back(PlatformCodeNameAndroid); - break; - case PlatformId::IOS: - platformCodes.emplace_back(PlatformCodeNameiOS); - break; - case PlatformId::OSX: - platformCodes.emplace_back(PlatformCodeNameMac); - break; - case PlatformId::PROVO: - platformCodes.emplace_back(PlatformCodeNameProvo); - break; - case PlatformId::SALEM: - platformCodes.emplace_back(PlatformCodeNameSalem); - break; - case PlatformId::JASPER: - platformCodes.emplace_back(PlatformCodeNameJasper); - break; - case PlatformId::SERVER: - // Server is not a hardware platform - break; - default: - AZ_Assert(false, "Unsupported Platform ID: %i", platformId); - break; - } -#pragma pop_macro("IOS") - } - - int PlatformHelper::GetPlatformIndexFromName(AZStd::string_view platformName) - { - for (int idx = 0; idx < PlatformId::NumPlatformIds; idx++) - { - if (platformName == PlatformNames[idx]) - { - return idx; - } - } - - return PlatformId::Invalid; - } - - PlatformId PlatformHelper::GetPlatformIdFromName(AZStd::string_view platformName) - { - return aznumeric_caster(GetPlatformIndexFromName(platformName)); - } - - AssetPlatformCombinedString PlatformHelper::GetCommaSeparatedPlatformList(PlatformFlags platformFlags) - { - AZStd::fixed_vector platformNames = GetPlatforms(platformFlags); - AssetPlatformCombinedString platformsString; - AZ::StringFunc::Join(platformsString, platformNames.begin(), platformNames.end(), ", "); - return platformsString; - } - - PlatformFlags PlatformHelper::GetPlatformFlagsInterpreted(PlatformFlags platformFlags) - { - PlatformFlags returnFlags = PlatformFlags::Platform_NONE; - - if((platformFlags & PlatformFlags::Platform_ALL) != PlatformFlags::Platform_NONE) - { - for (int i = 0; i < NumPlatforms; ++i) - { - auto platformId = static_cast(i); - - if (platformId != PlatformId::ALL && platformId != PlatformId::ALL_CLIENT) - { - returnFlags |= GetPlatformFlagFromPlatformIndex(platformId); - } - } - } - else if((platformFlags & PlatformFlags::Platform_ALL_CLIENT) != PlatformFlags::Platform_NONE) - { - for (int i = 0; i < NumPlatforms; ++i) - { - auto platformId = static_cast(i); - - if (platformId != PlatformId::ALL && platformId != PlatformId::ALL_CLIENT && platformId != PlatformId::SERVER) - { - returnFlags |= GetPlatformFlagFromPlatformIndex(platformId); - } - } - } - else - { - returnFlags = platformFlags; - } - - return returnFlags; - } - - bool PlatformHelper::IsSpecialPlatform(PlatformFlags platformFlags) - { - return (platformFlags & PlatformFlags::Platform_ALL) != PlatformFlags::Platform_NONE - || (platformFlags & PlatformFlags::Platform_ALL_CLIENT) != PlatformFlags::Platform_NONE; - } - - bool HasFlagHelper(PlatformFlags flags, PlatformFlags checkPlatform) - { - return (flags & checkPlatform) == checkPlatform; - } - - - bool PlatformHelper::HasPlatformFlag(PlatformFlags flags, PlatformId checkPlatform) - { - // If checkPlatform contains any kind of invalid id, just exit out here - if(checkPlatform == PlatformId::Invalid || checkPlatform == NumPlatforms) - { - return false; - } - - // ALL_CLIENT + SERVER = ALL - if(HasFlagHelper(flags, PlatformFlags::Platform_ALL_CLIENT | PlatformFlags::Platform_SERVER)) - { - flags = PlatformFlags::Platform_ALL; - } - - if(HasFlagHelper(flags, PlatformFlags::Platform_ALL)) - { - // It doesn't matter what checkPlatform is set to in this case, just return true - return true; - } - - if(HasFlagHelper(flags, PlatformFlags::Platform_ALL_CLIENT)) - { - return checkPlatform != PlatformId::SERVER; - } - - return HasFlagHelper(flags, GetPlatformFlagFromPlatformIndex(checkPlatform)); - } - -} diff --git a/Code/Framework/AzFramework/AzFramework/Platform/PlatformDefaults.h b/Code/Framework/AzFramework/AzFramework/Platform/PlatformDefaults.h index d7f467ec0f..13f7fa20e5 100644 --- a/Code/Framework/AzFramework/AzFramework/Platform/PlatformDefaults.h +++ b/Code/Framework/AzFramework/AzFramework/Platform/PlatformDefaults.h @@ -12,144 +12,12 @@ #pragma once -#include -#include -#include -#include -#include - -// On IOS builds IOS will be defined and interfere with the below enums -#pragma push_macro("IOS") -#undef IOS +#include +// As the Platform defaults is needed within AzCore, +// those structures have been moved to AzCore and brought into +// The AzFramework namespace for backwards compatibility namespace AzFramework { - constexpr char PlatformPC[] = "pc"; - constexpr char PlatformES3[] = "es3"; - constexpr char PlatformIOS[] = "ios"; - constexpr char PlatformOSX[] = "osx_gl"; - constexpr char PlatformProvo[] = "provo"; - constexpr char PlatformSalem[] = "salem"; - constexpr char PlatformJasper[] = "jasper"; - constexpr char PlatformServer[] = "server"; - - constexpr char PlatformCodeNameWindows[] = "Windows"; - constexpr char PlatformCodeNameLinux[] = "Linux"; - constexpr char PlatformCodeNameAndroid[] = "Android"; - constexpr char PlatformCodeNameiOS[] = "iOS"; - constexpr char PlatformCodeNameMac[] = "Mac"; - constexpr char PlatformCodeNameProvo[] = "Provo"; - constexpr char PlatformCodeNameSalem[] = "Salem"; - constexpr char PlatformCodeNameJasper[] = "Jasper"; - constexpr char PlatformAll[] = "all"; - constexpr char PlatformAllClient[] = "all_client"; - - // Used for the capacity of a fixed vector to store the code names of platforms - // The value needs to be higher than the number of unique OS platforms that are supported(at this time 8) - constexpr size_t MaxPlatformCodeNames = 16; - - //! This platform enum have platform values in sequence and can also be used to get the platform count. - AZ_ENUM_WITH_UNDERLYING_TYPE(PlatformId, int, - (Invalid, -1), - PC, - ES3, - IOS, - OSX, - PROVO, - SALEM, - JASPER, - SERVER, // Corresponds to the customer's flavor of "server" which could be windows, ubuntu, etc - ALL, - ALL_CLIENT, - - // Add new platforms above this - NumPlatformIds - ); - constexpr int NumClientPlatforms = 7; - constexpr int NumPlatforms = NumClientPlatforms + 1; // 1 "Server" platform currently - enum class PlatformFlags : AZ::u32 - { - Platform_NONE = 0x00, - Platform_PC = 1 << PlatformId::PC, - Platform_ES3 = 1 << PlatformId::ES3, - Platform_IOS = 1 << PlatformId::IOS, - Platform_OSX = 1 << PlatformId::OSX, - Platform_PROVO = 1 << PlatformId::PROVO, - Platform_SALEM = 1 << PlatformId::SALEM, - Platform_JASPER = 1 << PlatformId::JASPER, - Platform_SERVER = 1 << PlatformId::SERVER, - - // A special platform that will always correspond to all platforms, even if new ones are added - Platform_ALL = 1ULL << 30, - - // A special platform that will always correspond to all non-server platforms, even if new ones are added - Platform_ALL_CLIENT = 1ULL << 31, - - AllNamedPlatforms = Platform_PC | Platform_ES3 | Platform_IOS | Platform_OSX | Platform_PROVO | Platform_SALEM | Platform_JASPER | Platform_SERVER, - }; - - AZ_DEFINE_ENUM_BITWISE_OPERATORS(PlatformFlags); - - // 32 characters should be more than enough to store a platform name - using AssetPlatformFixedString = AZStd::fixed_string<32>; - // Fixed string which can store a comma separated list of platforms names - // Additional byte is added to take into account the comma - using AssetPlatformCombinedString = AZStd::fixed_string<(AssetPlatformFixedString{}.max_size() + 1) * PlatformId::NumPlatformIds>; - - const char* PlatformIdToPalFolder(AzFramework::PlatformId platform); - - const char* OSPlatformToDefaultAssetPlatform(AZStd::string_view osPlatform); - - //! Platform Helper is an utility class that can be used to retrieve platform related information - class PlatformHelper - { - public: - - //! Given a platformIndex returns the platform name - static const char* GetPlatformName(PlatformId platform); - - //! Converts the platform name to the platform code names as defined in AZ_TRAIT_OS_PLATFORM_CODENAME. - static void AppendPlatformCodeNames(AZStd::fixed_vector& platformCodes, AZStd::string_view platformName); - - //! Converts the platform name to the platform code names as defined in AZ_TRAIT_OS_PLATFORM_CODENAME. - static void AppendPlatformCodeNames(AZStd::fixed_vector& platformCodes, PlatformId platformId); - - //! Given a platform name returns a platform index. - //! If the platform is not found, the method returns -1. - static int GetPlatformIndexFromName(AZStd::string_view platformName); - - //! Given a platform name returns a platform id. - //! If the platform is not found, the method returns -1. - static PlatformId GetPlatformIdFromName(AZStd::string_view platformName); - - //! Given a platformIndex returns the platformFlags - static PlatformFlags GetPlatformFlagFromPlatformIndex(PlatformId platform); - - //! Given a platformFlags returns all the platform identifiers that are set. - static AZStd::fixed_vector GetPlatforms(PlatformFlags platformFlags); - //! Given a platformFlags returns all the platform identifiers that are set, with special flags interpreted. Do not use the result for saving - static AZStd::fixed_vector GetPlatformsInterpreted(PlatformFlags platformFlags); - - //! Given a platformFlags return a list of PlatformId indices - static AZStd::fixed_vector GetPlatformIndices(PlatformFlags platformFlags); - //! Given a platformFlags return a list of PlatformId indices, with special flags interpreted. Do not use the result for saving - static AZStd::fixed_vector GetPlatformIndicesInterpreted(PlatformFlags platformFlags); - - //! Given a platform identifier returns its corresponding platform flag. - static PlatformFlags GetPlatformFlag(AZStd::string_view platform); - - //! Given any platformFlags returns a string listing the input platforms - static AssetPlatformCombinedString GetCommaSeparatedPlatformList(PlatformFlags platformFlags); - - //! If platformFlags contains any special flags, they are removed and replaced with the normal flags they represent - static PlatformFlags GetPlatformFlagsInterpreted(PlatformFlags platformFlags); - - //! Returns true if platformFlags contains any special flags - static bool IsSpecialPlatform(PlatformFlags platformFlags); - - //! Returns true if platformFlags has checkPlatform flag set. - static bool HasPlatformFlag(PlatformFlags platformFlags, PlatformId checkPlatform); - }; + using namespace AZ::PlatformDefaults; } - -#pragma pop_macro("IOS") diff --git a/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp b/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp index 5acf4e75d1..7e968ffcd8 100644 --- a/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp +++ b/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp @@ -42,8 +42,14 @@ namespace AzFramework::ProjectManager AZ::CommandLine commandLine; commandLine.Parse(argc, argv); AZ::SettingsRegistryImpl settingsRegistry; + // Store the Command line to the Setting Registry + + AZ::SettingsRegistryMergeUtils::StoreCommandLineToRegistry(settingsRegistry, commandLine); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_Bootstrap(settingsRegistry); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {}); + // Retrieve Command Line from Settings Registry, it may have been updated by the call to FindEngineRoot() + // in MergeSettingstoRegistry_ConfigFile + AZ::SettingsRegistryMergeUtils::GetCommandLineFromRegistry(settingsRegistry, commandLine); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(settingsRegistry, commandLine, false); engineRootPath = AZ::SettingsRegistryMergeUtils::FindEngineRoot(settingsRegistry); projectRootPath = AZ::SettingsRegistryMergeUtils::FindProjectRoot(settingsRegistry); diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/MultiViewportController.h b/Code/Framework/AzFramework/AzFramework/Viewport/MultiViewportController.h index 54aa4394cc..2649655f50 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/MultiViewportController.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/MultiViewportController.h @@ -37,6 +37,7 @@ namespace AzFramework // ViewportControllerInterface ... bool HandleInputChannelEvent(const ViewportControllerInputEvent& event) override; + void ResetInputChannels() override; void UpdateViewport(const ViewportControllerUpdateEvent& event) override; void RegisterViewportContext(ViewportId viewport) override; void UnregisterViewportContext(ViewportId viewport) override; @@ -58,6 +59,7 @@ namespace AzFramework ViewportId GetViewportId() const { return m_viewportId; } virtual bool HandleInputChannelEvent([[maybe_unused]]const ViewportControllerInputEvent& event) { return false; } + virtual void ResetInputChannels() {} virtual void UpdateViewport([[maybe_unused]]const ViewportControllerUpdateEvent& event) {} private: diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/MultiViewportController.inl b/Code/Framework/AzFramework/AzFramework/Viewport/MultiViewportController.inl index 011c30b520..cc59418dac 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/MultiViewportController.inl +++ b/Code/Framework/AzFramework/AzFramework/Viewport/MultiViewportController.inl @@ -30,6 +30,15 @@ namespace AzFramework return instanceIt->second->HandleInputChannelEvent(event); } + template + void MultiViewportController::ResetInputChannels() + { + for (auto instanceIt = m_instances.begin(); instanceIt != m_instances.end(); ++instanceIt) + { + instanceIt->second->ResetInputChannels(); + } + } + template void MultiViewportController::UpdateViewport(const ViewportControllerUpdateEvent& event) { diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.cpp index 39cdb1440e..1dd608319a 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.cpp @@ -49,6 +49,11 @@ namespace AzFramework bool ViewportControllerList::HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) { + if (!IsEnabled()) + { + return false; + } + // If our event priority is "custom", we should dispatch at all priority levels in order using AzFramework::ViewportControllerPriority; if (event.m_priority == AzFramework::ViewportControllerPriority::DispatchToAllPriorities) @@ -76,6 +81,23 @@ namespace AzFramework } } + void ViewportControllerList::ResetInputChannels() + { + // We don't need to send this while we're disabled, we're guaranteed to call ResetInputChannels after being re-enabled. + if (!IsEnabled()) + { + return; + } + + for (const auto& controllerList : m_controllers) + { + for (const auto& controller : controllerList.second) + { + controller->ResetInputChannels(); + } + } + } + bool ViewportControllerList::DispatchInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) { if (auto priorityListIt = m_controllers.find(event.m_priority); priorityListIt != m_controllers.end()) @@ -106,6 +128,11 @@ namespace AzFramework void ViewportControllerList::UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) { + if (!IsEnabled()) + { + return; + } + // If our event priority is "custom", we should dispatch at all priority levels in reverse order // Reverse order lets high priority controllers get the last say in viewport update operations using AzFramework::ViewportControllerPriority; @@ -174,4 +201,22 @@ namespace AzFramework } } } + + bool ViewportControllerList::IsEnabled() const + { + return m_enabled; + } + + void ViewportControllerList::SetEnabled(bool enabled) + { + if (m_enabled != enabled) + { + m_enabled = enabled; + // If we've been re-enabled, reset our input channels as they may have missed state changes. + if (m_enabled) + { + ResetInputChannels(); + } + } + } } //namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h index 294a784dff..9da1d65dff 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h @@ -37,6 +37,9 @@ namespace AzFramework //! either a controller returns true to consume the event in OnInputChannelEvent or the controller list is exhausted. //! InputChannelEvents are sent to controllers in priority order (from the lowest priority value to the highest). bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override; + //! Dispatches a ResetInputChannels call to all controllers registered to this list. + //! Calls to controllers are made in an undefined order. + void ResetInputChannels() override; //! Dispatches an update tick to all controllers registered to this list. //! This occurs in *reverse* priority order (i.e. from the highest priority value to the lowest) so that //! controllers with the highest registration priority may override the transforms of the controllers with the @@ -50,6 +53,12 @@ namespace AzFramework //! All ViewportControllerLists have a priority of Custom to ensure //! that they receive events at all priorities from any parent controllers. AzFramework::ViewportControllerPriority GetPriority() const { return ViewportControllerPriority::DispatchToAllPriorities; } + //! Returns true if this controller list is enabled, i.e. + //! it is accepting and forwarding input and update events to its children. + bool IsEnabled() const; + //! Set this controller list's enabled state. + //! If a controller list is disabled, it will ignore all input and update events rather than dispatching them to its children. + void SetEnabled(bool enabled); private: void SortControllers(); @@ -58,5 +67,6 @@ namespace AzFramework AZStd::unordered_map> m_controllers; AZStd::unordered_set m_viewports; + bool m_enabled = true; }; } //namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake index cde2afb930..312a3766ac 100644 --- a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake +++ b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake @@ -317,7 +317,6 @@ set(FILES Terrain/TerrainDataRequestBus.h Terrain/TerrainDataRequestBus.cpp Platform/PlatformDefaults.h - Platform/PlatformDefaults.cpp Windowing/WindowBus.h Windowing/NativeWindow.cpp Windowing/NativeWindow.h diff --git a/Code/Framework/AzFramework/CMakeLists.txt b/Code/Framework/AzFramework/CMakeLists.txt index f62f205efd..50e1fcb5a4 100644 --- a/Code/Framework/AzFramework/CMakeLists.txt +++ b/Code/Framework/AzFramework/CMakeLists.txt @@ -33,12 +33,12 @@ ly_add_target( BUILD_DEPENDENCIES PRIVATE AZ::AzCore + PUBLIC + AZ::GridMate 3rdParty::md5 3rdParty::zlib 3rdParty::zstd 3rdParty::lz4 - PUBLIC - AZ::GridMate ) if(LY_ENABLE_STATISTICAL_PROFILING) diff --git a/Code/Framework/AzGameFramework/AzGameFramework/Application/GameApplication.cpp b/Code/Framework/AzGameFramework/AzGameFramework/Application/GameApplication.cpp index f4fc9364f7..edd4af293d 100644 --- a/Code/Framework/AzGameFramework/AzGameFramework/Application/GameApplication.cpp +++ b/Code/Framework/AzGameFramework/AzGameFramework/Application/GameApplication.cpp @@ -80,6 +80,8 @@ namespace AzGameFramework AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_ProjectUserRegistry(registry, AZ_TRAIT_OS_PLATFORM_CODENAME, specializations, &scratchBuffer); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(registry, m_commandLine, true); #endif + // Update the Runtime file paths in case the "{BootstrapSettingsRootKey}/assets" key was overriden by a setting registry + AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(registry); } AZ::ComponentTypeList GameApplication::GetRequiredSystemComponents() const diff --git a/Code/Framework/AzNetworking/AzNetworking/Serialization/ISerializer.inl b/Code/Framework/AzNetworking/AzNetworking/Serialization/ISerializer.inl index 2d983c2061..df3b08f798 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Serialization/ISerializer.inl +++ b/Code/Framework/AzNetworking/AzNetworking/Serialization/ISerializer.inl @@ -18,6 +18,8 @@ #include #include #include +#include +#include namespace AzNetworking { @@ -173,6 +175,22 @@ namespace AzNetworking return true; } }; + + template<> + struct SerializeObjectHelper + { + static bool SerializeObject(ISerializer& serializer, AZ::Name& value) + { + AZ::Name::Hash nameHash = value.GetHash(); + bool result = serializer.Serialize(nameHash, "NameHash"); + + if (result && serializer.GetSerializerMode() == SerializerMode::WriteToObject) + { + value = AZ::NameDictionary::Instance().FindName(nameHash); + } + return result; + } + }; } #include diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h b/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h index 0c631cf09e..f12ab71936 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h @@ -578,16 +578,6 @@ namespace AzToolsFramework */ virtual bool IsEditorInIsolationMode() = 0; - /*! - * Get the engine root path that the current tool is running under. - */ - virtual const char* GetEngineRootPath() const = 0; - - /** - * Get the version of the engine the current tools application is running under - */ - virtual const char* GetEngineVersion() const = 0; - /** * Creates and adds a new entity to the tools application from components which match at least one of the requiredTags * The tag matching occurs on AZ::Edit::SystemComponentTags attribute from the reflected class data in the serialization context diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp index 352048f5f0..22c1390828 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp @@ -224,112 +224,6 @@ namespace AzToolsFramework } // Internal -#define AZ_MAX_ENGINE_VERSION_LEN 64 - // Private Implementation class to manage the engine root and version - // Note: We are not using any AzCore classes because the ToolsApplication - // initialization happens early on, before the Allocators get instantiated, - // so we are using Qt privately instead - class ToolsApplication::EngineConfigImpl - { - private: - friend class ToolsApplication; - - typedef QMap EngineJsonMap; - - EngineConfigImpl(const char* logWindow, const char* fileName) - : m_logWindow(logWindow) - , m_fileName(fileName) - { - m_engineRoot[0] = '\0'; - m_engineVersion[0] = '\0'; - } - - char m_engineRoot[AZ_MAX_PATH_LEN]; - char m_engineVersion[AZ_MAX_ENGINE_VERSION_LEN]; - EngineJsonMap m_engineConfigMap; - const char* m_logWindow; - const char* m_fileName; - - - // Read an engine configuration into a map of key/value pairs - bool ReadEngineConfigIntoMap(QString engineJsonPath, EngineJsonMap& engineJsonMap) - { - QFile engineJsonFile(engineJsonPath); - if (!engineJsonFile.open(QIODevice::ReadOnly | QIODevice::Text)) - { - AZ_Warning(m_logWindow, false, "Unable to open file '%s' in the current root directory", engineJsonPath.toUtf8().data()); - return false; - } - - QByteArray engineJsonData = engineJsonFile.readAll(); - engineJsonFile.close(); - QJsonDocument engineJsonDoc(QJsonDocument::fromJson(engineJsonData)); - if (engineJsonDoc.isNull()) - { - AZ_Warning(m_logWindow, false, "Unable to read file '%s' in the current root directory", engineJsonPath.toUtf8().data()); - return false; - } - - QJsonObject engineJsonRoot = engineJsonDoc.object(); - for (const QString& configKey : engineJsonRoot.keys()) - { - QJsonValue configValue = engineJsonRoot[configKey]; - if (configValue.isString() || configValue.isDouble()) - { - // Only map strings and numbers, ignore every other type - engineJsonMap[configKey] = configValue.toString(); - } - else - { - AZ_Warning(m_logWindow, false, "Ignoring key '%s' from '%s', unsupported type.", configKey.toUtf8().data(), engineJsonPath.toUtf8().data()); - } - } - return true; - } - - // Initialize the engine config object based on the current - bool Initialize(const char* currentEngineRoot) - { - // Start with the app root as the engine root (legacy), but check to see if the engine root - // is external to the app root - azstrncpy(m_engineRoot, AZ_ARRAY_SIZE(m_engineRoot), currentEngineRoot, strlen(currentEngineRoot) + 1); - - // From the appRoot, check and see if we can read any external engine reference in engine.json - QString engineJsonFileName = QString(m_fileName); - QString engineJsonFilePath = QDir(currentEngineRoot).absoluteFilePath(engineJsonFileName); - - // From the appRoot, check and see if we can read any external engine reference in engine.json - if (!QFile::exists(engineJsonFilePath)) - { - AZ_Warning(m_logWindow, false, "Unable to find '%s' in the current app root directory.", m_fileName); - return false; - } - if (!ReadEngineConfigIntoMap(engineJsonFilePath, m_engineConfigMap)) - { - AZ_Warning(m_logWindow, false, "Defaulting root engine path to '%s'", currentEngineRoot); - return false; - } - - // Read in the local engine version value - auto localEngineVersionValue = m_engineConfigMap.find(QString(AzToolsFramework::Internal::s_engineConfigEngineVersionKey)); - QString localEngineVersion(localEngineVersionValue.value()); - azstrncpy(m_engineVersion, AZ_ARRAY_SIZE(m_engineVersion), localEngineVersion.toUtf8().data(), localEngineVersion.length() + 1); - - return true; - } - - const char* GetEngineRoot() const - { - return m_engineRoot; - } - - const char* GetEngineVersion() const - { - return m_engineVersion; - } - }; - - ToolsApplication::ToolsApplication(int* argc, char*** argv) : AzFramework::Application(argc, argv) , m_selectionBounds(AZ::Aabb()) @@ -339,7 +233,6 @@ namespace AzToolsFramework , m_isInIsolationMode(false) { ToolsApplicationRequests::Bus::Handler::BusConnect(); - m_engineConfigImpl.reset(new ToolsApplication::EngineConfigImpl(AzToolsFramework::Internal::s_startupLogWindow, AzToolsFramework::Internal::s_engineConfigFileName)); m_undoCache.RegisterToUndoCacheInterface(); } @@ -391,7 +284,6 @@ namespace AzToolsFramework void ToolsApplication::Start(const Descriptor& descriptor, const StartupParameters& startupParameters/* = StartupParameters()*/) { Application::Start(descriptor, startupParameters); - InitializeEngineConfig(); m_editorEntityManager.Start(); @@ -399,14 +291,6 @@ namespace AzToolsFramework AZ_Assert(m_editorEntityAPI, "ToolsApplication - Could not retrieve instance of EditorEntityAPI"); } - void ToolsApplication::InitializeEngineConfig() - { - if (!m_engineConfigImpl->Initialize(GetEngineRoot())) - { - AZ_Warning(AzToolsFramework::Internal::s_startupLogWindow, false, "Defaulting engine root path to '%s'", GetEngineRoot()); - } - } - void ToolsApplication::StartCommon(AZ::Entity* systemEntity) { Application::StartCommon(systemEntity); @@ -1832,16 +1716,6 @@ namespace AzToolsFramework return m_isInIsolationMode; } - const char* ToolsApplication::GetEngineRootPath() const - { - return m_engineConfigImpl->GetEngineRoot(); - } - - const char* ToolsApplication::GetEngineVersion() const - { - return m_engineConfigImpl->GetEngineVersion(); - } - void ToolsApplication::CreateAndAddEntityFromComponentTags(const AZStd::vector& requiredTags, const char* entityName) { if (!entityName || !entityName[0]) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h index ef9f190309..0f038422ce 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h @@ -150,8 +150,6 @@ namespace AzToolsFramework void EnterEditorIsolationMode() override; void ExitEditorIsolationMode() override; bool IsEditorInIsolationMode() override; - const char* GetEngineRootPath() const override; - const char* GetEngineVersion() const override; void CreateAndAddEntityFromComponentTags(const AZStd::vector& requiredTags, const char* entityName) override; @@ -174,7 +172,6 @@ namespace AzToolsFramework void CreateUndosForDirtyEntities(); void ConsistencyCheckUndoCache(); - void InitializeEngineConfig(); AZ::Aabb m_selectionBounds; EntityIdList m_selectedEntities; EntityIdList m_highlightedEntities; @@ -186,9 +183,6 @@ namespace AzToolsFramework bool m_isInIsolationMode; EntityIdSet m_isolatedEntityIdSet; - class EngineConfigImpl; - AZStd::unique_ptr m_engineConfigImpl; - EditorEntityAPI* m_editorEntityAPI = nullptr; EditorEntityManager m_editorEntityManager; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/SearchWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/SearchWidget.cpp index 7c2f26042f..d2edbcce32 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/SearchWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/SearchWidget.cpp @@ -170,6 +170,15 @@ namespace AzToolsFramework return m_filter; } + QSharedPointer SearchWidget::GetStringFilter() const + { + return m_stringFilter; + } + + QSharedPointer SearchWidget::GetTypesFilter() const + { + return m_typesFilter; + } } // namespace AssetBrowser } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/SearchWidget.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/SearchWidget.h index 0453333c94..be649bc81d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/SearchWidget.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Search/SearchWidget.h @@ -39,6 +39,10 @@ namespace AzToolsFramework QSharedPointer GetFilter() const; + QSharedPointer GetStringFilter() const; + + QSharedPointer GetTypesFilter() const; + QString GetFilterString() const { return textFilter(); } void ClearStringFilter() { ClearTextFilter(); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextComponent.cpp index ad458b0434..44c8487272 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextComponent.cpp @@ -491,6 +491,14 @@ namespace AzToolsFramework EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::OnStartPlayInEditorBegin); + //cache the current selected entities. + ToolsApplicationRequests::Bus::BroadcastResult(m_selectedBeforeStartingGame, &ToolsApplicationRequests::GetSelectedEntities); + //deselect entities if selected when entering game mode before deactivating the entities in StartPlayInEditor(...) + if (!m_selectedBeforeStartingGame.empty()) + { + ToolsApplicationRequests::Bus::Broadcast(&ToolsApplicationRequests::MarkEntitiesDeselected, m_selectedBeforeStartingGame); + } + if (m_isLegacySliceService) { SliceEditorEntityOwnershipService* editorEntityOwnershipService = @@ -507,8 +515,6 @@ namespace AzToolsFramework m_isRunningGame = true; - ToolsApplicationRequests::Bus::BroadcastResult(m_selectedBeforeStartingGame, &ToolsApplicationRequests::GetSelectedEntities); - EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::OnStartPlayInEditor); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp index 6ab3625dd2..629dcd639d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp @@ -136,6 +136,48 @@ namespace AzToolsFramework return entity->GetName(); } + EntityList EntityIdListToEntityList(const EntityIdList& inputEntityIds) + { + EntityList entities; + entities.reserve(inputEntityIds.size()); + + for (AZ::EntityId entityId : inputEntityIds) + { + if (!entityId.IsValid()) + { + continue; + } + + if (auto entity = GetEntityById(entityId)) + { + entities.emplace_back(entity); + } + } + + return entities; + } + + EntityList EntityIdSetToEntityList(const EntityIdSet& inputEntityIds) + { + EntityList entities; + entities.reserve(inputEntityIds.size()); + + for (AZ::EntityId entityId : inputEntityIds) + { + if (!entityId.IsValid()) + { + continue; + } + + if (auto entity = GetEntityById(entityId)) + { + entities.emplace_back(entity); + } + } + + return entities; + } + void GetAllComponentsForEntity(const AZ::Entity* entity, AZ::Entity::ComponentArrayType& componentsOnEntity) { if (entity) @@ -1068,6 +1110,45 @@ namespace AzToolsFramework return !allEntityClonesContainer.m_entities.empty(); } + EntityIdSet GetCulledEntityHierarchy(const EntityIdList& entities) + { + EntityIdSet culledEntities; + + for (const AZ::EntityId& entityId : entities) + { + bool selectionIncludesTransformHeritage = false; + AZ::EntityId parentEntityId = entityId; + do + { + AZ::EntityId nextParentId; + AZ::TransformBus::EventResult( + /*result*/ nextParentId, + /*address*/ parentEntityId, + &AZ::TransformBus::Events::GetParentId); + parentEntityId = nextParentId; + if (!parentEntityId.IsValid()) + { + break; + } + for (const AZ::EntityId& parentCheck : entities) + { + if (parentCheck == parentEntityId) + { + selectionIncludesTransformHeritage = true; + break; + } + } + } while (parentEntityId.IsValid() && !selectionIncludesTransformHeritage); + + if (!selectionIncludesTransformHeritage) + { + culledEntities.insert(entityId); + } + } + + return culledEntities; + } + namespace Internal { void CloneSliceEntitiesAndChildren( diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.h index 39f4c37c29..5454b19f7a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.h @@ -47,6 +47,9 @@ namespace AzToolsFramework AZStd::string GetEntityName(const AZ::EntityId& entityId, const AZStd::string_view& nameOverride = {}); + EntityList EntityIdListToEntityList(const EntityIdList& inputEntityIds); + EntityList EntityIdSetToEntityList(const EntityIdSet& inputEntityIds); + template struct AddComponents { @@ -202,4 +205,8 @@ namespace AzToolsFramework /// Wrap EBus SetSelectedEntities call. void SelectEntities(const AzToolsFramework::EntityIdList& entities); + /// Return a set of entities, culling any that have an ancestor in the list. + /// e.g. This is useful for getting a concise set of entities that need to be duplicated. + EntityIdSet GetCulledEntityHierarchy(const EntityIdList& entities); + }; // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp index 4b23b46ffd..cb16e0c099 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp @@ -94,6 +94,7 @@ namespace AzToolsFramework m_prefabSystemComponent->RemoveTemplate(templateId); } m_rootInstance->Reset(); + m_rootInstance->SetContainerEntityName("Level"); AzFramework::EntityOwnershipServiceNotificationBus::Event( m_entityContextId, &AzFramework::EntityOwnershipServiceNotificationBus::Events::OnEntityOwnershipServiceReset); @@ -198,6 +199,7 @@ namespace AzToolsFramework m_rootInstance->SetTemplateId(templateId); m_rootInstance->SetTemplateSourcePath(m_loaderInterface->GetRelativePathToProject(filename)); + m_rootInstance->SetContainerEntityName("Level"); m_prefabSystemComponent->PropagateTemplateChanges(templateId); return true; @@ -279,18 +281,29 @@ namespace AzToolsFramework AZStd::unique_ptr createdPrefabInstance = m_prefabSystemComponent->CreatePrefab(entities, AZStd::move(nestedPrefabInstances), filePath); - if (!instanceToParentUnder) - { - instanceToParentUnder = *m_rootInstance; - } - if (createdPrefabInstance) { + if (!instanceToParentUnder) + { + instanceToParentUnder = *m_rootInstance; + } + Prefab::Instance& addedInstance = instanceToParentUnder->get().AddInstance(AZStd::move(createdPrefabInstance)); - HandleEntitiesAdded({addedInstance.m_containerEntity.get()}); + AZ::Entity* containerEntity = addedInstance.m_containerEntity.get(); + containerEntity->AddComponent(aznew Prefab::EditorPrefabComponent()); + HandleEntitiesAdded({containerEntity}); + HandleEntitiesAdded(entities); + + // Update the template of the instance since we modified the entities of the instance by calling HandleEntitiesAdded. + Prefab::PrefabDom serializedInstance; + if (Prefab::PrefabDomUtils::StoreInstanceInPrefabDom(addedInstance, serializedInstance)) + { + m_prefabSystemComponent->UpdatePrefabTemplate(addedInstance.GetTemplateId(), serializedInstance); + } + return addedInstance; } - HandleEntitiesAdded(entities); + return AZStd::nullopt; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.h index ad11547506..36a60cc501 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.h @@ -186,7 +186,7 @@ namespace AzToolsFramework PlayInEditorData m_playInEditorData; ////////////////////////////////////////////////////////////////////////// - // PrefabSystemComponentInterface interface implementation + // PrefabEditorEntityOwnershipInterface implementation Prefab::InstanceOptionalReference CreatePrefab( const AZStd::vector& entities, AZStd::vector>&& nestedPrefabInstances, AZ::IO::PathView filePath, Prefab::InstanceOptionalReference instanceToParentUnder) override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.cpp index 0a5b43482e..c1eee62dbc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.cpp @@ -123,7 +123,11 @@ namespace AzToolsFramework void Instance::SetTemplateSourcePath(AZ::IO::PathView sourcePath) { m_templateSourcePath = sourcePath; - m_containerEntity->SetName(sourcePath.Filename().Native()); + } + + void Instance::SetContainerEntityName(AZStd::string_view containerName) + { + m_containerEntity->SetName(containerName); } bool Instance::AddEntity(AZ::Entity& entity) @@ -563,7 +567,7 @@ namespace AzToolsFramework AZ::EntityId Instance::GetContainerEntityId() const { - return m_containerEntity->GetId(); + return m_containerEntity ? m_containerEntity->GetId() : AZ::EntityId(); } bool Instance::HasContainerEntity() const diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.h index d1c7a4d853..186dce0f50 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.h @@ -80,6 +80,7 @@ namespace AzToolsFramework const AZ::IO::Path& GetTemplateSourcePath() const; void SetTemplateSourcePath(AZ::IO::PathView sourcePath); + void SetContainerEntityName(AZStd::string_view containerName); bool AddEntity(AZ::Entity& entity); bool AddEntity(AZ::Entity& entity, EntityAlias entityAlias); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceUpdateExecutor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceUpdateExecutor.cpp index 65de6b713c..71b1e04ec8 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceUpdateExecutor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceUpdateExecutor.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -116,10 +117,24 @@ namespace AzToolsFramework "Could not find Template using Id '%llu'. Unable to update Instance.", currentTemplateId); + // Remove the instance from update queue if its corresponding template couldn't be found isUpdateSuccessful = false; + m_instancesUpdateQueue.pop(); + continue; } } + auto findInstancesResult = m_templateInstanceMapperInterface->FindInstancesOwnedByTemplate(instanceTemplateId)->get(); + + if (findInstancesResult.find(instanceToUpdate) == findInstancesResult.end()) + { + // Since nested instances get reconstructed during propagation, remove any nested instance that no longer + // maps to a template. + isUpdateSuccessful = false; + m_instancesUpdateQueue.pop(); + continue; + } + Template& currentTemplate = currentTemplateReference->get(); Instance::EntityList newEntities; if (PrefabDomUtils::LoadInstanceFromPrefabDom(*instanceToUpdate, newEntities, currentTemplate.GetPrefabDom())) @@ -139,9 +154,18 @@ namespace AzToolsFramework } m_instancesUpdateQueue.pop(); - } + for (auto entityIdIterator = selectedEntityIds.begin(); entityIdIterator != selectedEntityIds.end(); entityIdIterator++) + { + // Since entities get recreated during propagation, we need to check whether the entities correspoding to the list + // of selected entity ids are present or not. + AZ::Entity* entity = GetEntityById(*entityIdIterator); + if (entity == nullptr) + { + selectedEntityIds.erase(entityIdIterator--); + } + } ToolsApplicationRequestBus::Broadcast(&ToolsApplicationRequests::SetSelectedEntities, selectedEntityIds); // Enable the Outliner diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp index 26191c97af..772e0ae52e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp @@ -15,15 +15,16 @@ #include #include +#include #include #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -37,12 +38,14 @@ namespace AzToolsFramework void PrefabPublicHandler::RegisterPrefabPublicHandlerInterface() { m_instanceEntityMapperInterface = AZ::Interface::Get(); - AZ_Assert( - m_instanceEntityMapperInterface, "PrefabPublicHandler - Could not retrieve instance of InstanceEntityMapperInterface"); + AZ_Assert(m_instanceEntityMapperInterface, "PrefabPublicHandler - Could not retrieve instance of InstanceEntityMapperInterface"); m_instanceToTemplateInterface = AZ::Interface::Get(); AZ_Assert(m_instanceToTemplateInterface, "PrefabPublicHandler - Could not retrieve instance of InstanceToTemplateInterface"); + m_prefabLoaderInterface = AZ::Interface::Get(); + AZ_Assert(m_prefabLoaderInterface, "Could not get PrefabLoaderInterface on PrefabPublicHandler construction."); + m_prefabSystemComponentInterface = AZ::Interface::Get(); AZ_Assert(m_prefabSystemComponentInterface, "Could not get PrefabSystemComponentInterface on PrefabPublicHandler construction."); @@ -59,92 +62,160 @@ namespace AzToolsFramework } PrefabOperationResult PrefabPublicHandler::CreatePrefab(const AZStd::vector& entityIds, AZ::IO::PathView filePath) + { + EntityList inputEntityList, topLevelEntities; + AZ::EntityId commonRootEntityId; + InstanceOptionalReference commonRootEntityOwningInstance; + PrefabOperationResult findCommonRootOutcome = FindCommonRootOwningInstance( + entityIds, inputEntityList, topLevelEntities, commonRootEntityId, commonRootEntityOwningInstance); + if (!findCommonRootOutcome.IsSuccess()) + { + return findCommonRootOutcome; + } + + InstanceOptionalReference instanceToCreate; + { + // Initialize Undo Batch object + ScopedUndoBatch undoBatch("Create Prefab"); + + PrefabDom commonRootInstanceDomBeforeCreate; + m_instanceToTemplateInterface->GenerateDomForInstance( + commonRootInstanceDomBeforeCreate, commonRootEntityOwningInstance->get()); + + AZStd::vector entities; + AZStd::vector> instances; + + // Retrieve all entities affected and identify Instances + if (!RetrieveAndSortPrefabEntitiesAndInstances(inputEntityList, commonRootEntityOwningInstance->get(), entities, instances)) + { + return AZ::Failure( + AZStd::string("Could not create a new prefab out of the entities provided - entities do not share a common root.")); + } + + // When we create a prefab with other prefab instances, we have to remove the existing links between the source and + // target templates of the other instances. + for (auto& nestedInstance : instances) + { + PrefabUndoHelpers::RemoveLink( + nestedInstance->GetTemplateId(), commonRootEntityOwningInstance->get().GetTemplateId(), + nestedInstance->GetInstanceAlias(), nestedInstance->GetLinkId(), undoBatch.GetUndoBatch()); + } + + auto prefabEditorEntityOwnershipInterface = AZ::Interface::Get(); + if (!prefabEditorEntityOwnershipInterface) + { + return AZ::Failure(AZStd::string("Could not create a new prefab out of the entities provided - internal error " + "(PrefabEditorEntityOwnershipInterface unavailable).")); + } + + // Create the Prefab + instanceToCreate = prefabEditorEntityOwnershipInterface->CreatePrefab( + entities, AZStd::move(instances), filePath, commonRootEntityOwningInstance); + + if (!instanceToCreate) + { + return AZ::Failure(AZStd::string("Could not create a new prefab out of the entities provided - internal error " + "(A null instance is returned).")); + } + + PrefabUndoHelpers::UpdatePrefabInstance( + commonRootEntityOwningInstance->get(), "Update prefab instance", commonRootInstanceDomBeforeCreate, undoBatch.GetUndoBatch()); + + CreateLink( + topLevelEntities, instanceToCreate->get(), commonRootEntityOwningInstance->get().GetTemplateId(), undoBatch.GetUndoBatch(), + commonRootEntityId); + AZ::EntityId containerEntityId = instanceToCreate->get().GetContainerEntityId(); + + // Change top level entities to be parented to the container entity + // Mark them as dirty so this change is correctly applied to the template + for (AZ::Entity* topLevelEntity : topLevelEntities) + { + m_prefabUndoCache.UpdateCache(topLevelEntity->GetId()); + undoBatch.MarkEntityDirty(topLevelEntity->GetId()); + AZ::TransformBus::Event(topLevelEntity->GetId(), &AZ::TransformBus::Events::SetParent, containerEntityId); + } + + // Select Container Entity + { + auto selectionUndo = aznew SelectionCommand({containerEntityId}, "Select Prefab Container Entity"); + selectionUndo->SetParent(undoBatch.GetUndoBatch()); + ToolsApplicationRequestBus::Broadcast(&ToolsApplicationRequestBus::Events::RunRedoSeparately, selectionUndo); + } + } + + // Save Template to file + m_prefabLoaderInterface->SaveTemplate(instanceToCreate->get().GetTemplateId()); + + return AZ::Success(); + } + + PrefabOperationResult PrefabPublicHandler::FindCommonRootOwningInstance( + const AZStd::vector& entityIds, EntityList& inputEntityList, EntityList& topLevelEntities, + AZ::EntityId& commonRootEntityId, InstanceOptionalReference& commonRootEntityOwningInstance) { // Retrieve entityList from entityIds - EntityList inputEntityList; - EntityIdListToEntityList(entityIds, inputEntityList); + inputEntityList = EntityIdListToEntityList(entityIds); // Find common root and top level entities bool entitiesHaveCommonRoot = false; - AZ::EntityId commonRootEntityId; - EntityList topLevelEntities; AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult( - entitiesHaveCommonRoot, - &AzToolsFramework::ToolsApplicationRequests::FindCommonRootInactive, - inputEntityList, - commonRootEntityId, - &topLevelEntities - ); + entitiesHaveCommonRoot, &AzToolsFramework::ToolsApplicationRequests::FindCommonRootInactive, inputEntityList, + commonRootEntityId, &topLevelEntities); // Bail if entities don't share a common root if (!entitiesHaveCommonRoot) { - return AZ::Failure(AZStd::string("Could not create a new prefab out of the entities provided - entities do not share a common root.")); - } - - AZ::Entity* commonRootEntity = nullptr; - if (commonRootEntityId.IsValid()) - { - commonRootEntity = GetEntityById(commonRootEntityId); + return AZ::Failure(AZStd::string("Failed to create a prefab: Provided entities do not share a common root.")); } // Retrieve the owning instance of the common root entity, which will be our new instance's parent instance. - InstanceOptionalReference commonRootEntityOwningInstance = GetOwnerInstanceByEntityId(commonRootEntityId); - AZ_Assert(commonRootEntityOwningInstance.has_value(), "Failed to create prefab : " - "Couldn't get a valid owning instance for the common root entity of the enities provided"); - - AZStd::vector entities; - AZStd::vector> instances; - - // Retrieve all entities affected and identify Instances - if (!RetrieveAndSortPrefabEntitiesAndInstances(inputEntityList, commonRootEntityOwningInstance->get(), entities, instances)) + commonRootEntityOwningInstance = GetOwnerInstanceByEntityId(commonRootEntityId); + if (!commonRootEntityOwningInstance) { - return AZ::Failure(AZStd::string("Could not create a new prefab out of the entities provided - entities do not share a common root.")); + AZ_Assert( + false, + "Failed to create prefab : Couldn't get a valid owning instance for the common root entity of the enities provided"); + return AZ::Failure(AZStd::string( + "Failed to create prefab : Couldn't get a valid owning instance for the common root entity of the enities provided")); } + return AZ::Success(); + } - auto prefabEditorEntityOwnershipInterface = AZ::Interface::Get(); - if (!prefabEditorEntityOwnershipInterface) - { - return AZ::Failure(AZStd::string("Could not create a new prefab out of the entities provided - internal error " - "(PrefabEditorEntityOwnershipInterface unavailable).")); - } + void PrefabPublicHandler::CreateLink( + const EntityList& topLevelEntities, Instance& sourceInstance, TemplateId targetTemplateId, + UndoSystem::URSequencePoint* undoBatch, AZ::EntityId commonRootEntityId) + { + AZ::EntityId containerEntityId = sourceInstance.GetContainerEntityId(); + AZ::Entity* containerEntity = GetEntityById(containerEntityId); + Prefab::PrefabDom containerEntityDomBefore; + m_instanceToTemplateInterface->GenerateDomForEntity(containerEntityDomBefore, *containerEntity); - InstanceOptionalReference instance = prefabEditorEntityOwnershipInterface->CreatePrefab( - entities, AZStd::move(instances), filePath, commonRootEntityOwningInstance); - - if (!instance) - { - return AZ::Failure(AZStd::string("Could not create a new prefab out of the entities provided - internal error " - "(A null instance is returned).")); - } - - AZ::EntityId containerEntityId = instance->get().GetContainerEntityId(); AZ::Vector3 containerEntityTranslation(AZ::Vector3::CreateZero()); AZ::Quaternion containerEntityRotation(AZ::Quaternion::CreateZero()); // Set the transform (translation, rotation) of the container entity GenerateContainerEntityTransform(topLevelEntities, containerEntityTranslation, containerEntityRotation); + // Set container entity to be child of common root + AZ::TransformBus::Event(containerEntityId, &AZ::TransformBus::Events::SetParent, commonRootEntityId); + AZ::TransformBus::Event(containerEntityId, &AZ::TransformBus::Events::SetLocalTranslation, containerEntityTranslation); AZ::TransformBus::Event(containerEntityId, &AZ::TransformBus::Events::SetLocalRotationQuaternion, containerEntityRotation); - // Set container entity to be child of common root - AZ::TransformBus::Event(containerEntityId, &AZ::TransformBus::Events::SetParent, commonRootEntityId); - - // Assign the EditorPrefabComponent to the instance container - EntityCompositionRequests::AddComponentsOutcome outcome; - EntityCompositionRequestBus::BroadcastResult( - outcome, &EntityCompositionRequests::AddComponentsToEntities, EntityIdList{containerEntityId}, - AZ::ComponentTypeList{azrtti_typeid()}); - - // Change top level entities to be parented to the container entity - for (AZ::Entity* topLevelEntity : topLevelEntities) - { - AZ::TransformBus::Event(topLevelEntity->GetId(), &AZ::TransformBus::Events::SetParent, containerEntityId); - } - - return AZ::Success(); + PrefabDom containerEntityDomAfter; + m_instanceToTemplateInterface->GenerateDomForEntity(containerEntityDomAfter, *containerEntity); + + PrefabDom patch; + m_instanceToTemplateInterface->GeneratePatch(patch, containerEntityDomBefore, containerEntityDomAfter); + m_instanceToTemplateInterface->AppendEntityAliasToPatchPaths(patch, containerEntityId); + + PrefabUndoHelpers::CreateLink( + sourceInstance.GetTemplateId(), targetTemplateId, patch, sourceInstance.GetInstanceAlias(), + undoBatch); + + // Update the cache - this prevents these changes from being stored in the regular undo/redo nodes + m_prefabUndoCache.Store(containerEntityId, AZStd::move(containerEntityDomAfter)); } PrefabOperationResult PrefabPublicHandler::InstantiatePrefab(AZStd::string_view /*filePath*/, AZ::EntityId /*parent*/, AZ::Vector3 /*position*/) @@ -174,14 +245,7 @@ namespace AzToolsFramework AZStd::string("SavePrefab - Path error. Path could be invalid, or the prefab may not be loaded in this level.")); } - auto prefabLoaderInterface = AZ::Interface::Get(); - if (prefabLoaderInterface == nullptr) - { - return AZ::Failure(AZStd::string( - "Could not save prefab - internal error (PrefabLoaderInterface unavailable).")); - } - - if (!prefabLoaderInterface->SaveTemplate(templateId)) + if (!m_prefabLoaderInterface->SaveTemplate(templateId)) { return AZ::Failure(AZStd::string("Could not save prefab - internal error (Json write operation failure).")); } @@ -262,13 +326,13 @@ namespace AzToolsFramework if (instanceOptionalReference.has_value()) { - PrefabDom beforeState; - m_prefabUndoCache.Retrieve(entityId, beforeState); - PrefabDom afterState; AZ::Entity* entity = GetEntityById(entityId); if (entity) { + PrefabDom beforeState; + m_prefabUndoCache.Retrieve(entityId, beforeState); + m_instanceToTemplateInterface->GenerateDomForEntity(afterState, *entity); PrefabDom patch; @@ -287,7 +351,10 @@ namespace AzToolsFramework // Update the cache m_prefabUndoCache.Store(entityId, AZStd::move(afterState)); } - + else + { + m_prefabUndoCache.PurgeCache(entityId); + } } } @@ -419,8 +486,7 @@ namespace AzToolsFramework InstanceOptionalReference instance = GetOwnerInstanceByEntityId(entityIds[0]); // Retrieve entityList from entityIds - EntityList inputEntityList; - EntityIdListToEntityList(entityIds, inputEntityList); + EntityList inputEntityList = EntityIdListToEntityList(entityIds); AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework); @@ -655,7 +721,7 @@ namespace AzToolsFramework InstanceOptionalReference owningInstance = m_instanceEntityMapperInterface->FindOwningInstance(entity->GetId()); AZ_Assert( owningInstance.has_value(), - "An error occored while retrieving entities and prefab instances : " + "An error occurred while retrieving entities and prefab instances : " "Owning instance of entity with id '%llu' couldn't be found", entity->GetId()); @@ -739,7 +805,7 @@ namespace AzToolsFramework { AZ_Assert( false, - "An error occored in function EntitiesBelongToSameInstance: " + "An error occurred in function EntitiesBelongToSameInstance: " "Owning instance of entity with id '%llu' couldn't be found", entityId); return false; @@ -767,18 +833,5 @@ namespace AzToolsFramework return true; } - - void PrefabPublicHandler::EntityIdListToEntityList(const EntityIdList& inputEntityIds, EntityList& outEntities) - { - outEntities.reserve(inputEntityIds.size()); - - for (AZ::EntityId entityId : inputEntityIds) - { - if (entityId.IsValid()) - { - outEntities.emplace_back(GetEntityById(entityId)); - } - } - } } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h index 80f28d7edb..19985bbf51 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h @@ -27,8 +27,10 @@ namespace AzToolsFramework namespace Prefab { class Instance; + class InstanceEntityMapperInterface; class InstanceToTemplateInterface; + class PrefabLoaderInterface; class PrefabSystemComponentInterface; class PrefabPublicHandler final @@ -67,13 +69,40 @@ namespace AzToolsFramework InstanceOptionalReference GetOwnerInstanceByEntityId(AZ::EntityId entityId) const; bool EntitiesBelongToSameInstance(const EntityIdList& entityIds) const; + /** + * Creates a link between the templates of an instance and its parent. + * + * \param topLevelEntities The list of entities that are immediate children to the container entity of the instance. + * \param sourceInstance The instance that corresponds to the source template of the link. + * \param targetInstance The id of the target template. + * \param undoBatch The undo batch to set as parent for this create link action. + * \param commonRootEntityId The id of the entity that the source instance should be parented under. + */ + void CreateLink( + const EntityList& topLevelEntities, Instance& sourceInstance, TemplateId targetTemplateId, + UndoSystem::URSequencePoint* undoBatch, AZ::EntityId commonRootEntityId); + + /** + * Given a list of entityIds, finds the prefab instance that owns the common root entity of the entityIds. + * + * \param entityIds The list of entity ids. + * \param inputEntityList The list of entities corresponding to the entity ids. + * \param topLevelEntities The list of entities that are immediate children of the common root entity. + * \param commonRootEntityId The entity id of the common root entity of all the entityIds. + * \param commonRootEntityOwningInstance The owning instance of the common root entity. + * \return PrefabOperationResult indicating whether the action was successful or not. + */ + PrefabOperationResult FindCommonRootOwningInstance( + const AZStd::vector& entityIds, EntityList& inputEntityList, EntityList& topLevelEntities, + AZ::EntityId& commonRootEntityId, InstanceOptionalReference& commonRootEntityOwningInstance); + static Instance* GetParentInstance(Instance* instance); static Instance* GetAncestorOfInstanceThatIsChildOfRoot(const Instance* ancestor, Instance* descendant); static void GenerateContainerEntityTransform(const EntityList& topLevelEntities, AZ::Vector3& translation, AZ::Quaternion& rotation); - static void EntityIdListToEntityList(const EntityIdList& inputEntityIds, EntityList& outEntities); InstanceEntityMapperInterface* m_instanceEntityMapperInterface = nullptr; InstanceToTemplateInterface* m_instanceToTemplateInterface = nullptr; + PrefabLoaderInterface* m_prefabLoaderInterface = nullptr; PrefabSystemComponentInterface* m_prefabSystemComponentInterface = nullptr; // Caches entity states for undo/redo purposes diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp index bf9fd658c6..54e99c9416 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp @@ -104,7 +104,6 @@ namespace AzToolsFramework return nullptr; } - AZStd::unique_ptr newInstance = AZStd::make_unique(AZStd::move(containerEntity)); for (AZ::Entity* entity : entities) @@ -122,6 +121,7 @@ namespace AzToolsFramework } newInstance->SetTemplateSourcePath(relativeFilePath); + newInstance->SetContainerEntityName(relativeFilePath.Stem().Native()); TemplateId newTemplateId = CreateTemplateFromInstance(*newInstance); if (newTemplateId == InvalidTemplateId) @@ -142,7 +142,6 @@ namespace AzToolsFramework void PrefabSystemComponent::PropagateTemplateChanges(TemplateId templateId) { - UpdatePrefabInstances(templateId); auto templateIdToLinkIdsIterator = m_templateToLinkIdsMap.find(templateId); if (templateIdToLinkIdsIterator != m_templateToLinkIdsMap.end()) { @@ -153,15 +152,24 @@ namespace AzToolsFramework templateIdToLinkIdsIterator->second.end())); UpdateLinkedInstances(linkIdsToUpdateQueue); } + else + { + UpdatePrefabInstances(templateId); + } } void PrefabSystemComponent::UpdatePrefabTemplate(TemplateId templateId, const PrefabDom& updatedDom) { - PrefabDom& templateDomToUpdate = FindTemplateDom(templateId); - if (AZ::JsonSerialization::Compare(templateDomToUpdate, updatedDom) != AZ::JsonSerializerCompareResult::Equal) + auto templateToUpdate = FindTemplate(templateId); + if (templateToUpdate) { - templateDomToUpdate.CopyFrom(updatedDom, templateDomToUpdate.GetAllocator()); - PropagateTemplateChanges(templateId); + PrefabDom& templateDomToUpdate = templateToUpdate->get().GetPrefabDom(); + if (AZ::JsonSerialization::Compare(templateDomToUpdate, updatedDom) != AZ::JsonSerializerCompareResult::Equal) + { + templateDomToUpdate.CopyFrom(updatedDom, templateDomToUpdate.GetAllocator()); + templateToUpdate->get().MarkAsDirty(true); + PropagateTemplateChanges(templateId); + } } } @@ -615,7 +623,12 @@ namespace AzToolsFramework instancesValue = memberFound->value; } - instancesValue->get().AddMember(rapidjson::StringRef(instanceAlias.c_str()), PrefabDomValue(), targetTemplateDom.GetAllocator()); + // Only add the instance if it's not there already + if (instancesValue->get().FindMember(rapidjson::StringRef(instanceAlias.c_str())) == instancesValue->get().MemberEnd()) + { + instancesValue->get().AddMember( + rapidjson::StringRef(instanceAlias.c_str()), PrefabDomValue(), targetTemplateDom.GetAllocator()); + } Template& sourceTemplate = sourceTemplateRef->get(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndo.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndo.cpp index 0d9f9f72a5..ea3fa5d84d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndo.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndo.cpp @@ -124,7 +124,7 @@ namespace AzToolsFramework const TemplateId& targetId, const TemplateId& sourceId, const InstanceAlias& instanceAlias, - const PrefabDomReference linkDom, + PrefabDomReference linkDom, const LinkId linkId) { m_targetId = targetId; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndo.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndo.h index 7a765c5db7..0d15d707d2 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndo.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndo.h @@ -101,7 +101,7 @@ namespace AzToolsFramework const TemplateId& targetId, const TemplateId& sourceId, const InstanceAlias& instanceAlias, - const PrefabDomReference linkDom = PrefabDomReference(), + PrefabDomReference linkDom = PrefabDomReference(), const LinkId linkId = InvalidLinkId); void Undo() override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoHelpers.cpp index da41635d03..c9b6c88a97 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoHelpers.cpp @@ -32,6 +32,28 @@ namespace AzToolsFramework state->SetParent(undoBatch); state->Redo(); } + + void CreateLink( + TemplateId sourceTemplateId, TemplateId targetTemplateId, PrefabDomReference patch, + const InstanceAlias& instanceAlias, UndoSystem::URSequencePoint* undoBatch) + { + auto linkAddUndo = aznew PrefabUndoInstanceLink("Create Link"); + linkAddUndo->Capture(targetTemplateId, sourceTemplateId, instanceAlias, patch, InvalidLinkId); + linkAddUndo->SetParent(undoBatch); + linkAddUndo->Redo(); + } + + void RemoveLink( + TemplateId sourceTemplateId, TemplateId targetTemplateId, const InstanceAlias& instanceAlias, + LinkId linkId, UndoSystem::URSequencePoint* undoBatch) + { + auto linkRemoveUndo = aznew PrefabUndoInstanceLink("Remove Link"); + PrefabDom emptyLinkDom; + linkRemoveUndo->Capture( + targetTemplateId, sourceTemplateId, instanceAlias, emptyLinkDom, linkId); + linkRemoveUndo->SetParent(undoBatch); + linkRemoveUndo->Redo(); + } } } // namespace Prefab } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoHelpers.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoHelpers.h index 81d0048e9e..5f81ef14a8 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoHelpers.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoHelpers.h @@ -21,6 +21,12 @@ namespace AzToolsFramework void UpdatePrefabInstance( const Instance& instance, AZStd::string_view undoMessage, const PrefabDom& instanceDomBeforeUpdate, UndoSystem::URSequencePoint* undoBatch); + void CreateLink( + TemplateId sourceTemplateId, TemplateId targetTemplateId, PrefabDomReference patch, + const InstanceAlias& instanceAlias, UndoSystem::URSequencePoint* undoBatch); + void RemoveLink( + TemplateId sourceTemplateId, TemplateId targetTemplateId, const InstanceAlias& instanceAlias, + LinkId linkId, UndoSystem::URSequencePoint* undoBatch); } } // namespace Prefab } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailWidget.cpp index f2b81fdb98..1aefa6f189 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Thumbnails/ThumbnailWidget.cpp @@ -79,7 +79,9 @@ namespace AzToolsFramework int realHeight = qMin(aznumeric_cast(originalWidth /aspectRatio), originalHeight); int realWidth = aznumeric_cast(realHeight * aspectRatio); int x = (originalWidth - realWidth) / 2; - painter.drawPixmap(QRect(x, 0, realHeight, realWidth), pixmap); + // pixmap needs to be manually scaled to produce smoother result and avoid looking pixelated + // using painter.setRenderHint(QPainter::SmoothPixmapTransform); does not seem to work + painter.drawPixmap(QPoint(x, 0), pixmap.scaled(realWidth, realHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); } QWidget::paintEvent(event); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/EditorEntityUi/EditorEntityUiHandlerBase.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/EditorEntityUi/EditorEntityUiHandlerBase.cpp index 98edd26f88..84266d3707 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/EditorEntityUi/EditorEntityUiHandlerBase.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/EditorEntityUi/EditorEntityUiHandlerBase.cpp @@ -61,6 +61,11 @@ namespace AzToolsFramework return true; } + bool EditorEntityUiHandlerBase::CanRename(AZ::EntityId /*entityId*/) const + { + return true; + } + void EditorEntityUiHandlerBase::PaintItemBackground(QPainter* /*painter*/, const QStyleOptionViewItem& /*option*/, const QModelIndex& /*index*/) const { } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/EditorEntityUi/EditorEntityUiHandlerBase.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/EditorEntityUi/EditorEntityUiHandlerBase.h index 7360e7ff0b..1aa5e5720f 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/EditorEntityUi/EditorEntityUiHandlerBase.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/EditorEntityUi/EditorEntityUiHandlerBase.h @@ -47,6 +47,8 @@ namespace AzToolsFramework virtual QPixmap GenerateItemIcon(AZ::EntityId entityId) const; //! Returns whether the element's lock and visibility state should be accessible in the Outliner virtual bool CanToggleLockVisibility(AZ::EntityId entityId) const; + //! Returns whether the element's name should be editable + virtual bool CanRename(AZ::EntityId entityId) const; //! Paints the background of the item in the Outliner. virtual void PaintItemBackground(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp index ea281aacf7..5b44594398 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp @@ -945,6 +945,12 @@ namespace AzToolsFramework return false; } + // Disable reparenting to the root level + if (!newParentId.IsValid()) + { + return false; + } + // Ignore entities not owned by the editor context. It is assumed that all entities belong // to the same context since multiple selection doesn't span across views. for (const AZ::EntityId& entityId : selectedEntityIds) @@ -974,39 +980,33 @@ namespace AzToolsFramework } } - if (newParentId.IsValid()) + bool isLayerEntity = false; + Layers::EditorLayerComponentRequestBus::EventResult( + isLayerEntity, + entityId, + &Layers::EditorLayerComponentRequestBus::Events::HasLayer); + // Layers can only have other layers as parents, or have no parent. + if (isLayerEntity) { - bool isLayerEntity = false; + bool newParentIsLayer = false; Layers::EditorLayerComponentRequestBus::EventResult( - isLayerEntity, - entityId, + newParentIsLayer, + newParentId, &Layers::EditorLayerComponentRequestBus::Events::HasLayer); - // Layers can only have other layers as parents, or have no parent. - if (isLayerEntity) + if (!newParentIsLayer) { - bool newParentIsLayer = false; - Layers::EditorLayerComponentRequestBus::EventResult( - newParentIsLayer, - newParentId, - &Layers::EditorLayerComponentRequestBus::Events::HasLayer); - if (!newParentIsLayer) - { - return false; - } + return false; } } } //Only check the entity pointer if the entity id is valid because //we want to allow dragging items to unoccupied parts of the tree to un-parent them - if (newParentId.IsValid()) + AZ::Entity* newParentEntity = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(newParentEntity, &AZ::ComponentApplicationRequests::FindEntity, newParentId); + if (!newParentEntity) { - AZ::Entity* newParentEntity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(newParentEntity, &AZ::ComponentApplicationRequests::FindEntity, newParentId); - if (!newParentEntity) - { - return false; - } + return false; } //reject dragging on to yourself or your children @@ -1344,14 +1344,15 @@ namespace AzToolsFramework emit EnableSelectionUpdates(false); auto parentIndex = GetIndexFromEntity(parentId); auto childIndex = GetIndexFromEntity(childId); - beginRemoveRows(parentIndex, childIndex.row(), childIndex.row()); + beginResetModel(); } void EntityOutlinerListModel::OnEntityInfoUpdatedRemoveChildEnd(AZ::EntityId parentId, AZ::EntityId childId) { (void)childId; AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework); - endRemoveRows(); + + endResetModel(); //must refresh partial lock/visibility of parents m_isFilterDirty = true; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp index 08fc764507..3ee8a14285 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -271,6 +272,12 @@ namespace AzToolsFramework m_listModel->Initialize(); + m_editorEntityUiInterface = AZ::Interface::Get(); + + AZ_Assert( + m_editorEntityUiInterface != nullptr, + "EntityOutlinerWidget requires a EditorEntityUiInterface instance on Initialize."); + EditorPickModeNotificationBus::Handler::BusConnect(GetEntityContextId()); EntityHighlightMessages::Bus::Handler::BusConnect(); EntityOutlinerModelNotificationBus::Handler::BusConnect(); @@ -562,7 +569,13 @@ namespace AzToolsFramework if (m_selectedEntityIds.size() == 1) { - contextMenu->addAction(m_actionToRenameSelection); + auto entityId = m_selectedEntityIds.front(); + auto entityUiHandler = m_editorEntityUiInterface->GetHandler(entityId); + + if (!entityUiHandler || entityUiHandler->CanRename(entityId)) + { + contextMenu->addAction(m_actionToRenameSelection); + } } if (m_selectedEntityIds.size() == 1) @@ -688,11 +701,17 @@ namespace AzToolsFramework if (m_selectedEntityIds.size() == 1) { - const QModelIndex proxyIndex = GetIndexFromEntityId(m_selectedEntityIds.front()); - if (proxyIndex.isValid()) + auto entityId = m_selectedEntityIds.front(); + auto entityUiHandler = m_editorEntityUiInterface->GetHandler(entityId); + + if (!entityUiHandler || entityUiHandler->CanRename(entityId)) { - m_gui->m_objectTree->setCurrentIndex(proxyIndex); - m_gui->m_objectTree->QTreeView::edit(proxyIndex); + const QModelIndex proxyIndex = GetIndexFromEntityId(entityId); + if (proxyIndex.isValid()) + { + m_gui->m_objectTree->setCurrentIndex(proxyIndex); + m_gui->m_objectTree->QTreeView::edit(proxyIndex); + } } } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.hxx index cf8c55abd1..f225bb49b8 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.hxx @@ -42,6 +42,7 @@ namespace Ui namespace AzToolsFramework { + class EditorEntityUiInterface; class EntityOutlinerListModel; class EntityOutlinerSortFilterProxyModel; @@ -193,6 +194,8 @@ namespace AzToolsFramework EntityIdSet m_entitiesToSort; EntityOutliner::DisplaySortMode m_sortMode; bool m_sortContentQueued; + + EditorEntityUiInterface* m_editorEntityUiInterface = nullptr; }; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/LevelRootUiHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/LevelRootUiHandler.cpp index 828a49ef94..7915403c0a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/LevelRootUiHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/LevelRootUiHandler.cpp @@ -50,11 +50,31 @@ namespace AzToolsFramework return QPixmap(m_levelRootIconPath); } + QString LevelRootUiHandler::GenerateItemInfoString(AZ::EntityId entityId) const + { + QString infoString; + + AZ::IO::Path path = m_prefabPublicInterface->GetOwningInstancePrefabPath(entityId); + + if (!path.empty()) + { + infoString = + QObject::tr("(%1)").arg(path.Filename().Native().data()); + } + + return infoString; + } + bool LevelRootUiHandler::CanToggleLockVisibility(AZ::EntityId /*entityId*/) const { return false; } + bool LevelRootUiHandler::CanRename(AZ::EntityId /*entityId*/) const + { + return false; + } + void LevelRootUiHandler::PaintItemBackground(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& /*index*/) const { if (!painter) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/LevelRootUiHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/LevelRootUiHandler.h index a8b2e4a4f8..19c1244040 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/LevelRootUiHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/LevelRootUiHandler.h @@ -34,7 +34,9 @@ namespace AzToolsFramework // EditorEntityUiHandler... QPixmap GenerateItemIcon(AZ::EntityId entityId) const override; + QString GenerateItemInfoString(AZ::EntityId entityId) const override; bool CanToggleLockVisibility(AZ::EntityId entityId) const override; + bool CanRename(AZ::EntityId entityId) const override; void PaintItemBackground(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; private: diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp index 55c7fb3f65..181f5b9a9d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp @@ -310,6 +310,9 @@ namespace AzToolsFramework { initEntityPropertyEditorResources(); + m_prefabPublicInterface = AZ::Interface::Get(); + AZ_Assert(m_prefabPublicInterface != nullptr, "EntityPropertyEditor requires a PrefabPublicInterface instance on Initialize."); + setObjectName("EntityPropertyEditor"); setAcceptDrops(true); @@ -405,8 +408,6 @@ namespace AzToolsFramework CreateActions(); UpdateContents(); - m_prefabPublicInterface = AZ::Interface::Get(); - EditorEntityContextNotificationBus::Handler::BusConnect(); //forced to register global event filter with application for selection @@ -693,11 +694,38 @@ namespace AzToolsFramework m_gui->m_entityIcon->repaint(); } + EntityPropertyEditor::InspectorLayout EntityPropertyEditor::GetCurrentInspectorLayout() const + { + if (!m_prefabsAreEnabled) + { + return m_isLevelEntityEditor ? InspectorLayout::LEVEL : InspectorLayout::ENTITY; + } + + AZ::EntityId levelContainerEntityId = m_prefabPublicInterface->GetLevelInstanceContainerEntityId(); + if (AZStd::find(m_selectedEntityIds.begin(), m_selectedEntityIds.end(), levelContainerEntityId) != m_selectedEntityIds.end()) + { + if (m_selectedEntityIds.size() > 1) + { + return InspectorLayout::INVALID; + } + else + { + return InspectorLayout::LEVEL; + } + } + else + { + return InspectorLayout::ENTITY; + } + } + void EntityPropertyEditor::UpdateEntityDisplay() { UpdateStatusComboBox(); - if (m_isLevelEntityEditor) + InspectorLayout layout = GetCurrentInspectorLayout(); + + if (layout == InspectorLayout::LEVEL) { AZStd::string levelName; AzToolsFramework::EditorRequestBus::BroadcastResult(levelName, &AzToolsFramework::EditorRequests::GetLevelName); @@ -737,13 +765,20 @@ namespace AzToolsFramework AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework); SelectionEntityTypeInfo result = SelectionEntityTypeInfo::None; - if (m_isLevelEntityEditor) + InspectorLayout layout = GetCurrentInspectorLayout(); + + if (layout == InspectorLayout::LEVEL) { // The Level Inspector should only have a list of selectable components after the // level entity itself is valid (i.e. "selected"). return selection.empty() ? SelectionEntityTypeInfo::None : SelectionEntityTypeInfo::LevelEntity; } + if (layout == InspectorLayout::INVALID) + { + return SelectionEntityTypeInfo::Mixed; + } + for (AZ::EntityId selectedEntityId : selection) { bool isLayerEntity = false; @@ -909,16 +944,18 @@ namespace AzToolsFramework } } + bool isLevelLayout = GetCurrentInspectorLayout() == InspectorLayout::LEVEL; + m_gui->m_entityDetailsLabel->setText(entityDetailsLabelText); m_gui->m_entityDetailsLabel->setVisible(entityDetailsVisible); m_gui->m_entityNameEditor->setVisible(hasEntitiesDisplayed); m_gui->m_entityNameLabel->setVisible(hasEntitiesDisplayed); m_gui->m_entityIcon->setVisible(hasEntitiesDisplayed); - m_gui->m_pinButton->setVisible(m_overrideSelectedEntityIds.empty() && hasEntitiesDisplayed && !m_isSystemEntityEditor && !m_isLevelEntityEditor); - m_gui->m_statusLabel->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !m_isLevelEntityEditor); - m_gui->m_statusComboBox->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !m_isLevelEntityEditor); - m_gui->m_entityIdLabel->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !m_isLevelEntityEditor); - m_gui->m_entityIdText->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !m_isLevelEntityEditor); + m_gui->m_pinButton->setVisible(m_overrideSelectedEntityIds.empty() && hasEntitiesDisplayed && !m_isSystemEntityEditor); + m_gui->m_statusLabel->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout); + m_gui->m_statusComboBox->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout); + m_gui->m_entityIdLabel->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout); + m_gui->m_entityIdText->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout); bool displayComponentSearchBox = hasEntitiesDisplayed; if (hasEntitiesDisplayed) @@ -941,7 +978,7 @@ namespace AzToolsFramework UpdateEntityDisplay(); } - m_gui->m_darkBox->setVisible(displayComponentSearchBox && !m_isSystemEntityEditor && !m_isLevelEntityEditor); + m_gui->m_darkBox->setVisible(displayComponentSearchBox && !m_isSystemEntityEditor && !isLevelLayout); m_gui->m_entitySearchBox->setVisible(displayComponentSearchBox); bool displayAddComponentMenu = CanAddComponentsToSelection(selectionEntityTypeInfo); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx index fed9c55f15..677dc98277 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx @@ -521,6 +521,15 @@ namespace AzToolsFramework bool m_isSystemEntityEditor; bool m_isLevelEntityEditor = false; + enum class InspectorLayout + { + ENTITY = 0, // All selected entities are regular entities + LEVEL, // The selected entity is the level prefab container entity + INVALID // Other entities are selected alongside the level prefab container entity + }; + + InspectorLayout GetCurrentInspectorLayout() const; + // the spacer's job is to make sure that its always at the end of the list of components. QSpacerItem* m_spacer; bool m_isAlreadyQueuedRefresh; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp index bc27ffa5e1..261645e79a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp @@ -38,6 +38,7 @@ AZ_POP_DISABLE_WARNING #include #include #include +#include #include #include #include @@ -1212,9 +1213,8 @@ namespace AzToolsFramework if (!QFile::exists(path)) { - const char* engineRoot = nullptr; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(engineRoot, &AzToolsFramework::ToolsApplicationRequests::GetEngineRootPath); - QDir engineDir = engineRoot ? QDir(engineRoot) : QDir::current(); + AZ::IO::FixedMaxPathString engineRoot = AZ::Utils::GetEnginePath(); + QDir engineDir = !engineRoot.empty() ? QDir(QString(engineRoot.c_str())) : QDir::current(); path = engineDir.absoluteFilePath(iconPath.c_str()); } diff --git a/Code/Framework/AzToolsFramework/Tests/Entity/EditorEntityHelpersTests.cpp b/Code/Framework/AzToolsFramework/Tests/Entity/EditorEntityHelpersTests.cpp new file mode 100644 index 0000000000..51feacfa2b --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Entity/EditorEntityHelpersTests.cpp @@ -0,0 +1,57 @@ +/* +* 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 + +#include +#include +#include + +namespace UnitTest +{ + class EditorEntityHelpersTest + : public ToolsApplicationFixture + { + void SetUpEditorFixtureImpl() override + { + m_parent1 = CreateDefaultEditorEntity("Parent1"); + m_child1 = CreateDefaultEditorEntity("Child1"); + m_child2 = CreateDefaultEditorEntity("Child2"); + m_grandChild1 = CreateDefaultEditorEntity("GrandChild1"); + m_parent2 = CreateDefaultEditorEntity("Parent2"); + + AZ::TransformBus::Event(m_child1, &AZ::TransformBus::Events::SetParent, m_parent1); + AZ::TransformBus::Event(m_child2, &AZ::TransformBus::Events::SetParent, m_parent1); + AZ::TransformBus::Event(m_grandChild1, &AZ::TransformBus::Events::SetParent, m_child1); + } + + public: + AZ::EntityId m_parent1; + AZ::EntityId m_child1; + AZ::EntityId m_child2; + AZ::EntityId m_grandChild1; + AZ::EntityId m_parent2; + }; + + TEST_F(EditorEntityHelpersTest, EditorEntityHelpersTests_GetCulledEntityHierarchy) + { + AzToolsFramework::EntityIdList testEntityIds{ m_parent1, m_child1, m_child2, m_grandChild1, m_parent2 }; + + AzToolsFramework::EntityIdSet culledSet = AzToolsFramework::GetCulledEntityHierarchy(testEntityIds); + + // There should only be two EntityIds returned (m_parent1, and m_parent2), + // since all the others should be culled out since they have a common ancestor + // in the list already + using ::testing::UnorderedElementsAre; + EXPECT_THAT(culledSet, UnorderedElementsAre(m_parent1, m_parent2)); + } +} diff --git a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake index 7a2cd373a2..e54aa187e4 100644 --- a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake +++ b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake @@ -85,7 +85,9 @@ set(FILES Prefab/SpawnableSortEntitiesTestFixture.cpp Prefab/SpawnableSortEntitiesTestFixture.h Entity/EditorEntityContextComponentTests.cpp + Entity/EditorEntityHelpersTests.cpp Entity/EditorEntitySearchComponentTests.cpp + Entity/EditorEntitySelectionTests.cpp SliceStabilityTests/SliceStabilityTestFramework.h SliceStabilityTests/SliceStabilityTestFramework.cpp SliceStabilityTests/SliceStabilityCreateTests.cpp diff --git a/Code/Framework/GridMate/CMakeLists.txt b/Code/Framework/GridMate/CMakeLists.txt index f326bda179..20ce582307 100644 --- a/Code/Framework/GridMate/CMakeLists.txt +++ b/Code/Framework/GridMate/CMakeLists.txt @@ -28,8 +28,9 @@ ly_add_target( ${pal_dir} BUILD_DEPENDENCIES PRIVATE - 3rdParty::OpenSSL AZ::AzCore + PUBLIC + 3rdParty::OpenSSL ) ly_add_source_properties( diff --git a/Code/Sandbox/Editor/AlignTool.cpp b/Code/Sandbox/Editor/AlignTool.cpp deleted file mode 100644 index 4b3aedfbfa..0000000000 --- a/Code/Sandbox/Editor/AlignTool.cpp +++ /dev/null @@ -1,142 +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 "EditorDefs.h" - -#include "AlignTool.h" - -// Editor -#include "Objects/BaseObject.h" -#include "Objects/SelectionGroup.h" - -////////////////////////////////////////////////////////////////////////// -bool CAlignPickCallback::m_bActive = false; - -////////////////////////////////////////////////////////////////////////// -//! Called when object picked. -void CAlignPickCallback::OnPick(CBaseObject* picked) -{ - Matrix34 pickedTM(picked->GetWorldTM()); - - AABB pickedAABB; - picked->GetBoundBox(pickedAABB); - pickedAABB.Move(-pickedTM.GetTranslation()); - Vec3 pickedPivot = pickedAABB.GetCenter(); - - AABB pickedLocalAABB; - picked->GetLocalBounds(pickedLocalAABB); - - const Quat& pickedRot = picked->GetRotation(); - const Vec3& pickedScale = picked->GetScale(); - const Vec3& pickedPos = picked->GetPos(); - - bool bKeepScale = CheckVirtualKey(Qt::Key_Shift); - bool bKeepRotation = CheckVirtualKey(Qt::Key_Alt); - bool bAlignToBoundBox = CheckVirtualKey(Qt::Key_Control); - bool bApplyTransform = !bKeepScale && !bKeepRotation && !bAlignToBoundBox; - - { - bool bUndo = !CUndo::IsRecording(); - if (bUndo) - { - GetIEditor()->BeginUndo(); - } - - CSelectionGroup* selGroup = GetIEditor()->GetSelection(); - selGroup->FilterParents(); - - for (int i = 0; i < selGroup->GetFilteredCount(); i++) - { - CBaseObject* pMovedObj = selGroup->GetFilteredObject(i); - - if (bKeepScale || bKeepRotation || bApplyTransform) - { - if (bKeepScale && bKeepRotation) // Keep scale and rotation of a moved object - { - pMovedObj->SetWorldTM(Matrix34::Create(pMovedObj->GetScale(), pMovedObj->GetRotation(), pickedPos), eObjectUpdateFlags_UserInput); - } - else if (bKeepScale) // Keep only scale of a moved object - { - pMovedObj->SetWorldTM(Matrix34::Create(pMovedObj->GetScale(), pickedRot, pickedPos), eObjectUpdateFlags_UserInput); - } - else if (bKeepRotation) // Keep only rotation of a moved object - { - pMovedObj->SetWorldTM(Matrix34::Create(pickedScale, pMovedObj->GetRotation(), pickedPos), eObjectUpdateFlags_UserInput); - } - else // Scale, Rotation and Position of a picked object are applied to a moved object. - { - pMovedObj->SetWorldTM(pickedTM, eObjectUpdateFlags_UserInput); - } - } - else if (bAlignToBoundBox) // align to the bounding box. - { - if (pickedLocalAABB.GetVolume() == 0.0f) - { - continue; - } - - AABB movedLocalAABB; - pMovedObj->GetLocalBounds(movedLocalAABB); - if (fabs(movedLocalAABB.max.x - movedLocalAABB.min.x) < VEC_EPSILON && - fabs(movedLocalAABB.max.y - movedLocalAABB.min.y) < VEC_EPSILON && - fabs(movedLocalAABB.max.z - movedLocalAABB.min.z) < VEC_EPSILON) - { - continue; - } - - const Vec3& movedScale(pMovedObj->GetScale()); - Matrix34 movedScaleTM = Matrix34::CreateScale(movedScale); - AABB movedLocalScaledAABB; - movedLocalScaledAABB.min = movedScaleTM.TransformVector(movedLocalAABB.min); - movedLocalScaledAABB.max = movedScaleTM.TransformVector(movedLocalAABB.max); - - float fMovedWidth = movedLocalScaledAABB.max.x - movedLocalScaledAABB.min.x; - float fMovedHeight = movedLocalScaledAABB.max.z - movedLocalScaledAABB.min.z; - float fMovedLength = movedLocalScaledAABB.max.y - movedLocalScaledAABB.min.y; - - Matrix34 pickedScaleTM = Matrix34::CreateScale(picked->GetScale()); - AABB pickedLocalScaledAABB; - pickedLocalScaledAABB.min = pickedScaleTM.TransformVector(pickedLocalAABB.min); - pickedLocalScaledAABB.max = pickedScaleTM.TransformVector(pickedLocalAABB.max); - float fScaledPickedtWidth = pickedLocalScaledAABB.max.x - pickedLocalScaledAABB.min.x; - float fScaledPickedHeight = pickedLocalScaledAABB.max.z - pickedLocalScaledAABB.min.z; - float fScaledPickedLength = pickedLocalScaledAABB.max.y - pickedLocalScaledAABB.min.y; - - Vec3 scale((fScaledPickedtWidth / fMovedWidth) * movedScale.x, (fScaledPickedLength / fMovedLength) * movedScale.y, (fScaledPickedHeight / fMovedHeight) * movedScale.z); - Matrix34 scaleRotTM = Matrix34::Create(scale, pickedRot, Vec3(0, 0, 0)); - Vec3 movedPivot = scaleRotTM.TransformVector(movedLocalAABB.GetCenter()); - - pMovedObj->SetWorldTM(Matrix34::Create(scale, pickedRot, Vec3(pickedPos + (pickedPivot - movedPivot))), eObjectUpdateFlags_UserInput); - } - } - m_bActive = false; - if (bUndo) - { - GetIEditor()->AcceptUndo("Align To Object"); - } - } - delete this; -} - -//! Called when pick mode cancelled. -void CAlignPickCallback::OnCancelPick() -{ - m_bActive = false; - delete this; -} - -//! Return true if specified object is pickable. -bool CAlignPickCallback::OnPickFilter([[maybe_unused]] CBaseObject* filterObject) -{ - return true; -}; diff --git a/Code/Sandbox/Editor/AlignTool.h b/Code/Sandbox/Editor/AlignTool.h deleted file mode 100644 index 43cd01013d..0000000000 --- a/Code/Sandbox/Editor/AlignTool.h +++ /dev/null @@ -1,40 +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_EDITOR_ALIGNTOOL_H -#define CRYINCLUDE_EDITOR_ALIGNTOOL_H - -#pragma once - -////////////////////////////////////////////////////////////////////////// -class CAlignPickCallback - : public IPickObjectCallback -{ -public: - CAlignPickCallback() { m_bActive = true; }; - //! Called when object picked. - virtual void OnPick(CBaseObject* picked); - //! Called when pick mode cancelled. - virtual void OnCancelPick(); - //! Return true if specified object is pickable. - virtual bool OnPickFilter(CBaseObject* filterObject); - - static bool IsActive() { return m_bActive; } - - virtual bool IsNeedSpecificBehaviorForSpaceAcce() { return true; } -private: - static bool m_bActive; -}; - - -#endif // CRYINCLUDE_EDITOR_ALIGNTOOL_H diff --git a/Code/Sandbox/Editor/AssetEditor/AssetEditorWindow.cpp b/Code/Sandbox/Editor/AssetEditor/AssetEditorWindow.cpp index 4645019261..53e2884943 100644 --- a/Code/Sandbox/Editor/AssetEditor/AssetEditorWindow.cpp +++ b/Code/Sandbox/Editor/AssetEditor/AssetEditorWindow.cpp @@ -20,6 +20,7 @@ // AzCore #include #include +#include // AzToolsFramework #include @@ -104,13 +105,9 @@ void AssetEditorWindow::SaveAssetAs(const AZStd::string_view assetPath) return; } - const char* engineRoot; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(engineRoot, &AzToolsFramework::ToolsApplicationRequests::GetEngineRootPath); + auto absoluteAssetPath = AZ::IO::FixedMaxPath(AZ::Utils::GetEnginePath()) / assetPath; - AZStd::string absoluteAssetPath; - AzFramework::StringFunc::Path::Join(engineRoot, assetPath.data(), absoluteAssetPath); - - if (!m_ui->m_assetEditorWidget->SaveAssetToPath(absoluteAssetPath)) + if (!m_ui->m_assetEditorWidget->SaveAssetToPath(absoluteAssetPath.Native())) { AZ_Warning("Asset Editor", false, "File was not saved correctly via SaveAssetAs."); } diff --git a/Code/Sandbox/Editor/Core/LevelEditorMenuHandler.cpp b/Code/Sandbox/Editor/Core/LevelEditorMenuHandler.cpp index 1c9e7d90d2..f00085d5ad 100644 --- a/Code/Sandbox/Editor/Core/LevelEditorMenuHandler.cpp +++ b/Code/Sandbox/Editor/Core/LevelEditorMenuHandler.cpp @@ -580,7 +580,6 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe auto alignMenu = modifyMenu.AddMenu(tr("Align")); alignMenu.AddAction(ID_OBJECTMODIFY_ALIGNTOGRID); - alignMenu.AddAction(ID_OBJECTMODIFY_ALIGN); alignMenu.AddAction(ID_MODIFY_ALIGNOBJTOSURF); auto constrainMenu = modifyMenu.AddMenu(tr("Constrain")); diff --git a/Code/Sandbox/Editor/CryEdit.cpp b/Code/Sandbox/Editor/CryEdit.cpp index dff5b2267c..7aefcffb5a 100644 --- a/Code/Sandbox/Editor/CryEdit.cpp +++ b/Code/Sandbox/Editor/CryEdit.cpp @@ -95,8 +95,6 @@ AZ_POP_DISABLE_WARNING #include "Core/QtEditorApplication.h" #include "StringDlg.h" -#include "LinkTool.h" -#include "AlignTool.h" #include "VoxelAligningTool.h" #include "NewLevelDialog.h" #include "GridSettingsDialog.h" @@ -126,7 +124,6 @@ AZ_POP_DISABLE_WARNING #include "EditorPreferencesDialog.h" #include "GraphicsSettingsDialog.h" #include "FeedbackDialog/FeedbackDialog.h" -#include "MatEditMainDlg.h" #include "AnimationContext.h" #include "GotoPositionDlg.h" @@ -401,8 +398,6 @@ void CCryEditApp::RegisterActionHandlers() ON_COMMAND(ID_EDITMODE_MOVE, OnEditmodeMove) ON_COMMAND(ID_EDITMODE_ROTATE, OnEditmodeRotate) ON_COMMAND(ID_EDITMODE_SCALE, OnEditmodeScale) - ON_COMMAND(ID_EDITTOOL_LINK, OnEditToolLink) - ON_COMMAND(ID_EDITTOOL_UNLINK, OnEditToolUnlink) ON_COMMAND(ID_EDITMODE_SELECT, OnEditmodeSelect) ON_COMMAND(ID_EDIT_ESCAPE, OnEditEscape) ON_COMMAND(ID_OBJECTMODIFY_SETAREA, OnObjectSetArea) @@ -422,7 +417,6 @@ void CCryEditApp::RegisterActionHandlers() ON_COMMAND(ID_SELECTION_SAVE, OnSelectionSave) ON_COMMAND(ID_IMPORT_ASSET, OnOpenAssetImporter) ON_COMMAND(ID_SELECTION_LOAD, OnSelectionLoad) - ON_COMMAND(ID_OBJECTMODIFY_ALIGN, OnAlignObject) ON_COMMAND(ID_MODIFY_ALIGNOBJTOSURF, OnAlignToVoxel) ON_COMMAND(ID_OBJECTMODIFY_ALIGNTOGRID, OnAlignToGrid) ON_COMMAND(ID_LOCK_SELECTION, OnLockSelection) @@ -1898,14 +1892,6 @@ BOOL CCryEditApp::InitInstance() CWipFeatureManager::Init(); #endif - if (GetIEditor()->IsInMatEditMode()) - { - m_pMatEditDlg = new CMatEditMainDlg(QStringLiteral("Material Editor")); - m_pEditor->InitFinished(); - m_pMatEditDlg->show(); - return true; - } - if (!m_bConsoleMode && !m_bPreviewMode) { GetIEditor()->UpdateViews(); @@ -2905,51 +2891,6 @@ void CCryEditApp::OnEditmodeScale() } } -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnEditToolLink() -{ - // TODO: Add your command handler code here - if (qobject_cast(GetIEditor()->GetEditTool())) - { - GetIEditor()->SetEditTool(0); - } - else - { - GetIEditor()->SetEditTool(new CLinkTool()); - } -} - -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnUpdateEditToolLink(QAction* action) -{ - if (!GetIEditor()->GetDocument()) - { - action->setEnabled(false); - return; - } - action->setEnabled(GetIEditor()->GetDocument()->IsDocumentReady()); - CEditTool* pEditTool = GetIEditor()->GetEditTool(); - action->setChecked(qobject_cast(pEditTool) != nullptr); -} - -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnEditToolUnlink() -{ - CUndo undo("Unlink Object(s)"); - CSelectionGroup* pSelection = GetIEditor()->GetObjectManager()->GetSelection(); - for (int i = 0; i < pSelection->GetCount(); i++) - { - CBaseObject* pBaseObj = pSelection->GetObject(i); - pBaseObj->DetachThis(); - } -} - -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnUpdateEditToolUnlink(QAction* action) -{ - action->setEnabled(false); -} - ////////////////////////////////////////////////////////////////////////// void CCryEditApp::OnEditmodeSelect() { @@ -3519,14 +3460,6 @@ void CCryEditApp::OnUpdateSelected(QAction* action) action->setEnabled(!GetIEditor()->GetSelection()->IsEmpty()); } -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnAlignObject() -{ - // Align pick callback will release itself. - CAlignPickCallback* alignCallback = new CAlignPickCallback; - GetIEditor()->PickObject(alignCallback, 0, "Align to Object"); -} - ////////////////////////////////////////////////////////////////////////// void CCryEditApp::OnAlignToGrid() { @@ -3547,15 +3480,6 @@ void CCryEditApp::OnAlignToGrid() } } -////////////////////////////////////////////////////////////////////////// -void CCryEditApp::OnUpdateAlignObject(QAction* action) -{ - Q_ASSERT(action->isCheckable()); - action->setChecked(CAlignPickCallback::IsActive()); - - action->setEnabled(!GetIEditor()->GetSelection()->IsEmpty()); -} - ////////////////////////////////////////////////////////////////////////// void CCryEditApp::OnAlignToVoxel() { diff --git a/Code/Sandbox/Editor/CryEdit.h b/Code/Sandbox/Editor/CryEdit.h index 7480b34e5a..94c39991e9 100644 --- a/Code/Sandbox/Editor/CryEdit.h +++ b/Code/Sandbox/Editor/CryEdit.h @@ -28,7 +28,6 @@ class CCryDocManager; class CQuickAccessBar; -class CMatEditMainDlg; class CCryEditDoc; class CEditCommandLineInfo; class CMainFrame; @@ -225,10 +224,6 @@ public: void OnEditmodeMove(); void OnEditmodeRotate(); void OnEditmodeScale(); - void OnEditToolLink(); - void OnUpdateEditToolLink(QAction* action); - void OnEditToolUnlink(); - void OnUpdateEditToolUnlink(QAction* action); void OnEditmodeSelect(); void OnEditEscape(); void OnObjectSetArea(); @@ -257,10 +252,8 @@ public: void OnOpenAssetImporter(); void OnSelectionLoad(); void OnUpdateSelected(QAction* action); - void OnAlignObject(); void OnAlignToVoxel(); void OnAlignToGrid(); - void OnUpdateAlignObject(QAction* action); void OnUpdateAlignToVoxel(QAction* action); void OnLockSelection(); void OnEditLevelData(); @@ -367,7 +360,6 @@ private: //! Autotest mode: Special mode meant for automated testing, things like blocking dialogs or error report windows won't appear bool m_bAutotestMode = false; - CMatEditMainDlg* m_pMatEditDlg = nullptr; CConsoleDialog* m_pConsoleDialog = nullptr; AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING diff --git a/Code/Sandbox/Editor/EditorViewportWidget.cpp b/Code/Sandbox/Editor/EditorViewportWidget.cpp index a3b2542418..977850bc58 100644 --- a/Code/Sandbox/Editor/EditorViewportWidget.cpp +++ b/Code/Sandbox/Editor/EditorViewportWidget.cpp @@ -276,9 +276,6 @@ void EditorViewportWidget::paintEvent([[maybe_unused]] QPaintEvent* event) if ((ge && ge->IsLevelLoaded()) || (GetType() != ET_ViewportCamera)) { setRenderOverlayVisible(true); - m_isOnPaint = true; - Update(); - m_isOnPaint = false; } else { @@ -682,6 +679,11 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event) } SetCurrentCursor(STD_CURSOR_GAME); } + + if (m_renderViewport) + { + m_renderViewport->GetControllerList()->SetEnabled(false); + } } break; @@ -700,6 +702,11 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event) RestoreViewportAfterGameMode(); } + + if (m_renderViewport) + { + m_renderViewport->GetControllerList()->SetEnabled(true); + } break; case eNotify_OnCloseScene: @@ -730,6 +737,8 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event) // meters above the terrain (default terrain height is 32) viewTM.SetTranslation(Vec3(sx * 0.5f, sy * 0.5f, 34.0f)); SetViewTM(viewTM); + + UpdateScene(); } break; @@ -809,6 +818,10 @@ void EditorViewportWidget::OnBeginPrepareRender() return; } + m_isOnPaint = true; + Update(); + m_isOnPaint = false; + float fNearZ = GetIEditor()->GetConsoleVar("cl_DefaultNearPlane"); float fFarZ = m_Camera.GetFarPlane(); @@ -880,6 +893,11 @@ void EditorViewportWidget::OnBeginPrepareRender() GetIEditor()->GetSystem()->SetViewCamera(m_Camera); + if (GetIEditor()->IsInGameMode()) + { + return; + } + PreWidgetRendering(); RenderAll(); @@ -905,11 +923,6 @@ void EditorViewportWidget::OnBeginPrepareRender() m_debugDisplay->DepthTestOn(); PostWidgetRendering(); - - if (!m_renderer->IsStereoEnabled()) - { - GetIEditor()->GetSystem()->RenderStatistics(); - } } ////////////////////////////////////////////////////////////////////////// @@ -1617,11 +1630,6 @@ void EditorViewportWidget::keyPressEvent(QKeyEvent* event) // because we want the movement to be butter smooth. if (!event->isAutoRepeat()) { - if (m_keyDown.isEmpty()) - { - grabKeyboard(); - } - m_keyDown.insert(event->key()); } diff --git a/Code/Sandbox/Editor/IEditor.h b/Code/Sandbox/Editor/IEditor.h index 7715e64fe5..722f2a7c25 100644 --- a/Code/Sandbox/Editor/IEditor.h +++ b/Code/Sandbox/Editor/IEditor.h @@ -391,21 +391,6 @@ enum EModifiedModule eModifiedAll = -1 }; -//! Callback class passed to PickObject. -struct IPickObjectCallback -{ - virtual ~IPickObjectCallback() = default; - - //! Called when object picked. - virtual void OnPick(CBaseObject* picked) = 0; - //! Called when pick mode cancelled. - virtual void OnCancelPick() = 0; - //! Return true if specified object is pickable. - virtual bool OnPickFilter([[maybe_unused]] CBaseObject* filterObject) { return true; }; - //! If need a specific behavior when holding space, return true or if not, return false. - virtual bool IsNeedSpecificBehaviorForSpaceAcce() { return false; } -}; - //! Class provided by editor for various registration functions. struct CRegistrationContext { @@ -570,20 +555,6 @@ struct IEditor //! Get access to object manager. virtual struct IObjectManager* GetObjectManager() = 0; virtual CSettingsManager* GetSettingsManager() = 0; - //! Set pick object mode. - //! When object picked callback will be called, with OnPick - //! If pick operation is canceled Cancel will be called - //! @param targetClass specifies objects of which class are supposed to be picked - //! @param bMultipick if true pick tool will pick multiple object - virtual void PickObject( - IPickObjectCallback* callback, - const QMetaObject* targetClass = 0, - const char* statusText = 0, - bool bMultipick = false) = 0; - //! Cancel current pick operation - virtual void CancelPick() = 0; - //! Return true if editor now in object picking mode - virtual bool IsPicking() = 0; //! Get DB manager that own items of specified type. virtual IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) = 0; //! Get Manager of Materials. diff --git a/Code/Sandbox/Editor/IEditorImpl.cpp b/Code/Sandbox/Editor/IEditorImpl.cpp index 4a0a73c9ac..399ac45794 100644 --- a/Code/Sandbox/Editor/IEditorImpl.cpp +++ b/Code/Sandbox/Editor/IEditorImpl.cpp @@ -65,7 +65,6 @@ AZ_POP_DISABLE_WARNING #include "UIEnumsDatabase.h" #include "Util/Ruler.h" #include "RenderHelpers/AxisHelper.h" -#include "PickObjectTool.h" #include "Settings.h" #include "Include/IObjectManager.h" #include "Include/ISourceControl.h" @@ -170,7 +169,6 @@ CEditorImpl::CEditorImpl() , m_pShaderEnum(nullptr) , m_pIconManager(nullptr) , m_bSelectionLocked(true) - , m_pPickTool(nullptr) , m_pAxisGizmo(nullptr) , m_pGameEngine(nullptr) , m_pAnimationContext(nullptr) @@ -794,11 +792,6 @@ void CEditorImpl::SetEditTool(CEditTool* tool, bool bStopCurrentTool) m_pEditTool->BeginEditParams(this, 0); } - // Make sure pick is aborted. - if (tool != m_pPickTool) - { - m_pPickTool = nullptr; - } Notify(eNotify_OnEditToolChange); } @@ -1069,34 +1062,6 @@ bool CEditorImpl::IsSelectionLocked() return m_bSelectionLocked; } -void CEditorImpl::PickObject(IPickObjectCallback* callback, const QMetaObject* targetClass, const char* statusText, bool bMultipick) -{ - m_pPickTool = new CPickObjectTool(callback, targetClass); - - static_cast(m_pPickTool.get())->SetMultiplePicks(bMultipick); - if (statusText) - { - m_pPickTool.get()->SetStatusText(statusText); - } - - SetEditTool(m_pPickTool); -} - -void CEditorImpl::CancelPick() -{ - SetEditTool(0); - m_pPickTool = 0; -} - -bool CEditorImpl::IsPicking() -{ - if (GetEditTool() == m_pPickTool && m_pPickTool != 0) - { - return true; - } - return false; -} - CViewManager* CEditorImpl::GetViewManager() { return m_pViewManager; diff --git a/Code/Sandbox/Editor/IEditorImpl.h b/Code/Sandbox/Editor/IEditorImpl.h index 9e3b3abc66..4a8d5fa191 100644 --- a/Code/Sandbox/Editor/IEditorImpl.h +++ b/Code/Sandbox/Editor/IEditorImpl.h @@ -181,10 +181,7 @@ public: void SelectObject(CBaseObject* obj); void LockSelection(bool bLock); bool IsSelectionLocked(); - void PickObject(IPickObjectCallback* callback, const QMetaObject* targetClass = 0, const char* statusText = 0, bool bMultipick = false); - void CancelPick(); - bool IsPicking(); IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType); CMaterialManager* GetMaterialManager() { return m_pMaterialManager; } CMusicManager* GetMusicManager() { return m_pMusicManager; }; @@ -409,7 +406,6 @@ protected: QString m_primaryCDFolder; QString m_userFolder; bool m_bSelectionLocked; - _smart_ptr m_pPickTool; class CAxisGizmo* m_pAxisGizmo; CGameEngine* m_pGameEngine; CAnimationContext* m_pAnimationContext; diff --git a/Code/Sandbox/Editor/LayoutWnd.cpp b/Code/Sandbox/Editor/LayoutWnd.cpp index 56c0bcb849..34a96bca53 100644 --- a/Code/Sandbox/Editor/LayoutWnd.cpp +++ b/Code/Sandbox/Editor/LayoutWnd.cpp @@ -418,8 +418,11 @@ void CLayoutWnd::CreateLayout(EViewLayout layout, bool bBindViewports, EViewport QRect rcView = rect(); rcView.setBottom(rcView.bottom() - m_infoBar->height()); + // Ensure we delete our old view immediately so it can relinquish its backing ViewportContext if (m_maximizedView) - m_maximizedView->deleteLater(); + { + delete m_maximizedView; + } m_maximizedView = new CLayoutViewPane(this); m_maximizedView->SetId(0); diff --git a/Code/Sandbox/Editor/LegacyViewportCameraController.cpp b/Code/Sandbox/Editor/LegacyViewportCameraController.cpp index 7a33dff377..518b17f898 100644 --- a/Code/Sandbox/Editor/LegacyViewportCameraController.cpp +++ b/Code/Sandbox/Editor/LegacyViewportCameraController.cpp @@ -408,6 +408,13 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra } } + UpdateCursorCapture(shouldCaptureCursor); + + return shouldConsumeEvent; +} + +void LegacyViewportCameraControllerInstance::UpdateCursorCapture(bool shouldCaptureCursor) +{ if (m_capturingCursor != shouldCaptureCursor) { if (shouldCaptureCursor) @@ -427,8 +434,14 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra m_capturingCursor = shouldCaptureCursor; } +} - return shouldConsumeEvent; +void LegacyViewportCameraControllerInstance::ResetInputChannels() +{ + m_modifiers = 0; + m_pressedKeys.clear(); + UpdateCursorCapture(false); + m_inRotateMode = m_inMoveMode = m_inOrbitMode = m_inZoomMode = false; } void LegacyViewportCameraControllerInstance::UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) diff --git a/Code/Sandbox/Editor/LegacyViewportCameraController.h b/Code/Sandbox/Editor/LegacyViewportCameraController.h index b4a36f44a5..129a2409da 100644 --- a/Code/Sandbox/Editor/LegacyViewportCameraController.h +++ b/Code/Sandbox/Editor/LegacyViewportCameraController.h @@ -35,6 +35,7 @@ namespace SandboxEditor explicit LegacyViewportCameraControllerInstance(AzFramework::ViewportId viewport); bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override; + void ResetInputChannels() override; void UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) override; private: @@ -53,6 +54,7 @@ namespace SandboxEditor bool HandleMouseMove(const AzFramework::ScreenPoint& currentMousePos, const AzFramework::ScreenPoint& previousMousePos); bool HandleMouseWheel(float zDelta); bool IsKeyDown(Qt::Key key) const; + void UpdateCursorCapture(bool shouldCaptureCursor); bool m_inRotateMode = false; bool m_inMoveMode = false; diff --git a/Code/Sandbox/Editor/Lib/Tests/IEditorMock.h b/Code/Sandbox/Editor/Lib/Tests/IEditorMock.h index a290ef5de5..e48fb5fec1 100644 --- a/Code/Sandbox/Editor/Lib/Tests/IEditorMock.h +++ b/Code/Sandbox/Editor/Lib/Tests/IEditorMock.h @@ -90,9 +90,6 @@ public: MOCK_METHOD0(IsSelectionLocked, bool()); MOCK_METHOD0(GetObjectManager, struct IObjectManager* ()); MOCK_METHOD0(GetSettingsManager, CSettingsManager* ()); - MOCK_METHOD4(PickObject, void(IPickObjectCallback*,const QMetaObject*,const char* ,bool bMultipick)); - MOCK_METHOD0(CancelPick, void()); - MOCK_METHOD0(IsPicking, bool()); MOCK_METHOD1(GetDBItemManager, IDataBaseManager* (EDataBaseItemType)); MOCK_METHOD0(GetMaterialManager, CMaterialManager* ()); MOCK_METHOD0(GetMaterialManagerLibrary, IBaseLibraryManager* ()); diff --git a/Code/Sandbox/Editor/LinkTool.cpp b/Code/Sandbox/Editor/LinkTool.cpp deleted file mode 100644 index 4602875b77..0000000000 --- a/Code/Sandbox/Editor/LinkTool.cpp +++ /dev/null @@ -1,286 +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 "EditorDefs.h" - -#include "LinkTool.h" - -// Editor -#include "Viewport.h" -#include "Objects/EntityObject.h" -#include "Objects/SelectionGroup.h" -#include - -// AzCore -#include - -#ifdef LoadCursor -#undef LoadCursor -#endif - -namespace -{ - const float kGeomCacheNodePivotSizeScale = 0.0025f; -} - -////////////////////////////////////////////////////////////////////////// -CLinkTool::CLinkTool() - : m_nodeName(nullptr) - , m_pGeomCacheRenderNode(nullptr) -{ - m_pChild = NULL; - SetStatusText("Click on object and drag a link to a new parent"); - - m_hLinkCursor = CMFCUtils::LoadCursor(IDC_POINTER_LINK); - m_hLinkNowCursor = CMFCUtils::LoadCursor(IDC_POINTER_LINKNOW); - m_hCurrCursor = &m_hLinkCursor; - AZ::EntitySystemBus::Handler::BusConnect(); -} - -////////////////////////////////////////////////////////////////////////// -CLinkTool::~CLinkTool() -{ - AZ::EntitySystemBus::Handler::BusDisconnect(); -} - -////////////////////////////////////////////////////////////////////////// -void CLinkTool::LinkObject(CBaseObject* pChild, CBaseObject* pParent) -{ - if (pChild == NULL) - { - return; - } - - if (ChildIsValid(pParent, pChild)) - { - CUndo undo("Link Object"); - - if (qobject_cast(pChild)) - { - static_cast(pChild)->SetAttachTarget(""); - static_cast(pChild)->SetAttachType(CEntityObject::eAT_Pivot); - } - - pParent->AttachChild(pChild, true); - - QString str; - str = tr("%1 attached to %2").arg(pChild->GetName(), pParent->GetName()); - SetStatusText(str); - } - else - { - SetStatusText("Error: Cyclic linking or already linked."); - } -} - -////////////////////////////////////////////////////////////////////////// -void CLinkTool::LinkSelectedToParent(CBaseObject* pParent) -{ - if (pParent) - { - if (IsRelevant(pParent)) - { - CSelectionGroup* pSel = GetIEditor()->GetSelection(); - if (!pSel->GetCount()) - { - return; - } - CUndo undo("Link Object(s)"); - for (int i = 0; i < pSel->GetCount(); i++) - { - CBaseObject* pChild = pSel->GetObject(i); - if (pChild == pParent) - { - continue; - } - LinkObject(pChild, pParent); - } - } - } -} - -////////////////////////////////////////////////////////////////////////// -bool CLinkTool::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, [[maybe_unused]] int flags) -{ - view->SetCursorString(""); - - m_hCurrCursor = &m_hLinkCursor; - if (event == eMouseLDown) - { - HitContext hitInfo; - view->HitTest(point, hitInfo); - CBaseObject* obj = hitInfo.object; - if (obj) - { - if (IsRelevant(obj)) - { - m_StartDrag = obj->GetWorldPos(); - m_pChild = obj; - } - } - } - else if (event == eMouseLUp) - { - HitContext hitInfo; - view->HitTest(point, hitInfo); - CBaseObject* obj = hitInfo.object; - if (obj) - { - if (IsRelevant(obj)) - { - CSelectionGroup* pSelectionGroup = GetIEditor()->GetSelection(); - int nGroupCount = pSelectionGroup->GetCount(); - if (pSelectionGroup && nGroupCount > 1) - { - LinkSelectedToParent(obj); - } - if (!pSelectionGroup || nGroupCount <= 1 || !pSelectionGroup->IsContainObject(m_pChild)) - { - LinkObject(m_pChild, obj); - } - } - } - m_pChild = NULL; - } - else if (event == eMouseMove) - { - m_EndDrag = view->ViewToWorld(point); - m_nodeName = nullptr; - m_pGeomCacheRenderNode = nullptr; - - HitContext hitInfo; - if (view->HitTest(point, hitInfo)) - { - m_EndDrag = hitInfo.raySrc + hitInfo.rayDir * hitInfo.dist; - } - - CBaseObject* obj = hitInfo.object; - if (obj) - { - if (IsRelevant(obj)) - { - QString name = obj->GetName(); - if (hitInfo.name) - { - name += QString("\n ") + hitInfo.name; - } - - // Set Cursors. - view->SetCursorString(name); - if (m_pChild) - { - if (ChildIsValid(obj, m_pChild)) - { - m_hCurrCursor = &m_hLinkNowCursor; - } - } - } - } - } - return true; -} - -////////////////////////////////////////////////////////////////////////// -bool CLinkTool::OnKeyDown([[maybe_unused]] CViewport* view, uint32 nChar, [[maybe_unused]] uint32 nRepCnt, [[maybe_unused]] uint32 nFlags) -{ - if (nChar == VK_ESCAPE) - { - // Cancel selection. - GetIEditor()->SetEditTool(nullptr); - } - return false; -} - -////////////////////////////////////////////////////////////////////////// -void CLinkTool::Display(DisplayContext& dc) -{ - if (m_pChild && m_EndDrag != Vec3(ZERO)) - { - ColorF lineColor = (m_hCurrCursor == &m_hLinkNowCursor) ? ColorF(0, 1, 0) : ColorF(1, 0, 0); - dc.DrawLine(m_StartDrag, m_EndDrag, lineColor, lineColor); - } -} - -////////////////////////////////////////////////////////////////////////// -void CLinkTool::OnEntityDestruction(const AZ::EntityId& entityId) -{ - if (m_pChild && (m_pChild->GetType() == OBJTYPE_AZENTITY)) - { - CComponentEntityObject* childComponentEntity = static_cast(m_pChild); - AZ::EntityId childEntityId = childComponentEntity->GetAssociatedEntityId(); - if(entityId == childEntityId) - { - GetIEditor()->SetEditTool(nullptr); - } - } -} - -////////////////////////////////////////////////////////////////////////// -bool CLinkTool::ChildIsValid(CBaseObject* pParent, CBaseObject* pChild, int nDir) -{ - if (!pParent) - { - return false; - } - if (!pChild) - { - return false; - } - if (pParent == pChild) - { - return false; - } - - // Legacy entities and AZ entities shouldn't be linked. - if ((pParent->GetType() == OBJTYPE_AZENTITY) != (pChild->GetType() == OBJTYPE_AZENTITY)) - { - return false; - } - - CBaseObject* pObj; - if (nDir & 1) - { - pObj = pChild->GetParent(); - if (pObj) - { - if (!ChildIsValid(pParent, pObj, 1)) - { - return false; - } - } - } - if (nDir & 2) - { - for (int i = 0; i < pChild->GetChildCount(); i++) - { - pObj = pChild->GetChild(i); - if (pObj) - { - if (!ChildIsValid(pParent, pObj, 2)) - { - return false; - } - } - } - } - return true; -} - -////////////////////////////////////////////////////////////////////////// -bool CLinkTool::OnSetCursor(CViewport* vp) -{ - vp->SetCursor(*m_hCurrCursor); - return true; -} - -#include diff --git a/Code/Sandbox/Editor/LinkTool.h b/Code/Sandbox/Editor/LinkTool.h deleted file mode 100644 index a24370f7fe..0000000000 --- a/Code/Sandbox/Editor/LinkTool.h +++ /dev/null @@ -1,85 +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 : Definition of CLinkTool, tool used to link objects. - - -#ifndef CRYINCLUDE_EDITOR_LINKTOOL_H -#define CRYINCLUDE_EDITOR_LINKTOOL_H - -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#include "EditTool.h" -#include "Include/IObjectManager.h" -#endif - -class CEntityObject; - -////////////////////////////////////////////////////////////////////////// -class CLinkTool - : public CEditTool - , public IObjectSelectCallback - , private AZ::EntitySystemBus::Handler -{ - Q_OBJECT -public: - Q_INVOKABLE CLinkTool(); // IPickObjectCallback *callback,CRuntimeClass *targetClass=NULL ); - - // Ovverides from CEditTool - bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags); - - virtual void BeginEditParams([[maybe_unused]] IEditor* ie, [[maybe_unused]] int flags) {}; - virtual void EndEditParams() {}; - - virtual void Display(DisplayContext& dc); - virtual bool OnKeyDown(CViewport* view, uint32 nChar, uint32 nRepCnt, uint32 nFlags); - virtual bool OnKeyUp([[maybe_unused]] CViewport* view, [[maybe_unused]] uint32 nChar, [[maybe_unused]] uint32 nRepCnt, [[maybe_unused]] uint32 nFlags) { return false; }; - - virtual bool OnSelectObject([[maybe_unused]] CBaseObject* obj) {return false; } - virtual bool CanSelectObject([[maybe_unused]] CBaseObject* obj) { return true; }; - - virtual bool OnSetCursor(CViewport* vp); - - void LinkSelectedToParent(CBaseObject* pParent); - -protected: - virtual ~CLinkTool(); - // Delete itself. - void DeleteThis() { delete this; }; - -private: - bool IsRelevant([[maybe_unused]] CBaseObject* obj) { return true; } - bool ChildIsValid(CBaseObject* pParent, CBaseObject* pChild, int nDir = 3); - void LinkObject(CBaseObject* pChild, CBaseObject* pParent); - void LinkToNode(CEntityObject* pChild, CEntityObject* pParent, const char* nodeName); - - // AZ::EntitySystemBus::Handler - void OnEntityDestruction(const AZ::EntityId& entityId) override; - - - CBaseObject* m_pChild; - Vec3 m_StartDrag; - Vec3 m_EndDrag; - - QCursor m_hLinkCursor; - QCursor m_hLinkNowCursor; - QCursor* m_hCurrCursor; - - const char* m_nodeName; - IGeomCacheRenderNode* m_pGeomCacheRenderNode; -}; - - -#endif // CRYINCLUDE_EDITOR_LINKTOOL_H diff --git a/Code/Sandbox/Editor/MainWindow.cpp b/Code/Sandbox/Editor/MainWindow.cpp index ab5e0cf559..6acd8cfc20 100644 --- a/Code/Sandbox/Editor/MainWindow.cpp +++ b/Code/Sandbox/Editor/MainWindow.cpp @@ -92,7 +92,6 @@ AZ_POP_DISABLE_WARNING #include "TrackView/TrackViewDialog.h" #include "ErrorReportDialog.h" -#include "Material/MaterialDialog.h" #include "LensFlareEditor/LensFlareEditor.h" #include "TimeOfDayDialog.h" @@ -1105,15 +1104,6 @@ void MainWindow::InitActions() .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelected) .SetIcon(Style::icon("Align_to_grid")) .SetApplyHoverEffect(); - am->AddAction(ID_OBJECTMODIFY_ALIGN, tr("Align to object")).SetCheckable(true) -#if AZ_TRAIT_OS_PLATFORM_APPLE - .SetStatusTip(tr(u8"\u2318: Align an object to a bounding box, \u2325 : Keep Rotation of the moved object, Shift : Keep Scale of the moved object")) -#else - .SetStatusTip(tr("Ctrl: Align an object to a bounding box, Alt : Keep Rotation of the moved object, Shift : Keep Scale of the moved object")) -#endif - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateAlignObject) - .SetIcon(Style::icon("Align_to_Object")) - .SetApplyHoverEffect(); am->AddAction(ID_MODIFY_ALIGNOBJTOSURF, tr("Align object to surface (Hold CTRL)")).SetCheckable(true) .SetToolTip(tr("Align object to surface (Hold CTRL)")) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateAlignToVoxel) @@ -1450,15 +1440,6 @@ void MainWindow::InitActions() .SetApplyHoverEffect(); // Edit Mode Toolbar Actions - am->AddAction(ID_EDITTOOL_LINK, tr("Link an object to parent")) - .SetIcon(Style::icon("add_link")) - .SetApplyHoverEffect() - .SetCheckable(true) - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditToolLink); - am->AddAction(ID_EDITTOOL_UNLINK, tr("Unlink all selected objects")) - .SetIcon(Style::icon("remove_link")) - .SetApplyHoverEffect() - .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditToolUnlink); am->AddAction(IDC_SELECTION_MASK, tr("Selected Object Types")); am->AddAction(ID_REF_COORDS_SYS, tr("Reference coordinate system")) .SetShortcut(tr("Ctrl+W")) @@ -1974,7 +1955,6 @@ void MainWindow::RegisterStdViewClasses() if (!AZ::Interface::Get()) { - CMaterialDialog::RegisterViewClass(); CLensFlareEditor::RegisterViewClass(); CTimeOfDayDialog::RegisterViewClass(); } diff --git a/Code/Sandbox/Editor/MatEditMainDlg.cpp b/Code/Sandbox/Editor/MatEditMainDlg.cpp deleted file mode 100644 index 9a96ad15d0..0000000000 --- a/Code/Sandbox/Editor/MatEditMainDlg.cpp +++ /dev/null @@ -1,110 +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 file - -#include "EditorDefs.h" - -#include "MatEditMainDlg.h" - -// Qt -#include -#include - -// Editor -#include "Material/MaterialDialog.h" -#include "Material/MaterialManager.h" -#include "MaterialSender.h" - - -CMatEditMainDlg::CMatEditMainDlg(const QString& title, QWidget* pParent /*=NULL*/) - : QWidget(pParent) -{ - resize(1000, 600); - - setWindowTitle(title); - - QTimer* t = new QTimer(this); - connect(t, &QTimer::timeout, this, &CMatEditMainDlg::OnKickIdle); - t->start(250); - - m_materialDialog = new CMaterialDialog(); // must be created after the timer - auto layout = new QVBoxLayout(this); - layout->addWidget(m_materialDialog); - -#ifdef Q_OS_WIN - if (auto aed = QAbstractEventDispatcher::instance()) - { - aed->installNativeEventFilter(this); - } -#endif -} - -CMatEditMainDlg::~CMatEditMainDlg() -{ -#ifdef Q_OS_WIN - if (auto aed = QAbstractEventDispatcher::instance()) - { - aed->removeNativeEventFilter(this); - } -#endif -} - -///////////////////////////////////////////////////////////////////////////// -// CMatEditMainDlg message handlers - -void CMatEditMainDlg::showEvent(QShowEvent*) -{ - if (QWindow *win = window()->windowHandle()) - { - // Make sure our top-level window decorator wrapper set this exact title - // 3ds Max Exporter will use ::FindWindow with this name - win->setTitle("Material Editor"); - } -} - -bool CMatEditMainDlg::nativeEventFilter(const QByteArray&, void* message, long*) -{ -#ifdef Q_OS_WIN - // WM_MATEDITSEND is Windows only. Used by 3ds Max exporter. - MSG* msg = static_cast(message); - if (msg->message == WM_MATEDITSEND) - { - OnMatEditSend(msg->wParam); - return true; - } -#endif - - return false; -} - -void CMatEditMainDlg::closeEvent(QCloseEvent* event) -{ - QWidget::closeEvent(event); - qApp->quit(); -} - -void CMatEditMainDlg::OnKickIdle() -{ - GetIEditor()->Notify(eNotify_OnIdleUpdate); -} - -void CMatEditMainDlg::OnMatEditSend(int param) -{ - if (param != eMSM_Init) - { - GetIEditor()->GetMaterialManager()->SyncMaterialEditor(); - } -} - -#include diff --git a/Code/Sandbox/Editor/MatEditMainDlg.h b/Code/Sandbox/Editor/MatEditMainDlg.h deleted file mode 100644 index b329933c1f..0000000000 --- a/Code/Sandbox/Editor/MatEditMainDlg.h +++ /dev/null @@ -1,48 +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_EDITOR_MATEDITMAINDLG_H -#define CRYINCLUDE_EDITOR_MATEDITMAINDLG_H - -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#include -#include -#endif - -class CMaterialDialog; - -class CMatEditMainDlg - : public QWidget - , public QAbstractNativeEventFilter -{ - Q_OBJECT -public: - explicit CMatEditMainDlg(const QString& title = QString(), QWidget* parent = nullptr); - ~CMatEditMainDlg(); - - bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override; - -protected: - void closeEvent(QCloseEvent* event) override; - void showEvent(QShowEvent* event) override; - -private: - void OnKickIdle(); - void OnMatEditSend(int param); - CMaterialDialog* m_materialDialog = nullptr; -}; - -#endif // CRYINCLUDE_EDITOR_MATEDITMAINDLG_H diff --git a/Code/Sandbox/Editor/Material/MaterialDialog.cpp b/Code/Sandbox/Editor/Material/MaterialDialog.cpp deleted file mode 100644 index 5d5f14ecd2..0000000000 --- a/Code/Sandbox/Editor/Material/MaterialDialog.cpp +++ /dev/null @@ -1,2290 +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 "EditorDefs.h" - -#include "MaterialDialog.h" - -// Qt -#include -#include -#include -#include -#include -#include -#include -#include - -// AzToolsFramework -#include // for AzToolsFramework::ViewPaneOptions - -// Editor -#include "IEditor.h" -#include "EditTool.h" -#include "MaterialImageListCtrl.h" -#include "MaterialManager.h" -#include "MaterialHelpers.h" -#include "ShaderEnum.h" -#include "MatEditPreviewDlg.h" -#include "Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.h" -#include "Include/IObjectManager.h" -#include "Objects/BaseObject.h" -#include "Settings.h" -#include "Objects/SelectionGroup.h" -#include "LyViewPaneNames.h" - - -const QString EDITOR_OBJECTS_PATH("Objects\\Editor\\"); - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::RegisterViewClass() -{ - AzToolsFramework::ViewPaneOptions opts; - opts.shortcut = QKeySequence(Qt::Key_M); - opts.canHaveMultipleInstances = true; - - AzToolsFramework::RegisterViewPane(MATERIAL_EDITOR_NAME, LyViewPane::CategoryTools, opts); - - GetIEditor()->GetSettingsManager()->AddToolVersion(MATERIAL_EDITOR_NAME, MATERIAL_EDITOR_VER); -} - -const GUID& CMaterialDialog::GetClassID() -{ - static const GUID guid = - { - 0xc7891863, 0x1665, 0x45ac, { 0xae, 0x51, 0x48, 0x66, 0x71, 0xbc, 0x8b, 0x12 } - }; - return guid; -} - -inline float RoundDegree(float val) -{ - return (float)((int)(val * 100 + 0.5f)) * 0.01f; -} - -////////////////////////////////////////////////////////////////////////// -// Material structures. -////////////////////////////////////////////////////////////////////////// - -#ifndef _countof -#define _countof(array) (sizeof(array) / sizeof(array[0])) -#endif - -struct STextureVars -{ - CSmartVariable is_tile[2]; - - CSmartVariableEnum etcgentype; - CSmartVariableEnum etcmrotatetype; - CSmartVariableEnum etcmumovetype; - CSmartVariableEnum etcmvmovetype; - CSmartVariableEnum etextype; - CSmartVariableEnum filter; - - CSmartVariable is_tcgprojected; - CSmartVariable tiling[3]; - CSmartVariable rotate[3]; - CSmartVariable offset[3]; - CSmartVariable tcmuoscrate; - CSmartVariable tcmvoscrate; - CSmartVariable tcmuoscamplitude; - CSmartVariable tcmvoscamplitude; - CSmartVariable tcmuoscphase; - CSmartVariable tcmvoscphase; - CSmartVariable tcmrotoscrate; - CSmartVariable tcmrotoscamplitude; - CSmartVariable tcmrotoscphase; - CSmartVariable tcmrotosccenter[2]; - - CSmartVariableArray tableTiling; - CSmartVariableArray tableOscillator; - CSmartVariableArray tableRotator; - - void Reset() - { - SEfTexModificator defaultTextureCoordinateModifier; - SEfResTexture defaultTextureResource; - for (int i = 0; i < 2; i++) - { - *is_tile[i] = defaultTextureResource.GetTiling(i); - *tcmrotosccenter[i] = defaultTextureCoordinateModifier.m_RotOscCenter[i]; - } - - for (int i = 0; i < 3; i++) - { - *rotate[i] = RoundDegree(Word2Degr(defaultTextureCoordinateModifier.m_Rot[i])); - *tiling[i] = defaultTextureCoordinateModifier.m_Tiling[i]; - *offset[i] = defaultTextureCoordinateModifier.m_Offs[i]; - } - - etcgentype = defaultTextureCoordinateModifier.m_eTGType; - etcmrotatetype = defaultTextureCoordinateModifier.m_eRotType; - etcmumovetype = defaultTextureCoordinateModifier.m_eMoveType[0]; - etcmvmovetype = defaultTextureCoordinateModifier.m_eMoveType[1]; - etextype = defaultTextureResource.m_Sampler.m_eTexType; - filter = defaultTextureResource.m_Filter; - is_tcgprojected = defaultTextureCoordinateModifier.m_bTexGenProjected; - - tcmuoscrate = defaultTextureCoordinateModifier.m_OscRate[0]; - tcmvoscrate = defaultTextureCoordinateModifier.m_OscRate[1]; - - tcmuoscamplitude = defaultTextureCoordinateModifier.m_OscAmplitude[0]; - tcmvoscamplitude = defaultTextureCoordinateModifier.m_OscAmplitude[1]; - - tcmuoscphase = defaultTextureCoordinateModifier.m_OscPhase[0]; - tcmvoscphase = defaultTextureCoordinateModifier.m_OscPhase[1]; - - tcmrotoscrate = RoundDegree(Word2Degr(defaultTextureCoordinateModifier.m_RotOscRate[2])); - tcmrotoscamplitude = RoundDegree(Word2Degr(defaultTextureCoordinateModifier.m_RotOscAmplitude[2])); - tcmrotoscphase = RoundDegree(Word2Degr(defaultTextureCoordinateModifier.m_RotOscPhase[2])); - } -}; - -struct SMaterialLayerVars -{ - CSmartVariable bNoDraw; // disable layer rendering (useful in some cases) - CSmartVariable bFadeOut; // fade out layer rendering and parent rendering - CSmartVariableEnum shader; // shader layer name -}; - -struct SVertexWaveFormUI -{ - CSmartVariableArray table; - CSmartVariableEnum waveFormType; - CSmartVariable level; - CSmartVariable amplitude; - CSmartVariable phase; - CSmartVariable frequency; -}; - -////////////////////////////////////////////////////////////////////////// -struct SVertexModUI -{ - CSmartVariableEnum type; - CSmartVariable fDividerX; - CSmartVariable fDividerY; - CSmartVariable fDividerZ; - CSmartVariable fDividerW; - CSmartVariable vNoiseScale; - SVertexWaveFormUI wave; -}; - -/** User Interface definition of material. -*/ -class CMaterialUI -{ -public: - CSmartVariableEnum shader; - CSmartVariable bNoShadow; - CSmartVariable bAdditive; - CSmartVariable bWire; - CSmartVariable b2Sided; - CSmartVariable opacity; - CSmartVariable alphaTest; - CSmartVariable emissiveIntensity; - CSmartVariable voxelCoverage; - CSmartVariable heatAmount; - CSmartVariable bScatter; - CSmartVariable bHideAfterBreaking; - CSmartVariable bFogVolumeShadingQualityHigh; - CSmartVariable bBlendTerrainColor; - //CSmartVariable bTranslucenseLayer; - CSmartVariableEnum surfaceType; - - CSmartVariable allowLayerActivation; - - ////////////////////////////////////////////////////////////////////////// - // Material Value Propagation for dynamic material switches, as for instance - // used by breakable glass - ////////////////////////////////////////////////////////////////////////// - CSmartVariableEnum matPropagate; - CSmartVariable bPropagateMaterialSettings; - CSmartVariable bPropagateOpactity; - CSmartVariable bPropagateLighting; - CSmartVariable bPropagateAdvanced; - CSmartVariable bPropagateTexture; - CSmartVariable bPropagateVertexDef; - CSmartVariable bPropagateShaderParams; - CSmartVariable bPropagateLayerPresets; - CSmartVariable bPropagateShaderGenParams; - - ////////////////////////////////////////////////////////////////////////// - // Lighting - ////////////////////////////////////////////////////////////////////////// - CSmartVariable diffuse; // Diffuse color 0..1 - CSmartVariable specular; // Specular color 0..1 - CSmartVariable smoothness; // Specular shininess. - CSmartVariable emissiveCol; // Emissive color 0..1 - - ////////////////////////////////////////////////////////////////////////// - // Textures. - ////////////////////////////////////////////////////////////////////////// - CSmartVariableArray textureVars[EFTT_MAX]; - CSmartVariableArray advancedTextureGroup[EFTT_MAX]; - STextureVars textures[EFTT_MAX]; - - ////////////////////////////////////////////////////////////////////////// - // Material layers settings - ////////////////////////////////////////////////////////////////////////// - - // 8 max for now. change this later - SMaterialLayerVars materialLayers[MTL_LAYER_MAX_SLOTS]; - - ////////////////////////////////////////////////////////////////////////// - - SVertexModUI vertexMod; - - CSmartVariableArray tableShader; - CSmartVariableArray tableOpacity; - CSmartVariableArray tableLighting; - CSmartVariableArray tableTexture; - CSmartVariableArray tableAdvanced; - CSmartVariableArray tableVertexMod; - CSmartVariableArray tableEffects; - - CSmartVariableArray tableShaderParams; - CSmartVariableArray tableShaderGenParams; - - CVarEnumList* enumTexType; - CVarEnumList* enumTexGenType; - CVarEnumList* enumTexModRotateType; - CVarEnumList* enumTexModUMoveType; - CVarEnumList* enumTexModVMoveType; - CVarEnumList* enumTexFilterType; - - CVarEnumList* enumVertexMod; - CVarEnumList* enumWaveType; - - ////////////////////////////////////////////////////////////////////////// - int texUsageMask; - - CVarBlockPtr m_vars; - - typedef std::map TVarChangeNotifications; - TVarChangeNotifications m_varChangeNotifications; - - ////////////////////////////////////////////////////////////////////////// - void SetFromMaterial(CMaterial* mtl); - void SetToMaterial(CMaterial* mtl, int propagationFlags = MTL_PROPAGATE_ALL); - void SetTextureNames(CMaterial* mtl); - - void SetShaderResources(const SInputShaderResources& srTextures, bool bSetTextures = true); - void GetShaderResources(SInputShaderResources& sr, int propagationFlags); - - void SetVertexDeform(const SInputShaderResources& sr); - void GetVertexDeform(SInputShaderResources& sr, int propagationFlags); - - void PropagateFromLinkedMaterial(CMaterial* mtl); - void PropagateToLinkedMaterial(CMaterial* mtl, CVarBlockPtr pShaderParamsBlock); - void NotifyObjectsAboutMaterialChange(IVariable* var); - - - ////////////////////////////////////////////////////////////////////////// - CMaterialUI() - { - } - - ~CMaterialUI() - { - } - - ////////////////////////////////////////////////////////////////////////// - CVarBlock* CreateVars() - { - m_vars = new CVarBlock; - - ////////////////////////////////////////////////////////////////////////// - // Init enums. - ////////////////////////////////////////////////////////////////////////// - enumTexType = new CVarEnumList(); - enumTexType->AddItem("2D", eTT_2D); - enumTexType->AddItem("Cube-Map", eTT_Cube); - enumTexType->AddItem("Nearest Cube-Map probe for alpha blended", eTT_NearestCube); - enumTexType->AddItem("Dynamic 2D-Map", eTT_Dyn2D); - enumTexType->AddItem("From User Params", eTT_User); - - enumTexGenType = new CVarEnumList(); - enumTexGenType->AddItem("Stream", ETG_Stream); - enumTexGenType->AddItem("World", ETG_World); - enumTexGenType->AddItem("Camera", ETG_Camera); - - enumTexModRotateType = new CVarEnumList(); - enumTexModRotateType->AddItem("No Change", ETMR_NoChange); - enumTexModRotateType->AddItem("Fixed Rotation", ETMR_Fixed); - enumTexModRotateType->AddItem("Constant Rotation", ETMR_Constant); - enumTexModRotateType->AddItem("Oscillated Rotation", ETMR_Oscillated); - - enumTexModUMoveType = new CVarEnumList(); - enumTexModUMoveType->AddItem("No Change", ETMM_NoChange); - enumTexModUMoveType->AddItem("Fixed Moving", ETMM_Fixed); - enumTexModUMoveType->AddItem("Constant Moving", ETMM_Constant); - enumTexModUMoveType->AddItem("Jitter Moving", ETMM_Jitter); - enumTexModUMoveType->AddItem("Pan Moving", ETMM_Pan); - enumTexModUMoveType->AddItem("Stretch Moving", ETMM_Stretch); - enumTexModUMoveType->AddItem("Stretch-Repeat Moving", ETMM_StretchRepeat); - - enumTexModVMoveType = new CVarEnumList(); - enumTexModVMoveType->AddItem("No Change", ETMM_NoChange); - enumTexModVMoveType->AddItem("Fixed Moving", ETMM_Fixed); - enumTexModVMoveType->AddItem("Constant Moving", ETMM_Constant); - enumTexModVMoveType->AddItem("Jitter Moving", ETMM_Jitter); - enumTexModVMoveType->AddItem("Pan Moving", ETMM_Pan); - enumTexModVMoveType->AddItem("Stretch Moving", ETMM_Stretch); - enumTexModVMoveType->AddItem("Stretch-Repeat Moving", ETMM_StretchRepeat); - - enumTexFilterType = new CVarEnumList(); - enumTexFilterType->AddItem("Default", FILTER_NONE); - enumTexFilterType->AddItem("Point", FILTER_POINT); - enumTexFilterType->AddItem("Linear", FILTER_LINEAR); - enumTexFilterType->AddItem("Bilinear", FILTER_BILINEAR); - enumTexFilterType->AddItem("Trilinear", FILTER_TRILINEAR); - enumTexFilterType->AddItem("Anisotropic 2x", FILTER_ANISO2X); - enumTexFilterType->AddItem("Anisotropic 4x", FILTER_ANISO4X); - enumTexFilterType->AddItem("Anisotropic 8x", FILTER_ANISO8X); - enumTexFilterType->AddItem("Anisotropic 16x", FILTER_ANISO16X); - - ////////////////////////////////////////////////////////////////////////// - // Vertex Mods. - ////////////////////////////////////////////////////////////////////////// - enumVertexMod = new CVarEnumList(); - enumVertexMod->AddItem("None", eDT_Unknown); - enumVertexMod->AddItem("Sin Wave", eDT_SinWave); - enumVertexMod->AddItem("Sin Wave using vertex color", eDT_SinWaveUsingVtxColor); - enumVertexMod->AddItem("Bulge", eDT_Bulge); - enumVertexMod->AddItem("Squeeze", eDT_Squeeze); - enumVertexMod->AddItem("FixedOffset", eDT_FixedOffset); - - ////////////////////////////////////////////////////////////////////////// - - enumWaveType = new CVarEnumList(); - enumWaveType->AddItem("Sin", eWF_Sin); - - ////////////////////////////////////////////////////////////////////////// - // Fill shaders enum. - ////////////////////////////////////////////////////////////////////////// - CVarEnumList* enumShaders = new CVarEnumList(); - { - CShaderEnum* pShaderEnum = GetIEditor()->GetShaderEnum(); - pShaderEnum->EnumShaders(); - for (int i = 0; i < pShaderEnum->GetShaderCount(); i++) - { - QString shaderName = pShaderEnum->GetShader(i); - if (shaderName.contains("_Overlay", Qt::CaseInsensitive)) - { - continue; - } - enumShaders->AddItem(shaderName, shaderName); - } - } - - ////////////////////////////////////////////////////////////////////////// - // Fill surface types. - ////////////////////////////////////////////////////////////////////////// - CVarEnumList* enumSurfaceTypes = new CVarEnumList(); - { - QStringList types; - types.push_back(""); // Push empty surface type. - ISurfaceTypeEnumerator* pSurfaceTypeEnum = gEnv->p3DEngine->GetMaterialManager()->GetSurfaceTypeManager()->GetEnumerator(); - if (pSurfaceTypeEnum) - { - for (ISurfaceType* pSurfaceType = pSurfaceTypeEnum->GetFirst(); pSurfaceType; pSurfaceType = pSurfaceTypeEnum->GetNext()) - { - types.push_back(pSurfaceType->GetName()); - } - std::sort(types.begin(), types.end()); - for (int i = 0; i < types.size(); i++) - { - QString name = types[i]; - if (name.left(4) == "mat_") - { - name.remove(0, 4); - } - enumSurfaceTypes->AddItem(name, types[i]); - } - } - } - - ////////////////////////////////////////////////////////////////////////// - // Init tables. - ////////////////////////////////////////////////////////////////////////// - AddVariable(m_vars, tableShader, "Material Settings", ""); - AddVariable(m_vars, tableOpacity, "Opacity Settings", ""); - AddVariable(m_vars, tableLighting, "Lighting Settings", ""); - AddVariable(m_vars, tableAdvanced, "Advanced", ""); - AddVariable(m_vars, tableTexture, "Texture Maps", ""); - AddVariable(m_vars, tableShaderParams, "Shader Params", ""); - AddVariable(m_vars, tableShaderGenParams, "Shader Generation Params", ""); - AddVariable(m_vars, tableVertexMod, "Vertex Deformation", ""); - - tableTexture->SetFlags(tableTexture->GetFlags() | IVariable::UI_ROLLUP2); - tableVertexMod->SetFlags(tableVertexMod->GetFlags() | IVariable::UI_ROLLUP2 | IVariable::UI_COLLAPSED); - tableAdvanced->SetFlags(tableAdvanced->GetFlags() | IVariable::UI_COLLAPSED); - tableShaderGenParams->SetFlags(tableShaderGenParams->GetFlags() | IVariable::UI_ROLLUP2 | IVariable::UI_COLLAPSED); - tableShaderParams->SetFlags(tableShaderParams->GetFlags() | IVariable::UI_ROLLUP2); - - - ////////////////////////////////////////////////////////////////////////// - // Shader. - ////////////////////////////////////////////////////////////////////////// - AddVariable(tableShader, shader, "Shader", "Selects shader type for specific surface response and options"); - AddVariable(tableShader, surfaceType, "Surface Type", "Defines how entities interact with surfaces using the material effects system"); - m_varChangeNotifications["Surface Type"] = MATERIALCHANGE_SURFACETYPE; - - shader->SetEnumList(enumShaders); - - surfaceType->SetEnumList(enumSurfaceTypes); - - // Properties that use this scriptingDescription are based on what's available in MaterialHelpers::SetGetMaterialParamVec3 and MaterialHelpers::SetGetMaterialParamFloat. - // This should match what's done in MaterialHelpers.cpp AddRealNameToDescription(). - auto scriptingDescription = [](const AZStd::string& scriptAccessibleName, const AZStd::string& description) { return description + "\n(Script Param Name = " + scriptAccessibleName + ")"; }; - - ////////////////////////////////////////////////////////////////////////// - // Opacity. - ////////////////////////////////////////////////////////////////////////// - AddVariable(tableOpacity, opacity, "Opacity", - scriptingDescription("opacity", "Sets the transparency amount. Uses 0-99 to set Alpha Blend and 100 for Opaque and Alpha Test.").c_str(), IVariable::DT_PERCENT); - AddVariable(tableOpacity, alphaTest, "AlphaTest", - scriptingDescription("alpha", "Uses the alpha mask and refines the transparent edge. Uses 0-50 to bias toward white or 50-100 to bias toward black.").c_str(), IVariable::DT_PERCENT); - AddVariable(tableOpacity, bAdditive, "Additive", "Adds material color to the background color resulting in a brighter transparent surface"); - opacity->SetLimits(0, 100, 1, true, true); - alphaTest->SetLimits(0, 100, 1, true, true); - - ////////////////////////////////////////////////////////////////////////// - // Lighting. - ////////////////////////////////////////////////////////////////////////// - AddVariable(tableLighting, diffuse, "Diffuse Color (Tint)", scriptingDescription("diffuse", "Tints the material diffuse color. Physically based materials should be left at white").c_str(), IVariable::DT_COLOR); - AddVariable(tableLighting, specular, "Specular Color", scriptingDescription("specular", "Reflective and shininess intensity and color of reflective highlights").c_str(), IVariable::DT_COLOR); - AddVariable(tableLighting, smoothness, "Smoothness", scriptingDescription("shininess", "Smoothness or glossiness simulating how light bounces off the surface").c_str()); - AddVariable(tableLighting, emissiveIntensity, "Emissive Intensity (kcd/m2)", scriptingDescription("emissive_intensity", "Brightness simulating light emitting from the surface making an object glow").c_str()); - AddVariable(tableLighting, emissiveCol, "Emissive Color", scriptingDescription("emissive_color", "Tints the emissive color").c_str(), IVariable::DT_COLOR); - emissiveIntensity->SetLimits(0, EMISSIVE_INTENSITY_SOFT_MAX, 1, true, false); - smoothness->SetLimits(0, 255, 1, true, true); - - ////////////////////////////////////////////////////////////////////////// - // Init texture variables. - ////////////////////////////////////////////////////////////////////////// - for (EEfResTextures texId = EEfResTextures(0); texId < EFTT_MAX; texId = EEfResTextures(texId + 1)) - { - if (!MaterialHelpers::IsAdjustableTexSlot(texId)) - { - continue; - } - - InitTextureVars(texId, MaterialHelpers::LookupTexName(texId), MaterialHelpers::LookupTexDesc(texId)); - } - - //AddVariable( tableAdvanced,bWire,"Wireframe" ); - AddVariable(tableAdvanced, allowLayerActivation, "Allow layer activation", ""); - AddVariable(tableAdvanced, b2Sided, "2 Sided", "Enables both sides of mesh faces to render"); - AddVariable(tableAdvanced, bNoShadow, "No Shadow", "Disables casting shadows from mesh faces"); - AddVariable(tableAdvanced, bScatter, "Use Scattering", "Deprecated"); - AddVariable(tableAdvanced, bHideAfterBreaking, "Hide After Breaking", "Causes the object to disappear after procedurally breaking"); - AddVariable(tableAdvanced, bFogVolumeShadingQualityHigh, "Fog Volume Shading Quality High", "high fog volume shading quality behaves more accurately with fog volumes."); - AddVariable(tableAdvanced, bBlendTerrainColor, "Blend Terrain Color", ""); - AddVariable(tableAdvanced, voxelCoverage, "Voxel Coverage", "Fine tunes occlusion amount for svogi feature. Higher values occlude more closely to object shape."); - voxelCoverage->SetLimits(0, 1.0f); - - ////////////////////////////////////////////////////////////////////////// - // Material Value Propagation for dynamic material switches, as for instance - // used by breakable glass - ////////////////////////////////////////////////////////////////////////// - AddVariable(tableAdvanced, matPropagate, "Link to Material", ""); - AddVariable(tableAdvanced, bPropagateMaterialSettings, "Propagate Material Settings", ""); - AddVariable(tableAdvanced, bPropagateOpactity, "Propagate Opacity Settings", ""); - AddVariable(tableAdvanced, bPropagateLighting, "Propagate Lighting Settings", ""); - AddVariable(tableAdvanced, bPropagateAdvanced, "Propagate Advanced Settings", ""); - AddVariable(tableAdvanced, bPropagateTexture, "Propagate Texture Maps", ""); - AddVariable(tableAdvanced, bPropagateShaderParams, "Propagate Shader Params", ""); - AddVariable(tableAdvanced, bPropagateShaderGenParams, "Propagate Shader Generation", ""); - AddVariable(tableAdvanced, bPropagateVertexDef, "Propagate Vertex Deformation", ""); - - ////////////////////////////////////////////////////////////////////////// - // Init Vertex Deformation. - ////////////////////////////////////////////////////////////////////////// - vertexMod.type->SetEnumList(enumVertexMod); - AddVariable(tableVertexMod, vertexMod.type, "Type", "Choose method to define how the vertices will deform"); - AddVariable(tableVertexMod, vertexMod.fDividerX, "Wave Length", "Length of wave deformation"); - - AddVariable(tableVertexMod, vertexMod.wave.table, "Parameters", "Fine tunes how the vertices deform"); - - vertexMod.wave.waveFormType->SetEnumList(enumWaveType); - AddVariable(vertexMod.wave.table, vertexMod.wave.waveFormType, "Type", "Sin type will include vertex color in calculation"); - AddVariable(vertexMod.wave.table, vertexMod.wave.level, "Level", "Scales the object equally in xyz"); - AddVariable(vertexMod.wave.table, vertexMod.wave.amplitude, "Amplitude", "Strength of vertex deformation (vertex color: b, normal: z)"); - AddVariable(vertexMod.wave.table, vertexMod.wave.phase, "Phase", "Offset of vertex deformation (vertex color: r, normal: x)"); - AddVariable(vertexMod.wave.table, vertexMod.wave.frequency, "Frequency", "Speed of vertex animation (vertex color: g, normal: y)"); - - return m_vars; - } - -private: - ////////////////////////////////////////////////////////////////////////// - void InitTextureVars(int id, const QString& name, const QString& desc) - { - textureVars[id]->SetFlags(IVariable::UI_BOLD); - textureVars[id]->SetFlags(textureVars[id]->GetFlags() | IVariable::UI_AUTO_EXPAND); - advancedTextureGroup[id]->SetFlags(advancedTextureGroup[id]->GetFlags() | IVariable::UI_COLLAPSED); - AddVariable(tableTexture, *textureVars[id], name.toUtf8().data(), desc.toUtf8().data(), IVariable::DT_TEXTURE); - AddVariable(*textureVars[id], *advancedTextureGroup[id], "Advanced", "Controls UV tiling, offset, and rotation as well as texture filtering"); - - AddVariable(*advancedTextureGroup[id], textures[id].etextype, "TexType", ""); - AddVariable(*advancedTextureGroup[id], textures[id].filter, "Filter", "Sets texture smoothing method to determine texture pixel quality"); - - AddVariable(*advancedTextureGroup[id], textures[id].is_tcgprojected, "IsProjectedTexGen", ""); - AddVariable(*advancedTextureGroup[id], textures[id].etcgentype, "TexGenType", "Controls UV projection behavior"); - - if (IsTextureModifierSupportedForTextureMap(static_cast(id))) - { - ////////////////////////////////////////////////////////////////////////// - // Tiling table. - AddVariable(*advancedTextureGroup[id], textures[id].tableTiling, "Tiling", "Controls UV tiling, offset, and rotation"); - { - CVariableArray& table = textures[id].tableTiling; - table.SetFlags(IVariable::UI_BOLD); - AddVariable(table, *textures[id].is_tile[0], "IsTileU", "Enables UV tiling on U"); - AddVariable(table, *textures[id].is_tile[1], "IsTileV", "Enables UV tiling on V"); - AddVariable(table, *textures[id].tiling[0], "TileU", "Multiplies tiled projection on U"); - AddVariable(table, *textures[id].tiling[1], "TileV", "Multiplies tiled projection on V"); - AddVariable(table, *textures[id].offset[0], "OffsetU", "Offsets texture projection on U"); - AddVariable(table, *textures[id].offset[1], "OffsetV", "Offsets texture projection on V"); - AddVariable(table, *textures[id].rotate[0], "RotateU", "Rotates texture projection on U"); - AddVariable(table, *textures[id].rotate[1], "RotateV", "Rotates texture projection on V"); - AddVariable(table, *textures[id].rotate[2], "RotateW", "Rotates texture projection on W"); - } - - ////////////////////////////////////////////////////////////////////////// - // Rotator tables. - AddVariable(*advancedTextureGroup[id], textures[id].tableRotator, "Rotator", "Controls the animated UV rotation"); - { - CVariableArray& table = textures[id].tableRotator; - table.SetFlags(IVariable::UI_BOLD); - AddVariable(table, textures[id].etcmrotatetype, "Type", "Controls the behavior of UV rotation"); - AddVariable(table, textures[id].tcmrotoscrate, "Rate", "Sets the speed (number of complete cycles per unit of time) of rotation"); - AddVariable(table, textures[id].tcmrotoscphase, "Phase", "Sets the initial offset of rotation"); - AddVariable(table, textures[id].tcmrotoscamplitude, "Amplitude", "Sets the strength (maximum value) of rotation"); - AddVariable(table, *textures[id].tcmrotosccenter[0], "CenterU", "Sets the center of rotation along U"); - AddVariable(table, *textures[id].tcmrotosccenter[1], "CenterV", "Sets the center of rotation along V"); - } - - ////////////////////////////////////////////////////////////////////////// - // Oscillator table - AddVariable(*advancedTextureGroup[id], textures[id].tableOscillator, "Oscillator", "Controls the animated UV oscillation"); - { - CVariableArray& table = textures[id].tableOscillator; - table.SetFlags(IVariable::UI_BOLD); - AddVariable(table, textures[id].etcmumovetype, "TypeU", "Sets the behavior of oscillation in the U direction"); - AddVariable(table, textures[id].etcmvmovetype, "TypeV", "Sets the behavior of oscillation in the V direction"); - AddVariable(table, textures[id].tcmuoscrate, "RateU", "Sets the speed (number of complete cycles per unit of time) of oscillation in U"); - AddVariable(table, textures[id].tcmvoscrate, "RateV", "Sets the speed (number of complete cycles per unit of time) of oscillation in V"); - AddVariable(table, textures[id].tcmuoscphase, "PhaseU", "Sets the initial offset of oscillation in U"); - AddVariable(table, textures[id].tcmvoscphase, "PhaseV", "Sets the initial offset of oscillation in V"); - AddVariable(table, textures[id].tcmuoscamplitude, "AmplitudeU", "Sets the strength (maximum value) of oscillation in U"); - AddVariable(table, textures[id].tcmvoscamplitude, "AmplitudeV", "Sets the strength (maximum value) of oscillation in V"); - } - } - - ////////////////////////////////////////////////////////////////////////// - // Assign enums tables to variable. - ////////////////////////////////////////////////////////////////////////// - textures[id].etextype->SetEnumList(enumTexType); - textures[id].etcgentype->SetEnumList(enumTexGenType); - textures[id].etcmrotatetype->SetEnumList(enumTexModRotateType); - textures[id].etcmumovetype->SetEnumList(enumTexModUMoveType); - textures[id].etcmvmovetype->SetEnumList(enumTexModVMoveType); - textures[id].filter->SetEnumList(enumTexFilterType); - } - ////////////////////////////////////////////////////////////////////////// - - void AddVariable(CVariableBase& varArray, CVariableBase& var, const char* varName, const char* varTooltip, unsigned char dataType = IVariable::DT_SIMPLE) - { - if (varName) - { - var.SetName(varName); - } - if (varTooltip) - { - var.SetDescription(varTooltip); - } - var.SetDataType(dataType); - varArray.AddVariable(&var); - } - ////////////////////////////////////////////////////////////////////////// - void AddVariable(CVarBlock* vars, CVariableBase& var, const char* varName, const char* varTooltip, unsigned char dataType = IVariable::DT_SIMPLE) - { - if (varName) - { - var.SetName(varName); - } - if (varTooltip) - { - var.SetDescription(varTooltip); - } - var.SetDataType(dataType); - vars->AddVariable(&var); - } - - void SetTextureResources(const SEfResTexture *pTextureRes, uint16 tex, bool bSetTextures); - void GetTextureResources(SInputShaderResources& sr, int texid, int propagationFlags); - void ResetTextureResources(uint16 tex); - Vec4 ToVec4(const ColorF& col) { return Vec4(col.r, col.g, col.b, col.a); } - Vec3 ToVec3(const ColorF& col) { return Vec3(col.r, col.g, col.b); } - ColorF ToCFColor(const Vec3& col) { return ColorF(col); } - ColorF ToCFColor(const Vec4& col) { return ColorF(col); } -}; - -////////////////////////////////////////////////////////////////////////// -void CMaterialUI::NotifyObjectsAboutMaterialChange(IVariable* var) -{ - if (!var) - { - return; - } - - TVarChangeNotifications::iterator it = m_varChangeNotifications.find(var->GetName()); - if (it == m_varChangeNotifications.end()) - { - return; - } - - CMaterial* pMaterial = GetIEditor()->GetMaterialManager()->GetCurrentMaterial(); - if (!pMaterial) - { - return; - } - - // Get a parent, if we are editing submaterial - if (pMaterial->GetParent() != 0) - { - pMaterial = pMaterial->GetParent(); - } - - CBaseObjectsArray objects; - GetIEditor()->GetObjectManager()->GetObjects(objects); - int numObjects = objects.size(); - for (int i = 0; i < numObjects; ++i) - { - CBaseObject* pObject = objects[i]; - if (pObject->GetRenderMaterial() == pMaterial) - { - pObject->OnMaterialChanged(it->second); - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialUI::SetShaderResources(const SInputShaderResources& srTextures, bool bSetTextures) -{ - alphaTest = srTextures.m_AlphaRef; - voxelCoverage = (float) srTextures.m_VoxelCoverage / 255.0f; - - diffuse = ToVec3(srTextures.m_LMaterial.m_Diffuse); - specular = ToVec3(srTextures.m_LMaterial.m_Specular); - emissiveCol = ToVec3(srTextures.m_LMaterial.m_Emittance); - emissiveIntensity = srTextures.m_LMaterial.m_Emittance.a; - opacity = srTextures.m_LMaterial.m_Opacity; - smoothness = srTextures.m_LMaterial.m_Smoothness; - - SetVertexDeform(srTextures); - - - for (EEfResTextures texId = EEfResTextures(0); texId < EFTT_MAX; texId = EEfResTextures(texId + 1)) - { - if (!MaterialHelpers::IsAdjustableTexSlot(texId)) - { - continue; - } - - auto foundIter = srTextures.m_TexturesResourcesMap.find((ResourceSlotIndex)texId); - if (foundIter != srTextures.m_TexturesResourcesMap.end()) - { - const SEfResTexture* pTextureRes = const_cast(&foundIter->second); - SetTextureResources(pTextureRes, texId, bSetTextures); - } - else - { - ResetTextureResources(texId); - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialUI::GetShaderResources(SInputShaderResources& sr, int propagationFlags) -{ - if (propagationFlags & MTL_PROPAGATE_OPACITY) - { - sr.m_LMaterial.m_Opacity = opacity; - sr.m_AlphaRef = alphaTest; - } - - if (propagationFlags & MTL_PROPAGATE_ADVANCED) - { - sr.m_VoxelCoverage = int_round(voxelCoverage * 255.0f); - } - - if (propagationFlags & MTL_PROPAGATE_LIGHTING) - { - sr.m_LMaterial.m_Diffuse = ToCFColor(diffuse); - sr.m_LMaterial.m_Specular = ToCFColor(specular); - sr.m_LMaterial.m_Emittance = ColorF(emissiveCol, emissiveIntensity); - sr.m_LMaterial.m_Smoothness = smoothness; - } - - GetVertexDeform(sr, propagationFlags); - - for (EEfResTextures texId = EEfResTextures(0); texId < EFTT_MAX; texId = EEfResTextures(texId + 1)) - { - if (!MaterialHelpers::IsAdjustableTexSlot(texId)) - { - continue; - } - - GetTextureResources(sr, texId, propagationFlags); - } -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialUI::SetTextureResources( const SEfResTexture *pTextureRes, uint16 texSlot, bool bSetTextures) -{ - /* - // Enable/Disable texture map, depending on the mask. - int flags = textureVars[tex].GetFlags(); - if ((1 << tex) & texUsageMask) - flags &= ~IVariable::UI_DISABLED; - else - flags |= IVariable::UI_DISABLED; - textureVars[tex].SetFlags( flags ); - */ - - if (bSetTextures) - { - QString texFilename = pTextureRes->m_Name.c_str(); - texFilename = Path::ToUnixPath(texFilename); - textureVars[texSlot]->Set(texFilename); - } - - //textures[tex].amount = pTextureRes->m_Amount; - *textures[texSlot].is_tile[0] = pTextureRes->m_bUTile; - *textures[texSlot].is_tile[1] = pTextureRes->m_bVTile; - - *textures[texSlot].tiling[0] = pTextureRes->GetTiling(0); - *textures[texSlot].tiling[1] = pTextureRes->GetTiling(1); - *textures[texSlot].offset[0] = pTextureRes->GetOffset(0); - *textures[texSlot].offset[1] = pTextureRes->GetOffset(1); - textures[texSlot].filter = (int)pTextureRes->m_Filter; - textures[texSlot].etextype = pTextureRes->m_Sampler.m_eTexType; - - if (pTextureRes->m_Ext.m_pTexModifier) - { - textures[texSlot].etcgentype = pTextureRes->m_Ext.m_pTexModifier->m_eTGType; - textures[texSlot].etcmumovetype = pTextureRes->m_Ext.m_pTexModifier->m_eMoveType[0]; - textures[texSlot].etcmvmovetype = pTextureRes->m_Ext.m_pTexModifier->m_eMoveType[1]; - textures[texSlot].etcmrotatetype = pTextureRes->m_Ext.m_pTexModifier->m_eRotType; - textures[texSlot].is_tcgprojected = pTextureRes->m_Ext.m_pTexModifier->m_bTexGenProjected; - textures[texSlot].tcmuoscrate = pTextureRes->m_Ext.m_pTexModifier->m_OscRate[0]; - textures[texSlot].tcmuoscphase = pTextureRes->m_Ext.m_pTexModifier->m_OscPhase[0]; - textures[texSlot].tcmuoscamplitude = pTextureRes->m_Ext.m_pTexModifier->m_OscAmplitude[0]; - textures[texSlot].tcmvoscrate = pTextureRes->m_Ext.m_pTexModifier->m_OscRate[1]; - textures[texSlot].tcmvoscphase = pTextureRes->m_Ext.m_pTexModifier->m_OscPhase[1]; - textures[texSlot].tcmvoscamplitude = pTextureRes->m_Ext.m_pTexModifier->m_OscAmplitude[1]; - - for (int i = 0; i < 3; i++) - { - *textures[texSlot].rotate[i] = RoundDegree(Word2Degr(pTextureRes->m_Ext.m_pTexModifier->m_Rot[i])); - } - textures[texSlot].tcmrotoscrate = RoundDegree(Word2Degr(pTextureRes->m_Ext.m_pTexModifier->m_RotOscRate[2])); - textures[texSlot].tcmrotoscphase = RoundDegree(Word2Degr(pTextureRes->m_Ext.m_pTexModifier->m_RotOscPhase[2])); - textures[texSlot].tcmrotoscamplitude = RoundDegree(Word2Degr(pTextureRes->m_Ext.m_pTexModifier->m_RotOscAmplitude[2])); - *textures[texSlot].tcmrotosccenter[0] = pTextureRes->m_Ext.m_pTexModifier->m_RotOscCenter[0]; - *textures[texSlot].tcmrotosccenter[1] = pTextureRes->m_Ext.m_pTexModifier->m_RotOscCenter[1]; - } - else - { - textures[texSlot].etcgentype = 0; - textures[texSlot].etcmumovetype = 0; - textures[texSlot].etcmvmovetype = 0; - textures[texSlot].etcmrotatetype = 0; - textures[texSlot].is_tcgprojected = false; - textures[texSlot].tcmuoscrate = 0; - textures[texSlot].tcmuoscphase = 0; - textures[texSlot].tcmuoscamplitude = 0; - textures[texSlot].tcmvoscrate = 0; - textures[texSlot].tcmvoscphase = 0; - textures[texSlot].tcmvoscamplitude = 0; - - for (int i = 0; i < 3; i++) - { - *textures[texSlot].rotate[i] = 0; - } - - textures[texSlot].tcmrotoscrate = 0; - textures[texSlot].tcmrotoscphase = 0; - textures[texSlot].tcmrotoscamplitude = 0; - *textures[texSlot].tcmrotosccenter[0] = 0; - *textures[texSlot].tcmrotosccenter[1] = 0; - } -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialUI::ResetTextureResources(uint16 texSlot) -{ - QString texFilename = ""; - textureVars[texSlot]->Set(texFilename); - textures[texSlot].Reset(); -} - -void CMaterialUI::GetTextureResources(SInputShaderResources& sr, int tex, int propagationFlags) -{ - if ((propagationFlags & MTL_PROPAGATE_TEXTURES) == 0) - { - return; - } - - QString texFilename; - textureVars[tex]->Get(texFilename); - if (texFilename.isEmpty()) - { - // Remove the texture if the path was cleared in the UI - sr.m_TexturesResourcesMap.erase(tex); - - // If the normal map/second normal map has been cleared in the UI, - // we must also clear the smoothness/second smoothness since smoothness lives in the alpha of the normal - if (tex == EFTT_NORMALS) - { - sr.m_TexturesResourcesMap.erase(EFTT_SMOOTHNESS); - } - // EFTT_CUSTOM_SECONDARY is the 2nd normal - if (tex == EFTT_CUSTOM_SECONDARY) - { - sr.m_TexturesResourcesMap.erase(EFTT_SECOND_SMOOTHNESS); - } - return; - } - texFilename = Path::ToUnixPath(texFilename); - - // Clear any texture resource that has no associated file - if (texFilename.size() > AZ_MAX_PATH_LEN) - { - AZ_Error("Material Editor", false, "Texture path exceeds the maximium allowable length of %d.", AZ_MAX_PATH_LEN); - return; - } - - // The following line will insert the slot if did not exist. - SEfResTexture* pTextureRes = &(sr.m_TexturesResourcesMap[tex]); - pTextureRes->m_Name = texFilename.toUtf8().data(); - - //pTextureRes->m_Amount = textures[tex].amount; - pTextureRes->m_bUTile = *textures[tex].is_tile[0]; - pTextureRes->m_bVTile = *textures[tex].is_tile[1]; - SEfTexModificator& texm = *pTextureRes->AddModificator(); - texm.m_bTexGenProjected = textures[tex].is_tcgprojected; - - texm.m_Tiling[0] = *textures[tex].tiling[0]; - texm.m_Tiling[1] = *textures[tex].tiling[1]; - texm.m_Offs[0] = *textures[tex].offset[0]; - texm.m_Offs[1] = *textures[tex].offset[1]; - pTextureRes->m_Filter = (int)textures[tex].filter; - pTextureRes->m_Sampler.m_eTexType = textures[tex].etextype; - texm.m_eRotType = textures[tex].etcmrotatetype; - texm.m_eTGType = textures[tex].etcgentype; - texm.m_eMoveType[0] = textures[tex].etcmumovetype; - texm.m_eMoveType[1] = textures[tex].etcmvmovetype; - texm.m_OscRate[0] = textures[tex].tcmuoscrate; - texm.m_OscPhase[0] = textures[tex].tcmuoscphase; - texm.m_OscAmplitude[0] = textures[tex].tcmuoscamplitude; - texm.m_OscRate[1] = textures[tex].tcmvoscrate; - texm.m_OscPhase[1] = textures[tex].tcmvoscphase; - texm.m_OscAmplitude[1] = textures[tex].tcmvoscamplitude; - - for (int i = 0; i < 3; i++) - { - texm.m_Rot[i] = Degr2Word(*textures[tex].rotate[i]); - } - texm.m_RotOscRate[2] = Degr2Word(textures[tex].tcmrotoscrate); - texm.m_RotOscPhase[2] = Degr2Word(textures[tex].tcmrotoscphase); - texm.m_RotOscAmplitude[2] = Degr2Word(textures[tex].tcmrotoscamplitude); - texm.m_RotOscCenter[0] = *textures[tex].tcmrotosccenter[0]; - texm.m_RotOscCenter[1] = *textures[tex].tcmrotosccenter[1]; - texm.m_RotOscCenter[2] = 0.0f; -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialUI::SetVertexDeform(const SInputShaderResources& sr) -{ - vertexMod.type = (int)sr.m_DeformInfo.m_eType; - vertexMod.fDividerX = sr.m_DeformInfo.m_fDividerX; - vertexMod.vNoiseScale = sr.m_DeformInfo.m_vNoiseScale; - - vertexMod.wave.waveFormType = EWaveForm::eWF_Sin; - vertexMod.wave.amplitude = sr.m_DeformInfo.m_WaveX.m_Amp; - vertexMod.wave.level = sr.m_DeformInfo.m_WaveX.m_Level; - vertexMod.wave.phase = sr.m_DeformInfo.m_WaveX.m_Phase; - vertexMod.wave.frequency = sr.m_DeformInfo.m_WaveX.m_Freq; -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialUI::GetVertexDeform(SInputShaderResources& sr, int propagationFlags) -{ - if ((propagationFlags & MTL_PROPAGATE_VERTEX_DEF) == 0) - { - return; - } - - sr.m_DeformInfo.m_eType = (EDeformType)((int)vertexMod.type); - sr.m_DeformInfo.m_fDividerX = vertexMod.fDividerX; - sr.m_DeformInfo.m_vNoiseScale = vertexMod.vNoiseScale; - - sr.m_DeformInfo.m_WaveX.m_eWFType = (EWaveForm)((int)vertexMod.wave.waveFormType); - sr.m_DeformInfo.m_WaveX.m_Amp = vertexMod.wave.amplitude; - sr.m_DeformInfo.m_WaveX.m_Level = vertexMod.wave.level; - sr.m_DeformInfo.m_WaveX.m_Phase = vertexMod.wave.phase; - sr.m_DeformInfo.m_WaveX.m_Freq = vertexMod.wave.frequency; -} - -void CMaterialUI::PropagateToLinkedMaterial(CMaterial* mtl, CVarBlockPtr pShaderParams) -{ - if (!mtl) - { - return; - } - CMaterial* subMtl = NULL, * parentMtl = mtl->GetParent(); - const QString& linkedMaterialName = matPropagate; - int propFlags = 0; - - if (parentMtl) - { - for (int i = 0; i < parentMtl->GetSubMaterialCount(); ++i) - { - CMaterial* pMtl = parentMtl->GetSubMaterial(i); - if (pMtl && pMtl != mtl && pMtl->GetFullName() == linkedMaterialName) - { - subMtl = pMtl; - break; - } - } - } - if (!linkedMaterialName.isEmpty() && subMtl) - { - // Ensure that the linked material is cleared if it can't be found anymore - mtl->LinkToMaterial(linkedMaterialName); - } - // Note: It's only allowed to propagate the shader params and shadergen params - // if we also propagate the actual shader to the linked material as well, else - // bogus values will be set - bPropagateShaderParams = (int)bPropagateShaderParams & - (int)bPropagateMaterialSettings; - bPropagateShaderGenParams = (int)bPropagateShaderGenParams & - (int)bPropagateMaterialSettings; - - propFlags |= MTL_PROPAGATE_MATERIAL_SETTINGS & - (int)bPropagateMaterialSettings; - propFlags |= MTL_PROPAGATE_OPACITY & - (int)bPropagateOpactity; - propFlags |= MTL_PROPAGATE_LIGHTING & - (int)bPropagateLighting; - propFlags |= MTL_PROPAGATE_ADVANCED & - (int)bPropagateAdvanced; - propFlags |= MTL_PROPAGATE_TEXTURES & - (int)bPropagateTexture; - propFlags |= MTL_PROPAGATE_SHADER_PARAMS & - (int)bPropagateShaderParams; - propFlags |= MTL_PROPAGATE_SHADER_GEN & - (int)bPropagateShaderGenParams; - propFlags |= MTL_PROPAGATE_VERTEX_DEF & - (int)bPropagateVertexDef; - propFlags |= MTL_PROPAGATE_LAYER_PRESETS & - (int)bPropagateLayerPresets; - mtl->SetPropagationFlags(propFlags); - - if (subMtl) - { - SetToMaterial(subMtl, propFlags | MTL_PROPAGATE_RESERVED); - if (propFlags & MTL_PROPAGATE_SHADER_PARAMS) - { - if (CVarBlock* pPublicVars = subMtl->GetPublicVars(mtl->GetShaderResources())) - { - subMtl->SetPublicVars(pPublicVars, subMtl); - } - } - if (propFlags & MTL_PROPAGATE_SHADER_GEN) - { - subMtl->SetShaderGenParamsVars(mtl->GetShaderGenParamsVars()); - } - subMtl->Update(); - subMtl->UpdateMaterialLayers(); - } -} - -void CMaterialUI::PropagateFromLinkedMaterial(CMaterial* mtl) -{ - if (!mtl) - { - return; - } - CMaterial* subMtl = NULL, * parentMtl = mtl->GetParent(); - const QString& linkedMaterialName = mtl->GetLinkedMaterialName(); - //CVarEnumList *enumMtls = new CVarEnumList; - if (parentMtl) - { - for (int i = 0; i < parentMtl->GetSubMaterialCount(); ++i) - { - CMaterial* pMtl = parentMtl->GetSubMaterial(i); - if (!pMtl || pMtl == mtl) - { - continue; - } - const QString& subMtlName = pMtl->GetFullName(); - //enumMtls->AddItem(subMtlName, subMtlName); - if (subMtlName == linkedMaterialName) - { - subMtl = pMtl; - break; - } - } - } - matPropagate = QString(); - //matPropagate.SetEnumList(enumMtls); - if (!linkedMaterialName.isEmpty() && !subMtl) - { - // Ensure that the linked material is cleared if it can't be found anymore - mtl->LinkToMaterial(QString()); - } - else - { - matPropagate = linkedMaterialName; - } - bPropagateMaterialSettings = mtl->GetPropagationFlags() & MTL_PROPAGATE_MATERIAL_SETTINGS; - bPropagateOpactity = mtl->GetPropagationFlags() & MTL_PROPAGATE_OPACITY; - bPropagateLighting = mtl->GetPropagationFlags() & MTL_PROPAGATE_LIGHTING; - bPropagateTexture = mtl->GetPropagationFlags() & MTL_PROPAGATE_TEXTURES; - bPropagateAdvanced = mtl->GetPropagationFlags() & MTL_PROPAGATE_ADVANCED; - bPropagateVertexDef = mtl->GetPropagationFlags() & MTL_PROPAGATE_VERTEX_DEF; - bPropagateShaderParams = mtl->GetPropagationFlags() & MTL_PROPAGATE_SHADER_PARAMS; - bPropagateLayerPresets = mtl->GetPropagationFlags() & MTL_PROPAGATE_LAYER_PRESETS; - bPropagateShaderGenParams = mtl->GetPropagationFlags() & MTL_PROPAGATE_SHADER_GEN; -} - -void CMaterialUI::SetFromMaterial(CMaterial* mtlIn) -{ - QString shaderName = mtlIn->GetShaderName(); - if (!shaderName.isEmpty()) - { - // Capitalize first letter. - shaderName = shaderName[0].toUpper() + shaderName.mid(1); - } - - shader = shaderName; - - int mtlFlags = mtlIn->GetFlags(); - bNoShadow = (mtlFlags & MTL_FLAG_NOSHADOW); - bAdditive = (mtlFlags & MTL_FLAG_ADDITIVE); - bWire = (mtlFlags & MTL_FLAG_WIRE); - b2Sided = (mtlFlags & MTL_FLAG_2SIDED); - bScatter = (mtlFlags & MTL_FLAG_SCATTER); - bHideAfterBreaking = (mtlFlags & MTL_FLAG_HIDEONBREAK); - bFogVolumeShadingQualityHigh = (mtlFlags & MTL_FLAG_FOG_VOLUME_SHADING_QUALITY_HIGH); - bBlendTerrainColor = (mtlFlags & MTL_FLAG_BLEND_TERRAIN); - texUsageMask = mtlIn->GetTexmapUsageMask(); - - allowLayerActivation = mtlIn->LayerActivationAllowed(); - - // Detail, decal and custom textures are always active. - const uint32 nDefaultFlagsEFTT = (1 << EFTT_DETAIL_OVERLAY) | (1 << EFTT_DECAL_OVERLAY) | (1 << EFTT_CUSTOM) | (1 << EFTT_CUSTOM_SECONDARY); - texUsageMask |= nDefaultFlagsEFTT; - if ((texUsageMask & (1 << EFTT_NORMALS))) - { - texUsageMask |= 1 << EFTT_NORMALS; - } - - surfaceType = mtlIn->GetSurfaceTypeName(); - SetShaderResources(mtlIn->GetShaderResources(), true); - - // Propagate settings and properties to a sub material if edited - PropagateFromLinkedMaterial(mtlIn); - - // set each material layer - SMaterialLayerResources* pMtlLayerResources = mtlIn->GetMtlLayerResources(); - for (int l(0); l < MTL_LAYER_MAX_SLOTS; ++l) - { - materialLayers[l].shader = pMtlLayerResources[l].m_shaderName; - materialLayers[l].bNoDraw = pMtlLayerResources[l].m_nFlags & MTL_LAYER_USAGE_NODRAW; - materialLayers[l].bFadeOut = pMtlLayerResources[l].m_nFlags & MTL_LAYER_USAGE_FADEOUT; - } -} - -void CMaterialUI::SetToMaterial(CMaterial* mtl, int propagationFlags) -{ - int mtlFlags = mtl->GetFlags(); - - if (propagationFlags & MTL_PROPAGATE_ADVANCED) - { - if (bNoShadow) - { - mtlFlags |= MTL_FLAG_NOSHADOW; - } - else - { - mtlFlags &= ~MTL_FLAG_NOSHADOW; - } - } - - if (propagationFlags & MTL_PROPAGATE_OPACITY) - { - if (bAdditive) - { - mtlFlags |= MTL_FLAG_ADDITIVE; - } - else - { - mtlFlags &= ~MTL_FLAG_ADDITIVE; - } - } - - if (bWire) - { - mtlFlags |= MTL_FLAG_WIRE; - } - else - { - mtlFlags &= ~MTL_FLAG_WIRE; - } - - if (propagationFlags & MTL_PROPAGATE_ADVANCED) - { - if (b2Sided) - { - mtlFlags |= MTL_FLAG_2SIDED; - } - else - { - mtlFlags &= ~MTL_FLAG_2SIDED; - } - - if (bScatter) - { - mtlFlags |= MTL_FLAG_SCATTER; - } - else - { - mtlFlags &= ~MTL_FLAG_SCATTER; - } - - if (bHideAfterBreaking) - { - mtlFlags |= MTL_FLAG_HIDEONBREAK; - } - else - { - mtlFlags &= ~MTL_FLAG_HIDEONBREAK; - } - - if (bFogVolumeShadingQualityHigh) - { - mtlFlags |= MTL_FLAG_FOG_VOLUME_SHADING_QUALITY_HIGH; - } - else - { - mtlFlags &= ~MTL_FLAG_FOG_VOLUME_SHADING_QUALITY_HIGH; - } - - if (bBlendTerrainColor) - { - mtlFlags |= MTL_FLAG_BLEND_TERRAIN; - } - else - { - mtlFlags &= ~MTL_FLAG_BLEND_TERRAIN; - } - } - - mtl->SetFlags(mtlFlags); - - mtl->SetLayerActivation(allowLayerActivation); - - // set each material layer - if (propagationFlags & MTL_PROPAGATE_LAYER_PRESETS) - { - SMaterialLayerResources* pMtlLayerResources = mtl->GetMtlLayerResources(); - for (int l(0); l < MTL_LAYER_MAX_SLOTS; ++l) - { - if (pMtlLayerResources[l].m_shaderName != materialLayers[l].shader) - { - pMtlLayerResources[l].m_shaderName = materialLayers[l].shader; - pMtlLayerResources[l].m_bRegetPublicParams = true; - } - - if (materialLayers[l].bNoDraw) - { - pMtlLayerResources[l].m_nFlags |= MTL_LAYER_USAGE_NODRAW; - } - else - { - pMtlLayerResources[l].m_nFlags &= ~MTL_LAYER_USAGE_NODRAW; - } - - if (materialLayers[l].bFadeOut) - { - pMtlLayerResources[l].m_nFlags |= MTL_LAYER_USAGE_FADEOUT; - } - else - { - pMtlLayerResources[l].m_nFlags &= ~MTL_LAYER_USAGE_FADEOUT; - } - } - } - - if (propagationFlags & MTL_PROPAGATE_MATERIAL_SETTINGS) - { - mtl->SetSurfaceTypeName(surfaceType); - // If shader name is different reload shader. - mtl->SetShaderName(shader); - } - - GetShaderResources(mtl->GetShaderResources(), propagationFlags); -} - -void CMaterialUI::SetTextureNames(CMaterial* mtl) -{ - SInputShaderResources& sr = mtl->GetShaderResources(); - - for ( auto& iter : sr.m_TexturesResourcesMap ) - { - uint16 texId = iter.first; - if (!MaterialHelpers::IsAdjustableTexSlot((EEfResTextures)texId)) - { - continue; - } - - SEfResTexture* pTextureRes = &(iter.second); - textureVars[texId]->Set(pTextureRes->m_Name.c_str()); - } -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -class CMtlPickCallback - : public IPickObjectCallback -{ -public: - CMtlPickCallback() { m_bActive = true; }; - //! Called when object picked. - virtual void OnPick(CBaseObject* picked) - { - m_bActive = false; - CMaterial* pMtl = picked->GetMaterial(); - if (pMtl) - { - GetIEditor()->OpenMaterialLibrary(pMtl); - } - delete this; - } - //! Called when pick mode canceled. - virtual void OnCancelPick() - { - m_bActive = false; - delete this; - } - //! Return true if specified object is pickable. - virtual bool OnPickFilter(CBaseObject* filterObject) - { - // Check if object have material. - if (filterObject->GetMaterial()) - { - return true; - } - else - { - return false; - } - } - static bool IsActive() { return m_bActive; }; -private: - static bool m_bActive; -}; -bool CMtlPickCallback::m_bActive = false; -////////////////////////////////////////////////////////////////////////// - - -////////////////////////////////////////////////////////////////////////// -// CMaterialDialog implementation. -////////////////////////////////////////////////////////////////////////// -CMaterialDialog::CMaterialDialog(QWidget* parent /* = 0 */) - : QMainWindow(parent) - , m_wndMtlBrowser(0) -{ - m_propsCtrl = new TwoColumnPropertyControl; - m_propsCtrl->Setup(true, 150); - m_propsCtrl->SetSavedStateKey("MaterialDialog"); - m_propsCtrl->setMinimumWidth(460); - - m_placeHolderLabel = new QLabel(tr("Select a material in the Material Editor hierarchy to view properties")); - m_placeHolderLabel->setMinimumHeight(250); - m_placeHolderLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - - SEventLog toolEvent(MATERIAL_EDITOR_NAME, "", MATERIAL_EDITOR_VER); - GetIEditor()->GetSettingsManager()->RegisterEvent(toolEvent); - - m_pMatManager = GetIEditor()->GetMaterialManager(); - - m_shaderGenParamsVars = 0; - - m_textureSlots = 0; - - m_pMaterialUI = new CMaterialUI; - - m_bForceReloadPropsCtrl = true; - - m_pMaterialImageListModel.reset(new QMaterialImageListModel); - - m_pMaterialImageListCtrl.reset(new CMaterialImageListCtrl); - m_pMaterialImageListCtrl->setModel(m_pMaterialImageListModel.data()); - - // Immediately create dialog. - OnInitDialog(); - - GetIEditor()->RegisterNotifyListener(this); - m_pMatManager->AddListener(this); - m_propsCtrl->SetUndoCallback(AZStd::bind(&CMaterialDialog::OnUndo, this, AZStd::placeholders::_1)); - m_propsCtrl->SetStoreUndoByItems(false); - - // KDAB_TODO: hack until we have proper signal coming from the IEDitor - connect(QCoreApplication::eventDispatcher(), &QAbstractEventDispatcher::awake, this, &CMaterialDialog::UpdateActions); -} - -////////////////////////////////////////////////////////////////////////// -CMaterialDialog::~CMaterialDialog() -{ - m_pMatManager->RemoveListener(this); - GetIEditor()->UnregisterNotifyListener(this); - m_wndMtlBrowser->SetImageListCtrl(NULL); - - delete m_pMaterialUI; - m_vars = 0; - m_publicVars = 0; - m_shaderGenParamsVars = 0; - m_textureSlots = 0; - - m_propsCtrl->ClearUndoCallback(); - m_propsCtrl->RemoveAllItems(); - - SEventLog toolEvent(MATERIAL_EDITOR_NAME, "", MATERIAL_EDITOR_VER); - GetIEditor()->GetSettingsManager()->UnregisterEvent(toolEvent); -} - -BOOL CMaterialDialog::OnInitDialog() -{ - setWindowTitle(tr(LyViewPane::MaterialEditor)); - if (gEnv->p3DEngine) - { - ISurfaceTypeManager* pSurfaceTypeManager = gEnv->p3DEngine->GetMaterialManager()->GetSurfaceTypeManager(); - if (pSurfaceTypeManager) - { - pSurfaceTypeManager->LoadSurfaceTypes(); - } - } - - InitToolbar(IDR_DB_MATERIAL_BAR); - - setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); - - // hide menu bar - menuBar()->hide(); - - // Create status bar. - { - m_statusBar = this->statusBar(); - m_statusBar->setSizeGripEnabled(false); - } - - QSplitter* centralWidget = new QSplitter(Qt::Horizontal, this); - setCentralWidget(centralWidget); - - QSplitter* rightWidget = new QSplitter(Qt::Vertical, centralWidget); - centralWidget->addWidget(rightWidget); - - rightWidget->addWidget(m_propsCtrl); - - m_vars = m_pMaterialUI->CreateVars(); - m_propsCtrl->AddVarBlock(m_vars); - - m_propsCtrl->setEnabled(false); - m_propsCtrl->hide(); - - ////////////////////////////////////////////////////////////////////////// - // Preview Pane - ////////////////////////////////////////////////////////////////////////// - { - rightWidget->insertWidget(0, m_pMaterialImageListCtrl.data()); - - int h = m_pMaterialImageListCtrl->sizeHint().height(); - m_pMaterialImageListCtrl->hide(); - rightWidget->setSizes({h, height() - h }); - } - - rightWidget->addWidget(m_placeHolderLabel); - m_placeHolderLabel->setAlignment(Qt::AlignCenter); - - ////////////////////////////////////////////////////////////////////////// - // Browser Pane - ////////////////////////////////////////////////////////////////////////// - if (!m_wndMtlBrowser) - { - m_wndMtlBrowser = new MaterialBrowserWidget(this); - m_wndMtlBrowser->SetListener(this); - m_wndMtlBrowser->SetImageListCtrl(m_pMaterialImageListCtrl.data()); - //m_wndMtlBrowser->resize(width() / 3, height()); - - centralWidget->insertWidget(0, m_wndMtlBrowser); - - int w = m_wndMtlBrowser->sizeHint().height(); - centralWidget->setSizes({ w, width() - w }); - centralWidget->setStretchFactor(0, 0); - centralWidget->setStretchFactor(1, 1); - - // Start the background processing of material files after the widget has been initialized - m_wndMtlBrowser->StartRecordUpdateJobs(); - } - - // Set the image list control to give stretch priority to the other widgets. This is both to avoid resizing the - // image list control when the window is resized and to avoid an issue with the QSplitter resizing the image list - // control when enabling/disabling the other two widgets. - const int materialImageControlIndex = 0; - const int materialImagePropertiesControlIndex = 1; - const int materialPlaceholderLabelIndex = 2; - rightWidget->setStretchFactor(materialImageControlIndex, 0); - rightWidget->setStretchFactor(materialImagePropertiesControlIndex, 1); - rightWidget->setStretchFactor(materialPlaceholderLabelIndex, 1); - - resize(1200, 800); - - return true; // return true unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void CMaterialDialog::closeEvent(QCloseEvent *ev) -{ - // We call save before running any dtors, as it might trigger a modal dialog / nested event loop - // asking to overwrite files, and that causes a crash - m_wndMtlBrowser->SaveCurrentMaterial(); - ev->accept(); // All good, dialog will close now -} - -////////////////////////////////////////////////////////////////////////// -// Create the toolbar -void CMaterialDialog::InitToolbar([[maybe_unused]] UINT nToolbarResID) -{ - // detect if the new viewport interaction model is enabled and give - // feedback to the user that certain operations are not yet compatible - const bool newViewportInteractionModelEnabled = GetIEditor()->IsNewViewportInteractionModelEnabled(); - const char* const newViewportInteractionModelWarning = - "This option is currently not available with the new Viewport Interaction Model enabled"; - - m_toolbar = addToolBar(tr("Material ToolBar")); - m_toolbar->setFloatable(false); - - QIcon assignselectionIcon; - assignselectionIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_assignselection_normal.png" }, QIcon::Normal); - assignselectionIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_assignselection_active.png" }, QIcon::Active); - assignselectionIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_assignselection_disabled.png" }, QIcon::Disabled); - - m_assignToSelectionAction = - m_toolbar->addAction(assignselectionIcon, - newViewportInteractionModelEnabled - ? tr(newViewportInteractionModelWarning) - : tr("Assign Item to Selected Objects"), - this, SLOT(OnAssignMaterialToSelection())); - - QIcon resetIcon; - resetIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_reset_normal.png" }, QIcon::Normal); - resetIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_reset_active.png" }, QIcon::Active); - resetIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_reset_disabled.png" }, QIcon::Disabled); - - m_resetAction = - m_toolbar->addAction(resetIcon, - newViewportInteractionModelEnabled - ? tr(newViewportInteractionModelWarning) - : tr("Reset Material on Selection to Default"), - this, SLOT(OnResetMaterialOnSelection())); - - QIcon getfromselectionIcon; - getfromselectionIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_getfromselection_normal.png" }, QIcon::Normal); - getfromselectionIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_getfromselection_active.png" }, QIcon::Active); - getfromselectionIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_getfromselection_disabled.png" }, QIcon::Disabled); - - m_getFromSelectionAction = - m_toolbar->addAction( - getfromselectionIcon, - newViewportInteractionModelEnabled - ? tr(newViewportInteractionModelWarning) - : tr("Get Properties From Selection"), - this, SLOT(OnGetMaterialFromSelection())); - - QIcon pickIcon; - pickIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_pick_normal.png" }, QIcon::Normal); - pickIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_pick_active.png" }, QIcon::Active); - pickIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_pick_disabled.png" }, QIcon::Disabled); - - m_pickAction = m_toolbar->addAction( - pickIcon, - newViewportInteractionModelEnabled - ? tr(newViewportInteractionModelWarning) - : tr("Pick Material from Object"), - this, SLOT(OnPickMtl())); - - m_pickAction->setCheckable(true); - - if (newViewportInteractionModelEnabled) - { - m_pickAction->setEnabled(false); - } - - QAction* sepAction = m_toolbar->addSeparator(); - m_filterTypeSelection = new QComboBox(this); - m_filterTypeSelection->addItem(tr("All Materials")); - m_filterTypeSelection->addItem(tr("Used In Level")); - m_filterTypeSelection->setMinimumWidth(150); - QAction* cbAction = m_toolbar->addWidget(m_filterTypeSelection); - m_filterTypeSelection->setCurrentIndex(0); - connect(m_filterTypeSelection, SIGNAL(currentIndexChanged(int)), this, SLOT(OnChangedBrowserListType(int))); - m_toolbar->addSeparator(); - QIcon addIcon; - addIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_add_normal.png" }, QIcon::Normal); - addIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_add_active.png" }, QIcon::Active); - addIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_add_disabled.png" }, QIcon::Disabled); - m_addAction = m_toolbar->addAction(addIcon, tr("Add New Item"), this, SLOT(OnAddItem())); - QIcon saveIcon; - saveIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_save_normal.png" }, QIcon::Normal); - saveIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_save_active.png" }, QIcon::Active); - saveIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_save_disabled.png" }, QIcon::Disabled); - m_saveAction = m_toolbar->addAction(saveIcon, tr("Save Item"), this, SLOT(OnSaveItem())); - QIcon removeIcon; - removeIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_remove_normal.png" }, QIcon::Normal); - removeIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_remove_active.png" }, QIcon::Active); - removeIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_remove_disabled.png" }, QIcon::Disabled); - m_removeAction = m_toolbar->addAction(removeIcon, tr("Remove Item"), this, SLOT(OnDeleteItem())); - m_toolbar->addSeparator(); - QIcon copyIcon; - copyIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_copy_normal.png" }, QIcon::Normal); - copyIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_copy_active.png" }, QIcon::Active); - copyIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_copy_disabled.png" }, QIcon::Disabled); - m_copyAction = m_toolbar->addAction(copyIcon, tr("Copy Material"), this, SLOT(OnCopy())); - QIcon pasteIcon; - pasteIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_paste_normal.png" }, QIcon::Normal); - pasteIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_paste_active.png" }, QIcon::Active); - pasteIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_paste_disabled.png" }, QIcon::Disabled); - m_pasteAction = m_toolbar->addAction(pasteIcon, tr("Paste Material"), this, SLOT(OnPaste())); - m_toolbar->addSeparator(); - QIcon previewIcon; - previewIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_preview_normal.png" }, QIcon::Normal); - previewIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_preview_active.png" }, QIcon::Active); - previewIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_preview_disabled.png" }, QIcon::Disabled); - m_previewAction = m_toolbar->addAction(previewIcon, tr("Open Large Material Preview Window"), this, SLOT(OnMaterialPreview())); - m_toolbar->addSeparator(); - QIcon resetViewportIcon; - resetViewportIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_reset_viewport_normal.png" }, QIcon::Normal); - resetViewportIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_reset_viewport_active.png" }, QIcon::Active); - resetViewportIcon.addPixmap(QPixmap{ ":/MaterialDialog/ToolBar/images/materialdialog_reset_viewport_disabled.png" }, QIcon::Disabled); - m_resetViewporAction = m_toolbar->addAction(resetViewportIcon, tr("Reset Material Viewport"), this, SLOT(OnResetMaterialViewport())); - - UpdateActions(); - setContextMenuPolicy(Qt::ContextMenuPolicy::NoContextMenu); - - connect(m_toolbar, &QToolBar::orientationChanged, m_toolbar, [=](Qt::Orientation orientation) - { - if (orientation == Qt::Vertical) - { - m_toolbar->removeAction(cbAction); - } - else - { - m_toolbar->insertAction(sepAction, cbAction); - } - }); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::ReloadItems() -{ - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnAddItem() -{ - m_wndMtlBrowser->OnAddNewMaterial(); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnSaveItem() -{ - CMaterial* pMtl = GetSelectedMaterial(); - if (pMtl) - { - CMaterial* parent = pMtl->GetParent(); - - if (!pMtl->Save(false)) - { - if (!parent) - { - QMessageBox::warning(this, QString(), tr("The material file cannot be saved. The file is located in a PAK archive or access is denied")); - } - } - - if (parent) - { - //The reload function will clear all the sub-material references, and re-create them. - //Thus pMtl will point to old sub-material that should be deleted instead. - //So we need to set m_pMatManager's current material to the new one. - int index = -1; - - //Find the corresponding sub-material and record its index - for (int i = 0; i < parent->GetSubMaterialCount(); i++) - { - if (parent->GetSubMaterial(i) == pMtl) - { - index = i; - break; - } - } - pMtl->Reload(); - - if (index >= 0 && index < parent->GetSubMaterialCount()) - { - m_pMatManager->SetCurrentMaterial(parent->GetSubMaterial(index)); - } - else //If we can't find the sub-material, use parent instead - { - m_pMatManager->SetCurrentMaterial(parent); - } - } - else - { - pMtl->Reload(); - } - - } - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnDeleteItem() -{ - m_wndMtlBrowser->DeleteItem(); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::SetMaterialVars([[maybe_unused]] CMaterial* mtl) -{ -} - - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::UpdateShaderParamsUI(CMaterial* pMtl) -{ - ////////////////////////////////////////////////////////////////////////// - // Shader Gen Mask. - ////////////////////////////////////////////////////////////////////////// - IVariable* shaderGenParamsContainerVar = m_pMaterialUI->tableShaderGenParams.GetVar(); - if (m_propsCtrl->FindVariable(shaderGenParamsContainerVar)) - { - m_shaderGenParamsVars = pMtl->GetShaderGenParamsVars(); - m_propsCtrl->ReplaceVarBlock(shaderGenParamsContainerVar, m_shaderGenParamsVars); - } - - ////////////////////////////////////////////////////////////////////////// - // Shader Public Params. - ////////////////////////////////////////////////////////////////////////// - IVariable* publicVars = m_pMaterialUI->tableShaderParams.GetVar(); - if (m_propsCtrl->FindVariable(publicVars)) - { - bool bNeedUpdateMaterialFromUI = false; - CVarBlockPtr pPublicVars = pMtl->GetPublicVars(pMtl->GetShaderResources()); - if (m_publicVars && pPublicVars) - { - // list of shader parameters depends on list of shader generation parameters - // we need to keep values of vars which not presented in every combinations, - // but probably adjusted by user, to keep his work. - // m_excludedPublicVars is used for these values - if (m_excludedPublicVars.pMaterial) - { - if (m_excludedPublicVars.pMaterial != pMtl) - { - m_excludedPublicVars.vars.DeleteAllVariables(); - } - else - { - // find new presented vars in pPublicVars, which not existed in old m_publicVars - for (int j = pPublicVars->GetNumVariables() - 1; j >= 0; --j) - { - IVariable* pVar = pPublicVars->GetVariable(j); - bool isVarExist = false; - for (int i = m_publicVars->GetNumVariables() - 1; i >= 0; --i) - { - IVariable* pOldVar = m_publicVars->GetVariable(i); - if (!QString::compare(pOldVar->GetName(), pVar->GetName())) - { - isVarExist = true; - break; - } - } - if (!isVarExist) // var exist in new pPublicVars block, but not in previous (m_publicVars) - { - // try to find value for this var inside "excluded vars" collection - for (int i = m_excludedPublicVars.vars.GetNumVariables() - 1; i >= 0; --i) - { - IVariable* pStoredVar = m_excludedPublicVars.vars.GetVariable(i); - if (!QString::compare(pStoredVar->GetName(), pVar->GetName()) && pVar->GetDataType() == pStoredVar->GetDataType()) - { - pVar->CopyValue(pStoredVar); - m_excludedPublicVars.vars.DeleteVariable(pStoredVar); - bNeedUpdateMaterialFromUI = true; - break; - } - } - } - } - } - } - // We only want to collect vars if the old and new block are part of the same - // material, otherwise we are storing state from one material to an other. - if (m_excludedPublicVars.pMaterial == pMtl) - { - // collect excluded vars from old block (m_publicVars) - // which exist in m_publicVars but not in a new generated pPublicVars block - for (int i = m_publicVars->GetNumVariables() - 1; i >= 0; --i) - { - IVariable* pOldVar = m_publicVars->GetVariable(i); - bool isVarExist = false; - for (int j = pPublicVars->GetNumVariables() - 1; j >= 0; --j) - { - IVariable* pVar = pPublicVars->GetVariable(j); - if (!QString::compare(pOldVar->GetName(), pVar->GetName())) - { - isVarExist = true; - break; - } - } - if (!isVarExist) - { - m_excludedPublicVars.vars.AddVariable(pOldVar->Clone(false)); - } - } - } - m_excludedPublicVars.pMaterial = pMtl; - } - - m_publicVars = pPublicVars; - if (m_publicVars) - { - m_publicVars->Sort(); - } - - m_propsCtrl->ReplaceVarBlock(publicVars, m_publicVars); - - if (m_publicVars && bNeedUpdateMaterialFromUI) - { - pMtl->SetPublicVars(m_publicVars, pMtl); - } - } - IVariable* textureSlotsVar = m_pMaterialUI->tableTexture.GetVar(); - if (m_propsCtrl->FindVariable(textureSlotsVar)) - { - m_textureSlots = pMtl->UpdateTextureNames(m_pMaterialUI->textureVars); - m_propsCtrl->ReplaceVarBlock(textureSlotsVar, m_textureSlots); - } - - ////////////////////////////////////////////////////////////////////////// -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::SelectItem(CBaseLibraryItem* item, bool bForceReload) -{ - static bool bNoRecursiveSelect = false; - if (bNoRecursiveSelect) - { - return; - } - - bool bChanged = item != m_pPrevSelectedItem || bForceReload; - - if (!bChanged) - { - return; - } - - m_pPrevSelectedItem = item; - - // Empty preview control. - //m_previewCtrl.SetEntity(0); - m_pMatManager->SetCurrentMaterial((CMaterial*)item); - - if (!item) - { - m_statusBar->clearMessage(); - m_propsCtrl->setEnabled(false); - m_propsCtrl->hide(); - m_pMaterialImageListCtrl->hide(); - m_placeHolderLabel->setText(tr("Select a material in the Material Editor hierarchy to view properties")); - m_placeHolderLabel->show(); - return; - } - - // Render preview geometry with current material - CMaterial* mtl = (CMaterial*)item; - - QString statusText; - if (mtl->IsPureChild() && mtl->GetParent()) - { - statusText = mtl->GetParent()->GetName() + " [" + mtl->GetName() + "]"; - } - else - { - statusText = mtl->GetName(); - } - - - if (mtl->IsDummy()) - { - statusText += " (Not Found)"; - } - else if (!mtl->CanModify()) - { - statusText += " (Read Only)"; - } - m_statusBar->showMessage(statusText); - - if (mtl->IsMultiSubMaterial()) - { - // Cannot edit it. - m_propsCtrl->setEnabled(false); - m_propsCtrl->EnableUpdateCallback(false); - m_propsCtrl->hide(); - - m_placeHolderLabel->setText(tr("Select a material to view properties")); - m_placeHolderLabel->show(); - - //return; - } - else - { - m_propsCtrl->setEnabled(true); - m_propsCtrl->EnableUpdateCallback(false); - m_propsCtrl->show(); - m_placeHolderLabel->hide(); - } - m_pMaterialImageListCtrl->show(); - - if (m_bForceReloadPropsCtrl) - { - // CPropertyCtrlEx skip OnPaint and another methods for redraw - // OnSize method is forced to invalidate control for redraw - m_propsCtrl->InvalidateCtrl(); - m_bForceReloadPropsCtrl = false; - } - - UpdatePreview(); - - // Update variables. - m_propsCtrl->EnableUpdateCallback(false); - m_pMaterialUI->SetFromMaterial(mtl); - m_propsCtrl->EnableUpdateCallback(true); - - mtl->SetShaderParamPublicScript(); - - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Set Shader Gen Params. - ////////////////////////////////////////////////////////////////////////// - UpdateShaderParamsUI(mtl); - ////////////////////////////////////////////////////////////////////////// - - m_propsCtrl->SetUpdateCallback(AZStd::bind(&CMaterialDialog::OnUpdateProperties, this, AZStd::placeholders::_1)); - m_propsCtrl->EnableUpdateCallback(true); - - if (mtl->IsDummy()) - { - m_propsCtrl->setEnabled(false); - } - else - { - m_propsCtrl->setEnabled(true); - m_propsCtrl->SetGrayed(!mtl->CanModify()); - } - if (mtl) - { - m_pMaterialImageListCtrl->SelectMaterial(mtl); - } -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnUpdateProperties(IVariable* var) -{ - CMaterial* mtl = GetSelectedMaterial(); - if (!mtl) - { - return; - } - - bool bShaderChanged = (m_pMaterialUI->shader == var); - bool bShaderGenMaskChanged = false; - if (m_shaderGenParamsVars) - { - bShaderGenMaskChanged = m_shaderGenParamsVars->IsContainsVariable(var); - } - - bool bMtlLayersChanged = false; - int nCurrLayer = -1; - - // Check for shader changes - for (int l(0); l < MTL_LAYER_MAX_SLOTS; ++l) - { - if ((m_pMaterialUI->materialLayers[l].shader == var)) - { - bMtlLayersChanged = true; - nCurrLayer = l; - break; - } - } - - ////////////////////////////////////////////////////////////////////////// - // Assign modified Shader Gen Params to shader. - ////////////////////////////////////////////////////////////////////////// - if (bShaderGenMaskChanged) - { - mtl->SetShaderGenParamsVars(m_shaderGenParamsVars); - } - ////////////////////////////////////////////////////////////////////////// - // Invalidate material and save changes. - //m_pMatManager->MarkMaterialAsModified(mtl); - // - - mtl->RecordUndo("Material parameter", true); - m_pMaterialUI->SetToMaterial(mtl); - mtl->Update(); - - // - ////////////////////////////////////////////////////////////////////////// - // Assign new public vars to material. - // Must be after material update. - ////////////////////////////////////////////////////////////////////////// - - GetIEditor()->SuspendUndo(); - - if (m_publicVars != NULL && !bShaderChanged) - { - mtl->SetPublicVars(m_publicVars, mtl); - } - - /* - bool bUpdateLayers = false; - for(int l(0); l < MTL_LAYER_MAX_SLOTS; ++l) - { - if ( m_varsMtlLayersShaderParams[l] != NULL && l != nCurrLayer) - { - SMaterialLayerResources *pCurrResource = pTemplateMtl ? &pTemplateMtl->GetMtlLayerResources()[l] : &pMtlLayerResources[l]; - SShaderItem &pCurrShaderItem = pCurrResource->m_pMatLayer->GetShaderItem(); - CVarBlock* pVarBlock = pTemplateMtl ? pTemplateMtl->GetPublicVars( pCurrResource->m_shaderResources ) : m_varsMtlLayersShaderParams[l]; - mtl->SetPublicVars( pVarBlock, pCurrResource->m_shaderResources, pCurrShaderItem.m_pShaderResources, pCurrShaderItem.m_pShader); - bUpdateLayers = true; - } - } - */ - //if( bUpdateLayers ) - { - mtl->UpdateMaterialLayers(); - } - - m_pMaterialUI->PropagateToLinkedMaterial(mtl, m_shaderGenParamsVars); - if (var) - { - GetIEditor()->GetMaterialManager()->HighlightedMaterialChanged(mtl); - m_pMaterialUI->NotifyObjectsAboutMaterialChange(var); - } - - GetIEditor()->ResumeUndo(); - - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - if (bShaderChanged || bShaderGenMaskChanged || bMtlLayersChanged) - { - m_pMaterialUI->SetFromMaterial(mtl); - } - //m_pMaterialUI->SetTextureNames( mtl ); - - UpdatePreview(); - - // When shader changed. - if (bShaderChanged || bShaderGenMaskChanged || bMtlLayersChanged) - { - ////////////////////////////////////////////////////////////////////////// - // Set material layers params - ////////////////////////////////////////////////////////////////////////// - /* - if( bMtlLayersChanged) // only update changed shader in material layers - { - SMaterialLayerResources *pCurrResource = &pMtlLayerResources[nCurrLayer]; - - // delete old property item - if ( m_varsMtlLayersShaderParamsItems[nCurrLayer] ) - { - m_propsCtrl->DeleteItem( m_varsMtlLayersShaderParamsItems[nCurrLayer] ); - m_varsMtlLayersShaderParamsItems[nCurrLayer] = 0; - } - - m_varsMtlLayersShaderParams[nCurrLayer] = mtl->GetPublicVars( pCurrResource->m_shaderResources ); - - if ( m_varsMtlLayersShaderParams[nCurrLayer] ) - { - m_varsMtlLayersShaderParamsItems[nCurrLayer] = m_propsCtrl->AddVarBlockAt( m_varsMtlLayersShaderParams[nCurrLayer], "Shader Params", m_varsMtlLayersShaderItems[nCurrLayer] ); - } - } - */ - - UpdateShaderParamsUI(mtl); - } - - if (bShaderGenMaskChanged || bShaderChanged || bMtlLayersChanged) - { - m_propsCtrl->InvalidateCtrl(); - } - - m_pMaterialImageListModel->InvalidateMaterial(mtl); -} - -////////////////////////////////////////////////////////////////////////// -CMaterial* CMaterialDialog::GetSelectedMaterial() -{ - CBaseLibraryItem* pItem = m_pMatManager->GetCurrentMaterial(); - return (CMaterial*)pItem; -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnAssignMaterialToSelection() -{ - CUndo undo("Assign Material To Selection"); - GetIEditor()->GetMaterialManager()->Command_AssignToSelection(); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnSelectAssignedObjects() -{ - CUndo undo("Select Objects With Current Material"); - GetIEditor()->GetMaterialManager()->Command_SelectAssignedObjects(); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnResetMaterialOnSelection() -{ - GetIEditor()->GetMaterialManager()->Command_ResetSelection(); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnGetMaterialFromSelection() -{ - GetIEditor()->GetMaterialManager()->Command_SelectFromObject(); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::DeleteItem([[maybe_unused]] CBaseLibraryItem* pItem) -{ - m_wndMtlBrowser->DeleteItem(); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// - -void CMaterialDialog::UpdateActions() -{ - if (isHidden()) - { - return; - } - - CMaterial* mtl = GetSelectedMaterial(); - if (mtl && mtl->CanModify(false)) - { - m_saveAction->setEnabled(true); - } - else - { - m_saveAction->setEnabled(false); - } - - if (GetIEditor()->GetEditTool() && GetIEditor()->GetEditTool()->GetClassDesc() && QString::compare(GetIEditor()->GetEditTool()->GetClassDesc()->ClassName(), "EditTool.PickMaterial") == 0) - { - m_pickAction->setChecked(true); - } - else - { - m_pickAction->setChecked(false); - } - - if (mtl && (!GetIEditor()->GetSelection()->IsEmpty() || GetIEditor()->IsInPreviewMode())) - { - m_assignToSelectionAction->setEnabled(true); - } - else - { - m_assignToSelectionAction->setEnabled(false); - } - - if (!GetIEditor()->GetSelection()->IsEmpty() || GetIEditor()->IsInPreviewMode()) - { - m_resetAction->setEnabled(true); - m_getFromSelectionAction->setEnabled(true); - } - else - { - m_resetAction->setEnabled(false); - m_getFromSelectionAction->setEnabled(false); - } -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnPickMtl() -{ - if (GetIEditor()->GetEditTool() && QString::compare(GetIEditor()->GetEditTool()->GetClassDesc()->ClassName(), "EditTool.PickMaterial") == 0) - { - GetIEditor()->SetEditTool(NULL); - } - else - { - GetIEditor()->SetEditTool("EditTool.PickMaterial"); - } - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnCopy() -{ - m_wndMtlBrowser->OnCopy(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnPaste() -{ - m_wndMtlBrowser->OnPaste(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnMaterialPreview() -{ - if (!m_pPreviewDlg) - { - m_pPreviewDlg = new CMatEditPreviewDlg(this); - m_pPreviewDlg->show(); - } -} - -////////////////////////////////////////////////////////////////////////// -bool CMaterialDialog::SetItemName(CBaseLibraryItem* item, const QString& groupName, const QString& itemName) -{ - assert(item); - // Make prototype name. - QString fullName = groupName + "/" + itemName; - IDataBaseItem* pOtherItem = m_pMatManager->FindItemByName(fullName); - if (pOtherItem && pOtherItem != item) - { - // Ensure uniqness of name. - Warning("Duplicate Item Name %s", fullName.toUtf8().data()); - return false; - } - else - { - item->SetName(fullName); - } - return true; -} - - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnBrowserSelectItem(IDataBaseItem* pItem, bool bForce) -{ - SelectItem((CBaseLibraryItem*)pItem, bForce); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::UpdatePreview() -{ -}; - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnChangedBrowserListType(int sel) -{ - m_wndMtlBrowser->ShowOnlyLevelMaterials(sel == 1); - m_pMatManager->SetCurrentMaterial(0); - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnUndo(IVariable* pVar) -{ - if (!m_pMatManager->GetCurrentMaterial()) - { - return; - } - - QString undoName; - if (pVar) - { - undoName = tr("%1 modified").arg(pVar->GetName()); - } - else - { - undoName = tr("Material parameter was modified"); - } - - if (!CUndo::IsRecording()) - { - if (!CUndo::IsSuspended()) - { - CUndo undo(undoName.toUtf8().data()); - m_pMatManager->GetCurrentMaterial()->RecordUndo(undoName.toUtf8().data(), true); - } - } - UpdateActions(); -} - -////////////////////////////////////////////////////////////////////////// -void CMaterialDialog::OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event) -{ - switch (event) - { - case EDB_ITEM_EVENT_UPDATE_PROPERTIES: - if (pItem && pItem == m_pMatManager->GetCurrentMaterial()) - { - SelectItem(m_pMatManager->GetCurrentMaterial(), true); - } - break; - } -} - -// If an object is selected or de-selected, update the available actions in the Material Editor toolbar -void CMaterialDialog::OnEditorNotifyEvent(EEditorNotifyEvent event) -{ - switch (event) - { - case eNotify_OnSelectionChange: - UpdateActions(); - break; - case eNotify_OnCloseScene: - case eNotify_OnEndNewScene: - case eNotify_OnEndSceneOpen: - m_filterTypeSelection->setCurrentIndex(0); - break; - } -} - -void CMaterialDialog::OnResetMaterialViewport() -{ - m_pMaterialImageListCtrl->LoadModel(); -} - -#include diff --git a/Code/Sandbox/Editor/Material/MaterialDialog.h b/Code/Sandbox/Editor/Material/MaterialDialog.h deleted file mode 100644 index 48e68e2322..0000000000 --- a/Code/Sandbox/Editor/Material/MaterialDialog.h +++ /dev/null @@ -1,176 +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. - -#pragma once - -#if !defined(Q_MOC_RUN) -#include "MaterialBrowser.h" - -#include -#include -#include -#endif - -static const char* MATERIAL_EDITOR_NAME = "Material Editor"; -static const char* MATERIAL_EDITOR_VER = "1.00"; - - -class QComboBox; -class QLabel; - -class CMaterial; -class CMaterialManager; -class CMatEditPreviewDlg; -class CMaterialSender; -class CMaterialImageListCtrl; -class QMaterialImageListModel; -class TwoColumnPropertyControl; - -/** Dialog which hosts entity prototype library. -*/ - - -struct SMaterialExcludedVars -{ - CMaterial* pMaterial; - CVarBlock vars; - - SMaterialExcludedVars() - : pMaterial(nullptr) - { - } -}; - - -class CMaterialDialog - : public QMainWindow - , public IMaterialBrowserListener - , public IDataBaseManagerListener - , public IEditorNotifyListener -{ - Q_OBJECT -public: - CMaterialDialog(QWidget* parent = 0); - ~CMaterialDialog(); - - static void RegisterViewClass(); - static const GUID& GetClassID(); - -public slots: - void OnAssignMaterialToSelection(); - void OnResetMaterialOnSelection(); - void OnGetMaterialFromSelection(); - -protected: - BOOL OnInitDialog(); - void closeEvent(QCloseEvent *ev) override; - -protected slots: - void OnAddItem(); - void OnDeleteItem(); - void OnSaveItem(); - void OnPickMtl(); - void OnCopy(); - void OnPaste(); - void OnMaterialPreview(); - void OnSelectAssignedObjects(); - void OnChangedBrowserListType(int); - void OnResetMaterialViewport(); - - void UpdateActions(); - -protected: - ////////////////////////////////////////////////////////////////////////// - // Some functions can be overriden to modify standart functionality. - ////////////////////////////////////////////////////////////////////////// - virtual void InitToolbar(UINT nToolbarResID); - - virtual void SelectItem(CBaseLibraryItem* item, bool bForceReload = false); - virtual void DeleteItem(CBaseLibraryItem* pItem); - virtual bool SetItemName(CBaseLibraryItem* item, const QString& groupName, const QString& itemName); - virtual void ReloadItems(); - - ////////////////////////////////////////////////////////////////////////// - // IMaterialBrowserListener implementation. - ////////////////////////////////////////////////////////////////////////// - virtual void OnBrowserSelectItem(IDataBaseItem* pItem, bool bForce); - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // IDataBaseManagerListener implementation. - ////////////////////////////////////////////////////////////////////////// - virtual void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event); - ////////////////////////////////////////////////////////////////////////// - - // IEditorNotifyListener implementation. - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event); - - ////////////////////////////////////////////////////////////////////////// - CMaterial* GetSelectedMaterial(); - void OnUpdateProperties(IVariable* var); - void OnUndo(IVariable* pVar); - - void UpdateShaderParamsUI(CMaterial* pMtl); - - void UpdatePreview(); - - //void SetTextureVars( CVariableArray *texVar,CMaterial *mtl,int id,const CString &name ); - void SetMaterialVars(CMaterial* mtl); - - MaterialBrowserWidget* m_wndMtlBrowser; - - QStatusBar* m_statusBar; - //CXTCaption m_wndCaption; - - TwoColumnPropertyControl* m_propsCtrl; - bool m_bForceReloadPropsCtrl; - - QLabel* m_placeHolderLabel; - - CBaseLibraryItem* m_pPrevSelectedItem; - - // Material manager. - CMaterialManager* m_pMatManager; - - CVarBlockPtr m_vars; - CVarBlockPtr m_publicVars; - - // collection of excluded vars from m_publicVars for remembering values - // when updating shader params - SMaterialExcludedVars m_excludedPublicVars; - - CVarBlockPtr m_shaderGenParamsVars; - CVarBlockPtr m_textureSlots; - - class CMaterialUI* m_pMaterialUI; - - QPointer m_pPreviewDlg; - - QScopedPointer m_pMaterialImageListCtrl; - QScopedPointer m_pMaterialImageListModel; - - QToolBar* m_toolbar; - QComboBox* m_filterTypeSelection; - QAction* m_addAction; - QAction* m_assignToSelectionAction; - QAction* m_copyAction; - QAction* m_getFromSelectionAction; - QAction* m_pasteAction; - QAction* m_pickAction; - QAction* m_previewAction; - QAction* m_removeAction; - QAction* m_resetAction; - QAction* m_saveAction; - QAction* m_resetViewporAction; -}; - diff --git a/Code/Sandbox/Editor/Material/MaterialDialog.qrc b/Code/Sandbox/Editor/Material/MaterialDialog.qrc index 43bfbd6ea0..c99e5b052a 100644 --- a/Code/Sandbox/Editor/Material/MaterialDialog.qrc +++ b/Code/Sandbox/Editor/Material/MaterialDialog.qrc @@ -1,39 +1,4 @@ - - images/materialdialog_add_disabled.png - images/materialdialog_copy_disabled.png - images/materialdialog_paste_disabled.png - images/materialdialog_preview_disabled.png - images/materialdialog_remove_disabled.png - images/materialdialog_save_disabled.png - images/materialdialog_assignselection_disabled.png - images/materialdialog_getfromselection_disabled.png - images/materialdialog_pick_disabled.png - images/materialdialog_reset_disabled.png - images/materialdialog_assignselection_active.png - images/materialdialog_assignselection_normal.png - images/materialdialog_add_active.png - images/materialdialog_add_normal.png - images/materialdialog_copy_active.png - images/materialdialog_copy_normal.png - images/materialdialog_getfromselection_active.png - images/materialdialog_getfromselection_normal.png - images/materialdialog_paste_active.png - images/materialdialog_paste_normal.png - images/materialdialog_pick_active.png - images/materialdialog_pick_normal.png - images/materialdialog_preview_active.png - images/materialdialog_preview_normal.png - images/materialdialog_remove_active.png - images/materialdialog_remove_normal.png - images/materialdialog_reset_active.png - images/materialdialog_reset_normal.png - images/materialdialog_save_active.png - images/materialdialog_save_normal.png - images/materialdialog_reset_viewport_active.png - images/materialdialog_reset_viewport_disabled.png - images/materialdialog_reset_viewport_normal.png - images/material_browser_00.png images/material_browser_01.png diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_add.png b/Code/Sandbox/Editor/Material/images/materialdialog_add.png deleted file mode 100644 index aa8d657f23..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_add.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:703f6875258486629bc1db68ce80fe1653f0d2876cd1252d03f72f6eae04dd84 -size 392 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_add_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_add_active.png deleted file mode 100644 index 467365d1ad..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_add_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f3c05f8425956e9c1e380fde9a65df8f0d341868900a3589d9f629f34a0ddf6 -size 251 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_add_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_add_disabled.png deleted file mode 100644 index 399e45469e..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_add_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:25554e93a4f0d9b904a2a3628c315ee55c0ad8831bb5891a9d7e27e5cb9a5416 -size 261 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_add_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_add_normal.png deleted file mode 100644 index 1eb8d63ef5..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_add_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b2ee886c6e487a6490361609fdd44c64438e40c7e5a4c40fda866ec399ec4727 -size 256 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_assignselection.png b/Code/Sandbox/Editor/Material/images/materialdialog_assignselection.png deleted file mode 100644 index 72fdb0537a..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_assignselection.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:943ff19774cbe8d47c1e8001a48e6d137fdac2c0af63c9092911c37be0d6d6a8 -size 471 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_active.png deleted file mode 100644 index 605107f750..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:400d669d7a658968549f6ee776ee415b871b207c444d8797a404b76d536131b1 -size 325 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_disabled.png deleted file mode 100644 index 3505f577a4..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:02bdc8aad92bb75b118c4a703a3e5b1369376620b3836a125faedc7f6b42b49b -size 330 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_normal.png deleted file mode 100644 index 0e9c984e1d..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_assignselection_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:38097d3041defeec0179390a73bb463e54e7f4c1f0b1a20e77ab3f69ea9cf13c -size 332 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_copy.png b/Code/Sandbox/Editor/Material/images/materialdialog_copy.png deleted file mode 100644 index 08fc0c6987..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_copy.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e1d9fe8e97655bf776b20e242d66900980721ba2f3ee93c02cd4062a8b872eed -size 433 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_copy_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_copy_active.png deleted file mode 100644 index 67a010be86..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_copy_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:468b68c44d8ef183b292c1bc6ca4dc583357f693db9ea2cd198fb2af22537be1 -size 249 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_copy_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_copy_disabled.png deleted file mode 100644 index d585dbae6e..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_copy_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b27a1346f2edebe34ee06d7892a467bfc67952d0f8e4458e09a74a6dbf62fe98 -size 336 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_copy_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_copy_normal.png deleted file mode 100644 index 4b42f5c9a2..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_copy_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3f40524a96689b8c8549bc662415df654494baeeda6eed47e66b455ac902eeb -size 254 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection.png b/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection.png deleted file mode 100644 index 76c343a718..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cebe97de0d879d239fcd61595fd28b73760aa6452dcf4dabc54bfe034e2e33c1 -size 476 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_active.png deleted file mode 100644 index cc58f4f767..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:699ee40aeedfc50b7766e94ef66e645762eb183ddd6ce134b4bdab01c3957ab9 -size 327 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_disabled.png deleted file mode 100644 index 6e4a425058..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f1fd8a7cecb22901c6d73f2e6129f3bada0f94cf73d9a8fd2676a972faa5719 -size 348 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_normal.png deleted file mode 100644 index 1c319c319d..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_getfromselection_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d432de9e921d23fbbf3c1b805f644b9554aa206011a87c063d167c30c7c4579e -size 335 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_paste.png b/Code/Sandbox/Editor/Material/images/materialdialog_paste.png deleted file mode 100644 index 95740d44d8..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_paste.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c006e70efd8bdb1dd5aac867db9d97de587e8d518ba0693d19c319e34a74c7d0 -size 501 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_paste_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_paste_active.png deleted file mode 100644 index aabb4f2520..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_paste_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00c291361664d357502f5267fccd0a6fff0c3f2e906c0402d57ad9fa5ca7f023 -size 255 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_paste_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_paste_disabled.png deleted file mode 100644 index 9abc336f71..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_paste_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d68fc8604a23eb3bcc0cac9bb6e83dd4dc4cdab70b0bdaec3c456559727c6b5b -size 354 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_paste_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_paste_normal.png deleted file mode 100644 index 158bf9d690..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_paste_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4055c7f029d7711e5c32f3f74901bf1dcc1540fd2c0f3f30dc74743d7f2cc042 -size 355 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_pick.png b/Code/Sandbox/Editor/Material/images/materialdialog_pick.png deleted file mode 100644 index e08b45ac66..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_pick.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99e2c0378137bef94eb6f281e0168852540bf1ca823b9bcd4365ef2849db9956 -size 420 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_pick_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_pick_active.png deleted file mode 100644 index 392b4ab63e..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_pick_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34075016c93f1914fe4d12ead7c5ee322a18466f08a476eff7c127e4e1429224 -size 290 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_pick_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_pick_disabled.png deleted file mode 100644 index 865a91152d..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_pick_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dc289621f8a9d3e714cd985651d7d6f20495fb7be46e1f60c283d8920c730d0b -size 307 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_pick_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_pick_normal.png deleted file mode 100644 index 5c1086b22d..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_pick_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e9d5c878acf9fee4252cb854f192690d3f50d46dc4e5f5b1b5812b79fc2cdf7 -size 296 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_preview.png b/Code/Sandbox/Editor/Material/images/materialdialog_preview.png deleted file mode 100644 index c7d79780ee..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_preview.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2e912c40f07ca3d2a9b2aa1c5caf3acc181436b6a1b560fc021450701331b4c -size 403 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_preview_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_preview_active.png deleted file mode 100644 index d2e1d8230d..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_preview_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00663e473803ba6c2798c494676b0a65fd62d7484f6d7b51d9fc8955ad586477 -size 273 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_preview_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_preview_disabled.png deleted file mode 100644 index 56716582bb..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_preview_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34b7d5520cfc8f00ff580558db4f0ec4297458d310321471204daa8678db5fc1 -size 298 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_preview_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_preview_normal.png deleted file mode 100644 index f54cd90c2a..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_preview_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7bca1a8811739949aa2e87486f8697dfae5bc5238894dd1b95ae80aa6f80d517 -size 279 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_remove.png b/Code/Sandbox/Editor/Material/images/materialdialog_remove.png deleted file mode 100644 index d530169b78..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_remove.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db86d857b651a2fec80418f8b251447bb3fcf4c0cf64bdee12c3b656adbde29a -size 422 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_remove_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_remove_active.png deleted file mode 100644 index 78ec0e0806..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_remove_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fef72444f077879d5c0186c9583f67aa45aafc23214d9e7de90a7c595609270f -size 258 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_remove_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_remove_disabled.png deleted file mode 100644 index a69ef52e75..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_remove_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d2117fda3ed6a28032ae8f03ed7f9a7a0960f4691e49903c63b2150027dfe1ea -size 302 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_remove_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_remove_normal.png deleted file mode 100644 index b84a504285..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_remove_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06b384ecc11ed2547a9bf466f585889d647c29a4883840070e444a382e80c41c -size 266 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_reset.png b/Code/Sandbox/Editor/Material/images/materialdialog_reset.png deleted file mode 100644 index e2eedad0bf..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_reset.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b9ee01e7fe2f19b0e736efe09c2b81d3243e369375b4f26346e6abd499e54a6 -size 476 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_reset_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_reset_active.png deleted file mode 100644 index e86ed4dcb8..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_reset_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:935a041332be1fe11ed01c09a3cd367fb9ede7e7eb04909614943f80e741d35f -size 334 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_reset_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_reset_disabled.png deleted file mode 100644 index 2e4e403a30..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_reset_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b343233ab25a73fcdb4fff5509011497814fc4cb591065bdb3043a0f1092577 -size 342 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_reset_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_reset_normal.png deleted file mode 100644 index 8d8b8a1bd9..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_reset_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1cc0183d7f57f15c4efeffb32795921f2f4e9c7965955fd0a392f826d5f6b6c8 -size 337 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_active.png deleted file mode 100644 index 41590634f5..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a8467c1dcc343f637e0f7f5071a20b8881a43d567fb32fd96f5383f7b69bbb6 -size 430 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_disabled.png deleted file mode 100644 index c6518416c0..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0fd5ec79fc2c679f99ac5eb63d725f2cc815b09286bd0f3b5d2921eeb2e1e8cc -size 406 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_normal.png deleted file mode 100644 index eef1d5236f..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_reset_viewport_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e19713b6586581d2336e833d8ecbd78b4b8f15b1c49a29d80acbf05e8aae3df -size 418 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_save.png b/Code/Sandbox/Editor/Material/images/materialdialog_save.png deleted file mode 100644 index 4408a8ba1d..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_save.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4de0f4a102e5c4990d5d23e22b5cdd16532192f3a125758b608cd8c731278898 -size 355 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_save_active.png b/Code/Sandbox/Editor/Material/images/materialdialog_save_active.png deleted file mode 100644 index b0961d34a9..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_save_active.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0b6f7c69112d124eac1123ffa840268c16148fef9ded3a67f84d3ad8d73eb96 -size 212 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_save_disabled.png b/Code/Sandbox/Editor/Material/images/materialdialog_save_disabled.png deleted file mode 100644 index cc694f079f..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_save_disabled.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b795fb88a6f301d7ecc9ce75141bdcf9e6dca25043730661aa4d1f09b055d6f -size 222 diff --git a/Code/Sandbox/Editor/Material/images/materialdialog_save_normal.png b/Code/Sandbox/Editor/Material/images/materialdialog_save_normal.png deleted file mode 100644 index 6293be8be5..0000000000 --- a/Code/Sandbox/Editor/Material/images/materialdialog_save_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88fbce753cdd9381a814e3b2ec5d16df7cc26f2a37ad30b7010be71ae9183510 -size 214 diff --git a/Code/Sandbox/Editor/PickObjectTool.cpp b/Code/Sandbox/Editor/PickObjectTool.cpp deleted file mode 100644 index dc1fce110e..0000000000 --- a/Code/Sandbox/Editor/PickObjectTool.cpp +++ /dev/null @@ -1,173 +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 "EditorDefs.h" - -#include "PickObjectTool.h" - -// Editor -#include "Viewport.h" -#include "Include/HitContext.h" -#include "Objects/BaseObject.h" - - -////////////////////////////////////////////////////////////////////////// -CPickObjectTool::CPickObjectTool(IPickObjectCallback* callback, const QMetaObject* targetClass) -{ - assert(callback != 0); - m_callback = callback; - m_targetClass = targetClass; - m_bMultiPick = false; -} - -////////////////////////////////////////////////////////////////////////// -CPickObjectTool::~CPickObjectTool() -{ - GetIEditor()->GetObjectManager()->SetSelectCallback(0); - //m_prevSelectCallback = 0; - if (m_callback) - { - m_callback->OnCancelPick(); - } -} - -////////////////////////////////////////////////////////////////////////// -void CPickObjectTool::BeginEditParams([[maybe_unused]] IEditor* ie, [[maybe_unused]] int flags) -{ - QString str = "Pick object"; - if (m_targetClass) - { - str = tr("Pick %1 object").arg(m_targetClass->className()); - } - SetStatusText(str); - - //m_prevSelectCallback = - GetIEditor()->GetObjectManager()->SetSelectCallback(this); -} - -////////////////////////////////////////////////////////////////////////// -bool CPickObjectTool::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, [[maybe_unused]] int flags) -{ - if (event == eMouseLDown) - { - HitContext hitInfo; - view->HitTest(point, hitInfo); - CBaseObject* obj = hitInfo.object; - if (obj) - { - if (IsRelevant(obj)) - { - if (m_callback) - { - // Can pick this one. - m_callback->OnPick(obj); - } - if (!m_bMultiPick) - { - m_callback = 0; - GetIEditor()->SetEditTool(0); - } - } - } - } - else if (event == eMouseMove) - { - HitContext hitInfo; - view->HitTest(point, hitInfo); - CBaseObject* obj = hitInfo.object; - if (obj) - { - if (IsRelevant(obj)) - { - // Set Cursors. - view->SetCurrentCursor(STD_CURSOR_HIT, obj->GetName()); - } - } - } - return true; -} - -////////////////////////////////////////////////////////////////////////// -bool CPickObjectTool::OnSelectObject(CBaseObject* obj) -{ - if (IsRelevant(obj)) - { - // Can pick this one. - if (m_callback) - { - m_callback->OnPick(obj); - m_callback = 0; - } - if (!m_bMultiPick) - { - GetIEditor()->SetEditTool(0); - } - } - return false; -} - -////////////////////////////////////////////////////////////////////////// -bool CPickObjectTool::CanSelectObject(CBaseObject* obj) -{ - return IsRelevant(obj); -} - -////////////////////////////////////////////////////////////////////////// -bool CPickObjectTool::OnKeyDown([[maybe_unused]] CViewport* view, uint32 nChar, [[maybe_unused]] uint32 nRepCnt, [[maybe_unused]] uint32 nFlags) -{ - if (nChar == VK_ESCAPE) - { - // Cancel selection. - GetIEditor()->SetEditTool(0); - } - return false; -} - -////////////////////////////////////////////////////////////////////////// -bool CPickObjectTool::IsRelevant(CBaseObject* obj) -{ - assert(obj != 0); - if (obj == NULL) - { - return false; - } - if (!m_callback) - { - return false; - } - - if (!m_targetClass) - { - return m_callback->OnPickFilter(obj); - } - else - { - if (obj->metaObject() == m_targetClass || m_targetClass->cast(obj)) - { - return m_callback->OnPickFilter(obj); - } - } - return false; -} - -////////////////////////////////////////////////////////////////////////// -bool CPickObjectTool::IsNeedSpecificBehaviorForSpaceAcce() -{ - if (m_callback && m_callback->IsNeedSpecificBehaviorForSpaceAcce()) - { - return true; - } - return false; -} - -#include diff --git a/Code/Sandbox/Editor/PickObjectTool.h b/Code/Sandbox/Editor/PickObjectTool.h deleted file mode 100644 index 3b0241042a..0000000000 --- a/Code/Sandbox/Editor/PickObjectTool.h +++ /dev/null @@ -1,76 +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 : Definition of PickObjectTool, tool used to pick objects. - - -#ifndef CRYINCLUDE_EDITOR_PICKOBJECTTOOL_H -#define CRYINCLUDE_EDITOR_PICKOBJECTTOOL_H - -#if !defined(Q_MOC_RUN) -#include "EditTool.h" -#include "IObjectManager.h" -#endif - -#pragma once - -////////////////////////////////////////////////////////////////////////// -class CPickObjectTool - : public CEditTool - , public IObjectSelectCallback -{ - Q_OBJECT -public: - CPickObjectTool(IPickObjectCallback* callback, const QMetaObject* targetClass = NULL); - - //! If set to true, pick tool will not stop picking after first pick. - void SetMultiplePicks(bool bEnable) { m_bMultiPick = bEnable; }; - - // Ovverides from CEditTool - bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags); - - virtual void BeginEditParams(IEditor* ie, int flags); - virtual void EndEditParams() {}; - - virtual void Display([[maybe_unused]] DisplayContext& dc) {}; - virtual bool OnKeyDown(CViewport* view, uint32 nChar, uint32 nRepCnt, uint32 nFlags); - virtual bool OnKeyUp([[maybe_unused]] CViewport* view, [[maybe_unused]] uint32 nChar, [[maybe_unused]] uint32 nRepCnt, [[maybe_unused]] uint32 nFlags) { return false; }; - - ////////////////////////////////////////////////////////////////////////// - // IObjectSelectCallback - ////////////////////////////////////////////////////////////////////////// - virtual bool OnSelectObject(CBaseObject* obj); - virtual bool CanSelectObject(CBaseObject* obj); - ////////////////////////////////////////////////////////////////////////// - - virtual bool IsNeedSpecificBehaviorForSpaceAcce(); - -protected: - virtual ~CPickObjectTool(); - // Delete itself. - void DeleteThis() { delete this; }; - -private: - bool IsRelevant(CBaseObject* obj); - - //! Object that requested pick. - IPickObjectCallback* m_callback; - - //! If target class specified, will pick only objects that belongs to that runtime class. - const QMetaObject* m_targetClass; - - bool m_bMultiPick; -}; - - -#endif // CRYINCLUDE_EDITOR_PICKOBJECTTOOL_H diff --git a/Code/Sandbox/Editor/PythonEditorFuncs.cpp b/Code/Sandbox/Editor/PythonEditorFuncs.cpp index 5c74a950c2..f5de22387c 100644 --- a/Code/Sandbox/Editor/PythonEditorFuncs.cpp +++ b/Code/Sandbox/Editor/PythonEditorFuncs.cpp @@ -19,6 +19,8 @@ #include #include +#include + // AzToolsFramework #include #include @@ -293,9 +295,8 @@ namespace // If not found try editor folder if (!CFileUtil::FileExists(path)) { - const char* engineRoot = nullptr; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(engineRoot, &AzToolsFramework::ToolsApplicationRequests::GetEngineRootPath); - QDir engineDir = engineRoot ? QDir(engineRoot) : QDir::current(); + AZ::IO::FixedMaxPathString engineRoot = AZ::Utils::GetEnginePath(); + QDir engineDir = !engineRoot.empty() ? QDir(QString(engineRoot.c_str())) : QDir::current(); QString scriptFolder = engineDir.absoluteFilePath("Editor/Scripts/"); Path::ConvertBackSlashToSlash(scriptFolder); diff --git a/Code/Sandbox/Editor/QtViewPaneManager.cpp b/Code/Sandbox/Editor/QtViewPaneManager.cpp index ad33eecfee..b242f3d914 100644 --- a/Code/Sandbox/Editor/QtViewPaneManager.cpp +++ b/Code/Sandbox/Editor/QtViewPaneManager.cpp @@ -36,6 +36,8 @@ #include #include +#include + #include #include #include @@ -983,6 +985,11 @@ bool QtViewPaneManager::ClosePanesWithRollback(const QVector& panesToKe */ void QtViewPaneManager::RestoreDefaultLayout(bool resetSettings) { + // Get whether the prefab system is enabled + bool isPrefabSystemEnabled = false; + AzFramework::ApplicationRequests::Bus::BroadcastResult( + isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled); + if (resetSettings) { // We're going to do something destructive (removing all of the viewpane settings). Better confirm with the user @@ -1022,7 +1029,11 @@ void QtViewPaneManager::RestoreDefaultLayout(bool resetSettings) state.viewPanes.push_back(LyViewPane::EntityInspector); state.viewPanes.push_back(LyViewPane::AssetBrowser); state.viewPanes.push_back(LyViewPane::Console); - state.viewPanes.push_back(LyViewPane::LevelInspector); + + if (!isPrefabSystemEnabled) + { + state.viewPanes.push_back(LyViewPane::LevelInspector); + } state.mainWindowState = m_defaultMainWindowState; @@ -1047,7 +1058,12 @@ void QtViewPaneManager::RestoreDefaultLayout(bool resetSettings) const QtViewPane* assetBrowserViewPane = OpenPane(LyViewPane::AssetBrowser, QtViewPane::OpenMode::UseDefaultState); const QtViewPane* entityInspectorViewPane = OpenPane(LyViewPane::EntityInspector, QtViewPane::OpenMode::UseDefaultState); const QtViewPane* consoleViewPane = OpenPane(LyViewPane::Console, QtViewPane::OpenMode::UseDefaultState); - const QtViewPane* levelInspectorPane = OpenPane(LyViewPane::LevelInspector, QtViewPane::OpenMode::UseDefaultState); + + const QtViewPane* levelInspectorPane = nullptr; + if (!isPrefabSystemEnabled) + { + levelInspectorPane = OpenPane(LyViewPane::LevelInspector, QtViewPane::OpenMode::UseDefaultState); + } // This class does all kinds of behind the scenes magic to make docking / restore work, especially with groups // so instead of doing our special default layout attach / docking right now, we want to make it happen diff --git a/Code/Sandbox/Editor/Resource.h b/Code/Sandbox/Editor/Resource.h index a4bd2c1143..afcd0c7a6f 100644 --- a/Code/Sandbox/Editor/Resource.h +++ b/Code/Sandbox/Editor/Resource.h @@ -181,8 +181,6 @@ #define ID_TV_STOP 33568 #define ID_TV_PAUSE 33569 #define ID_ADDNODE 33570 -#define ID_EDITTOOL_LINK 33571 -#define ID_EDITTOOL_UNLINK 33572 #define ID_ADDSCENETRACK 33573 #define ID_FIND 33574 #define ID_SNAP_TO_GRID 33575 @@ -214,7 +212,6 @@ #define ID_TV_JUMPSTART 33601 #define ID_TV_PREVKEY 33602 #define ID_TV_NEXTKEY 33603 -#define ID_OBJECTMODIFY_ALIGN 33604 #define ID_PLAY_LOOP 33607 #define ID_TERRAIN 33611 #define ID_OBJECTMODIFY_ALIGNTOGRID 33619 diff --git a/Code/Sandbox/Editor/ToolBox.cpp b/Code/Sandbox/Editor/ToolBox.cpp index def7329e83..46c01ce864 100644 --- a/Code/Sandbox/Editor/ToolBox.cpp +++ b/Code/Sandbox/Editor/ToolBox.cpp @@ -18,6 +18,8 @@ #include "ToolBox.h" +#include + // AzToolsFramework #include #include @@ -419,9 +421,8 @@ void CToolBoxManager::Load(QString xmlpath, AmazonToolbar* pToolbar, bool bToolb } } - const char* engineRoot = nullptr; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(engineRoot, &AzToolsFramework::ToolsApplicationRequests::GetEngineRootPath); - QDir engineDir = engineRoot ? QDir(engineRoot) : QDir::current(); + AZ::IO::FixedMaxPathString engineRoot = AZ::Utils::GetEnginePath(); + QDir engineDir = !engineRoot.empty() ? QDir(QString(engineRoot.c_str())) : QDir::current(); string enginePath = PathUtil::AddSlash(engineDir.absolutePath().toUtf8().data()); diff --git a/Code/Sandbox/Editor/ToolbarManager.cpp b/Code/Sandbox/Editor/ToolbarManager.cpp index 4679f9cb6a..d39dabf034 100644 --- a/Code/Sandbox/Editor/ToolbarManager.cpp +++ b/Code/Sandbox/Editor/ToolbarManager.cpp @@ -585,13 +585,6 @@ AmazonToolbar ToolbarManager::GetEditModeToolbar() const t.AddAction(ID_TOOLBAR_WIDGET_UNDO, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_TOOLBAR_WIDGET_REDO, ORIGINAL_TOOLBAR_VERSION); - if (!GetIEditor()->IsNewViewportInteractionModelEnabled()) - { - t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION); - t.AddAction(ID_EDITTOOL_LINK, ORIGINAL_TOOLBAR_VERSION); - t.AddAction(ID_EDITTOOL_UNLINK, ORIGINAL_TOOLBAR_VERSION); - } - t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION); if (!GetIEditor()->IsNewViewportInteractionModelEnabled()) @@ -630,7 +623,6 @@ AmazonToolbar ToolbarManager::GetObjectToolbar() const AmazonToolbar t = AmazonToolbar("Object", QObject::tr("Object Toolbar")); t.SetMainToolbar(true); t.AddAction(ID_GOTO_SELECTED, ORIGINAL_TOOLBAR_VERSION); - t.AddAction(ID_OBJECTMODIFY_ALIGN, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_OBJECTMODIFY_ALIGNTOGRID, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_OBJECTMODIFY_SETHEIGHT, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_MODIFY_ALIGNOBJTOSURF, ORIGINAL_TOOLBAR_VERSION); diff --git a/Code/Sandbox/Editor/ViewportManipulatorController.cpp b/Code/Sandbox/Editor/ViewportManipulatorController.cpp index 910d037670..fc376b27d0 100644 --- a/Code/Sandbox/Editor/ViewportManipulatorController.cpp +++ b/Code/Sandbox/Editor/ViewportManipulatorController.cpp @@ -95,6 +95,11 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram AZStd::optional overrideButton; AZStd::optional eventType; + // Because we receive events multiple times at separate priorities for manipulator events and + // viewport interaction events, we want to avoid updating our "last tick state" until we're on our last event, + // which currently is the low priority Interaction processor. + const bool finishedProcessingEvents = event.m_priority == InteractionPriority; + if (IsMouseMove(event.m_inputChannel)) { // Cache the ray trace results when doing manipulator interaction checks, no need to recalculate after @@ -120,10 +125,11 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram } else if (auto mouseButton = GetMouseButton(event.m_inputChannel); mouseButton != MouseButton::None) { + const AZ::u32 mouseButtonValue = static_cast(mouseButton); overrideButton = mouseButton; if (event.m_inputChannel.GetState() == InputChannel::State::Began) { - m_state.m_mouseButtons.m_mouseButtons |= static_cast(mouseButton); + m_state.m_mouseButtons.m_mouseButtons |= mouseButtonValue; if (IsDoubleClick(mouseButton)) { // Only remove the double click flag once we're done processing both Manipulator and Interaction events @@ -135,8 +141,8 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram } else { - // Only insert the double click timing once we're done processing both Manipulator and Interaction events, to avoid a false IsDoubleClick positive - if (event.m_priority == InteractionPriority) + // Only insert the double click timing once we're done processing events, to avoid a false IsDoubleClick positive + if (finishedProcessingEvents) { m_pendingDoubleClicks[mouseButton] = m_curTime; } @@ -145,8 +151,18 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram } else if (event.m_inputChannel.GetState() == InputChannel::State::Ended) { - m_state.m_mouseButtons.m_mouseButtons &= ~static_cast(mouseButton); - eventType = MouseEvent::Up; + // If we've actually logged a mouse down event, forward a mouse up event. + // This prevents corner cases like the context menu thinking it should be opened even though no one clicked in this viewport, + // due to RenderViewportWidget ensuring all controllers get InputChannel::State::Ended events. + if (m_state.m_mouseButtons.m_mouseButtons & mouseButtonValue) + { + // Erase the button from our state if we're done processing events. + if (event.m_priority == InteractionPriority) + { + m_state.m_mouseButtons.m_mouseButtons &= ~mouseButtonValue; + } + eventType = MouseEvent::Up; + } } } else if (auto keyboardModifier = GetKeyboardModifier(event.m_inputChannel); keyboardModifier != KeyboardModifier::None) @@ -186,6 +202,12 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram return interactionHandled; } +void ViewportManipulatorControllerInstance::ResetInputChannels() +{ + m_pendingDoubleClicks.clear(); + m_state = AzToolsFramework::ViewportInteraction::MouseInteraction(); +} + void ViewportManipulatorControllerInstance::UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) { m_curTime = event.m_time; diff --git a/Code/Sandbox/Editor/ViewportManipulatorController.h b/Code/Sandbox/Editor/ViewportManipulatorController.h index a4f373c48f..03a823fa64 100644 --- a/Code/Sandbox/Editor/ViewportManipulatorController.h +++ b/Code/Sandbox/Editor/ViewportManipulatorController.h @@ -26,6 +26,7 @@ namespace SandboxEditor explicit ViewportManipulatorControllerInstance(AzFramework::ViewportId viewport); bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override; + void ResetInputChannels() override; void UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) override; private: diff --git a/Code/Sandbox/Editor/editor_lib_files.cmake b/Code/Sandbox/Editor/editor_lib_files.cmake index 9084a566ae..5696931f26 100644 --- a/Code/Sandbox/Editor/editor_lib_files.cmake +++ b/Code/Sandbox/Editor/editor_lib_files.cmake @@ -316,8 +316,6 @@ set(FILES Material/MaterialHelpers.cpp Material/MaterialHelpers.h Material/MaterialDialog.qrc - Material/MaterialDialog.cpp - Material/MaterialDialog.h Material/MaterialPreviewModelView.cpp Material/MaterialPreviewModelView.h Material/PreviewModelView.cpp @@ -535,8 +533,6 @@ set(FILES Dialogs/PythonScriptsDialog.ui Dialogs/Generic/UserOptions.cpp Dialogs/Generic/UserOptions.h - AlignTool.cpp - AlignTool.h ObjectCloneTool.cpp ObjectCloneTool.h EditMode/SubObjectSelectionReferenceFrameCalculator.cpp @@ -547,10 +543,6 @@ set(FILES RotateTool.h EditTool.cpp EditTool.h - LinkTool.cpp - LinkTool.h - PickObjectTool.cpp - PickObjectTool.h VoxelAligningTool.cpp VoxelAligningTool.h Export/ExportManager.cpp @@ -632,8 +624,6 @@ set(FILES LensFlareEditor/LensFlareView.h LogFileImpl.cpp LogFileImpl.h - MatEditMainDlg.cpp - MatEditMainDlg.h MatEditPreviewDlg.cpp MatEditPreviewDlg.h Material/MaterialBrowser.cpp diff --git a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/ComponentEntityEditorPlugin.cpp b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/ComponentEntityEditorPlugin.cpp index 17face523b..e5ad2a2872 100644 --- a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/ComponentEntityEditorPlugin.cpp +++ b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/ComponentEntityEditorPlugin.cpp @@ -143,15 +143,6 @@ ComponentEntityEditorPlugin::ComponentEntityEditorPlugin([[maybe_unused]] IEdito LyViewPane::CategoryTools, pinnedInspectorOptions); - ViewPaneOptions levelInspectorOptions; - levelInspectorOptions.canHaveMultipleInstances = false; - levelInspectorOptions.preferedDockingArea = Qt::RightDockWidgetArea; - levelInspectorOptions.paneRect = QRect(50, 50, 400, 700); - RegisterViewPane( - LyViewPane::LevelInspector, - LyViewPane::CategoryTools, - levelInspectorOptions); - bool prefabSystemEnabled = false; AzFramework::ApplicationRequests::Bus::BroadcastResult(prefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled); @@ -170,8 +161,14 @@ ComponentEntityEditorPlugin::ComponentEntityEditorPlugin([[maybe_unused]] IEdito } else { - // Add the Legacy Outliner to the Tools Menu + ViewPaneOptions levelInspectorOptions; + levelInspectorOptions.canHaveMultipleInstances = false; + levelInspectorOptions.preferedDockingArea = Qt::RightDockWidgetArea; + levelInspectorOptions.paneRect = QRect(50, 50, 400, 700); + RegisterViewPane( + LyViewPane::LevelInspector, LyViewPane::CategoryTools, levelInspectorOptions); + // Add the Legacy Outliner to the Tools Menu ViewPaneOptions outlinerOptions; outlinerOptions.canHaveMultipleInstances = true; outlinerOptions.preferedDockingArea = Qt::LeftDockWidgetArea; diff --git a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp index d9e3d9bb8c..9c917b25c0 100644 --- a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp +++ b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp @@ -670,9 +670,13 @@ void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, con action = menu->addAction(QObject::tr("Create layer")); QObject::connect(action, &QAction::triggered, [this] { ContextMenu_NewLayer(); }); + AzToolsFramework::EntityIdList entities; + AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult( + entities, + &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); + SetupLayerContextMenu(menu); - AzToolsFramework::EntityIdSet flattenedSelection; - GetSelectedEntitiesSetWithFlattenedHierarchy(flattenedSelection); + AzToolsFramework::EntityIdSet flattenedSelection = AzToolsFramework::GetCulledEntityHierarchy(entities); AzToolsFramework::SetupAddToLayerMenu(menu, flattenedSelection, [this] { return ContextMenu_NewLayer(); }); SetupSliceContextMenu(menu); @@ -1220,10 +1224,14 @@ void SandboxIntegrationManager::CloneSelection(bool& handled) { AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework); - AzToolsFramework::EntityIdSet duplicationSet; - GetSelectedEntitiesSetWithFlattenedHierarchy(duplicationSet); + AzToolsFramework::EntityIdList entities; + AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult( + entities, + &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - if (duplicationSet.size() > 0) + AzToolsFramework::EntityIdSet duplicationSet = AzToolsFramework::GetCulledEntityHierarchy(entities); + + if (!duplicationSet.empty()) { AZStd::unordered_set clonedEntities; handled = AzToolsFramework::CloneInstantiatedEntities(duplicationSet, clonedEntities); diff --git a/Code/Tools/SceneAPI/FbxSDKWrapper/CMakeLists.txt b/Code/Tools/SceneAPI/FbxSDKWrapper/CMakeLists.txt index ac8af3fdaa..ddbabe604d 100644 --- a/Code/Tools/SceneAPI/FbxSDKWrapper/CMakeLists.txt +++ b/Code/Tools/SceneAPI/FbxSDKWrapper/CMakeLists.txt @@ -9,13 +9,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -set(sdkwrapper_dir ${CMAKE_CURRENT_LIST_DIR}/../SDKWrapper) - if (NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +set(sdkwrapper_dir ${CMAKE_CURRENT_LIST_DIR}/../SDKWrapper) ly_add_target( NAME FbxSDKWrapper STATIC diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp index 2f71ebcb78..9522512619 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp @@ -42,7 +42,108 @@ namespace AZ // Downstream only supports 30 frames per second sample rate. Adjusting to 60 doubles the // length of the animations, they still play back at 30 frames per second. - const double AssImpAnimationImporter::s_defaultTimeStepSampleRate = 1.0 / 30.0; + const double AssImpAnimationImporter::s_defaultTimeStepBetweenFrames = 1.0 / 30.0; + + AZ::u32 GetNumKeyFrames(AZ::u32 keysSize, double duration, double ticksPerSecond) + { + if (AZ::IsClose(ticksPerSecond, 0)) + { + AZ_Warning("AnimationImporter", false, "Animation ticks per second should not be zero, defaulting to %d keyframes for animation.", keysSize); + return keysSize; + } + const double totalTicks = duration / ticksPerSecond; + AZ::u32 numKeys = keysSize; + // +1 because the animation is from [0, duration] - we have a keyframe at the end of the duration which needs to be included + double totalFramesAtDefaultTimeStep = totalTicks / AssImpAnimationImporter::s_defaultTimeStepBetweenFrames + 1; + if (!AZ::IsClose(totalFramesAtDefaultTimeStep, numKeys, 1)) + { + numKeys = AZStd::ceilf(totalFramesAtDefaultTimeStep); + } + return numKeys; + } + + double GetTimeForFrame(AZ::u32 frame, double ticksPerSecond) + { + return frame * AssImpAnimationImporter::s_defaultTimeStepBetweenFrames * ticksPerSecond; + } + + // Helper class to store key data, when translating from AssImp layout to the engine's scene format. + struct KeyData + { + KeyData(float value, float time) : + mValue(value), + mTime(time) + { + + } + + bool operator<(const KeyData& other) const + { + return mTime < other.mTime; + } + + float mValue = 0; + float mTime = 0; + }; + + template + void LerpTemplate(T& start, const T& end, float t) + { + start = start * (1.0f - t) + end * t; + } + + template<> + void LerpTemplate(aiQuaternion& start, const aiQuaternion& end, float t) + { + aiQuaternion::Interpolate(start, start, end, t); + } + + template<> + void LerpTemplate(float& start, const float& end, float t) + { + start = AZ::Lerp(start, end, t); + } + + template + bool SampleKeyFrame(FrameValueType& result, const KeyContainerType& keys, AZ::u32 numKeys, double time, AZ::u32& lastIndex) + { + if (numKeys == 0) + { + AZ_Error("AnimationImporter", numKeys > 0, "Animation key set must have at least 1 key"); + return false; + } + if (numKeys == 1) + { + result = keys[0].mValue; + return true; + } + + while (lastIndex < numKeys - 1 && time >= keys[lastIndex + 1].mTime) + { + ++lastIndex; + } + result = keys[lastIndex].mValue; + if (lastIndex < numKeys - 1) + { + auto nextValue = keys[lastIndex + 1].mValue; + float normalizedTimeBetweenFrames = 0; + if (keys[lastIndex + 1].mTime != keys[lastIndex].mTime) + { + normalizedTimeBetweenFrames = + (time - keys[lastIndex].mTime) / (keys[lastIndex + 1].mTime - keys[lastIndex].mTime); + } + else + { + AZ_Warning("AnimationImporter", false, + "Animation has keys with duplicate time %5.5f, at indices %d and %d. The second will be ignored.", + keys[lastIndex].mTime, + lastIndex, + lastIndex + 1); + } + LerpTemplate(result, nextValue, normalizedTimeBetweenFrames); + } + return true; + } AssImpAnimationImporter::AssImpAnimationImporter() { @@ -199,6 +300,14 @@ namespace AZ for (AZ::u32 animIndex = 0; animIndex < scene->mNumAnimations; ++animIndex) { const aiAnimation* animation = scene->mAnimations[animIndex]; + if (animation->mTicksPerSecond == 0) + { + AZ_Error( + "AnimationImporter", false, + "Animation name %s has a sample rate of 0 ticks per second and cannot be processed.", + animation->mName.C_Str()); + return Events::ProcessingResult::Failure; + } mapAnimationsFunc(animation->mNumChannels, animation->mChannels, animation, boneAnimations); @@ -410,70 +519,38 @@ namespace AZ anim->mNumPositionKeys, anim->mNumRotationKeys, anim->mNumScalingKeys); return Events::ProcessingResult::Failure; } - - auto sampleKeyFrame = [](const auto& keys, AZ::u32 numKeys, double time, AZ::u32& lastIndex) - { - AZ_Error("AnimationImporter", numKeys > 0, "Animation key set must have at least 1 key"); - - if (numKeys == 1) - { - return keys[0].mValue; - } - - auto returnValue = keys[0].mValue; - - for (AZ::u32 keyIndex = lastIndex; keyIndex < numKeys; ++keyIndex) - { - const auto& key = keys[keyIndex]; - lastIndex = keyIndex; - - // We want to return the key that exactly matches the time if possible, otherwise we'll keep track of the previous time - // If we don't find an exact match and end up going past the desired time (or run out of keyframes) then we return the previous key - if (key.mTime < time) - { - returnValue = key.mValue; - } - else if (AZ::IsClose(key.mTime, time)) - { - return key.mValue; - } - else - { - return returnValue; - } - } - - return returnValue; - }; // Resample the animations at a fixed time step. This matches the behaviour of // the previous SDK used. Longer term, this could be data driven, or based on the // smallest time step between key frames. // AssImp has an animation->mTicksPerSecond and animation->mDuration, but those // are less predictable than just using a fixed time step. - const double duration = animation->mDuration / animation->mTicksPerSecond; + // AssImp documentation claims animation->mDuration is the duration of the animation in ticks, but + // not all animations we've tested follow that pattern. Sometimes duration is in seconds. + const AZ::u32 numKeyFrames = GetNumKeyFrames( + AZStd::max(AZStd::max(anim->mNumScalingKeys, anim->mNumPositionKeys), anim->mNumRotationKeys), + animation->mDuration, + animation->mTicksPerSecond); - AZ::u32 numKeyFrames = AZStd::max(AZStd::max(anim->mNumScalingKeys, anim->mNumPositionKeys), anim->mNumRotationKeys); - if (!AZ::IsClose(duration / s_defaultTimeStepSampleRate, numKeyFrames, 1)) - { - double dT = duration / s_defaultTimeStepSampleRate; - numKeyFrames = AZStd::ceilf(dT) + 1; // +1 because the animation is from [0, duration] - we have a keyframe at the end of the duration which needs to be included - } - AZStd::shared_ptr createdAnimationData = AZStd::make_shared(); createdAnimationData->ReserveKeyFrames(numKeyFrames); - createdAnimationData->SetTimeStepBetweenFrames(s_defaultTimeStepSampleRate); + createdAnimationData->SetTimeStepBetweenFrames(s_defaultTimeStepBetweenFrames); AZ::u32 lastScaleIndex = 0; AZ::u32 lastPositionIndex = 0; AZ::u32 lastRotationIndex = 0; for (AZ::u32 frame = 0; frame < numKeyFrames; ++frame) { - double time = frame * s_defaultTimeStepSampleRate * animation->mTicksPerSecond; - aiVector3D scale = sampleKeyFrame(anim->mScalingKeys, anim->mNumScalingKeys, time, lastScaleIndex); - aiVector3D position = sampleKeyFrame(anim->mPositionKeys, anim->mNumPositionKeys, time, lastPositionIndex); - aiQuaternion rotation = sampleKeyFrame(anim->mRotationKeys, anim->mNumRotationKeys, time, lastRotationIndex); + const double time = GetTimeForFrame(frame, animation->mTicksPerSecond); + aiVector3D scale = aiVector3D(1.f, 1.f, 1.f), position = aiVector3D(0.f, 0.f, 0.f); + aiQuaternion rotation(1.f, 0.f, 0.f, 0.f); + if (!SampleKeyFrame(scale, anim->mScalingKeys, anim->mNumScalingKeys, time, lastScaleIndex) || + !SampleKeyFrame(position, anim->mPositionKeys, anim->mNumPositionKeys, time, lastPositionIndex) || + !SampleKeyFrame(rotation, anim->mRotationKeys, anim->mNumRotationKeys, time, lastRotationIndex)) + { + return Events::ProcessingResult::Failure; + } aiMatrix4x4 transform(scale, rotation, position); @@ -520,28 +597,6 @@ namespace AZ // SetTimeStepBetweenFrames set on the animation data // Keyframes. Weights (Values in FBX SDK) per key time. // Keyframes generated for every single frame of the animation. - - // Helper class to store key data, when translating from AssImp layout to the engine's scene format. - struct KeyData - { - KeyData(float weight, float time) : - m_weight(weight), - m_time(time) - { - - } - - bool operator<(const KeyData& other) const - { - return m_time < other.m_time; - } - - // Naming in the previous SDK (FBX SDK) and in the engine's scene format - // doesn't match AssImp's naming convention. - // weight here is the AssImp's name for the data, it was named value in FBX SDK. - float m_weight = 0; - float m_time = 0; - }; typedef AZStd::map> ValueToKeyDataMap; ValueToKeyDataMap valueToKeyDataMap; @@ -562,44 +617,27 @@ namespace AZ { AZStd::shared_ptr morphAnimNode = AZStd::make_shared(); - morphAnimNode->ReserveKeyFrames(animation->mDuration + 1); - morphAnimNode->SetTimeStepBetweenFrames(1.0 / animation->mTicksPerSecond); + + const AZ::u32 numKeyFrames = GetNumKeyFrames(keys.size(), animation->mDuration, animation->mTicksPerSecond); + morphAnimNode->ReserveKeyFrames(numKeyFrames); + morphAnimNode->SetTimeStepBetweenFrames(s_defaultTimeStepBetweenFrames); aiAnimMesh* aiAnimMesh = mesh->mAnimMeshes[meshIdx]; AZStd::string_view nodeName(aiAnimMesh->mName.C_Str()); const AZ::u32 maxKeys = keys.size(); AZ::u32 keyIdx = 0; - for (AZ::u32 time = 0; time <= animation->mDuration; ++time) + for (AZ::u32 frame = 0; frame <= numKeyFrames; ++frame) { - if (keyIdx < maxKeys - 1 && time >= keys[keyIdx+1].m_time) - { - ++keyIdx; - } - float weight_value = keys[keyIdx].m_weight; - if (keyIdx < maxKeys - 1) - { - float nextWeight = keys[keyIdx+1].m_weight; - float normalizedTimeBetweenFrames = 0; + const double time = GetTimeForFrame(frame, animation->mTicksPerSecond); - if (keys[keyIdx + 1].m_time != keys[keyIdx].m_time) - { - normalizedTimeBetweenFrames = - (time - keys[keyIdx].m_time) / (keys[keyIdx + 1].m_time - keys[keyIdx].m_time); - } - else - { - AZ_Warning("AnimationImporter", false, - "Morph target mesh %s has keys with duplicate time, at indices %d and %d. The second will be ignored.", - nodeName.data(), - keyIdx, - keyIdx+1); - } - - // AssImp and FBX both only support linear interpolation for blend shapes. - weight_value = AZ::Lerp(weight_value, nextWeight, normalizedTimeBetweenFrames); + float weight = 0; + if (!SampleKeyFrame(weight, keys, keys.size(), time, keyIdx)) + { + return Events::ProcessingResult::Failure; } - morphAnimNode->AddKeyFrame(weight_value); + + morphAnimNode->AddKeyFrame(weight); } diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.h b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.h index 72180dea1a..3c06153d04 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.h +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.h @@ -45,7 +45,7 @@ namespace AZ const aiMeshMorphAnim* meshMorphAnim, const aiMesh* mesh); - static const double s_defaultTimeStepSampleRate; + static const double s_defaultTimeStepBetweenFrames; protected: static const char* s_animationNodeName; diff --git a/Code/Tools/SceneAPI/SceneCore/Containers/SceneGraph.cpp b/Code/Tools/SceneAPI/SceneCore/Containers/SceneGraph.cpp index 934b0154c9..87c265481f 100644 --- a/Code/Tools/SceneAPI/SceneCore/Containers/SceneGraph.cpp +++ b/Code/Tools/SceneAPI/SceneCore/Containers/SceneGraph.cpp @@ -43,7 +43,7 @@ namespace AZ AZ::BehaviorContext* behaviorContext = azrtti_cast(context); if (behaviorContext) { - behaviorContext->Class() + behaviorContext->Class("NodeIndex") ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Script::Attributes::Module, "scene.graph") ->Constructor<>() @@ -57,7 +57,7 @@ namespace AZ ->Attribute(AZ::Script::Attributes::Operator, AZ::Script::Attributes::OperatorType::ToString) ; - behaviorContext->Class() + behaviorContext->Class("SceneGraphName") ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Script::Attributes::Module, "scene.graph") ->Constructor() diff --git a/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.cpp b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.cpp index f6e5efd106..d4d2d0d67b 100644 --- a/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.cpp +++ b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.cpp @@ -48,7 +48,7 @@ namespace AWSClientAuth m_settingsRegistry = AZStd::make_shared(); AZStd::array resolvedPath{}; - AZ::IO::FileIOBase::GetInstance()->ResolvePath(settingsRegistryPath.data(), resolvedPath.data(), resolvedPath.size()); + fileIO->ResolvePath(settingsRegistryPath.data(), resolvedPath.data(), resolvedPath.size()); if (!m_settingsRegistry->MergeSettingsFile(resolvedPath.data(), AZ::SettingsRegistryInterface::Format::JsonMergePatch)) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/3rdParty/cubemapgen.json b/Gems/Atom/Asset/ImageProcessingAtom/3rdParty/cubemapgen.json deleted file mode 100644 index c5dc8a7486..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/3rdParty/cubemapgen.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "cubemapgen", - "source": "@GEM@/External/CubeMapGen", - "description": "CubeMapGen", - "defines": [], - "lib_required": "False", - "includes": [""] -} - diff --git a/Gems/Atom/Asset/ImageProcessingAtom/CMakeLists.txt b/Gems/Atom/Asset/ImageProcessingAtom/CMakeLists.txt index 7f322b615a..1126af2afa 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/CMakeLists.txt +++ b/Gems/Atom/Asset/ImageProcessingAtom/CMakeLists.txt @@ -10,6 +10,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty) - add_subdirectory(Code) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp index e30fb9c6a2..3b6c906c10 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp @@ -524,6 +524,10 @@ namespace ImageProcessingAtom { return outPreset; } + else + { + AZ_Warning("Image Processing", false, "Image dimensions are not compatible with preset '%s'. The default preset will be used.", presetInfo->m_name.c_str()); + } } //uncompressed one which could be used for almost everything diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp index 4de024c088..5d5fd21b44 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp @@ -79,7 +79,7 @@ namespace ImageProcessingAtom builderDescriptor.m_busId = azrtti_typeid(); builderDescriptor.m_createJobFunction = AZStd::bind(&ImageBuilderWorker::CreateJobs, &m_imageBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); builderDescriptor.m_processJobFunction = AZStd::bind(&ImageBuilderWorker::ProcessJob, &m_imageBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - builderDescriptor.m_version = 19; // [ATOM-14459] + builderDescriptor.m_version = 22; // [ATOM-14765] builderDescriptor.m_analysisFingerprint = ImageProcessingAtom::BuilderSettingManager::Instance()->GetAnalysisFingerprint(); m_imageBuilder.BusConnect(builderDescriptor.m_busId); AssetBuilderSDK::AssetBuilderBus::Broadcast(&AssetBuilderSDK::AssetBuilderBusTraits::RegisterBuilderInformation, builderDescriptor); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset index d81fefede2..c00185e255 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset @@ -11,6 +11,7 @@ "_basecolor", "_diff", "_color", + "_col", "_albedo", "_alb", "_bc", @@ -31,6 +32,7 @@ "FileMasks": [ "_diff", "_color", + "_col", "_albedo", "_alb", "_basecolor", @@ -51,6 +53,7 @@ "FileMasks": [ "_diff", "_color", + "_col", "_albedo", "_alb", "_basecolor", @@ -71,6 +74,7 @@ "FileMasks": [ "_diff", "_color", + "_col", "_albedo", "_alb", "_basecolor", @@ -91,6 +95,7 @@ "FileMasks": [ "_diff", "_color", + "_col", "_albedo", "_alb", "_basecolor", diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset index 222a1d4c7b..6b1197e28d 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset @@ -9,7 +9,10 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_ao" + "_ao", + "_ambocc", + "_amb", + "_ambientocclusion" ], "PixelFormat": "BC4" }, @@ -33,7 +36,10 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_ao" + "_ao", + "_ambocc", + "_amb", + "_ambientocclusion" ], "PixelFormat": "EAC_R11" }, @@ -43,7 +49,10 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_ao" + "_ao", + "_ambocc", + "_amb", + "_ambientocclusion" ], "PixelFormat": "BC4" }, @@ -53,7 +62,10 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_ao" + "_ao", + "_ambocc", + "_amb", + "_ambientocclusion" ], "PixelFormat": "BC4" } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset index 1cac9c1d3a..569ff6ce23 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset @@ -9,12 +9,20 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_displ" + "_displ", + "_disp", + "_dsp", + "_d", + "_dm", + "_displacement", + "_height", + "_hm", + "_ht", + "_h" ], "PixelFormat": "BC4", "DiscardAlpha": true, "IsPowerOf2": true, - "Swizzle": "aaa1", "MipMapSetting": { "MipGenType": "Box" } @@ -26,13 +34,21 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_displ" + "_displ", + "_disp", + "_dsp", + "_d", + "_dm", + "_displacement", + "_height", + "_hm", + "_ht", + "_h" ], "PixelFormat": "EAC_R11", "DiscardAlpha": true, "IsPowerOf2": true, "SizeReduceLevel": 3, - "Swizzle": "aaa1", "MipMapSetting": { "MipGenType": "Box" } @@ -57,7 +73,6 @@ "PixelFormat": "EAC_R11", "DiscardAlpha": true, "IsPowerOf2": true, - "Swizzle": "aaa1", "MipMapSetting": { "MipGenType": "Box" } @@ -68,12 +83,20 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_displ" + "_displ", + "_disp", + "_dsp", + "_d", + "_dm", + "_displacement", + "_height", + "_hm", + "_ht", + "_h" ], "PixelFormat": "BC4", "DiscardAlpha": true, "IsPowerOf2": true, - "Swizzle": "aaa1", "MipMapSetting": { "MipGenType": "Box" } @@ -84,12 +107,20 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_displ" + "_displ", + "_disp", + "_dsp", + "_d", + "_dm", + "_displacement", + "_height", + "_hm", + "_ht", + "_h" ], "PixelFormat": "BC4", "DiscardAlpha": true, "IsPowerOf2": true, - "Swizzle": "aaa1", "MipMapSetting": { "MipGenType": "Box" } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset index d3290eb469..5dc75397a0 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset @@ -8,7 +8,11 @@ "Name": "Emissive", "RGB_Weight": "CIEXYZ", "FileMasks": [ - "_emissive" + "_emissive", + "_e", + "_glow", + "_em", + "_emit" ], "PixelFormat": "BC7", "DiscardAlpha": true @@ -33,7 +37,11 @@ "Name": "Emissive", "RGB_Weight": "CIEXYZ", "FileMasks": [ - "_emissive" + "_emissive", + "_e", + "_glow", + "_em", + "_emit" ], "PixelFormat": "ASTC_6x6", "DiscardAlpha": true @@ -43,7 +51,11 @@ "Name": "Emissive", "RGB_Weight": "CIEXYZ", "FileMasks": [ - "_emissive" + "_emissive", + "_e", + "_glow", + "_em", + "_emit" ], "PixelFormat": "BC7", "DiscardAlpha": true @@ -53,7 +65,11 @@ "Name": "Emissive", "RGB_Weight": "CIEXYZ", "FileMasks": [ - "_emissive" + "_emissive", + "_e", + "_glow", + "_em", + "_emit" ], "PixelFormat": "BC7", "DiscardAlpha": true diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset index 867fc73959..fef756e354 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset @@ -27,7 +27,7 @@ }, "PlatformsPresets": { "es3": { - "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", + "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", "FileMasks": [ "_iblskyboxcm" @@ -61,7 +61,7 @@ "MinTextureSize": 256, "IsPowerOf2": true, "CubemapSettings": { - "RequiresConvolve": false, + "RequiresConvolve": false, "GenerateIBLSpecular": true, "IBLSpecularPreset": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "GenerateIBLDiffuse": true, @@ -69,7 +69,7 @@ } }, "osx_gl": { - "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", + "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", "FileMasks": [ "_iblskyboxcm" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset index 363a6f9f9d..66927b175c 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset @@ -9,7 +9,8 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_layers" + "_layers", + "_rgbmask" ], "PixelFormat": "R8G8B8X8" }, @@ -20,7 +21,8 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_layers" + "_layers", + "_rgbmask" ], "PixelFormat": "R8G8B8X8" }, @@ -30,7 +32,8 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_layers" + "_layers", + "_rgbmask" ], "PixelFormat": "R8G8B8X8" }, @@ -40,7 +43,8 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_layers" + "_layers", + "_rgbmask" ], "PixelFormat": "R8G8B8X8" }, @@ -50,7 +54,8 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_layers" + "_layers", + "_rgbmask" ], "PixelFormat": "R8G8B8X8" } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset index fb8b1da6a4..2c61d6f5a6 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset @@ -9,7 +9,11 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_ddna" + "_ddna", + "_normala", + "_nrma", + "_nma", + "_na" ], "PixelFormat": "BC5s", "PixelFormatAlpha": "BC4", @@ -48,7 +52,11 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_ddna" + "_ddna", + "_normala", + "_nrma", + "_nma", + "_na" ], "PixelFormat": "ASTC_4x4", "PixelFormatAlpha": "ASTC_4x4", @@ -65,7 +73,11 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_ddna" + "_ddna", + "_normala", + "_nrma", + "_nma", + "_na" ], "PixelFormat": "BC5s", "PixelFormatAlpha": "BC4", @@ -82,7 +94,11 @@ "SourceColor": "Linear", "DestColor": "Linear", "FileMasks": [ - "_ddna" + "_ddna", + "_normala", + "_nrma", + "_nma", + "_na" ], "PixelFormat": "BC5s", "PixelFormatAlpha": "BC4", diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset index bd9299d71d..79fb235508 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset @@ -11,7 +11,14 @@ "FileMasks": [ "_sss", "_trans", - "_opac" + "_opac", + "_opacity", + "_o", + "_opac", + "_op", + "_mask", + "_msk", + "_blend" ], "PixelFormat": "BC4", "IsPowerOf2": true, @@ -28,7 +35,14 @@ "FileMasks": [ "_sss", "_trans", - "_opac" + "_opac", + "_opacity", + "_o", + "_opac", + "_op", + "_mask", + "_msk", + "_blend" ], "PixelFormat": "EAC_R11", "IsPowerOf2": true, @@ -67,7 +81,14 @@ "FileMasks": [ "_sss", "_trans", - "_opac" + "_opac", + "_opacity", + "_o", + "_opac", + "_op", + "_mask", + "_msk", + "_blend" ], "PixelFormat": "BC4", "IsPowerOf2": true, @@ -83,7 +104,14 @@ "FileMasks": [ "_sss", "_trans", - "_opac" + "_opac", + "_opacity", + "_o", + "_opac", + "_op", + "_mask", + "_msk", + "_blend" ], "PixelFormat": "BC4", "IsPowerOf2": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset index ca773debbb..7a6af50728 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset @@ -24,7 +24,8 @@ "_mt", "_metalness", "_metallic", - "_roughness" + "_roughness", + "_rough" ], "PixelFormat": "BC1", "IsPowerOf2": true, @@ -53,7 +54,8 @@ "_mt", "_metalness", "_metallic", - "_roughness" + "_roughness", + "_rough" ], "PixelFormat": "ETC2", "IsPowerOf2": true, @@ -81,7 +83,8 @@ "_mt", "_metalness", "_metallic", - "_roughness" + "_roughness", + "_rough" ], "PixelFormat": "ASTC_6x6", "IsPowerOf2": true, @@ -109,7 +112,8 @@ "_mt", "_metalness", "_metallic", - "_roughness" + "_roughness", + "_rough" ], "PixelFormat": "BC1", "IsPowerOf2": true, @@ -137,7 +141,8 @@ "_mt", "_metalness", "_metallic", - "_roughness" + "_roughness", + "_rough" ], "PixelFormat": "BC1", "IsPowerOf2": true, diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp index 1e3c7b6759..3572fb72ae 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp @@ -407,17 +407,20 @@ namespace AZ const auto& jobParameters = request.m_jobDescription.m_jobParameters; if (jobParameters.find(ShaderVariantLoadErrorParam) != jobParameters.end()) { - if (jobParameters.find(ShouldExitEarlyFromProcessJobParam) != jobParameters.end()) - { - AZ_TracePrintf(ShaderVariantAssetBuilderName, "Doing nothing on behalf of [%s] because it's been overriden by game project.", jobParameters.at(ShaderVariantLoadErrorParam).c_str()); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - return; - } AZ_Error(ShaderVariantAssetBuilderName, false, "Error during CreateJobs: %s", jobParameters.at(ShaderVariantLoadErrorParam).c_str()); response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed; return; } + if (jobParameters.find(ShouldExitEarlyFromProcessJobParam) != jobParameters.end()) + { + AZ_TracePrintf( + ShaderVariantAssetBuilderName, "Doing nothing on behalf of [%s] because it's been overriden by game project.", + jobParameters.at(ShaderVariantLoadErrorParam).c_str()); + response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; + return; + } + AssetBuilderSDK::JobCancelListener jobCancelListener(request.m_jobId); if (jobCancelListener.IsCancelled()) { diff --git a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridClassification.pass b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridClassification.pass new file mode 100644 index 0000000000..c50890dac2 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridClassification.pass @@ -0,0 +1,11 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "PassAsset", + "ClassData": { + "PassTemplate": { + "Name": "DiffuseProbeGridClassificationPassTemplate", + "PassClass": "DiffuseProbeGridClassificationPass" + } + } +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridUpdate.pass b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridUpdate.pass index 3d4057f6df..6852cc2d1a 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridUpdate.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridUpdate.pass @@ -26,6 +26,10 @@ { "Name": "DiffuseProbeGridRelocationPass", "TemplateName": "DiffuseProbeGridRelocationPassTemplate" + }, + { + "Name": "DiffuseProbeGridClassificationPass", + "TemplateName": "DiffuseProbeGridClassificationPassTemplate" } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardMSAA.pass b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardMSAA.pass index 60de5e10b9..aa422aa227 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardMSAA.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardMSAA.pass @@ -49,11 +49,6 @@ "IsArray": 1 } }, - { - "Name": "DepthStencilInputOutput", - "SlotType": "InputOutput", - "ScopeAttachmentUsage": "DepthStencil" - }, { "Name": "TileLightData", "SlotType": "Input", @@ -66,6 +61,13 @@ "ShaderInputName": "m_lightListRemapped", "ScopeAttachmentUsage": "Shader" }, + // Input/Outputs... + { + "Name": "DepthStencilInputOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "DepthStencil" + }, + // Outputs... { "Name": "DiffuseOutput", "SlotType": "Output", @@ -222,11 +224,12 @@ "Attachment": "Output" } }, + "MultisampleSource": { + "Pass": "This", + "Attachment": "DepthStencilInputOutput" + }, "ImageDescriptor": { "Format": "R8G8B8A8_UNORM", - "MultisampleState": { - "samples": 4 - }, "SharedQueueMask": "Graphics" } }, diff --git a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapPipeline.pass b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapPipeline.pass index 79a42b11f7..0e2fb93359 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapPipeline.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapPipeline.pass @@ -9,7 +9,8 @@ "Slots": [ { "Name": "Output", - "SlotType": 2 + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "RenderTarget" } ], "PassRequests": [ @@ -101,13 +102,8 @@ ] }, { - "Name": "DepthMSAAPass", - "TemplateName": "EnvironmentCubeMapDepthMSAAPassTemplate", - "PassData": { - "$type": "RasterPassData", - "DrawListTag": "depth", - "PipelineViewTag": "MainCamera" - }, + "Name": "DepthPrePass", + "TemplateName": "DepthMSAAParentTemplate", "Connections": [ { "LocalSlot": "SkinnedMeshes", @@ -115,70 +111,11 @@ "Pass": "SkinningPass", "Attachment": "SkinnedMeshOutputStream" } - } - ] - }, - // The light culling system can do highly accurate culling of transparent objects but it needs - // more depth information than the opaque geometry pass can provide - // Specifically the minimum and maximum depth of transparent objects - { - "Name": "DepthTransparentMinPass", - "TemplateName": "DepthPassTemplate", - "PassData": { - "$type": "RasterPassData", - "DrawListTag": "depthTransparentMin", - "PipelineViewTag": "MainCamera" - }, - "Connections": [ - { - "LocalSlot": "SkinnedMeshes", - "AttachmentRef": { - "Pass": "SkinningPass", - "Attachment": "SkinnedMeshOutputStream" - } - } - ] - }, - { - "Name": "DepthTransparentMaxPass", - "TemplateName": "DepthMaxPassTemplate", - "PassData": { - "$type": "RasterPassData", - "DrawListTag": "depthTransparentMax", - "PipelineViewTag": "MainCamera" - }, - "Connections": [ - { - "LocalSlot": "SkinnedMeshes", - "AttachmentRef": { - "Pass": "SkinningPass", - "Attachment": "SkinnedMeshOutputStream" - } - } - ] - }, - { - "Name": "LightCullingTilePreparePass", - "TemplateName": "LightCullingTilePrepareMSAATemplate", - "Connections": [ - { - "LocalSlot": "Depth", - "AttachmentRef": { - "Pass": "DepthMSAAPass", - "Attachment": "Output" - } }, { - "LocalSlot": "DepthTransparentMin", + "LocalSlot": "SwapChainOutput", "AttachmentRef": { - "Pass": "DepthTransparentMinPass", - "Attachment": "Output" - } - }, - { - "LocalSlot": "DepthTransparentMax", - "AttachmentRef": { - "Pass": "DepthTransparentMaxPass", + "Pass": "Parent", "Attachment": "Output" } } @@ -186,40 +123,27 @@ }, { "Name": "LightCullingPass", - "TemplateName": "LightCullingTemplate", + "TemplateName": "LightCullingParentTemplate", "Connections": [ { - "LocalSlot": "TileLightData", + "LocalSlot": "SkinnedMeshes", "AttachmentRef": { - "Pass": "LightCullingTilePreparePass", - "Attachment": "TileLightData" - } - } - ] - }, - { - "Name": "LightCullingRemapPass", - "TemplateName": "LightCullingRemapTemplate", - "Connections": [ - { - "LocalSlot": "TileLightData", - "AttachmentRef": { - "Pass": "LightCullingTilePreparePass", - "Attachment": "TileLightData" + "Pass": "SkinningPass", + "Attachment": "SkinnedMeshOutputStream" } }, { - "LocalSlot": "LightCount", + "LocalSlot": "DepthMSAA", "AttachmentRef": { - "Pass": "LightCullingPass", - "Attachment": "LightCount" + "Pass": "DepthPrePass", + "Attachment": "DepthMSAA" } }, { - "LocalSlot": "LightList", + "LocalSlot": "SwapChainOutput", "AttachmentRef": { - "Pass": "LightCullingPass", - "Attachment": "LightList" + "Pass": "Parent", + "Attachment": "Output" } } ] @@ -259,21 +183,21 @@ { "LocalSlot": "DepthStencilInputOutput", "AttachmentRef": { - "Pass": "DepthMSAAPass", - "Attachment": "Output" + "Pass": "DepthPrePass", + "Attachment": "DepthMSAA" } }, { "LocalSlot": "TileLightData", "AttachmentRef": { - "Pass": "LightCullingRemapPass", + "Pass": "LightCullingPass", "Attachment": "TileLightData" } }, { "LocalSlot": "LightListRemapped", "AttachmentRef": { - "Pass": "LightCullingRemapPass", + "Pass": "LightCullingPass", "Attachment": "LightListRemapped" } } diff --git a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapSkyBox.pass b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapSkyBox.pass index b16cd1cbcc..4c74f9e967 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapSkyBox.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapSkyBox.pass @@ -32,11 +32,12 @@ "Attachment": "SpecularInputOutput" } }, + "MultisampleSource": { + "Pass": "This", + "Attachment": "SpecularInputOutput" + }, "ImageDescriptor": { "Format": "R16G16B16A16_FLOAT", - "MultisampleState": { - "samples": 4 - }, "SharedQueueMask": "Graphics" } } diff --git a/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset b/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset index 3cedd78210..29ccb1db09 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset +++ b/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset @@ -416,6 +416,10 @@ "Name": "DiffuseProbeGridRelocationPassTemplate", "Path": "Passes/DiffuseProbeGridRelocation.pass" }, + { + "Name": "DiffuseProbeGridClassificationPassTemplate", + "Path": "Passes/DiffuseProbeGridClassification.pass" + }, { "Name": "DiffuseGlobalIlluminationPassTemplate", "Path": "Passes/DiffuseGlobalIllumination.pass" diff --git a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli index 2025e3b81b..0aeb43bcf2 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli @@ -18,7 +18,7 @@ partial ShaderResourceGroup RayTracingSceneSrg { RaytracingAccelerationStructure m_scene; - // directional Lights + // directional lights struct DirectionalLight { float3 m_direction; @@ -30,7 +30,33 @@ partial ShaderResourceGroup RayTracingSceneSrg StructuredBuffer m_directionalLights; uint m_directionalLightCount; - // point Lights + // simple point lights + struct SimplePointLight + { + float3 m_position; + float m_invAttenuationRadiusSquared; // For a radius at which this light no longer has an effect, 1 / radius^2. + float3 m_rgbIntensityCandelas; + float m_padding; // explicit padding. + }; + + StructuredBuffer m_simplePointLights; + uint m_simplePointLightCount; + + // simple spot lights + struct SimpleSpotLight + { + float3 m_position; + float m_invAttenuationRadiusSquared; // For a radius at which this light no longer has an effect, 1 / radius^2. + float3 m_direction; + float m_cosInnerConeAngle; // cosine of the outer cone angle + float3 m_rgbIntensityCandelas; + float m_cosOuterConeAngle; // cosine of the inner cone angle + }; + + StructuredBuffer m_simpleSpotLights; + uint m_simpleSpotLightCount; + + // point lights (sphere) struct PointLight { float3 m_position; @@ -42,7 +68,7 @@ partial ShaderResourceGroup RayTracingSceneSrg StructuredBuffer m_pointLights; uint m_pointLightCount; - // disk Lights + // disk lights struct DiskLight { float3 m_position; @@ -60,7 +86,7 @@ partial ShaderResourceGroup RayTracingSceneSrg StructuredBuffer m_diskLights; uint m_diskLightCount; - // capsule Lights + // capsule lights struct CapsuleLight { float3 m_startPoint; // one of the end points of the capsule @@ -74,7 +100,7 @@ partial ShaderResourceGroup RayTracingSceneSrg StructuredBuffer m_capsuleLights; uint m_capsuleLightCount; - // quad Lights + // quad lights struct QuadLight { float3 m_position; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.precompiledshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.precompiledshader new file mode 100644 index 0000000000..e7b15190e5 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.precompiledshader @@ -0,0 +1,32 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "PrecompiledShaderAssetSourceData", + "ClassData": + { + "ShaderAssetFileName": "diffuseprobegridclassification.azshader", + "PlatformIdentifiers": + [ + "pc" + ], + "ShaderResourceGroupAssets": + [ + "diffuseprobegridclassification_passsrg.azsrg" + ], + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification_null_0.azshadervariant" + } + ] + } +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader index ae07080eba..4a5edc370b 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant index dbd3c9ee71..e362a352c2 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant index 575eb94769..17b4f0c3cb 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_passsrg.azsrg b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_passsrg.azsrg index c050a315a1..45c0fc7efb 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_passsrg.azsrg +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_passsrg.azsrg @@ -136,6 +136,44 @@ "value": "1" } ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] } ] }, @@ -203,6 +241,26 @@ "value": "2" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] } ] }, @@ -221,7 +279,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -318,6 +376,34 @@ ] } ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] } ] } @@ -2691,7 +2777,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "10722138557170830784" + "value": "13399614758886099705" } ] } @@ -2818,6 +2904,44 @@ "value": "1" } ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] } ] }, @@ -2885,6 +3009,26 @@ "value": "2" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] } ] }, @@ -2903,7 +3047,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -3000,6 +3144,34 @@ ] } ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] } ] } @@ -5373,7 +5545,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "10722138557170830784" + "value": "13399614758886099705" } ] } @@ -5500,6 +5672,44 @@ "value": "1" } ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] } ] }, @@ -5567,6 +5777,26 @@ "value": "2" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] } ] }, @@ -5585,7 +5815,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -5682,6 +5912,34 @@ ] } ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] } ] } @@ -5766,7 +6024,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5798,7 +6056,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5830,7 +6088,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5862,7 +6120,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5894,7 +6152,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5926,7 +6184,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5958,7 +6216,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5990,7 +6248,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6022,7 +6280,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6054,7 +6312,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6086,7 +6344,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6118,7 +6376,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6150,7 +6408,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6182,7 +6440,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6214,7 +6472,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6246,7 +6504,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6278,7 +6536,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6310,7 +6568,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6342,7 +6600,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6374,7 +6632,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6406,7 +6664,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6438,7 +6696,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6470,7 +6728,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6502,7 +6760,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6534,7 +6792,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6566,7 +6824,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6598,7 +6856,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6630,7 +6888,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] } @@ -8011,7 +8269,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "2959428625184507101" + "value": "8603598590297091788" } ] } @@ -8055,7 +8313,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "6463331605863849001" + "value": "6181996982157220722" } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant index d2fa9789ef..8ed12bf81c 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader index 3eb4955132..f0bfc085cb 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant index 4ce4dbbe63..c51aec01bb 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant index 594cb48e02..912946db79 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_passsrg.azsrg b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_passsrg.azsrg index 062882a45b..4b7667c981 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_passsrg.azsrg +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_passsrg.azsrg @@ -136,6 +136,44 @@ "value": "1" } ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] } ] }, @@ -203,6 +241,26 @@ "value": "2" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] } ] }, @@ -221,7 +279,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -318,6 +376,34 @@ ] } ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] } ] } @@ -2691,7 +2777,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "2253369087368484601" + "value": "4760130259633911968" } ] } @@ -2818,6 +2904,44 @@ "value": "1" } ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] } ] }, @@ -2885,6 +3009,26 @@ "value": "2" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] } ] }, @@ -2903,7 +3047,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -3000,6 +3144,34 @@ ] } ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] } ] } @@ -5373,7 +5545,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "2253369087368484601" + "value": "4760130259633911968" } ] } @@ -5500,6 +5672,44 @@ "value": "1" } ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] } ] }, @@ -5567,6 +5777,26 @@ "value": "2" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] } ] }, @@ -5585,7 +5815,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -5682,6 +5912,34 @@ ] } ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] } ] } @@ -5766,7 +6024,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5798,7 +6056,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5830,7 +6088,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5862,7 +6120,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5894,7 +6152,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5926,7 +6184,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5958,7 +6216,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -5990,7 +6248,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6022,7 +6280,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6054,7 +6312,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6086,7 +6344,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6118,7 +6376,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6150,7 +6408,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6182,7 +6440,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6214,7 +6472,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6246,7 +6504,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6278,7 +6536,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6310,7 +6568,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6342,7 +6600,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6374,7 +6632,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6406,7 +6664,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6438,7 +6696,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6470,7 +6728,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6502,7 +6760,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6534,7 +6792,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6566,7 +6824,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6598,7 +6856,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6630,7 +6888,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] } @@ -8011,7 +8269,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "2959428625184507101" + "value": "8603598590297091788" } ] } @@ -8055,7 +8313,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "1715809227613203910" + "value": "15482970526060535234" } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant index 7178a643b1..7e790aa0f1 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader index f2d6a2e169..d70f7ac139 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant index 16d5486bc2..8d904928c9 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant index 2b6f721009..7b48ea0631 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant index 5dfb42f212..3c2b178ac2 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader index 3fabad6385..a817f1dd82 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant index 5555d90646..7335bfca4d 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant index f1eca35745..4c967f5e97 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant index 4f9d140b86..46f9f92877 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader new file mode 100644 index 0000000000..39322fc484 Binary files /dev/null and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant new file mode 100644 index 0000000000..29125865a1 Binary files /dev/null and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant new file mode 100644 index 0000000000..58124203ee Binary files /dev/null and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_passsrg.azsrg b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_passsrg.azsrg new file mode 100644 index 0000000000..a435420d2b --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_passsrg.azsrg @@ -0,0 +1,8071 @@ +{ + "name": "ObjectStream", + "version": 3, + "Objects": [ + { + "typeName": "ShaderResourceGroupAsset", + "typeId": "{F8C9F4AE-3F6A-45AD-B4FB-0CA415FCC2E1}", + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "PassSrg" + }, + { + "field": "m_perAPILayout", + "typeName": "AZStd::vector", + "typeId": "{D41FAB43-0CAA-5170-B2BF-9D547C097E4F}", + "Objects": [ + { + "field": "element", + "typeName": "AZStd::pair", + "typeId": "{5C6406C8-77C9-597F-A3E9-249628D94902}", + "Objects": [ + { + "field": "value1", + "typeName": "Crc32", + "typeId": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "Objects": [ + { + "field": "Value", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3244871826" + } + ] + }, + { + "field": "value2", + "typeName": "AZStd::intrusive_ptr", + "typeId": "{FF05CAD3-238F-5E19-8FF2-083353BBEC47}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderResourceGroupLayout", + "typeId": "{1F92C651-9B83-4379-AB5C-5201F1B2C278}", + "version": 6, + "Objects": [ + { + "field": "m_staticSamplers", + "typeName": "AZStd::vector", + "typeId": "{D3BC4729-3DE0-57A1-96E0-DCFF98D4D975}" + }, + { + "field": "m_inputsForBuffers", + "typeName": "AZStd::vector", + "typeId": "{A4650430-04B9-589A-991F-4B443DCD20EA}" + }, + { + "field": "m_inputsForImages", + "typeName": "AZStd::vector", + "typeId": "{909BE4D8-5A22-59A4-A135-4E73662E2D83}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeRayTrace" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + }, + { + "field": "m_inputsForBufferUnboundedArrays", + "typeName": "AZStd::vector", + "typeId": "{DD5102EE-72A9-55F7-AB54-14F228FAE38F}" + }, + { + "field": "m_inputsForImageUnboundedArrays", + "typeName": "AZStd::vector", + "typeId": "{8042FF1E-9115-53F7-BE33-3DCDE9C0AB7F}" + }, + { + "field": "m_inputsForSamplers", + "typeName": "AZStd::vector", + "typeId": "{4CF286E1-5297-581D-93E9-891166EDAD9A}" + }, + { + "field": "m_intervalsForBuffers", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}" + }, + { + "field": "m_intervalsForImages", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}", + "Objects": [ + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] + }, + { + "field": "m_intervalsForSamplers", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}" + }, + { + "field": "m_groupSizeForBuffers", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForImages", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_groupSizeForBufferUnboundedArrays", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForImageUnboundedArrays", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForSamplers", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_idReflectionForBuffers", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{A85E274A-4C1D-546F-B18C-452C5700BAE4}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{F4529C0B-A2C0-5A32-A348-59D45FB1776B}" + } + ] + }, + { + "field": "m_idReflectionForImages", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{BB6D1ABE-9A2F-5F51-93CB-B1B866EFD5B4}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{BBD5D625-992D-5296-A631-9B84B00CE2F1}", + "Objects": [ + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeRayTrace" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + } + ] + } + ] + }, + { + "field": "m_idReflectionForBufferUnboundedArrays", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{46520159-BC56-5E90-89AD-3CB0A5D295B0}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{CD6D3195-A87A-5E0C-AD4D-23457B3B8DCF}" + } + ] + }, + { + "field": "m_idReflectionForImageUnboundedArrays", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{A33C41AC-ABA0-5A34-9A6B-89BABDC151D7}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{14C5FF00-B370-575F-866B-B19B97F76D82}" + } + ] + }, + { + "field": "m_idReflectionForSamplers", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{2665EED7-CFB4-582B-B265-107348B1DFAC}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{1545A615-BFD7-515C-A1E9-710570135F08}" + } + ] + }, + { + "field": "m_constantsDataLayout", + "typeName": "AZStd::intrusive_ptr", + "typeId": "{CEB3049A-A620-56C8-AFBA-D0A98304333D}", + "Objects": [ + { + "field": "element", + "typeName": "ConstantsLayout", + "typeId": "{66EDAC32-7730-4F05-AF9D-B3CB0F5D90E0}", + "Objects": [ + { + "field": "m_inputs", + "typeName": "AZStd::vector", + "typeId": "{5FC25C85-DF2F-5219-918C-EBC47D7D6451}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.origin" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.numRaysPerProbe" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridSpacing" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMaxRayDistance" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridCounts" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeDistanceExponent" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeHysteresis" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeChangeThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBrightnessThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeIrradianceEncodingGamma" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeInverseIrradianceEncodingGamma" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumIrradianceTexels" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumDistanceTexels" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.normalBias" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.viewBias" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeVariablePad0" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeRayRotationTransform" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.volumeMovementType" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeScrollOffsets" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBackfaceThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMinFrontfaceDistance" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "8" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[0]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[1]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[2]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[3]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + } + ] + }, + { + "field": "m_idReflection", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{7DE7E4B8-5C98-5F7A-985F-DDEEA5BB5366}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{4B54CC87-1340-5B29-8040-2003033F9B93}", + "Objects": [ + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMinFrontfaceDistance" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "20" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumDistanceTexels" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "27" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeInverseIrradianceEncodingGamma" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "10" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "26" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeScrollOffsets" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "18" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeIrradianceEncodingGamma" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "9" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.normalBias" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "13" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBrightnessThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "8" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeHysteresis" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "6" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeRayRotationTransform" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[2]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "24" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[3]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "25" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[0]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "22" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[1]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "23" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeChangeThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "7" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "21" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.origin" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.numRaysPerProbe" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridSpacing" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBackfaceThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "19" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMaxRayDistance" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumIrradianceTexels" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "11" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridCounts" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeVariablePad0" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "15" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.volumeMovementType" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "17" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeDistanceExponent" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "5" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.viewBias" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "14" + } + ] + } + ] + } + ] + } + ] + }, + { + "field": "m_intervals", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}", + "Objects": [ + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + } + ] + }, + { + "field": "m_sizeInBytes", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + }, + { + "field": "m_hash", + "typeName": "AZ::u64", + "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "value": "7181601620235669059" + } + ] + } + ] + }, + { + "field": "m_bindingSlot", + "typeName": "AZ::RHI::Handle", + "typeId": "{1811456D-0C3D-58C8-ACE8-FD47F4E80E25}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] + }, + { + "field": "m_shaderVariantKeyFallbackSize", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_shaderVariantKeyFallbackConstantIndex", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4294967295" + } + ] + }, + { + "field": "m_hash", + "typeName": "AZ::u64", + "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "value": "10614022793008117732" + } + ] + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZStd::pair", + "typeId": "{5C6406C8-77C9-597F-A3E9-249628D94902}", + "Objects": [ + { + "field": "value1", + "typeName": "Crc32", + "typeId": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "Objects": [ + { + "field": "Value", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "634125391" + } + ] + }, + { + "field": "value2", + "typeName": "AZStd::intrusive_ptr", + "typeId": "{FF05CAD3-238F-5E19-8FF2-083353BBEC47}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderResourceGroupLayout", + "typeId": "{1F92C651-9B83-4379-AB5C-5201F1B2C278}", + "version": 6, + "Objects": [ + { + "field": "m_staticSamplers", + "typeName": "AZStd::vector", + "typeId": "{D3BC4729-3DE0-57A1-96E0-DCFF98D4D975}" + }, + { + "field": "m_inputsForBuffers", + "typeName": "AZStd::vector", + "typeId": "{A4650430-04B9-589A-991F-4B443DCD20EA}" + }, + { + "field": "m_inputsForImages", + "typeName": "AZStd::vector", + "typeId": "{909BE4D8-5A22-59A4-A135-4E73662E2D83}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeRayTrace" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + }, + { + "field": "m_inputsForBufferUnboundedArrays", + "typeName": "AZStd::vector", + "typeId": "{DD5102EE-72A9-55F7-AB54-14F228FAE38F}" + }, + { + "field": "m_inputsForImageUnboundedArrays", + "typeName": "AZStd::vector", + "typeId": "{8042FF1E-9115-53F7-BE33-3DCDE9C0AB7F}" + }, + { + "field": "m_inputsForSamplers", + "typeName": "AZStd::vector", + "typeId": "{4CF286E1-5297-581D-93E9-891166EDAD9A}" + }, + { + "field": "m_intervalsForBuffers", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}" + }, + { + "field": "m_intervalsForImages", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}", + "Objects": [ + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] + }, + { + "field": "m_intervalsForSamplers", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}" + }, + { + "field": "m_groupSizeForBuffers", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForImages", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_groupSizeForBufferUnboundedArrays", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForImageUnboundedArrays", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForSamplers", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_idReflectionForBuffers", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{A85E274A-4C1D-546F-B18C-452C5700BAE4}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{F4529C0B-A2C0-5A32-A348-59D45FB1776B}" + } + ] + }, + { + "field": "m_idReflectionForImages", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{BB6D1ABE-9A2F-5F51-93CB-B1B866EFD5B4}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{BBD5D625-992D-5296-A631-9B84B00CE2F1}", + "Objects": [ + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeRayTrace" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + } + ] + } + ] + }, + { + "field": "m_idReflectionForBufferUnboundedArrays", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{46520159-BC56-5E90-89AD-3CB0A5D295B0}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{CD6D3195-A87A-5E0C-AD4D-23457B3B8DCF}" + } + ] + }, + { + "field": "m_idReflectionForImageUnboundedArrays", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{A33C41AC-ABA0-5A34-9A6B-89BABDC151D7}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{14C5FF00-B370-575F-866B-B19B97F76D82}" + } + ] + }, + { + "field": "m_idReflectionForSamplers", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{2665EED7-CFB4-582B-B265-107348B1DFAC}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{1545A615-BFD7-515C-A1E9-710570135F08}" + } + ] + }, + { + "field": "m_constantsDataLayout", + "typeName": "AZStd::intrusive_ptr", + "typeId": "{CEB3049A-A620-56C8-AFBA-D0A98304333D}", + "Objects": [ + { + "field": "element", + "typeName": "ConstantsLayout", + "typeId": "{66EDAC32-7730-4F05-AF9D-B3CB0F5D90E0}", + "Objects": [ + { + "field": "m_inputs", + "typeName": "AZStd::vector", + "typeId": "{5FC25C85-DF2F-5219-918C-EBC47D7D6451}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.origin" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.numRaysPerProbe" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridSpacing" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMaxRayDistance" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridCounts" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeDistanceExponent" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeHysteresis" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeChangeThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBrightnessThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeIrradianceEncodingGamma" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeInverseIrradianceEncodingGamma" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumIrradianceTexels" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumDistanceTexels" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.normalBias" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.viewBias" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeVariablePad0" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeRayRotationTransform" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.volumeMovementType" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeScrollOffsets" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBackfaceThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMinFrontfaceDistance" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "8" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[0]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[1]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[2]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[3]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + } + ] + }, + { + "field": "m_idReflection", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{7DE7E4B8-5C98-5F7A-985F-DDEEA5BB5366}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{4B54CC87-1340-5B29-8040-2003033F9B93}", + "Objects": [ + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMinFrontfaceDistance" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "20" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumDistanceTexels" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "27" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeInverseIrradianceEncodingGamma" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "10" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "26" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeScrollOffsets" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "18" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeIrradianceEncodingGamma" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "9" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.normalBias" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "13" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBrightnessThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "8" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeHysteresis" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "6" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeRayRotationTransform" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[2]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "24" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[3]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "25" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[0]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "22" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[1]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "23" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeChangeThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "7" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "21" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.origin" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.numRaysPerProbe" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridSpacing" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBackfaceThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "19" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMaxRayDistance" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumIrradianceTexels" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "11" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridCounts" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeVariablePad0" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "15" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.volumeMovementType" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "17" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeDistanceExponent" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "5" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.viewBias" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "14" + } + ] + } + ] + } + ] + } + ] + }, + { + "field": "m_intervals", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}", + "Objects": [ + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + } + ] + }, + { + "field": "m_sizeInBytes", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + }, + { + "field": "m_hash", + "typeName": "AZ::u64", + "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "value": "7181601620235669059" + } + ] + } + ] + }, + { + "field": "m_bindingSlot", + "typeName": "AZ::RHI::Handle", + "typeId": "{1811456D-0C3D-58C8-ACE8-FD47F4E80E25}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] + }, + { + "field": "m_shaderVariantKeyFallbackSize", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_shaderVariantKeyFallbackConstantIndex", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4294967295" + } + ] + }, + { + "field": "m_hash", + "typeName": "AZ::u64", + "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "value": "10614022793008117732" + } + ] + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZStd::pair", + "typeId": "{5C6406C8-77C9-597F-A3E9-249628D94902}", + "Objects": [ + { + "field": "value1", + "typeName": "Crc32", + "typeId": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "Objects": [ + { + "field": "Value", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3189070339" + } + ] + }, + { + "field": "value2", + "typeName": "AZStd::intrusive_ptr", + "typeId": "{FF05CAD3-238F-5E19-8FF2-083353BBEC47}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderResourceGroupLayout", + "typeId": "{1F92C651-9B83-4379-AB5C-5201F1B2C278}", + "version": 6, + "Objects": [ + { + "field": "m_staticSamplers", + "typeName": "AZStd::vector", + "typeId": "{D3BC4729-3DE0-57A1-96E0-DCFF98D4D975}" + }, + { + "field": "m_inputsForBuffers", + "typeName": "AZStd::vector", + "typeId": "{A4650430-04B9-589A-991F-4B443DCD20EA}" + }, + { + "field": "m_inputsForImages", + "typeName": "AZStd::vector", + "typeId": "{909BE4D8-5A22-59A4-A135-4E73662E2D83}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeRayTrace" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + }, + { + "field": "m_inputsForBufferUnboundedArrays", + "typeName": "AZStd::vector", + "typeId": "{DD5102EE-72A9-55F7-AB54-14F228FAE38F}" + }, + { + "field": "m_inputsForImageUnboundedArrays", + "typeName": "AZStd::vector", + "typeId": "{8042FF1E-9115-53F7-BE33-3DCDE9C0AB7F}" + }, + { + "field": "m_inputsForSamplers", + "typeName": "AZStd::vector", + "typeId": "{4CF286E1-5297-581D-93E9-891166EDAD9A}" + }, + { + "field": "m_intervalsForBuffers", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}" + }, + { + "field": "m_intervalsForImages", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}", + "Objects": [ + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] + }, + { + "field": "m_intervalsForSamplers", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}" + }, + { + "field": "m_groupSizeForBuffers", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForImages", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + }, + { + "field": "m_groupSizeForBufferUnboundedArrays", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForImageUnboundedArrays", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_groupSizeForSamplers", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_idReflectionForBuffers", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{A85E274A-4C1D-546F-B18C-452C5700BAE4}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{F4529C0B-A2C0-5A32-A348-59D45FB1776B}" + } + ] + }, + { + "field": "m_idReflectionForImages", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{BB6D1ABE-9A2F-5F51-93CB-B1B866EFD5B4}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{BBD5D625-992D-5296-A631-9B84B00CE2F1}", + "Objects": [ + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeRayTrace" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + } + ] + } + ] + }, + { + "field": "m_idReflectionForBufferUnboundedArrays", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{46520159-BC56-5E90-89AD-3CB0A5D295B0}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{CD6D3195-A87A-5E0C-AD4D-23457B3B8DCF}" + } + ] + }, + { + "field": "m_idReflectionForImageUnboundedArrays", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{A33C41AC-ABA0-5A34-9A6B-89BABDC151D7}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{14C5FF00-B370-575F-866B-B19B97F76D82}" + } + ] + }, + { + "field": "m_idReflectionForSamplers", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{2665EED7-CFB4-582B-B265-107348B1DFAC}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{1545A615-BFD7-515C-A1E9-710570135F08}" + } + ] + }, + { + "field": "m_constantsDataLayout", + "typeName": "AZStd::intrusive_ptr", + "typeId": "{CEB3049A-A620-56C8-AFBA-D0A98304333D}", + "Objects": [ + { + "field": "element", + "typeName": "ConstantsLayout", + "typeId": "{66EDAC32-7730-4F05-AF9D-B3CB0F5D90E0}", + "Objects": [ + { + "field": "m_inputs", + "typeName": "AZStd::vector", + "typeId": "{5FC25C85-DF2F-5219-918C-EBC47D7D6451}", + "Objects": [ + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.origin" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.numRaysPerProbe" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridSpacing" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMaxRayDistance" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridCounts" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeDistanceExponent" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeHysteresis" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeChangeThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBrightnessThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeIrradianceEncodingGamma" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeInverseIrradianceEncodingGamma" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumIrradianceTexels" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumDistanceTexels" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.normalBias" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.viewBias" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeVariablePad0" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeRayRotationTransform" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.volumeMovementType" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeScrollOffsets" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBackfaceThreshold" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMinFrontfaceDistance" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "8" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[0]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[1]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[2]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[3]" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, + { + "field": "element", + "typeName": "ShaderInputConstantDescriptor", + "typeId": "{C8DC7D2D-CCA0-45AD-9430-52C06B69325C}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid" + }, + { + "field": "m_constantByteOffset", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_constantByteCount", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] + }, + { + "field": "m_idReflection", + "typeName": "AZ::RHI::NameIdReflectionMap>", + "typeId": "{7DE7E4B8-5C98-5F7A-985F-DDEEA5BB5366}", + "Objects": [ + { + "field": "ReflectionMap", + "typeName": "AZStd::vector", + "typeId": "{4B54CC87-1340-5B29-8040-2003033F9B93}", + "Objects": [ + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMinFrontfaceDistance" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "20" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumDistanceTexels" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "27" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeInverseIrradianceEncodingGamma" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "10" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "26" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeScrollOffsets" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "18" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeIrradianceEncodingGamma" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "9" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.normalBias" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "13" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBrightnessThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "8" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeHysteresis" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "6" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeRayRotationTransform" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[2]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "24" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[3]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "25" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[0]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "22" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding1[1]" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "23" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeChangeThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "7" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.padding" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "21" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.origin" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.numRaysPerProbe" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridSpacing" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeBackfaceThreshold" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "19" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeMaxRayDistance" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeNumIrradianceTexels" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "11" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeGridCounts" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeVariablePad0" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "15" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.volumeMovementType" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "17" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.probeDistanceExponent" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "5" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{285A5B8D-8218-5E10-B8AE-138374D8D113}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeGrid.viewBias" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "14" + } + ] + } + ] + } + ] + } + ] + }, + { + "field": "m_intervals", + "typeName": "AZStd::vector", + "typeId": "{908FF0AE-802D-5311-A2E0-A6D595FBC480}", + "Objects": [ + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "12" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "16" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "28" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "32" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "44" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "48" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "52" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "56" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "60" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "64" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "68" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "72" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "76" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "80" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "84" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "96" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "160" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "164" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "176" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "180" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "184" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "208" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "224" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "240" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "192" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + } + ] + } + ] + }, + { + "field": "m_sizeInBytes", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "256" + }, + { + "field": "m_hash", + "typeName": "AZ::u64", + "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "value": "2959428625184507101" + } + ] + } + ] + }, + { + "field": "m_bindingSlot", + "typeName": "AZ::RHI::Handle", + "typeId": "{1811456D-0C3D-58C8-ACE8-FD47F4E80E25}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] + }, + { + "field": "m_shaderVariantKeyFallbackSize", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "0" + }, + { + "field": "m_shaderVariantKeyFallbackConstantIndex", + "typeName": "AZ::RHI::Handle", + "typeId": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4294967295" + } + ] + }, + { + "field": "m_hash", + "typeName": "AZ::u64", + "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "value": "4240011884224364085" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant new file mode 100644 index 0000000000..3a22d2cd55 Binary files /dev/null and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader index 24f8b7f470..a781a598ba 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant index 46c99b0d3d..e9f841047e 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant index df447c8da0..e399dbcef0 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant index e2d34e23f7..1580aa2477 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader index d1a669bacf..bfed840feb 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant index 8f5f4c1ee0..ee2031bf1a 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant index c82fa140f1..3b37084adf 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant index 1a0ec0f962..e2f5a8cb50 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingcommon_raytracingglobalsrg.azsrg b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingcommon_raytracingglobalsrg.azsrg index 889e5a51fe..c9fa0f4e1c 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingcommon_raytracingglobalsrg.azsrg +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingcommon_raytracingglobalsrg.azsrg @@ -251,6 +251,44 @@ } ] }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, { "field": "element", "typeName": "ShaderInputImageDescriptor", @@ -433,6 +471,26 @@ "value": "4" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "5" + } + ] } ] }, @@ -451,7 +509,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "4" + "value": "5" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -515,7 +573,7 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] } @@ -599,7 +657,35 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" } ] } @@ -3217,7 +3303,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "3506265182085703910" + "value": "2492931172876496388" } ] } @@ -3459,6 +3545,44 @@ } ] }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, { "field": "element", "typeName": "ShaderInputImageDescriptor", @@ -3641,6 +3765,26 @@ "value": "4" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "5" + } + ] } ] }, @@ -3659,7 +3803,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "4" + "value": "5" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -3723,7 +3867,7 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] } @@ -3807,7 +3951,35 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" } ] } @@ -6425,7 +6597,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "3506265182085703910" + "value": "2492931172876496388" } ] } @@ -6575,7 +6747,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "4" + "value": "5" } ] } @@ -6667,6 +6839,44 @@ } ] }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" + } + ] + }, { "field": "element", "typeName": "ShaderInputImageDescriptor", @@ -6701,7 +6911,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] }, @@ -6739,7 +6949,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] } @@ -6849,6 +7059,26 @@ "value": "4" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "5" + } + ] } ] }, @@ -6867,7 +7097,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "4" + "value": "5" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -6931,7 +7161,7 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] } @@ -7015,7 +7245,35 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "2" } ] } @@ -7104,7 +7362,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7136,7 +7394,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7168,7 +7426,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7200,7 +7458,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7232,7 +7490,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7264,7 +7522,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7296,7 +7554,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7328,7 +7586,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7360,7 +7618,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7392,7 +7650,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7424,7 +7682,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7456,7 +7714,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7488,7 +7746,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7520,7 +7778,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7552,7 +7810,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7584,7 +7842,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7616,7 +7874,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7648,7 +7906,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7680,7 +7938,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7712,7 +7970,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7744,7 +8002,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7776,7 +8034,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7808,7 +8066,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7840,7 +8098,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7872,7 +8130,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7904,7 +8162,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7936,7 +8194,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -7968,7 +8226,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -8000,7 +8258,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -8032,7 +8290,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] }, @@ -8064,7 +8322,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "5" + "value": "6" } ] } @@ -9589,7 +9847,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "16848591129341445217" + "value": "1426176521634445605" } ] } @@ -9633,7 +9891,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "4017610420074377641" + "value": "1425135468820160161" } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader index 91c528661a..84e773d9db 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant index 57660de9e8..b288bb7647 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant index 74e6d6263d..0f2473b606 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant index 15d17bca27..bfd979e588 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader index e5446589e8..d827fbe2a1 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant index abfbda4bae..7d76080dd7 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant index c2689bcb40..c301dc4790 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant index cc5cc30818..2a077e0bbf 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader index 9e62bc1927..b88c7e4ec5 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant index ae976a7cd9..48bdc89867 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant index 674ed7b1ac..af7c962694 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_objectsrg.azsrg b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_objectsrg.azsrg index 856baff38e..47f5e48fca 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_objectsrg.azsrg +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_objectsrg.azsrg @@ -99,6 +99,44 @@ } ] }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + }, { "field": "element", "typeName": "ShaderInputImageDescriptor", @@ -261,6 +299,26 @@ "value": "3" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] } ] }, @@ -279,7 +337,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -343,7 +401,7 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "1" + "value": "2" } ] } @@ -399,7 +457,35 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" } ] } @@ -3177,7 +3263,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "10943999648486519461" + "value": "12354971452077948474" } ] } @@ -3267,6 +3353,44 @@ } ] }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + }, { "field": "element", "typeName": "ShaderInputImageDescriptor", @@ -3429,6 +3553,26 @@ "value": "3" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] } ] }, @@ -3447,7 +3591,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -3511,7 +3655,7 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "1" + "value": "2" } ] } @@ -3567,7 +3711,35 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" } ] } @@ -6345,7 +6517,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "10943999648486519461" + "value": "12354971452077948474" } ] } @@ -6435,6 +6607,44 @@ } ] }, + { + "field": "element", + "typeName": "ShaderInputImageDescriptor", + "typeId": "{913DBF3C-5556-4524-B928-174A42516D31}", + "version": 3, + "Objects": [ + { + "field": "m_name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "m_type", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_access", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_count", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + }, + { + "field": "m_registerId", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" + } + ] + }, { "field": "element", "typeName": "ShaderInputImageDescriptor", @@ -6469,7 +6679,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "1" + "value": "2" } ] }, @@ -6507,7 +6717,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" } ] } @@ -6597,6 +6807,26 @@ "value": "3" } ] + }, + { + "field": "element", + "typeName": "Interval", + "typeId": "{B121C9FE-1C23-4721-9C3E-6BE036612743}", + "version": 1, + "Objects": [ + { + "field": "m_min", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "3" + }, + { + "field": "m_max", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "4" + } + ] } ] }, @@ -6615,7 +6845,7 @@ "field": "m_groupSizeForImages", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" }, { "field": "m_groupSizeForBufferUnboundedArrays", @@ -6679,7 +6909,7 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "1" + "value": "2" } ] } @@ -6735,7 +6965,35 @@ "field": "m_index", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "2" + "value": "3" + } + ] + } + ] + }, + { + "field": "element", + "typeName": "AZ::RHI::ReflectionNamePair>", + "typeId": "{DB3620EE-8854-52A8-B421-BFA17E6A687D}", + "version": 2, + "Objects": [ + { + "field": "Name", + "typeName": "Name", + "typeId": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "value": "m_probeStates" + }, + { + "field": "Index", + "typeName": "AZ::RHI::Handle", + "typeId": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "version": 1, + "Objects": [ + { + "field": "m_index", + "typeName": "unsigned int", + "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "value": "1" } ] } @@ -6824,7 +7082,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -6856,7 +7114,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -6888,7 +7146,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -6920,7 +7178,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -6952,7 +7210,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -6984,7 +7242,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7016,7 +7274,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7048,7 +7306,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7080,7 +7338,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7112,7 +7370,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7144,7 +7402,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7176,7 +7434,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7208,7 +7466,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7240,7 +7498,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7272,7 +7530,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7304,7 +7562,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7336,7 +7594,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7368,7 +7626,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7400,7 +7658,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7432,7 +7690,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7464,7 +7722,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7496,7 +7754,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7528,7 +7786,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7560,7 +7818,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7592,7 +7850,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7624,7 +7882,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7656,7 +7914,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7688,7 +7946,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7720,7 +7978,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7752,7 +8010,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7784,7 +8042,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7816,7 +8074,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] }, @@ -7848,7 +8106,7 @@ "field": "m_registerId", "typeName": "unsigned int", "typeId": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", - "value": "3" + "value": "4" } ] } @@ -9469,7 +9727,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "14153574899631108967" + "value": "11445921412800959080" } ] } @@ -9513,7 +9771,7 @@ "field": "m_hash", "typeName": "AZ::u64", "typeId": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", - "value": "8072403242124824453" + "value": "16873325821914315993" } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant index 1dfcbd3ac3..4e9771d614 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/CMakeLists.txt b/Gems/Atom/Feature/Common/CMakeLists.txt index d96d812af0..20a680bce9 100644 --- a/Gems/Atom/Feature/Common/CMakeLists.txt +++ b/Gems/Atom/Feature/Common/CMakeLists.txt @@ -9,6 +9,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty) - add_subdirectory(Code) diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/LightingPreset.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/LightingPreset.h index 1c220e0d8d..f1d8337a35 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/LightingPreset.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/LightingPreset.h @@ -78,7 +78,6 @@ namespace AZ AZ_CLASS_ALLOCATOR(LightingPreset, AZ::SystemAllocator, 0); static void Reflect(AZ::ReflectContext* context); - bool m_autoSelect = false; AZStd::string m_displayName; AZ::Data::Asset m_iblDiffuseImageAsset; AZ::Data::Asset m_iblSpecularImageAsset; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h index 896d6fb78f..9ca8c13859 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h @@ -32,7 +32,6 @@ namespace AZ AZ_CLASS_ALLOCATOR(ModelPreset, AZ::SystemAllocator, 0); static void Reflect(AZ::ReflectContext* context); - bool m_autoSelect = false; AZStd::string m_displayName; AZ::Data::Asset m_modelAsset; AZ::Data::Asset m_previewImageAsset; diff --git a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp index 5f7057c9be..be6d438a62 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp @@ -96,6 +96,7 @@ #include #include #include +#include #include #include #include @@ -261,6 +262,7 @@ namespace AZ passSystem->AddPassCreator(Name("DiffuseProbeGridBlendDistancePass"), &Render::DiffuseProbeGridBlendDistancePass::Create); passSystem->AddPassCreator(Name("DiffuseProbeGridBorderUpdatePass"), &Render::DiffuseProbeGridBorderUpdatePass::Create); passSystem->AddPassCreator(Name("DiffuseProbeGridRelocationPass"), &Render::DiffuseProbeGridRelocationPass::Create); + passSystem->AddPassCreator(Name("DiffuseProbeGridClassificationPass"), &Render::DiffuseProbeGridClassificationPass::Create); passSystem->AddPassCreator(Name("DiffuseProbeGridRenderPass"), &Render::DiffuseProbeGridRenderPass::Create); passSystem->AddPassCreator(Name("LuminanceHistogramGeneratorPass"), &LuminanceHistogramGeneratorPass::Create); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGrid.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGrid.cpp index eeb32cdd07..8a349083ea 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGrid.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGrid.cpp @@ -41,6 +41,7 @@ namespace AZ m_irradianceImageAttachmentId = AZStd::string::format("ProbeIrradianceImageAttachmentId_%s", uuidString.c_str()); m_distanceImageAttachmentId = AZStd::string::format("ProbeDistanceImageAttachmentId_%s", uuidString.c_str()); m_relocationImageAttachmentId = AZStd::string::format("ProbeRelocationImageAttachmentId_%s", uuidString.c_str()); + m_classificationImageAttachmentId = AZStd::string::format("ProbeClassificationImageAttachmentId_%s", uuidString.c_str()); // setup culling m_cullable.m_cullData.m_scene = m_scene; @@ -252,6 +253,20 @@ namespace AZ AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize m_probeRelocationImage image"); } + // probe classification + { + uint32_t width = probeCountX; + uint32_t height = probeCountY; + + m_classificationImage[m_currentImageIndex] = RHI::Factory::Get().CreateImage(); + + RHI::ImageInitRequest request; + request.m_image = m_classificationImage[m_currentImageIndex].get(); + request.m_descriptor = RHI::ImageDescriptor::Create2D(RHI::ImageBindFlags::ShaderReadWrite, width, height, DiffuseProbeGridRenderData::ClassificationImageFormat); + RHI::ResultCode result = m_renderData->m_imagePool->InitImage(request); + AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize m_probeClassificationImage image"); + } + m_updateTextures = false; // textures have changed so we need to update the render Srg to bind the new ones @@ -401,6 +416,10 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeOffsets")); m_rayTraceSrg->SetImageView(imageIndex, m_relocationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeRelocationImageViewDescriptor).get()); + // probe classification + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeStates")); + m_rayTraceSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + // grid settings constantIndex = srgLayout->FindShaderInputConstantIndex(Name("m_ambientMultiplier")); m_rayTraceSrg->SetConstant(constantIndex, m_ambientMultiplier); @@ -431,6 +450,9 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeIrradiance")); m_blendIrradianceSrg->SetImageView(imageIndex, m_irradianceImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeIrradianceImageViewDescriptor).get()); + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeStates")); + m_blendIrradianceSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + SetGridConstants(m_blendIrradianceSrg); } @@ -451,6 +473,9 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeDistance")); m_blendDistanceSrg->SetImageView(imageIndex, m_distanceImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeDistanceImageViewDescriptor).get()); + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeStates")); + m_blendDistanceSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + SetGridConstants(m_blendDistanceSrg); } @@ -559,6 +584,27 @@ namespace AZ SetGridConstants(m_relocationSrg); } + void DiffuseProbeGrid::UpdateClassificationSrg(const Data::Asset& srgAsset) + { + if (!m_classificationSrg) + { + m_classificationSrg = RPI::ShaderResourceGroup::Create(srgAsset); + AZ_Error("DiffuseProbeGrid", m_classificationSrg.get(), "Failed to create Classification shader resource group"); + } + + const RHI::ShaderResourceGroupLayout* srgLayout = m_classificationSrg->GetLayout(); + RHI::ShaderInputConstantIndex constantIndex; + RHI::ShaderInputImageIndex imageIndex; + + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeRayTrace")); + m_classificationSrg->SetImageView(imageIndex, m_rayTraceImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeRayTraceImageViewDescriptor).get()); + + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeStates")); + m_classificationSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + + SetGridConstants(m_classificationSrg); + } + void DiffuseProbeGrid::UpdateRenderObjectSrg() { if (!m_updateRenderObjectSrg) @@ -601,6 +647,9 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(Name("m_probeOffsets")); m_renderObjectSrg->SetImageView(imageIndex, m_relocationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeRelocationImageViewDescriptor).get()); + imageIndex = srgLayout->FindShaderInputImageIndex(Name("m_probeStates")); + m_renderObjectSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + SetGridConstants(m_renderObjectSrg); m_updateRenderObjectSrg = false; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGrid.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGrid.h index a92daeffaa..e1ca2123a5 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGrid.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGrid.h @@ -30,6 +30,7 @@ namespace AZ static const RHI::Format IrradianceImageFormat = RHI::Format::R16G16B16A16_UNORM; static const RHI::Format DistanceImageFormat = RHI::Format::R32G32_FLOAT; static const RHI::Format RelocationImageFormat = RHI::Format::R16G16B16A16_FLOAT; + static const RHI::Format ClassificationImageFormat = RHI::Format::R8_UINT; // image pool RHI::Ptr m_imagePool; @@ -43,6 +44,7 @@ namespace AZ RHI::ImageViewDescriptor m_probeIrradianceImageViewDescriptor; RHI::ImageViewDescriptor m_probeDistanceImageViewDescriptor; RHI::ImageViewDescriptor m_probeRelocationImageViewDescriptor; + RHI::ImageViewDescriptor m_probeClassificationImageViewDescriptor; // render pipeline state RPI::Ptr m_pipelineState; @@ -118,6 +120,7 @@ namespace AZ const Data::Instance& GetBorderUpdateRowDistanceSrg() const { return m_borderUpdateRowDistanceSrg; } const Data::Instance& GetBorderUpdateColumnDistanceSrg() const { return m_borderUpdateColumnDistanceSrg; } const Data::Instance& GetRelocationSrg() const { return m_relocationSrg; } + const Data::Instance& GetClassificationSrg() const { return m_classificationSrg; } const Data::Instance& GetRenderObjectSrg() const { return m_renderObjectSrg; } // Srg updates @@ -126,6 +129,7 @@ namespace AZ void UpdateBlendDistanceSrg(const Data::Asset& srgAsset); void UpdateBorderUpdateSrgs(const Data::Asset& rowSrgAsset, const Data::Asset& columnSrgAsset); void UpdateRelocationSrg(const Data::Asset& srgAsset); + void UpdateClassificationSrg(const Data::Asset& srgAsset); void UpdateRenderObjectSrg(); // textures @@ -133,12 +137,14 @@ namespace AZ const RHI::Ptr& GetIrradianceImage() { return m_irradianceImage[m_currentImageIndex]; } const RHI::Ptr& GetDistanceImage() { return m_distanceImage[m_currentImageIndex]; } const RHI::Ptr& GetRelocationImage() { return m_relocationImage[m_currentImageIndex]; } + const RHI::Ptr& GetClassificationImage() { return m_classificationImage[m_currentImageIndex]; } // attachment Ids const RHI::AttachmentId GetRayTraceImageAttachmentId() const { return m_rayTraceImageAttachmentId; } const RHI::AttachmentId GetIrradianceImageAttachmentId() const { return m_irradianceImageAttachmentId; } const RHI::AttachmentId GetDistanceImageAttachmentId() const { return m_distanceImageAttachmentId; } const RHI::AttachmentId GetRelocationImageAttachmentId() const { return m_relocationImageAttachmentId; } + const RHI::AttachmentId GetClassificationImageAttachmentId() const { return m_classificationImageAttachmentId; } const DiffuseProbeGridRenderData* GetRenderData() const { return m_renderData; } @@ -222,6 +228,7 @@ namespace AZ RHI::Ptr m_irradianceImage[ImageFrameCount]; RHI::Ptr m_distanceImage[ImageFrameCount]; RHI::Ptr m_relocationImage[ImageFrameCount]; + RHI::Ptr m_classificationImage[ImageFrameCount]; uint32_t m_currentImageIndex = 0; bool m_updateTextures = false; bool m_irradianceClearRequired = true; @@ -235,6 +242,7 @@ namespace AZ Data::Instance m_borderUpdateRowDistanceSrg; Data::Instance m_borderUpdateColumnDistanceSrg; Data::Instance m_relocationSrg; + Data::Instance m_classificationSrg; Data::Instance m_renderObjectSrg; bool m_updateRenderObjectSrg = true; @@ -243,6 +251,7 @@ namespace AZ RHI::AttachmentId m_irradianceImageAttachmentId; RHI::AttachmentId m_distanceImageAttachmentId; RHI::AttachmentId m_relocationImageAttachmentId; + RHI::AttachmentId m_classificationImageAttachmentId; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridBlendDistancePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridBlendDistancePass.cpp index 33c14afe86..3df13556d3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridBlendDistancePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridBlendDistancePass.cpp @@ -132,6 +132,16 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } + + // probe classification image + { + RHI::ImageScopeAttachmentDescriptor desc; + desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; + desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; + + frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); + } } } diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridBlendIrradiancePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridBlendIrradiancePass.cpp index 5d25b68b18..4e05b8ef31 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridBlendIrradiancePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridBlendIrradiancePass.cpp @@ -132,6 +132,16 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } + + // probe classification image + { + RHI::ImageScopeAttachmentDescriptor desc; + desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; + desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; + + frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); + } } } diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridClassificationPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridClassificationPass.cpp new file mode 100644 index 0000000000..db85914cee --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridClassificationPass.cpp @@ -0,0 +1,182 @@ +/* +* 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace AZ +{ + namespace Render + { + RPI::Ptr DiffuseProbeGridClassificationPass::Create(const RPI::PassDescriptor& descriptor) + { + RPI::Ptr pass = aznew DiffuseProbeGridClassificationPass(descriptor); + return AZStd::move(pass); + } + + DiffuseProbeGridClassificationPass::DiffuseProbeGridClassificationPass(const RPI::PassDescriptor& descriptor) + : RPI::RenderPass(descriptor) + { + LoadShader(); + } + + void DiffuseProbeGridClassificationPass::LoadShader() + { + // load shader + // Note: the shader may not be available on all platforms + AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.azshader"; + m_shader = RPI::LoadShader(shaderFilePath); + if (m_shader == nullptr) + { + return; + } + + // load pipeline state + RHI::PipelineStateDescriptorForDispatch pipelineStateDescriptor; + const auto& shaderVariant = m_shader->GetVariant(RPI::ShaderAsset::RootShaderVariantStableId); + shaderVariant.ConfigurePipelineState(pipelineStateDescriptor); + m_pipelineState = m_shader->AcquirePipelineState(pipelineStateDescriptor); + + // load Pass Srg asset + m_srgAsset = m_shader->FindShaderResourceGroupAsset(RPI::SrgBindingSlot::Pass); + + // retrieve the number of threads per thread group from the shader + const auto numThreads = m_shader->GetAsset()->GetAttribute(RHI::ShaderStage::Compute, Name{ "numthreads" }); + if (numThreads) + { + const RHI::ShaderStageAttributeArguments& args = *numThreads; + bool validArgs = args.size() == 3; + if (validArgs) + { + validArgs &= args[0].type() == azrtti_typeid(); + validArgs &= args[1].type() == azrtti_typeid(); + validArgs &= args[2].type() == azrtti_typeid(); + } + + if (!validArgs) + { + AZ_Error("PassSystem", false, "[DiffuseProbeClassificationPass '%s']: Shader '%s' contains invalid numthreads arguments.", GetPathName().GetCStr(), shaderFilePath.c_str()); + return; + } + + m_dispatchArgs.m_threadsPerGroupX = AZStd::any_cast(args[0]); + m_dispatchArgs.m_threadsPerGroupY = AZStd::any_cast(args[1]); + m_dispatchArgs.m_threadsPerGroupZ = AZStd::any_cast(args[2]); + } + } + + void DiffuseProbeGridClassificationPass::FrameBeginInternal(FramePrepareParams params) + { + RPI::Scene* scene = m_pipeline->GetScene(); + DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); + + if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetProbeGrids().empty()) + { + // no diffuse probe grids + return; + } + + RayTracingFeatureProcessor* rayTracingFeatureProcessor = scene->GetFeatureProcessor(); + AZ_Assert(rayTracingFeatureProcessor, "DiffuseProbeGridClassificationPass requires the RayTracingFeatureProcessor"); + + if (!rayTracingFeatureProcessor->GetSubMeshCount()) + { + // empty scene + return; + } + + RenderPass::FrameBeginInternal(params); + } + + void DiffuseProbeGridClassificationPass::SetupFrameGraphDependencies(RHI::FrameGraphInterface frameGraph) + { + RenderPass::SetupFrameGraphDependencies(frameGraph); + + RPI::Scene* scene = m_pipeline->GetScene(); + DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetProbeGrids()) + { + // probe raytrace image + { + RHI::ImageScopeAttachmentDescriptor desc; + desc.m_attachmentId = diffuseProbeGrid->GetRayTraceImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeRayTraceImageViewDescriptor; + desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; + + frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); + } + + // probe classification image + { + RHI::ImageScopeAttachmentDescriptor desc; + desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; + desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; + + frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); + } + } + } + + void DiffuseProbeGridClassificationPass::CompileResources([[maybe_unused]] const RHI::FrameGraphCompileContext& context) + { + RPI::Scene* scene = m_pipeline->GetScene(); + DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetProbeGrids()) + { + // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs + // (see ValidateSetImageView() in ShaderResourceGroupData.cpp) + diffuseProbeGrid->UpdateClassificationSrg(m_srgAsset); + diffuseProbeGrid->GetClassificationSrg()->Compile(); + } + } + + void DiffuseProbeGridClassificationPass::BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) + { + RHI::CommandList* commandList = context.GetCommandList(); + RPI::Scene* scene = m_pipeline->GetScene(); + DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); + + // submit the DispatchItems for each DiffuseProbeGrid + for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetProbeGrids()) + { + const RHI::ShaderResourceGroup* shaderResourceGroup = diffuseProbeGrid->GetClassificationSrg()->GetRHIShaderResourceGroup(); + commandList->SetShaderResourceGroupForDispatch(*shaderResourceGroup); + + uint32_t probeCountX; + uint32_t probeCountY; + diffuseProbeGrid->GetTexture2DProbeCount(probeCountX, probeCountY); + + RHI::DispatchItem dispatchItem; + dispatchItem.m_arguments = m_dispatchArgs; + dispatchItem.m_pipelineState = m_pipelineState; + dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsX = probeCountX; + dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsY = probeCountY; + dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsZ = 1; + + commandList->Submit(dispatchItem); + } + } + } // namespace Render +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridClassificationPass.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridClassificationPass.h new file mode 100644 index 0000000000..677e16ac42 --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridClassificationPass.h @@ -0,0 +1,63 @@ +/* +* 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 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace AZ +{ + namespace Render + { + //! Compute shader that classifies probes as active or inactive in the diffuse probe grid. + class DiffuseProbeGridClassificationPass final + : public RPI::RenderPass + { + public: + AZ_RPI_PASS(DiffuseProbeGridClassificationPass); + + AZ_RTTI(AZ::Render::DiffuseProbeGridClassificationPass, "{98A6477A-F31C-4390-9BEB-9DB8E30BB281}", RPI::RenderPass); + AZ_CLASS_ALLOCATOR(DiffuseProbeGridClassificationPass, SystemAllocator, 0); + virtual ~DiffuseProbeGridClassificationPass() = default; + + static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); + + private: + DiffuseProbeGridClassificationPass(const RPI::PassDescriptor& descriptor); + + void LoadShader(); + + // Pass overrides + void FrameBeginInternal(FramePrepareParams params) override; + + void SetupFrameGraphDependencies(RHI::FrameGraphInterface frameGraph) override; + void CompileResources(const RHI::FrameGraphCompileContext& context) override; + void BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) override; + + // shader + Data::Instance m_shader; + const RHI::PipelineState* m_pipelineState = nullptr; + Data::Asset m_srgAsset; + RHI::DispatchDirect m_dispatchArgs; + }; + } // namespace Render +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridFeatureProcessor.cpp index 8f39b6e1b3..1aaa06c797 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridFeatureProcessor.cpp @@ -73,6 +73,7 @@ namespace AZ m_probeGridRenderData.m_probeIrradianceImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::IrradianceImageFormat, 0, 0); m_probeGridRenderData.m_probeDistanceImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::DistanceImageFormat, 0, 0); m_probeGridRenderData.m_probeRelocationImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::RelocationImageFormat, 0, 0); + m_probeGridRenderData.m_probeClassificationImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::ClassificationImageFormat, 0, 0); // load shader // Note: the shader may not be available on all platforms diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridRayTracingPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridRayTracingPass.cpp index ddda810eb7..6a0e618830 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridRayTracingPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridRayTracingPass.cpp @@ -291,6 +291,19 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } + + // probe classification + { + RHI::ResultCode result = frameGraph.GetAttachmentDatabase().ImportImage(diffuseProbeGrid->GetClassificationImageAttachmentId(), diffuseProbeGrid->GetClassificationImage()); + AZ_Assert(result == RHI::ResultCode::Success, "Failed to import probeClassificationImage"); + + RHI::ImageScopeAttachmentDescriptor desc; + desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; + desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; + + frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); + } } } diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridRenderPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridRenderPass.cpp index c5ac94607e..af6fce6f6a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridRenderPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseProbeGrid/DiffuseProbeGridRenderPass.cpp @@ -117,6 +117,16 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } + + // probe classification image + { + RHI::ImageScopeAttachmentDescriptor desc; + desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; + desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; + + frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); + } } Base::SetupFrameGraphDependencies(frameGraph); diff --git a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp index 9df7f262ac..bb8f7ff54d 100644 --- a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include #include @@ -195,7 +197,23 @@ namespace AZ constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_directionalLightCount")); m_rayTracingSceneSrg->SetConstant(constantIndex, directionalLightFP->GetLightCount()); - // point lights + // simple point lights + const auto simplePointLightFP = GetParentScene()->GetFeatureProcessor(); + bufferIndex = srgLayout->FindShaderInputBufferIndex(AZ::Name("m_simplePointLights")); + m_rayTracingSceneSrg->SetBufferView(bufferIndex, simplePointLightFP->GetLightBuffer()->GetBufferView()); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_simplePointLightCount")); + m_rayTracingSceneSrg->SetConstant(constantIndex, simplePointLightFP->GetLightCount()); + + // simple spot lights + const auto simpleSpotLightFP = GetParentScene()->GetFeatureProcessor(); + bufferIndex = srgLayout->FindShaderInputBufferIndex(AZ::Name("m_simpleSpotLights")); + m_rayTracingSceneSrg->SetBufferView(bufferIndex, simpleSpotLightFP->GetLightBuffer()->GetBufferView()); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_simpleSpotLightCount")); + m_rayTracingSceneSrg->SetConstant(constantIndex, simpleSpotLightFP->GetLightCount()); + + // point lights (sphere) const auto pointLightFP = GetParentScene()->GetFeatureProcessor(); bufferIndex = srgLayout->FindShaderInputBufferIndex(AZ::Name("m_pointLights")); m_rayTracingSceneSrg->SetBufferView(bufferIndex, pointLightFP->GetLightBuffer()->GetBufferView()); diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp index 86c012731c..0826739119 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp @@ -248,6 +248,9 @@ namespace AZ AZ::RPI::RenderPipelineDescriptor environmentCubeMapPipelineDesc; environmentCubeMapPipelineDesc.m_mainViewTagName = "MainCamera"; + environmentCubeMapPipelineDesc.m_renderSettings.m_multisampleState.m_samples = 4; + environmentCubeMapPipelineDesc.m_renderSettings.m_size.m_width = RPI::EnvironmentCubeMapPass::CubeMapFaceSize; + environmentCubeMapPipelineDesc.m_renderSettings.m_size.m_height = RPI::EnvironmentCubeMapPass::CubeMapFaceSize; // create a unique name for the pipeline AZ::Uuid uuid = AZ::Uuid::CreateRandom(); diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorLightingPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorLightingPreset.cpp index e7f9c8b09f..1da9463bd8 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorLightingPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorLightingPreset.cpp @@ -112,7 +112,6 @@ namespace AZ ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_displayName, "Display Name", "Identifier used for display and selection") - ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_autoSelect, "Auto Select", "When true, the configuration is automatically selected when loaded") ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_iblDiffuseImageAsset, "IBL Diffuse Image Asset", "IBL diffuse image asset reference") ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_iblSpecularImageAsset, "IBL Specular Image Asset", "IBL specular image asset reference") ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_skyboxImageAsset, "Skybox Image Asset", "Skybox image asset reference") diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp index b8b0b610f3..bed320c45d 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp @@ -32,7 +32,6 @@ namespace AZ ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_displayName, "Display Name", "Identifier used for display and selection") - ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_autoSelect, "Auto Select", "When true, the configuration is automatically selected when loaded") ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_modelAsset, "Model Asset", "Model asset reference") ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_previewImageAsset, "Preview Image Asset", "Preview image asset reference") ; diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/LightingPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/LightingPreset.cpp index 837a725a9f..77924b87a3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/LightingPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/LightingPreset.cpp @@ -105,8 +105,7 @@ namespace AZ serializeContext->RegisterGenericType>(); serializeContext->Class() - ->Version(4) - ->Field("autoSelect", &LightingPreset::m_autoSelect) + ->Version(5) ->Field("displayName", &LightingPreset::m_displayName) ->Field("iblDiffuseImageAsset", &LightingPreset::m_iblDiffuseImageAsset) ->Field("iblSpecularImageAsset", &LightingPreset::m_iblSpecularImageAsset) @@ -128,7 +127,6 @@ namespace AZ ->Attribute(AZ::Script::Attributes::Module, "render") ->Constructor() ->Constructor() - ->Property("autoSelect", BehaviorValueProperty(&LightingPreset::m_autoSelect)) ->Property("displayName", BehaviorValueProperty(&LightingPreset::m_displayName)) ->Property("alternateSkyboxImageAsset", BehaviorValueProperty(&LightingPreset::m_alternateSkyboxImageAsset)) ->Property("skyboxImageAsset", BehaviorValueProperty(&LightingPreset::m_skyboxImageAsset)) diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp index e93bfa527a..2795617c18 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp @@ -25,8 +25,7 @@ namespace AZ if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(2) - ->Field("autoSelect", &ModelPreset::m_autoSelect) + ->Version(3) ->Field("displayName", &ModelPreset::m_displayName) ->Field("modelAsset", &ModelPreset::m_modelAsset) ->Field("previewImageAsset", &ModelPreset::m_previewImageAsset) @@ -41,7 +40,6 @@ namespace AZ ->Attribute(AZ::Script::Attributes::Module, "render") ->Constructor() ->Constructor() - ->Property("autoSelect", BehaviorValueProperty(&ModelPreset::m_autoSelect)) ->Property("displayName", BehaviorValueProperty(&ModelPreset::m_displayName)) ->Property("modelAsset", BehaviorValueProperty(&ModelPreset::m_modelAsset)) ->Property("previewImageAsset", BehaviorValueProperty(&ModelPreset::m_previewImageAsset)) diff --git a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake index 7e23bc340f..47000d8a5c 100644 --- a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake +++ b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake @@ -131,6 +131,8 @@ set(FILES Source/DiffuseProbeGrid/DiffuseProbeGridBorderUpdatePass.h Source/DiffuseProbeGrid/DiffuseProbeGridRelocationPass.cpp Source/DiffuseProbeGrid/DiffuseProbeGridRelocationPass.h + Source/DiffuseProbeGrid/DiffuseProbeGridClassificationPass.cpp + Source/DiffuseProbeGrid/DiffuseProbeGridClassificationPass.h Source/DiffuseProbeGrid/DiffuseProbeGridRenderPass.cpp Source/DiffuseProbeGrid/DiffuseProbeGridRenderPass.h Source/DiffuseProbeGrid/DiffuseProbeGrid.cpp diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h index 24922fbe98..d3d3155715 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h @@ -77,6 +77,8 @@ namespace AZ void OnRenderPipelineAdded(RenderPipelinePtr pipeline) override; //! Ensures our default view remains set when our scene's render pipelines are modified. void OnRenderPipelineRemoved(RenderPipeline* pipeline) override; + //! OnBeginPrepareRender is forwarded to our RenderTick notification to allow subscribers to do rendering. + void OnBeginPrepareRender() override; //WindowNotificationBus interface //! Used to fire a notification when our window resizes diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialPropertyValue.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialPropertyValue.h index cafd31d8a5..758afb1c66 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialPropertyValue.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialPropertyValue.h @@ -65,6 +65,7 @@ namespace AZ MaterialPropertyValue(const Vector4& value) : m_value(value) {} MaterialPropertyValue(const Color& value) : m_value(value) {} MaterialPropertyValue(const Data::Asset& value) : m_value(value) {} + MaterialPropertyValue(const Data::Instance& value) : m_value(value) {} MaterialPropertyValue(const AZStd::string& value) : m_value(value) {} //! Copy constructor diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp index 81fd9e751b..470b66c28e 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp @@ -74,7 +74,8 @@ namespace AZ const RHI::BufferView* Buffer::GetBufferView() const { - if(RHI::CheckBitsAny(m_rhiBuffer->GetDescriptor().m_bindFlags, RHI::BufferBindFlags::InputAssembly | RHI::BufferBindFlags::DynamicInputAssembly)) + if (m_rhiBuffer->GetDescriptor().m_bindFlags == RHI::BufferBindFlags::InputAssembly || + m_rhiBuffer->GetDescriptor().m_bindFlags == RHI::BufferBindFlags::DynamicInputAssembly) { AZ_Assert(false, "Input assembly buffer doesn't need a regular buffer view, it requires a stream or index buffer view."); @@ -204,7 +205,8 @@ namespace AZ void Buffer::InitBufferView() { // Skip buffer view creation for input assembly buffers - if(RHI::CheckBitsAny(m_rhiBuffer->GetDescriptor().m_bindFlags, RHI::BufferBindFlags::InputAssembly | RHI::BufferBindFlags::DynamicInputAssembly)) + if (m_rhiBuffer->GetDescriptor().m_bindFlags == RHI::BufferBindFlags::InputAssembly || + m_rhiBuffer->GetDescriptor().m_bindFlags == RHI::BufferBindFlags::DynamicInputAssembly) { return; } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/EnvironmentCubeMapPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/EnvironmentCubeMapPass.cpp index 5ba43f9f7e..c72712bce5 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/EnvironmentCubeMapPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/EnvironmentCubeMapPass.cpp @@ -57,7 +57,7 @@ namespace AZ PassConnection childInputConnection; childInputConnection.m_localSlot = "Output"; childInputConnection.m_attachmentRef.m_pass = "Parent"; - childInputConnection.m_attachmentRef.m_attachment = "CubeMapOutput"; + childInputConnection.m_attachmentRef.m_attachment = "Output"; childRequest.m_connections.emplace_back(childInputConnection); PassSystemInterface* passSystem = PassSystemInterface::Get(); @@ -120,15 +120,16 @@ namespace AZ // create output PassAttachment m_passAttachment = aznew PassAttachment(); - m_passAttachment->m_name = "CubeMapOutput"; - m_passAttachment->m_path = "CubeMapOutput"; + m_passAttachment->m_name = "Output"; + AZ::Name attachmentPath(AZStd::string::format("%s.%s", GetPathName().GetCStr(), m_passAttachment->m_name.GetCStr())); + m_passAttachment->m_path = attachmentPath; m_passAttachment->m_lifetime = RHI::AttachmentLifetimeType::Transient; m_passAttachment->m_descriptor = m_outputImageDesc; // create pass attachment binding PassAttachmentBinding outputAttachment; - outputAttachment.m_name = "CubeMapOutput"; - outputAttachment.m_slotType = PassSlotType::Output; + outputAttachment.m_name = "Output"; + outputAttachment.m_slotType = PassSlotType::InputOutput; outputAttachment.m_attachment = m_passAttachment; outputAttachment.m_scopeAttachmentUsage = RHI::ScopeAttachmentUsage::RenderTarget; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp index b67ead9896..c9386b1fc0 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp @@ -104,12 +104,16 @@ namespace AZ // add the current pipeline to next render tick if it's not already added. if (m_currentPipeline && m_currentPipeline->GetRenderMode() != RenderPipeline::RenderMode::RenderOnce) { - ViewportContextNotificationBus::Event(GetName(), &ViewportContextNotificationBus::Events::OnRenderTick); - ViewportContextIdNotificationBus::Event(GetId(), &ViewportContextIdNotificationBus::Events::OnRenderTick); m_currentPipeline->AddToRenderTickOnce(); } } + void ViewportContext::OnBeginPrepareRender() + { + ViewportContextNotificationBus::Event(GetName(), &ViewportContextNotificationBus::Events::OnRenderTick); + ViewportContextIdNotificationBus::Event(GetId(), &ViewportContextIdNotificationBus::Events::OnRenderTick); + } + AZ::Name ViewportContext::GetName() const { return m_name; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp index 8d578352d8..2b525df4d4 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp @@ -57,9 +57,14 @@ namespace AZ return; } viewportData.context = viewportContext; - auto onSizeChanged = [contextName, viewportId](AzFramework::WindowSize size) + auto onSizeChanged = [this, viewportId](AzFramework::WindowSize size) { - ViewportContextNotificationBus::Event(contextName, &ViewportContextNotificationBus::Events::OnViewportSizeChanged, size); + // Ensure we emit OnViewportSizeChanged with the correct name. + auto viewportContext = this->GetViewportContextById(viewportId); + if (viewportContext) + { + ViewportContextNotificationBus::Event(viewportContext->GetName(), &ViewportContextNotificationBus::Events::OnViewportSizeChanged, size); + } ViewportContextIdNotificationBus::Event(viewportId, &ViewportContextIdNotificationBus::Events::OnViewportSizeChanged, size); }; viewportContext->m_name = contextName; @@ -174,6 +179,8 @@ namespace AZ GetOrCreateViewStackForContext(newContextName); viewportContext->m_name = newContextName; UpdateViewForContext(newContextName); + // Ensure anyone listening on per-name viewport size updates gets notified. + ViewportContextNotificationBus::Event(newContextName, &ViewportContextNotificationBus::Events::OnViewportSizeChanged, viewportContext->GetViewportSize()); } void ViewportContextManager::EnumerateViewportContexts(AZStd::function visitorFunction) diff --git a/Gems/Atom/TestData/TestData/LightingPresets/urban_street_02.lightingpreset.azasset b/Gems/Atom/TestData/TestData/LightingPresets/urban_street_02.lightingpreset.azasset index d0a290649b..a676d5fba6 100644 --- a/Gems/Atom/TestData/TestData/LightingPresets/urban_street_02.lightingpreset.azasset +++ b/Gems/Atom/TestData/TestData/LightingPresets/urban_street_02.lightingpreset.azasset @@ -3,7 +3,6 @@ "Version": 1, "ClassName": "AZ::Render::LightingPreset", "ClassData": { - "autoSelect": false, "displayName": "Urban Street 02", "skyboxImageAsset": { "assetId": { diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material index c013eecae5..e84c6296be 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material @@ -7,7 +7,7 @@ "layer1_ambientOcclusion": { "enable": true, "factor": 1.6399999856948853, - "textureMap": "TestData/Textures/cc0/bark1disp2.jpg" + "textureMap": "TestData/Textures/cc0/bark1_disp.jpg" }, "layer1_baseColor": { "color": [ @@ -16,7 +16,7 @@ 0.12039368599653244, 1.0 ], - "textureMap": "TestData/Textures/cc0/bark1col.jpg" + "textureMap": "TestData/Textures/cc0/bark1_col.jpg" }, "layer1_emissive": { "color": [ @@ -30,16 +30,16 @@ "layer1_normal": { "factor": 0.4444443881511688, "flipY": true, - "textureMap": "TestData/Textures/cc0/bark1norm.jpg" + "textureMap": "TestData/Textures/cc0/bark1_norm.jpg" }, "layer1_parallax": { "enable": true, "factor": 0.02500000037252903, - "textureMap": "TestData/Textures/cc0/bark1disp2.jpg" + "textureMap": "TestData/Textures/cc0/bark1_disp.jpg" }, "layer1_roughness": { "lowerBound": 0.010100999847054482, - "textureMap": "TestData/Textures/cc0/bark1roughness.jpg" + "textureMap": "TestData/Textures/cc0/bark1_roughness.jpg" }, "layer1_specularF0": { "factor": 0.5099999904632568, @@ -55,7 +55,7 @@ }, "layer2_ambientOcclusion": { "factor": 1.2200000286102296, - "textureMap": "TestData/Textures/cc0/bark1disp2.jpg" + "textureMap": "TestData/Textures/cc0/bark1_disp.jpg" }, "layer2_baseColor": { "textureMap": "TestData/Textures/cc0/Lava004_1K_Color.jpg" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material index 471b437bd2..126e1a7fcb 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material @@ -5,18 +5,18 @@ "propertyLayoutVersion": 3, "properties": { "layer1_baseColor": { - "textureMap": "TestData/Textures/cc0/bark1col.jpg" + "textureMap": "TestData/Textures/cc0/bark1_col.jpg" }, "layer1_normal": { - "textureMap": "TestData/Textures/cc0/bark1norm.jpg" + "textureMap": "TestData/Textures/cc0/bark1_norm.jpg" }, "layer1_parallax": { "enable": true, "factor": 0.03999999910593033, - "textureMap": "TestData/Textures/cc0/bark1disp2.jpg" + "textureMap": "TestData/Textures/cc0/bark1_disp.jpg" }, "layer1_roughness": { - "textureMap": "TestData/Textures/cc0/bark1roughness.jpg" + "textureMap": "TestData/Textures/cc0/bark1_roughness.jpg" }, "layer2_baseColor": { "textureMap": "TestData/Textures/cc0/Rock030_2K_Color.jpg" diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1_col.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1_col.jpg new file mode 100644 index 0000000000..0a4c5f380c --- /dev/null +++ b/Gems/Atom/TestData/TestData/Textures/cc0/bark1_col.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd44119610135ca5674de7144647df6580d7ac3e03576e9a8e87e741548e7364 +size 2105853 diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1_disp.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1_disp.jpg new file mode 100644 index 0000000000..57c74af488 --- /dev/null +++ b/Gems/Atom/TestData/TestData/Textures/cc0/bark1_disp.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dbb74aac2450d6457bb02d36bd3d74e671c2dc7e938e090331151ecc52d545b +size 845683 diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1_norm.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1_norm.jpg new file mode 100644 index 0000000000..41b1d6d30b --- /dev/null +++ b/Gems/Atom/TestData/TestData/Textures/cc0/bark1_norm.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e69a3844c3a595245619a9dda4ed8981476a516ad3648a8b4dfb8151a68b0db5 +size 4439966 diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1_roughness.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1_roughness.jpg new file mode 100644 index 0000000000..2e7ccba4e0 --- /dev/null +++ b/Gems/Atom/TestData/TestData/Textures/cc0/bark1_roughness.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8caa5961599624a6414d7277c389dd85b175b9587989b815ffd90aff8f62b6c +size 1747230 diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1col.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1col.jpg deleted file mode 100644 index 944a968d5b..0000000000 --- a/Gems/Atom/TestData/TestData/Textures/cc0/bark1col.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24f5c234f11a1b29de9000b5a7ba74262f1bc5ebd2227ca1e85a12fa0e8b5237 -size 8273450 diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1disp.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1disp.jpg deleted file mode 100644 index c8a2a44e9b..0000000000 --- a/Gems/Atom/TestData/TestData/Textures/cc0/bark1disp.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0112ac235da74c60105b0e1a2da49c1e4ab7b89a60960a60cec54ad65db0b4b6 -size 4585685 diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1disp2.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1disp2.jpg deleted file mode 100644 index f93d68141b..0000000000 --- a/Gems/Atom/TestData/TestData/Textures/cc0/bark1disp2.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a202449e5d787e76d959b6bee7a4b60b3821441ac918944c21358742ed1c546 -size 878112 diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1norm.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1norm.jpg deleted file mode 100644 index f68ed8b696..0000000000 --- a/Gems/Atom/TestData/TestData/Textures/cc0/bark1norm.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0100b3c356d76ae1cb4c42bd4cc9c58ff359155aab6b9e3c1b205fe25956738 -size 16848020 diff --git a/Gems/Atom/TestData/TestData/Textures/cc0/bark1roughness.jpg b/Gems/Atom/TestData/TestData/Textures/cc0/bark1roughness.jpg deleted file mode 100644 index f6e7acd7b6..0000000000 --- a/Gems/Atom/TestData/TestData/Textures/cc0/bark1roughness.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11badf07e6a7d0501c915f669ff1b14c8744d427d47d06e2fdca46b8f86839c9 -size 4441528 diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index e08a5a045c..bf46ece27b 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -164,6 +164,8 @@ namespace AtomToolsFramework bool RenderViewportWidget::OnInputChannelEventFiltered(const AzFramework::InputChannel& inputChannel) { + bool shouldConsumeEvent = true; + // Grab keyboard focus if we've been clicked on. // Qt normally handles this for us, but we're filtering native events before they get // synthesized into QMouseEvents. @@ -175,9 +177,18 @@ namespace AtomToolsFramework // Don't consume new input events if we don't currently have focus. // We do forward Ended events, as they may be relevant to our current state // (e.g. a key gets released after we lose focus, it shouldn't remain "stuck"). - if (!hasFocus() && inputChannel.GetState() != AzFramework::InputChannel::State::Ended) + if (!hasFocus()) { - return false; + if (inputChannel.GetState() == AzFramework::InputChannel::State::Ended) + { + // Forward the input ended event to our controllers, but don't prevent other viewports from receiving it. + shouldConsumeEvent = false; + } + else + { + // Not an event we should listen to, abort. + return false; + } } // If we receive a mouse button event from outside of our viewport, ignore it even if we have focus. @@ -196,7 +207,9 @@ namespace AtomToolsFramework } AzFramework::NativeWindowHandle windowId = reinterpret_cast(winId()); - return m_controllerList->HandleInputChannelEvent({GetId(), windowId, inputChannel}); + const bool eventHandled = m_controllerList->HandleInputChannelEvent({GetId(), windowId, inputChannel}); + // If our controllers handled the event and it's one we can safely consume (i.e. it's not an Ended event that other viewports might need), consume it. + return eventHandled && shouldConsumeEvent; } void RenderViewportWidget::OnTick([[maybe_unused]]float deltaTime, AZ::ScriptTimePoint time) diff --git a/Gems/Atom/Tools/MaterialEditor/Assets/MaterialEditor/LightingPresets/_TEMPLATE_.lightingconfig.json.template b/Gems/Atom/Tools/MaterialEditor/Assets/MaterialEditor/LightingPresets/_TEMPLATE_.lightingconfig.json.template index 7cfa7edbc3..6d87c5eb7b 100644 --- a/Gems/Atom/Tools/MaterialEditor/Assets/MaterialEditor/LightingPresets/_TEMPLATE_.lightingconfig.json.template +++ b/Gems/Atom/Tools/MaterialEditor/Assets/MaterialEditor/LightingPresets/_TEMPLATE_.lightingconfig.json.template @@ -2,7 +2,6 @@ "configurations": [ { "displayName": "Substance: