Drawable Renderer (#1570), rework attributes for fill drawables
This commit is contained in:
committed by
Bart Louwers
parent
cec22b8572
commit
fffbfcfbb5
@@ -1,10 +1,12 @@
|
||||
layout (std140) uniform BackgroundLayerUBO {
|
||||
vec4 u_color;
|
||||
float u_opacity;
|
||||
};
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
|
||||
void main() {
|
||||
fragColor = u_color * u_opacity;
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
|
||||
fragColor = color * opacity;
|
||||
|
||||
#ifdef OVERDRAW_INSPECTOR
|
||||
fragColor = vec4(1.0);
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
layout (location = 0) in vec2 a_pos;
|
||||
|
||||
layout (std140) uniform DrawableUBO {
|
||||
mat4 u_matrix;
|
||||
};
|
||||
|
||||
#pragma mapbox: define highp vec4 color
|
||||
#pragma mapbox: define lowp float opacity
|
||||
|
||||
void main() {
|
||||
#pragma mapbox: initialize highp vec4 color
|
||||
#pragma mapbox: initialize lowp float opacity
|
||||
|
||||
gl_Position = u_matrix * vec4(a_pos, 0, 1);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"header": "drawable_fill",
|
||||
"glsl_vert": "drawable.fill.vertex.glsl",
|
||||
"glsl_frag": "drawable.fill.fragment.glsl",
|
||||
"uses_ubos": true
|
||||
"uses_ubos": false
|
||||
},
|
||||
|
||||
{
|
||||
@@ -176,4 +176,4 @@
|
||||
"glsl_vert": "symbol_text_and_icon.vertex.glsl",
|
||||
"glsl_frag": "symbol_text_and_icon.fragment.glsl"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user