I want paint at terrain in realtime lighted square or maybe circle under the mouse cursor, first step is just receiving flat x,y coords in terrain from mouse coords, it's just raycasting from camera plane and it's done, but next step is directly painting in terrain texture or something similar and there I have a problem. This video is from warcraft 3 demonstrating that I want. http://www.youtube.com/watch?v=IKrZC49QY-c as you can see here is "spell circle" moving with mouse moves. due to distorsion it's obiously understand that it is just rendering on terrain texture. How can I do that? I have .png file with alpha channel, well what next? Oh yes terrain is rendering with EMT_DETAIL_MAP. I see two ways but both of them I can't release, first is writing straight to texture with itexture.lock, and in this case I have question like how write from iimage or there are another simply way to draw image in texture, and I think I have problems because it's permanent writing in texture, but in next frame I need paint image at other point. Second case I think is using shader, I'll just adding my image as third texture and then I make shader in which I pass coords where I need draw selection_tile, but there is also questions, I didn't work with shaders and I do not understand how my shader stack with base material e.g. DETAIL_MAP, and how textures are naming in shaders and many similar newbies question. Excuse me for English once more, and please help
