Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: alpha blending

  1. #1
    Newbie Newbie
    Join Date
    Jan 2018
    Posts
    2

    alpha blending

    hello I don't understand how blending works, i have set :
    Code :
        gl.disable(gl.DEPTH_TEST);
        gl.enable(gl.BLEND);
        gl.blendFunc(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA);
        gl.blendEquation(gl.FUNC_ADD);
    And I get this result :
    https://img15.hostingpics.net/pics/981897problem.png

    could someone explain me what is happening please ?
    thanks in advance.

  2. #2
    Newbie Newbie
    Join Date
    Jan 2018
    Posts
    2
    I get what was wrong, gimp save images as premutiplied alpha. I need to use
    Code :
      this.gl.blendFunc(this.gl.ONE, this.gl.ONE_MINUS_SRC_ALPHA);
    Solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •