- Home /
Question by
Rardok · Nov 15, 2016 at 08:46 AM ·
fragmentvertexshadermultiple textures
Can a vertex/ fragment shader have multiple textures?
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.
Comment
Best Answer
Answer by tanoshimi · Nov 15, 2016 at 08:55 AM
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.