Hello Guest

Alpha values between multiple VBOS

  • 1 Replies
Alpha values between multiple VBOS
« on: August 13, 2016, 11:07:47 »
Currently I have two VBO's interacting , one base layer which stores tile and item information and one top layer which stores an overlay for the lighting. The lighting is made up of sprites with differing alpha values however after following steps I found to enable glBlendMode() I was not successful in getting blending. Is it possible to blend multiple VBO's by using a piece of shader code or is it simply easier to just rewrite?


Offline Cornix

  • *****
  • 488
Re: Alpha values between multiple VBOS
« Reply #1 on: August 13, 2016, 12:28:37 »
VBO's have nothing to do with blending. You can use as many of them as you want and you can use them with other techniques for rendering as well. The only thing that matters is that they all write to the same framebuffer and use a shader which supports blending. The default framebuffer and the fixed-functionality pipeline shaders can be used for that without any problems.

I would suggest you start with a completely minimalistic example and work your way up from there. I would recommend just drawing 2 colored triangles with alpha on top of each other and making them blend. If you can do this then you can slowly add more stuff until you find your problem.