Added Luma Sharpen. Rearranged filter chain. Set nicer defaults.
This commit is contained in:
parent
8cc1fc0169
commit
753a806b2e
6 changed files with 88 additions and 36 deletions
18
shaders/glsl/mfx_lumasharp.fp
Normal file
18
shaders/glsl/mfx_lumasharp.fp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#define luminance(x) dot(x,vec3(0.2126,0.7152,0.0722))
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 coord = TexCoord;
|
||||
vec4 res = texture(InputTexture,coord);
|
||||
vec2 bof = (1.0/textureSize(InputTexture,0))*sharpradius;
|
||||
vec4 crawling = texture(InputTexture,coord+vec2(0,-1)*bof);
|
||||
crawling += texture(InputTexture,coord+vec2(-1,0)*bof);
|
||||
crawling += texture(InputTexture,coord+vec2(1,0)*bof);
|
||||
crawling += texture(InputTexture,coord+vec2(0,1)*bof);
|
||||
crawling *= 0.25;
|
||||
vec4 inmyskin = res-crawling;
|
||||
float thesewounds = luminance(inmyskin.rgb);
|
||||
thesewounds = clamp(thesewounds,-sharpclamp*0.01,sharpclamp*0.01);
|
||||
vec4 theywillnotheal = res+thesewounds*sharpblend;
|
||||
FragColor = theywillnotheal;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue