Blending textures together, texture fade over / fade in
- by Deukalion
What is the best way to render a texture overlapping effect?
Like in this example:
I want either the grass to fade in to the snow texture, or the other way around. No rough edges. Somehow make them blend over. So the grass has a bit of snow or the snow has a bit of grass How is this possible during runtime? If that's possible.
I don't render this by using the SpriteBatch, since the ground isn't rectangles (they can be moved).
This is the way I render each shape (each one of those squares):
// LoadTexture
// Apply EffectPass
device.DrawUserIndexedPrimitives<VertexPositionNormalTexture>
(
PrimitiveType.TriangleList,
render.Item.Points, // Array of VertexPositionNormalTexture
0,
render.Item.Points.Length,
render.Item.Indexes, // Array of int indexes (triangulation)
0,
render.Item.Indexes.Length / 3,
VertexPositionNormalTexture.VertexDeclaration
);