I am doing an inventory system, similar to Tarkov.
Slot grid based.
Not all slots are the same size and not wanting to simply scale the textures, because of blur, now i have a list of base slot textures, ranging from 64x64 to 384x192.
So, i was thinking to try out a material instead, using math nodes to re-create the same texture.
From two channels of the mask, i extracted two lines, which with Sine, are kept caught in the center, forming a plus symbol. Cleaned of blur.
Then from two channels of the mask, and its reverse sides, as well, i made the edges, then inverted into an inner square. Cleaned of blur.
This is what i think is the cheapest way to do it, however, I can’t figure out where to inject a constant to correct the colors.
Anywhere i link and add a constant color, it will only color the edges/corners.
Basically the background of the image.
How can i get control over each colors and invert them ?
Is there a better way to code it ? Considering its spawned hundreds of times, being the slot of any inventory.