Is your lightmap in the vertex colors, an RGB texture, or the alpha channel of one of the two RGB textures? Are you using the standard…
two textures are tiling using the 1st UV set.
lightmap is using the 2nd uv set
?
Tutorial 5 in the ShaderLab section deals with a lightmapped-type shader, and though it’s not not exactly what you need, I believe you’ll be able to gain all the knowledge you need from watching it, and the videos that lead up to it. Let me know if I confuse you, but I’d say give it a try either way and I’ll give you pointers if you can’t figure it out exactly.
Light map is a rbg, for the textures I’m using, I’m using the same UV’s as the lightmap but I’m repeating the texture ~20 time. But the repetition looks bad/bland, so I want to mix it up by introducing some texture blending based of vertex colors.
In that case, you don’t need two UV sets. You can just change the texture tiling in the material settings. You will still need to bind the vertex colors, and again, I show how to do everything you need in the videos. I’ll give you a hint, though. If you don’t want to use a BindChannels block, you can use this line and save yourself some lines. Whether it’s worth having the block for clarity is up to you.
Only with Unity iPhone 3 (unsure if there are restrictions on the shaders on the non-pro, you might want to clarify that with UT) and targeting ARMV7 OpenGL ES 2.0 only then potentially.
given you wrote the corresponding GLSL shader causing using the surface shader system would be a pretty bad idea performance wise
Then under subshader it needs to load the vertex colors and mix it with the blend texture and then add it ontop of the main before the light map is figured in?
I can’t even get that to work right, if I delete everything under pass, the vertex colors show up right, but when I paste it back and put in textures it just shows up as the first image.
Awesome work on that last shader. I couldn’t have done it that cleanly myself as of last year. The only thing I could see going wrong with it is that you don’t actually have vertex coloring in the alpha channel. By default, they’re white. Try this line by itself in the pass; I expect you’ll see pure white instead of a greyscale mesh.
It won’t do that unless you tell it to. Turn off Unity’s calculation of normals; I find it useless, personally.
Not only are your results wrong there, but you’re also adding a ton of vertices to the mesh with such a low smoothing angle. It’s got to be at zero, no?? Vertex lighting ought to look pretty awful on those meshes, too, I’d imagine.