Commit Graph

583 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
Ken Pruiksma d17ac748ac
Various terrain improvements: (#3942)
* Various terrain improvements:
- Height now stored in a R16_unorm to decrease the amount of memory / memory bandwidth needed for the height field
- Many simplifications to the feature processor
- Added a shader to render to the depth pre pass
- Pulled common functionality needed by depth and forward to a common include shader
- Forward shader now outputs to all the expected render targets
- Adjusted the way normals and lighting are being calculated

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

* Adding missing shader files. Updated terrain shader to alter the color slightly with height.

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

* Removed pixel shader code from terrain depth pass

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

* Renamed the depth pass shaders to no longer indicate they include a pixel shader.

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

* Removing unneeded code from TerrainCommon.azsli

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
4 years ago
dmcdiar 5f95c41eb5 Added RayTracingPass support for the Scene Srg.
Signed-off-by: dmcdiar <dmcdiar@amazon.com>
4 years ago
dmcdiar fd007548e0 MeshFeatureProcessor::SetVisible now adds or removes the mesh from the raytracing scene as appropriate.
Signed-off-by: dmcdiar <dmcdiar@amazon.com>
4 years ago
Esteban Papp 9a6a1ba97a fixes monolithic release
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
hershey5045 4249ceeae7
Add material property names to material assets, disable FBX dependency on materialtype files. (#3408)
* Add material property names to material assets, disable FBX dependency on materialtype files.

Signed-off-by: Robin <rbarrand@amazon.com>

* Add reflection for MaterialAssets. Update member variable comment.

Signed-off-by: Robin <rbarrand@amazon.com>

* Switch cvar to using bus value. Refine comments.

Signed-off-by: Robin <rbarrand@amazon.com>

* Refactor functions and refine comments.

Signed-off-by: Robin <rbarrand@amazon.com>

* Realign property values when material property names are populated.

Signed-off-by: Robin <rbarrand@amazon.com>

* Switch PostLoadInit check to on asset status ready. Add realign property values code to PostLoadInit as well.

Signed-off-by: Robin <rbarrand@amazon.com>

* Stash@{1} code.

Signed-off-by: Robin <rbarrand@amazon.com>

* Refactor realignment code into the right places.

Signed-off-by: Robin <rbarrand@amazon.com>

* Remove pragma optmize off.

Signed-off-by: Robin <rbarrand@amazon.com>

* More refactoring.

Signed-off-by: Robin <rbarrand@amazon.com>

* Refactor comments and remove code no longer needed.

Signed-off-by: Robin <rbarrand@amazon.com>

* Refactor comments and remove unused include.

Signed-off-by: Robin <rbarrand@amazon.com>

* Comment refactor, corrected some code.

Signed-off-by: Robin <rbarrand@amazon.com>

Co-authored-by: Robin <rbarrand@amazon.com>
4 years ago
Qing Tao b9c0b2a5f7
Fixed a crash issue with RHI::Fence when trying to capture screenshot which null renderer is used. (#3802)
ATOM-16292, ATOM-16243, ATOM-15493

Signed-off-by: qingtao <qingtao@amazon.com>
4 years ago
Jonny Galloway 37e5ef29bb
Atom/gallowj/color grading dev (#3751)
* color grading workflow assets, python scripts, ~and test data for Nuke and PS.

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* minor changes

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* pep8 reformate code style, clean up, address CR

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* Pep8 refactor, some DRY refactoring.

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* simplification write_azasset()

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* corrected code and further simplified ()

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* updated readme.txt, I was mistakenly converting the wrong lut to engine

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* refactoring, simplification and some re-org

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* fixed bad loop in old_lut_helper

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* improve the lut_helper and corrected lut shaping

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* skip non-digit metadata in 3DL files

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* file name fix

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* nit: renamed a tag in comment

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* style

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* cleanup, cmd readme

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* fixed WINGHOME

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* Updated the readme with basic instructions

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* fixed py bootstrapping errors

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* removed log file (shouldn't be there)

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* re-gen bad test lut (forgot)

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* simplify bootstrap, enhance initialize and oiio access, remove lrg .PSD files

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* bump py rev2 in bat files for colorgrading

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* removed debug flag not used, caused failure

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

Co-authored-by: Jonny Gallowy <~gallowj@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
Jonny Galloway 6f589ad50c
color grading workflow (#3152)
* color grading workflow assets, python scripts, ~and test data for Nuke and PS.

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* minor changes

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* pep8 reformate code style, clean up, address CR

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* Pep8 refactor, some DRY refactoring.

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* simplification write_azasset()

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* corrected code and further simplified ()

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* updated readme.txt, I was mistakenly converting the wrong lut to engine

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* refactoring, simplification and some re-org

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* fixed bad loop in old_lut_helper

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* improve the lut_helper and corrected lut shaping

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* skip non-digit metadata in 3DL files

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* file name fix

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* nit: renamed a tag in comment

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* style

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* cleanup, cmd readme

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* fixed WINGHOME

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* Updated the readme with basic instructions

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* fixed py bootstrapping errors

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* removed log file (shouldn't be there)

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

* re-gen bad test lut (forgot)

Signed-off-by: Jonny Gallowy <~gallowj@amazon.com>

Co-authored-by: Jonny Gallowy <~gallowj@amazon.com>
4 years ago
Steve Pham fa0f2a1007
Fix unused warnings release (#3677)
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Linux
* Release build fix for Mac
* Release build fix for iOS

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Qing Tao f2eb8ff51f
ATOM-16237 Using setting registry to RPI system settings (#3663)
* ATOM-16237 Using setting registry to RPI system settings
Changes include:
- Remove RHISystemDesriptor since the pre-registered draw list tag is not needed.
- Remove EitorContext which was for system component settings.
- Add atom_rpi.setreg file
- Add getting RPISystemDescriptor from setting registry.

Signed-off-by: qingtao <qingtao@amazon.com>
4 years ago
Qing Tao c32740ad53
Removed all preview.png and references of preview.png in all Atom related gems. (#3664)
Signed-off-by: qingtao <qingtao@amazon.com>
4 years ago
Esteban Papp 48c959e359
[Windows] Debug build error in OpenImageIO 3rdParty library (#3625)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Chris Burel ec0278b899
Configure default Atom assets to be enabled on the linux platform (#3611)
Signed-off-by: Chris Burel <burelc@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
Jeremy Ong 07a14bdce1 Add AZ_BUDGET_DEFINE/AZ_BUDGET_DECLARE and remove driller
NOTE: The memory driller is still intact for now to avoid needing to
modify allocators, but the frame/cpu portions of driller and the
standalone executable are now gone.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Ken Pruiksma ef5b49fc2b
Adjust the sharpness of TAA's Catmull-Rom filter based on local area luminance (#3400)
* Adjust the sharpness of TAA's Catmull-Rom filter based on local area luminance.
This helps prevent ringing artifacts in high contrast areas. Due to Catmull-Rom's use of negative weights, it's possible to have a very high value neighbor sample with a negative weight completely overwhelm the result leading to a negative output. This change reduces the sharpness of the catmull rom filter in high contrast areas so the negative weights contribute less to the final result.

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

* PR review feedback fixes - more comments and updated the way the sharpness equation was written for clarity.

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
4 years ago
Esteban Papp d91dbe3d92 Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
carlitosan 4e0399b283
Merge pull request #3309 from aws-lumberyard-dev/carlitosan/development
JSON serialization of SC Editor Assets
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
chcurran 794c22c02e merge latest
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
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
michabr 89cc27fdef
Fix input priority conflict with LyShine and ImGuiPass (#3329)
* Fix input priority conflict with LyShine and ImGuiPass

Signed-off-by: abrmich <abrmich@amazon.com>

* Add GetPriorityDebugUI() input listener priority

Signed-off-by: abrmich <abrmich@amazon.com>
4 years ago
Esteban Papp 804d833bb9 Gems/Atom
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
santorac 6b23e07af4 Changed MaterialConverterBus GetMaterialTypePath() to return a string instead of char*
Minor code cleanup.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Esteban Papp b96b99363c Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp c8c29b1aff
Enable warning MSVC 4296: 'operator': expression is always false 4 years ago
moudgils b2b6886338
Fixes asserts related to buffer allocation using null rhi (#3367)
Fixes GPU crashes when releasing Indirect draw and query related dx12 objects
Fixes imgui profiler related to viewing buffer allocations

Signed-off-by: moudgils <moudgils@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
Esteban Papp b3023242d0 Merge branch 'development' into cmake/win_fix_warn_4296
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
moudgils aa68122002
Atom starter game ios fixes (#3297)
* Various fixes for AtomStarterGame on ios
 - Use low end pipeline on ioos by default for BoootStrapComponent
 - Track the need to bind null heap within Argument buffers
 - Only bind the null heap if its needed
 - Track its usage for Vertex/Fragment stages
 - Increase null dummy buffer to 1K to address GPU crash oon thee first frame

Signed-off-by: moudgils <moudgils@amazon.com>
4 years ago
Esteban Papp a35464ca08 more fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Kyle B e410eecd93 fixed mesh feature processor abstract interface
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Esteban Papp cf6c7c4d8d some unused fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 62a0041245 enable warning 4296: 'operator': expression is always false
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
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
Esteban Papp 61f7fe5dc5 Merge branch 'development' into cmake/AddressSanitizer
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 68b04fa6c1 Merge branch 'development' into cmake/AddressSanitizer
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Legacy/CryCommon/LegacyAllocator.h
4 years ago
santorac 079e018e8e Merge remote-tracking branch 'upstream/development' into Atom/santorac/OptionalSceneApiMaterialConversion3 4 years ago
Esteban Papp 2521ad2301 Merge branch 'development' into cmake/SPEC-2513_w4244
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp
4 years ago
jiaweig 6766d10d1b
ATOM-13883 [RHI][Core] - Moving RHI init settings to the new settings registry system (#3086)
* Moved PlatformLimits to setreg. Removed Device PostInit. Some clean up.

Signed-off-by: jiaweig <jiaweig@amazon.com>

* Move setreg loading the PlatformLimitsDescriptor super class.

Signed-off-by: jiaweig <jiaweig@amazon.com>

* Apply same implementation for fake device used in unit tests

Signed-off-by: jiaweig <jiaweig@amazon.com>

* Add implementation for Null renderer. Swap order for register RHI interface in initialization.

Signed-off-by: jiaweig <jiaweig@amazon.com>

* Move back setreg from PlatfromLimitsDescriptor to Device, due to Linux dependency issue.

Signed-off-by: jiaweig <jiaweig@amazon.com>

* Changed the function to take in RHI backend name

Signed-off-by: jiaweig <jiaweig@amazon.com>
4 years ago
Esteban Papp d0238a5977 More fixes after merge
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
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 a5f072f7a9 Remove statistics profiler
Signed-off-by: Jeremy Ong <jcong@amazon.com>
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