This problem started out as a quest to chop the peaks off of my mountains. I did not see an obvious way to do it except via my experience with programming and math, so I thought the most straightforward way was to read the displacement data, modify it, then stuff it back into a NEW shader with all the same settings as the first shader, EXCEPT I would use my modified displacement data to define the displacement function, rather than slather it on the top of another layer, which seems to be the normal operation in TG.
At this point I don't care about the mesas that much. I encountered a problem that I want to learn how to solve on my own using approaches I'm familiar with, if possible. My brain sees a programming environment and is trying to learn how the rules work. I'm not so good at memorizing solutions, and tomorrow I will just encounter another task with no recipe in my book.
oh yeah, Volker's description of the Get Functions. That is exactly how I recognize how they work. One question that stumps me though, if the input port is ignored: since I'm building up my terrain using a series of displacements, then where in that series does my Get Altitude work? After the final Compute Terrain? What if I want to query a terrain value from earlier in my build-up? It would be natural to assume that is what the input port is for.
Then there is the question of how altitude is represented. Is it a scalar? If I want to use it as a function input in a displacement shader, will the values translate directly to height (with the multiplier set to 1 of course), or do I need to find a way to scale it down to fit within a 0-1 range, ie like a luminosity. Normally in a programmable environment such as this there are clear definitions, but in this case there is so much polymorphism (type casting) going on that it's impossible to determine anything without very hard trial and error.