@mapcatch/util 2.0.4 → 2.0.5-b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +44 -0
  2. package/dist/catchUtil.min.esm.js +56 -102
  3. package/dist/catchUtil.min.js +2 -2
  4. package/package.json +26 -2
  5. package/src/constants/crs.js +42098 -42098
  6. package/src/constants/default_layers.js +42 -94
  7. package/src/gl-operations/constants.js +9 -9
  8. package/src/gl-operations/default_options.js +97 -97
  9. package/src/gl-operations/index.js +532 -532
  10. package/src/gl-operations/reglCommands/contours.js +27 -27
  11. package/src/gl-operations/reglCommands/default.js +45 -45
  12. package/src/gl-operations/reglCommands/hillshading.js +340 -340
  13. package/src/gl-operations/reglCommands/index.js +6 -6
  14. package/src/gl-operations/reglCommands/multiLayers.js +303 -303
  15. package/src/gl-operations/reglCommands/transitions.js +111 -111
  16. package/src/gl-operations/reglCommands/util.js +71 -71
  17. package/src/gl-operations/renderer.js +209 -209
  18. package/src/gl-operations/shaders/fragment/convertDem.js +25 -25
  19. package/src/gl-operations/shaders/fragment/convolutionSmooth.js +54 -54
  20. package/src/gl-operations/shaders/fragment/diffCalc.js +33 -33
  21. package/src/gl-operations/shaders/fragment/drawResult.js +46 -46
  22. package/src/gl-operations/shaders/fragment/hillshading/hsAdvAmbientShadows.js +78 -78
  23. package/src/gl-operations/shaders/fragment/hillshading/hsAdvDirect.js +59 -59
  24. package/src/gl-operations/shaders/fragment/hillshading/hsAdvFinalBaselayer.js +30 -30
  25. package/src/gl-operations/shaders/fragment/hillshading/hsAdvFinalColorscale.js +60 -60
  26. package/src/gl-operations/shaders/fragment/hillshading/hsAdvMergeAndScaleTiles.js +26 -26
  27. package/src/gl-operations/shaders/fragment/hillshading/hsAdvNormals.js +25 -25
  28. package/src/gl-operations/shaders/fragment/hillshading/hsAdvSmooth.js +53 -53
  29. package/src/gl-operations/shaders/fragment/hillshading/hsAdvSoftShadows.js +80 -80
  30. package/src/gl-operations/shaders/fragment/hillshading/hsPregen.js +54 -54
  31. package/src/gl-operations/shaders/fragment/interpolateColor.js +65 -65
  32. package/src/gl-operations/shaders/fragment/interpolateColorOnly.js +49 -49
  33. package/src/gl-operations/shaders/fragment/interpolateValue.js +136 -136
  34. package/src/gl-operations/shaders/fragment/multiAnalyze1Calc.js +35 -35
  35. package/src/gl-operations/shaders/fragment/multiAnalyze2Calc.js +45 -45
  36. package/src/gl-operations/shaders/fragment/multiAnalyze3Calc.js +53 -53
  37. package/src/gl-operations/shaders/fragment/multiAnalyze4Calc.js +61 -61
  38. package/src/gl-operations/shaders/fragment/multiAnalyze5Calc.js +69 -69
  39. package/src/gl-operations/shaders/fragment/multiAnalyze6Calc.js +77 -77
  40. package/src/gl-operations/shaders/fragment/single.js +93 -93
  41. package/src/gl-operations/shaders/transform.js +21 -21
  42. package/src/gl-operations/shaders/util/computeColor.glsl +85 -85
  43. package/src/gl-operations/shaders/util/getTexelValue.glsl +10 -10
  44. package/src/gl-operations/shaders/util/isCloseEnough.glsl +9 -9
  45. package/src/gl-operations/shaders/util/rgbaToFloat.glsl +17 -17
  46. package/src/gl-operations/shaders/vertex/double.js +16 -16
  47. package/src/gl-operations/shaders/vertex/multi3.js +19 -19
  48. package/src/gl-operations/shaders/vertex/multi4.js +22 -22
  49. package/src/gl-operations/shaders/vertex/multi5.js +25 -25
  50. package/src/gl-operations/shaders/vertex/multi6.js +28 -28
  51. package/src/gl-operations/shaders/vertex/single.js +13 -13
  52. package/src/gl-operations/shaders/vertex/singleNotTransformed.js +11 -11
  53. package/src/gl-operations/texture_manager.js +141 -141
  54. package/src/gl-operations/util.js +336 -336
  55. package/src/util.js +14 -6
  56. package/CHANGELOG.md +0 -72
@@ -1,85 +1,85 @@
1
- #pragma glslify: isCloseEnough = require(./isCloseEnough.glsl)
2
- #pragma glslify: getTexelValue = require(./getTexelValue.glsl)
3
-
4
- #ifndef DEFAULT_COLOR
5
- #define DEFAULT_COLOR vec4(0.0)
6
- #endif
7
-
8
- #ifndef SCALE_MAX_LENGTH
9
- #define SCALE_MAX_LENGTH 16
10
- #endif
11
-
12
- #ifndef SENTINEL_MAX_LENGTH
13
- #define SENTINEL_MAX_LENGTH 16
14
- #endif
15
-
16
- vec4 computeColor(
17
- float inputVal,
18
- sampler2D scaleColormap,
19
- sampler2D sentinelColormap,
20
- int scaleLength,
21
- int sentinelLength,
22
- bool littleEndian,
23
- vec4 aboveColor,
24
- vec4 belowColor
25
- ) {
26
-
27
- // vertical texture coordinate to find color and offset
28
- float colorRow = 0.25;
29
- float offsetRow = 0.75;
30
-
31
- // Compare the value against any sentinel values, if defined.
32
- if (sentinelLength > 0) {
33
- for (int i = 0; i < SENTINEL_MAX_LENGTH; ++i) {
34
- if (i == sentinelLength) {
35
- break;
36
- }
37
-
38
- float i_f = float(i);
39
- float sentinelLengthFloat = float(sentinelLength);
40
- // retrieve the offset from the colormap
41
- float sentinelOffset = getTexelValue(sentinelColormap, vec2((i_f + 0.5) / sentinelLengthFloat, offsetRow), littleEndian);
42
- if (isCloseEnough(inputVal, sentinelOffset)) {
43
- // retrieve the color from the colormap
44
- vec2 colormapCoord = vec2((i_f + 0.5) / sentinelLengthFloat, colorRow);
45
- return texture2D(sentinelColormap, colormapCoord);
46
- }
47
- }
48
- }
49
- // Do linear interpolation using the color scale, if defined.
50
- if (scaleLength > 0) {
51
- // If value below color scale range, clamp to lowest color stop.
52
- float scaleOffsetLowest = getTexelValue(scaleColormap, vec2(0.0, offsetRow), littleEndian);
53
- float scaleOffsetHighest = getTexelValue(scaleColormap, vec2(1.0, offsetRow), littleEndian);
54
- if (inputVal < scaleOffsetLowest) {
55
- return belowColor;
56
- } else if (inputVal > scaleOffsetHighest) {
57
- return aboveColor;
58
- } else {
59
- for (int i = 0; i < SCALE_MAX_LENGTH; ++i) {
60
- float i_f = float(i);
61
- float scaleLengthFloat = float(scaleLength);
62
-
63
- // If value above color scale range, clamp to highest color stop.
64
- if (i == scaleLength) {
65
- return texture2D(sentinelColormap, vec2((scaleLengthFloat - 0.5) / scaleLengthFloat, colorRow));
66
- }
67
-
68
- float scaleOffsetNext = getTexelValue(scaleColormap, vec2((i_f + 1.0 + 0.5) / scaleLengthFloat, offsetRow), littleEndian);
69
-
70
- if (inputVal <= scaleOffsetNext) {
71
- float scaleOffset = getTexelValue(scaleColormap, vec2((i_f + 0.5) / scaleLengthFloat, offsetRow), littleEndian);
72
- float percent = (inputVal - scaleOffset)
73
- / (scaleOffsetNext - scaleOffset);
74
- vec4 colorLow = texture2D(scaleColormap, vec2((i_f + 0.5) / scaleLengthFloat, colorRow));
75
- vec4 colorHigh = texture2D(scaleColormap, vec2((i_f + 1.0 + 0.5) / scaleLengthFloat, colorRow));
76
- return mix(colorLow, colorHigh, percent);
77
- }
78
- }
79
- }
80
- }
81
-
82
- return DEFAULT_COLOR;
83
- }
84
-
85
- #pragma glslify: export(computeColor)
1
+ #pragma glslify: isCloseEnough = require(./isCloseEnough.glsl)
2
+ #pragma glslify: getTexelValue = require(./getTexelValue.glsl)
3
+
4
+ #ifndef DEFAULT_COLOR
5
+ #define DEFAULT_COLOR vec4(0.0)
6
+ #endif
7
+
8
+ #ifndef SCALE_MAX_LENGTH
9
+ #define SCALE_MAX_LENGTH 16
10
+ #endif
11
+
12
+ #ifndef SENTINEL_MAX_LENGTH
13
+ #define SENTINEL_MAX_LENGTH 16
14
+ #endif
15
+
16
+ vec4 computeColor(
17
+ float inputVal,
18
+ sampler2D scaleColormap,
19
+ sampler2D sentinelColormap,
20
+ int scaleLength,
21
+ int sentinelLength,
22
+ bool littleEndian,
23
+ vec4 aboveColor,
24
+ vec4 belowColor
25
+ ) {
26
+
27
+ // vertical texture coordinate to find color and offset
28
+ float colorRow = 0.25;
29
+ float offsetRow = 0.75;
30
+
31
+ // Compare the value against any sentinel values, if defined.
32
+ if (sentinelLength > 0) {
33
+ for (int i = 0; i < SENTINEL_MAX_LENGTH; ++i) {
34
+ if (i == sentinelLength) {
35
+ break;
36
+ }
37
+
38
+ float i_f = float(i);
39
+ float sentinelLengthFloat = float(sentinelLength);
40
+ // retrieve the offset from the colormap
41
+ float sentinelOffset = getTexelValue(sentinelColormap, vec2((i_f + 0.5) / sentinelLengthFloat, offsetRow), littleEndian);
42
+ if (isCloseEnough(inputVal, sentinelOffset)) {
43
+ // retrieve the color from the colormap
44
+ vec2 colormapCoord = vec2((i_f + 0.5) / sentinelLengthFloat, colorRow);
45
+ return texture2D(sentinelColormap, colormapCoord);
46
+ }
47
+ }
48
+ }
49
+ // Do linear interpolation using the color scale, if defined.
50
+ if (scaleLength > 0) {
51
+ // If value below color scale range, clamp to lowest color stop.
52
+ float scaleOffsetLowest = getTexelValue(scaleColormap, vec2(0.0, offsetRow), littleEndian);
53
+ float scaleOffsetHighest = getTexelValue(scaleColormap, vec2(1.0, offsetRow), littleEndian);
54
+ if (inputVal < scaleOffsetLowest) {
55
+ return belowColor;
56
+ } else if (inputVal > scaleOffsetHighest) {
57
+ return aboveColor;
58
+ } else {
59
+ for (int i = 0; i < SCALE_MAX_LENGTH; ++i) {
60
+ float i_f = float(i);
61
+ float scaleLengthFloat = float(scaleLength);
62
+
63
+ // If value above color scale range, clamp to highest color stop.
64
+ if (i == scaleLength) {
65
+ return texture2D(sentinelColormap, vec2((scaleLengthFloat - 0.5) / scaleLengthFloat, colorRow));
66
+ }
67
+
68
+ float scaleOffsetNext = getTexelValue(scaleColormap, vec2((i_f + 1.0 + 0.5) / scaleLengthFloat, offsetRow), littleEndian);
69
+
70
+ if (inputVal <= scaleOffsetNext) {
71
+ float scaleOffset = getTexelValue(scaleColormap, vec2((i_f + 0.5) / scaleLengthFloat, offsetRow), littleEndian);
72
+ float percent = (inputVal - scaleOffset)
73
+ / (scaleOffsetNext - scaleOffset);
74
+ vec4 colorLow = texture2D(scaleColormap, vec2((i_f + 0.5) / scaleLengthFloat, colorRow));
75
+ vec4 colorHigh = texture2D(scaleColormap, vec2((i_f + 1.0 + 0.5) / scaleLengthFloat, colorRow));
76
+ return mix(colorLow, colorHigh, percent);
77
+ }
78
+ }
79
+ }
80
+ }
81
+
82
+ return DEFAULT_COLOR;
83
+ }
84
+
85
+ #pragma glslify: export(computeColor)
@@ -1,10 +1,10 @@
1
- // #pragma glslify: rgbaToFloat = require(glsl-rgba-to-float)
2
- #pragma glslify: rgbaToFloat = require(./rgbaToFloat.glsl)
3
-
4
- float getTexelValue(sampler2D texture, vec2 pos, bool littleEndian) {
5
- vec4 texelRgba = texture2D(texture, pos);
6
- float texelFloat = rgbaToFloat(texelRgba, littleEndian);
7
- return texelFloat;
8
- }
9
-
10
- #pragma glslify: export(getTexelValue)
1
+ // #pragma glslify: rgbaToFloat = require(glsl-rgba-to-float)
2
+ #pragma glslify: rgbaToFloat = require(./rgbaToFloat.glsl)
3
+
4
+ float getTexelValue(sampler2D texture, vec2 pos, bool littleEndian) {
5
+ vec4 texelRgba = texture2D(texture, pos);
6
+ float texelFloat = rgbaToFloat(texelRgba, littleEndian);
7
+ return texelFloat;
8
+ }
9
+
10
+ #pragma glslify: export(getTexelValue)
@@ -1,9 +1,9 @@
1
- #ifndef RELATIVE_TOLERANCE
2
- #define RELATIVE_TOLERANCE 0.0001
3
- #endif
4
-
5
- bool isCloseEnough(float a, float b) {
6
- return abs(a - b) <= max(abs(a), abs(b)) * RELATIVE_TOLERANCE;
7
- }
8
-
9
- #pragma glslify: export(isCloseEnough)
1
+ #ifndef RELATIVE_TOLERANCE
2
+ #define RELATIVE_TOLERANCE 0.0001
3
+ #endif
4
+
5
+ bool isCloseEnough(float a, float b) {
6
+ return abs(a - b) <= max(abs(a), abs(b)) * RELATIVE_TOLERANCE;
7
+ }
8
+
9
+ #pragma glslify: export(isCloseEnough)
@@ -1,18 +1,18 @@
1
- // From https://stackoverflow.com/questions/63827836/is-it-possible-to-do-a-rgba-to-float-and-back-round-trip-and-read-the-pixels-in
2
-
3
- // note: the 0.1s here and there are voodoo related to precision
4
- float rgbaToFloat(vec4 v, bool littleEndian) {
5
- if (!littleEndian) {
6
- v = v.abgr;
7
- }
8
- vec4 bits = v * 255.0;
9
- float sign = mix(-1.0, 1.0, step(bits[3], 128.0));
10
- float expo = floor(mod(bits[3] + 0.1, 128.0)) * 2.0 +
11
- floor((bits[2] + 0.1) / 128.0) - 127.0;
12
- float sig = bits[0] +
13
- bits[1] * 256.0 +
14
- floor(mod(bits[2] + 0.1, 128.0)) * 256.0 * 256.0;
15
- return sign * (1.0 + sig / 8388607.0) * pow(2.0, expo);
16
- }
17
-
1
+ // From https://stackoverflow.com/questions/63827836/is-it-possible-to-do-a-rgba-to-float-and-back-round-trip-and-read-the-pixels-in
2
+
3
+ // note: the 0.1s here and there are voodoo related to precision
4
+ float rgbaToFloat(vec4 v, bool littleEndian) {
5
+ if (!littleEndian) {
6
+ v = v.abgr;
7
+ }
8
+ vec4 bits = v * 255.0;
9
+ float sign = mix(-1.0, 1.0, step(bits[3], 128.0));
10
+ float expo = floor(mod(bits[3] + 0.1, 128.0)) * 2.0 +
11
+ floor((bits[2] + 0.1) / 128.0) - 127.0;
12
+ float sig = bits[0] +
13
+ bits[1] * 256.0 +
14
+ floor(mod(bits[2] + 0.1, 128.0)) * 256.0 * 256.0;
15
+ return sign * (1.0 + sig / 8388607.0) * pow(2.0, expo);
16
+ }
17
+
18
18
  #pragma glslify: export(rgbaToFloat)
