Displacement Material on Spatial Shader

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By xmxmxmx

How do you apply the displacement image on cc0textures to the depth attribute?

I tried NORMAL_DEPTH = texture(…

but it doesn’t seem to do anything. The docs seem to suggest this.

Also any ideas how to do this for the vertex shader to do real displacement?!

:bust_in_silhouette: Reply From: Lola

Hello,

I don’t know any builtin equivalent in shader code to the depth feature of the SpatialMaterial. You can however inspect how it is done and reuse it by creating a material in a resource slot, setup its depth feature and converting it to a shader material (RMB > convert to shader material).

As for actually applying a geometry displacement, see this video.