Can anyone please let me know how I could render a height map(slope map)? PIC
Here is an example. Now, I tried to generate the map using a lot of lines, i.e finding slope and then assign a color to the line based on the slope. But that becomes very slow. Is there any other way I can do this?
An easy and efficient way is to render the terrain normally using triangles, textured with 1D texture representing the color scale, the world up coordinate being used as texture coordinate.
Use “GL_NEAREST” sampling if you want to avoid gradients between colors, and keep the “banding” effect.