@@ -1,17 +1,17 @@
1
- import glsl from 'glslify'
2
-
3
- export default glsl`uniform mat4 transformMatrix;
4
-
5
- attribute vec2 position;
6
- attribute vec2 texCoordA;
7
- attribute vec2 texCoordB;
8
-
9
- varying vec2 vTexCoordA;
10
- varying vec2 vTexCoordB;
11
-
12
- void main() {
13
- vTexCoordA = texCoordA;
14
- vTexCoordB = texCoordB;
15
- gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
16
- }
1
+ import glsl from 'glslify'
2
+
3
+ export default glsl`uniform mat4 transformMatrix;
4
+
5
+ attribute vec2 position;
6
+ attribute vec2 texCoordA;
7
+ attribute vec2 texCoordB;
8
+
9
+ varying vec2 vTexCoordA;
10
+ varying vec2 vTexCoordB;
11
+
12
+ void main() {
13
+ vTexCoordA = texCoordA;
14
+ vTexCoordB = texCoordB;
15
+ gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
16
+ }
17
17
  `
@@ -1,20 +1,20 @@
1
- import glsl from 'glslify'
2
-
3
- export default glsl`uniform mat4 transformMatrix;
4
-
5
- attribute vec2 position;
6
- attribute vec2 texCoordA;
7
- attribute vec2 texCoordB;
8
- attribute vec2 texCoordC;
9
-
10
- varying vec2 vTexCoordA;
11
- varying vec2 vTexCoordB;
12
- varying vec2 vTexCoordC;
13
-
14
- void main() {
15
- vTexCoordA = texCoordA;
16
- vTexCoordB = texCoordB;
17
- vTexCoordC = texCoordC;
18
- gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
19
- }
1
+ import glsl from 'glslify'
2
+
3
+ export default glsl`uniform mat4 transformMatrix;
4
+
5
+ attribute vec2 position;
6
+ attribute vec2 texCoordA;
7
+ attribute vec2 texCoordB;
8
+ attribute vec2 texCoordC;
9
+
10
+ varying vec2 vTexCoordA;
11
+ varying vec2 vTexCoordB;
12
+ varying vec2 vTexCoordC;
13
+
14
+ void main() {
15
+ vTexCoordA = texCoordA;
16
+ vTexCoordB = texCoordB;
17
+ vTexCoordC = texCoordC;
18
+ gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
19
+ }
20
20
  `
