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
i need to rest but this is the first thing i'll do when i wake
i need to rest but this is the first thing i'll do when i wake
September 19th for SAGE 2025!
September 19th for SAGE 2025!
I can't express how awesome it was of lenny from the discord to do this :)
#pixelart
I can't express how awesome it was of lenny from the discord to do this :)
#pixelart
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!
and, while we're at it, we could actually use a single-color channel texture format too! this reduces the texture file size by 75%
and, while we're at it, we could actually use a single-color channel texture format too! this reduces the texture file size by 75%
a texture is a single grid of colors.
a texture is a single grid of colors.
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:
textures use a different RGBA format than shaders, where each color channel value can be 0-255. this is automatically converted to 0.0-1.0 in the shader.
textures use a different RGBA format than shaders, where each color channel value can be 0-255. this is automatically converted to 0.0-1.0 in the shader.
especially since the NES only defined colors with 2 bits- so that sprites could only have 4 colors total!
especially since the NES only defined colors with 2 bits- so that sprites could only have 4 colors total!
the penguin's palette consists of 6 colors, but the level palette will have at least 36.
shaders run for every pixel on every frame, so performance matters!
the penguin's palette consists of 6 colors, but the level palette will have at least 36.
shaders run for every pixel on every frame, so performance matters!
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
this is fine for games with limited palette swaps! but remember, i want to swap the palette of a whole level, so i need to build a more robust system.
this is fine for games with limited palette swaps! but remember, i want to swap the palette of a whole level, so i need to build a more robust system.
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!
the important part of this process is the shader, which i promise to break down in an easy-to-understand way!
the important part of this process is the shader, which i promise to break down in an easy-to-understand way!
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!)