Last active
August 29, 2015 13:57
-
-
Save memononen/9460921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const char* fillVertShader = | |
#ifdef NANOVG_GLES2 | |
"#version 100\n" | |
"precision highp float;\n" // CHANGED | |
#endif | |
"uniform vec2 viewSize;\n" | |
"attribute vec2 vertex;\n" | |
"attribute vec2 tcoord;\n" | |
"attribute vec4 color;\n" | |
"varying vec2 ftcoord;\n" | |
"varying vec4 fcolor;\n" | |
"varying vec2 fpos;\n" | |
"void main(void) {\n" | |
" ftcoord = tcoord;\n" | |
" fcolor = color;\n" | |
" fpos = vertex;\n" | |
" gl_Position = vec4(2.0*vertex.x/viewSize.x - 1.0, 1.0 - 2.0*vertex.y/viewSize.y, 0, 1);\n" | |
"}\n"; | |
static const char* fillFragShaderEdgeAA = | |
#ifdef NANOVG_GLES2 | |
"#version 100\n" | |
"precision mediump float;\n" | |
#endif | |
"uniform mat3 scissorMat;\n" | |
"uniform vec2 scissorExt;\n" | |
"uniform vec2 scissorScale;\n" | |
"uniform mat3 paintMat;\n" | |
"uniform vec2 extent;\n" | |
"uniform float radius;\n" | |
"uniform float feather;\n" | |
"uniform vec4 innerCol;\n" | |
"uniform vec4 outerCol;\n" | |
"uniform float strokeMult;\n" | |
"uniform sampler2D tex;\n" | |
"uniform int texType;\n" | |
"uniform int type;\n" | |
#ifdef NANOVG_GLES2 | |
"varying highp vec2 ftcoord;\n" // CHANGED | |
"varying highp vec4 fcolor;\n" // CHANGED | |
"varying highp vec2 fpos;\n" // CHANGED | |
#else | |
"varying vec2 ftcoord;\n" // CHANGED | |
"varying vec4 fcolor;\n" // CHANGED | |
"varying vec2 fpos;\n" // CHANGED | |
#endif | |
"\n" | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment