ebiten: Refactoring

This commit is contained in:
Hajime Hoshi
2020-07-26 14:33:37 +09:00
parent 637afe6d67
commit d08a04a635
2 changed files with 21 additions and 21 deletions

View File

@@ -305,9 +305,10 @@ func (g *Graphics) DrawShader(dst driver.ImageID, srcs [graphics.ShaderImageNum]
us[0].value = []float32{float32(vw), float32(vh)}
for i, o := range offsets {
const offset = 1
o := o
us[i+1].name = fmt.Sprintf("U%d", i+1)
us[i+1].value = o[:]
us[i+offset].name = fmt.Sprintf("U%d", i+offset)
us[i+offset].value = o[:]
}
for i, v := range uniforms {