added alpha blending for image and text, nodes position are clamped to be integer
This commit is contained in:
@@ -89,7 +89,8 @@ void App::init()
|
||||
"in vec2 uv;"
|
||||
"out vec4 frag;"
|
||||
"void main(){"
|
||||
" frag = vec4(texture(tex, uv).r * col.rgb, col.a);"
|
||||
" float a = texture(tex, uv).r;"
|
||||
" frag = vec4(col.rgb, a);"
|
||||
"}";
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -141,7 +142,10 @@ void App::init()
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glPointSize(5);
|
||||
glLineWidth(2);
|
||||
|
||||
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBlendEquation(GL_FUNC_ADD);
|
||||
|
||||
//int n;
|
||||
//glGetIntegerv(GL_NUM_EXTENSIONS, &n);
|
||||
//for (int i = 0; i < n; i++)
|
||||
|
||||
Reference in New Issue
Block a user