I would like to implement texture splatting on a terrain I'm rendering with Irrlicht. I've read in the documentation that combining 2 textures, one being an alpha texture is not implemented yet.
What I've done in my own code in OpenGL is take a black and white texture, where each pixel is an alpha value, and a regular texturemap. I then bind the alpha as texuni0 and the texture as texunit1, and set blending properties in OpenGL so that texunit1 only shows through where there is white in the alphamap. I then implemented this on my terrain for texture splatting.
I would like to do this with irrlicht, but I can't seem to find the materials source file to add it. I found the header, but which file contains the .C source code that I could try and modify to add it?
Or has anybody already figured out how to do this without making modifications?
terrain texture splatting
Well i've been able to create a custom scene node with a texture splatted terrain in opengl mode. You can add as many layers as you want and have each blended based on the alpha map you add. Now I just gotta add the code for DirectX to work, gotta 'google' it and figure it out.
Gonna optimize it also to only include triangles that are fully or partially visible based on the alpha values to minimize the number of triangles in the terrain.
If anybody knows the code for doing the texture blending with alpha values in DirectX, please post!
Gonna optimize it also to only include triangles that are fully or partially visible based on the alpha values to minimize the number of triangles in the terrain.
If anybody knows the code for doing the texture blending with alpha values in DirectX, please post!