GL Blend Equation in Renderer TOP or MAT

[ 2020.24520 - x64 - Win10 ]

Hi there, been using Touch for several years now and have become fairly familiar with gl transparency and blending. I am trying to accomplish a particular effect with blending in the Renderer TOP using geo & mats, that would emulate light being cast onto a surface. (Previz life…)

If you look at the GL spec there’s different blend equations as to how a frag should be mixed with the buffer of other objects, and in the MAT Common tab, the Source Color & Destination Color exposes some of these parameters. There is another one tho, that you can see in this nice lil web tool, that is the Blend Equation. Default is Addition, as you can see here in the docs (bottom of the page):
blend-3
The src is ADDED to the dest. To accomplish the effect I am going for, I need to do a MAX() of src & dest. I believe it would then be a matter of TD exposing this GL Blend equation somehow, potentially in the MAT Common tab along with Source and Dest.

Using a minimal GLSL setup, I can accomplish this effect. Screenshots below, and .toe file here:


Is this currently possible to configure the Materials, or Renderer TOP, so that the bottom right “Renderer” frame produces the same output as the the top left “Blend Maximum” frame in my test?

Key differences are that as light channels appear additive independent of depth, so the innermost intersection approaches white, but most importantly, as the green circle fades to cyan, the portion where it overlaps with the blue circle is unchanged, as it does not ADD any more blue, since its a MAX function and blue is already there.

This could be an RFE but first wanted to validate if it was possible in a way that I have just not found yet. Happy to clarify anything, as this is fairly nuanced. Thanks!!!

1 Like