Takeaways¶
Conclusion¶
There are three layers involved when using shaders in Flame:
Component layer (
SpriteComponentandPostProcessComponent): connects shaders to Flame components, holds game logic and handles user input.Post process layer (
PostProcess): bridges components and shaders, manages runtime settings and updates uniforms each frame.GLSL shader (
.fragfile): the GPU program that determines the final pixel colors.
Closure¶
We hope this tutorial helped you understand the basics of using shaders in Flame. Feel free to tweak the code to suit your needs, happy coding!
If you find any errors or have suggestions, please let us know through GitHub or Discord.
The content on this page is licensed under the CC BY 4.0 License,
and code samples under the MIT License.