JErvin Posted September 17, 2023 Share Posted September 17, 2023 Finally I could create a bullet decay effect with renderTexture, I attached the image. There is a black ammoBox texture, and I render to it a red slpash texture. It works nice, but when I apply a blurFilter to the red splash sprite I cannot see it, I only can see the black ammoBox. I guess, it is because the red splash sprite becomes alpha (without the SRC_ATOP blendmode I see the image well, just little blurry, as expected). What can I do to achiveve similar effect and also can use it with blurFilter? So my goal is, I have a sprite, like an ammoBox, it has transparent parts, I do not want to copy anything to the transparent parts, but any other part I want to copy my image (even if it has alpha in it). Thank you! const brick=new Sprite(textures["ammoBox.png"]); const wheelRenderTexture = RenderTexture.create({width: brick.width, height: brick.height}); const wheelRenderSprite = new Sprite(wheelRenderTexture); wheelRenderSprite.x=1200; wheelRenderSprite.y=1200; this.contGame.addChild(wheelRenderSprite) this.app.renderer.render(brick,{renderTexture: wheelRenderTexture, clear: false}); const splash=new Sprite(textures["splash.png"]); splash.blendMode=BLEND_MODES.SRC_ATOP; splash.tint=0xFF0000; splash.filters=[new BlurFilter(1)]; //With this it not works :( this.app.renderer.render(splash,{renderTexture: wheelRenderTexture, clear: false}); 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.