[SOLVED]Combining textures together

Hey Guys,

I’m attempting to combine two textures, with alpha channels, simply one over the other, but am needing it to occur dynamically in game through scripting or through setting up prefabs. Can this be done without using shaders? I know the particle renderer has a feature for it, but I’m wanting to put 1 material into a skinned mesh renderer that is a combination of a few textures. How would I go about doing this?

Thank you!

David

Check out the Texture2D class documentation as there are get/set pixel methods you should be able to use to achieve the desired goal.

Attached is some code that overlays one texture with another, assuming they are both the same size.

195714–7014–$texcombine_197.cs (676 Bytes)

Appreciate it thank you very much!