| 2035 | } |
| 2036 | |
| 2037 | void 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 | |
| 2058 | void Render2D::DrawTriangles(const Span<Float2>& vertices, const Color& color, float thickness) |
| 2059 | { |