The reason this is difficult is that generally, a bevel effect requires access to normals and edges outside of the current pixel which generally can’t be read directly from a material.
That said, since the shape of spheres and cylinders are known in advance, it is possible to make something along these lines, although it doesn’t seem like it would be a great approach.
This isn’t a complete solution, but here’s a quick example of beveling the corners of a cube by constraining vertices to a specific radius (i.e. a sphere). There are some unfortunate limitations to doing it this way, though, such as the fact that tessellation needs to be enabled to allow new vertices/edges to be created.
Is there a reason this needs to happen in a material specifically? This seems like the most roundabout way of achieving this effect.
