thekayaker33 Posted December 2, 2022 Share Posted December 2, 2022 Hello, I am trying to set blendmode on a sprite so that it blends with the background, but it is also blending with other item sprites. How do i exclude sprites from being blended? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 2, 2022 Share Posted December 2, 2022 Hello! Its possible , but you have to hack pixi-picture plugin so it takes your background and not whatever is currently drawn. If you a proficient with renderTextures and filter - yep, you can do it and pixi-picture will help it. Otherwise, you have to show me your case and i'll update a plugin. Possibly through a bounty system (post it on https://github.com/pixijs/pixijs/discussions/ ) Quote Link to comment Share on other sites More sharing options...
thekayaker33 Posted December 2, 2022 Author Share Posted December 2, 2022 I am still using pixi version 5 for the project, this pixi-picture plugin only works for version 6? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 2, 2022 Share Posted December 2, 2022 Copy files of interest from https://github.com/pixijs/picture/tree/pixi-v5/src . Add your blend modes. Btw, overlay and hardlight were swapped there by mistake Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 2, 2022 Share Posted December 2, 2022 Actually, what exact blend do you use? Maybe your task is easier, i just need to know the exact problem. Quote Link to comment Share on other sites More sharing options...
thekayaker33 Posted December 2, 2022 Author Share Posted December 2, 2022 I am actually making a particle container adding sprites to that. then I am changing the blendmode of the particle container. I am also using the pixi-layers plugin to render the sprites using zOrdering. I wanted the particles to display in the background and have the character sprites on top, but right now they are merging together. I don't know if the pixi-layers plugin would conflict with the pixi-pictures code. Also I don't see what I'm suppose to change with the pixi-pictures src files . Am I supposed to make my own blend mode? how would i make that? particleContainer = new PIXI.particles.ParticleContainer(10000, { scale: true, position: true, rotation: true, uvs: false, alpha: true, tint: true, }); particleContainer.blendMode = PIXI.BLEND_MODES.ADD; Quote Link to comment Share on other sites More sharing options...
thekayaker33 Posted December 3, 2022 Author Share Posted December 3, 2022 after looking through the files , i found this line in FilterSystemMixin.ts state.renderTexture = this.getOptimalFilterTexture(state.sourceFrame.width, state.sourceFrame.height, resolution); do i just comment that out? and replace with something like state.renderTexture = backgroundTexture; Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 3, 2022 Share Posted December 3, 2022 Nope Sorry, cant really to spend time on this right now, too much stuff to explain. You can try ask in our discord ) I can do it after weekend maybe ) 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.