|
Hello Unity users, I am currently trying to combine two textures into one, by script. The main texture is a procedurally generated texture (makes random pixels at random position, some kind of colored perlin noise). I've got another texture, which is a grid (represented by white pixels) on a black background. Let's say they're both 256*256.
Another way I was thinking about was use of alpha maybe? Could someone please help me? It would be great. Regards -Alex Examples: Perlin Texture:
Grid Texture:
(comments are locked)
|
|
in js:
that will do an additive sum of both images (so will be white where the grid is white), then put it back into the first texture it should be pretty easy to adapt it to any other style you like Thank you, works greatly! :D For those who would like to use this, remember to set textures to ARGB32 and "Is readable"
May 10 '10 at 01:02 PM
EpikOwnage
(comments are locked)
|
|
Try this :
(comments are locked)
|



Are you sure you want to do this in a script? You could obtain the same result much faster using a RenderTexture (if you can, i.e. if you're on Pro) and your Graphics Card.
I have Indie so I can't. Anyway, speed is not a problem as it do this at loading, with alot of other calculatings :)