We are trying to create a terrain made of tiles using parallax maping based on hightmap.
It it possible to implement terrain only using fragment shader? (Using some variety of parallax-making)
Also we have a reference implementation for the terrain(Attached here). It would be great if anybody can infer what will be shader logic behind this (Is it only parallaxmaping or vertex shader also used here?)
It’s possible, but you’ll probably need to use steep parallax mapping (ray-tracing) rather than a simple slope-based offset or a root-finding approach. The main question is whether it will be faster than using geometry. Steep parallax mapping can be slow if the ray skims the surface, as it may have to consider many samples to determine the initial intersection point.
I have no idea what technique your sample image uses.
One caveat to this:
it’s likely to be a bit more complicated if the viewpoint can be below the top of the terrain. Most existing parallax mapping techniques assume that the viewpoint is “outside” the surface. If you don’t have that guarantee, you’ll need to take it into account when trying to adapt existing techniques.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.