I am trying to make this mod for Age of Empires & here you can see a isometric map/terrain & a castle on it. Now the art is stored in rectangular pictures with the white regions being masked to get irregular outlines. To mask the white regions i gave those pixels an alpha of 0 & the remaining colors an alpha=255 & converted them to textures in Orthographic view. The tiles are also stored similarly . Then i enabled alpha blending with the blend function
Now the castle is not fully opaque(left).
With the following blend function
its worse as the castle is not only transparent but the colors are brightened where the terrain intersects(right).
I cannot disable blending because then the white regions will show up around the sprites. I dont want to use alpha testing because i want to able to vary the alpha for certain things like water & clouds. Can turning on & off alpha testing as required achieve this or some sort of masking/stencil buffer whatever. I do want to retain the ability of varying alpha to fade objects in/out.