Lines Matching refs:fs
155 Formatter fs;
157 fs << "#extension GL_OES_EGL_image_external : require";
161 fs << "precision mediump float;";
164 fs << "uniform samplerExternalOES sampler;"
167 fs << "uniform sampler2D sampler;"
170 fs << "uniform vec4 color;";
173 fs << "uniform float alphaPlane;";
176 fs << "uniform mat4 colorMatrix;";
178 fs << "void main(void) {" << indent;
180 fs << "gl_FragColor = texture2D(sampler, outTexCoords);";
182 fs << "gl_FragColor = color;";
185 fs << "gl_FragColor.a = 1.0;";
191 fs << "gl_FragColor *= alphaPlane;";
193 fs << "gl_FragColor.a *= alphaPlane;";
200 fs << "gl_FragColor.rgb = gl_FragColor.rgb/gl_FragColor.a;";
202 fs << "gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(2.2));";
203 fs << "vec4 transformed = colorMatrix * vec4(gl_FragColor.rgb, 1);";
204 fs << "gl_FragColor.rgb = transformed.rgb/transformed.a;";
205 fs << "gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(1.0 / 2.2));";
208 fs << "gl_FragColor.rgb = gl_FragColor.rgb*gl_FragColor.a;";
212 fs << dedent << "}";
213 return fs.getString();
221 String8 fs = generateFragmentShader(needs);
223 Program* program = new Program(needs, vs.string(), fs.string());