• Advertisement
Sign in to follow this  

Terrain roads via shader?

This topic is 3179 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The thought is that you have a rendering pass over your terrain that is able to concisely render a detailed road at a desired width, twisting and weaving based on a set of coordinate data. Shader parameters would control the width and tiling of the road texture. A 1D texture might be used for the series UV coordinates, and the road texture would need to angle and turn with this array of points. I wonder if something like that has been conceived or tried before. It might be that it's a computational burdon. If anyone has heard of such a thing, I'd sure appreciate some details. I'm going to research it.

Share this post


Link to post
Share on other sites
Advertisement
I've seen some papers on this. The best one is Real-time rendering and editing of vector-based terrains. There are some videos that show their implementation to good effect.

The big problem with rendering roads as a separate pass is that you don't know the vertical position of a particular point on your road. Because of this, people tend to do it as part of the normal rendering pass.

If you want to get some ideas about how to draw curves in the shader, look for papers on drawing vector based geometry in the GPU. Random-access rendering of general vector graphics and Resolution Independent Curve Rendering using Programmable Graphics Hardware should give you some ideas.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement