Antialiasing fix

- Changed the vec3 color of the fragment shaders by vec4 color with alpha chanel value of 1.

(cherry picked from commit 81477ddd81)
This commit is contained in:
Maxime Gimeno 2015-05-04 15:43:22 +02:00 committed by Laurent Rineau
parent 1cf09a4317
commit 0e58dfbd71
15 changed files with 32 additions and 32 deletions

View File

@ -157,11 +157,11 @@ private:
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};
@ -377,11 +377,11 @@ private:
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -675,11 +675,11 @@ private:
"precision mediump float; \n"
"in vec3 fColors; \n"
"out vec3 color; \n"
"out vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4 (fColors, 1.0); \n"
"} \n"
};

View File

@ -170,11 +170,11 @@ private:
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = (fColors, 1.0); \n"
"} \n"
};

View File

@ -58,11 +58,11 @@ void Scene_combinatorial_map_item::compile_shaders(void)
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -461,11 +461,11 @@ void Scene_edit_polyhedron_item::compile_shaders(void)
"precision mediump float; \n"
"in vec3 fColors; \n"
"out vec3 color; \n"
"out vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -194,11 +194,11 @@ void Scene_implicit_function_item::compile_shaders(void)
"#version 300 es \n"
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};
vertex_shader = glCreateShader(GL_VERTEX_SHADER);

View File

@ -292,11 +292,11 @@ void Scene_nef_polyhedron_item::compile_shaders(void)
"precision mediump float; \n"
"in vec3 fColors; \n"
"out vec3 color; \n"
"out vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -63,11 +63,11 @@ void Scene_plane_item::compile_shaders(void)
"#version 300 es \n"
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -325,11 +325,11 @@ void Scene_points_with_normal_item::compile_shaders(void)
"precision mediump float; \n"
"in vec3 fColors; \n"
"out vec3 color; \n"
"out vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};
GLuint vertex_shader = glCreateShader(GL_VERTEX_SHADER);

View File

@ -195,12 +195,12 @@ Scene_polygon_soup_item::compile_shaders(void)
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
"/* Lighting gestion */ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -521,11 +521,11 @@ Scene_polyhedron_item::compile_shaders(void)
"precision mediump float; \n"
"in vec3 fColors; \n"
"out vec3 color; \n"
"out vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -134,11 +134,11 @@ void Scene_polyhedron_selection_item::compile_shaders()
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -78,11 +78,11 @@ void Scene_polyhedron_transform_item::compile_shaders()
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -409,11 +409,11 @@ Scene_polylines_item::compile_shaders()
" \n"
"in highp vec3 fColors; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = fColors; \n"
" color = vec4(fColors, 1.0); \n"
"} \n"
};

View File

@ -162,11 +162,11 @@ void Scene_textured_polyhedron_item::compile_shaders(void)
"in highp vec3 fColors; \n"
"in highp vec2 f_texCoord; \n"
"uniform sampler2D s_texture; \n"
"out highp vec3 color; \n"
"out highp vec4 color; \n"
" \n"
"void main(void) \n"
"{ \n"
" color = vec3(texture(s_texture, f_texCoord)) * fColors; \n"
" color = vec4(vec3(texture(s_texture, f_texCoord))*fColors, 1.0); \n"
"} \n"
};