# Slate FSlateDrawElement has broken AA

**URL:** <https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948>\
**Category:** Rendering\
**Tags:** unreal-engine, bug-report, slate, Rendering, UE4, question\
**Created:** [July 20, 2015, 10:32pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948 "2015-07-20T22:32:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [July 20, 2015, 10:32pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/1 "2015-07-20T22:32:34Z")

</div>

FSlateDrawElement::Makelines did produce undesired result with iPhone 5. With bAntiAlias set to true the line segments disappear. With bAntiAlias set to false they do appear.

I have not tested this with 4.8 and will not do so at this point, so if it is fixed there this question can be resolved or deleted.

---

<div class="post-metadata">

**Author:** ![wittlief\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wittlief\_1](https://forums.unrealengine.com/u/wittlief_1)\
**Post date:** [July 21, 2015, 2:42pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/2 "2015-07-21T14:42:35Z")

</div>

Hi Arvidsson,

Do you mind posting a screenshot of you blueprints setup for this issue so I can attempt a repro in both 4.7 and then in 4.8?

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [July 22, 2015, 8:04am UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/3 "2015-07-22T08:04:32Z")

</div>

Create a UserWidget BP. Override OnPaint for it. In the OnPaint function use Painting-\>Draw Line to draw a bunch of lines and verify it not work properly on iPhone 5 if AntiAlias bool on the node is set to true.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [July 22, 2015, 5:11pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/4 "2015-07-22T17:11:24Z")

</div>

Hey ,

I have verified that this issue does not happen on 4.8.2-2614606. I tested it on Windows, Android and iOS platforms. Please upgrade your engine to 4.8.2 so that this fix can be implemented in your project. If you happen to have any further questions or concerns, please reply back and I will be more than happy to assist you further.

Thanks!

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [July 22, 2015, 5:48pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/5 "2015-07-22T17:48:14Z")

</div>

Ok, thanks. I will notice if it it does not work once I convert to 4.8.

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 11, 2015, 5:25am UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/6 "2015-08-11T05:25:24Z")

</div>

![53618-slate-drawline-bug.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/7/94774f58c75dcece10e34ae977deb18848c06409.png)

This is still a problem in 4.9 preview 2. I attached the BP graph. This is a UserWidget’s OnPaint override and the node Draw Line is under Painting-\>DrawLine. The DrawCircle and DrawRect are extensions we made, but they use the same functions.

Note that I have only encountered this problem with iPhone 5 when the bAntiAlias is set to true on the node. On iPad2 it always works and with bAntialias false on the node it works with iPhone5, too. You need to test this on the real device, not in preview. Let me know how it works out :).

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 11, 2015, 5:45pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/7 "2015-08-11T17:45:31Z")

</div>

Also, I should add that we are using a 3D camera perspective projection, and not orthographic.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 12, 2015, 9:22pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/8 "2015-08-12T21:22:49Z")

</div>

Hey,

Could you please upload this blueprint so that I can test it out? I can’t see the full blueprint and I need to make sure that it’s set up properly. You can easily migrate the blueprint into a blank project to ensure it’ll work once I receive it.

Thank you! 🙂

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 13, 2015, 1:46pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/9 "2015-08-13T13:46:11Z")

</div>

Here is a project setup: [https://s3-eu-west-1.amazonaws.com/privatesharing/TappyChicken48\_EpicRepro.zip](https://s3-eu-west-1.amazonaws.com/privatesharing/TappyChicken48_EpicRepro.zip)

The UMG blueprint is called LineAABug, if you run it on iPhone 5 as it is you will see no red line drawn. Uncheck the AA box in the Draw Line node in OnPaint and you will see the line being drawn after repacking. There is another bug that makes the recooking dependencies not working, so you need to use the Project Launcher → Advanced and then use Development|By The Book after you have unchecked the AA box. I will file another bug for that.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 13, 2015, 9:07pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/10 "2015-08-13T21:07:21Z")

</div>

Hey ,

That link does not work, could you please provide a shared link I can download from?

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 13, 2015, 9:45pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/11 "2015-08-13T21:45:25Z")

</div>

I forgot to add public access. The link should work now.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 17, 2015, 7:21pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/12 "2015-08-17T19:21:15Z")

</div>

Hey ,

So I’ve downloaded the project you provided of Tappy Chicken. I followed the instructions provided and could not reproduce the issue. Is this happening on any other device, or with any other template?

Thanks!

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 17, 2015, 7:46pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/13 "2015-08-17T19:46:53Z")

</div>

So the red line is drawn for you even on an iPhone 5 with the AA box ticked in the draw line function?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 18, 2015, 9:08pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/14 "2015-08-18T21:08:05Z")

</div>

The color updates each time I change it, yes. So I’m not quite sure how to get this to reproduce. Do you have another iPhone you’ve reproduced this on that’s perhaps a 4 or 6?

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 18, 2015, 9:55pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/15 "2015-08-18T21:55:41Z")

</div>

Well this particular question/issue was that the line is not drawn correctly if AA is checked on iPhone 5, but it does draw correctly if AA is turned off.

This only happens on iPhone 5 and not on iPad 2 mini. Those are the devices I can test on.

I tested this on 4.9 preview 4 and the problem is still there. The draw line function does produce a corrupted line on iPhone 5 if AA is enabled on the node.

Do you have a iPhone 5 on hand (not S). Maybe the result is different between them?

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 19, 2015, 1:26am UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/16 "2015-08-19T01:26:10Z")

</div>

There is another bug too with AA that happens on all devices. If you for example draw a small rectangle (by drawing 4 lines) the lines become too long causing a degenerate rectangle. This does not happen if AA on the draw nodes are turned off.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 24, 2015, 6:42pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/17 "2015-08-24T18:42:17Z")

</div>

Hey ,

I have reported an issue with the Draw Line functions not functioning correctly on Android Devices. I have tested the information provided to me on 4.8.3 and 4.9 Preview 4. the only device that appeared to have some complications happened to be Android. This has been reported as UE-20320. I was unable to reproduce this on an iOS device.

If you have any direct reproduction steps to provide, I will be more than happy to look into this further for you.

Thanks!

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 24, 2015, 8:07pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/18 "2015-08-24T20:07:40Z")

</div>

There is nothing more I can do about this. I have made a project and given instruction on how to verify this on iPhone 5.

I guess I can record a video…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 26, 2015, 1:47pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/19 "2015-08-26T13:47:01Z")

</div>

Thank you for providing all of the information you have. I have one last question for you, which I see I didn’t ask previously, did you obtain the editor from Binary or Source?

A screenshot of your iPhone would suffice too.

Thanks!

---

<div class="post-metadata">

**Author:** ![Markus\_Arvidsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markus\_Arvidsson](https://forums.unrealengine.com/u/Markus_Arvidsson)\
**Post date:** [August 26, 2015, 4:42pm UTC](https://forums.unrealengine.com/t/slate-fslatedrawelement-has-broken-aa/325948/20 "2015-08-26T16:42:22Z")

</div>

Own project is compiled from source. But the project I made and posted link to is binary. I verified that the problem is the same in that project, too.
