09-11-2022, 06:02 PM
|
#1 |
|
Human being with feelings
Join Date: Aug 2020
Location: Canada
Posts: 940
|
gfx_fillrect() seems to be confusing the roles of gfx_a and gfx_a2. Let suppose we have a track with an image item and we gfx_fillrect() a rectangle with a gradual envelope on gfx_a (0->1) and gfx_a2=1. If we gfx_blit() this track on top of another one using mode 0x10000, the part covered by gfx_fillrect() will do weird jumps in transparency with a partial mix of gfx_a2 transparency. In non-transprency mode, there is no problem (obviously). I made a project to illustrate the problem which includes gfx_blit() and gfx_fillrect() emulations made with gfx_evalrect() which do behave correctly.
https://stash.reaper.fm/45284/fillrect_erratic.zip ![]() p.s. I was using v6.66 on win10 but I have encountered this problem months ago before I understood properly how alpha works *** UPDATE 2022-10-24: I confirm, it has been fixed in v6.69 **** Last edited by papagirafe; 10-24-2022 at 05:13 PM. Reason: new Reaper v6.69 fix |
|
|
09-14-2022, 07:43 PM
|
#2 |
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,848
|
ah yes, there is a bug in the alpha handling of LICE_FillRect() which causes it to write the alpha value rather than the pixel's alpha value. Fixing, though this might be some time before it goes into a release because it could break appearances subtly. Thanks for the report!
Last edited by Justin; 09-14-2022 at 07:49 PM. |
|
|
09-15-2022, 03:54 AM
|
#3 | |
|
Human being with feelings
Join Date: Aug 2020
Location: Canada
Posts: 940
|
Quote:
Code:
//gfx_fillrect() emulation for proper transparency behavior gfx_set(r,g,b,a1,mode,dest,a2); gfx_evalrect(x,y,w,h,"r=r*(1-gfx_a)+gfx_a*gfx_r*255;g=g*(1-gfx_a)+gfx_a*gfx_g*255;b=b*(1-gfx_a)+gfx_a*gfx_b*255;a=gfx_a2*255"); Last edited by papagirafe; 09-15-2022 at 03:38 PM. Reason: add mitigation code |
|
|
|
![]() |
| Thread Tools | |
|
|