Feature: mirror shader

pull/221/head
xufuji456 2 years ago
parent 55f034aa5c
commit 65fcb8fba9
  1. 16
      CameraFilter/src/main/res/raw/default_fragment.glsl

@ -24,8 +24,20 @@ void main(){
// xy.y = xy.y * 2.0;
// } else {
// xy.y = (xy.y - 0.5) * 2.0;
// }
// white black
// const vec3 weight = vec3(0.3, 0.59, 0.11);
// float gray = dot(textureColor.rgb, weight);
// invert
// 1.0 - textureColor.rgb
// mirror
// if (xy.x <= 0.5) {
// xy.x += 0.25;
// } else {
// xy.x -= 0.25;
// xy.x = 1.0 - xy.x;
// }
vec3 centralColor = texture2D(inputImageTexture, xy).rgb;
gl_FragColor = vec4(centralColor.rgb,1.0);
vec3 textureColor = texture2D(inputImageTexture, xy).rgb;
gl_FragColor = vec4(textureColor.rgb,1.0);
}
Loading…
Cancel
Save