istereo2

annotate sdr/text.v.glsl @ 25:a9f2d30f7e8e

First hack at implementing banners on android. JNI interface to hide/show ads with the menu remains to be done.
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 05 Oct 2015 06:00:16 +0300
parents
children
rev   line source
nuclear@2 1 attribute vec4 attr_vertex, attr_texcoord, attr_color;
nuclear@2 2
nuclear@2 3 uniform mat4 matrix_modelview, matrix_projection;
nuclear@2 4 uniform float idx;
nuclear@2 5
nuclear@2 6 varying vec4 color;
nuclear@2 7 varying vec3 vpos;
nuclear@2 8 varying vec2 tc;
nuclear@2 9
nuclear@2 10 void main()
nuclear@2 11 {
nuclear@2 12 mat4 mvp = matrix_projection * matrix_modelview;
nuclear@2 13 gl_Position = mvp * attr_vertex;
nuclear@2 14
nuclear@2 15 vpos = (matrix_modelview * attr_vertex).xyz;
nuclear@2 16
nuclear@2 17 float sz = 1.0 / 17.0;
nuclear@2 18 tc = vec2(attr_texcoord.x, (attr_texcoord.y + idx) * sz);
nuclear@2 19
nuclear@2 20 color = attr_color;
nuclear@2 21 }