What's the usual way to round the edges on a cube, a rectangular object as in the examples?

![enter image description here](https://i.stack.imgur.com/xuKiI.png) ![enter image description here](https://i.stack.imgur.com/uFlna.png)

The ideal result would look pretty much exactly like these images.

(Naturally, you could literally use a mesh that has carefully rounded edges and corners, but it takes many tris to achieve that.)

---

Note, of course for a **NON**-shader approach...

![enter image description here](https://i.stack.imgur.com/qVPmo.jpg)

Add two small flat boxes and simply make that new normal halfway, i.e., 45 degrees, between the two sides:

![enter image description here](https://i.stack.imgur.com/faVkr.jpg)

That would be drawn perfectly round ...

GDG below has provided an article where someone asserts that this is indeed the best way, if not using a shader approach.

I'm really wondering how to do this **with a shader** though.

---

Note - incredibly detailed tutorial on the non-shader approach

<http://catlikecoding.com/unity/tutorials/rounded-cube/>