thorvg/src/lib/gl_engine/tvgGlShaderSrc.cpp
Pranay Kumar Samanta 968286df57 gl_engine: implement gl infrastructure interfaces & test Gl shape sample
Change-Id: Ie142616bf02f9bd50ac8e88e31ed9f782dd6324b
Signed-off-by: Pranay Kumar Samanta <pranay.ks@samsung.com>
2020-06-18 18:36:10 +09:00

22 lines
977 B
C++
Executable file

#include "tvgGlShaderSrc.h"
const char* COLOR_VERT_SHADER =
"attribute highp vec4 aLocation; \n"
"uniform highp vec4 uColor; \n"
"varying highp vec4 vcolor; \n"
"varying highp float vOpacity; \n"
"void main() \n"
"{ \n"
" gl_Position = vec4(aLocation.xy, 0.0, 1.0); \n"
" vcolor = uColor; \n"
" vOpacity = aLocation.z; \n"
"} \n";
const char* COLOR_FRAG_SHADER =
"varying highp vec4 vcolor; \n"
"varying highp float vOpacity; \n"
"void main() \n"
"{ \n"
" gl_FragColor = vec4(vcolor.xyz, vcolor.w*vOpacity); \n"
"} \n";