- Home /
Texture hue/saturation
Hi all,
I want to know can I change hue or saturation of texture at runtime?
Thanks in advance :)
Answer by Eric5h5 · Mar 11, 2012 at 11:19 AM
Texture2D.GetPixels gets you a Color array of the texture, so you can go through the array and do whatever you want with the colors, then use SetPixels to upload the changed colors. There's also GetPixels32 and SetPixels32 for using a Color32 array instead.
Hey sorry to bring up a really old question, but, i've been trying to do the same thing and your solution is the first thing that comes to my $$anonymous$$d, but i want to know if this is recommended or not, i want to some different effects in real time (negative, black and white, tinting, etc..)and so far this is the best solution i could find, thank you
Answer by hitorijanai · Aug 21, 2014 at 07:33 AM
If you need it for rendering, I think it's better to write a shader for better performance.
http://docs.unity3d.com/Manual/SL-VertexFragmentShaderExamples.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613065008im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
2d javascript How to change a sprite during runtime 1 Answer
How do I import TGA, DDS, GIF, PCX and BMP files at runtime? 1 Answer
background picture in my game 1 Answer
Runtime Loaded Bump/Normal Texture into "Bumped Diffuse" Shader 2 Answers
How to make a Cube with a texture in a JavaScript? 0 Answers