PDA

View Full Version : Vertex Paint & Texture Mix



bobGL
11-17-2007, 06:58 PM
I working on terrain theses days and I have a question, would it be possible to use vertex color to blend 2 textures?

ie: I have my terrain and I apply 2 texture one is grass the other one is rock, I would like to use vertex color to be capable to "draw" a rocky path on the grass texture can this be done?

Tks in advance!

Cheers

sqrt[-1]
11-18-2007, 01:25 AM
Yes you can do this easily. All you need are texture combiners, but if you use shaders, a simple lerp operation will do it in the fragment shader.