09-01-2020, 03:35 PM
(This post was last modified: 09-01-2020, 03:41 PM by josemendez.)
(09-01-2020, 03:23 PM)sc00b Wrote: Blend One One - this mode creates a red center and white in a circle, but in the end everything is white)
Make sure the background buffer is cleared to black, not white. If you add any color to white, you'll of course get white. In additive blending, you need to start from black and gradually add color to it. In multiplicative blending, you start from white and gradually remove color from it. Like in the image I posted depicting both blending modes.
So in the ObiSimpleFluidRendererColored file I provided, change this line:
Code:
renderFluid.ClearRenderTarget(true,true, new Color(1, 1, 1, 0));
to this:
Code:
renderFluid.ClearRenderTarget(true,true, new Color(0, 0, 0, 0));