faiface / pixel

A hand-crafted 2D game library in Go
MIT License
4.46k stars 245 forks source link

Alllow shader / uniforms to be updated during the game loop #303

Open JasonMDavey opened 2 years ago

JasonMDavey commented 2 years ago

Currently, it appears that we're only intended to ever use one fragment shader, and uniforms are only updated once per frame.

A little reworking should permit multiple shaders to be used / switched between, and for uniforms to be changed between draw calls, which would allow much greater flexibility in applying different effects to different graphical elements in a scene.