• Home
  • Raw
  • Download

Lines Matching refs:fs

155     Formatter fs;  in generateFragmentShader()  local
157 fs << "#extension GL_OES_EGL_image_external : require"; in generateFragmentShader()
161 fs << "precision mediump float;"; in generateFragmentShader()
164 fs << "uniform samplerExternalOES sampler;" in generateFragmentShader()
167 fs << "uniform sampler2D sampler;" in generateFragmentShader()
170 fs << "uniform vec4 color;"; in generateFragmentShader()
173 fs << "uniform float alphaPlane;"; in generateFragmentShader()
176 fs << "uniform mat4 colorMatrix;"; in generateFragmentShader()
178 fs << "void main(void) {" << indent; in generateFragmentShader()
180 fs << "gl_FragColor = texture2D(sampler, outTexCoords);"; in generateFragmentShader()
182 fs << "gl_FragColor = color;"; in generateFragmentShader()
185 fs << "gl_FragColor.a = 1.0;"; in generateFragmentShader()
191 fs << "gl_FragColor *= alphaPlane;"; in generateFragmentShader()
193 fs << "gl_FragColor.a *= alphaPlane;"; in generateFragmentShader()
200 fs << "gl_FragColor.rgb = gl_FragColor.rgb/gl_FragColor.a;"; in generateFragmentShader()
202 fs << "vec4 transformed = colorMatrix * vec4(gl_FragColor.rgb, 1);"; in generateFragmentShader()
203 fs << "gl_FragColor.rgb = transformed.rgb/transformed.a;"; in generateFragmentShader()
206 fs << "gl_FragColor.rgb = gl_FragColor.rgb*gl_FragColor.a;"; in generateFragmentShader()
210 fs << dedent << "}"; in generateFragmentShader()
211 return fs.getString(); in generateFragmentShader()
219 String8 fs = generateFragmentShader(needs); in generateProgram() local
221 Program* program = new Program(needs, vs.string(), fs.string()); in generateProgram()