I am developing a game for iOS, and for my terrain purposals, I need a simple shader wich can both enable grayscale vertex colors (I need only black color tone, so I can make darker variations of the surface), and also blend between three textures, always using vertex colors (so I can have something like dirt, rock and grass).
Since vertex colors have always three different informations (hue, saturation and brightness), I would use them this way:
- Hue: intensity of the second texture
- Saturation: intensity of the third texture
- Brightness: intensity of the black color
- First texture is the basic texture and is always present.
Combined to Lightmapping, this shader should work very well.
I already tought to use a simple and big diffuse map with all the things directly painted on it, but since I’m going to have many different terrains, this would skyrocket the final App’s size. I prefer using this kind of shader instead.
I’m not much into shader scripting so I’m not experienced in this field, but I would ask if it’s possible to script a shader like this. Any help will be very appreciated. Thanks!
Sorry for the ignorance, but would this run under the vertexlit rendering path...?
– anon21353424This shader is great but it doesn't support lighting at all. Can we get an update that includes a lighting pass? (Per vertex and ambient would be great.)
– tingham