The terrain feature processor was crashing due to an invalid shader name. The shader name has been fixed, but the feature processor has also been hardened so that it no longer crashes if a shader fails to load.
Also, while testing, this inadvertently exposed a second crash in EntitySerializer that occurs when components don't serialize in correctly.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* 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>
* First pass cleanup of some terrain components.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adding basic culling to terrain sectors
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adding default value for m_transform
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
This represents the very beginnings of the Terrain System presented in Sig-Content RFC 4 ( https://github.com/o3de/sig-content/blob/main/rfcs/rfc-4-terrain-system.md ). There is some basic working functionality in this PR, but the system as a whole should not be considered working yet. The gem is disabled by default in all projects.
All of the code below is contained in the Terrain Gem, which is disabled by default. The following components exist and can be experimented with, but should not be expected to be functionally complete yet:
Terrain World - level component for enabling terrain
Terrain World Debugger - level component for enabling terrain debugging features
Terrain Layer Spawner - component for defining a region of terrain
Terrain Height Gradient List - component for defining a list of gradients to use as terrain heights
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>