@@ -1,23 +1,23 @@
1
- import glsl from 'glslify'
2
-
3
- export default glsl`uniform mat4 transformMatrix;
4
-
5
- attribute vec2 position;
6
- attribute vec2 texCoordA;
7
- attribute vec2 texCoordB;
8
- attribute vec2 texCoordC;
9
- attribute vec2 texCoordD;
10
-
11
- varying vec2 vTexCoordA;
12
- varying vec2 vTexCoordB;
13
- varying vec2 vTexCoordC;
14
- varying vec2 vTexCoordD;
15
-
16
- void main() {
17
- vTexCoordA = texCoordA;
18
- vTexCoordB = texCoordB;
19
- vTexCoordC = texCoordC;
20
- vTexCoordD = texCoordD;
21
- gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
22
- }
1
+ import glsl from 'glslify'
2
+
3
+ export default glsl`uniform mat4 transformMatrix;
4
+
5
+ attribute vec2 position;
6
+ attribute vec2 texCoordA;
7
+ attribute vec2 texCoordB;
8
+ attribute vec2 texCoordC;
9
+ attribute vec2 texCoordD;
10
+
11
+ varying vec2 vTexCoordA;
12
+ varying vec2 vTexCoordB;
13
+ varying vec2 vTexCoordC;
14
+ varying vec2 vTexCoordD;
15
+
16
+ void main() {
17
+ vTexCoordA = texCoordA;
18
+ vTexCoordB = texCoordB;
19
+ vTexCoordC = texCoordC;
20
+ vTexCoordD = texCoordD;
21
+ gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
22
+ }
23
23
  `
@@ -1,26 +1,26 @@
1
- import glsl from 'glslify'
2
-
3
- export default glsl`uniform mat4 transformMatrix;
4
-
5
- attribute vec2 position;
6
- attribute vec2 texCoordA;
7
- attribute vec2 texCoordB;
8
- attribute vec2 texCoordC;
9
- attribute vec2 texCoordD;
10
- attribute vec2 texCoordE;
11
-
12
- varying vec2 vTexCoordA;
13
- varying vec2 vTexCoordB;
14
- varying vec2 vTexCoordC;
15
- varying vec2 vTexCoordD;
16
- varying vec2 vTexCoordE;
17
-
18
- void main() {
19
- vTexCoordA = texCoordA;
20
- vTexCoordB = texCoordB;
21
- vTexCoordC = texCoordC;
22
- vTexCoordD = texCoordD;
23
- vTexCoordE = texCoordE;
24
- gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
25
- }
1
+ import glsl from 'glslify'
2
+
3
+ export default glsl`uniform mat4 transformMatrix;
4
+
5
+ attribute vec2 position;
6
+ attribute vec2 texCoordA;
7
+ attribute vec2 texCoordB;
8
+ attribute vec2 texCoordC;
9
+ attribute vec2 texCoordD;
10
+ attribute vec2 texCoordE;
11
+
12
+ varying vec2 vTexCoordA;
13
+ varying vec2 vTexCoordB;
14
+ varying vec2 vTexCoordC;
15
+ varying vec2 vTexCoordD;
16
+ varying vec2 vTexCoordE;
17
+
18
+ void main() {
19
+ vTexCoordA = texCoordA;
20
+ vTexCoordB = texCoordB;
21
+ vTexCoordC = texCoordC;
22
+ vTexCoordD = texCoordD;
23
+ vTexCoordE = texCoordE;
24
+ gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
25
+ }
26
26
  `
