Home | History | Annotate | Download | only in RenderEngine

Lines Matching defs: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 << "vec4 transformed = colorMatrix * vec4(gl_FragColor.rgb, 1);";
203 fs << "gl_FragColor.rgb = transformed.rgb/transformed.a;";
206 fs << "gl_FragColor.rgb = gl_FragColor.rgb*gl_FragColor.a;";
210 fs << dedent << "}";
211 return fs.getString();
219 String8 fs = generateFragmentShader(needs);
221 Program* program = new Program(needs, vs.string(), fs.string());