增亮

美颜代码

非 Y 不嫁゛ 提交于 2021-01-30 19:24:04
precision highp float; varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform vec2 singleStepOffset; uniform highp vec4 params; const highp vec3 W = vec3(0.299,0.587,0.114); const mat3 saturateMatrix = mat3( 1.1102,-0.0598,-0.061, -0.0774,1.0826,-0.1186, -0.0228,-0.0228,1.1772); float hardlight(float color) { if(color <= 0.5){ color = color * color * 2.0; }else{ color = 1.0 - ((1.0 - color)*(1.0 - color) * 2.0); } return color; } void main(){ vec2 blurCoordinates[24]; blurCoordinates[0] = textureCoordinate.xy + singleStepOffset * vec2(0.0, -10.0); blurCoordinates[1]