This is a file containing data about a sprite asset.
It contains:
UV information
Path of the actual sprite file
Encoding format
Overrides
This data is stored in the JSON data, but it gets encoded into a much smaller type during shard-gen.
A sprite renderer is pointing toward a PNG file: example.png.
Case 1: A file in the same path exists named example.png.meta
This file will be parsed instead of example.png, if this file points to example.png then it will be encoded.
Case 2: No matching meta file exists
In this case the system will fall back to any normal PNG file at the specified path and generate a default meta texture. This meta texture won't be saved on disk, it will only be encoded onto the shard so that runtime can read all of the needed data.
This system could be expanded upon in the future, a sprite sheet could automatically be converted to a set of meta textures with different UVs during shard-gen.
This will make #24 & #29 possible
Task List:
Runtime:
[x] Split sprite asset type into two separate types. TextureMeta that contains the meta texture data & Texture. The TextureMeta type could have an Arc Mutex pointing to its Texture, as both should always be in the same shard.
This is a file containing data about a sprite asset. It contains:
This data is stored in the JSON data, but it gets encoded into a much smaller type during shard-gen.
A sprite renderer is pointing toward a PNG file: example.png.
Case 1: A file in the same path exists named example.png.meta This file will be parsed instead of example.png, if this file points to example.png then it will be encoded.
Case 2: No matching meta file exists In this case the system will fall back to any normal PNG file at the specified path and generate a default meta texture. This meta texture won't be saved on disk, it will only be encoded onto the shard so that runtime can read all of the needed data.
This system could be expanded upon in the future, a sprite sheet could automatically be converted to a set of meta textures with different UVs during shard-gen.
This will make #24 & #29 possible
Task List:
Runtime:
Shard-Gen