Skip to content

Commit

Permalink
Merge pull request #123 from couleurs/sharpen-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
patriciogonzalezvivo authored Jan 19, 2024
2 parents f2e7a3e + f3e2bab commit f540617
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions filter/sharpen/fast.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ options:

#ifndef FNC_SHARPENFAST
#define FNC_SHARPENFAST
SHARPENFAST_TYPE sharpenFast(in SAMPLER_TYPE tex, in vec2 coords, in vec2 pixel, float strenght) {
SHARPENFAST_TYPE sharpenFast(in SAMPLER_TYPE tex, in vec2 coords, in vec2 pixel, float strength) {
SHARPENFAST_TYPE sum = SHARPENFAST_TYPE(0.);
for (int i = 0; i < SHARPENFAST_KERNELSIZE; i++) {
float f_size = float(i) + 1.;
f_size *= strenght;
f_size *= strength;
sum += -1. * SHARPENFAST_SAMPLER_FNC(tex, coords + vec2( -1., 0.) * pixel * f_size);
sum += -1. * SHARPENFAST_SAMPLER_FNC(tex, coords + vec2( 0., -1.) * pixel * f_size);
sum += 5. * SHARPENFAST_SAMPLER_FNC(tex, coords + vec2( 0., 0.) * pixel * f_size);
Expand Down
4 changes: 2 additions & 2 deletions filter/sharpen/fast.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ options:

#ifndef FNC_SHARPENFAST
#define FNC_SHARPENFAST
SHARPENFAST_TYPE sharpenFast(in SAMPLER_TYPE tex, in float2 coords, in float2 pixel, float strenght) {
SHARPENFAST_TYPE sharpenFast(in SAMPLER_TYPE tex, in float2 coords, in float2 pixel, float strength) {
SHARPENFAST_TYPE sum = float4(0.0,0.0,0.0,0.0);
for (int i = 0; i < SHARPENFAST_KERNELSIZE; i++) {
float f_size = float(i) + 1.;
f_size *= strenght;
f_size *= strength;
sum += -1. * SHARPENFAST_SAMPLER_FNC(tex, coords + float2( -1., 0.) * pixel * f_size);
sum += -1. * SHARPENFAST_SAMPLER_FNC(tex, coords + float2( 0., -1.) * pixel * f_size);
sum += 5. * SHARPENFAST_SAMPLER_FNC(tex, coords + float2( 0., 0.) * pixel * f_size);
Expand Down

0 comments on commit f540617

Please sign in to comment.