Skip to content

Commit

Permalink
shaders/sampling: rename dmax to dmin
Browse files Browse the repository at this point in the history
More appropriate name, since it represents the minimum radius this texel
can possibly have.
  • Loading branch information
haasn committed Jul 28, 2023
1 parent 40a325f commit c1912a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shaders/sampling.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,13 @@ static void polar_sample(pl_shader sh, pl_filter filter,
// worst case scenario
int yy = y > 0 ? y-1 : y;
int xx = x > 0 ? x-1 : x;
float dmax = sqrt(xx*xx + yy*yy);
float dmin = sqrt(xx*xx + yy*yy);
// Skip samples definitely outside the radius
if (dmax >= filter->radius_cutoff)
if (dmin >= filter->radius_cutoff)
return;

// Check for samples that might be skippable
bool maybe_skippable = dmax >= filter->radius_cutoff - M_SQRT2;
bool maybe_skippable = dmin >= filter->radius_cutoff - M_SQRT2;

#pragma GLSL \
offset = ivec2(${const int: x}, ${const int: y}); \
Expand Down

0 comments on commit c1912a9

Please sign in to comment.