
Graphics · C++ · OpenGL
A Lightweight C++ Material and Shader Library for SFML
SlimShader is a C++ library that wraps SFML's shader system into a clean, object-oriented Material abstraction. Instead of manually managing shader uniforms and textures per draw call, materials encapsulate all shader state and can be applied to any SFML drawable in a single line.
The library is designed for composability — custom materials are created by inheriting from the base Material class, implementing initialize() for shader loading and update() for per-frame uniform updates.
MFire* mFire = new MFire(&textureLoader); mFire->initialize(); mFire->setFireColors( sf::Glsl::Vec4(1.0f, 0.2f, 0.1f, 1.0f), // inner sf::Glsl::Vec4(1.0f, 0.6f, 0.0f, 1.0f), // mid sf::Glsl::Vec4(1.0f, 1.0f, 0.0f, 1.0f) // outer );