Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
update shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
Molly Lloyd committed Dec 12, 2018
1 parent f37a59d commit 92ec974
Show file tree
Hide file tree
Showing 12 changed files with 457 additions and 449 deletions.
2 changes: 1 addition & 1 deletion mapbox-gl-js
Submodule mapbox-gl-js updated 49 files
+1 −1 CHANGELOG.md
+6 −0 bench/benchmarks/expressions.js
+2 −1 debug/hillshade.html
+1 −1 debug/video.html
+59 −0 docs/pages/example/animate-camera-around-point.html
+10 −0 docs/pages/example/animate-camera-around-point.js
+1 −1 docs/pages/example/video-on-a-map.html
+4 −0 docs/pages/plugins.js
+2 −2 docs/pages/style-spec.js
+22 −4 src/data/bucket/symbol_bucket.js
+13 −20 src/data/dem_data.js
+6 −3 src/data/segment.js
+1 −1 src/geo/transform.js
+2 −1 src/render/draw_hillshade.js
+2 −2 src/render/draw_raster.js
+83 −18 src/render/draw_symbol.js
+3 −3 src/render/painter.js
+4 −4 src/render/program/hillshade_program.js
+5 −1 src/shaders/hillshade_prepare.vertex.glsl
+4 −0 src/source/tile_id.js
+26 −5 src/style-spec/CHANGELOG.md
+1 −1 src/style-spec/feature_filter/convert.js
+1 −1 src/style-spec/package.json
+22 −2 src/style-spec/reference/v8.json
+2 −1 src/style-spec/types.js
+3 −1 src/style/style_layer/symbol_style_layer_properties.js
+14 −0 src/ui/events.js
+13 −1 src/ui/map.js
+30 −6 src/util/ajax.js
+1 −10 src/util/browser.js
+2 −1 src/util/mapbox.js
+61 −0 src/util/webp_supported.js
+ test/integration/render-tests/fill-opacity/opaque-fill-over-symbol-layer/expected.png
+78 −0 test/integration/render-tests/fill-opacity/opaque-fill-over-symbol-layer/style.json
+ test/integration/render-tests/symbol-sort-key/icon-expression/expected.png
+76 −0 test/integration/render-tests/symbol-sort-key/icon-expression/style.json
+ test/integration/render-tests/symbol-sort-key/text-expression/expected.png
+87 −0 test/integration/render-tests/symbol-sort-key/text-expression/style.json
+ test/integration/render-tests/symbol-sort-key/text-placement/expected.png
+71 −0 test/integration/render-tests/symbol-sort-key/text-placement/style.json
+2 −4 test/unit/data/dem_data.test.js
+6 −0 test/unit/source/tile_id.test.js
+39 −0 test/unit/style-spec/feature_filter.test.js
+24 −0 test/unit/ui/map.test.js
+25 −1 test/unit/util/ajax.test.js
+0 −5 test/unit/util/browser.test.js
+5 −5 test/unit/util/mapbox.test.js
+1 −1 vendor/dotcom-page-shell/page-shell-script.js
+24 −18 vendor/dotcom-page-shell/react-page-shell.js
3 changes: 2 additions & 1 deletion src/mbgl/renderer/layers/render_hillshade_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ void RenderHillshadeLayer::render(PaintParameters& parameters, RenderSource* src

if (!bucket.isPrepared() && parameters.pass == RenderPass::Pass3D) {
const uint16_t stride = bucket.getDEMData().stride;
OffscreenTexture view(parameters.context, { stride, stride });
const uint16_t tilesize = bucket.getDEMData().dim;
OffscreenTexture view(parameters.context, { tilesize, tilesize });
view.bind();

parameters.context.bindTexture(*bucket.dem, 0, gl::TextureFilter::Nearest, gl::TextureMipMap::No, gl::TextureWrap::Clamp, gl::TextureWrap::Clamp);
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/shaders/hillshade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace mbgl {
namespace shaders {

const char* hillshade::name = "hillshade";
const char* hillshade::vertexSource = source() + 29196;
const char* hillshade::fragmentSource = source() + 29367;
const char* hillshade::vertexSource = source() + 29307;
const char* hillshade::fragmentSource = source() + 29478;

// Uncompressed source of hillshade.vertex.glsl:
/*
Expand Down
8 changes: 6 additions & 2 deletions src/mbgl/shaders/hillshade_prepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ namespace shaders {

const char* hillshade_prepare::name = "hillshade_prepare";
const char* hillshade_prepare::vertexSource = source() + 27892;
const char* hillshade_prepare::fragmentSource = source() + 28074;
const char* hillshade_prepare::fragmentSource = source() + 28185;

// Uncompressed source of hillshade_prepare.vertex.glsl:
/*
uniform mat4 u_matrix;
uniform vec2 u_dimension;
attribute vec2 a_pos;
attribute vec2 a_texture_pos;
Expand All @@ -21,7 +22,10 @@ varying vec2 v_pos;
void main() {
gl_Position = u_matrix * vec4(a_pos, 0, 1);
v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;
highp vec2 epsilon = 1.0 / u_dimension;
float scale = (u_dimension.x - 2.0) / u_dimension.x;
v_pos = (a_texture_pos / 8192.0) * scale + epsilon;
}
*/
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/shaders/line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace mbgl {
namespace shaders {

const char* line::name = "line";
const char* line::vertexSource = source() + 30441;
const char* line::fragmentSource = source() + 33365;
const char* line::vertexSource = source() + 30552;
const char* line::fragmentSource = source() + 33476;

// Uncompressed source of line.vertex.glsl:
/*
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/shaders/line_gradient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace mbgl {
namespace shaders {

const char* line_gradient::name = "line_gradient";
const char* line_gradient::vertexSource = source() + 34191;
const char* line_gradient::fragmentSource = source() + 36910;
const char* line_gradient::vertexSource = source() + 34302;
const char* line_gradient::fragmentSource = source() + 37021;

// Uncompressed source of line_gradient.vertex.glsl:
/*
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/shaders/line_pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace mbgl {
namespace shaders {

const char* line_pattern::name = "line_pattern";
const char* line_pattern::vertexSource = source() + 37697;
const char* line_pattern::fragmentSource = source() + 41018;
const char* line_pattern::vertexSource = source() + 37808;
const char* line_pattern::fragmentSource = source() + 41129;

// Uncompressed source of line_pattern.vertex.glsl:
/*
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/shaders/line_sdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace mbgl {
namespace shaders {

const char* line_sdf::name = "line_sdf";
const char* line_sdf::vertexSource = source() + 43331;
const char* line_sdf::fragmentSource = source() + 46945;
const char* line_sdf::vertexSource = source() + 43442;
const char* line_sdf::fragmentSource = source() + 47056;

// Uncompressed source of line_sdf.vertex.glsl:
/*
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/shaders/raster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace mbgl {
namespace shaders {

const char* raster::name = "raster";
const char* raster::vertexSource = source() + 48448;
const char* raster::fragmentSource = source() + 48797;
const char* raster::vertexSource = source() + 48559;
const char* raster::fragmentSource = source() + 48908;

// Uncompressed source of raster.vertex.glsl:
/*
Expand Down
861 changes: 432 additions & 429 deletions src/mbgl/shaders/source.cpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/mbgl/shaders/symbol_icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace mbgl {
namespace shaders {

const char* symbol_icon::name = "symbol_icon";
const char* symbol_icon::vertexSource = source() + 49856;
const char* symbol_icon::fragmentSource = source() + 52510;
const char* symbol_icon::vertexSource = source() + 49967;
const char* symbol_icon::fragmentSource = source() + 52621;

// Uncompressed source of symbol_icon.vertex.glsl:
/*
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/shaders/symbol_sdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace mbgl {
namespace shaders {

const char* symbol_sdf::name = "symbol_sdf";
const char* symbol_sdf::vertexSource = source() + 52915;
const char* symbol_sdf::fragmentSource = source() + 56955;
const char* symbol_sdf::vertexSource = source() + 53026;
const char* symbol_sdf::fragmentSource = source() + 57066;

// Uncompressed source of symbol_sdf.vertex.glsl:
/*
Expand Down

0 comments on commit 92ec974

Please sign in to comment.