// Path: videffects/src/main/java/com/sherazkhilji/videffects/Constants.java
// public final class Constants {
// 
//     public static final int FLOAT_SIZE_BYTES = 4;
// 
//     public static final String DEFAULT_VERTEX_SHADER = "uniform mat4 uMVPMatrix;\n"
//             + "uniform mat4 uSTMatrix;\n"
//             + "attribute vec4 aPosition;\n"
//             + "attribute vec4 aTextureCoord;\n"
//             + "varying vec2 vTextureCoord;\n"
//             + "void main() {\n"
//             + "  gl_Position = uMVPMatrix * aPosition;\n"
//             + "  vTextureCoord = (uSTMatrix * aTextureCoord).xy;\n"
//             + "}\n";
// }
// 
// Path: videffects/src/main/java/com/sherazkhilji/videffects/interfaces/Filter.java
// public interface Filter {
// 
// 	public String getVertexShader();
// 
// 	public String getFragmentShader();
// 
// 	public void setIntensity(float intensity);
// }


import com.sherazkhilji.videffects.Constants;
import com.sherazkhilji.videffects.interfaces.Filter;
import java.util.Locale;
            + "void main() {\n"
            + "vec4 kRGBToYPrime = vec4 (0.299, 0.587, 0.114, 0.0);\n"
            + "vec4 kRGBToI = vec4 (0.595716, -0.274453, -0.321263, 0.0);\n"
            + "vec4 kRGBToQ = vec4 (0.211456, -0.522591, 0.31135, 0.0);\n"
            + "vec4 kYIQToR = vec4 (1.0, 0.9563, 0.6210, 0.0);\n"
            + "vec4 kYIQToG = vec4 (1.0, -0.2721, -0.6474, 0.0);\n"
            + "vec4 kYIQToB = vec4 (1.0, -1.1070, 1.7046, 0.0);\n"
            + "vec4 color = texture2D(sTexture, vTextureCoord);\n"
            + "float YPrime = dot(color, kRGBToYPrime);\n"
            + "float I = dot(color, kRGBToI);\n"
            + "float Q = dot(color, kRGBToQ);\n"
            + "float chroma = sqrt (I * I + Q * Q);\n"
            + "Q = chroma * sin (intensity);\n"
            + "I = chroma * cos (intensity);\n"
            + "vec4 yIQ = vec4 (YPrime, I, Q, 0.0);\n"
            + "color.r = dot (yIQ, kYIQToR);\n"
            + "color.g = dot (yIQ, kYIQToG);\n"
            + "color.b = dot (yIQ, kYIQToB);\n"
            + "gl_FragColor = color;\n"
            + "}\n";

    private float intensity;

    @Override
    public void setIntensity(float intensity) {
        this.intensity = ((intensity - 45) / 45f + 0.5f) * -1;
    }

    @Override
    public String getVertexShader() {
// Path: videffects/src/main/java/com/sherazkhilji/videffects/Constants.java
// public final class Constants {
// 
//     public static final int FLOAT_SIZE_BYTES = 4;
// 
//     public static final String DEFAULT_VERTEX_SHADER = "uniform mat4 uMVPMatrix;\n"
//             + "uniform mat4 uSTMatrix;\n"
//             + "attribute vec4 aPosition;\n"
//             + "attribute vec4 aTextureCoord;\n"
//             + "varying vec2 vTextureCoord;\n"
//             + "void main() {\n"
//             + "  gl_Position = uMVPMatrix * aPosition;\n"
//             + "  vTextureCoord = (uSTMatrix * aTextureCoord).xy;\n"
//             + "}\n";
// }
// 
// Path: videffects/src/main/java/com/sherazkhilji/videffects/interfaces/Filter.java
// public interface Filter {
// 
// 	public String getVertexShader();
// 
// 	public String getFragmentShader();
// 
// 	public void setIntensity(float intensity);
// }


// Path: videffects/src/main/java/com/sherazkhilji/videffects/filter/HueFilter.java
import com.sherazkhilji.videffects.Constants;
import com.sherazkhilji.videffects.interfaces.Filter;
import java.util.Locale;

            + "void main() {\n"
            + "vec4 kRGBToYPrime = vec4 (0.299, 0.587, 0.114, 0.0);\n"
            + "vec4 kRGBToI = vec4 (0.595716, -0.274453, -0.321263, 0.0);\n"
            + "vec4 kRGBToQ = vec4 (0.211456, -0.522591, 0.31135, 0.0);\n"
            + "vec4 kYIQToR = vec4 (1.0, 0.9563, 0.6210, 0.0);\n"
            + "vec4 kYIQToG = vec4 (1.0, -0.2721, -0.6474, 0.0);\n"
            + "vec4 kYIQToB = vec4 (1.0, -1.1070, 1.7046, 0.0);\n"
            + "vec4 color = texture2D(sTexture, vTextureCoord);\n"
            + "float YPrime = dot(color, kRGBToYPrime);\n"
            + "float I = dot(color, kRGBToI);\n"
            + "float Q = dot(color, kRGBToQ);\n"
            + "float chroma = sqrt (I * I + Q * Q);\n"
            + "Q = chroma * sin (intensity);\n"
            + "I = chroma * cos (intensity);\n"
            + "vec4 yIQ = vec4 (YPrime, I, Q, 0.0);\n"
            + "color.r = dot (yIQ, kYIQToR);\n"
            + "color.g = dot (yIQ, kYIQToG);\n"
            + "color.b = dot (yIQ, kYIQToB);\n"
            + "gl_FragColor = color;\n"
            + "}\n";

    private float intensity;

    @Override
    public void setIntensity(float intensity) {
        this.intensity = ((intensity - 45) / 45f + 0.5f) * -1;
    }

    @Override
    public String getVertexShader() {
        return Constants.DEFAULT_VERTEX_SHADER;