Commit Graph

279 Commits (d9cbc97ec07909e6ddb6687e0c22da07cc6bbdb6)

Author SHA1 Message Date
Qing Tao d9cbc97ec0
ATOM-16063 Remove SetShaderResourceGroupCallback in scene and update scene srg handling (#3969)
ATOM-16273 Compiling SceneSRG before updating it can cause a gpu crash

Changes include:
1. Removed Scene::SetShaderResourceGroupCallback() function and clean up code which use this function.
2. Moved SceneTimeSrg.azsli to RPI's DefaultSceneSrg folder and setup the constants in RPI::Scene
3. Add AZ::Event for Scene's update srg event which features and update scene srg at proper place
4. UpdateTransformServcie FP to use PrepareSceneSrg event handler.
5. Clean up shaders and srgs used in project templates.

Signed-off-by: Qing Tao <qingtao@amazon.com>
4 years ago
Mike Balfour 0505f200e5
Remove extra/bad profile markers (#4031)
Many of these are just extra noise in the profile, but the one in Archive.cpp could also cause PIX to crash.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Artur K 3a4937456a
Build time reduction: AzStdOnDemandReflection (#3111)
* Move a few specializations from AzStdOnDemandReflection.inl to cpp file

This reduces compilation time and produced profile/debug file sizes.

The specializations for string and string_view are only implemented for 'char' type, since
others are not used anywhere.

Extracted `Reflect` method from `ClientAuthAWSCredentials` to a cpp file.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Windows build fixes.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Added missing license.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix missing spaces in template argument lists

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Clang format on ClientAuthAWSCredentials.cpp

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Merge upstream development and fix linux build.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
moraaar 564925c285
Fix assert: Avoid doing operations over invalid Aabb (#3757)
Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
mrieggeramzn e15634a867
Adding receiver plane bias to directional shadows (#3305)
* Adding receiver plane bias to directional shadows

* fixing whitespace issue

* Slight spelling change
4 years ago
Chris Galvan d590a91fe7 Implemented helper method of QFileDialog::getSaveFileName to prevent user from saving files with invalid names.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Esteban Papp 6b96be82ea Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Legacy/CrySystem/Log.cpp
#	Code/Tools/Standalone/Source/Driller/Annotations/AnnotationHeaderView.cpp
#	Code/Tools/Standalone/Source/Driller/AreaChart.cpp
#	Code/Tools/Standalone/Source/Driller/AreaChart.hxx
#	Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp
#	Code/Tools/Standalone/Source/Driller/DrillerCaptureWindow.cpp
#	Code/Tools/Standalone/Source/Driller/Profiler/ProfilerDataView.cpp
4 years ago
Guthrie Adams 6a15a2d91b
Merge pull request #3350 from aws-lumberyard-dev/Atom/mriegger/fixupeditorshadowoptions
Fixing the softening boundary width editor options
4 years ago
Esteban Papp 9c7b55a31d Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/Bits.h
#	Gems/Atom/RHI/Code/Include/Atom/RHI/IndexBufferView.h
#	Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp
#	Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindow.cpp
4 years ago
Guthrie Adams 701e36f493
Merge pull request #2752 from greenrazer/ExposeLodControls
Expose lod controls
4 years ago
santorac 60d137c5b6
Merge pull request #2746 from aws-lumberyard-dev/Atom/santorac/OptionalSceneApiMaterialConversion3
Made Model Material Conversion Optional

Added a new registry setting that disables automatic conversion of materials from model files like FBX.

By default, processing of model files (like FBX) automatically convert the included materials to Atom materials, using StandardPBR. This adds a job dependency on StandardPBR.materialtype, which propagates to any related azsl files as well. Thus any change to azsl code will cause all model files in the project to rebuild.

Some game teams have no interest in using the auto-converted materials; they always use a Material Component to apply material overrides for every mesh. This new setting allows teams to disable material auto-conversion for the entire project, thus removing the job dependency on StandardPBR.materialtype. Instead, every mesh will be assigned the same default material. Any change to azsl code will cause that one default material to rebuild, but this will not trigger any models to rebuild.

Details:
- Added /O3DE/SceneAPI/MaterialConverter registry settings for configuring the scene material converter. It includes an enable flag, and a default material to use when conversion is disabled.
- Added SceneBuilderDependencyRequests::AddFingerprintInfo which allows SceneAPI components to modify the scene builder analysis fingerprint. We use this to reprocess scene files when the material converter settings change.
- Updated SceneAPI's material asset builder to skip the StandardPBR dependency when material conversion is disabled.
- Added some code to MaterialComponentController to handle an edge case that may when disabling material conversion on an existing project, and assigned materials disappear.

Testing:
- Changing the registry setting does trigger a rebuild of the fbx files.
- When material conversion is disabled, changing an azsl file does not cause fbx files to rebuild, but the shader still reloads as expected.
- Made a test level using multiple models with multiple meshes, made various adjustments to the material slots for each mesh, and tried switching the material conversion registry setting from true to false. (Details below)
- Merged this change to a customer's fork and tested on their existing content.

Details about my test level:
- Made a new test level AtomTest project
- Added two entities, both using multi-mat_mesh-groups_1m_cubes.fbx
- Added a material component to both entities
  - Entity 1 material assignments
    - Blue_Zaxis: left as-is
    - Green_Yaxis: exported the material
    - Red_Xaxis: exported the material, and changed the material instance color to pink
    - StingrayPBS1: exported the material, scaled the UVs in the exported material source, and changed the material instance color to green.
    - With_Texture: selected an existing brick material, changed the material instance color to red.
  - Entity 2 material assignments
    - Default Material: set to an existing brick material
    - Blue_Zaxis: manually assigned built-in material that was converted from fbx
    - Green_Yaxis: manually assigned built-in material that was converted from fbx, and changed the material instance color to orange
4 years ago
santorac b6dfb86007 Removed unnecessary #include
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac de932c62b3 Reverted changes in MaterialComponentController for an obsucre edge case. We'll handle the case of missing material assets more generally as a separate task.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Kyle B dfc5baae34 fixed casting errors
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 8ab9a88683 added cast to version change system lodoverride
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Esteban Papp c19c4af1e1 Gems/Atom
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
mrieggeramzn b3f1a46559 Fixing the softening boundary width editor options
Signed-off-by: mrieggeramzn <mriegger@amazon.com>
4 years ago
Kyle Birnbaum 2b1f4c2fc0
Merge branch 'development' into ExposeLodControls 4 years ago
Kyle B b53a085700 Merge branch 'development' into ExposeLodControls 4 years ago
Guthrie Adams aa642bd566
Merge pull request #3156 from aws-lumberyard-dev/Atom/guthadam/material_component_api_script_canvas_support
AtomTools: better script canvas support for material component
4 years ago
santorac 079e018e8e Merge remote-tracking branch 'upstream/development' into Atom/santorac/OptionalSceneApiMaterialConversion3 4 years ago
Esteban Papp f8e99cd7dd Merge branch 'development' into cmake/SPEC-2513_w4244
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/CryEditDoc.cpp
#	Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp
#	Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp
#	Gems/PhysXDebug/Code/Source/SystemComponent.cpp
4 years ago
Jeremy Ong df9b4d4a2f Deprecate profiler categories based on global enum
(to be supplanted by registered budgets in the future)

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Ken Pruiksma 90845313fb
Overhaul of LookModification (#3282)
* Fixed log2 shaper equations. Added bspline sampling for lut. Added options for custom log2 or linear lut with custom exposure ranges.

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Added support for PQ shaper. Added shader option & cvar for lut sampling quality. Fixed issues in the blend lut shader that were causing considerable quality loss. No longer always changing to the log2 1000 nit shaper when blending luts - if the source luts all use the same shaper, keep using that shaper in the blended lut.

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Fixed an integer -> float

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Minor PR reveiw updates

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
4 years ago
Kyle B e2a9c58cae fixed unnessisary qualifier error
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
pappeste d5ed0cc385 AtomLyIntegration
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 75c388b746 change conversions to static_cast
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 90cad016de Gems/Atom
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste b3e895d10c fixed AtomLyIntegration
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Guthrie Adams c67a9f3d12 Updated material component request bus to better support script canvas
Change all name parameters to use standard string so that they could be headed in in script canvas nodes and RPE

Added explicitly type functions for getting and saving property overrides

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Chris Galvan 994403bfa0 Updated Radius Weight Modifier component name for consistency.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Kyle B 6acbea722e minor syntax changes and adding a refresh tree attributeto the editor component
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B cea334dbc4 Fixed enum value problems
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 0c05c9f204 [not working] Made lod selection more generic for further work
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 51271fa15b Created group for Lod component data
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 3db93a564d Made formatting changes per pull comments, incuding adding comments, changing spacing, and changing the ui type of component fields
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Esteban Papp b33a4db332 Merge branch 'development' into cmake/SPEC-2513_w4267 4 years ago
Chris Santora 36abde95a9 Added a new registry setting that disables automatic conversion of materials from model files like FBX.
By default, processing of model files (like FBX) automatically convert the included materials to Atom materials, using StandardPBR. This adds a job dependency on StandardPBR.materialtype, which propagates to any related azsl files as well. Thus any change to azsl code will cause all model files in the project to rebuild.

Some game teams have no interest in using the auto-converted materials; they always use a Material Component to apply material overrides for every mesh. This new setting allows teams to disable material auto-conversion for the entire project, thus removing the job dependency on StandardPBR.materialtype. Instead, every mesh will be assigned the same default material. Any change to azsl code will cause that one default material to rebuild, but this will not trigger any models to rebuild.

Details:
- Added /O3DE/SceneAPI/MaterialConverter registry settings for configuring the scene material converter. It includes an enable flag, and a default material to use when conversion is disabled.
- Added SceneBuilderDependencyRequests::AddFingerprintInfo which allows ScenePI components to modify the scene builder analysis fingerprint. We use this to reprocess scene files when the material converter settings change.
- Updated SceneAPI's material asset builder to skip the StandardPBR dependency when material conversion is disabled.
- Added some code to MaterialComponentController to handle an edge case that may when disabling material conversion on an existing project, and assigned materials disappear.

Testing:
- Changing the registery setting does trigger a rebuild of the fbx files.
- When material conversion is disabled, changing an azsl file does not cause fbx files to rebuild, but the shader still reloads as expected.
- Made a test level using multiple models with multiple meshes, made various adjustments to the material slots for each mesh, and tried switcihng the material conversion registry setting from true to false. (Details below)
- TODO: Will merge this change to a customer's fork and test on their existing content.

Details about my test level:
- Made a new test level AtomTest project
- Added two entities, both using multi-mat_mesh-groups_1m_cubes.fbx
- Added a material component to both entities
  - Entity 1 material assignments
    - Blue_Zaxis: left as-is
    - Green_Yaxis: exported the material
    - Red_Xaxis: exported the material, and changed the material instance color to pink
    - StingrayPBS1: exported the material, scaled the UVs in the exported material source, and changed the material instance color to green.
    - With_Texture: selected an existing brick material, changed the material instance color to red.
  - Entity 2 material assignments
    - Default Material: set to an existing brick material
    - Blue_Zaxis: manually assigned built-in material that was converted from fbx
    - Green_Yaxis: manually assigned built-in material that was converted from fbx, and changed the material instance color to orange

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Kyle B 1a48118ece Added comments and formatted as close to the original
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 5b88d96eec Exposed fields to the mesh component giving greater Lod control from the editor
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
santorac b407e501e3 Merge branch 'development' into Atom/santorac/OptionalSceneApiMaterialConversion 4 years ago
Chris Santora 13679a7cc3 Reverted partial support for property overrides on default material assignments. This needs more UI design discussion first.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Santora 1a478608a7 Restored the previous behavior of preventing material property overrides when there is no explicit material override assignment.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Santora b19a895889 Reverted accidentally commented out code.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Santora 6fa891848d Factored out redundant call to GetMaterialSlots().
Removed code that was intended to handle duplicate default material assignments, but duplicacate default material assignments aren't possible yet.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Santora 21d5baa184 Fixed an issue where I had changed prior functionality by mistake, preventing exported materials from replacing material assignments.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Santora abec7a4f5b Fixed an issue where a default material should show up as a filled-in value in the UI even though it should appear as empty, indicating the default is being used.
Also, I'm going back on what I said in my last commit, and removing the converter for version 3 in EditorMaterialComponent::ConvertVersion. The code that I had put in before wouldn't work because it was relying on the new m_defaultMaterialAsset which will be empty for old data. The only way we could support version conversion is if we preserve legacy versions of multiple types like EditorMaterialComponentSlot and MaterialAssignmentId. Since this serialization version is old and pre-dates the public release of O3DE, it's unlikely that we need to continue supporting this version so isn't worth maintaining.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Santora 75b4d62dcb Restored the version converter EditorMaterialComponent::ConvertVersion for version 3, which wasn't possible with an earlier version of my changes.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Santora fec79a7d53 Moved the material slot list from ModelLodAsset to ModelAsset, so all the slots live in one main list. This removes data duplication between LODs and cleans up the code a bit.
I had to update the ModelLod class to take in both the ModelLodAsset and ModelAsset for initialization so it can fetch the slots for each mesh.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Santora 28671c8546 Addressed suggestions from gadams3 to make EditorMaterialComponent get the default material assets from its own data rather than fetching them from the asset. Presumably this should give more reliable behavior.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago