-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fill-extrusions tweaks for mapbox-gl-native (#4433)
* Use u_world rather than u_xdim and u_ydim to provide dimensions to extrusion texture shader * Change u_texture to u_image in extrusion texture shader for consistency with other usage * Rename renderbuffers * Fix renderbuffer internalformat, rework dimensions in extrusiontexture shaders
- Loading branch information
Lauren Budorick
authored
Mar 28, 2017
1 parent
b4f8487
commit 7c4b9a1
Showing
3 changed files
with
15 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
uniform mat4 u_matrix; | ||
uniform int u_xdim; | ||
uniform int u_ydim; | ||
uniform vec2 u_world; | ||
attribute vec2 a_pos; | ||
varying vec2 v_pos; | ||
|
||
void main() { | ||
gl_Position = u_matrix * vec4(a_pos, 0, 1); | ||
gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1); | ||
|
||
v_pos.x = a_pos.x / float(u_xdim); | ||
v_pos.y = 1.0 - a_pos.y / float(u_ydim); | ||
v_pos.x = a_pos.x; | ||
v_pos.y = 1.0 - a_pos.y; | ||
} |