[SM5] Error X4532 with POM Material

The stretching thing should be independent and it does happen with parallax as well.

Even a POM material does stretch if you gave it a vertical heightmap detail (aka no gradients) and that shows up even on a regular flat surface. You are correct that mapping a virtual texture is the best way to go about hiding that. And parallax shaders give you a nice version of the world space to use. You could create the mask manually using offset like you did, or you could actually perform a regular world aligned texture using the updated worldposition from the parallax (that uses similar math as pixel depth offset actually). You just need to make sure the normals match the heightmap and feed it the normals and it will automatically map a world aligned texture to the sides without any custom work.

The starter content version did it kind of differently than using a world aligned side texture. That was more like taking a bunch of offset slices but fading the slices with soft alpha and forcing some extra parallax on each slice to push them past the matched point.

FWIW, this whole fundamental problem with heightmaps is why full 3d displacement maps and advanced subdivision surfaces will eventually take over. I bet there are also cool tricks to try where you ‘relax’ the UVs of your mesh in order to store texture detail on vertical heightmap faces. You would need to store the relax delta so that you can deform the texture back into its UV space in the material but it may be possible to map the sides of steep elements using a method like that. Thats a lot of work though :slight_smile: