Jump to content

How to change blend equation?


leht
 Share

Recommended Posts

Hello,

Could you tell me how to use the blend equation other than GL_FUNC_ADD and GL_FUNC_SUBTRACT? For example I want to use the GL_MIN and GL_MAX.

I've read about the Material.alphaMode property but cannot find the suitable option for my case.

Link to comment
Share on other sites

Thank you very much! It works.

A bit correcting: we should call engine._alphaState.setAlphaEquationParameters(...)

Do you think we need some clearer way to customize blend mode (blend equation, blend func parameters)? I think Material.alphaMode  is easy to use but not enough. And do the trick like above seems quite ugly ...

Link to comment
Share on other sites

Thanks @Deltakosh,

Of course I can do a PR for some more options, but I think there will be not many people here need them, since those options are only for some special needs. (I'm working in the MIP / MinIP feature of a DICOM viewer medical application, not a video game.)

Recently I worked with Three JS & they have a customBlending mode with separated methods for customizing blend equation & blend function parameters (https://threejs.org/docs/#api/en/constants/CustomBlendingEquations).

Do you think we need a similar way for easier customization?

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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