vertexShaderText top-level property
Implementation
String vertexShaderText = """
precision highp float;
attribute vec3 a_pos;
attribute vec2 a_tex;
uniform mat4 u_world;
uniform mat4 u_view;
uniform mat4 u_proj;
uniform mat4 u_text;
varying vec2 v_tex;
varying float v_dist;
void main() {
v_tex = (u_text *vec4(a_tex, 0.0, 1.0)).xy;
vec4 pos = u_proj * u_view * u_world * vec4(a_pos, 1.0);
v_dist = pos.z/10.0;
gl_Position = pos;
}
""";