Commit Graph

6 Commits (280796e1f4c916934c62dbdd0bb65d8717da1e2f)

Author SHA1 Message Date
Mike Balfour 280796e1f4
Fix GHI 4041 Terrain Shader Crash (#4050)
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>
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
Steve Pham e6573766c2
Fixes for release builds for unused variable warnings (#4000)
Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Ken Pruiksma 0c7dfce5a0
First pass terrain cleanup (#3753)
* 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>
4 years ago
Jeremy Ong a9b4ad3486 Compile out tracker in release mode
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Mike Balfour 40f41689ee
Initial Terrain System (#3401)
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>
4 years ago