Author Topic: blendMode in shaders?  (Read 4533 times)

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
blendMode in shaders?
« on: May 17, 2016, 04:36:04 PM »
I was researching a lot about shaders the other night.. I wanted to incorporate blend modes but as far as I can tell, it can't be accessed through shaders. I think this would typically be enabled with opengl calls glEnable() and glBlendFunc() but I couldn't get that to work. Things like GL_BLEND, GL_ONE and other params don't seem to be defined when called in shaders:
https://www.opengl.org/sdk/docs/man/html/glBlendFunc.xhtml

In order to implement blending yourself, you need access to source color and destination color (which I don't think is available).

It is definitely is a part of SFML, is it maybe just not implemented in AM?
http://www.sfml-dev.org/documentation/2.2/structsf_1_1BlendMode.php