Tag Info

New answers tagged

1

The easiest thing would be to create a gradient in Photoshop/Paint.NET/GIMP/whatever you use and blend that with your tile(s). If you want a more procedural approach, then take a look at Color.Lerp. A gradient with that method is simple. The first color parameter is the light shade, the second is the final dark shade and the progress is the row/column of ...


2

Convert them to the normalised space: float r1 = color1.r / 255.0f; float g1 = color1.g / 255.0f; float b1 = color1.b / 255.0f; float a1 = color1.a / 255.0f; float r2 = color2.r / 255.0f; float g2 = color2.g / 255.0f; float b2 = color2.b / 255.0f; float a2 = color2.a / 255.0f; and them multiply them: float r3 = r1 * r2; float g3 = g1 * g2; float b3 = b1 ...


0

You can use a simple shader for this, but I wouldn't do so, simply due to the fact that you're doing simple tinting with one color (or shades of one color) only. The Unity script above would work with some modifications, but you'll have to keep in mind that there's additional overhead/metadata in there that doesn't belong to the actual GLSL code. What I'd ...



Top 50 recent answers are included