forked from organicmaps/organicmaps
modified shader, now support symbols by path
This commit is contained in:
parent
0aa3a629f4
commit
adadf9b0ca
2 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
uniform sampler2D u_textures[8];
|
||||
varying highp vec2 v_texCoords;
|
||||
varying lowp vec2 v_texCoords;
|
||||
varying highp float v_textureIndex;
|
||||
|
||||
const int Index0 = 0;
|
||||
|
@ -13,7 +13,7 @@ const int Index7 = 7;
|
|||
|
||||
void main(void)
|
||||
{
|
||||
highp vec4 color;
|
||||
lowp vec4 color;
|
||||
int textureIndex = int(v_textureIndex);
|
||||
if (textureIndex == Index0)
|
||||
color = texture2D(u_textures[Index0], v_texCoords);
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
attribute highp vec4 a_position;
|
||||
attribute highp vec2 a_position;
|
||||
attribute highp vec2 a_normal;
|
||||
attribute highp vec3 a_texCoords;
|
||||
attribute highp vec4 a_texCoords;
|
||||
|
||||
uniform highp mat4 modelView;
|
||||
uniform highp mat4 projection;
|
||||
|
||||
varying highp vec2 v_texCoords;
|
||||
varying float v_textureIndex;
|
||||
varying lowp vec2 v_texCoords;
|
||||
varying highp float v_textureIndex;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = (vec4(a_normal.xy, 0, 0) + (a_position * modelView)) * projection;
|
||||
gl_Position = (vec4(a_normal.xy, 0, 0) + (vec4(a_position, a_texCoords.w, 1) * modelView)) * projection;
|
||||
v_texCoords = a_texCoords.st;
|
||||
v_textureIndex = a_texCoords.z;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue