Alpha Blending (Terrain Painting Tool)

The Advanced Shaders final project required that we have all the standard shader effects and our own custom shader effect. For my own shader, I decided to make an alpha-blending shader, where three textures could be loaded in and checked towards an alpha-map to blended. This gave every vertex of the heightmap to have it's own RGB values that would correspond to the three textures alpha-value for that specific vertex.



Once this shader effect was created, I decided to use this for our Game Project Workshop. This tool would easily allow a designer to load in the textures desired, and then paint the terrain needed for our final game project. With two views for an actual workspace, and a perspective view to see how it would look in-game. While creating this tool I learnt a number of very useful techniques that could be used in other scenarios, such as Picking, which projected a ray from the mouse screen coordinates into 3D space to select a vertex of the terrain.