Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid rendering on iOS (Wasm) #631

Closed
hajimehoshi opened this issue Jun 23, 2018 · 13 comments
Closed

Invalid rendering on iOS (Wasm) #631

hajimehoshi opened this issue Jun 23, 2018 · 13 comments

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Jun 23, 2018

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.

@hajimehoshi
Copy link
Owner Author

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

@hajimehoshi hajimehoshi modified the milestones: v1.8.0, v1.9.0 Sep 10, 2018
@hajimehoshi
Copy link
Owner Author

#721 should be fixed in the first place?

@hajimehoshi hajimehoshi removed this from the v1.9.0 milestone Oct 23, 2018
@hajimehoshi hajimehoshi added this to the v1.9.0 milestone Jan 21, 2019
@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Jan 21, 2019

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

@hajimehoshi
Copy link
Owner Author

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

@hajimehoshi hajimehoshi removed this from the v1.9.0 milestone Jan 21, 2019
@hajimehoshi
Copy link
Owner Author

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

IMG_0003

@hajimehoshi
Copy link
Owner Author

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

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Jun 15, 2019

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.

@hajimehoshi
Copy link
Owner Author

golang/go#32635 Reported

@dmitshur
Copy link

dmitshur commented Sep 22, 2019

Can you try again with iOS 13? See golang/go#32635 (comment).

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.

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Sep 22, 2019

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

@hajimehoshi
Copy link
Owner Author

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

@hajimehoshi
Copy link
Owner Author

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

@hajimehoshi
Copy link
Owner Author

Fixed by iOS 13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants