OSDN Git Service

[Qt][DEBUGGER] Temporally revert changes around debugger, will use src/debugger.cpp .
[csp-qt/common_source_project-fm7.git] / source / src / qt / common / fragment_shader.glsl
1 #ifdef GL_ES
2  precision mediump float;
3 #endif 
4
5 varying vec2 v_texcoord;
6 uniform vec4 color;
7 uniform int tex_width;
8 uniform int tex_height;
9 uniform sampler2D a_texture;
10 //attribute tex_size = vec2(tex_width, tex_height);
11
12 // This is from sample of Qt5 , see http://doc.qt.io/qt-5/qtopengl-cube-example.html .
13 void main()
14 {
15     // Set fragment color from texture
16     vec2 tex_pos = v_texcoord;
17     vec4 pixel_t = texture2D(a_texture, tex_pos);
18     vec4 pixel_r;
19     
20     pixel_r = pixel_t * color;
21     gl_FragColor = pixel_r;
22 }