POM material

You were right about the tiling by just multiplying Parallax UVs. I guess I was overthinking it. At one point I had a problem with it but it was probably caused by something else since the rest of the function wasn’t done when I first tried that. I will adjust the comments to the nodes accordingly. Exposing the length of the offset is still useful in some cases if you want to compare the length of different poms for instance.

I agree supporting general case curvature would be nice. As of now I am not sure what the best way to get that data is. The most sensible option for that for now is probably to require a baked vertex normal texture and tangent basis texture for each mesh. The textures could be generated inside of the editor with a simple emissive material with vertex normal as color. I would like for there to be some way for it to be automatic but so far a method like that is a bit outside my reach. The ddx/ddy method has facets that cause too much fracturing.

Supplying the normal/tangent textures would actually allow for much more accurate tracing through arbitrary curves but is probably fairly expensive since it would require a triple texture lookup at each iteration (including a cross product to derive the binormal), and transforming the cameravector from world to tangent at each iteration as well. The approach I am working on for now is trying to find a way around requiring that tangent texture and transform but it also assumes that the curvature will stay constant once the ray enters the surface. I need to get some test content to see if that causes issues with rounded corners etc before knowing for sure which way to go. I think it should be ok for corners though. maybe not corners that suddenly curve back the other direction, not sure.