mirror of
https://codeberg.org/scip/kageviewer.git
synced 2025-12-16 20:20:58 +01:00
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:
8
game.go
8
game.go
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user