mirror of
https://github.com/flame-engine/flame.git
synced 2026-03-13 09:43:03 +08:00
Added Basic Shader Tutirial to Flame documentation. Added one note to CONTRIBUTING.md, which explains how to resolve non UTF-8 characters in path. --------- Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com> Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
715 B
715 B
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.