@EvilSOB, tested your version "as is" and with yours I can at least see the terrains. They do get painted but in a wierd way:
http://www.youtube.com/watch?v=2bAfOV1rA9s
(they are in the inverse order and in very thin layers)


Edit:
took a closer look at your height var and modified a couple things.

in your vertex function:

changed this:
Code:
Height = 1-(OutPos.y/OutPos.w);



to this:
Code:
Height = OutPos.y;




in your pixel function:
changed the ifs to this:
Code:
float4 Color;	
			if(Height < 16)		Color = tex2D(SandSampler,  InTex); 
	else	if(Height < 50)		Color = tex2D(GrassSampler, InTex); 
	else	if(Height < 75)		Color = tex2D(RockSampler,  InTex); 
	else 								Color = tex2D(SnowSampler,  InTex);


Results:
http://www.youtube.com/watch?v=a6aU_ntY6iw

OMG it works!
THANKYOU very very very very very very very very very much!

New painting speed tests:
UNMESURABLY fast, super humanly, out of this world, superman gets owned by this speed, even the flash cannot paint this fast... (these are the results of the average times measured in a millionth of a second, taken with superhuman stopwatch)

EDIT2:

Yeah, sorry for the offtopic, started out talking about terrains and memory issues and this has slowly progressed to other terrain related topics, and now into a shader...
Back on topic:
Now I will start coding the moving of terrains based on my character position, reusing the old ones left behind (and for the rest of the stuff moving with the terrains, like trees etc, I will use the recycling linked-lists I posted before this turned into a shader discussion).
I will update in this thread with any problems derived specifically from moving terrains and their sub-components, and in a separate thread anything related to your shader that I am now using for my terrains.

Last edited by Carlos3DGS; 11/06/11 15:34.

"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