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

Posts I've Made

In Topic: Multiplying blood splatters on a plane surface

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);

Attached File  device-2012-06-03-224010.png   539.78KB   52 downloads

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);

Attached File  device-2012-06-03-223706.png   1.18MB   51 downloads

So that's the result I'm getting.

Thanks you, guys, for your ideas!

In Topic: Multiplying blood splatters on a plane surface

02 June 2012 - 03:34 PM

Actually that wont work.


Well, it did work to some extent. I have tried just drawing some splatters after texture with following blending equations:

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

It blends exactly as I need it to. Now I need to figure out how to combine them more efficiently. And here I will try @slicer4ever suggestions.

In Topic: Multiplying blood splatters on a plane surface

02 June 2012 - 02:53 PM

Thank you for your suggestions. I'll try them out and will post if any results.

PARTNERS