The ConfigurableStack makes configuring stacks and arrays through the Settings Registry easier than using direct serialization to a container like AZStd::vector. It does this by using JSON Objects rather than JSON arrays, although arrays are supported for backwards compatibility. Two key words were added:
- $stack_before : Insert the new entry before the referenced entry. Referencing is done by name.
- $stack_after : Insert the new entry after the referenced entry. Referencing is done by name.
to allow inserting new entries at specific locations. An example of a .setreg file at updates existing settings would be:
// Original settings
{
"Settings in a stack":
{
"AnOriginalEntry":
{
"MyValue": "hello",
"ExampleValue": 84
},
"TheSecondEntry":
{
"MyValue": "world"
}
}
}
// Customized settings.
{
"Settings in a stack":
{
// Add a new entry before "AnOriginalEntry" in the original document.
"NewEntry":
{
"$stack_before": "AnOriginalEntry",
"MyValue": 42
},
// Add a second entry after "AnOriginalEntry" in the original document.
"SecondNewEntry":
{
"$stack_after": "AnOriginalEntry",
"MyValue": "FortyTwo".
},
// Update a value in "AnOriginalEntry".
"AnOriginalEntry":
{
"ExampleValue": 42
},
// Delete the "TheSecondEntry" from the settings.
"TheSecondEntry" : null,
}
}
The ConfigurableStack uses an AZStd::shared_ptr to store the values. This supports settings up a base class and specifying derived classes in the settings, but requires that the base and derived classes all have a memory allocator associated with them (i.e. by using the "AZ_CLASS_ALLOCATOR" macro) and that the relation of the classes is reflected. Loading a ConfigurableStack can be done using the GetObject call on the SettingsRegistryInterface.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
Added new attribute "DisableEditButtonWheNoAssetSelected" to PropertyAssetCtrl. By default it's false, keeping the original behavior of leaving the edit button enabled and if it's clicked while there is no asset assigned it'll try to create a new one.
PhysX mesh asset property uses now this new feature.
Signed-off-by: moraaar moraaar@amazon.com
When `"Atom": {"GraphicsDevMode": true}` is found in a `.setreg` file,
PDBs for all shaders will be emitted to their corresponding output
locations. This allows global PDB generation without needing to
explicitly modify each `.shader` file to include the `GenerateDebugInfo`
compilation option.
Signed-off-by: Jeremy Ong <jcong@amazon.com>
* Collects failed assets on LyTestTools test failures
Signed-off-by: evanchia <evanchia@amazon.com>
* Changed query to all lines because of current asset logging bug
Signed-off-by: evanchia <evanchia@amazon.com>
* fixes per pr feedback
Signed-off-by: evanchia <evanchia@amazon.com>
* testing removing change for AR failure
Signed-off-by: evanchia <evanchia@amazon.com>
* Moved asset log artifact collection to after the results have been collected
Signed-off-by: evanchia <evanchia@amazon.com>
* Adding debug line to help debug AR failure
Signed-off-by: evanchia <evanchia@amazon.com>
* Made asset log collection non failing
Signed-off-by: evanchia <evanchia@amazon.com>
* moved asset log collection after test result collection
Signed-off-by: evanchia <evanchia@amazon.com>
* changed asset saving to non failing
Signed-off-by: evanchia <evanchia@amazon.com>
* improved logging and comments
Signed-off-by: evanchia <evanchia@amazon.com>
Terrain default surface material
This adds the ability to set a default material on detail material regions as a fallback material for when there are no materials for an assigned surface tag, or there's only one surface tag but its weight is less than 1.0.
This also fixes some issues
- The terrain surface list component now correctly sends notifications on tag changes.
- The terrain area material notifications bus now has two separate change notifications - one for material, the other for tag
- The terrain renderer will now only consider a single region per point queried instead of any region that might have a matching surface tag.
When duplicating an entity with a Gradient SurfaceData Component, it's possible to get a hang/crash due to a race condition between entity deactivation and the gradient preview job refresh. This change ensures that the preview job is canceled on deactivation.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
The purpose of this shader refactor is to split various material type
shaders into disparate pieces:
1. The original material type shaders now include an external file with
the actual shader entry points and structure of the algorithm (e.g.
depth pass, shadow pass, forward pass) but continue to specify the
SRGs used
2. Common functionality used across multiple shaders was consolidated
into routines implemented in the MaterialFunctions folder
(Materials/Types/MaterialFunctions)
3. The implementation shaders rely on common routines to be
included/imported prior to inclusion, and by design, make no
references to any Draw, Object, or Material SRG.
This refactor only includes the Standard and Enhanced material types,
and is, for the most part, a non-functional change. However, the Surface
definition needed to be augmented to include information needed by
lighting later. Modifying the Surface structure enables the lighting
loops to avoid any references to the Material SRG. This completes the
decoupling needed to support future Material canvas work, as well as a
future Material pipeline abstraction (where by the implementation
shaders can be injected by the user, customized per platform, and in
general, are simply decoupled from the materials themselves).
Signed-off-by: Jeremy Ong <jcong@amazon.com>