sergkub Posted September 23, 2014 Share Posted September 23, 2014 Hello. I am rendering on renderTexture, sprite with blur filter,rendering be with weak blur, unlike sprite, have any ideas why? Quote Link to comment Share on other sites More sharing options...
hubert Posted September 24, 2014 Share Posted September 24, 2014 are there any other containers that you have used blur with? Maybe the parent has a blur on it and the effect is added to the child. If so that would explain the behavior. http://www.sevenative.com Quote Link to comment Share on other sites More sharing options...
sergkub Posted September 24, 2014 Author Share Posted September 24, 2014 Here my example.I changed pixi example "1 Basics" === var assetsToLoader = ["bunny.png"]; var loader = new PIXI.AssetLoader(assetsToLoader); loader.onComplete = onAssetsLoaded loader.load(); function onAssetsLoaded(){ var stage = new PIXI.Stage(0x66FF99); var renderer = PIXI.autoDetectRenderer(400, 300); var texture = new PIXI.Texture.fromFrame("bunny.png"); var bunny = new PIXI.Sprite(texture); var blur_filter = new PIXI.BlurFilter(); blur_filter.blur = 20; bunny.filters = [blur_filter]; var render_texture = new PIXI.RenderTexture(); render_texture.render(bunny); // comment and uncomment for see difference blur power bunny = new PIXI.Sprite(render_texture); bunny.position.x = 100; bunny.position.y = 100; stage.addChild(bunny); function animate() { requestAnimFrame(animate); renderer.render(stage); } document.body.appendChild(renderer.view); requestAnimFrame(animate); } === Quote Link to comment Share on other sites More sharing options...
sergkub Posted September 25, 2014 Author Share Posted September 25, 2014 i watch blur power depends of renderer size ...Example. blur = 5 on renderer size 100x100 different power on renderer size 1000x1000. It's bug or not ? Quote Link to comment Share on other sites More sharing options...
hubert Posted September 25, 2014 Share Posted September 25, 2014 No idea. Feel free to notify the pixie team https://github.com/GoodBoyDigital/pixi.js/issues http://www.sevenative.com Quote Link to comment Share on other sites More sharing options...
sergkub Posted September 25, 2014 Author Share Posted September 25, 2014 http://jsfiddle.net/sD8Tt/8/ Quote Link to comment Share on other sites More sharing options...
hubert Posted September 26, 2014 Share Posted September 26, 2014 When you said that it depends on the renderer size did you mean the result of autoDetectRenderer method or the renderTexture method. In the example above you can see that with renderTexture you need to pass the size of the rendered texture. I'm not sure if this is what you are looking for? http://jsfiddle.net/sD8Tt/10/ http://www.sevenative.com Quote Link to comment Share on other sites More sharing options...
sergkub Posted September 26, 2014 Author Share Posted September 26, 2014 Both, blur power depends of autoDetectRenderer and renderTexture size.I looked your example, thanks, try set renderTexture size 1500x1500 you will see difference. Quote Link to comment Share on other sites More sharing options...
hubert Posted September 26, 2014 Share Posted September 26, 2014 OK! I have it working for you with a jsFiddle! What you need to do is to pass to the renderTexture sprite.width * 4 http://jsfiddle.net/sD8Tt/17/ The solution is not perfect because in case of blurs over 100 the image becomes malformed but I assume that you won't be needing it! http://www.sevenative.com 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.