LUT Grading and Technicolor added.
Preset save/load added. Fixed a typo.
This commit is contained in:
parent
232ec85941
commit
0380e56f90
8 changed files with 321 additions and 9 deletions
20
shaders/glsl/mfx_lutgrading.fp
Normal file
20
shaders/glsl/mfx_lutgrading.fp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
LUT color grading from MariENB
|
||||
(C)2012-2021 Marisa Kirisame
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 coord = TexCoord;
|
||||
vec4 res = texture(InputTexture,coord);
|
||||
vec3 lc = clamp(res.rgb,0.,63./64.);
|
||||
vec2 lcoord = vec2((lc.r+lutindex)/16.,lc.g/64.)+vec2(1./2048,1./8192.);
|
||||
double minb = floor(lc.b*64.)/64.;
|
||||
double maxb = ceil(lc.b*64.)/64.;
|
||||
double theta = fract(lc.b*64.);
|
||||
vec3 luta = textureLod(LUTTexture,lcoord+vec2(0,minb),0.).rgb;
|
||||
vec3 lutb = textureLod(LUTTexture,lcoord+vec2(0,maxb),0.).rgb;
|
||||
vec3 lutm = mix(luta,lutb,vec3(theta)); // has to be vec3 for whatever reason
|
||||
res.rgb = mix(res.rgb,lutm,lutblend);
|
||||
FragColor = res;
|
||||
}
|
||||
16
shaders/glsl/mfx_technicolor.fp
Normal file
16
shaders/glsl/mfx_technicolor.fp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
"Technicolor" filter from MariENB
|
||||
(C)2012-2021 Marisa Kirisame
|
||||
*/
|
||||
void main()
|
||||
{
|
||||
vec2 coord = TexCoord;
|
||||
vec4 res = texture(InputTexture,coord);
|
||||
res.rgb = clamp(res.rgb,0.,1.);
|
||||
float red = 1.-(res.r-(res.g+res.b)*.5);
|
||||
float green = 1.-(res.g-(res.r+res.b)*.5);
|
||||
float blue = 1.-(res.b-(res.r+res.g)*.5);
|
||||
vec3 tint = vec3(green*blue,red*blue,red*green)*res.rgb;
|
||||
res.rgb = mix(res.rgb,res.rgb+.5*(tint-res.rgb),techblend);
|
||||
FragColor = res;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue