Jump to content

How to use blend modes in a render texture?


Recommended Posts

If I render blend modes like add or multiply in a render texture, they render with black where the transparency would be if I render them against a background.

I don't think I can get the blend mode to affect background layers when rendering into a render texture, I'd probably have to put each layer with the same blend mode in a separate render texture and use the blend mode on the whole texture.

Is there a way to have the blend mode layers render transparent instead of black in the render texture though?

Link to comment
Share on other sites

ADD is possible if you modify default shader ( maybe mesh shader) that way it outputs alpha=0 , then any normal-blend will work as add-blend in those parts of texture.

mesh shader: https://pixijs.io/examples/#/mesh-and-shaders/triangle-textured.js

how to batch in case you need many ADD particles: 

MULTIPLY - not possible, need to know what happens on background, extra input for shader, pixi-picture plugin that I still didnt port to v5 :(

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...