Can you affect a texture with another texture?

What I’m looking to do it to randomly place a white square someplace on a black texture, and where they overlap, have those pixels bumped up one step towards white in color. Is there a way to programmatically do this? I’d rather not do a per-pixel comparison, I’m hoping there’s a way to do this ‘all at once’.

Any thoughts would be greatly appreciated!

Write a simple shader.

There’s no such thing as “all at once”; any time there’s more than one element, you need go through them all one by one. Assuming “texColors” is a Color32 array containing the black texture, and “texWidth” is the width of the black texture,

for (var y = yStart; y < yStart + squareHeight; y++) {
    for (var x = xStart; x < xStart + squareWidth; x++) {
        var c = texColors[x + y*texWidth].r + 1;
        if (c > 255) c = 255;
        texColors[x + y*texWidth] = Color32(c, c, c, 1);

You would of course need to make sure that the variables used in the loop would not allow x and y to go out of bounds. i.e., xStart + squareWidth must always be less than the texture width.