Awwwhoho..NIIIIICEEEE Map Editor!
I've always wanted to mess around with the Calaradia map!
I've always wanted to mess around with the Calaradia map!
float4 tex_col = tex2D(MeshTextureSampler, In.Tex0);
Bioxx said:Looks good bud. A few shader issues however. For one thing, it looks like you are splitting the river, bridge, and ocean triangles into their own buffer, the bridge tris however should be in the "land" buffer if you will. holding space shows that the bridge texture is technically flowing with the water. Also it appears that you are drawing the ocean textures across every single triangle in the water buffer, and then going back and drawing the river textures only on the river tris. Problem with this is that I know you're aiming for accuracy and this does not to the best of my knowledge occur in game (makes a cool wave effect however that I really like :p). That said, I'm still stumped on how to get the rivers to blend with the ocean at the river deltas. Also I noticed that you are using a mountain snow texture did you give up on trying to apply the texture like they do?
MBPSOutput MBTexturedBlendedPS(MBPSInput PSIn)
{
MBPSOutput Output = (MBPSOutput)0;
float lightingFactor = 1;
if (xEnableLighting)
lightingFactor = saturate(saturate(dot(PSIn.Normal, PSIn.LightDirection)) + xAmbient);
float4 farColor = (0,0,0,0);
if(PSIn.TextureWeights0.x > 0)
{
PSIn.TextureCoords.y += xOffset0;
farColor = tex2D(TextureSampler0, PSIn.TextureCoords / xScale0); //Ocean
}
else if(PSIn.TextureWeights2.x > 0)
{
PSIn.TextureCoords.y += xOffset1;
farColor = tex2D(TextureSampler8, PSIn.TextureCoords / xScale1); //River
}
Output.Color = farColor * lightingFactor;
return Output;
}