Jump to content

Search the Community

Showing results for tags 'webworker'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. RenderTexture has an awesome function called getPixels, which returns a Uint8Array of rgba pixel data. Is there a way to create a pixi object from a Uint8Array of pixels? I'm writing an image processor which works in a webworker. The Uint8Array is already perfect for passing to/from the webworker, I'm just not sure how to use that pixel data again when it comes back from the worker. On a related note, the main reason I'm looking into using the webworker is because I can't quite get webgl filters (fragment shaders) to perform fast enough for me. I am using a ColorReplaceFilter and applying it to a sprite approximately 12-15 times to create my desired artwork. This creates a lag of 40-80 ms on my system. I need to get this number down to less than 16 ms. It is only the step of rendering via rendertexture with filters that causes this lag. Fifteen might sound like a lot of filters, and I could certainly engineer a single filter that does the work of 15, but the majority of the performance hit comes from applying 1 filter, adding subsequent filters does not slow things down very much. I don't really know how webgl works, but seems to me like something is blocking the main thread and creating this lag. What is the source of this? I feel like there might be an easy solution somewhere. If the problem is that the filters need sent from the cpu to the gpu, perhaps I could send them one at a time (not sure how). If the problem is that PIXI.RenderTexture.render blocks the main thread until webgl has processed all the filters and rendering is complete, perhaps there could be a PIXI.RenderTexture.asyncRender that uses a callback and allows for some image processing magic. Any ideas?
×
×
  • Create New...