added main menu added debug display many debug widgets for plotting live data worked on android live sensors added offline-data sensor feeding some dummy data sensors worked on the map display added ui debug for grid-points, particles and weights added a cool dude to display the estimation added real filtering based on the Indoor components c++11 fixes for android compilation online and offline filtering support new resampling technique for testing map loading via dialog
46 lines
985 B
GLSL
46 lines
985 B
GLSL
#ifdef GL_ES
|
|
// Set default precision to medium
|
|
precision mediump int;
|
|
precision mediump float;
|
|
#endif
|
|
|
|
uniform mat4 m_matrix;
|
|
uniform mat4 mv_matrix;
|
|
uniform mat4 mvp_matrix;
|
|
|
|
attribute vec3 a_position;
|
|
attribute vec3 a_normal;
|
|
attribute vec2 a_texcoord;
|
|
attribute vec3 a_tangent;
|
|
attribute vec3 a_color;
|
|
|
|
varying vec3 v_WorldPos;
|
|
varying vec3 v_CamPos;
|
|
|
|
varying vec3 v_normal;
|
|
varying vec2 v_texcoord;
|
|
varying mat3 normalMat;
|
|
|
|
varying vec3 v_color;
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
// interpolation:
|
|
v_WorldPos = vec3(m_matrix * vec4(a_position, 1.0));
|
|
v_CamPos = vec3(mv_matrix * vec4(a_position, 1.0));
|
|
v_normal = a_normal;//normalize(vec3(mv_matrix * vec4(a_normal, 0.0)));
|
|
v_texcoord = a_texcoord;
|
|
v_color = a_color;
|
|
|
|
|
|
// http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-13-normal-mapping/
|
|
vec3 bitangent = cross(a_normal, a_tangent);
|
|
normalMat = mat3(a_tangent, bitangent, a_normal);
|
|
|
|
// 2D position for the vertex
|
|
gl_Position = mvp_matrix * vec4(a_position, 1.0);
|
|
|
|
}
|