Commit Graph

256 Commits (6766d10d1be624e65f6e60a5ca8771c1b34da478)

Author SHA1 Message Date
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
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
AMZN-stankowi b98a67e836
Better error reporting on mixing skinned and unskinned meshes. (#3158)
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
4 years ago
michabr cd5081a7c3
Fix byte alignment issue for index/vertex buffers (#3110)
* Fix byte alignment issue for index/vertex buffers
* Remove default alignment value when getting dynamic buffer

Signed-off-by: abrmich <abrmich@amazon.com>
4 years ago
antonmic 7d4022fbdf
Merge pull request #3035 from aws-lumberyard-dev/Atom/antonmic/PassBuilder
Changing pass builder to declare job dependencies on referenced .shader files and consequently removing the critical flag from the shader builder.
4 years ago
antonmic 706333466e Addressing PR feedback and making PassBuilder error if referenced shader isn't found
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
moudgils c2b8542bbd
Support for refresh rate and sync interval (#2989)
* Add support for querying the refresh rate and sync interval
4 years ago
antonmic 193fa3c918
Merge pull request #2584 from aws-lumberyard-dev/Atom/antonmic/SrgDebugImprovements
Shader resource group debug improvements
4 years ago
Benjamin Jillich 5c90bc0d58
Skip blend shapes that influence multiple meshes (#3009)
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
antonmic adf7a34ef5 Got PassBuilder shader dependency working and removed critical flag from shader builder
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 5472d6768e Minor improvements
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 43ae25b49b fixed compiler loss of precision warning
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 8d7d560d9d Merge branch 'dev' into Atom/antonmic/SrgDebugImprovements 4 years ago
antonmic 4beb66c9ca Making pass files declare dependency on shader files (part 01)
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 5f1e973b3f Removing condition from View SRG compilation
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 64cff38f82 Addressing PR feedback and fixed a small issue with the draw item count display
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
Esteban Papp 19d79f1559 Merge branch 'development' into cmake/SPEC-2513_w4267 4 years ago
Chris Burel 24740b3f86
Update the cloth rule to look for optimized meshes (#2737)
The cloth rule stores the name of a mesh node that is used to retrieve
cloth data from. However, at asset processing time, the model builder
switches things to look for the optimized version of a mesh. The cloth
rule was not doing this, so it would return the cloth data for the
unoptimized mesh. This resulted in the final mesh having some data from
the optimized mesh and cloth data from the non-optimized mesh.

This changes the cloth rule to use the optimized version of a mesh, if
it exists, and fall back to the unoptimized mesh when it does not exist.

This closes issue 2454.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
michabr 3a689aa319
Reenable support for UI Elements that use Render Targets (#2352)
* Re-add support for UI Elements that use Render Targets
* Move LyShine pass request from Atom's MainPipeline.pass to project's
* Make all dynamic draw contexts in LyShine draw to pass directly without the need of draw list tags
* Remove local RPI changes that are no longer needed
* Prevent crash if LyShine gem is enabled but its custom pass hasn't been added to the main render pipeline
* Revert to default UI pass if the LyShine pass has not been added to project's main render pipeline

Signed-off-by: abrmich <abrmich@amazon.com>
4 years ago
Esteban Papp b33a4db332 Merge branch 'development' into cmake/SPEC-2513_w4267 4 years ago
santorac 8542de8c32 Fixed a link error on android (clang) 4 years ago
santorac 7d84a005c0 Updated unit tests and fixed build failures. 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 14d2e38b90 Refactored how model material slots work in preparation to support more flexible material conversion options for the scene asset pipeline. The material slot IDs are based on the MaterialUid that come from SceneAPI. Since these IDs are also used as the AssetId sub-ID for the converted material assets, the system was just checking the material asset sub-ID to determine the material slot ID. But in order to support certain FBX material conversion options, we needed to break this tie, so the slot ID is separate from the AssetId of the material in that slot. This will allow some other material to be used in the slot, instead of being forced to use one that was generated from the FBX.
Here we inttroduce a new struct ModelMaterialSlot which formalizes the concept of material slot, with an ID, display name, and default material assignment. The ID still comes from the MaterialUid like before. The display name is built-in, rather than being parsed out from the asset file name. And the default material assignment can be any material asset, it doesn't have to come from the FBX (or other scene file).

This commit is just the preliminary set of changes. Cursory testing shows that it works pretty well but more testing is needed (and likely some fixes) before merging.

Here is what's left to do...
Add serialization version converters to preserve prior prefab data.
See if we can get rid of GetLabelByAssetId function only rely on the display name inside ModelMaterialSlot.
I'm not sure if the condition for enabling the "Edit Material Instance..." context menu item is correct.
Test actors
Lots more testing in general

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Jacob Hilliard 4d618ea619 Profiling: Add more instrumentation
Adds new instrumentation macros throughout the codebase, using the
visualizer to find where current instrumentation is lacking using the
shadowed sponza sample + editor. Some notes from exploring:

- We spend ~5ms in CullingScene: BeginCulling
- PipelineStateCache: Compact usually 1ms
- CompileImageBarriers takes most of the time in CompileResourceBarriers

Signed-off-by: Jacob Hilliard <jhlliar@amazon.com>
4 years ago
antonmic d693ee5dd3 merging latest
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 72f808876c Improvements to pass statistics and SRG debugability
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
pappeste 95914e3fd6 merging from development + fixing linux
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste 97f9ac870d Atom
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Steve Pham 4d5a985276
Enable AZSLc and Shader Compilation on Linux (#2338)
* Enable Shader Compilation support for Linux
* Add azslc package 3P definition for download
* Add AzslcGeader.azsli nad PlatformHeader.hlsli for Linux/Null and Linux/Vulkan (Copy of Android/Vulkan)
* Enable trait PAL_TRAIT_BUILD_ATOM_ASSET_SHADER_SUPPORTED for Linux
* Add platform builder file dependencies
* Updated AZ_TRAIT_ATOM_SHADERBUILDER_AZSLC to use new 3P linux version of azslc
* Add AtomShaderCapabilities.json, PlatformLimits.azasset for Linux (Copy from Android)
* Fix paths/values for Vulkan_Traits_Linux.h
* Enable trait PAL_TRAIT_BUILD_ATOM_ASSET_SHADER_SUPPORTED for Linux
* Enabled AZ_TRAIT_ATOM_VULKAN_LAYER_LUNARG_STD_VALIDATION_SUPPORT for Linux/Vulkan
* Added AzslcHeader.azsli, PlatformHeader.hlsli dependencies for Linux/Null and Linux/Vulkan in the platform builders for windows and mac for consistency

Signed-off-by: spham-amzn <spham@amazon.com>
4 years ago
Benjamin Jillich 001aa96fae
Merge pull request #2299 from aws-lumberyard-dev/jillich/TangentsGeneration
MikkT tangent generation support
4 years ago
Benjamin Jillich d987c45072 MikkT tangent generation support
* Default setting when no tangents rule: MikkT tangents.
* Calculates tangents/bitangents for all available uv sets.
* Creates tangent/bitangent data in in case they are not existing yet (as in: the source scene contains tangents/bitangents)
* Overwrites the tangent/bitangent data from the source scene in case MikkT is wished.
* Added helper functions to create tangent/bitangent scene nodes, finding tangent/bitangent data for a given uv layer and calculating the number of uv layers provided by the mesh scene node.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
moudgils 1c2f5ab6d5
Add support for LowEndRenderPipeline for mobile and the cleanup associated with it (#2292)
Signed-off-by: moudgils <moudgils@amazon.com>
4 years ago
amzn-mike fc75dd5fda
Fix python fbx tests (#2171)
* Update fbx test dbgsg files

Remove rc products from fbx test expected output
Update warning counts for 2 of the tests - these are due to missing material properties
Add SkipAtomOutput setting to disable atom material and mesh processing in scene as these pull in a lot of external dependencies to Process
Removed BlendShapeData and MeshData debug output of positions/normals/faces
Updated ManifestImportRequestHandler to remove warning about Joining 2 absolute paths
Updated AssImpMaterialImporter to use new GenerateRelativeSourcePath API to fix issue where relative path generation failed with tmp project directories

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add comment for setting

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add override dbgsg file to python test

The mesh optimizer specifically avoids creating optimized nodes for nodes that are not selected, resulting in a different scene graph that requires a different dbgsg file to compare with

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Replace hardcoded passing of specific registry setting to instead pass all registry settings to AssetBuilder

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
Qing Tao 9053079a56
ATOM-15935 Adding draw to pass support to DynamicDrawContext (#2248)
The DynamicDrawContext can output to different scopes: Scene, RenderPipeline or RasterPass.
Updated RasterPass so it can handle not only draw calls from Views but also from DynamicDrawContexts.
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
moudgils 7ef383580e
Metal sync interval support (#2187)
* Metal sync interval support
Add shader name to SRGPool for debugging purposes
Set default value of rpi_vsync_interval to 1

Signed-off-by: moudgils <moudgils@amazon.com>
4 years ago
AMZN-tpeng cd819062f9
[ATOM][RHI][Vulkan][Android] - use bit conversion from enum to check for gpu query type support (#2141)
ATOM-15742

Signed-off-by: Tony Peng <tonypeng@amazon.com>
Signed-off-by: Peng <tonypeng@amazon.com>
4 years ago
Jeremy Ong 11327b59ea
Expose vsync interval with new cvar rpi_vsync_interval and support Vulkan vsync (#2061)
* Expose vsync interval with new cvar rpi_vsync_interval

On change, the rpi_vsync_interval is broadcasted to a new event on
the WindowNotificationBus and all swapchains are recreated with the
new vsync value.

Signed-off-by: Jeremy Ong <jeremycong@gmail.com>

* Add vsync interval support to the Vulkan RHI

Vsync intervals are not intrinsically supported using the Vulkan
swapchain extension. Instead, extra presents are enqueued for each
extra vblank requested past 1. Swapchain recreation is triggered
when transitioning to and from the FIFO presentation mode (when
rpi_vsync_interval transitions from and to 0 respectively).

Signed-off-by: Jeremy Ong <jeremycong@gmail.com>

* Rollback vsync > 1 implementation on Vulkan and leverage *Internal pattern

Signed-off-by: Jeremy Ong <jeremycong@gmail.com>
4 years ago
Chris Galvan e924ed0b86 Merged stabilization/2106 to development; Resolved merge conflicts
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
dmcdiar 4efecb88a5 Merge branch 'stabilization/2106' into Atom/dmcdiar/ATOM-15951 4 years ago
Chris Galvan 3b1873b045 Merged stabilization/2106 -> development (resolved merge conflicts).
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
5 years ago
Qing Tao 6d9230e292
ATOM-15939 Add support to capture attachment for ParentPass (#1887)
* ATOM-15939 Add support to capture attachment for ParentPass
- Moved the attachment read back support to Pass class so it supports both ParentPass and RenderPass.
- Added support to output input or output state of an InputOutput attachment.
- Enabled showing ParentPass attachments in PassTree tool.

Signed-off-by: Tao <qingtao@amazon.com>
5 years ago
dmcdiar 762b3ee582 Suspended ray tracing for DiffuseProbeGrids that are not visible, either off-screen or behind an occlusion culling plane
Added a culling flag that indicates if the cullable object is currently visible in any view

Signed-off-by: dmcdiar <dmcdiar@amazon.com>
5 years ago
Tommy Walton 5b9647c11b
Fix for ATOM-15923 : Editor Spends Several Minutes Entering/Ending Play Game Mode (#1846)
* Cut off kd-tree generation if more than 10 percent of triangles straddle split axis

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Switched to aznumeric_cast and added a comment with a JIRA to follow up on

Signed-off-by: amzn-tommy <waltont@amazon.com>
5 years ago
Chris Burel 80bdd4e17b
Clang compile fixes (#1876)
* Fix compile error from -Wwritable-strings

Signed-off-by: Chris Burel <burelc@amazon.com>

* Fix flags used to build MaskedOcclusionCulling with clang

Signed-off-by: Chris Burel <burelc@amazon.com>

* Fix class that has a final destructor, but the class itself was not final

Signed-off-by: Chris Burel <burelc@amazon.com>
5 years ago
nvsickle 14cab097c7 Fix DPI change callback not being wired up correctly.
Signed-off-by: nvsickle <nvsickle@amazon.com>
5 years ago
nvsickle 21dbe8b48f Address review feedback
Signed-off-by: nvsickle <nvsickle@amazon.com>
5 years ago
nvsickle dd20a598b2 Add DPI scaling to IMGUI
Signed-off-by: nvsickle <nvsickle@amazon.com>
5 years ago