OpenGL ES (2) 之 GLSL

顶点着色器和片段着色器 private static final String 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”; private static final String FRAGMENT_SHADER = “#extension GL_OES_EGL_image_external : […]