Jump to content

Search the Community

Showing results for tags 'WebGLTexture'.

  • 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. I'm returning a RenderTarget object from my Filters. I would like to use the Texture from the render target and apply it onto a Sprite Object. My Code: myBlurYFilter.renderCallback = (renderTarget) => { this.mySprite.texture = renderTarget.texture;};Added a callback function to the ApplyFilter function code: if(this.renderCallback !== null) this.renderCallback(renderTarget)Resulting ApplyFilter function: BlurYFilter.prototype.applyFilter = function (renderer, input, output, clear){ var shader = this.getShader(renderer); this.uniforms.strength.value = Math.abs(this.strength) / 4 / this.passes * (input.frame.height / input.size.height); if(this.passes === 1) { renderer.filterManager.applyFilter(shader, input, output, clear); if(this.renderCallback !== null) this.renderCallback(output) } else { var renderTarget = renderer.filterManager.getRenderTarget(true); var flip = input; var flop = renderTarget; for(var i = 0; i < this.passes-1; i++) { renderer.filterManager.applyFilter(shader, flip, flop, true); var temp = flop; flop = flip; flip = temp; } renderer.filterManager.applyFilter(shader, flip, output, clear); if(this.renderCallback !== null) this.renderCallback(renderTarget) renderer.filterManager.returnRenderTarget(renderTarget); }};How can I convert the WebGLTexture Object to a PIXI.Texture Object so that I can use it on a Sprite?
×
×
  • Create New...