indie dev, working hard on Soda-Powered Penguin!
steam: (WITH DEMO!)
http://sodapoweredpenguin.com
discord:
discord.gg/txpYqy7pyV
patreon:
https://www.patreon.com/sodapoweredpenguin
contact:
sodapoweredpenguin AT gmail.com
#indiedev #gamedev
#indiedev #gamedev
#pixelart #indiedev #leveldesign
#pixelart #indiedev #leveldesign
so... how about we combine multiple R8 color indexed textures into a single RGBA32 texture?
each R8 texture could occupy a different color channel after all!
so... how about we combine multiple R8 color indexed textures into a single RGBA32 texture?
each R8 texture could occupy a different color channel after all!
this is actually just the first part of the "Find and Replace All" shader- but instead of outputting a swapped color, we just output index "i" converted to a color!
this is actually just the first part of the "Find and Replace All" shader- but instead of outputting a swapped color, we just output index "i" converted to a color!
doing it by hand is certainly not an option. like the original recolor-by-hand approach, you'd need to throw out your work and start again every time you make a change to the original image.
doing it by hand is certainly not an option. like the original recolor-by-hand approach, you'd need to throw out your work and start again every time you make a change to the original image.
so, the shader to convert color indices back to RGBA colors should look something like this:
so, the shader to convert color indices back to RGBA colors should look something like this:
1. if the color matches source color at position "i", then output the corresponding swap color at position "i".
2. if the color doesn't match, then add 1 to "i" and go back to step 1
1. if the color matches source color at position "i", then output the corresponding swap color at position "i".
2. if the color doesn't match, then add 1 to "i" and go back to step 1
if we wanted to change more colors, we could chain the logic of this shader:
if we wanted to change more colors, we could chain the logic of this shader:
If the pixel's color matches the "source" color, then the shader will render the "swap" color instead of the original color.
If the pixel's color matches the "source" color, then the shader will render the "swap" color instead of the original color.
here's the default shader most game engines have- and here's exactly where you see the "tint" color multiplication!
here's the default shader most game engines have- and here's exactly where you see the "tint" color multiplication!
this explains why "tint" never provides a satisfactory result!
(it is useful for transparency at least!)
this explains why "tint" never provides a satisfactory result!
(it is useful for transparency at least!)