-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a better sprite format #697
Comments
The information is not lost, instead, we encode it in the alpha channel. We should try to keep common formats so that people can easily edit the files for modding. A solution would be a "common" image format that supported 5 channels: |
Ok I missed how the alpha worked. if the extra channels are all exclusive that works. They can be separated into layers when loading too. I'm not sure how to make shaders with outlines appearing in front. maybe the depth buffer could be used in reverse somehow. Is the rendering branch still being used for this stuff? |
First, draw the scene like normal. Then, as next pass for the outline rendering we can basically use a shader to draw just outline pixels with a fixed color if things are obstructed (aka inverted depth buffer). Yes, my |
Do you have a better idea how we can store the additional information without having multiple files per sprite? |
We'll most probably need multiple files anyways, as we already have shadow textures in different files. I don't think keeping every part of a sprite really helps, especially if you have shadows, animations, or multiple sprites in a single file. Maybe we should use a standard naming scheme for different parts of the texture, and use a single folder for each sprite. |
This is very related to #965, which proposes a new metadata format for sprites. This issue here is about the |
Converting from slp to png seems to lose some of the original information, which pixels are part of the outline, or which are real colours, or player colours.
For use in opengl or vulkan, we could save multiple layers per converted slp file:
1: Sprite plain colours as RGB
2: Player colours: mono (later replaced in shader, with player colour)
3: Outlines: mono (later replaced in shader, with player colour)
Maybe use a different format (can png save multiple layers in one file?)
or create a new format, probably just some container for png, and save to different files in conversion.
The text was updated successfully, but these errors were encountered: