Description:
Currently, the Source Engine in this repository relies primarily on VTF (Valve Texture Format) for texture assets, with only partial or indirect support for modern image formats such as PNG and JPG.
While ILBPNG and stb_image are present in the third-party libraries, the engine does not yet have a fully integrated runtime loading pipeline for these formats.
Problem:
PNG/JPG images are not registered as first-class texture formats in the materialsystem.
Runtime loading requires conversion to VTF, adding unnecessary complexity.
Missing features such as mipmap generation, sRGB color handling, and alpha transparency support.
No direct GPU upload path from decoded PNG/JPG data.
Proposal:
-
Register .png and .jpg as valid texture file extensions in the engine’s filesystem/materialsystem.
-
Integrate ILBPNG and/or stb_image into the texture loading pipeline.
-
Implement runtime mipmap generation and proper sRGB/alpha channel handling.
-
Ensure decoded image data can be directly uploaded to the GPU as an ITexture object.
-
Maintain backward compatibility with VTF for existing assets.
Benefits:
Simplifies asset creation workflows by allowing direct use of PNG/JPG files.
Improves cross-platform compatibility with common image formats.
Reduces dependency on external conversion tools.
References:
stb_image GitHub – lightweight image decoding library.
Valve Developer Community – VTF – existing texture format used by Source Engine.