Parallax Occlusion Mapping with Vertex paint?

Cool!

For those curious, here are the line changes you need to add in order to support multi texture tracing in POM.
This example multiplies Tex by Tex2 which is what you would want if you were going to blend 2 poms.

For this to work without additional code for the ‘top layer’ (meaning you need 2 pom functions), you would have to also store an inverted alpha mask and use that in the other layer.


texatray=dot(HeightMapChannel, Tex.SampleLevel(TexSampler,UV+offset,0));
texatray2=dot(HeightMapChannel, Tex2.SampleLevel(TexSampler,UV2+offset,0));

texatray *= texatray2;

Needs 2 new inputs to the POM custom node, Tex2 and UV2.

Then you need to sample the original 2 heightmap using parallax UVs at the end. You can subtract one from the other, divide by ‘blend length’ and clamp to 0-1 then use that as lerp alpha. Or you could save a bit and simply blend using the output z (float3 output.Z stores the Y intersection) which would be the same as sampling the heightmap with parallax UVs.