Results 1 to 2 of 2

Thread: How does blending and gamma work?

  1. #1

    How does blending and gamma work?

    I've noticed alpha blending tends to wash out my textures and wrote a little test:

    The left image is an alpha-blended PNG using (SRC_ALPHA,ONE_MINUS_SRC_ALPHA). The other premultiplies the texture's rgb with alpha in the shader and then blends with (ONE,ONE_MINUS_SRC_ALPHA). How come they look different?

    I would expect the outcome to be the right image, the left one looks washed out. I can't think of a reason for the discrepancy other than some gamma correction happens on the fragment before the blending function gets to it. Context premultipliedAlpha is set to false, are there other context flags for gamma correction?

  2. #2

    Re: How does blending and gamma work?

    Nevermind! This is alpha-blended alpha cutting holes into my canvas and premultiplied alpha fixing the problem. Apologies for the n00b-post .

Similar Threads

  1. Work Group and Work Item sizes
    By howard in forum OpenCL
    Replies: 1
    Last Post: 03-08-2013, 10:08 PM
  2. Replies: 2
    Last Post: 12-14-2011, 04:47 PM
  3. Replies: 1
    Last Post: 11-18-2011, 09:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean