Ebiten: Invalid rendering on iOS (Wasm)

Created on 23 Jun 2018  路  13Comments  路  Source: hajimehoshi/ebiten

http://hajimehoshi.github.io/go-inovation/wasm/

img_3018

This screenshot is by Pontus Leitzler.

GopherJS ver (http://hajimehoshi.github.io/go-inovation/) works correctly.

bug external ios wasm

All 13 comments

It looks like vertices are correct, but texture data is broken. Hmm...

https://github.com/hajimehoshi/ebiten/issues/721 should be fixed in the first place?

With Go 1.12 beta2, the go-inovation app shows the below error on iOS (not desktops).

Unhandled Promise Rejection: Error: import function go:runtime.scheduleTimeoutEvent must be callable

Before this, we'd need to fix the OOM issue #678

With Go 1.13, the result has become more psychedelic...

IMG_0003

Maybe other examples doesn't cause this issue, but examples/blocks caused. This doesn't extend the internal images, so extending logic is not the culprit. Hmm

diff --git a/examples/blocks/blocks/titlescene.go b/examples/blocks/blocks/titlescene.go
index 7b6c47fa..15782744 100644
--- a/examples/blocks/blocks/titlescene.go
+++ b/examples/blocks/blocks/titlescene.go
@@ -32,7 +32,9 @@ func init() {
        if err != nil {
                panic(err)
        }
-       imageBackground, _ = ebiten.NewImageFromImage(img, ebiten.FilterDefault)
+       println(img.At(16, 15).(color.RGBA).R, img.At(16, 15).(color.RGBA).A)
+       println(img.At(16, 16).(color.RGBA).R, img.At(16, 16).(color.RGBA).A)
+       imageBackground, _ = ebiten.NewImageFromImage(img, ebiten.FilterNearest)
 }

 type TitleScene struct {

Expected:

255 255
204 255

On iOS Safari:

0 255
255 255

Then, it looks like something is broken on Wasm side, not GPU side.

Can you try again with iOS 13? See https://github.com/golang/go/issues/32635#issuecomment-533888835.

Edit: I tried the link in the original issue, and can confirm iOS 13 fixes the problem.

This is with iOS 12.4.1:

image

This is with iOS 13:

image

Unfortunately, I couldn't test on the same device, but the chance of this being due to hardware difference rather than software seems low.

OK I'll try to update my device to iOS 13 first...

Unfortunately my devices don't get iOS 13 yet. I need more time.

Hmm, mine is iPhone 6 (not S) and iOS 13 never comes. I'd need to buy a new iPhone :-P

Fixed by iOS 13.

Was this page helpful?
0 / 5 - 0 ratings