07-06-2022, 03:09 PM
(This post was last modified: 07-06-2022, 03:15 PM by josemendez.)
(07-06-2022, 02:21 PM)sinannsekerr Wrote: Hello forum!
Red + Green = Yellow
But in my case red+green = black... Can anyone know something about it?
Fluid does not use additive blending by default, but multiplicative blending. So Red x Green = Black (1,0,0) x (0,1,0) = (0,0,0).
You can change the kind of blending used in the FluidRenderer component. The Particle Blend Source and Particle Blend Destination parameters determine how particles are blended. If you're unsure how blending works in Unity (and in any graphics API), see:
https://docs.unity3d.com/Manual/SL-Blend.html
For additive blending, you want to use "One" for both source and destination.
Also note that blending != mixing (aka diffusion). Blending determines the color of pixels on the screen when several particles are drawn on top of each other. Diffusion actually changes particle colors based on proximity to each other.