2
0
mirror of synced 2025-02-24 15:28:28 +00:00
mobile/app/debug/glimage_es.go
David Crawshaw 022508a5a3 go.mobile/app/debug: basic GL-based debugging tools
LGTM=nigeltao
R=nigeltao, bryanturley, crawshaw
CC=adg, davidday, golang-codereviews
https://golang.org/cl/136550043
2014-09-22 11:18:43 -04:00

28 lines
513 B
Go

// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build android
package debug
const vertexShader = `
uniform mat4 mvp;
attribute vec4 pos;
attribute vec2 inUV;
varying vec2 UV;
void main() {
gl_Position = mvp * pos;
UV = inUV;
}
`
const fragmentShader = `
precision mediump float;
varying vec2 UV;
uniform sampler2D textureSample;
void main(){
gl_FragColor = texture2D(textureSample, UV);
}
`