alex_h Posted November 13, 2016 Share Posted November 13, 2016 I have a new game in which I'm using context.createRadialGradient to generate a vignette effect, ie darkened edges surrounding a transparent area in the middle. I'm then using this canvas as a texture source for a sprite in pixi.js v3. This has been working very well on iOS and on desktop. I've just come to test the game in chrome on an Android phone and discovered that it is not really working there at all. Under webgl I see no gradient and the screen just strobes with plain black. Under canvas2D there is just no vignette rendered at all. I'm getting the feeling that I might have to use prebaked vignettes after all which is a shame because they won't fit into my existing texture atlas. Has anybody else encountered this problem of createRadialGradient not working in chrome on android? Maybe I am missing something obvious? Quote Link to comment Share on other sites More sharing options...
alex_h Posted November 13, 2016 Author Share Posted November 13, 2016 Hmmm... seems I was jumping to conclusions about what was causing the strobing actually... if I remove the vignette sprite it is still happening! More debugging required it seems... Quote Link to comment Share on other sites More sharing options...
alex_h Posted November 13, 2016 Author Share Posted November 13, 2016 Actually the strobing is a separate issue and only seems to happen on my phone. I tested on another Android device and the strobing was gone. But the radial gradient issue remains - no gradient was rendered. I'm creating vignettes with radial gradients in two slightly different ways in different places and neither of them work. In the simplest case I'm filling a rect with a radial gradient that goes from black at the edges to fully transparent at the middle. Works everywhere else but not in mobile chrome on Android it seems. [Edit] - whoops, should have put this in the Coding and Game Design forum! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.