I have a terrain mesh with a material and i want to add or paint multiple textures like cliff, grass etc. But i can only use vertex and fragment shaders and i don’t know if multiple layered textures are possible so i can paint my terrain.
Sure - shader model 3 (i.e. DX9) supports up to 16 texture samplers.
If you separate your shader into passes and blend them additively you can combine a theoretically infinite number of textures - that’s how Unity’s built-in terrain shader works.