various changes:

- renamed example shaders to .kage
- added --map-* options to map builtin uniforms to custom names
- added ebitengine sample shader with mapping (run `make shader-ebiten`)
- fixed bug: shaders with 0 images are allowed now
This commit is contained in:
2024-03-25 15:41:51 +01:00
parent 8cd2d74a8b
commit e42df9080f
7 changed files with 87 additions and 33 deletions

View File

@@ -135,10 +135,10 @@ func (game *Game) Draw(screen *ebiten.Image) {
mousex, mousey := ebiten.CursorPosition()
op.Uniforms = map[string]any{
"Flag": game.Flag,
"Slider": game.Slider,
"Ticks": game.Ticks,
"Mouse": []float64{float64(mousex), float64(mousey)},
game.Conf.Flag: game.Flag,
game.Conf.Slider: game.Slider,
game.Conf.Ticks: float64(game.Ticks) / 60,
game.Conf.Mouse: []float64{float64(mousex), float64(mousey)},
}
copy(op.Images[:3], game.Images)