Sign in to follow this  
BS-er

Terrain roads via shader?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this