Faking more detail using a shader?

Hi shader gurus!

The project I am working on allows editing/updating of meshes at runtime. Because of this I wan’t to keep the meshes as simple as possible but somehow make them look a bit more fancy than they really are.

Take a basic cube for example. Is it possible to make the edges and corners appear somewhat rounded just by using a shader?

Sadly I know squat about shaders so any ideas would be great.

Thanks!

It’s not possible to make a cube look round, however you should be able to get a smooth-looking sphere with less polygons by using smooth shading (which is default in all lighting models).
As for adding more detail to existing meshes, take a look at normal maps: http://wiki.polycount.com/NormalMap/

You can add mesh data using hardware tessellation in DX11. This is currently only supported in Windows.

If your meshes could be represented as heightmaps or so called “double heightmps” (one heightmp for front bound the other for the back one), you could use technique of raymarching (similar to parallax occlusion mapping). Google for Policarpo relief mapping or “true impostors” on GPU Gems3 or check if somebody (me) already didn’t implement this (to some extent) in Unity (“hi-poly 2 lo-poly realtime reconstruction” thread - sorry for cheap self-promotion, but I’d like just to help).

DX11 tessellation however is the most general solution (but narrowed to DX11 platforms only).

Wow I had forgot I had posted this question!

Thanks guys for your input I will have a look into the various options.

If you’re interested in applying smooth shading (which you could do by adjusting the normals of your model, in your modeling tool, and would not require any special shader), like ilya_ca suggested, this video might help you out. It’s one of the best explanations of the subject I’ve ever seen.