Files
o3de/Gems/AtomTressFX/Code/Passes/HairShortCutGeometryDepthAlphaPass.h
Adi Bar-Lev 64bbc700fa Hair - ShortCut rendering technique and pipeline with Marschner lighting model (#4871)
- This rendering technique reduces the memory required per pipeline by 750MB compared to the PPLL technique!!
- Using 3 screen buffers representing the closest 3 hair gragments depths.
- Going through second geometry pass that disqualify any fragment further than the third depth, the technique blends the three closes shaders hair fragments.
- Supports the Marschner lighting model (big change from the original TressFX 4.1 implementation)
- The current technique is almost twice the performance of the PPLL but not quite as advacned when come to final visual quality.

Remarks:
Unlike the PPLL, this technique is still lacking some of the advanced features added to the PPLL such as
1. Back lobe (TT) conseal by depth comparison
2. Thickness dependency in light transfer (mainly TT)
3. Allowing TT transfer for thin separated hair strands (might be supported by default with no distinction)

Signed-off-by: Adi-Amazon <Adi Bar-Lev 82479970+Adi-Amazon@users.noreply.github.com>
Signed-off-by: Adi-Amazon <Adi Bar-Lev barlev@amazon.com>
Signed-off-by: Adi-Amazon <Adi Bar-Lev 82479970+Adi-Amazon@users.noreply.github.com>
Signed-off-by: Adi-Amazon <Adi Bar-Lev barlev@amazon.com>

Co-authored-by: Adi-Amazon <Adi Bar-Lev 82479970+Adi-Amazon@users.noreply.github.com>
2021-10-21 14:29:53 -04:00

50 lines
1.7 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <Passes/HairGeometryRasterPass.h>
namespace AZ
{
namespace RHI
{
struct DrawItem;
}
namespace Render
{
namespace Hair
{
//! This geometry pass uses the following Srgs:
//! - PerPassSrg shared by all hair passes for the shared dynamic buffer
//! - PerMaterialSrg - used solely by this pass to alter the vertices and apply the visual
//! hair properties to each fragment.
//! - HairDynamicDataSrg (PerObjectSrg) - shared buffers views for this hair object only.
//! - PerViewSrg and PerSceneSrg - as per the data from Atom.
class HairShortCutGeometryDepthAlphaPass
: public HairGeometryRasterPass
{
AZ_RPI_PASS(HairShortCutGeometryDepthAlphaPass);
public:
AZ_RTTI(HairShortCutGeometryDepthAlphaPass, "{F09A0411-B1FF-4085-98E7-6B8B0E1B2C3D}", HairGeometryRasterPass);
AZ_CLASS_ALLOCATOR(HairShortCutGeometryDepthAlphaPass, SystemAllocator, 0);
static RPI::Ptr<HairShortCutGeometryDepthAlphaPass> Create(const RPI::PassDescriptor& descriptor);
protected:
explicit HairShortCutGeometryDepthAlphaPass(const RPI::PassDescriptor& descriptor);
// Pass behavior overrides
void BuildInternal() override;
};
} // namespace Hair
} // namespace Render
} // namespace AZ