gopxl / pixel

A hand-crafted 2D game library in Go.
MIT License
244 stars 10 forks source link

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

Open duysqubix opened 1 year ago

duysqubix commented 1 year 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.

Original issue: https://github.com/faiface/pixel/issues/303