-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hey Mark, recently found this sepia shader to add more effects.. just the frag, use default.vert.glsl same as greyscale..
// https://www.shadertoy.com/view/3slfDl
varying vec4 vertColor;
uniform sampler2D texture0;
void main() {
vec4 col = texture2D(texture0, gl_TexCoord[0].st)*vertColor;
float rr = .393;
float rg = .769;
float rb = .189;
float ra = 0.0;
float gr = .349;
float gg = .686;
float gb = .168;
float ga = 0.0;
float br = .272;
float bg = .534;
float bb = .131;
float ba = 0.0;
float red = (rr * col.r) + (rb * col.b) + (rg * col.g) + (ra * col.a);
float green = (gr * col.r) + (gb * col.b) + (gg * col.g) + (ga * col.a);
float blue = (br * col.r) + (bb * col.b) + (bg * col.g) + (ba * col.a);
gl_FragColor = vec4(red,green,blue,col.a);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels