# Separate Blending Equations

**URL:** <https://discourse.threejs.org/t/separate-blending-equations/11204>\
**Category:** Questions\
**Tags:** materials\
**Created:** [December 4, 2019, 1:24pm UTC](https://discourse.threejs.org/t/separate-blending-equations/11204 "2019-12-04T13:24:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dugyu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/dugyu/32/18537_2.png) [@Dugyu](https://discourse.threejs.org/u/Dugyu)\
**Post date:** [December 4, 2019, 1:24pm UTC](https://discourse.threejs.org/t/separate-blending-equations/11204/1 "2019-12-04T13:24:24Z")

</div>

Hi all!

I am new to Three.js, and have a question about material custom blending equations.  
Can we do glBlendFuncSeparate in Three.js?  
I want to separate the blending factors for color and alpha. It seems that the custom blending equations do not support such seperation?

Thank you!!

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [December 4, 2019, 1:40pm UTC](https://discourse.threejs.org/t/separate-blending-equations/11204/2 "2019-12-04T13:40:13Z")

</div>

> [@Dugyu](#):
>
> It seems that the custom blending equations do not support such seperation?

`three.js` does support this as you can see at the following code in `WebGLState`:

> <https://github.com/mrdoob/three.js/blob/3c300e3ac2ef1341a3284a0297c131eaec14faaa/src/renderers/webgl/WebGLState.js#L659-L668>

Can you please show how you configure your material? Maybe as a [live example](https://jsfiddle.net/f2Lommf5/)? This should make it easy to verify which code path is taken in `WebGLState`.

---

<div class="post-metadata">

**Author:** ![Dugyu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/dugyu/32/18537_2.png) [@Dugyu](https://discourse.threejs.org/u/Dugyu)\
**Post date:** [December 4, 2019, 1:45pm UTC](https://discourse.threejs.org/t/separate-blending-equations/11204/3 "2019-12-04T13:45:21Z")

</div>

Thank you sooo much!!  
I thought it doesn’t because it’s not in the docs. Will try it out!

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [December 4, 2019, 1:52pm UTC](https://discourse.threejs.org/t/separate-blending-equations/11204/4 "2019-12-04T13:52:29Z")

</div>

This example might be useful to you:

[https://threejs.org/examples/webgl\_materials\_blending\_custom](https://threejs.org/examples/webgl_materials_blending_custom)
