Hair - Adding the Hair Gem to the automated testing (#4498)

* Hair - Adding the Hair Gem to the automated testing

Signed-off-by: Adi-Amazon <barlev@amazon.com>

* Hair - added FP protection when not initialized

Signed-off-by: Adi-Amazon <barlev@amazon.com>

* Hair - renaming shader options for longtitude / azimuth contribution separation

Signed-off-by: Adi-Amazon <barlev@amazon.com>
This commit is contained in:
Adi Bar-Lev
2021-10-05 14:14:08 -04:00
committed by GitHub
parent 430b5682b7
commit bf7ae12402
8 changed files with 43 additions and 31 deletions
@@ -135,6 +135,11 @@ namespace AZ
void HairFeatureProcessor::EnablePasses(bool enable)
{
if (!m_initialized)
{
return;
}
for (auto& [passName, pass] : m_computePasses)
{
pass->SetEnabled(enable);
@@ -339,14 +344,14 @@ namespace AZ
resultSuccess &= InitPPLLFillPass();
resultSuccess &= InitPPLLResolvePass();
m_initialized = resultSuccess;
// Don't enable passes if no hair object was added yet (depending on activation order)
if (m_hairRenderObjects.empty())
if (m_initialized && m_hairRenderObjects.empty())
{
EnablePasses(false);
}
m_initialized = resultSuccess;
// this might not be an error - if the pass system is still empty / minimal
// and these passes are not part of the minimal pipeline, they will not
// be created.