Hi there,
RFE: Would it be possible to add a ‘reflect(A,B)’ and ‘refract(A,B,C)’ function to the mathmix operations? Those are predefined GLSL functions and can help alot for particle collisions (mainly reflect). I can imagine some interesting effects with refract() as well.
Other thing which I’m not sure is technical possible but thought about mentioning. When working with arrays (like position outputs of the neighborPOP), you often want to do some math operations with each element in this array. Would it be possible that if the attribute is an array, it automatically creates a for loop out of it ? See attached TOX as example using 5 mathmix to handle 5 neighbors vs 1 GLSL shader with a for-loop. No problem ofcourse to use a GLSL POP for this, so not a big RFE from my side, but could be an idea to keep the glsl usage to a minimum
Last thing is that I think the mix(a,b,c) is reversed. This might be a feature rather than a bug since I guess you want to have consistency with the ‘A if C else B’ option. Though it feels a bit weird when you’re used to the GLSL mix() function. See second attachment.
Cheers,
Tim
NeighborMath.tox (2.5 KB)
Backwards_mix.tox (1.1 KB)