by Chris » Fri Sep 28, 2018 7:29 am
That will still have issues with polygon edges. It's simply an unescapable fact that Parallax Mapping works by taking a to-be-rendered flat triangle surface pixel in screenspace, and adjusts the texel lookup based on camera angle to make it look like it has depth. When the view ray should cross to a differently-textured or -oriented surface, the lookup adjustment has no way to compensate so you'll get a visible seam, and more extreme parallax adjustments will show more significant seams. This is to say nothing of the pixel depth value, which creates another set of issues (either you change the depth value to its proper value and pre-shader depth-test optimizations are disabled, or you don't and the depth buffer still sees it as a flat surface).
Parallax mapping is okay enough for subtle adjustments, but if you want to really adjust the apparent depth of the geometry, you need to change the geometry. Geometry shaders were needed to properly implement displacement for a reason.