How to chamfer edges with shaders

Does anyone knows about this?
i really need it and i would appreciate any help.