Clip-Maps Texture In Vertex Shader For Fast Terrain

Anyone know if it will be (or already is) possible to use a texture in a vertex shader with cross-desktop/OpenGL?
If not - then the question is - is it instead possible to have a big memory space available in a vertex shader like a Shader Storage Buffer (SSBO) or just a big array of like 65536(256x256)?
I’m just curious - if not, maybe I’ll make a fast windows version and a dynamic vbo version for OpenGL.
(Or maybe a different approach to LOD terrain?)
Any ideas or thoughts are welcome. :slight_smile:

If you are referring to Geo-Clip mapping as in Huges Hope or the GPU Gems 2 - Chaper 2 sample?, then I had a play with this back in the day with XNA you can have a look at how I got on with it in these two clips.

Clip 1
Clip 2

Please forgive the music lol

Ill have a go at porting this code from XNA to MonoGame, and post it up on my repo if I get it working :slight_smile:

1 Like

Yes, that’s the one! I seen that before and I was all like - holy cow that’s amazing and the concept is brilliant. (kinda dig the music actually)
If you get it working that would be awesome. :slight_smile:
If I find time, I’m gonna have a go at it too.

1 Like

Ok, I’ll try and dig out my old code and try and find the time to port it to MonoGame. Once I put it up I’ll post here.

So, I found my old code, and have ported it to MonoGame, it was pretty east to do too :smiley:

Makes me want to port all my old samples over… hmmmm

Anyway here are a few screen shots, ill get this in my repo then port here again when it’s available. It’s not perfect, you can see seams from time to time, but if nothing else, it gives you something to start with, even if it just tells you how not to go about it lol

1 Like

Hi, if you want to check it out, I have put it on my repo here.

1 Like

Awesome :slight_smile:
I found the papers on it hard to understand but got the idea behind it. Some of my knowledge(or brain) is limited. ;p
Very nice & organized coding btw. Most impressive :smiley:
I wanted to make something which works in a similar way, with geometry that never moves but appears to, due to changing the height values based on where the player is over the height-map (wrapped sampling).
OpenGL version won’t yet let me access a texture to do it on GPU but at least I can do it for windows. :wink:
For OpenGL version I was thinking of a similar static geometry with pre-set-LOD and using a yaw-angle-range based optimizations(pre-calculated frustum tests) and just changing the heights in the list and pounding it out into a dynamic buffer quick and let the GPU take care of the normals. Probably easier said than done. ;p

Thanks for the ideas! I need some coffee and spend some time studying this some more.

1 Like