Hi! I’ve been looking around the forums for any samples of a shader that renders vertex colored models while using a lightmap and taking into account the alpha of both the texture and the vertex data. Has anyone done anything similar?
What does that mean, taking into account? What do you want to use the alpha channel for?
And when you say “lightmap”, what do you mean by that? If you’re not using a diffuse texture, then we’ll just multiply in the only texture you’re using with the only UV map you’re using.
Sorry for the confusion. But basically, we just need a shader that can do vertex color and alpha for creating some of those sea wave effects we see in some games where the texture seems to fade out on some point in the mesh. And we plan to make a lightmap for the scene later on when we fix the UVs.
Sorry, I don’t totally understand all the concepts yet, but i’m going to try to get there.[/quote]
Alpha isn’t tied to transparency. It’s just the thing that it is most often used for. So when you say “it uses alpha”, that’s not enough info.
You also haven’t answered whether or not you actually need a diffuse texture, so I won’t put it in yet, and I’ll assume for now that all you want is a texture that gets multiplied into the vertex colors, including the alpha.
See how this simplest case works, and we’ll go from there.