At the moment I am trying to design a viewer to display different heights.
In 2D no problem, but with threejs I unfortunately didn’t make it.
My goal is to display everything between 15-14.5m in green, 14.5 - 13.5m in yellow and everything below 13.5m in red.
The idea is to enhance a built-in material via onBeforeCompile(). In the vertex shader, you compute the height of each vertex in world space (it’s y coordinate) and pass it as a varying in the fragment shader. You then use the interpolated height values to color each fragment with your color pallet. You could enhance the shader even more by making your three color values to uniforms (instead of hard coding the colors in the fragment shader).