Modified again now it outputs the position twice in two different variables.
The error has dissapeared.
I Don't understand why I need to output the pos twice if I don't use one them.

Even though I don't get any error now my terrains are just invisible... Something is not working correctly:

Code:
// Vertex Shader: 
void TerrPaintVS( 
in float4 InPos: POSITION, 
in float2 InTex: TEXCOORD0, 
out float2 OutTex: TEXCOORD0,
out float4 OutPos: POSITION,
out float4 OutCoords: TEXCOORD1) 
{ 
	// Transform the vertex from object space to world space: 
	OutPos = mul(InPos, matWorld); 
	OutCoords=OutPos;
	// Pass the texture coordinate to the pixel shader: 
	OutTex = InTex; 
}

// Pixel Shader: 
float4 TerrPaintPS(
in float2 InTex: TEXCOORD0,
in float4 InCoords: TEXCOORD1): COLOR 
{
	float4 Color;
	if(InCoords.y<16)	Color = tex2D(SandSampler, InTex); 
	else if(InCoords.y<50)	Color = tex2D(GrassSampler, InTex); 
	else if(InCoords.y<75)	Color = tex2D(RockSampler, InTex); 
	else Color = tex2D(SnowSampler, InTex);
	
	return Color; 
}


My brain hurts...


"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