How to chamfer edges with shaders


I would like to know how to chamfer edges of mesh using shaders.

I know it could be done when i saw this person does it.

I’ve sent him messages but he doesn’t reply, if someone know how to do the same i will be very grateful.

Base on what he/she mentioned it should not be hard in theory, but i really don’t have any past experience with shaders, i would like any help.

Many Thanks

just on a cube or on any mesh?
one thing you can do that is similar is change the intensity of a normal map by multiplying it by a vector 3 like (.5,.5,1) for less or (1.5,1.5,1) for more.

there’s some stuff about the normal maps over here. How would you change the intensity of a normal map? - Rendering - Unreal Engine Forums
The world offset stuff from your link will be a better option for simple geometry like what your doing. ill look into it tomorrow.

I want on a cube and on a cylinder meshes.
I would really appreciate if you could send me a photo of the material since it’s really new grounds for me.

Many thanks

I really appreciate you taking your time to look into my question, much obliged.

I tried a couple things but couldn’t quite get the same beveled edge look.
I did figure out a way to turn a cube/cylinder into a sphere.

I’m using tessellation here, but if you bought in a subdivide mesh in it should work the same just using world position offset, which would be better performance wise.

I was talking about a subdivide cube instead of the default cube because that only has 8 vertices. the material I made will only turn meshes into spheres. the more vertices the mesh has the smoother it will appear.

you could also look into using a skeletal mesh with morph targets or look into vertex animation.

Do you mean if i got two meshes, one normal and one beveled, it will work similar to what i want?

If you find the answer to this one let me know-- this is super interesting.