Download

Tessellation // displacement - shading problem

Hi
I have problem with strange shading effect of tessellated object. I made simple material with displacement and applied it on basic sphere. Now it looks like some kind of translucent material with no shadows and flat shading. It is normal behavior or im doing something wrong. Please look at the attachments. I tryed every type of light - same effect.

Thanks for help!

Yes, it is normal behavior. Displacement does not affect shading.

you need to change the normals via normalmap, too.

ok, thanks!

When you multiply a displacement value with the VertexNormal you need to consider also that details under surface will be a negative value for VertexNormal, so the best way to represent this is using the displacement texture to drive a lerp’s alpha and at pins A and B you set -1 and 1 respectively and the output from lerp you multiply by that scalar and then multiply again by the VertexNormal. So, 0 means the regular surface, negative values mean cavities and positive values mean bumps.