A face normal diffuse shader?

Hi I’ve looked through the entire forum, if I’ve missed it I appologise, however I couldn’t find what I was looking for.

I have a problem with a project I am working on, specifically I am creating a procedural mesh, a box with a cylinder cut out of it, it works fine. Except for the fact that all the normals are smoothed at a 180 degree angle. There’s two ways I could fix this, if either there is a script function available to correct the issue (tried recalculate normals), or a shader that shades based on surface normal rather than vertex normal.

Please help, thanks in advance,
Jamie.

For practical purposes, there are no surface normals when using current 3D hardware: you only get vertex normals. Luckily, you have full control over them because you are doing procedural generation. All you need to do is give all the vertices the same normal as you want their faces to have. Chances are, this means you’ll have to do a lot of vertex splitting, since vertices can only have one normal.

I thought as much, thanks for replying, was really hoping someone had or knew how to make a face normal shader. I can do what you suggest so I will.