Giter Club home page Giter Club logo

Comments (4)

samme avatar samme commented on June 6, 2024 1

Someone reported a similar issue in Phaser 3.

from phaser-ce.

photonstorm avatar photonstorm commented on June 6, 2024 1

The Text Game Object is literally just a hidden canvas that uses fillText to draw the text to it. The Canvas API does all of the text rendering, strokes, etc. The canvas is then turned into a WebGL texture and uploaded to the GPU.

If disabling hardware rendering fixes it, then clearly something is very wrong in that combination of Chrome + GPU + Windows. The fact that resizing the text to a much larger size fixes it is curious. Doing that would cause it to resize the canvas it was using, re-draw the text, and re-upload it to the GPU. Perhaps this is triggering a certain size threshold (next power of two up, perhaps?) on the GPU?

Also, I wonder if mipmaps may cause this. I honestly can't remember if they're supported in CE, but if they are, I would try disabling them.

We definitely can't fix the root cause of the issue (i.e. whatever causes Chrome to nuke parts of the font), but maybe there is a combination of sizes, or a certain texture size/ratio that prevents it from occurring in the first place. If you were to run WebGLSpector on one of the 'broken' machines, you could profile a frame and inspect all of the textures on the GPU. I fully expect you to see the glitch in there, but you'd also get to inspect the rest of the texture properties, too. I still reckon this is related to the base canvas size that the Text object creates initially (which is driven by the text content)

from phaser-ce.

iammatthewbirch1 avatar iammatthewbirch1 commented on June 6, 2024

We've just had reports of the same thing happening, thanks for raising the issue

from phaser-ce.

Akurn avatar Akurn commented on June 6, 2024

You've just made me realise I've overlooked the type of renderer in my tests. Currently I've only seen the issue via the Canvas renderer, but I now realise the tests in Phaser 3 and Pixi are likely using WebGL. So I'll need to do some more tests with WebGL vs Canvas2D once I get access to the broken machines again.

Thanks for all the replies and insight, already very helpful ❤️

from phaser-ce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.