pixijs / pixi-extra-filters

[deprecated] Please see https://github.com/pixijs/pixi-filters
MIT License
66 stars 20 forks source link

Crashing the GPU: GlowFilter #7

Open mattstyles opened 8 years ago

mattstyles commented 8 years ago

Hey,

So the GlowFilter seems to be crashing webGL, the CPU zips up to 100% (which normally isnt enough to hang the laptop) but it isnt until webGL actually craps out that the lappy is usable again.

var stage = new PIXI.Container()
var sprite = new PIXI.Sprite.fromImage( 'apple2.png' )
sprite.position.set( 0, 0 )

stage.addChild( sprite )

var glow = new PIXI.filters.GlowFilter( WIDTH, HEIGHT, 15, 2, 1, 0xFFFFFF, .5 )
stage.filters = [ glow ]

setInterval( () => {
  renderer.render( stage )
}, 1000 / 60 )

MacBook Pro Retina mid 2014 Mac OSX 10.11.1 GeForce GT 750M 2048MB or Intel Iris Pro 1536MB Chrome Version 47.0.2526.73 (64-bit)

Only log is WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost but I think thats after I've tabbed out of Chrome.

Chrome gpu data:

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Rasterization: Software only. Hardware acceleration disabled
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
WebGL: Hardware accelerated
finscn commented 7 years ago

GlowFilter can't be used too.

develra commented 7 years ago

@finscn - just ran into this problem. If you look at the source code, it doesn't appear that the glowFilter uses the renderer width/height any more. I dropped out the first two arguments and the filter worked as expected.

bluntspoon commented 7 years ago

Hi,

I am wanting to use the Glow Filter? Is this still an issue in the latest release? https://github.com/pixijs/pixi-filters/releases/tag/v2.0.0

Thanks Andrew

ivanpopelyshev commented 7 years ago

Well, it works on http://pixijs.github.io/pixi-filters/examples/

bluntspoon commented 7 years ago

That's good, maybe this issue could be closed then?