If it is like a completely different language and will be much harder to program I am not so sure about taking the shader route then.
I really don't want to get myself into something like that now, so the only option would be to get someone to do it for me. And even if someone did do it for me... I like to tweak my settings ALOT. Mabe next week I decide I want grass to be drawn at a higer altitude than it does today, and mabe the week after that I decide I want a fifth texture for dirt to be in a new layer between the grass and stone, etc...
So even if I got someone to do it for me, if I don't understand the shader code I would be forced to stick with what I had initially and I don't want to end up in that situation either.


The example code you provided is very interesting, I had no idea you could access all the vertexes so easily like an array. Thanks alot! That will be very usefull to speed things up!

The only thing is that the height function gets called for each pixel. so it will still mean 512x512 ent_getvertex per terrain. I am thinking of mabe making the contact pointer a global variable. setting it at the start of my terrain paint function before the loops. And making my height function work the way you showed me but with that global contact instead. that way I would reduce even more the ent_getvertex calls to only one call per terrain.

P.S: I hadn't noticed that. almost up to 1500 views now!?!? Wow! Seems like alot of people are interested in this stuff

EDIT:
-the original speed tests with my old code were around 25.5 secs
-speed tests with your version around 23.9 secs
-speed tests with global c1 pointer around 22.5 secs

-old version = 786,432 ent_getvertex calls per terrain
-your version = 262,144 ent_getvertex calls per terrain
-my newest version = 1 ent_getvertex call per terrain

I just don't get it! Why such a little speed boost? I don't understand what is going on... Somebody help me from this nightmare! Anybody! Arrggggg
[rant]I thought this would be an incredible speed boost, this is sooooo frustrating! FFS! I feel like ripping my brain out (or just crying in a corner, lol)[/rant]



Last edited by Carlos3DGS; 11/05/11 12:28.

"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1