MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / DrawBlur

Method DrawBlur

Source/Engine/Render2D/Render2D.cpp:2037–2056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2035}
2036
2037void Render2D::DrawBlur(const Rectangle& rect, float blurStrength)
2038{
2039 RENDER2D_CHECK_RENDERING_STATE;
2040
2041 Float2 p;
2042 Render2DDrawCall& drawCall = DrawCalls.AddOne();
2043 drawCall.Type = DrawCallType::Blur;
2044 drawCall.StartIB = IBIndex;
2045 drawCall.CountIB = 6;
2046 drawCall.AsBlur.Strength = blurStrength;
2047 drawCall.AsBlur.Width = rect.GetWidth();
2048 drawCall.AsBlur.Height = rect.GetHeight();
2049 ApplyTransform(rect.GetUpperLeft(), p);
2050 drawCall.AsBlur.UpperLeftX = p.X;
2051 drawCall.AsBlur.UpperLeftY = p.Y;
2052 ApplyTransform(rect.GetBottomRight(), p);
2053 drawCall.AsBlur.BottomRightX = p.X;
2054 drawCall.AsBlur.BottomRightY = p.Y;
2055 WriteRect(rect, Color::White);
2056}
2057
2058void Render2D::DrawTriangles(const Span<Float2>& vertices, const Color& color, float thickness)
2059{

Callers 1

DrawSelfMethod · 0.80

Calls 5

ApplyTransformFunction · 0.85
WriteRectFunction · 0.85
AddOneMethod · 0.80
GetWidthMethod · 0.80
GetHeightMethod · 0.45

Tested by

no test coverage detected