Jump to content

  • Log In with Google      Sign In   
  • Create Account


EvilDuck

Member Since 01 Jun 2012
Offline Last Active Jun 03 2012 02:02 PM
-----

#4945876 Multiplying blood splatters on a plane surface

Posted by EvilDuck on 03 June 2012 - 12:43 PM

Ok, what I ended up with now is rendering splats to a one big texture (levels are small in my game) using FBOs with white initial background and following blending.


GLES20.glEnable(GLES20.GL_BLEND);
GLES20.glBlendFunc(GLES20.GL_DST_COLOR, GLES20.GL_ONE_MINUS_SRC_ALPHA);

device-2012-06-03-224010.png

I need white background for a texture because I can't multiply with zero color obviously.

Then I draw grass tiles and render this texture in a big quad with:


GLES20.glEnable(GLES20.GL_BLEND);
GLES20.glBlendFunc(GLES20.GL_DST_COLOR, GLES20.GL_ZERO);

device-2012-06-03-223706.png

So that's the result I'm getting.

Thanks you, guys, for your ideas!


PARTNERS