Blending textures together, texture fade over / fade in

Posted by Deukalion on Game Development See other posts from Game Development or by Deukalion
Published on 2012-12-03T14:34:58Z Indexed on 2012/12/03 17:20 UTC
Read the original article Hit count: 375

Filed under:
|
|
|
|

What is the best way to render a texture overlapping effect?

Like in this example:

Example from my editor

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
);

© Game Development or respective owner

Related posts about XNA

Related posts about c#