Skip to content

Commit

Permalink
only msaa
Browse files Browse the repository at this point in the history
  • Loading branch information
roopavr-adsk committed Mar 3, 2024
1 parent 5c4eac3 commit 41517e9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/mayaHydra/mayaPlugin/renderOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,26 @@ MStatus MtohRenderOverride::Render(

// Set Purpose tags
SetRenderPurposeTags(delegateParams);

// Maya's default MSAA toggle is set to off and that of Hydra's is on
// This code will change the default rendered look and might cause
// some of our unit test to fail.
// Set MSAA as per Maya AntiAliasing settings
if (_isUsingHdSt)
{
// Maya's MSAA toggle settings
bool isMultiSampled = framecontext->getPostEffectEnabled(MHWRender::MFrameContext::kAntiAliasing);

// Set MSAA on Color Buffer
HdAovDescriptor colorAovDesc = _taskController->GetRenderOutputSettings(HdAovTokens->color);
colorAovDesc.multiSampled = isMultiSampled;
_taskController->SetRenderOutputSettings(HdAovTokens->color, colorAovDesc);

// Set MSAA of Depth buffer
HdAovDescriptor depthAovDesc = _taskController->GetRenderOutputSettings(HdAovTokens->depth);
depthAovDesc.multiSampled = isMultiSampled;
_taskController->SetRenderOutputSettings(HdAovTokens->depth, depthAovDesc);
}

_taskController->SetFreeCameraMatrices(
GetGfMatrixFromMaya(
Expand Down

0 comments on commit 41517e9

Please sign in to comment.