I want to have one grayscale texture file for the alpha channel and one RGB texture file for the color.
That way, I can either animate the offset of the colors while leaving the transparency fixed, or offset the transparency while leaving the colors where they are. This would be incredibly useful for all sorts of special FX. (I probably would want to make it based on self-illuminated / vertex-lit.)
Does such a shader already exist somewhere? And this is a reach, but for iPhone, too?
(I don't know what exactly makes a shader iPhoneable or not, but I understand that it's more limited in what it can do with its textures...)
asked May 13 '11 at 05:49 PM
The easiest way to do this is probably to use the same texture as two properties. That's one way to make it so you don't need to split RGB and A into two textures.
When you say "iPhone", I assume you're talking about the obsolete iOS devices which can't run iOS 4.3, or this shader. I haven't thought of a way to match results on that hardware, and I recommend against supporting it anyway. If you have to, then let me know what you might be willing to sacrifice on the MBXLite.
SeparateSpecular doesn't do anything on iOS, so I took it out, which will tone your highlights down. This could be written as a programmable shader to make highlights look better, but that opens up a can of lighting worms, and I'd need to know strictly what kind of and how many lights you want to support.
I haven't tested this yet; let me know if it has errors. Also, I didn't make it Beast-compatible; let me know if that is requisite.
answered May 13 '11 at 09:24 PM
I made this shader using Strumpy Shader Editor. I think that it does exactly what you asked, uses a different Texture for diffuse and alpha (using the alpha channel) so that you can adjust the offsets separately. I was using to make convincing clouds by adjusting the x offset of both textures at different rates. I have no idea how well it works on IOS.