- Home /
modify one color of a texture
Hi, I'm trying to do something which ccan be very usefull in a lot of case but I don't know how to start. I got a texture (UV texture form a graphist apply on an associated mesh). I want in this texture modify all the black parts to change their color and give her a self-illuminated look, how can I do that ? All leads, ideas or solutions are welcome :)
Thanks in advance !
Youre wanting to modify certain parts of the texture? Not the entire texture?
Answer by liszto · Feb 28, 2012 at 08:02 AM
Yes just one color of my texture, only the black :)
Please, don't post comments as answers. And welcome to UnityAsnwers!
Ok :). I didn't see the comment button. No worry I don't do it again now !
Answer by Paulius-Liekis · Feb 28, 2012 at 11:43 AM
Look into AssetPostprocessor class. There are callbacks which are called before texture import and after. You have to set texture to readable and then you can simply do GetPixel and SutPixel (and don't forget to call Apply).
Your answer
Follow this Question
Related Questions
Self-Illuminated Normal mapped Specular Shader questions 1 Answer
Graphics.DrawTexture with Shader not working on iOS? 1 Answer
Unity 3D - Material or Shader issue 1 Answer
Is there a way to change the shader on all meshes without doing it manually one by one? 3 Answers
Transparency and texture atlases, shader calls affecting performance? 2 Answers