- Home /
Possible to replace a color with an image texture?
situation: I am downloading an image via google maps, the colors of this can be modified so that I can customize what the map looks like, however, plain colors are not what I am after. because custom textures cannot be submitted as a part of the URL to grab the map image, this is what i am left with.
My thoughts were to either (see example):
A) grab the texture before it is applied, then do a pass over it and applying an image to each separated color with a unique value.
B) use a camera effect to modify the values that are being shown to the player after the image has been applied using the same concept as above.
C) modify the shader to "post process" the texture to separate the colors and apply a texture to them
Ex. (0,255,0) or green would be assigned a grass texture, so instead of being green, it will appear as the grass texture, whereas (0,0,255) or blue would become a water texture.
TLDR; I need to replace the colors in an image downloaded from google maps with assigned textures for certain colors, what would be the best way to achieve this goal and where is a starting point for your answer?