@@ -1,29 +1,29 @@
1
- import glsl from 'glslify'
2
-
3
- export default glsl`uniform mat4 transformMatrix;
4
-
5
- attribute vec2 position;
6
- attribute vec2 texCoordA;
7
- attribute vec2 texCoordB;
8
- attribute vec2 texCoordC;
9
- attribute vec2 texCoordD;
10
- attribute vec2 texCoordE;
11
- attribute vec2 texCoordF;
12
-
13
- varying vec2 vTexCoordA;
14
- varying vec2 vTexCoordB;
15
- varying vec2 vTexCoordC;
16
- varying vec2 vTexCoordD;
17
- varying vec2 vTexCoordE;
18
- varying vec2 vTexCoordF;
19
-
20
- void main() {
21
- vTexCoordA = texCoordA;
22
- vTexCoordB = texCoordB;
23
- vTexCoordC = texCoordC;
24
- vTexCoordD = texCoordD;
25
- vTexCoordE = texCoordE;
26
- vTexCoordE = texCoordF;
27
- gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
28
- }
1
+ import glsl from 'glslify'
2
+
3
+ export default glsl`uniform mat4 transformMatrix;
4
+
5
+ attribute vec2 position;
6
+ attribute vec2 texCoordA;
7
+ attribute vec2 texCoordB;
8
+ attribute vec2 texCoordC;
9
+ attribute vec2 texCoordD;
10
+ attribute vec2 texCoordE;
11
+ attribute vec2 texCoordF;
12
+
13
+ varying vec2 vTexCoordA;
14
+ varying vec2 vTexCoordB;
15
+ varying vec2 vTexCoordC;
16
+ varying vec2 vTexCoordD;
17
+ varying vec2 vTexCoordE;
18
+ varying vec2 vTexCoordF;
19
+
20
+ void main() {
21
+ vTexCoordA = texCoordA;
22
+ vTexCoordB = texCoordB;
23
+ vTexCoordC = texCoordC;
24
+ vTexCoordD = texCoordD;
25
+ vTexCoordE = texCoordE;
26
+ vTexCoordE = texCoordF;
27
+ gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
28
+ }
29
29
  `
@@ -1,13 +1,13 @@
1
- import glsl from 'glslify'
2
-
3
- export default glsl`uniform mat4 transformMatrix;
4
-
5
- attribute vec2 position;
6
- attribute vec2 texCoord;
7
-
8
- varying vec2 vTexCoord;
9
-
10
- void main() {
11
- vTexCoord = texCoord;
12
- gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
13
- }`
1
+ import glsl from 'glslify'
2
+
3
+ export default glsl`uniform mat4 transformMatrix;
4
+
5
+ attribute vec2 position;
6
+ attribute vec2 texCoord;
7
+
8
+ varying vec2 vTexCoord;
9
+
10
+ void main() {
11
+ vTexCoord = texCoord;
12
+ gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
13
+ }`
@@ -1,12 +1,12 @@
1
- import glsl from 'glslify'
2
-
3
- export default glsl`attribute vec2 position;
4
- attribute vec2 texCoord;
5
-
6
- varying vec2 vTexCoord;
7
-
8
- void main() {
9
- vTexCoord = texCoord;
10
- gl_Position = vec4(position, 0.0, 1.0);
11
- }
1
+ import glsl from 'glslify'
2
+
3
+ export default glsl`attribute vec2 position;
4
+ attribute vec2 texCoord;
5
+
6
+ varying vec2 vTexCoord;
7
+
8
+ void main() {
9
+ vTexCoord = texCoord;
10
+ gl_Position = vec4(position, 0.0, 1.0);
11
+ }
12
12
  `