Small workaround and fix to ensure line fade (alpha) displays correctly (#6733)
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
98b0f206a0
commit
1a8b7aeb48
@@ -184,6 +184,10 @@ namespace AzToolsFramework
|
||||
const float halfGridSquareCount = float(gridSquareCount) * 0.5f;
|
||||
const float halfGridSize = halfGridSquareCount * squareSize;
|
||||
const float fadeLineLength = cl_viewportFadeLineDistanceScale * squareSize;
|
||||
|
||||
// ensure AuxGeomDraw::OpacityType::Translucent render state is set
|
||||
debugDisplay.SetAlpha(0.5f);
|
||||
|
||||
for (size_t lineIndex = 0; lineIndex <= gridSquareCount; ++lineIndex)
|
||||
{
|
||||
const float lineOffset = -halfGridSize + (lineIndex * squareSize);
|
||||
|
||||
@@ -348,14 +348,7 @@ namespace AZ::AtomBridge
|
||||
void AtomDebugDisplayViewportInterface::SetAlpha(float a)
|
||||
{
|
||||
m_rendState.m_color.SetA(a);
|
||||
if (a < 1.0f)
|
||||
{
|
||||
m_rendState.m_opacityType = AZ::RPI::AuxGeomDraw::OpacityType::Opaque;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rendState.m_opacityType = AZ::RPI::AuxGeomDraw::OpacityType::Translucent;
|
||||
}
|
||||
m_rendState.m_opacityType = a < 1.0f ? AZ::RPI::AuxGeomDraw::OpacityType::Translucent : AZ::RPI::AuxGeomDraw::OpacityType::Opaque;
|
||||
}
|
||||
|
||||
void AtomDebugDisplayViewportInterface::DrawQuad(
|
||||
|
||||
Reference in New Issue
Block a user