justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: layer problem: is it bug of lice? How to overcome it?
Asked by ruchira (202.129.232.x) on October 19 2010, 6:37pm
Reply on October 19 2010, 9:21pm (edited at October 19 2010, 9:28pm):
    I think it is a LICE bug, yeah. Working on a fix now.

    OK, got it. Sorry for the delay. in lice_combine.h, replace the following two classes with these versions:
    
    class _LICE_CombinePixelsCopySourceAlphaIgnoreAlphaParmNoClamp
    {
    public:
      static inline void doPix(LICE_pixel_chan *dest, int r, int g, int b, int a, int alpha)
      {
        if (a)
        {
          if (a==255)
          {
            _LICE_MakePixelNoClamp(dest,r,g,b,a);
          }
          else
          {
            int sc=(255-a);
    
            _LICE_MakePixelNoClamp(dest,
                r + ((dest[LICE_PIXEL_R]-r)*sc)/256,
                g + ((dest[LICE_PIXEL_G]-g)*sc)/256,
                b + ((dest[LICE_PIXEL_B]-b)*sc)/256,
                a + ((dest[LICE_PIXEL_A]-a)*sc)/256);
          }
        }
      }
    };
    class _LICE_CombinePixelsCopySourceAlphaIgnoreAlphaParmClamp
    {
    public:
      static inline void doPix(LICE_pixel_chan *dest, int r, int g, int b, int a, int alpha)
      {
        if (a)
        {
          if (a==255)
          {
            _LICE_MakePixelClamp(dest,r,g,b,a);
          }
          else
          {
            int sc=(255-a);
    
            _LICE_MakePixelClamp(dest,
               r + ((dest[LICE_PIXEL_R]-r)*sc)/256,
               g + ((dest[LICE_PIXEL_G]-g)*sc)/256,
               b + ((dest[LICE_PIXEL_B]-b)*sc)/256,
               a + ((dest[LICE_PIXEL_A]-a)*sc)/256);
          }
        }
      }
    };
    
    

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2025 Justin Frankel. | RSS