# Rendering a widget in VR world-space

**URL:** <https://forums.unrealengine.com/t/rendering-a-widget-in-vr-world-space/1257981>\
**Category:** XR Development\
**Tags:** Virtual-Reality, world-space, oculus-vr, unreal-engine, UI, Widget, question\
**Created:** [August 11, 2023, 4:58pm UTC](https://forums.unrealengine.com/t/rendering-a-widget-in-vr-world-space/1257981 "2023-08-11T16:58:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeEdgar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MikeEdgar](https://forums.unrealengine.com/u/MikeEdgar)\
**Post date:** [August 11, 2023, 4:58pm UTC](https://forums.unrealengine.com/t/rendering-a-widget-in-vr-world-space/1257981/1 "2023-08-11T16:58:03Z")

</div>

I’m trying to have display a widget in one location (like a poster on a wall). It displays in VR but if I’m not close to the widget the text/images jitter and it looks like there are lines going through the text. I have tried using stereo layers to no success

---

<div class="post-metadata">

**Author:** ![FishBabe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FishBabe](https://forums.unrealengine.com/u/FishBabe)\
**Post date:** [August 11, 2023, 6:15pm UTC](https://forums.unrealengine.com/t/rendering-a-widget-in-vr-world-space/1257981/2 "2023-08-11T18:15:15Z")

</div>

Do you have an image or a video of the issue?

---

<div class="post-metadata">

**Author:** ![MikeEdgar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MikeEdgar](https://forums.unrealengine.com/u/MikeEdgar)\
**Post date:** [August 15, 2023, 9:48am UTC](https://forums.unrealengine.com/t/rendering-a-widget-in-vr-world-space/1257981/3 "2023-08-15T09:48:04Z")

</div>

I took a screenshot and a video but it may be hard to see clearly, it’s definitely far more noticeable in VR

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/7/be71e26402b3d06bc8bbd268a343a80e472308ec.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/7/be71e26402b3d06bc8bbd268a343a80e472308ec.mp4)
  
 ![TextExampleImage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/d/03dc5c3b0a7633b4919e3060d03da34fa425c084.jpeg)

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [August 16, 2023, 6:55am UTC](https://forums.unrealengine.com/t/rendering-a-widget-in-vr-world-space/1257981/4 "2023-08-16T06:55:58Z")

</div>

This happens because the widget renders into a texture without mipmaps, which means you get aliasing issues when the texture is scaled down in screen space. One solution is to make a custom class that enables the mipmap generation:

> **[Fixing aliasing / flickering widgets in UE4](https://hollowdilnik.com/2021/01/09/widget-filtering.html)**
>
> TL;DR: Enable bAutoGenerateMips for the RenderTarget of the UWidgetComponent and set its Filter to TF\_Trilinear. Call RenderTarget-\>UpdateResourceImmediate(false) after every update of the widget. In the widget material, change the Sampler Source...

---

<div class="post-metadata">

**Author:** ![MikeEdgar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MikeEdgar](https://forums.unrealengine.com/u/MikeEdgar)\
**Post date:** [August 28, 2023, 11:26am UTC](https://forums.unrealengine.com/t/rendering-a-widget-in-vr-world-space/1257981/5 "2023-08-28T11:26:46Z")

</div>

I tested this by importing that plugin but while it fixed the aliasing issue, it made the widgets blurry when viewed at similar distances. I’ve decided to move away from this idea of using widgets in world-space

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [August 28, 2023, 1:13pm UTC](https://forums.unrealengine.com/t/rendering-a-widget-in-vr-world-space/1257981/6 "2023-08-28T13:13:02Z")

</div>

An option to make it less blurry is to do supersampling in the material:

> [@MSAA + 3D Widgets = Horrible jagged edges](https://forums.unrealengine.com/t/msaa-3d-widgets-horrible-jagged-edges/138040/8):
>
> I don’t think there is any way to set everything up well without enabling mipmapping form C++. The modification to the class is very simple, it’s a shame Epic hasn’t implemented it yet. The article mentions using [shader based supersampling](https://bgolus.medium.com/sharper-mipmapping-using-shader-based-supersampling-ed7aadb47bec), which can be done in Unreal through the material editor. I’ve implemented it and it is an significant improvement over regular mipmapped. I think it still needs mipmapping enabled to give any benefit though. 200% zoom, stock on left, mipmapped on c…
