@@ -955,12 +955,12 @@ namespace AZ
955
955
956
956
bool RenderPipeline::SetActiveAAMethod (AZStd::string aaMethodName)
957
957
{
958
- AntiAliasingMode aaMethod = GetAAMethodByName (aaMethodName);
959
- if (aaMethod == AntiAliasingMode::Default)
958
+ AntiAliasingMode antiAliasingMode = GetAAMethodByName (aaMethodName);
959
+ if (antiAliasingMode == AntiAliasingMode::Default)
960
960
{
961
961
return false ;
962
962
}
963
- m_activeAAMethod = aaMethod ;
963
+ m_activeAAMethod = antiAliasingMode ;
964
964
return SetAAMethod (this , m_activeAAMethod);
965
965
}
966
966
@@ -1016,25 +1016,27 @@ namespace AZ
1016
1016
1017
1017
bool RenderPipeline::SetAAMethod (RenderPipeline* pipeline, AZStd::string aaMethodName)
1018
1018
{
1019
- AntiAliasingMode aaMethod = GetAAMethodByName (aaMethodName);
1020
- return SetAAMethod (pipeline, aaMethod );
1019
+ AntiAliasingMode antiAliasingMode = GetAAMethodByName (aaMethodName);
1020
+ return SetAAMethod (pipeline, antiAliasingMode );
1021
1021
}
1022
1022
1023
- bool RenderPipeline::SetAAMethod (RenderPipeline* pipeline, AntiAliasingMode aaMethod )
1023
+ bool RenderPipeline::SetAAMethod (RenderPipeline* pipeline, AntiAliasingMode antiAliasingMode )
1024
1024
{
1025
- if (aaMethod == AntiAliasingMode::Default)
1025
+ if (antiAliasingMode == AntiAliasingMode::Default)
1026
1026
{
1027
1027
return false ;
1028
1028
}
1029
1029
1030
- static AZStd::unordered_map<AntiAliasingMode, Name> AAPassNamesLookup = {
1031
- {AntiAliasingMode::SMAA, Name (" SMAA1xApplyLinearHDRColorPass" )},
1032
- {AntiAliasingMode::TAA, Name (" TaaPass" )}
1030
+ static AZStd::unordered_map<AntiAliasingMode, AZStd::vector< Name> > AAPassNamesLookup = {
1031
+ {AntiAliasingMode::SMAA, { Name (" SMAA1xApplyLinearHDRColorPass" )} },
1032
+ {AntiAliasingMode::TAA, { Name (" TaaPass" ), Name ( " ContrastAdaptiveSharpeningPass " )} }
1033
1033
};
1034
1034
1035
1035
for (auto & aaPassMap : AAPassNamesLookup)
1036
1036
{
1037
- EnablePass (pipeline, aaPassMap.second , aaPassMap.first == aaMethod);
1037
+ AZStd::for_each (aaPassMap.second .begin (), aaPassMap.second .end (), [&pipeline, &aaPassMap, &antiAliasingMode](Name passName){
1038
+ EnablePass (pipeline, passName, aaPassMap.first == antiAliasingMode);
1039
+ });
1038
1040
}
1039
1041
return true ;
1040
1042
}
0 commit comments