Open blitzcoder opened 1 year ago
Hey Mark, recently found this sepia shader to add more effects.. just the frag, use default.vert.glsl same as greyscale..
default.vert.glsl
// 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); }
Oh cool! I was using the greyscale and putting a yellowish tint on with max2d all this time.
cheers @Kippykip
Hey Mark, recently found this sepia shader to add more effects.. just the frag, use
default.vert.glsl
same as greyscale..