ebiten: Android GeoM transform issue on mobile phones with GPU Adreno 305

I was trying to setup a unscaled pixel fitted screen on mobile and saw a glitch. It should render a rotating pulsing image.

On Android there is a glitch: screenshot_20170224-171215

On Desktop works as it should: 2017-02-24 17_12_59-basic

Project is here: https://github.com/egonelbre/ebiten-basic

It uses multiple transformations in a sequence and I think it is what why it’s wasn’t noticed before (https://github.com/egonelbre/ebiten-basic/blob/master/basic/single.go#L29):

	op := &ebiten.DrawImageOptions{}
	op.CompositeMode = ebiten.CompositeModeSourceOver
	op.GeoM.Translate(imgsz.Scale(0.5).Neg().Float64())
	op.GeoM.Rotate(float64(scene.Rotation))
	op.GeoM.Scale(imgsz.Inv().Float64())
	s := scene.Scale * 100
	op.GeoM.Scale(float64(s), float64(s))
	op.GeoM.Translate(frame.Screen.Size.Scale(0.5).Float64())

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (24 by maintainers)

Commits related to this issue

Most upvoted comments

Great news: This can be reproduced on ZenFone Go!