You will still need different meshes if you don't want gras all over the whole terrain. A solution could be a seedmap, but I didn't try that yet.
If this is only for relatively small areas you could just move the grass under the terrain in the vertex shader. I gave this a try, see here:
It does not look very good but I think the concept is convincingly simple and fast.
Quote:
EDIT: Superku: do you have the shader code for this? Wanna try this in IceX3
What I did is the following:
Code:
float2 texpos = float2((worldPos.x+1024.0)/2048.0,1-(worldPos.z+1024.0)/2048.0);
float4 info = tex2Dlod(heightsampler, texpos.xyxy);
float height = info.g; // terrain height on green channel
float seed = info.r*2; // "seed map" on red channel, grey = normal length
Then multiply inPos.y by "seed" (the grass polygons should start at z = 0 in MED), multiplay inPos with matWorld and increase Out.Pos.y by some value (the terrain height) and height before you multiply it with matViewProj.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual