Fixed alpha changes between slices for flamesong
make flamesong alpha heavier
This commit is contained in:
parent
7cc3ccd03e
commit
9c3e284c57
@ -366,8 +366,12 @@ begin
|
|||||||
Progress(1);
|
Progress(1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// global variable for reuse in follong slices
|
||||||
|
var
|
||||||
|
MaxA: int64;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// michael baranov transparancy code forrm flamesong used
|
// michael baranov transparancy code from flamesong
|
||||||
procedure TImageMaker.CreateImage_MB(YOffset: integer);
|
procedure TImageMaker.CreateImage_MB(YOffset: integer);
|
||||||
var
|
var
|
||||||
gamma: double;
|
gamma: double;
|
||||||
@ -390,7 +394,6 @@ var
|
|||||||
gutter_width: integer;
|
gutter_width: integer;
|
||||||
k1, k2: double;
|
k1, k2: double;
|
||||||
area: double;
|
area: double;
|
||||||
MaxA: int64;
|
|
||||||
ACount: double;
|
ACount: double;
|
||||||
RCount: double;
|
RCount: double;
|
||||||
GCount: double;
|
GCount: double;
|
||||||
@ -404,7 +407,7 @@ begin
|
|||||||
if fcp.gamma = 0 then
|
if fcp.gamma = 0 then
|
||||||
gamma := fcp.gamma
|
gamma := fcp.gamma
|
||||||
else
|
else
|
||||||
gamma := 1 / fcp.gamma;
|
gamma := 1 / (2* fcp.gamma);
|
||||||
vib := round(fcp.vibrancy * 256.0);
|
vib := round(fcp.vibrancy * 256.0);
|
||||||
notvib := 256 - vib;
|
notvib := 256 - vib;
|
||||||
|
|
||||||
@ -427,15 +430,19 @@ begin
|
|||||||
lsa[i] := (k1 * log10(1 + fcp.White_level * i * k2)) / (fcp.White_level * i);
|
lsa[i] := (k1 * log10(1 + fcp.White_level * i * k2)) / (fcp.White_level * i);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
MaxA := 0;
|
// only do this for the first slice
|
||||||
bucketpos := 0;
|
// TODO: should be nicer always using a image wide value
|
||||||
for i := 0 to fcp.Height - 1 do begin
|
if YOffset = 0 then begin
|
||||||
for j := 0 to fcp.Width - 1 do begin
|
MaxA := 0;
|
||||||
MaxA := Max(MaxA, FBuckets[bucketpos].Count);
|
bucketpos := 0;
|
||||||
Inc(bucketpos, FOversample);
|
for i := 0 to fcp.Height - 1 do begin
|
||||||
|
for j := 0 to fcp.Width - 1 do begin
|
||||||
|
MaxA := Max(MaxA, FBuckets[bucketpos].Count);
|
||||||
|
Inc(bucketpos, FOversample);
|
||||||
|
end;
|
||||||
|
Inc(bucketpos, gutter_width);
|
||||||
|
Inc(bucketpos, (FOversample - 1) * FBucketWidth);
|
||||||
end;
|
end;
|
||||||
Inc(bucketpos, gutter_width);
|
|
||||||
Inc(bucketpos, (FOversample - 1) * FBucketWidth);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
offsetLow := 0;
|
offsetLow := 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user