Add a deferred rendering pipeline with support for multiple material - types #700
+5,977
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR builds on PR 19231 from o3de.
This PR extends the sample RPI -> Mesh and implements a deferred rendering pipeline and material pipeline.
It uses a visibility buffer with one draw-call per mesh, and then renders the final image with one fullscreen draw-call per material-type (and shader options of the material). The sample viewer needs to be started with the cvar flag
r_deferredMaterialRenderingEnabledset to true (e.g. by specifyingr_deferredMaterialRenderingEnabled=trueon the commandline), so the fullscreen draw-calls for the used material-types will be generated.The pipeline does not use a Geometry buffer, but instead fetches the geometry data from the Mesh Buffers by using the MeshInfo - entries.
Skin Materialtype
The skin material-type was not implemented by the old deferred pipeline
Default Pipeline
Old deferred Pipeline
New Multimaterial deferred Pipeline
Material Canvas Emissive Material
Material canvas material that uses the world-position as emissive color. Using the world-position as base color would work, since the old deferred pipeline uses the
EvaluateSurface- function of the material to determine the base color, it does not support any emissive color.Default Pipeline
Old deferred Pipeline
New deferred Pipeline