0

I'm going to extract the pictures from Heroes III def files. All pictures extracted as a bmp file with blue background. I want to use these pictures in my cocos2d-x project for demo purposes.

How can I use program (GLBlendFunc or Shader?) to make the blue background transparent and choose the shadow visible or not.

source effectexpected effect

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
kode cooper
  • 13
  • 1
  • 4
  • Best use an image editing program and convert the magenta/gray areas to "true" alpha channel (ie pixels whose alpha value is 0). Blend func can't be used for that. Shader probably, if you know the exact RGB values, though it's kinda wasteful to write a shader just for adding transparency. – CodeSmile Oct 23 '14 at 12:49
  • There are a huge amount pictures need to be handler, I want to find a method to batch handle it, or handle it after load in program. – kode cooper Oct 23 '14 at 13:08

0 Answers0