--- /srv/rebuilderd/tmp/rebuilderd5uLdqv/inputs/organicmaps_2026.03.12-05+ds-1_loong64.deb +++ /srv/rebuilderd/tmp/rebuilderd5uLdqv/out/organicmaps_2026.03.12-05+ds-1_loong64.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2026-04-02 06:35:55.000000 debian-binary │ -rw-r--r-- 0 0 0 1208 2026-04-02 06:35:55.000000 control.tar.xz │ --rw-r--r-- 0 0 0 4752268 2026-04-02 06:35:55.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 4752864 2026-04-02 06:35:55.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── ./usr/bin/OMaps │ │ │┄ File has been modified after NT_GNU_BUILD_ID has been applied. │ │ │ ├── readelf --wide --notes {} │ │ │ │ @@ -1,8 +1,8 @@ │ │ │ │ │ │ │ │ Displaying notes found in: .note.gnu.build-id │ │ │ │ Owner Data size Description │ │ │ │ - GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) Build ID: 0ba6c74f6da1c60f743640e73e3b5638dad69899 │ │ │ │ + GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) Build ID: cd7500e0de859a3476427dbf7afa84134ae654c4 │ │ │ │ │ │ │ │ Displaying notes found in: .note.ABI-tag │ │ │ │ Owner Data size Description │ │ │ │ GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) OS: Linux, ABI: 5.19.0 │ │ │ ├── strings --all --bytes=8 {} │ │ │ │ @@ -9281,15 +9281,15 @@ │ │ │ │ 2finished() │ │ │ │ https://meta.omaps.app/maps │ │ │ │ {"servers":["https://cdn-nl1.organicmaps.app/","https://cdn-uk1.organicmaps.app/","https://cdn.organicmaps.app/"]} │ │ │ │ PendingPosition │ │ │ │ NotFollow │ │ │ │ NotFollowNoPosition │ │ │ │ FollowAndRotate │ │ │ │ -2026.04.02-0-00000000-Linux │ │ │ │ +2026.09.08-0-00000000-Linux │ │ │ │ 162.55.100.169 │ │ │ │ CorruptedMwmFile ./libs/platform/mwm_version.cpp:32 │ │ │ │ IO exception │ │ │ │ Write exception │ │ │ │ Inconsistent file size │ │ │ │ Non-http response │ │ │ │ Invalid URL │ │ │ │ @@ -13364,32 +13364,28 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - #endif │ │ │ │ + in vec4 a_position; │ │ │ │ + in vec4 a_normal; │ │ │ │ + in vec2 a_colorTexCoord; │ │ │ │ + out vec2 v_colorTexCoord; │ │ │ │ + out vec3 v_radius; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ + uniform vec4 u_trafficParams; │ │ │ │ + uniform vec4 u_outlineColor; │ │ │ │ + uniform vec4 u_lightArrowColor; │ │ │ │ + uniform vec4 u_darkArrowColor; │ │ │ │ + uniform float u_outline; │ │ │ │ uniform float u_opacity; │ │ │ │ - uniform float u_zScale; │ │ │ │ - uniform float u_interpolation; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -13411,21 +13407,28 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position, 1) * u_modelView * u_projection; │ │ │ │ + vec2 normal = a_normal.xy; │ │ │ │ + vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ + int index = int(a_position.w); │ │ │ │ + float leftSize = u_lightArrowColor[index]; │ │ │ │ + float rightSize = u_darkArrowColor[index]; │ │ │ │ + if (dot(normal, normal) != 0.0) │ │ │ │ + vec2 norm = normal * 0.5 * (rightSize - leftSize); │ │ │ │ + transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ + u_modelView, length(norm)); │ │ │ │ + v_radius = vec3(a_normal.zw, 1.0) * 0.5 * (leftSize + rightSize); │ │ │ │ + vec2 finalPos = transformedAxisPos + v_radius.xy; │ │ │ │ + v_colorTexCoord = a_colorTexCoord; │ │ │ │ + vec4 pos = vec4(finalPos, a_position.z, 1.0) * u_projection; │ │ │ │ gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ - #else │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ - #endif │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -13433,28 +13436,26 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec3 a_normal; │ │ │ │ + in vec4 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ - out float v_intensity; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ - const vec4 kNormalizedLightDir = vec4(0.3162, 0.0, 0.9486, 0.0); │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -13476,30 +13477,17 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position, 1.0) * u_modelView; │ │ │ │ - vec4 normal = vec4(a_position + a_normal, 1.0) * u_modelView; │ │ │ │ - normal.xyw = (normal * u_projection).xyw; │ │ │ │ - normal.z = normal.z * u_zScale; │ │ │ │ - pos.xyw = (pos * u_projection).xyw; │ │ │ │ - pos.z = a_position.z * u_zScale; │ │ │ │ - vec4 normDir = normal - pos; │ │ │ │ - if (dot(normDir, normDir) != 0.0) │ │ │ │ - v_intensity = max(0.0, -dot(kNormalizedLightDir, normalize(normDir))); │ │ │ │ - else │ │ │ │ - v_intensity = 0.0; │ │ │ │ - gl_Position = u_pivotTransform * pos; │ │ │ │ - #ifdef VULKAN │ │ │ │ - gl_Position.y = -gl_Position.y; │ │ │ │ - gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ - #endif │ │ │ │ + vec4 pos = vec4(a_position.xyz, 1) * u_modelView; │ │ │ │ + vec4 shiftedPos = vec4(a_normal, 0, 0) + pos; │ │ │ │ + gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ v_colorTexCoords = a_colorTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ @@ -13508,32 +13496,28 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ + in vec4 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ + in vec2 a_maskTexCoords; │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ - #endif │ │ │ │ + out vec2 v_maskTexCoords; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -13555,143 +13539,19 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position, 1.0) * u_modelView; │ │ │ │ - pos.xyw = (pos * u_projection).xyw; │ │ │ │ - pos.z = a_position.z * u_zScale; │ │ │ │ - gl_Position = u_pivotTransform * pos; │ │ │ │ - #ifdef VULKAN │ │ │ │ - gl_Position.y = -gl_Position.y; │ │ │ │ - gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ - #endif │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ - #else │ │ │ │ + vec4 pos = vec4(a_position.xyz, 1) * u_modelView; │ │ │ │ + vec4 shiftedPos = vec4(a_normal, 0, 0) + pos; │ │ │ │ + gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ v_colorTexCoords = a_colorTexCoords; │ │ │ │ - #endif │ │ │ │ - #ifdef GL_ES │ │ │ │ - #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ - #define MAXPREC highp │ │ │ │ - #else │ │ │ │ - #define MAXPREC mediump │ │ │ │ - #endif │ │ │ │ - precision MAXPREC float; │ │ │ │ - #define LOW_P lowp │ │ │ │ - #define MEDIUM_P mediump │ │ │ │ - #define HIGH_P highp │ │ │ │ - #else │ │ │ │ - #define LOW_P │ │ │ │ - #define MEDIUM_P │ │ │ │ - #define HIGH_P │ │ │ │ - #endif │ │ │ │ - in vec3 a_pos; │ │ │ │ - in vec3 a_normal; │ │ │ │ - out vec3 v_normal; │ │ │ │ - uniform mat4 u_transform; │ │ │ │ - uniform mat4 u_normalTransform; │ │ │ │ - uniform vec4 u_color; │ │ │ │ - uniform vec2 u_texCoordFlipping; │ │ │ │ - const float kShapeCoordScalar = 1000.0; │ │ │ │ - vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ - vec4 transformedPivot = pivot; │ │ │ │ - float w = transformedPivot.w; │ │ │ │ - transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ - transformedPivot.z *= transformedPivot.w / w; │ │ │ │ - #ifdef VULKAN │ │ │ │ - transformedPivot.y = -transformedPivot.y; │ │ │ │ - transformedPivot.z = (transformedPivot.z + transformedPivot.w) / 2.0; │ │ │ │ - #endif │ │ │ │ - return transformedPivot; │ │ │ │ - vec4 applyBillboardPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ, vec2 offset) │ │ │ │ - float logicZ = pivot.z / pivot.w; │ │ │ │ - vec4 transformedPivot = pivotTransform * vec4(pivot.xy, pivotRealZ, pivot.w); │ │ │ │ - vec4 scale = pivotTransform * vec4(1.0, -1.0, 0.0, 1.0); │ │ │ │ - vec4 position = vec4(transformedPivot.xy / transformedPivot.w, logicZ, 1.0) + vec4(offset / scale.w * scale.x, 0.0, 0.0); │ │ │ │ - #ifdef VULKAN │ │ │ │ - position.y = -position.y; │ │ │ │ - position.z = (position.z + position.w) / 2.0; │ │ │ │ - #endif │ │ │ │ - return position; │ │ │ │ - vec2 calcLineTransformedAxisPos(vec2 originalAxisPos, vec2 shiftedPos, mat4 modelView, float halfWidth) │ │ │ │ - vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ - vec2 d = p - originalAxisPos; │ │ │ │ - if (dot(d, d) != 0.0) │ │ │ │ - return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ - else │ │ │ │ - return originalAxisPos; │ │ │ │ - void main() │ │ │ │ - vec4 position = u_transform * vec4(a_pos, 1.0); │ │ │ │ - v_normal = normalize((u_normalTransform * vec4(a_normal, 0.0)).xyz); │ │ │ │ - gl_Position = position; │ │ │ │ - #ifdef VULKAN │ │ │ │ - gl_Position.y = -gl_Position.y; │ │ │ │ - gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ - #endif │ │ │ │ - #ifdef GL_ES │ │ │ │ - #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ - #define MAXPREC highp │ │ │ │ - #else │ │ │ │ - #define MAXPREC mediump │ │ │ │ - #endif │ │ │ │ - precision MAXPREC float; │ │ │ │ - #define LOW_P lowp │ │ │ │ - #define MEDIUM_P mediump │ │ │ │ - #define HIGH_P highp │ │ │ │ - #else │ │ │ │ - #define LOW_P │ │ │ │ - #define MEDIUM_P │ │ │ │ - #define HIGH_P │ │ │ │ - #endif │ │ │ │ - in vec3 a_pos; │ │ │ │ - in vec2 a_texCoords; │ │ │ │ - out float v_intensity; │ │ │ │ - uniform mat4 u_transform; │ │ │ │ - uniform mat4 u_normalTransform; │ │ │ │ - uniform vec4 u_color; │ │ │ │ - uniform vec2 u_texCoordFlipping; │ │ │ │ - const float kShapeCoordScalar = 1000.0; │ │ │ │ - vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ - vec4 transformedPivot = pivot; │ │ │ │ - float w = transformedPivot.w; │ │ │ │ - transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ - transformedPivot.z *= transformedPivot.w / w; │ │ │ │ - #ifdef VULKAN │ │ │ │ - transformedPivot.y = -transformedPivot.y; │ │ │ │ - transformedPivot.z = (transformedPivot.z + transformedPivot.w) / 2.0; │ │ │ │ - #endif │ │ │ │ - return transformedPivot; │ │ │ │ - vec4 applyBillboardPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ, vec2 offset) │ │ │ │ - float logicZ = pivot.z / pivot.w; │ │ │ │ - vec4 transformedPivot = pivotTransform * vec4(pivot.xy, pivotRealZ, pivot.w); │ │ │ │ - vec4 scale = pivotTransform * vec4(1.0, -1.0, 0.0, 1.0); │ │ │ │ - vec4 position = vec4(transformedPivot.xy / transformedPivot.w, logicZ, 1.0) + vec4(offset / scale.w * scale.x, 0.0, 0.0); │ │ │ │ - #ifdef VULKAN │ │ │ │ - position.y = -position.y; │ │ │ │ - position.z = (position.z + position.w) / 2.0; │ │ │ │ - #endif │ │ │ │ - return position; │ │ │ │ - vec2 calcLineTransformedAxisPos(vec2 originalAxisPos, vec2 shiftedPos, mat4 modelView, float halfWidth) │ │ │ │ - vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ - vec2 d = p - originalAxisPos; │ │ │ │ - if (dot(d, d) != 0.0) │ │ │ │ - return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ - else │ │ │ │ - return originalAxisPos; │ │ │ │ - void main() │ │ │ │ - vec4 position = u_transform * vec4(a_pos, 1.0); │ │ │ │ - v_intensity = a_texCoords.x; │ │ │ │ - gl_Position = position; │ │ │ │ - #ifdef VULKAN │ │ │ │ - gl_Position.y = -gl_Position.y; │ │ │ │ - gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ - #endif │ │ │ │ + v_maskTexCoords = a_maskTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -13699,23 +13559,28 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_pos; │ │ │ │ - in vec3 a_normal; │ │ │ │ - in vec2 a_texCoords; │ │ │ │ - out vec3 v_normal; │ │ │ │ - out vec2 v_texCoords; │ │ │ │ - uniform mat4 u_transform; │ │ │ │ - uniform mat4 u_normalTransform; │ │ │ │ - uniform vec4 u_color; │ │ │ │ - uniform vec2 u_texCoordFlipping; │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec3 a_normalAndAnimateOrZ; │ │ │ │ + in vec4 a_texCoords; │ │ │ │ + in vec4 a_color; │ │ │ │ + out vec4 v_texCoords; │ │ │ │ + out vec4 v_maskColor; │ │ │ │ + uniform mat4 u_modelView; │ │ │ │ + uniform mat4 u_projection; │ │ │ │ + uniform mat4 u_pivotTransform; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ + uniform float u_opacity; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_interpolation; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -13737,22 +13602,25 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 position = u_transform * vec4(a_pos, 1.0); │ │ │ │ - v_normal = normalize((u_normalTransform * vec4(a_normal, 0.0)).xyz); │ │ │ │ - v_texCoords = mix(a_texCoords, 1.0 - a_texCoords, u_texCoordFlipping); │ │ │ │ - gl_Position = position; │ │ │ │ - #ifdef VULKAN │ │ │ │ - gl_Position.y = -gl_Position.y; │ │ │ │ - gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ - #endif │ │ │ │ + vec2 normal = a_normalAndAnimateOrZ.xy; │ │ │ │ + if (a_normalAndAnimateOrZ.z > 0.0) │ │ │ │ + normal = u_interpolation * normal; │ │ │ │ + vec4 p = vec4(a_position, 1.0) * u_modelView; │ │ │ │ + vec4 pos = vec4(normal, 0.0, 0.0) + p; │ │ │ │ + vec4 projectedPivot = p * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + float newZ = projectedPivot.y / projectedPivot.w * 0.5 + 0.5; │ │ │ │ + gl_Position.z = abs(a_normalAndAnimateOrZ.z) * newZ + (1.0 - abs(a_normalAndAnimateOrZ.z)) * gl_Position.z; │ │ │ │ + v_texCoords = a_texCoords; │ │ │ │ + v_maskColor = a_color; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -13760,34 +13628,26 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec3 a_normal; │ │ │ │ + in vec4 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ - #endif │ │ │ │ - out vec3 v_radius; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -13809,23 +13669,23 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 p = vec4(a_position, 1) * u_modelView; │ │ │ │ - vec4 pos = vec4(a_normal.xy, 0, 0) + p; │ │ │ │ - gl_Position = applyPivotTransform(pos * u_projection, u_pivotTransform, 0.0); │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ - #else │ │ │ │ + vec4 pos = vec4(a_position.xyz, 1) * u_modelView; │ │ │ │ + float normalLen = length(a_normal); │ │ │ │ + vec4 n = vec4(a_position.xy + a_normal * kShapeCoordScalar, 0.0, 0.0) * u_modelView; │ │ │ │ + vec4 norm = vec4(0.0, 0.0, 0.0, 0.0); │ │ │ │ + if (dot(n, n) != 0.0) │ │ │ │ + norm = normalize(n) * normalLen; │ │ │ │ + vec4 shiftedPos = norm + pos; │ │ │ │ + gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ v_colorTexCoords = a_colorTexCoords; │ │ │ │ - #endif │ │ │ │ - v_radius = a_normal; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -13833,27 +13693,25 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_normal; │ │ │ │ in vec3 a_position; │ │ │ │ + in vec4 a_normal; │ │ │ │ in vec4 a_color; │ │ │ │ - out vec3 v_radius; │ │ │ │ + out vec4 v_offsets; │ │ │ │ out vec4 v_color; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ - uniform float u_opacity; │ │ │ │ - uniform float u_zScale; │ │ │ │ - uniform float u_interpolation; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ + uniform vec4 u_params; │ │ │ │ + uniform float u_lineHalfWidth; │ │ │ │ + uniform float u_maxRadius; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -13875,19 +13733,22 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec3 radius = a_normal * a_position.z; │ │ │ │ vec4 pos = vec4(a_position.xy, 0, 1) * u_modelView; │ │ │ │ - vec4 shiftedPos = vec4(radius.xy, 0, 0) + pos; │ │ │ │ - gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ - v_radius = radius; │ │ │ │ + vec2 normal = vec2(a_normal.x * u_params.x - a_normal.y * u_params.y, │ │ │ │ + a_normal.x * u_params.y + a_normal.y * u_params.x); │ │ │ │ + vec2 shiftedPos = normal * u_params.z + pos.xy; │ │ │ │ + pos = vec4(shiftedPos, a_position.z, 1.0) * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + vec2 offsets = abs(a_normal.zw); │ │ │ │ + v_offsets = vec4(a_normal.zw, offsets - 1.0); │ │ │ │ v_color = a_color; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ @@ -13896,34 +13757,20 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec4 a_normal; │ │ │ │ - in vec4 a_colorTexCoords; │ │ │ │ - out vec4 v_normal; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - #endif │ │ │ │ - uniform mat4 u_modelView; │ │ │ │ + in vec2 a_position; │ │ │ │ + in vec2 a_texCoords; │ │ │ │ + in vec4 a_color; │ │ │ │ + out vec2 v_texCoords; │ │ │ │ + out vec4 v_color; │ │ │ │ uniform mat4 u_projection; │ │ │ │ - uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ - uniform float u_opacity; │ │ │ │ - uniform float u_zScale; │ │ │ │ - uniform float u_interpolation; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -13945,23 +13792,21 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 p = vec4(a_position, 1) * u_modelView; │ │ │ │ - vec4 pos = vec4(a_normal.xy + a_colorTexCoords.zw, 0, 0) + p; │ │ │ │ - gl_Position = applyPivotTransform(pos * u_projection, u_pivotTransform, 0.0); │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoords.xy); │ │ │ │ - #else │ │ │ │ - v_colorTexCoords = a_colorTexCoords.xy; │ │ │ │ + v_texCoords = a_texCoords; │ │ │ │ + v_color = a_color; │ │ │ │ + gl_Position = vec4(a_position, 0, 1) * u_projection; │ │ │ │ + #ifdef VULKAN │ │ │ │ + gl_Position.y = -gl_Position.y; │ │ │ │ + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ #endif │ │ │ │ - v_normal = a_normal; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -13969,34 +13814,33 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec4 a_normal; │ │ │ │ - in vec4 a_colorTexCoords; │ │ │ │ - out vec4 v_normal; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - #endif │ │ │ │ + in vec4 a_position; │ │ │ │ + in vec3 a_normal; │ │ │ │ + in vec4 a_color; │ │ │ │ + out vec4 v_radius; │ │ │ │ + out vec4 v_color; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ + uniform vec4 u_routeParams; │ │ │ │ + uniform vec4 u_color; │ │ │ │ + uniform vec4 u_maskColor; │ │ │ │ + uniform vec4 u_outlineColor; │ │ │ │ + uniform vec4 u_fakeColor; │ │ │ │ + uniform vec4 u_fakeOutlineColor; │ │ │ │ + uniform vec2 u_fakeBorders; │ │ │ │ + uniform vec2 u_pattern; │ │ │ │ + uniform vec2 u_angleCosSin; │ │ │ │ + uniform float u_arrowHalfWidth; │ │ │ │ uniform float u_opacity; │ │ │ │ - uniform float u_zScale; │ │ │ │ - uniform float u_interpolation; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14018,23 +13862,24 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pivot = vec4(a_position.xyz, 1.0) * u_modelView; │ │ │ │ - vec4 offset = vec4(a_normal.xy + a_colorTexCoords.zw, 0.0, 0.0) * u_projection; │ │ │ │ - gl_Position = applyBillboardPivotTransform(pivot * u_projection, u_pivotTransform, 0.0, offset.xy); │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoords.xy); │ │ │ │ - #else │ │ │ │ - v_colorTexCoords = a_colorTexCoords.xy; │ │ │ │ - #endif │ │ │ │ - v_normal = a_normal; │ │ │ │ + float r = u_routeParams.x * a_normal.z; │ │ │ │ + vec2 normal = vec2(a_normal.x * u_angleCosSin.x - a_normal.y * u_angleCosSin.y, │ │ │ │ + a_normal.x * u_angleCosSin.y + a_normal.y * u_angleCosSin.x); │ │ │ │ + vec4 radius = vec4(normal.xy * r, r, a_position.w); │ │ │ │ + vec4 pos = vec4(a_position.xy, 0, 1) * u_modelView; │ │ │ │ + vec2 shiftedPos = radius.xy + pos.xy; │ │ │ │ + pos = vec4(shiftedPos, a_position.z, 1.0) * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + v_radius = radius; │ │ │ │ + v_color = a_color; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14043,27 +13888,33 @@ │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec3 a_position; │ │ │ │ - in vec3 a_normal; │ │ │ │ - in vec2 a_colorTexCoord; │ │ │ │ - in vec4 a_maskTexCoord; │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ - out vec2 v_maskTexCoord; │ │ │ │ + in vec2 a_normal; │ │ │ │ + in vec3 a_length; │ │ │ │ + in vec4 a_color; │ │ │ │ + out vec3 v_length; │ │ │ │ + out vec4 v_color; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ + uniform vec4 u_routeParams; │ │ │ │ + uniform vec4 u_color; │ │ │ │ + uniform vec4 u_maskColor; │ │ │ │ + uniform vec4 u_outlineColor; │ │ │ │ + uniform vec4 u_fakeColor; │ │ │ │ + uniform vec4 u_fakeOutlineColor; │ │ │ │ + uniform vec2 u_fakeBorders; │ │ │ │ + uniform vec2 u_pattern; │ │ │ │ + uniform vec2 u_angleCosSin; │ │ │ │ + uniform float u_arrowHalfWidth; │ │ │ │ uniform float u_opacity; │ │ │ │ - uniform float u_zScale; │ │ │ │ - uniform float u_interpolation; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14085,23 +13936,24 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 normal = a_normal.xy; │ │ │ │ - float halfWidth = length(normal); │ │ │ │ vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - if (halfWidth != 0.0) │ │ │ │ - transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + normal, │ │ │ │ - u_modelView, halfWidth); │ │ │ │ - float uOffset = min(length(vec4(kShapeCoordScalar, 0, 0, 0) * u_modelView) * a_maskTexCoord.x, 1.0); │ │ │ │ - v_colorTexCoord = a_colorTexCoord; │ │ │ │ - v_maskTexCoord = vec2(a_maskTexCoord.y + uOffset * a_maskTexCoord.z, a_maskTexCoord.w); │ │ │ │ + vec2 len = vec2(a_length.x, a_length.z); │ │ │ │ + if (dot(a_normal, a_normal) != 0.0) │ │ │ │ + vec2 norm = a_normal * u_routeParams.x; │ │ │ │ + transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ + u_modelView, length(norm)); │ │ │ │ + if (u_routeParams.y != 0.0) │ │ │ │ + len = vec2(a_length.x + a_length.y * u_routeParams.y, a_length.z); │ │ │ │ + v_length = vec3(len, u_routeParams.z); │ │ │ │ + v_color = a_color; │ │ │ │ vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ @@ -14111,34 +13963,28 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ + in vec4 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ in vec2 a_maskTexCoords; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ - #endif │ │ │ │ out vec2 v_maskTexCoords; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14160,21 +14006,19 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position, 1) * u_modelView * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ - #else │ │ │ │ + vec4 pivot = vec4(a_position.xyz, 1.0) * u_modelView; │ │ │ │ + vec4 offset = vec4(a_normal, 0.0, 0.0) * u_projection; │ │ │ │ + gl_Position = applyBillboardPivotTransform(pivot * u_projection, u_pivotTransform, │ │ │ │ + a_position.w * u_zScale, offset.xy); │ │ │ │ v_colorTexCoords = a_colorTexCoords; │ │ │ │ - #endif │ │ │ │ v_maskTexCoords = a_maskTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ @@ -14183,90 +14027,33 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_position; │ │ │ │ - in vec2 a_texCoords; │ │ │ │ - in vec4 a_color; │ │ │ │ - out vec2 v_texCoords; │ │ │ │ - out vec4 v_color; │ │ │ │ - uniform mat4 u_projection; │ │ │ │ - const float kShapeCoordScalar = 1000.0; │ │ │ │ - vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ - vec4 transformedPivot = pivot; │ │ │ │ - float w = transformedPivot.w; │ │ │ │ - transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ - transformedPivot.z *= transformedPivot.w / w; │ │ │ │ - #ifdef VULKAN │ │ │ │ - transformedPivot.y = -transformedPivot.y; │ │ │ │ - transformedPivot.z = (transformedPivot.z + transformedPivot.w) / 2.0; │ │ │ │ - #endif │ │ │ │ - return transformedPivot; │ │ │ │ - vec4 applyBillboardPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ, vec2 offset) │ │ │ │ - float logicZ = pivot.z / pivot.w; │ │ │ │ - vec4 transformedPivot = pivotTransform * vec4(pivot.xy, pivotRealZ, pivot.w); │ │ │ │ - vec4 scale = pivotTransform * vec4(1.0, -1.0, 0.0, 1.0); │ │ │ │ - vec4 position = vec4(transformedPivot.xy / transformedPivot.w, logicZ, 1.0) + vec4(offset / scale.w * scale.x, 0.0, 0.0); │ │ │ │ - #ifdef VULKAN │ │ │ │ - position.y = -position.y; │ │ │ │ - position.z = (position.z + position.w) / 2.0; │ │ │ │ - #endif │ │ │ │ - return position; │ │ │ │ - vec2 calcLineTransformedAxisPos(vec2 originalAxisPos, vec2 shiftedPos, mat4 modelView, float halfWidth) │ │ │ │ - vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ - vec2 d = p - originalAxisPos; │ │ │ │ - if (dot(d, d) != 0.0) │ │ │ │ - return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ - else │ │ │ │ - return originalAxisPos; │ │ │ │ - void main() │ │ │ │ - v_texCoords = a_texCoords; │ │ │ │ - v_color = a_color; │ │ │ │ - gl_Position = vec4(a_position, 0, 1) * u_projection; │ │ │ │ - #ifdef VULKAN │ │ │ │ - gl_Position.y = -gl_Position.y; │ │ │ │ - gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ - #endif │ │ │ │ - #ifdef GL_ES │ │ │ │ - #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ - #define MAXPREC highp │ │ │ │ - #else │ │ │ │ - #define MAXPREC mediump │ │ │ │ - #endif │ │ │ │ - precision MAXPREC float; │ │ │ │ - #define LOW_P lowp │ │ │ │ - #define MEDIUM_P mediump │ │ │ │ - #define HIGH_P highp │ │ │ │ - #else │ │ │ │ - #define LOW_P │ │ │ │ - #define MEDIUM_P │ │ │ │ - #define HIGH_P │ │ │ │ - #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec3 a_normal; │ │ │ │ in vec2 a_colorTexCoord; │ │ │ │ + in vec2 a_maskTexCoord; │ │ │ │ + in vec4 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ out LOW_P vec4 v_color; │ │ │ │ #else │ │ │ │ out vec2 v_colorTexCoord; │ │ │ │ #endif │ │ │ │ + out vec2 v_maskTexCoord; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14288,27 +14075,24 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 normal = a_normal.xy; │ │ │ │ - float halfWidth = length(normal); │ │ │ │ - vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - if (halfWidth != 0.0) │ │ │ │ - transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + normal, │ │ │ │ - u_modelView, halfWidth); │ │ │ │ + vec4 pivot = vec4(a_position.xyz, 1.0) * u_modelView; │ │ │ │ + vec4 offset = vec4(a_normal, 0.0, 0.0) * u_projection; │ │ │ │ + gl_Position = applyBillboardPivotTransform(pivot * u_projection, u_pivotTransform, │ │ │ │ + a_position.w * u_zScale, offset.xy); │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ v_color = texture(u_colorTex, a_colorTexCoord); │ │ │ │ #else │ │ │ │ v_colorTexCoord = a_colorTexCoord; │ │ │ │ #endif │ │ │ │ - vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + v_maskTexCoord = a_maskTexCoord; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14319,17 +14103,15 @@ │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec4 a_position; │ │ │ │ in vec2 a_normal; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ - in vec2 a_maskTexCoords; │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ - out vec2 v_maskTexCoords; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ @@ -14359,19 +14141,19 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position.xyz, 1) * u_modelView; │ │ │ │ - vec4 shiftedPos = vec4(a_normal, 0, 0) + pos; │ │ │ │ - gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + vec4 pivot = vec4(a_position.xyz, 1.0) * u_modelView; │ │ │ │ + vec4 offset = vec4(a_normal, 0.0, 0.0) * u_projection; │ │ │ │ + gl_Position = applyBillboardPivotTransform(pivot * u_projection, u_pivotTransform, │ │ │ │ + a_position.w * u_zScale, offset.xy); │ │ │ │ v_colorTexCoords = a_colorTexCoords; │ │ │ │ - v_maskTexCoords = a_maskTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14379,28 +14161,35 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ + in vec2 a_colorTexCoord; │ │ │ │ + in vec2 a_maskTexCoord; │ │ │ │ in vec4 a_position; │ │ │ │ in vec2 a_normal; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ - in vec2 a_maskTexCoords; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - out vec2 v_maskTexCoords; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ + out vec2 v_colorTexCoord; │ │ │ │ + #endif │ │ │ │ + out vec2 v_maskTexCoord; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14422,20 +14211,23 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pivot = vec4(a_position.xyz, 1.0) * u_modelView; │ │ │ │ - vec4 offset = vec4(a_normal, 0.0, 0.0) * u_projection; │ │ │ │ - gl_Position = applyBillboardPivotTransform(pivot * u_projection, u_pivotTransform, │ │ │ │ - a_position.w * u_zScale, offset.xy); │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ - v_maskTexCoords = a_maskTexCoords; │ │ │ │ + vec4 pos = vec4(a_position.xyz, 1) * u_modelView; │ │ │ │ + vec4 shiftedPos = vec4(a_normal, 0.0, 0.0) + pos; │ │ │ │ + gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoord); │ │ │ │ + #else │ │ │ │ + v_colorTexCoord = a_colorTexCoord; │ │ │ │ + #endif │ │ │ │ + v_maskTexCoord = a_maskTexCoord; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14443,26 +14235,32 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_normal; │ │ │ │ + in vec3 a_position; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ + #endif │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_position; │ │ │ │ - uniform vec2 u_lineParams; │ │ │ │ - uniform float u_accuracy; │ │ │ │ - uniform float u_zScale; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ - uniform float u_azimut; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_interpolation; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14484,26 +14282,27 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - float sinV = sin(u_azimut); │ │ │ │ - float cosV = cos(u_azimut); │ │ │ │ - mat4 rotation; │ │ │ │ - rotation[0] = vec4(cosV, sinV, 0.0, 0.0); │ │ │ │ - rotation[1] = vec4(-sinV, cosV, 0.0, 0.0); │ │ │ │ - rotation[2] = vec4(0.0, 0.0, 1.0, 0.0); │ │ │ │ - rotation[3] = vec4(0.0, 0.0, 0.0, 1.0); │ │ │ │ - vec4 pos = vec4(u_position.xyz, 1.0) * u_modelView; │ │ │ │ - vec4 normal = vec4(a_normal, 0, 0); │ │ │ │ - vec4 shiftedPos = normal * rotation + pos; │ │ │ │ - gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + vec4 pos = vec4(a_position, 1.0) * u_modelView; │ │ │ │ + pos.xyw = (pos * u_projection).xyw; │ │ │ │ + pos.z = a_position.z * u_zScale; │ │ │ │ + gl_Position = u_pivotTransform * pos; │ │ │ │ + #ifdef VULKAN │ │ │ │ + gl_Position.y = -gl_Position.y; │ │ │ │ + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ + #endif │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ + #else │ │ │ │ v_colorTexCoords = a_colorTexCoords; │ │ │ │ + #endif │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14511,26 +14310,28 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec4 a_position; │ │ │ │ - in vec2 a_normal; │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec3 a_normal; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ + out float v_intensity; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ + const vec4 kNormalizedLightDir = vec4(0.3162, 0.0, 0.9486, 0.0); │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14552,22 +14353,30 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position.xyz, 1) * u_modelView; │ │ │ │ - float normalLen = length(a_normal); │ │ │ │ - vec4 n = vec4(a_position.xy + a_normal * kShapeCoordScalar, 0.0, 0.0) * u_modelView; │ │ │ │ - vec4 norm = vec4(0.0, 0.0, 0.0, 0.0); │ │ │ │ - if (dot(n, n) != 0.0) │ │ │ │ - norm = normalize(n) * normalLen; │ │ │ │ - vec4 shiftedPos = norm + pos; │ │ │ │ - gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + vec4 pos = vec4(a_position, 1.0) * u_modelView; │ │ │ │ + vec4 normal = vec4(a_position + a_normal, 1.0) * u_modelView; │ │ │ │ + normal.xyw = (normal * u_projection).xyw; │ │ │ │ + normal.z = normal.z * u_zScale; │ │ │ │ + pos.xyw = (pos * u_projection).xyw; │ │ │ │ + pos.z = a_position.z * u_zScale; │ │ │ │ + vec4 normDir = normal - pos; │ │ │ │ + if (dot(normDir, normDir) != 0.0) │ │ │ │ + v_intensity = max(0.0, -dot(kNormalizedLightDir, normalize(normDir))); │ │ │ │ + else │ │ │ │ + v_intensity = 0.0; │ │ │ │ + gl_Position = u_pivotTransform * pos; │ │ │ │ + #ifdef VULKAN │ │ │ │ + gl_Position.y = -gl_Position.y; │ │ │ │ + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ + #endif │ │ │ │ v_colorTexCoords = a_colorTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ @@ -14576,26 +14385,34 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_normal; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec4 a_normal; │ │ │ │ + in vec4 a_colorTexCoords; │ │ │ │ + out vec4 v_normal; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ + #endif │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_position; │ │ │ │ - uniform vec2 u_lineParams; │ │ │ │ - uniform float u_accuracy; │ │ │ │ - uniform float u_zScale; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ - uniform float u_azimut; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_interpolation; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14617,19 +14434,23 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 position = vec4(u_position.xy, 0.0, 1.0) * u_modelView; │ │ │ │ - vec4 normal = vec4(a_normal * u_accuracy, 0.0, 0.0); │ │ │ │ - position = (position + normal) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(position, u_pivotTransform, u_position.z * u_zScale); │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ + vec4 p = vec4(a_position, 1) * u_modelView; │ │ │ │ + vec4 pos = vec4(a_normal.xy + a_colorTexCoords.zw, 0, 0) + p; │ │ │ │ + gl_Position = applyPivotTransform(pos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoords.xy); │ │ │ │ + #else │ │ │ │ + v_colorTexCoords = a_colorTexCoords.xy; │ │ │ │ + #endif │ │ │ │ + v_normal = a_normal; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14638,33 +14459,32 @@ │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec3 a_position; │ │ │ │ - in vec2 a_normal; │ │ │ │ - in vec3 a_length; │ │ │ │ - in vec4 a_color; │ │ │ │ - out vec3 v_length; │ │ │ │ - out vec4 v_color; │ │ │ │ + in vec3 a_normal; │ │ │ │ + in vec2 a_colorTexCoord; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ + out vec2 v_colorTexCoord; │ │ │ │ + #endif │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_routeParams; │ │ │ │ - uniform vec4 u_color; │ │ │ │ - uniform vec4 u_maskColor; │ │ │ │ - uniform vec4 u_outlineColor; │ │ │ │ - uniform vec4 u_fakeColor; │ │ │ │ - uniform vec4 u_fakeOutlineColor; │ │ │ │ - uniform vec2 u_fakeBorders; │ │ │ │ - uniform vec2 u_pattern; │ │ │ │ - uniform vec2 u_angleCosSin; │ │ │ │ - uniform float u_arrowHalfWidth; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_interpolation; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14686,24 +14506,25 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ + vec2 normal = a_normal.xy; │ │ │ │ + float halfWidth = length(normal); │ │ │ │ vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - vec2 len = vec2(a_length.x, a_length.z); │ │ │ │ - if (dot(a_normal, a_normal) != 0.0) │ │ │ │ - vec2 norm = a_normal * u_routeParams.x; │ │ │ │ - transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ - u_modelView, length(norm)); │ │ │ │ - if (u_routeParams.y != 0.0) │ │ │ │ - len = vec2(a_length.x + a_length.y * u_routeParams.y, a_length.z); │ │ │ │ - v_length = vec3(len, u_routeParams.z); │ │ │ │ - v_color = a_color; │ │ │ │ + if (halfWidth != 0.0) │ │ │ │ + transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + normal, │ │ │ │ + u_modelView, halfWidth); │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoord); │ │ │ │ + #else │ │ │ │ + v_colorTexCoord = a_colorTexCoord; │ │ │ │ + #endif │ │ │ │ vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ @@ -14713,32 +14534,34 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec4 a_position; │ │ │ │ - in vec2 a_normal; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec4 a_normal; │ │ │ │ + in vec4 a_colorTexCoords; │ │ │ │ + out vec4 v_normal; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ + #endif │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_routeParams; │ │ │ │ - uniform vec4 u_color; │ │ │ │ - uniform vec4 u_maskColor; │ │ │ │ - uniform vec4 u_outlineColor; │ │ │ │ - uniform vec4 u_fakeColor; │ │ │ │ - uniform vec4 u_fakeOutlineColor; │ │ │ │ - uniform vec2 u_fakeBorders; │ │ │ │ - uniform vec2 u_pattern; │ │ │ │ - uniform vec2 u_angleCosSin; │ │ │ │ - uniform float u_arrowHalfWidth; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_interpolation; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14760,22 +14583,23 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - if (dot(a_normal, a_normal) != 0.0) │ │ │ │ - vec2 norm = a_normal * u_arrowHalfWidth; │ │ │ │ - transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ - u_modelView, length(norm)); │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ - vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + vec4 pivot = vec4(a_position.xyz, 1.0) * u_modelView; │ │ │ │ + vec4 offset = vec4(a_normal.xy + a_colorTexCoords.zw, 0.0, 0.0) * u_projection; │ │ │ │ + gl_Position = applyBillboardPivotTransform(pivot * u_projection, u_pivotTransform, 0.0, offset.xy); │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoords.xy); │ │ │ │ + #else │ │ │ │ + v_colorTexCoords = a_colorTexCoords.xy; │ │ │ │ + #endif │ │ │ │ + v_normal = a_normal; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14783,33 +14607,19 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec4 a_position; │ │ │ │ - in vec3 a_normal; │ │ │ │ - in vec4 a_color; │ │ │ │ - out vec4 v_radius; │ │ │ │ - out vec4 v_color; │ │ │ │ - uniform mat4 u_modelView; │ │ │ │ - uniform mat4 u_projection; │ │ │ │ - uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_routeParams; │ │ │ │ - uniform vec4 u_color; │ │ │ │ - uniform vec4 u_maskColor; │ │ │ │ - uniform vec4 u_outlineColor; │ │ │ │ - uniform vec4 u_fakeColor; │ │ │ │ - uniform vec4 u_fakeOutlineColor; │ │ │ │ - uniform vec2 u_fakeBorders; │ │ │ │ - uniform vec2 u_pattern; │ │ │ │ - uniform vec2 u_angleCosSin; │ │ │ │ - uniform float u_arrowHalfWidth; │ │ │ │ - uniform float u_opacity; │ │ │ │ + in vec2 a_pos; │ │ │ │ + in vec2 a_tcoord; │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ + out vec4 v_offset; │ │ │ │ + uniform vec4 u_framebufferMetrics; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14831,24 +14641,17 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - float r = u_routeParams.x * a_normal.z; │ │ │ │ - vec2 normal = vec2(a_normal.x * u_angleCosSin.x - a_normal.y * u_angleCosSin.y, │ │ │ │ - a_normal.x * u_angleCosSin.y + a_normal.y * u_angleCosSin.x); │ │ │ │ - vec4 radius = vec4(normal.xy * r, r, a_position.w); │ │ │ │ - vec4 pos = vec4(a_position.xy, 0, 1) * u_modelView; │ │ │ │ - vec2 shiftedPos = radius.xy + pos.xy; │ │ │ │ - pos = vec4(shiftedPos, a_position.z, 1.0) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ - v_radius = radius; │ │ │ │ - v_color = a_color; │ │ │ │ + v_colorTexCoords = a_tcoord; │ │ │ │ + v_offset = u_framebufferMetrics.xyxy * vec4(1.0, 0.0, 0.0, 1.0) + a_tcoord.xyxy; │ │ │ │ + gl_Position = vec4(a_pos, 0.0, 1.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14856,25 +14659,21 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_position; │ │ │ │ - in vec2 a_normal; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - uniform mat4 u_modelView; │ │ │ │ - uniform mat4 u_projection; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ - uniform vec2 u_position; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ - uniform float u_opacity; │ │ │ │ - uniform float u_length; │ │ │ │ + in vec3 a_pos; │ │ │ │ + in vec2 a_texCoords; │ │ │ │ + out float v_intensity; │ │ │ │ + uniform mat4 u_transform; │ │ │ │ + uniform mat4 u_normalTransform; │ │ │ │ + uniform vec4 u_color; │ │ │ │ + uniform vec2 u_texCoordFlipping; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14896,20 +14695,21 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - gl_Position = vec4(u_position + a_position + u_length * a_normal, 0, 1) * u_projection; │ │ │ │ + vec4 position = u_transform * vec4(a_pos, 1.0); │ │ │ │ + v_intensity = a_texCoords.x; │ │ │ │ + gl_Position = position; │ │ │ │ #ifdef VULKAN │ │ │ │ gl_Position.y = -gl_Position.y; │ │ │ │ - gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ #endif │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -14918,36 +14718,31 @@ │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec3 a_position; │ │ │ │ - in vec2 a_normal; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ - in vec3 a_length; │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ out LOW_P vec4 v_color; │ │ │ │ #else │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ #endif │ │ │ │ - out float v_lengthY; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_position; │ │ │ │ - uniform vec2 u_lineParams; │ │ │ │ - uniform float u_accuracy; │ │ │ │ - uniform float u_zScale; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ - uniform float u_azimut; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_interpolation; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ uniform sampler2D u_colorTex; │ │ │ │ #endif │ │ │ │ - const float kAntialiasingThreshold = 0.92; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -14969,30 +14764,21 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - vec2 len = vec2(a_length.x, a_length.z); │ │ │ │ - if (dot(a_normal, a_normal) != 0.0) │ │ │ │ - vec2 norm = a_normal * u_lineParams.x; │ │ │ │ - transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ - u_modelView, length(norm)); │ │ │ │ - if (u_lineParams.y != 0.0) │ │ │ │ - len = vec2(a_length.x + a_length.y * u_lineParams.y, a_length.z); │ │ │ │ + vec4 pos = vec4(a_position, 1) * u_modelView * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ #else │ │ │ │ - v_colorTexCoord = a_colorTexCoords; │ │ │ │ + v_colorTexCoords = a_colorTexCoords; │ │ │ │ #endif │ │ │ │ - v_lengthY = len.y; │ │ │ │ - vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15113,24 +14899,34 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_pos; │ │ │ │ - in vec2 a_tcoord; │ │ │ │ - out vec4 v_coords; │ │ │ │ - out vec4 v_offset0; │ │ │ │ - out vec4 v_offset1; │ │ │ │ - out vec4 v_offset2; │ │ │ │ - uniform vec4 u_framebufferMetrics; │ │ │ │ - #define SMAA_MAX_SEARCH_STEPS 8.0 │ │ │ │ - const vec4 kMaxSearchSteps = vec4(-2.0 * SMAA_MAX_SEARCH_STEPS, 2.0 * SMAA_MAX_SEARCH_STEPS, │ │ │ │ - -2.0 * SMAA_MAX_SEARCH_STEPS, 2.0 * SMAA_MAX_SEARCH_STEPS); │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ + in vec2 a_maskTexCoords; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ + #endif │ │ │ │ + out vec2 v_maskTexCoords; │ │ │ │ + uniform mat4 u_modelView; │ │ │ │ + uniform mat4 u_projection; │ │ │ │ + uniform mat4 u_pivotTransform; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ + uniform float u_opacity; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_interpolation; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15152,19 +14948,22 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - v_coords = vec4(a_tcoord, a_tcoord * u_framebufferMetrics.zw); │ │ │ │ - v_offset0 = u_framebufferMetrics.xyxy * vec4(-0.25, -0.125, 1.25, -0.125) + a_tcoord.xyxy; │ │ │ │ - v_offset1 = u_framebufferMetrics.xyxy * vec4(-0.125, -0.25, -0.125, 1.25) + a_tcoord.xyxy; │ │ │ │ - v_offset2 = u_framebufferMetrics.xxyy * kMaxSearchSteps + vec4(v_offset0.xz, v_offset1.yw); │ │ │ │ - gl_Position = vec4(a_pos, 0.0, 1.0); │ │ │ │ + vec4 pos = vec4(a_position, 1) * u_modelView * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ + #else │ │ │ │ + v_colorTexCoords = a_colorTexCoords; │ │ │ │ + #endif │ │ │ │ + v_maskTexCoords = a_maskTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15228,19 +15027,25 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_pos; │ │ │ │ - in vec2 a_tcoord; │ │ │ │ + in vec2 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ - out vec4 v_offset; │ │ │ │ - uniform vec4 u_framebufferMetrics; │ │ │ │ + uniform mat4 u_modelView; │ │ │ │ + uniform mat4 u_projection; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ + uniform vec2 u_position; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ + uniform float u_opacity; │ │ │ │ + uniform float u_length; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15262,17 +15067,20 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - v_colorTexCoords = a_tcoord; │ │ │ │ - v_offset = u_framebufferMetrics.xyxy * vec4(1.0, 0.0, 0.0, 1.0) + a_tcoord.xyxy; │ │ │ │ - gl_Position = vec4(a_pos, 0.0, 1.0); │ │ │ │ + gl_Position = vec4(u_position + a_position + u_length * a_normal, 0, 1) * u_projection; │ │ │ │ + #ifdef VULKAN │ │ │ │ + gl_Position.y = -gl_Position.y; │ │ │ │ + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ + #endif │ │ │ │ + v_colorTexCoords = a_colorTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15280,35 +15088,105 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_colorTexCoord; │ │ │ │ - in vec2 a_maskTexCoord; │ │ │ │ - in vec4 a_position; │ │ │ │ in vec2 a_normal; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ + uniform mat4 u_modelView; │ │ │ │ + uniform mat4 u_projection; │ │ │ │ + uniform mat4 u_pivotTransform; │ │ │ │ + uniform vec4 u_position; │ │ │ │ + uniform vec2 u_lineParams; │ │ │ │ + uniform float u_accuracy; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_opacity; │ │ │ │ + uniform float u_azimut; │ │ │ │ + const float kShapeCoordScalar = 1000.0; │ │ │ │ + vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ + vec4 transformedPivot = pivot; │ │ │ │ + float w = transformedPivot.w; │ │ │ │ + transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ + transformedPivot.z *= transformedPivot.w / w; │ │ │ │ + #ifdef VULKAN │ │ │ │ + transformedPivot.y = -transformedPivot.y; │ │ │ │ + transformedPivot.z = (transformedPivot.z + transformedPivot.w) / 2.0; │ │ │ │ + #endif │ │ │ │ + return transformedPivot; │ │ │ │ + vec4 applyBillboardPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ, vec2 offset) │ │ │ │ + float logicZ = pivot.z / pivot.w; │ │ │ │ + vec4 transformedPivot = pivotTransform * vec4(pivot.xy, pivotRealZ, pivot.w); │ │ │ │ + vec4 scale = pivotTransform * vec4(1.0, -1.0, 0.0, 1.0); │ │ │ │ + vec4 position = vec4(transformedPivot.xy / transformedPivot.w, logicZ, 1.0) + vec4(offset / scale.w * scale.x, 0.0, 0.0); │ │ │ │ + #ifdef VULKAN │ │ │ │ + position.y = -position.y; │ │ │ │ + position.z = (position.z + position.w) / 2.0; │ │ │ │ + #endif │ │ │ │ + return position; │ │ │ │ + vec2 calcLineTransformedAxisPos(vec2 originalAxisPos, vec2 shiftedPos, mat4 modelView, float halfWidth) │ │ │ │ + vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ + vec2 d = p - originalAxisPos; │ │ │ │ + if (dot(d, d) != 0.0) │ │ │ │ + return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ + else │ │ │ │ + return originalAxisPos; │ │ │ │ + void main() │ │ │ │ + float sinV = sin(u_azimut); │ │ │ │ + float cosV = cos(u_azimut); │ │ │ │ + mat4 rotation; │ │ │ │ + rotation[0] = vec4(cosV, sinV, 0.0, 0.0); │ │ │ │ + rotation[1] = vec4(-sinV, cosV, 0.0, 0.0); │ │ │ │ + rotation[2] = vec4(0.0, 0.0, 1.0, 0.0); │ │ │ │ + rotation[3] = vec4(0.0, 0.0, 0.0, 1.0); │ │ │ │ + vec4 pos = vec4(u_position.xyz, 1.0) * u_modelView; │ │ │ │ + vec4 normal = vec4(a_normal, 0, 0); │ │ │ │ + vec4 shiftedPos = normal * rotation + pos; │ │ │ │ + gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + v_colorTexCoords = a_colorTexCoords; │ │ │ │ + #ifdef GL_ES │ │ │ │ + #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ + #define MAXPREC highp │ │ │ │ + #else │ │ │ │ + #define MAXPREC mediump │ │ │ │ + #endif │ │ │ │ + precision MAXPREC float; │ │ │ │ + #define LOW_P lowp │ │ │ │ + #define MEDIUM_P mediump │ │ │ │ + #define HIGH_P highp │ │ │ │ + #else │ │ │ │ + #define LOW_P │ │ │ │ + #define MEDIUM_P │ │ │ │ + #define HIGH_P │ │ │ │ + #endif │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ + in vec3 a_length; │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ out LOW_P vec4 v_color; │ │ │ │ #else │ │ │ │ out vec2 v_colorTexCoord; │ │ │ │ #endif │ │ │ │ - out vec2 v_maskTexCoord; │ │ │ │ + out float v_lengthY; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ - uniform float u_opacity; │ │ │ │ + uniform vec4 u_position; │ │ │ │ + uniform vec2 u_lineParams; │ │ │ │ + uniform float u_accuracy; │ │ │ │ uniform float u_zScale; │ │ │ │ - uniform float u_interpolation; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ + uniform float u_opacity; │ │ │ │ + uniform float u_azimut; │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ uniform sampler2D u_colorTex; │ │ │ │ #endif │ │ │ │ + const float kAntialiasingThreshold = 0.92; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15330,23 +15208,30 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position.xyz, 1) * u_modelView; │ │ │ │ - vec4 shiftedPos = vec4(a_normal, 0.0, 0.0) + pos; │ │ │ │ - gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ + vec2 len = vec2(a_length.x, a_length.z); │ │ │ │ + if (dot(a_normal, a_normal) != 0.0) │ │ │ │ + vec2 norm = a_normal * u_lineParams.x; │ │ │ │ + transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ + u_modelView, length(norm)); │ │ │ │ + if (u_lineParams.y != 0.0) │ │ │ │ + len = vec2(a_length.x + a_length.y * u_lineParams.y, a_length.z); │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoord); │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ #else │ │ │ │ - v_colorTexCoord = a_colorTexCoord; │ │ │ │ + v_colorTexCoord = a_colorTexCoords; │ │ │ │ #endif │ │ │ │ - v_maskTexCoord = a_maskTexCoord; │ │ │ │ + v_lengthY = len.y; │ │ │ │ + vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15354,33 +15239,28 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec3 a_normal; │ │ │ │ in vec2 a_colorTexCoord; │ │ │ │ - in vec2 a_maskTexCoord; │ │ │ │ - in vec4 a_position; │ │ │ │ - in vec2 a_normal; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ + in vec4 a_maskTexCoord; │ │ │ │ out vec2 v_colorTexCoord; │ │ │ │ - #endif │ │ │ │ out vec2 v_maskTexCoord; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15402,24 +15282,86 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pivot = vec4(a_position.xyz, 1.0) * u_modelView; │ │ │ │ - vec4 offset = vec4(a_normal, 0.0, 0.0) * u_projection; │ │ │ │ - gl_Position = applyBillboardPivotTransform(pivot * u_projection, u_pivotTransform, │ │ │ │ - a_position.w * u_zScale, offset.xy); │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoord); │ │ │ │ - #else │ │ │ │ + vec2 normal = a_normal.xy; │ │ │ │ + float halfWidth = length(normal); │ │ │ │ + vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ + if (halfWidth != 0.0) │ │ │ │ + transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + normal, │ │ │ │ + u_modelView, halfWidth); │ │ │ │ + float uOffset = min(length(vec4(kShapeCoordScalar, 0, 0, 0) * u_modelView) * a_maskTexCoord.x, 1.0); │ │ │ │ v_colorTexCoord = a_colorTexCoord; │ │ │ │ + v_maskTexCoord = vec2(a_maskTexCoord.y + uOffset * a_maskTexCoord.z, a_maskTexCoord.w); │ │ │ │ + vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + #ifdef GL_ES │ │ │ │ + #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ + #define MAXPREC highp │ │ │ │ + #else │ │ │ │ + #define MAXPREC mediump │ │ │ │ + #endif │ │ │ │ + precision MAXPREC float; │ │ │ │ + #define LOW_P lowp │ │ │ │ + #define MEDIUM_P mediump │ │ │ │ + #define HIGH_P highp │ │ │ │ + #else │ │ │ │ + #define LOW_P │ │ │ │ + #define MEDIUM_P │ │ │ │ + #define HIGH_P │ │ │ │ #endif │ │ │ │ - v_maskTexCoord = a_maskTexCoord; │ │ │ │ + in vec2 a_normal; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ + uniform mat4 u_modelView; │ │ │ │ + uniform mat4 u_projection; │ │ │ │ + uniform mat4 u_pivotTransform; │ │ │ │ + uniform vec4 u_position; │ │ │ │ + uniform vec2 u_lineParams; │ │ │ │ + uniform float u_accuracy; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_opacity; │ │ │ │ + uniform float u_azimut; │ │ │ │ + const float kShapeCoordScalar = 1000.0; │ │ │ │ + vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ + vec4 transformedPivot = pivot; │ │ │ │ + float w = transformedPivot.w; │ │ │ │ + transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ + transformedPivot.z *= transformedPivot.w / w; │ │ │ │ + #ifdef VULKAN │ │ │ │ + transformedPivot.y = -transformedPivot.y; │ │ │ │ + transformedPivot.z = (transformedPivot.z + transformedPivot.w) / 2.0; │ │ │ │ + #endif │ │ │ │ + return transformedPivot; │ │ │ │ + vec4 applyBillboardPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ, vec2 offset) │ │ │ │ + float logicZ = pivot.z / pivot.w; │ │ │ │ + vec4 transformedPivot = pivotTransform * vec4(pivot.xy, pivotRealZ, pivot.w); │ │ │ │ + vec4 scale = pivotTransform * vec4(1.0, -1.0, 0.0, 1.0); │ │ │ │ + vec4 position = vec4(transformedPivot.xy / transformedPivot.w, logicZ, 1.0) + vec4(offset / scale.w * scale.x, 0.0, 0.0); │ │ │ │ + #ifdef VULKAN │ │ │ │ + position.y = -position.y; │ │ │ │ + position.z = (position.z + position.w) / 2.0; │ │ │ │ + #endif │ │ │ │ + return position; │ │ │ │ + vec2 calcLineTransformedAxisPos(vec2 originalAxisPos, vec2 shiftedPos, mat4 modelView, float halfWidth) │ │ │ │ + vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ + vec2 d = p - originalAxisPos; │ │ │ │ + if (dot(d, d) != 0.0) │ │ │ │ + return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ + else │ │ │ │ + return originalAxisPos; │ │ │ │ + void main() │ │ │ │ + vec4 position = vec4(u_position.xy, 0.0, 1.0) * u_modelView; │ │ │ │ + vec4 normal = vec4(a_normal * u_accuracy, 0.0, 0.0); │ │ │ │ + position = (position + normal) * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(position, u_pivotTransform, u_position.z * u_zScale); │ │ │ │ + v_colorTexCoords = a_colorTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15427,37 +15369,36 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ + in vec3 a_position; │ │ │ │ in vec2 a_colorTexCoord; │ │ │ │ in vec2 a_outlineColorTexCoord; │ │ │ │ - in vec2 a_maskTexCoord; │ │ │ │ - in vec4 a_position; │ │ │ │ in vec2 a_normal; │ │ │ │ + in vec2 a_maskTexCoord; │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ out LOW_P vec4 v_color; │ │ │ │ #else │ │ │ │ out vec2 v_colorTexCoord; │ │ │ │ #endif │ │ │ │ out vec2 v_maskTexCoord; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ - uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ - uniform float u_opacity; │ │ │ │ - uniform float u_zScale; │ │ │ │ - uniform float u_interpolation; │ │ │ │ + uniform vec2 u_position; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ + uniform float u_opacity; │ │ │ │ + uniform float u_length; │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ uniform sampler2D u_colorTex; │ │ │ │ #endif │ │ │ │ - const float BaseDepthShift = -10.0; │ │ │ │ + const float kBaseDepthShift = -10.0; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15480,20 +15421,23 @@ │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ float isOutline = step(0.5, u_isOutlinePass); │ │ │ │ - float notOutline = 1.0 - isOutline; │ │ │ │ - float depthShift = BaseDepthShift * isOutline; │ │ │ │ - vec4 pos = (vec4(a_position.xyz, 1) + vec4(0.0, 0.0, depthShift, 0.0)) * u_modelView; │ │ │ │ + float depthShift = kBaseDepthShift * isOutline; │ │ │ │ + vec4 pos = (vec4(a_position, 1.0) + vec4(0.0, 0.0, depthShift, 0.0)) * u_modelView; │ │ │ │ vec4 shiftedPos = vec4(a_normal, 0.0, 0.0) + pos; │ │ │ │ - gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ - vec2 colorTexCoord = a_colorTexCoord * notOutline + a_outlineColorTexCoord * isOutline; │ │ │ │ + gl_Position = shiftedPos * u_projection; │ │ │ │ + #ifdef VULKAN │ │ │ │ + gl_Position.y = -gl_Position.y; │ │ │ │ + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ + #endif │ │ │ │ + vec2 colorTexCoord = mix(a_colorTexCoord, a_outlineColorTexCoord, isOutline); │ │ │ │ #ifdef ENABLE_VTF │ │ │ │ v_color = texture(u_colorTex, colorTexCoord); │ │ │ │ #else │ │ │ │ v_colorTexCoord = colorTexCoord; │ │ │ │ #endif │ │ │ │ v_maskTexCoord = a_maskTexCoord; │ │ │ │ #ifdef GL_ES │ │ │ │ @@ -15585,36 +15529,24 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec2 a_colorTexCoord; │ │ │ │ - in vec2 a_outlineColorTexCoord; │ │ │ │ - in vec2 a_normal; │ │ │ │ - in vec2 a_maskTexCoord; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ - #endif │ │ │ │ - out vec2 v_maskTexCoord; │ │ │ │ + in vec2 a_position; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform vec2 u_position; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_length; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ - const float kBaseDepthShift = -10.0; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15636,30 +15568,20 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - float isOutline = step(0.5, u_isOutlinePass); │ │ │ │ - float depthShift = kBaseDepthShift * isOutline; │ │ │ │ - vec4 pos = (vec4(a_position, 1.0) + vec4(0.0, 0.0, depthShift, 0.0)) * u_modelView; │ │ │ │ - vec4 shiftedPos = vec4(a_normal, 0.0, 0.0) + pos; │ │ │ │ - gl_Position = shiftedPos * u_projection; │ │ │ │ + gl_Position = vec4(a_position, 0, 1) * u_modelView * u_projection; │ │ │ │ #ifdef VULKAN │ │ │ │ gl_Position.y = -gl_Position.y; │ │ │ │ gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ #endif │ │ │ │ - vec2 colorTexCoord = mix(a_colorTexCoord, a_outlineColorTexCoord, isOutline); │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, colorTexCoord); │ │ │ │ - #else │ │ │ │ - v_colorTexCoord = colorTexCoord; │ │ │ │ - #endif │ │ │ │ - v_maskTexCoord = a_maskTexCoord; │ │ │ │ + v_colorTexCoords = a_colorTexCoords; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15667,26 +15589,21 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec4 a_position; │ │ │ │ - in vec2 a_normal; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ + #define TILE_BACKGROUND_MAX_COUNT 64 │ │ │ │ + out vec3 v_texCoords; │ │ │ │ + uniform vec4 u_tileCoordsMinMax[TILE_BACKGROUND_MAX_COUNT]; │ │ │ │ + uniform int u_textureIndex[TILE_BACKGROUND_MAX_COUNT]; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ - uniform float u_opacity; │ │ │ │ - uniform float u_zScale; │ │ │ │ - uniform float u_interpolation; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15708,18 +15625,20 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position.xyz, 1) * u_modelView; │ │ │ │ - vec4 shiftedPos = vec4(a_normal, 0, 0) + pos; │ │ │ │ - gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ + vec2 quadVertex = vec2(gl_VertexID & 1, (gl_VertexID >> 1) & 1); │ │ │ │ + vec4 tileCoordsMinMax = u_tileCoordsMinMax[gl_InstanceID]; │ │ │ │ + vec2 worldPos = mix(tileCoordsMinMax.xy, tileCoordsMinMax.zw, quadVertex); │ │ │ │ + vec4 pos = vec4(worldPos, 0.0, 1.0) * u_modelView * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + v_texCoords = vec3(quadVertex, float(u_textureIndex[gl_InstanceID])); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15727,18 +15646,19 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec4 a_position; │ │ │ │ - in vec2 a_normal; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ + in vec3 a_normal; │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec4 a_color; │ │ │ │ + out vec3 v_radius; │ │ │ │ + out vec4 v_color; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ @@ -15768,19 +15688,20 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pivot = vec4(a_position.xyz, 1.0) * u_modelView; │ │ │ │ - vec4 offset = vec4(a_normal, 0.0, 0.0) * u_projection; │ │ │ │ - gl_Position = applyBillboardPivotTransform(pivot * u_projection, u_pivotTransform, │ │ │ │ - a_position.w * u_zScale, offset.xy); │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ + vec3 radius = a_normal * a_position.z; │ │ │ │ + vec4 pos = vec4(a_position.xy, 0, 1) * u_modelView; │ │ │ │ + vec4 shiftedPos = vec4(radius.xy, 0, 0) + pos; │ │ │ │ + gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + v_radius = radius; │ │ │ │ + v_color = a_color; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15788,24 +15709,24 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_position; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - uniform mat4 u_modelView; │ │ │ │ - uniform mat4 u_projection; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ - uniform vec2 u_position; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ - uniform float u_opacity; │ │ │ │ - uniform float u_length; │ │ │ │ + in vec2 a_pos; │ │ │ │ + in vec2 a_tcoord; │ │ │ │ + out vec4 v_coords; │ │ │ │ + out vec4 v_offset0; │ │ │ │ + out vec4 v_offset1; │ │ │ │ + out vec4 v_offset2; │ │ │ │ + uniform vec4 u_framebufferMetrics; │ │ │ │ + #define SMAA_MAX_SEARCH_STEPS 8.0 │ │ │ │ + const vec4 kMaxSearchSteps = vec4(-2.0 * SMAA_MAX_SEARCH_STEPS, 2.0 * SMAA_MAX_SEARCH_STEPS, │ │ │ │ + -2.0 * SMAA_MAX_SEARCH_STEPS, 2.0 * SMAA_MAX_SEARCH_STEPS); │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15827,20 +15748,19 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - gl_Position = vec4(a_position, 0, 1) * u_modelView * u_projection; │ │ │ │ - #ifdef VULKAN │ │ │ │ - gl_Position.y = -gl_Position.y; │ │ │ │ - gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ - #endif │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ + v_coords = vec4(a_tcoord, a_tcoord * u_framebufferMetrics.zw); │ │ │ │ + v_offset0 = u_framebufferMetrics.xyxy * vec4(-0.25, -0.125, 1.25, -0.125) + a_tcoord.xyxy; │ │ │ │ + v_offset1 = u_framebufferMetrics.xyxy * vec4(-0.125, -0.25, -0.125, 1.25) + a_tcoord.xyxy; │ │ │ │ + v_offset2 = u_framebufferMetrics.xxyy * kMaxSearchSteps + vec4(v_offset0.xz, v_offset1.yw); │ │ │ │ + gl_Position = vec4(a_pos, 0.0, 1.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15848,21 +15768,25 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - #define TILE_BACKGROUND_MAX_COUNT 64 │ │ │ │ - out vec3 v_texCoords; │ │ │ │ - uniform vec4 u_tileCoordsMinMax[TILE_BACKGROUND_MAX_COUNT]; │ │ │ │ - uniform int u_textureIndex[TILE_BACKGROUND_MAX_COUNT]; │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec4 a_normal; │ │ │ │ + in vec4 a_color; │ │ │ │ + out vec3 v_radius; │ │ │ │ + out vec4 v_color; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ + uniform vec4 u_params; │ │ │ │ + uniform float u_lineHalfWidth; │ │ │ │ + uniform float u_maxRadius; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15884,20 +15808,83 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 quadVertex = vec2(gl_VertexID & 1, (gl_VertexID >> 1) & 1); │ │ │ │ - vec4 tileCoordsMinMax = u_tileCoordsMinMax[gl_InstanceID]; │ │ │ │ - vec2 worldPos = mix(tileCoordsMinMax.xy, tileCoordsMinMax.zw, quadVertex); │ │ │ │ - vec4 pos = vec4(worldPos, 0.0, 1.0) * u_modelView * u_projection; │ │ │ │ + vec2 normal = a_normal.xy; │ │ │ │ + vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ + if (dot(normal, normal) != 0.0) │ │ │ │ + vec2 norm = normal * u_lineHalfWidth; │ │ │ │ + transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ + u_modelView, length(norm)); │ │ │ │ + transformedAxisPos += a_normal.zw * u_lineHalfWidth; │ │ │ │ + vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ - v_texCoords = vec3(quadVertex, float(u_textureIndex[gl_InstanceID])); │ │ │ │ + v_color = a_color; │ │ │ │ + v_radius = vec3(a_normal.zw, u_maxRadius) * u_lineHalfWidth; │ │ │ │ + #ifdef GL_ES │ │ │ │ + #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ + #define MAXPREC highp │ │ │ │ + #else │ │ │ │ + #define MAXPREC mediump │ │ │ │ + #endif │ │ │ │ + precision MAXPREC float; │ │ │ │ + #define LOW_P lowp │ │ │ │ + #define MEDIUM_P mediump │ │ │ │ + #define HIGH_P highp │ │ │ │ + #else │ │ │ │ + #define LOW_P │ │ │ │ + #define MEDIUM_P │ │ │ │ + #define HIGH_P │ │ │ │ + #endif │ │ │ │ + in vec3 a_pos; │ │ │ │ + in vec3 a_normal; │ │ │ │ + out vec3 v_normal; │ │ │ │ + uniform mat4 u_transform; │ │ │ │ + uniform mat4 u_normalTransform; │ │ │ │ + uniform vec4 u_color; │ │ │ │ + uniform vec2 u_texCoordFlipping; │ │ │ │ + const float kShapeCoordScalar = 1000.0; │ │ │ │ + vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ + vec4 transformedPivot = pivot; │ │ │ │ + float w = transformedPivot.w; │ │ │ │ + transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ + transformedPivot.z *= transformedPivot.w / w; │ │ │ │ + #ifdef VULKAN │ │ │ │ + transformedPivot.y = -transformedPivot.y; │ │ │ │ + transformedPivot.z = (transformedPivot.z + transformedPivot.w) / 2.0; │ │ │ │ + #endif │ │ │ │ + return transformedPivot; │ │ │ │ + vec4 applyBillboardPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ, vec2 offset) │ │ │ │ + float logicZ = pivot.z / pivot.w; │ │ │ │ + vec4 transformedPivot = pivotTransform * vec4(pivot.xy, pivotRealZ, pivot.w); │ │ │ │ + vec4 scale = pivotTransform * vec4(1.0, -1.0, 0.0, 1.0); │ │ │ │ + vec4 position = vec4(transformedPivot.xy / transformedPivot.w, logicZ, 1.0) + vec4(offset / scale.w * scale.x, 0.0, 0.0); │ │ │ │ + #ifdef VULKAN │ │ │ │ + position.y = -position.y; │ │ │ │ + position.z = (position.z + position.w) / 2.0; │ │ │ │ + #endif │ │ │ │ + return position; │ │ │ │ + vec2 calcLineTransformedAxisPos(vec2 originalAxisPos, vec2 shiftedPos, mat4 modelView, float halfWidth) │ │ │ │ + vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ + vec2 d = p - originalAxisPos; │ │ │ │ + if (dot(d, d) != 0.0) │ │ │ │ + return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ + else │ │ │ │ + return originalAxisPos; │ │ │ │ + void main() │ │ │ │ + vec4 position = u_transform * vec4(a_pos, 1.0); │ │ │ │ + v_normal = normalize((u_normalTransform * vec4(a_normal, 0.0)).xyz); │ │ │ │ + gl_Position = position; │ │ │ │ + #ifdef VULKAN │ │ │ │ + gl_Position.y = -gl_Position.y; │ │ │ │ + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ + #endif │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15906,29 +15893,33 @@ │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec3 a_position; │ │ │ │ - in vec4 a_normal; │ │ │ │ - in vec4 a_colorTexCoord; │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ - out vec2 v_maskTexCoord; │ │ │ │ - out float v_halfLength; │ │ │ │ + in vec3 a_normal; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ + #endif │ │ │ │ + out vec3 v_radius; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_trafficParams; │ │ │ │ - uniform vec4 u_outlineColor; │ │ │ │ - uniform vec4 u_lightArrowColor; │ │ │ │ - uniform vec4 u_darkArrowColor; │ │ │ │ - uniform float u_outline; │ │ │ │ + uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ - const float kArrowVSize = 0.25; │ │ │ │ + uniform float u_zScale; │ │ │ │ + uniform float u_interpolation; │ │ │ │ + uniform float u_isOutlinePass; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + #endif │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -15950,30 +15941,23 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 normal = a_normal.xy; │ │ │ │ - vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - if (dot(normal, normal) != 0.0) │ │ │ │ - vec2 norm = normal * u_trafficParams.x; │ │ │ │ - if (a_normal.z < 0.0) │ │ │ │ - norm = normal * u_trafficParams.y; │ │ │ │ - transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ - u_modelView, length(norm)); │ │ │ │ - float uOffset = length(vec4(kShapeCoordScalar, 0, 0, 0) * u_modelView) * a_normal.w; │ │ │ │ - v_colorTexCoord = a_colorTexCoord.xy; │ │ │ │ - float v = mix(a_colorTexCoord.z, a_colorTexCoord.z + kArrowVSize, 0.5 * a_normal.z + 0.5); │ │ │ │ - v_maskTexCoord = vec2(uOffset * u_trafficParams.z, v) * u_trafficParams.w; │ │ │ │ - v_maskTexCoord.x *= step(a_colorTexCoord.w, v_maskTexCoord.x); │ │ │ │ - v_halfLength = a_normal.z; │ │ │ │ - vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + vec4 p = vec4(a_position, 1) * u_modelView; │ │ │ │ + vec4 pos = vec4(a_normal.xy, 0, 0) + p; │ │ │ │ + gl_Position = applyPivotTransform(pos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ + #else │ │ │ │ + v_colorTexCoords = a_colorTexCoords; │ │ │ │ + #endif │ │ │ │ + v_radius = a_normal; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15982,26 +15966,30 @@ │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec4 a_position; │ │ │ │ - in vec4 a_normal; │ │ │ │ - in vec2 a_colorTexCoord; │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ - out vec3 v_radius; │ │ │ │ + in vec2 a_normal; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_trafficParams; │ │ │ │ + uniform vec4 u_routeParams; │ │ │ │ + uniform vec4 u_color; │ │ │ │ + uniform vec4 u_maskColor; │ │ │ │ uniform vec4 u_outlineColor; │ │ │ │ - uniform vec4 u_lightArrowColor; │ │ │ │ - uniform vec4 u_darkArrowColor; │ │ │ │ - uniform float u_outline; │ │ │ │ + uniform vec4 u_fakeColor; │ │ │ │ + uniform vec4 u_fakeOutlineColor; │ │ │ │ + uniform vec2 u_fakeBorders; │ │ │ │ + uniform vec2 u_pattern; │ │ │ │ + uniform vec2 u_angleCosSin; │ │ │ │ + uniform float u_arrowHalfWidth; │ │ │ │ uniform float u_opacity; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ @@ -16024,27 +16012,21 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 normal = a_normal.xy; │ │ │ │ vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - int index = int(a_position.w); │ │ │ │ - float leftSize = u_lightArrowColor[index]; │ │ │ │ - float rightSize = u_darkArrowColor[index]; │ │ │ │ - if (dot(normal, normal) != 0.0) │ │ │ │ - vec2 norm = normal * 0.5 * (rightSize - leftSize); │ │ │ │ + if (dot(a_normal, a_normal) != 0.0) │ │ │ │ + vec2 norm = a_normal * u_arrowHalfWidth; │ │ │ │ transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ u_modelView, length(norm)); │ │ │ │ - v_radius = vec3(a_normal.zw, 1.0) * 0.5 * (leftSize + rightSize); │ │ │ │ - vec2 finalPos = transformedAxisPos + v_radius.xy; │ │ │ │ - v_colorTexCoord = a_colorTexCoord; │ │ │ │ - vec4 pos = vec4(finalPos, a_position.z, 1.0) * u_projection; │ │ │ │ + v_colorTexCoords = a_colorTexCoords; │ │ │ │ + vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ @@ -16054,25 +16036,29 @@ │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec3 a_position; │ │ │ │ - in vec2 a_colorTexCoord; │ │ │ │ + in vec4 a_normal; │ │ │ │ + in vec4 a_colorTexCoord; │ │ │ │ out vec2 v_colorTexCoord; │ │ │ │ + out vec2 v_maskTexCoord; │ │ │ │ + out float v_halfLength; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec4 u_trafficParams; │ │ │ │ uniform vec4 u_outlineColor; │ │ │ │ uniform vec4 u_lightArrowColor; │ │ │ │ uniform vec4 u_darkArrowColor; │ │ │ │ uniform float u_outline; │ │ │ │ uniform float u_opacity; │ │ │ │ + const float kArrowVSize = 0.25; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -16094,17 +16080,29 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ + vec2 normal = a_normal.xy; │ │ │ │ vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ + if (dot(normal, normal) != 0.0) │ │ │ │ + vec2 norm = normal * u_trafficParams.x; │ │ │ │ + if (a_normal.z < 0.0) │ │ │ │ + norm = normal * u_trafficParams.y; │ │ │ │ + transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ + u_modelView, length(norm)); │ │ │ │ + float uOffset = length(vec4(kShapeCoordScalar, 0, 0, 0) * u_modelView) * a_normal.w; │ │ │ │ + v_colorTexCoord = a_colorTexCoord.xy; │ │ │ │ + float v = mix(a_colorTexCoord.z, a_colorTexCoord.z + kArrowVSize, 0.5 * a_normal.z + 0.5); │ │ │ │ + v_maskTexCoord = vec2(uOffset * u_trafficParams.z, v) * u_trafficParams.w; │ │ │ │ + v_maskTexCoord.x *= step(a_colorTexCoord.w, v_maskTexCoord.x); │ │ │ │ + v_halfLength = a_normal.z; │ │ │ │ vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ - v_colorTexCoord = a_colorTexCoord; │ │ │ │ gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ @@ -16113,24 +16111,23 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec4 a_normal; │ │ │ │ - in vec4 a_color; │ │ │ │ - out vec4 v_color; │ │ │ │ - uniform mat4 u_modelView; │ │ │ │ - uniform mat4 u_projection; │ │ │ │ - uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_params; │ │ │ │ - uniform float u_lineHalfWidth; │ │ │ │ - uniform float u_maxRadius; │ │ │ │ + in vec3 a_pos; │ │ │ │ + in vec3 a_normal; │ │ │ │ + in vec2 a_texCoords; │ │ │ │ + out vec3 v_normal; │ │ │ │ + out vec2 v_texCoords; │ │ │ │ + uniform mat4 u_transform; │ │ │ │ + uniform mat4 u_normalTransform; │ │ │ │ + uniform vec4 u_color; │ │ │ │ + uniform vec2 u_texCoordFlipping; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -16152,23 +16149,22 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 normal = a_normal.xy; │ │ │ │ - vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - if (dot(normal, normal) != 0.0) │ │ │ │ - vec2 norm = normal * u_lineHalfWidth; │ │ │ │ - transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ - u_modelView, length(norm)); │ │ │ │ - v_color = a_color; │ │ │ │ - vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + vec4 position = u_transform * vec4(a_pos, 1.0); │ │ │ │ + v_normal = normalize((u_normalTransform * vec4(a_normal, 0.0)).xyz); │ │ │ │ + v_texCoords = mix(a_texCoords, 1.0 - a_texCoords, u_texCoordFlipping); │ │ │ │ + gl_Position = position; │ │ │ │ + #ifdef VULKAN │ │ │ │ + gl_Position.y = -gl_Position.y; │ │ │ │ + gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; │ │ │ │ + #endif │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16177,24 +16173,25 @@ │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec3 a_position; │ │ │ │ - in vec4 a_normal; │ │ │ │ - in vec4 a_color; │ │ │ │ - out vec3 v_radius; │ │ │ │ - out vec4 v_color; │ │ │ │ + in vec2 a_colorTexCoord; │ │ │ │ + out vec2 v_colorTexCoord; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ - uniform vec4 u_params; │ │ │ │ - uniform float u_lineHalfWidth; │ │ │ │ - uniform float u_maxRadius; │ │ │ │ + uniform vec4 u_trafficParams; │ │ │ │ + uniform vec4 u_outlineColor; │ │ │ │ + uniform vec4 u_lightArrowColor; │ │ │ │ + uniform vec4 u_darkArrowColor; │ │ │ │ + uniform float u_outline; │ │ │ │ + uniform float u_opacity; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -16216,25 +16213,18 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 normal = a_normal.xy; │ │ │ │ vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - if (dot(normal, normal) != 0.0) │ │ │ │ - vec2 norm = normal * u_lineHalfWidth; │ │ │ │ - transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ - u_modelView, length(norm)); │ │ │ │ - transformedAxisPos += a_normal.zw * u_lineHalfWidth; │ │ │ │ vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ + v_colorTexCoord = a_colorTexCoord; │ │ │ │ gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ - v_color = a_color; │ │ │ │ - v_radius = vec3(a_normal.zw, u_maxRadius) * u_lineHalfWidth; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16245,15 +16235,14 @@ │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec3 a_position; │ │ │ │ in vec4 a_normal; │ │ │ │ in vec4 a_color; │ │ │ │ - out vec4 v_offsets; │ │ │ │ out vec4 v_color; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec4 u_params; │ │ │ │ uniform float u_lineHalfWidth; │ │ │ │ uniform float u_maxRadius; │ │ │ │ @@ -16282,23 +16271,23 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec4 pos = vec4(a_position.xy, 0, 1) * u_modelView; │ │ │ │ - vec2 normal = vec2(a_normal.x * u_params.x - a_normal.y * u_params.y, │ │ │ │ - a_normal.x * u_params.y + a_normal.y * u_params.x); │ │ │ │ - vec2 shiftedPos = normal * u_params.z + pos.xy; │ │ │ │ - pos = vec4(shiftedPos, a_position.z, 1.0) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ - vec2 offsets = abs(a_normal.zw); │ │ │ │ - v_offsets = vec4(a_normal.zw, offsets - 1.0); │ │ │ │ + vec2 normal = a_normal.xy; │ │ │ │ + vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ + if (dot(normal, normal) != 0.0) │ │ │ │ + vec2 norm = normal * u_lineHalfWidth; │ │ │ │ + transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm, │ │ │ │ + u_modelView, length(norm)); │ │ │ │ v_color = a_color; │ │ │ │ + vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ + gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16352,20 +16341,20 @@ │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ vec2 normal = a_normalAndAnimateOrZ.xy; │ │ │ │ if (a_normalAndAnimateOrZ.z > 0.0) │ │ │ │ normal = u_interpolation * normal; │ │ │ │ - vec4 p = vec4(a_position, 1.0) * u_modelView; │ │ │ │ - vec4 pos = vec4(normal, 0.0, 0.0) + p; │ │ │ │ - vec4 projectedPivot = p * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + vec4 pivot = vec4(a_position, 1.0) * u_modelView; │ │ │ │ + vec4 offset = vec4(normal, 0.0, 0.0) * u_projection; │ │ │ │ + vec4 projectedPivot = pivot * u_projection; │ │ │ │ + gl_Position = applyBillboardPivotTransform(projectedPivot, u_pivotTransform, 0.0, offset.xy); │ │ │ │ float newZ = projectedPivot.y / projectedPivot.w * 0.5 + 0.5; │ │ │ │ - gl_Position.z = abs(a_normalAndAnimateOrZ.z) * newZ + (1.0 - abs(a_normalAndAnimateOrZ.z)) * gl_Position.z; │ │ │ │ + gl_Position.z = abs(a_normalAndAnimateOrZ.z) * newZ + (1.0 - abs(a_normalAndAnimateOrZ.z)) * gl_Position.z; │ │ │ │ v_texCoords = a_texCoords; │ │ │ │ v_maskColor = a_color; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ @@ -16375,28 +16364,37 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec3 a_position; │ │ │ │ - in vec3 a_normalAndAnimateOrZ; │ │ │ │ - in vec4 a_texCoords; │ │ │ │ - in vec4 a_color; │ │ │ │ - out vec4 v_texCoords; │ │ │ │ - out vec4 v_maskColor; │ │ │ │ + in vec2 a_colorTexCoord; │ │ │ │ + in vec2 a_outlineColorTexCoord; │ │ │ │ + in vec2 a_maskTexCoord; │ │ │ │ + in vec4 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ + out vec2 v_colorTexCoord; │ │ │ │ + #endif │ │ │ │ + out vec2 v_maskTexCoord; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ uniform mat4 u_pivotTransform; │ │ │ │ uniform vec2 u_contrastGamma; │ │ │ │ uniform float u_opacity; │ │ │ │ uniform float u_zScale; │ │ │ │ uniform float u_interpolation; │ │ │ │ uniform float u_isOutlinePass; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + #endif │ │ │ │ + const float BaseDepthShift = -10.0; │ │ │ │ const float kShapeCoordScalar = 1000.0; │ │ │ │ vec4 applyPivotTransform(vec4 pivot, mat4 pivotTransform, float pivotRealZ) │ │ │ │ vec4 transformedPivot = pivot; │ │ │ │ float w = transformedPivot.w; │ │ │ │ transformedPivot.xyw = (pivotTransform * vec4(transformedPivot.xy, pivotRealZ, w)).xyw; │ │ │ │ transformedPivot.z *= transformedPivot.w / w; │ │ │ │ #ifdef VULKAN │ │ │ │ @@ -16418,25 +16416,27 @@ │ │ │ │ vec2 p = (vec4(shiftedPos, 0.0, 1.0) * modelView).xy; │ │ │ │ vec2 d = p - originalAxisPos; │ │ │ │ if (dot(d, d) != 0.0) │ │ │ │ return originalAxisPos + normalize(d) * halfWidth; │ │ │ │ else │ │ │ │ return originalAxisPos; │ │ │ │ void main() │ │ │ │ - vec2 normal = a_normalAndAnimateOrZ.xy; │ │ │ │ - if (a_normalAndAnimateOrZ.z > 0.0) │ │ │ │ - normal = u_interpolation * normal; │ │ │ │ - vec4 pivot = vec4(a_position, 1.0) * u_modelView; │ │ │ │ - vec4 offset = vec4(normal, 0.0, 0.0) * u_projection; │ │ │ │ - vec4 projectedPivot = pivot * u_projection; │ │ │ │ - gl_Position = applyBillboardPivotTransform(projectedPivot, u_pivotTransform, 0.0, offset.xy); │ │ │ │ - float newZ = projectedPivot.y / projectedPivot.w * 0.5 + 0.5; │ │ │ │ - gl_Position.z = abs(a_normalAndAnimateOrZ.z) * newZ + (1.0 - abs(a_normalAndAnimateOrZ.z)) * gl_Position.z; │ │ │ │ - v_texCoords = a_texCoords; │ │ │ │ - v_maskColor = a_color; │ │ │ │ + float isOutline = step(0.5, u_isOutlinePass); │ │ │ │ + float notOutline = 1.0 - isOutline; │ │ │ │ + float depthShift = BaseDepthShift * isOutline; │ │ │ │ + vec4 pos = (vec4(a_position.xyz, 1) + vec4(0.0, 0.0, depthShift, 0.0)) * u_modelView; │ │ │ │ + vec4 shiftedPos = vec4(a_normal, 0.0, 0.0) + pos; │ │ │ │ + gl_Position = applyPivotTransform(shiftedPos * u_projection, u_pivotTransform, 0.0); │ │ │ │ + vec2 colorTexCoord = a_colorTexCoord * notOutline + a_outlineColorTexCoord * isOutline; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + v_color = texture(u_colorTex, colorTexCoord); │ │ │ │ + #else │ │ │ │ + v_colorTexCoord = colorTexCoord; │ │ │ │ + #endif │ │ │ │ + v_maskTexCoord = a_maskTexCoord; │ │ │ │ *ZN2dp12DrapeRoutine3RunIZNS_6vulkan19VulkanObjectManager23CollectObjectsForThreadERSt6vectorINS2_12VulkanObjectESaIS5_EEEUlvE_EESt10shared_ptrINS0_6ResultEEOT_EUlvE_ │ │ │ │ N2dp18HWTextureAllocatorE │ │ │ │ N2dp14MeshObjectImplE │ │ │ │ N2dp6vulkan22VulkanTextureAllocatorE │ │ │ │ N2dp6vulkan13VulkanTextureE │ │ │ │ N2dp6vulkan20VulkanMeshObjectImplE │ │ │ │ N2dp21VertexArrayBufferImplE │ │ │ ├── objdump --line-numbers --disassemble --demangle --reloc --no-show-raw-insn --section=.text {} │ │ │ │ @@ -2386453,16 +2386453,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 688 │ │ │ │ bl -16588 │ │ │ │ ld.d $a2, $sp, 688 │ │ │ │ ld.d $a1, $sp, 664 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, -1344 │ │ │ │ - pcalau12i $a3, 790 │ │ │ │ - addi.d $a3, $a3, 1248 │ │ │ │ + pcalau12i $a3, 795 │ │ │ │ + addi.d $a3, $a3, 736 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1624 │ │ │ │ bl 47656 │ │ │ │ addi.d $t0, $sp, 1000 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1976 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386474,16 +2386474,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 736 │ │ │ │ bl -16672 │ │ │ │ ld.d $a2, $sp, 736 │ │ │ │ ld.d $a1, $sp, 712 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 96 │ │ │ │ - pcalau12i $a3, 807 │ │ │ │ - addi.d $a3, $a3, 1248 │ │ │ │ + pcalau12i $a3, 786 │ │ │ │ + addi.d $a3, $a3, 688 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1544 │ │ │ │ bl 47572 │ │ │ │ addi.d $t0, $sp, 1064 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1944 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386495,16 +2386495,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 784 │ │ │ │ bl -16756 │ │ │ │ ld.d $a2, $sp, 784 │ │ │ │ ld.d $a1, $sp, 760 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 960 │ │ │ │ - pcalau12i $a3, 794 │ │ │ │ - addi.d $a3, $a3, 848 │ │ │ │ + pcalau12i $a3, 787 │ │ │ │ + addi.d $a3, $a3, -1040 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1464 │ │ │ │ bl 47488 │ │ │ │ addi.d $t0, $sp, 1128 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1896 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386516,16 +2386516,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 832 │ │ │ │ bl -16840 │ │ │ │ ld.d $a2, $sp, 832 │ │ │ │ ld.d $a1, $sp, 808 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 1920 │ │ │ │ - pcalau12i $a3, 814 │ │ │ │ - addi.d $a3, $a3, -1152 │ │ │ │ + pcalau12i $a3, 787 │ │ │ │ + addi.d $a3, $a3, 1424 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1384 │ │ │ │ bl 47404 │ │ │ │ addi.d $t0, $sp, 1192 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1896 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386537,16 +2386537,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 880 │ │ │ │ bl -16924 │ │ │ │ ld.d $a2, $sp, 880 │ │ │ │ ld.d $a1, $sp, 856 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 1920 │ │ │ │ - pcalau12i $a3, 814 │ │ │ │ - addi.d $a3, $a3, -1152 │ │ │ │ + pcalau12i $a3, 787 │ │ │ │ + addi.d $a3, $a3, 1424 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1304 │ │ │ │ bl 47320 │ │ │ │ addi.d $t0, $sp, 1256 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1864 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386558,16 +2386558,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 48 │ │ │ │ bl -17008 │ │ │ │ ld.d $a2, $sp, 48 │ │ │ │ ld.d $a1, $sp, 8 │ │ │ │ pcalau12i $a4, 776 │ │ │ │ addi.d $a4, $a4, -1040 │ │ │ │ - pcalau12i $a3, 805 │ │ │ │ - addi.d $a3, $a3, 352 │ │ │ │ + pcalau12i $a3, 814 │ │ │ │ + addi.d $a3, $a3, 1408 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1224 │ │ │ │ bl 47236 │ │ │ │ addi.d $t0, $sp, 1320 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1824 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386579,16 +2386579,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 96 │ │ │ │ bl -17092 │ │ │ │ ld.d $a2, $sp, 96 │ │ │ │ ld.d $a1, $sp, 72 │ │ │ │ pcalau12i $a4, 776 │ │ │ │ addi.d $a4, $a4, -1040 │ │ │ │ - pcalau12i $a3, 804 │ │ │ │ - addi.d $a3, $a3, -992 │ │ │ │ + pcalau12i $a3, 793 │ │ │ │ + addi.d $a3, $a3, 656 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1144 │ │ │ │ bl 47152 │ │ │ │ addi.d $t0, $sp, 1384 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1808 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386600,16 +2386600,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 144 │ │ │ │ bl -17176 │ │ │ │ ld.d $a2, $sp, 144 │ │ │ │ ld.d $a1, $sp, 120 │ │ │ │ pcalau12i $a4, 776 │ │ │ │ addi.d $a4, $a4, 208 │ │ │ │ - pcalau12i $a3, 807 │ │ │ │ - addi.d $a3, $a3, -1776 │ │ │ │ + pcalau12i $a3, 805 │ │ │ │ + addi.d $a3, $a3, -1552 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1064 │ │ │ │ bl 47068 │ │ │ │ addi.d $t0, $sp, 1448 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1808 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386621,16 +2386621,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 192 │ │ │ │ bl -17260 │ │ │ │ ld.d $a2, $sp, 192 │ │ │ │ ld.d $a1, $sp, 168 │ │ │ │ pcalau12i $a4, 776 │ │ │ │ addi.d $a4, $a4, 208 │ │ │ │ - pcalau12i $a3, 807 │ │ │ │ - addi.d $a3, $a3, -1776 │ │ │ │ + pcalau12i $a3, 805 │ │ │ │ + addi.d $a3, $a3, -1552 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -984 │ │ │ │ bl 46984 │ │ │ │ addi.d $t0, $sp, 1512 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1760 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386642,16 +2386642,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 240 │ │ │ │ bl -17344 │ │ │ │ ld.d $a2, $sp, 240 │ │ │ │ ld.d $a1, $sp, 216 │ │ │ │ pcalau12i $a4, 776 │ │ │ │ addi.d $a4, $a4, 1424 │ │ │ │ - pcalau12i $a3, 785 │ │ │ │ - addi.d $a3, $a3, 1760 │ │ │ │ + pcalau12i $a3, 798 │ │ │ │ + addi.d $a3, $a3, 992 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -904 │ │ │ │ bl 46900 │ │ │ │ addi.d $t0, $sp, 1576 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1760 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386663,16 +2386663,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 288 │ │ │ │ bl -17428 │ │ │ │ ld.d $a2, $sp, 288 │ │ │ │ ld.d $a1, $sp, 264 │ │ │ │ pcalau12i $a4, 776 │ │ │ │ addi.d $a4, $a4, 1424 │ │ │ │ - pcalau12i $a3, 785 │ │ │ │ - addi.d $a3, $a3, 1760 │ │ │ │ + pcalau12i $a3, 798 │ │ │ │ + addi.d $a3, $a3, 992 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -824 │ │ │ │ bl 46816 │ │ │ │ addi.d $t0, $sp, 1640 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1728 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386684,16 +2386684,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 336 │ │ │ │ bl -17512 │ │ │ │ ld.d $a2, $sp, 336 │ │ │ │ ld.d $a1, $sp, 312 │ │ │ │ pcalau12i $a4, 777 │ │ │ │ addi.d $a4, $a4, -1648 │ │ │ │ - pcalau12i $a3, 786 │ │ │ │ - addi.d $a3, $a3, 176 │ │ │ │ + pcalau12i $a3, 794 │ │ │ │ + addi.d $a3, $a3, 1920 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -744 │ │ │ │ bl 46732 │ │ │ │ addi.d $t0, $sp, 1704 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1696 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386705,16 +2386705,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 384 │ │ │ │ bl -17596 │ │ │ │ ld.d $a2, $sp, 384 │ │ │ │ ld.d $a1, $sp, 360 │ │ │ │ pcalau12i $a4, 776 │ │ │ │ addi.d $a4, $a4, 1424 │ │ │ │ - pcalau12i $a3, 787 │ │ │ │ - addi.d $a3, $a3, -1008 │ │ │ │ + pcalau12i $a3, 794 │ │ │ │ + addi.d $a3, $a3, -752 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -664 │ │ │ │ bl 46648 │ │ │ │ addi.d $t0, $sp, 1768 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -656 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386726,16 +2386726,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 432 │ │ │ │ bl -17680 │ │ │ │ ld.d $a2, $sp, 432 │ │ │ │ ld.d $a1, $sp, 408 │ │ │ │ pcalau12i $a4, 777 │ │ │ │ addi.d $a4, $a4, -720 │ │ │ │ - pcalau12i $a3, 793 │ │ │ │ - addi.d $a3, $a3, 2032 │ │ │ │ + pcalau12i $a3, 796 │ │ │ │ + addi.d $a3, $a3, -704 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -584 │ │ │ │ bl 46564 │ │ │ │ addi.d $t0, $sp, 1832 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1672 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386747,16 +2386747,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 480 │ │ │ │ bl -17764 │ │ │ │ ld.d $a2, $sp, 480 │ │ │ │ ld.d $a1, $sp, 456 │ │ │ │ pcalau12i $a4, 777 │ │ │ │ addi.d $a4, $a4, 272 │ │ │ │ - pcalau12i $a3, 812 │ │ │ │ - addi.d $a3, $a3, 1712 │ │ │ │ + pcalau12i $a3, 808 │ │ │ │ + addi.d $a3, $a3, 2032 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -504 │ │ │ │ bl 46480 │ │ │ │ addi.d $t0, $sp, 1896 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1624 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386768,16 +2386768,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 528 │ │ │ │ bl -17848 │ │ │ │ ld.d $a2, $sp, 528 │ │ │ │ ld.d $a1, $sp, 504 │ │ │ │ pcalau12i $a4, 777 │ │ │ │ addi.d $a4, $a4, 1152 │ │ │ │ - pcalau12i $a3, 792 │ │ │ │ - addi.d $a3, $a3, -1584 │ │ │ │ + pcalau12i $a3, 803 │ │ │ │ + addi.d $a3, $a3, 1264 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -424 │ │ │ │ bl 46396 │ │ │ │ addi.d $t0, $sp, 1960 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1592 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386789,16 +2386789,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 560 │ │ │ │ bl -17932 │ │ │ │ ld.d $a2, $sp, 560 │ │ │ │ ld.d $a1, $sp, 544 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 96 │ │ │ │ - pcalau12i $a3, 796 │ │ │ │ - addi.d $a3, $a3, 352 │ │ │ │ + pcalau12i $a3, 788 │ │ │ │ + addi.d $a3, $a3, 96 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -344 │ │ │ │ bl 46312 │ │ │ │ addi.d $t0, $sp, 2024 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1760 │ │ │ │ move $a0, $t0 │ │ │ │ @@ -2386811,16 +2386811,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 592 │ │ │ │ bl -18020 │ │ │ │ ld.d $a2, $sp, 592 │ │ │ │ ld.d $a1, $sp, 576 │ │ │ │ pcalau12i $a4, 776 │ │ │ │ addi.d $a4, $a4, 1424 │ │ │ │ - pcalau12i $a3, 785 │ │ │ │ - addi.d $a3, $a3, 1760 │ │ │ │ + pcalau12i $a3, 798 │ │ │ │ + addi.d $a3, $a3, 992 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -264 │ │ │ │ bl 46224 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 41 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -608 │ │ │ │ @@ -2386834,16 +2386834,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 624 │ │ │ │ bl -18112 │ │ │ │ ld.d $a2, $sp, 624 │ │ │ │ ld.d $a1, $sp, 608 │ │ │ │ pcalau12i $a4, 778 │ │ │ │ addi.d $a4, $a4, -1968 │ │ │ │ - pcalau12i $a3, 789 │ │ │ │ - addi.d $a3, $a3, 288 │ │ │ │ + pcalau12i $a3, 810 │ │ │ │ + addi.d $a3, $a3, -1168 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -184 │ │ │ │ bl 46132 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 105 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1576 │ │ │ │ @@ -2386857,16 +2386857,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 656 │ │ │ │ bl -18204 │ │ │ │ ld.d $a2, $sp, 656 │ │ │ │ ld.d $a1, $sp, 640 │ │ │ │ pcalau12i $a4, 778 │ │ │ │ addi.d $a4, $a4, -640 │ │ │ │ - pcalau12i $a3, 792 │ │ │ │ - addi.d $a3, $a3, 1360 │ │ │ │ + pcalau12i $a3, 800 │ │ │ │ + addi.d $a3, $a3, 432 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -104 │ │ │ │ bl 46040 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 169 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1528 │ │ │ │ @@ -2386880,16 +2386880,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 704 │ │ │ │ bl -18296 │ │ │ │ ld.d $a2, $sp, 704 │ │ │ │ ld.d $a1, $sp, 680 │ │ │ │ pcalau12i $a4, 778 │ │ │ │ addi.d $a4, $a4, 464 │ │ │ │ - pcalau12i $a3, 808 │ │ │ │ - addi.d $a3, $a3, 1984 │ │ │ │ + pcalau12i $a3, 806 │ │ │ │ + addi.d $a3, $a3, 416 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -24 │ │ │ │ bl 45948 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 233 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1480 │ │ │ │ @@ -2386903,16 +2386903,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 752 │ │ │ │ bl -18388 │ │ │ │ ld.d $a2, $sp, 752 │ │ │ │ ld.d $a1, $sp, 728 │ │ │ │ pcalau12i $a4, 778 │ │ │ │ addi.d $a4, $a4, 1296 │ │ │ │ - pcalau12i $a3, 799 │ │ │ │ - addi.d $a3, $a3, 1888 │ │ │ │ + pcalau12i $a3, 801 │ │ │ │ + addi.d $a3, $a3, 1248 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 56 │ │ │ │ bl 45856 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 297 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1448 │ │ │ │ @@ -2386926,16 +2386926,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 800 │ │ │ │ bl -18480 │ │ │ │ ld.d $a2, $sp, 800 │ │ │ │ ld.d $a1, $sp, 776 │ │ │ │ pcalau12i $a4, 779 │ │ │ │ addi.d $a4, $a4, -1968 │ │ │ │ - pcalau12i $a3, 797 │ │ │ │ - addi.d $a3, $a3, -1152 │ │ │ │ + pcalau12i $a3, 804 │ │ │ │ + addi.d $a3, $a3, 112 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 136 │ │ │ │ bl 45764 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 361 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1400 │ │ │ │ @@ -2386949,16 +2386949,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 848 │ │ │ │ bl -18572 │ │ │ │ ld.d $a2, $sp, 848 │ │ │ │ ld.d $a1, $sp, 824 │ │ │ │ pcalau12i $a4, 779 │ │ │ │ addi.d $a4, $a4, -1968 │ │ │ │ - pcalau12i $a3, 795 │ │ │ │ - addi.d $a3, $a3, 1776 │ │ │ │ + pcalau12i $a3, 802 │ │ │ │ + addi.d $a3, $a3, -496 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 216 │ │ │ │ bl 45672 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 425 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1384 │ │ │ │ @@ -2386972,16 +2386972,16 @@ │ │ │ │ addi.d $fp, $sp, 2047 │ │ │ │ addi.d $a0, $a0, 457 │ │ │ │ addi.d $fp, $fp, 457 │ │ │ │ bl -18668 │ │ │ │ ld.d $a1, $sp, 872 │ │ │ │ pcalau12i $a4, 779 │ │ │ │ addi.d $a4, $a4, -1088 │ │ │ │ - pcalau12i $a3, 800 │ │ │ │ - addi.d $a3, $a3, 144 │ │ │ │ + pcalau12i $a3, 803 │ │ │ │ + addi.d $a3, $a3, -1920 │ │ │ │ move $a2, $fp │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 296 │ │ │ │ bl 45576 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 489 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ @@ -2386996,16 +2386996,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 64 │ │ │ │ bl -18760 │ │ │ │ ld.d $a2, $sp, 64 │ │ │ │ ld.d $a1, $sp, 40 │ │ │ │ pcalau12i $a4, 779 │ │ │ │ addi.d $a4, $a4, 64 │ │ │ │ - pcalau12i $a3, 812 │ │ │ │ - addi.d $a3, $a3, -896 │ │ │ │ + pcalau12i $a3, 813 │ │ │ │ + addi.d $a3, $a3, 80 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 376 │ │ │ │ bl 45484 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 553 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1304 │ │ │ │ @@ -2387019,16 +2387019,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 112 │ │ │ │ bl -18852 │ │ │ │ ld.d $a2, $sp, 112 │ │ │ │ ld.d $a1, $sp, 88 │ │ │ │ pcalau12i $a4, 779 │ │ │ │ addi.d $a4, $a4, 544 │ │ │ │ - pcalau12i $a3, 813 │ │ │ │ - addi.d $a3, $a3, 368 │ │ │ │ + pcalau12i $a3, 789 │ │ │ │ + addi.d $a3, $a3, -1408 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 456 │ │ │ │ bl 45392 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 617 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1256 │ │ │ │ @@ -2387042,16 +2387042,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 160 │ │ │ │ bl -18944 │ │ │ │ ld.d $a2, $sp, 160 │ │ │ │ ld.d $a1, $sp, 136 │ │ │ │ pcalau12i $a4, 779 │ │ │ │ addi.d $a4, $a4, 1424 │ │ │ │ - pcalau12i $a3, 797 │ │ │ │ - addi.d $a3, $a3, 1280 │ │ │ │ + pcalau12i $a3, 791 │ │ │ │ + addi.d $a3, $a3, -2000 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 536 │ │ │ │ bl 45300 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 681 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1256 │ │ │ │ @@ -2387065,16 +2387065,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 208 │ │ │ │ bl -19036 │ │ │ │ ld.d $a2, $sp, 208 │ │ │ │ ld.d $a1, $sp, 184 │ │ │ │ pcalau12i $a4, 780 │ │ │ │ addi.d $a4, $a4, -752 │ │ │ │ - pcalau12i $a3, 797 │ │ │ │ - addi.d $a3, $a3, 1280 │ │ │ │ + pcalau12i $a3, 791 │ │ │ │ + addi.d $a3, $a3, -2000 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 616 │ │ │ │ bl 45208 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 745 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1208 │ │ │ │ @@ -2387088,16 +2387088,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 256 │ │ │ │ bl -19128 │ │ │ │ ld.d $a2, $sp, 256 │ │ │ │ ld.d $a1, $sp, 232 │ │ │ │ pcalau12i $a4, 780 │ │ │ │ addi.d $a4, $a4, 928 │ │ │ │ - pcalau12i $a3, 798 │ │ │ │ - addi.d $a3, $a3, 256 │ │ │ │ + pcalau12i $a3, 810 │ │ │ │ + addi.d $a3, $a3, 1456 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 696 │ │ │ │ bl 45116 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 809 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1176 │ │ │ │ @@ -2387111,16 +2387111,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 304 │ │ │ │ bl -19220 │ │ │ │ ld.d $a2, $sp, 304 │ │ │ │ ld.d $a1, $sp, 280 │ │ │ │ pcalau12i $a4, 781 │ │ │ │ addi.d $a4, $a4, -1984 │ │ │ │ - pcalau12i $a3, 799 │ │ │ │ - addi.d $a3, $a3, -976 │ │ │ │ + pcalau12i $a3, 790 │ │ │ │ + addi.d $a3, $a3, -768 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 776 │ │ │ │ bl 45024 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 873 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1128 │ │ │ │ @@ -2387134,16 +2387134,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 352 │ │ │ │ bl -19312 │ │ │ │ ld.d $a2, $sp, 352 │ │ │ │ ld.d $a1, $sp, 328 │ │ │ │ pcalau12i $a4, 781 │ │ │ │ addi.d $a4, $a4, -528 │ │ │ │ - pcalau12i $a3, 790 │ │ │ │ - addi.d $a3, $a3, -1184 │ │ │ │ + pcalau12i $a3, 807 │ │ │ │ + addi.d $a3, $a3, 1120 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 856 │ │ │ │ bl 44932 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 937 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1896 │ │ │ │ @@ -2387157,16 +2387157,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 400 │ │ │ │ bl -19404 │ │ │ │ ld.d $a2, $sp, 400 │ │ │ │ ld.d $a1, $sp, 376 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 1920 │ │ │ │ - pcalau12i $a3, 814 │ │ │ │ - addi.d $a3, $a3, -1152 │ │ │ │ + pcalau12i $a3, 787 │ │ │ │ + addi.d $a3, $a3, 1424 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 936 │ │ │ │ bl 44840 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1001 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1896 │ │ │ │ @@ -2387180,16 +2387180,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 448 │ │ │ │ bl -19496 │ │ │ │ ld.d $a2, $sp, 448 │ │ │ │ ld.d $a1, $sp, 424 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 1920 │ │ │ │ - pcalau12i $a3, 814 │ │ │ │ - addi.d $a3, $a3, -1152 │ │ │ │ + pcalau12i $a3, 787 │ │ │ │ + addi.d $a3, $a3, 1424 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 1016 │ │ │ │ bl 44748 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1065 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -1080 │ │ │ │ @@ -2387249,16 +2387249,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 568 │ │ │ │ bl -19772 │ │ │ │ ld.d $a2, $sp, 568 │ │ │ │ ld.d $a1, $sp, 552 │ │ │ │ pcalau12i $a4, 782 │ │ │ │ addi.d $a4, $a4, 1456 │ │ │ │ - pcalau12i $a3, 787 │ │ │ │ - addi.d $a3, $a3, 1664 │ │ │ │ + pcalau12i $a3, 809 │ │ │ │ + addi.d $a3, $a3, 688 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 1256 │ │ │ │ bl 44472 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1257 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -984 │ │ │ │ @@ -2387272,16 +2387272,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 600 │ │ │ │ bl -19864 │ │ │ │ ld.d $a2, $sp, 600 │ │ │ │ ld.d $a1, $sp, 584 │ │ │ │ pcalau12i $a4, 783 │ │ │ │ addi.d $a4, $a4, -1872 │ │ │ │ - pcalau12i $a3, 788 │ │ │ │ - addi.d $a3, $a3, 2016 │ │ │ │ + pcalau12i $a3, 812 │ │ │ │ + addi.d $a3, $a3, -608 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 1336 │ │ │ │ bl 44380 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1321 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -936 │ │ │ │ @@ -2387295,16 +2387295,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 632 │ │ │ │ bl -19956 │ │ │ │ ld.d $a2, $sp, 632 │ │ │ │ ld.d $a1, $sp, 616 │ │ │ │ pcalau12i $a4, 783 │ │ │ │ addi.d $a4, $a4, -992 │ │ │ │ - pcalau12i $a3, 788 │ │ │ │ - addi.d $a3, $a3, -192 │ │ │ │ + pcalau12i $a3, 798 │ │ │ │ + addi.d $a3, $a3, -1216 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 1416 │ │ │ │ bl 44288 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1385 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -936 │ │ │ │ @@ -2387318,16 +2387318,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 672 │ │ │ │ bl -20048 │ │ │ │ ld.d $a2, $sp, 672 │ │ │ │ ld.d $a1, $sp, 648 │ │ │ │ pcalau12i $a4, 783 │ │ │ │ addi.d $a4, $a4, -352 │ │ │ │ - pcalau12i $a3, 788 │ │ │ │ - addi.d $a3, $a3, -192 │ │ │ │ + pcalau12i $a3, 798 │ │ │ │ + addi.d $a3, $a3, -1216 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 1496 │ │ │ │ bl 44196 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1449 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -864 │ │ │ │ @@ -2387341,16 +2387341,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 720 │ │ │ │ bl -20140 │ │ │ │ ld.d $a2, $sp, 720 │ │ │ │ ld.d $a1, $sp, 696 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, -1344 │ │ │ │ - pcalau12i $a3, 791 │ │ │ │ - addi.d $a3, $a3, -192 │ │ │ │ + pcalau12i $a3, 797 │ │ │ │ + addi.d $a3, $a3, -1888 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 1576 │ │ │ │ bl 44104 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1513 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -832 │ │ │ │ @@ -2387364,16 +2387364,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 768 │ │ │ │ bl -20232 │ │ │ │ ld.d $a2, $sp, 768 │ │ │ │ ld.d $a1, $sp, 744 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 96 │ │ │ │ - pcalau12i $a3, 808 │ │ │ │ - addi.d $a3, $a3, -480 │ │ │ │ + pcalau12i $a3, 793 │ │ │ │ + addi.d $a3, $a3, -1808 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 1656 │ │ │ │ bl 44012 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1577 │ │ │ │ pcalau12i $a1, 631 │ │ │ │ addi.d $a1, $a1, -808 │ │ │ │ @@ -2387387,16 +2387387,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 816 │ │ │ │ bl -20324 │ │ │ │ ld.d $a2, $sp, 816 │ │ │ │ ld.d $a1, $sp, 792 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, 960 │ │ │ │ - pcalau12i $a3, 795 │ │ │ │ - addi.d $a3, $a3, -784 │ │ │ │ + pcalau12i $a3, 791 │ │ │ │ + addi.d $a3, $a3, 1072 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, 1736 │ │ │ │ bl 43920 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1641 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ addi.d $a1, $a1, -776 │ │ │ │ @@ -2387411,15 +2387411,15 @@ │ │ │ │ st.d $t0, $sp, 864 │ │ │ │ bl -20416 │ │ │ │ ld.d $a2, $sp, 864 │ │ │ │ ld.d $a1, $sp, 840 │ │ │ │ pcalau12i $a4, 774 │ │ │ │ addi.d $a4, $a4, 1920 │ │ │ │ pcalau12i $a3, 813 │ │ │ │ - addi.d $a3, $a3, 1616 │ │ │ │ + addi.d $a3, $a3, -1408 │ │ │ │ pcalau12i $a0, 1378 │ │ │ │ addi.d $a0, $a0, 1816 │ │ │ │ bl 43828 │ │ │ │ addi.d $a0, $sp, 2047 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ addi.d $a1, $a1, -776 │ │ │ │ addi.d $a0, $a0, 1705 │ │ │ │ @@ -2387432,15 +2387432,15 @@ │ │ │ │ st.d $t0, $sp, 32 │ │ │ │ bl -20500 │ │ │ │ ld.d $a2, $sp, 32 │ │ │ │ addi.d $a1, $sp, 2047 │ │ │ │ pcalau12i $a4, 774 │ │ │ │ addi.d $a4, $a4, 1920 │ │ │ │ pcalau12i $a3, 813 │ │ │ │ - addi.d $a3, $a3, 1616 │ │ │ │ + addi.d $a3, $a3, -1408 │ │ │ │ addi.d $a1, $a1, 1705 │ │ │ │ pcalau12i $a0, 1378 │ │ │ │ addi.d $a0, $a0, 1896 │ │ │ │ bl 43740 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1769 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ @@ -2387456,15 +2387456,15 @@ │ │ │ │ st.d $t0, $sp, 80 │ │ │ │ bl -20596 │ │ │ │ ld.d $a2, $sp, 80 │ │ │ │ ld.d $a1, $sp, 56 │ │ │ │ pcalau12i $a4, 774 │ │ │ │ addi.d $a4, $a4, 1920 │ │ │ │ pcalau12i $a3, 813 │ │ │ │ - addi.d $a3, $a3, 1616 │ │ │ │ + addi.d $a3, $a3, -1408 │ │ │ │ pcalau12i $a0, 1378 │ │ │ │ addi.d $a0, $a0, 1976 │ │ │ │ bl 43648 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1833 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ addi.d $a1, $a1, -776 │ │ │ │ @@ -2387479,15 +2387479,15 @@ │ │ │ │ st.d $t0, $sp, 128 │ │ │ │ bl -20688 │ │ │ │ ld.d $a2, $sp, 128 │ │ │ │ ld.d $a1, $sp, 104 │ │ │ │ pcalau12i $a4, 774 │ │ │ │ addi.d $a4, $a4, 1920 │ │ │ │ pcalau12i $a3, 813 │ │ │ │ - addi.d $a3, $a3, 1616 │ │ │ │ + addi.d $a3, $a3, -1408 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -2040 │ │ │ │ bl 43556 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1897 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ addi.d $a1, $a1, -752 │ │ │ │ @@ -2387501,16 +2387501,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 176 │ │ │ │ bl -20780 │ │ │ │ ld.d $a2, $sp, 176 │ │ │ │ ld.d $a1, $sp, 152 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, -1040 │ │ │ │ - pcalau12i $a3, 805 │ │ │ │ - addi.d $a3, $a3, -720 │ │ │ │ + pcalau12i $a3, 804 │ │ │ │ + addi.d $a3, $a3, 1472 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1960 │ │ │ │ bl 43464 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 1961 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ addi.d $a1, $a1, -720 │ │ │ │ @@ -2387524,16 +2387524,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 224 │ │ │ │ bl -20872 │ │ │ │ ld.d $a2, $sp, 224 │ │ │ │ ld.d $a1, $sp, 200 │ │ │ │ pcalau12i $a4, 775 │ │ │ │ addi.d $a4, $a4, -1040 │ │ │ │ - pcalau12i $a3, 803 │ │ │ │ - addi.d $a3, $a3, 1696 │ │ │ │ + pcalau12i $a3, 791 │ │ │ │ + addi.d $a3, $a3, -464 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1880 │ │ │ │ bl 43372 │ │ │ │ addi.d $t0, $sp, 2047 │ │ │ │ addi.d $t0, $t0, 2025 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ addi.d $a1, $a1, -696 │ │ │ │ @@ -2387548,16 +2387548,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 272 │ │ │ │ bl -20968 │ │ │ │ ld.d $a2, $sp, 272 │ │ │ │ ld.d $a1, $sp, 248 │ │ │ │ pcalau12i $a4, 782 │ │ │ │ addi.d $a4, $a4, 320 │ │ │ │ - pcalau12i $a3, 809 │ │ │ │ - addi.d $a3, $a3, -1408 │ │ │ │ + pcalau12i $a3, 810 │ │ │ │ + addi.d $a3, $a3, 224 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1800 │ │ │ │ bl 43276 │ │ │ │ lu12i.w $t0, 1 │ │ │ │ ori $t0, $t0, 0x28 │ │ │ │ add.d $t0, $sp, $t0 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ @@ -2387573,16 +2387573,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 320 │ │ │ │ bl -21068 │ │ │ │ ld.d $a2, $sp, 320 │ │ │ │ ld.d $a1, $sp, 296 │ │ │ │ pcalau12i $a4, 782 │ │ │ │ addi.d $a4, $a4, 2016 │ │ │ │ - pcalau12i $a3, 810 │ │ │ │ - addi.d $a3, $a3, 784 │ │ │ │ + pcalau12i $a3, 811 │ │ │ │ + addi.d $a3, $a3, 1760 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1720 │ │ │ │ bl 43176 │ │ │ │ lu12i.w $t0, 1 │ │ │ │ ori $t0, $t0, 0x68 │ │ │ │ add.d $t0, $sp, $t0 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ @@ -2387598,16 +2387598,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 368 │ │ │ │ bl -21168 │ │ │ │ ld.d $a2, $sp, 368 │ │ │ │ ld.d $a1, $sp, 344 │ │ │ │ pcalau12i $a4, 783 │ │ │ │ addi.d $a4, $a4, -1200 │ │ │ │ - pcalau12i $a3, 809 │ │ │ │ - addi.d $a3, $a3, 1856 │ │ │ │ + pcalau12i $a3, 784 │ │ │ │ + addi.d $a3, $a3, 1760 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1640 │ │ │ │ bl 43076 │ │ │ │ lu12i.w $t0, 1 │ │ │ │ ori $t0, $t0, 0xa8 │ │ │ │ add.d $t0, $sp, $t0 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ @@ -2387623,16 +2387623,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 416 │ │ │ │ bl -21268 │ │ │ │ ld.d $a2, $sp, 416 │ │ │ │ ld.d $a1, $sp, 392 │ │ │ │ pcalau12i $a4, 783 │ │ │ │ addi.d $a4, $a4, 48 │ │ │ │ - pcalau12i $a3, 808 │ │ │ │ - addi.d $a3, $a3, 192 │ │ │ │ + pcalau12i $a3, 806 │ │ │ │ + addi.d $a3, $a3, -1376 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1560 │ │ │ │ bl 42976 │ │ │ │ lu12i.w $t0, 1 │ │ │ │ ori $t0, $t0, 0xe8 │ │ │ │ add.d $t0, $sp, $t0 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ @@ -2387648,16 +2387648,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 464 │ │ │ │ bl -21368 │ │ │ │ ld.d $a2, $sp, 464 │ │ │ │ ld.d $a1, $sp, 440 │ │ │ │ pcalau12i $a4, 783 │ │ │ │ addi.d $a4, $a4, 592 │ │ │ │ - pcalau12i $a3, 808 │ │ │ │ - addi.d $a3, $a3, 192 │ │ │ │ + pcalau12i $a3, 806 │ │ │ │ + addi.d $a3, $a3, -1376 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1480 │ │ │ │ bl 42876 │ │ │ │ lu12i.w $t0, 1 │ │ │ │ ori $t0, $t0, 0x128 │ │ │ │ add.d $t0, $sp, $t0 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ @@ -2387673,16 +2387673,16 @@ │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 512 │ │ │ │ bl -21468 │ │ │ │ ld.d $a2, $sp, 512 │ │ │ │ ld.d $a1, $sp, 488 │ │ │ │ pcalau12i $a4, 783 │ │ │ │ addi.d $a4, $a4, 1152 │ │ │ │ - pcalau12i $a3, 802 │ │ │ │ - addi.d $a3, $a3, -1264 │ │ │ │ + pcalau12i $a3, 800 │ │ │ │ + addi.d $a3, $a3, -1056 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1400 │ │ │ │ bl 42776 │ │ │ │ lu12i.w $t0, 1 │ │ │ │ ori $t0, $t0, 0x168 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ addi.d $a1, $a1, -456 │ │ │ │ @@ -2387695,18 +2387695,18 @@ │ │ │ │ add.d $t0, $sp, $t0 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ addi.d $a1, $a1, -424 │ │ │ │ move $a0, $t0 │ │ │ │ st.d $t0, $sp, 16 │ │ │ │ bl -21568 │ │ │ │ ld.d $a2, $sp, 16 │ │ │ │ - pcalau12i $a4, 800 │ │ │ │ - addi.d $a4, $a4, -768 │ │ │ │ - pcalau12i $a3, 801 │ │ │ │ - addi.d $a3, $a3, 256 │ │ │ │ + pcalau12i $a4, 798 │ │ │ │ + addi.d $a4, $a4, -592 │ │ │ │ + pcalau12i $a3, 807 │ │ │ │ + addi.d $a3, $a3, -544 │ │ │ │ move $a1, $s7 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1320 │ │ │ │ bl 42676 │ │ │ │ lu12i.w $t0, 1 │ │ │ │ ori $t0, $t0, 0x1a8 │ │ │ │ add.d $t0, $sp, $t0 │ │ │ │ @@ -2387722,16 +2387722,16 @@ │ │ │ │ add.d $a0, $sp, $t0 │ │ │ │ stptr.d $s5, $sp, 4688 │ │ │ │ add.d $s5, $sp, $t0 │ │ │ │ bl -21668 │ │ │ │ ld.d $a1, $sp, 24 │ │ │ │ pcalau12i $a4, 784 │ │ │ │ addi.d $a4, $a4, -1104 │ │ │ │ - pcalau12i $a3, 802 │ │ │ │ - addi.d $a3, $a3, 1040 │ │ │ │ + pcalau12i $a3, 796 │ │ │ │ + addi.d $a3, $a3, 816 │ │ │ │ move $a2, $s5 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1240 │ │ │ │ bl 42576 │ │ │ │ lu12i.w $t0, 1 │ │ │ │ ori $t0, $t0, 0x1e8 │ │ │ │ pcalau12i $a1, 630 │ │ │ │ @@ -2387748,16 +2387748,16 @@ │ │ │ │ addi.d $a1, $a1, -344 │ │ │ │ move $a0, $s2 │ │ │ │ stptr.d $s8, $sp, 4664 │ │ │ │ move $s8, $s2 │ │ │ │ bl -21776 │ │ │ │ pcalau12i $a4, 784 │ │ │ │ addi.d $a4, $a4, 528 │ │ │ │ - pcalau12i $a3, 792 │ │ │ │ - addi.d $a3, $a3, -128 │ │ │ │ + pcalau12i $a3, 788 │ │ │ │ + addi.d $a3, $a3, 1168 │ │ │ │ move $a2, $s2 │ │ │ │ move $a1, $s6 │ │ │ │ pcalau12i $a0, 1379 │ │ │ │ addi.d $a0, $a0, -1160 │ │ │ │ bl 42468 │ │ │ │ pcalau12i $a2, 1370 │ │ │ │ addi.d $a2, $a2, 712 │ │ │ │ @@ -2751177,15 +2751177,15 @@ │ │ │ │ move $a0, $s0 │ │ │ │ ldptr.d $s0, $sp, 0 │ │ │ │ addi.d $sp, $sp, 16 │ │ │ │ ret │ │ │ │ nop │ │ │ │ nop │ │ │ │ lu12i.w $a0, 63 │ │ │ │ - ori $a0, $a0, 0x932 │ │ │ │ + ori $a0, $a0, 0xb2c │ │ │ │ ret │ │ │ │ nop │ │ │ │ beqz $a0, 64 │ │ │ │ ldptr.d $t2, $a0, 0 │ │ │ │ pcaddi $t1, -4702 │ │ │ │ ld.d $t2, $t2, 32 │ │ │ │ bne $t2, $t1, 80 │ │ │ ├── readelf --wide --decompress --hex-dump=.rodata {} │ │ │ │ @@ -20086,16 +20086,16 @@ │ │ │ │ 0x00c1c5b0 5d7d0000 00000000 50656e64 696e6750 ]}......PendingP │ │ │ │ 0x00c1c5c0 6f736974 696f6e00 4e6f7446 6f6c6c6f osition.NotFollo │ │ │ │ 0x00c1c5d0 77000000 00000000 4e6f7446 6f6c6c6f w.......NotFollo │ │ │ │ 0x00c1c5e0 774e6f50 6f736974 696f6e00 00000000 wNoPosition..... │ │ │ │ 0x00c1c5f0 466f6c6c 6f770000 466f6c6c 6f77416e Follow..FollowAn │ │ │ │ 0x00c1c600 64526f74 61746500 50656e64 696e6700 dRotate.Pending. │ │ │ │ 0x00c1c610 53414a53 414a0000 46414641 46410000 SAJSAJ..FAFAFA.. │ │ │ │ - 0x00c1c620 25456300 00000000 32303236 2e30342e %Ec.....2026.04. │ │ │ │ - 0x00c1c630 30322d30 2d303030 30303030 302d4c69 02-0-00000000-Li │ │ │ │ + 0x00c1c620 25456300 00000000 32303236 2e30392e %Ec.....2026.09. │ │ │ │ + 0x00c1c630 30382d30 2d303030 30303030 302d4c69 08-0-00000000-Li │ │ │ │ 0x00c1c640 6e757800 00000000 3136322e 35352e31 nux.....162.55.1 │ │ │ │ 0x00c1c650 30302e31 36390000 436f7272 75707465 00.169..Corrupte │ │ │ │ 0x00c1c660 644d776d 46696c65 202e2f6c 6962732f dMwmFile ./libs/ │ │ │ │ 0x00c1c670 706c6174 666f726d 2f6d776d 5f766572 platform/mwm_ver │ │ │ │ 0x00c1c680 73696f6e 2e637070 3a333200 00000000 sion.cpp:32..... │ │ │ │ 0x00c1c690 494f2065 78636570 74696f6e 00000000 IO exception.... │ │ │ │ 0x00c1c6a0 57726974 65206578 63657074 696f6e00 Write exception. │ │ │ │ @@ -56983,7584 +56983,7584 @@ │ │ │ │ 0x00cac7c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ 0x00cac7d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ 0x00cac7e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ 0x00cac7f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ 0x00cac800 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ 0x00cac810 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ 0x00cac820 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cac830 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cac840 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00cac850 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ - 0x00cac860 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ - 0x00cac870 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ - 0x00cac880 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ - 0x00cac890 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ - 0x00cac8a0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x00cac8b0 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ - 0x00cac8c0 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ - 0x00cac8d0 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ - 0x00cac8e0 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ - 0x00cac8f0 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ - 0x00cac900 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ - 0x00cac910 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x00cac920 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ - 0x00cac930 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ - 0x00cac940 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ - 0x00cac950 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ - 0x00cac960 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ - 0x00cac970 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cac980 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ - 0x00cac990 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ - 0x00cac9a0 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ - 0x00cac9b0 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ - 0x00cac9c0 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ - 0x00cac9d0 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ - 0x00cac9e0 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ - 0x00cac9f0 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ - 0x00caca00 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00caca10 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00caca20 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00caca30 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00caca40 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00caca50 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00caca60 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00caca70 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00caca80 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00caca90 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00cacaa0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00cacab0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00cacac0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cacad0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x00cacae0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x00cacaf0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cacb00 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00cacb10 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00cacb20 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00cacb30 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00cacb40 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00cacb50 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00cacb60 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cacb70 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00cacb80 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00cacb90 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cacba0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x00cacbb0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x00cacbc0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x00cacbd0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00cacbe0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x00cacbf0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x00cacc00 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00cacc10 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00cacc20 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00cacc30 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00cacc40 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00cacc50 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00cacc60 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00cacc70 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00cacc80 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00cacc90 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00cacca0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00caccb0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00caccc0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x00caccd0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x00cacce0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x00caccf0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x00cacd00 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cacd10 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00cacd20 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00cacd30 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00cacd40 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cacd50 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00cacd60 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00cacd70 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00cacd80 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00cacd90 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00cacda0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00cacdb0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x00cacdc0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x00cacdd0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x00cacde0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x00cacdf0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x00cace00 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cace10 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cace20 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00cace30 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00cace40 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00cace50 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00cace60 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00cace70 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00cace80 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00cace90 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00cacea0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x00caceb0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x00cacec0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x00caced0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00cacee0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x00cacef0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cacf00 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00cacf10 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00cacf20 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00cacf30 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00cacf40 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00cacf50 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00cacf60 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00cacf70 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00cacf80 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00cacf90 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ - 0x00cacfa0 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ - 0x00cacfb0 696f6e2c 20312920 2a20755f 6d6f6465 ion, 1) * u_mode │ │ │ │ - 0x00cacfc0 6c566965 77202a20 755f7072 6f6a6563 lView * u_projec │ │ │ │ - 0x00cacfd0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ - 0x00cacfe0 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ - 0x00cacff0 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ - 0x00cad000 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ - 0x00cad010 726d2c20 302e3029 3b200a20 20236966 rm, 0.0); . #if │ │ │ │ - 0x00cad020 64656620 454e4142 4c455f56 5446200a def ENABLE_VTF . │ │ │ │ - 0x00cad030 20202020 765f636f 6c6f7220 3d207465 v_color = te │ │ │ │ - 0x00cad040 78747572 6528755f 636f6c6f 72546578 xture(u_colorTex │ │ │ │ - 0x00cad050 2c20615f 636f6c6f 72546578 436f6f72 , a_colorTexCoor │ │ │ │ - 0x00cad060 6473293b 200a2020 23656c73 65200a20 ds); . #else . │ │ │ │ - 0x00cad070 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00cad080 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ - 0x00cad090 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ - 0x00cad0a0 66200a20 207d200a 00000000 00000000 f . } ......... │ │ │ │ - 0x00cad0b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cad0c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cad0d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cad0e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cad0f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cad100 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cad110 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cad120 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cad130 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cad140 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cad150 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cad160 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cad170 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cad180 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cad190 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cad1a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cad1b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cad1c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cad1d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cad1e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cad1f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cad200 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cad210 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00cad220 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cad230 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cad240 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00cad250 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00cad260 20206f75 7420666c 6f617420 765f696e out float v_in │ │ │ │ - 0x00cad270 74656e73 6974793b 200a2020 756e6966 tensity; . unif │ │ │ │ - 0x00cad280 6f726d20 6d617434 20755f6d 6f64656c orm mat4 u_model │ │ │ │ - 0x00cad290 56696577 3b200a20 20756e69 666f726d View; . uniform │ │ │ │ - 0x00cad2a0 206d6174 3420755f 70726f6a 65637469 mat4 u_projecti │ │ │ │ - 0x00cad2b0 6f6e3b20 0a202075 6e69666f 726d206d on; . uniform m │ │ │ │ - 0x00cad2c0 61743420 755f7069 766f7454 72616e73 at4 u_pivotTrans │ │ │ │ - 0x00cad2d0 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ - 0x00cad2e0 20766563 3220755f 636f6e74 72617374 vec2 u_contrast │ │ │ │ - 0x00cad2f0 47616d6d 613b200a 2020756e 69666f72 Gamma; . unifor │ │ │ │ - 0x00cad300 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00cad310 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ - 0x00cad320 6f617420 755f7a53 63616c65 3b200a20 oat u_zScale; . │ │ │ │ - 0x00cad330 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00cad340 5f696e74 6572706f 6c617469 6f6e3b20 _interpolation; │ │ │ │ - 0x00cad350 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x00cad360 20755f69 734f7574 6c696e65 50617373 u_isOutlinePass │ │ │ │ - 0x00cad370 3b200a20 20636f6e 73742076 65633420 ; . const vec4 │ │ │ │ - 0x00cad380 6b4e6f72 6d616c69 7a65644c 69676874 kNormalizedLight │ │ │ │ - 0x00cad390 44697220 3d207665 63342830 2e333136 Dir = vec4(0.316 │ │ │ │ - 0x00cad3a0 322c2030 2e302c20 302e3934 38362c20 2, 0.0, 0.9486, │ │ │ │ - 0x00cad3b0 302e3029 3b200a20 20636f6e 73742066 0.0); . const f │ │ │ │ - 0x00cad3c0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00cad3d0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00cad3e0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00cad3f0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00cad400 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00cad410 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00cad420 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00cad430 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00cad440 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00cad450 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00cad460 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00cad470 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00cad480 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cad490 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x00cad4a0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x00cad4b0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cad4c0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00cad4d0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00cad4e0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00cad4f0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00cad500 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00cad510 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00cad520 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cad530 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00cad540 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00cad550 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cad560 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x00cad570 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x00cad580 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x00cad590 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00cad5a0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x00cad5b0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x00cad5c0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00cad5d0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00cad5e0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00cad5f0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00cad600 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00cad610 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00cad620 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00cad630 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00cad640 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00cad650 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00cad660 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cad670 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00cad680 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x00cad690 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x00cad6a0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x00cad6b0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x00cad6c0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cad6d0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00cad6e0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00cad6f0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00cad700 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cad710 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00cad720 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00cad730 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00cad740 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00cad750 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00cad760 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00cad770 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x00cad780 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x00cad790 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x00cad7a0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x00cad7b0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x00cad7c0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cad7d0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cad7e0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00cad7f0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00cad800 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00cad810 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00cad820 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00cad830 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00cad840 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00cad850 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00cad860 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x00cad870 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x00cad880 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x00cad890 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00cad8a0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x00cad8b0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cad8c0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00cad8d0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00cad8e0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00cad8f0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00cad900 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00cad910 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00cad920 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00cad930 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00cad940 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00cad950 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ - 0x00cad960 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ - 0x00cad970 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ - 0x00cad980 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ - 0x00cad990 6334206e 6f726d61 6c203d20 76656334 c4 normal = vec4 │ │ │ │ - 0x00cad9a0 28615f70 6f736974 696f6e20 2b20615f (a_position + a_ │ │ │ │ - 0x00cad9b0 6e6f726d 616c2c20 312e3029 202a2075 normal, 1.0) * u │ │ │ │ - 0x00cad9c0 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ - 0x00cad9d0 206e6f72 6d616c2e 78797720 3d20286e normal.xyw = (n │ │ │ │ - 0x00cad9e0 6f726d61 6c202a20 755f7072 6f6a6563 ormal * u_projec │ │ │ │ - 0x00cad9f0 74696f6e 292e7879 773b200a 20202020 tion).xyw; . │ │ │ │ - 0x00cada00 6e6f726d 616c2e7a 203d206e 6f726d61 normal.z = norma │ │ │ │ - 0x00cada10 6c2e7a20 2a20755f 7a536361 6c653b20 l.z * u_zScale; │ │ │ │ - 0x00cada20 0a202020 20706f73 2e787977 203d2028 . pos.xyw = ( │ │ │ │ - 0x00cada30 706f7320 2a20755f 70726f6a 65637469 pos * u_projecti │ │ │ │ - 0x00cada40 6f6e292e 7879773b 200a2020 2020706f on).xyw; . po │ │ │ │ - 0x00cada50 732e7a20 3d20615f 706f7369 74696f6e s.z = a_position │ │ │ │ - 0x00cada60 2e7a202a 20755f7a 5363616c 653b200a .z * u_zScale; . │ │ │ │ - 0x00cada70 20202020 76656334 206e6f72 6d446972 vec4 normDir │ │ │ │ - 0x00cada80 203d206e 6f726d61 6c202d20 706f733b = normal - pos; │ │ │ │ - 0x00cada90 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x00cadaa0 726d4469 722c206e 6f726d44 69722920 rmDir, normDir) │ │ │ │ - 0x00cadab0 213d2030 2e302920 0a202020 20202076 != 0.0) . v │ │ │ │ - 0x00cadac0 5f696e74 656e7369 7479203d 206d6178 _intensity = max │ │ │ │ - 0x00cadad0 28302e30 2c202d64 6f74286b 4e6f726d (0.0, -dot(kNorm │ │ │ │ - 0x00cadae0 616c697a 65644c69 67687444 69722c20 alizedLightDir, │ │ │ │ - 0x00cadaf0 6e6f726d 616c697a 65286e6f 726d4469 normalize(normDi │ │ │ │ - 0x00cadb00 72292929 3b200a20 20202065 6c736520 r))); . else │ │ │ │ - 0x00cadb10 0a202020 20202076 5f696e74 656e7369 . v_intensi │ │ │ │ - 0x00cadb20 7479203d 20302e30 3b200a20 20202067 ty = 0.0; . g │ │ │ │ - 0x00cadb30 6c5f506f 73697469 6f6e203d 20755f70 l_Position = u_p │ │ │ │ - 0x00cadb40 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00cadb50 706f733b 200a2020 23696664 65662056 pos; . #ifdef V │ │ │ │ - 0x00cadb60 554c4b41 4e200a20 20202067 6c5f506f ULKAN . gl_Po │ │ │ │ - 0x00cadb70 73697469 6f6e2e79 203d202d 676c5f50 sition.y = -gl_P │ │ │ │ - 0x00cadb80 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x00cadb90 676c5f50 6f736974 696f6e2e 7a203d20 gl_Position.z = │ │ │ │ - 0x00cadba0 28676c5f 506f7369 74696f6e 2e7a2020 (gl_Position.z │ │ │ │ - 0x00cadbb0 2b20676c 5f506f73 6974696f 6e2e7729 + gl_Position.w) │ │ │ │ - 0x00cadbc0 202a2030 2e353b20 0a202023 656e6469 * 0.5; . #endi │ │ │ │ - 0x00cadbd0 66200a20 20202076 5f636f6c 6f725465 f . v_colorTe │ │ │ │ - 0x00cadbe0 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ - 0x00cadbf0 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ - 0x00cadc00 200a0000 00000000 00000000 00000000 ............... │ │ │ │ - 0x00cadc10 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cadc20 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cadc30 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cadc40 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cadc50 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cadc60 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cadc70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cadc80 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cadc90 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cadca0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cadcb0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cadcc0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cadcd0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cadce0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cadcf0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cadd00 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cadd10 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cadd20 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cadd30 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cadd40 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cadd50 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cadd60 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cadd70 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00cadd80 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ - 0x00cadd90 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ - 0x00cadda0 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ - 0x00caddb0 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ - 0x00caddc0 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ - 0x00caddd0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x00cadde0 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ - 0x00caddf0 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ - 0x00cade00 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ - 0x00cade10 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ - 0x00cade20 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ - 0x00cade30 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ - 0x00cade40 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x00cade50 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ - 0x00cade60 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ - 0x00cade70 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ - 0x00cade80 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ - 0x00cade90 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ - 0x00cadea0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cadeb0 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ - 0x00cadec0 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ - 0x00caded0 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ - 0x00cadee0 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ - 0x00cadef0 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ - 0x00cadf00 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ - 0x00cadf10 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ - 0x00cadf20 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ - 0x00cadf30 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00cadf40 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00cadf50 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00cadf60 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00cadf70 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00cadf80 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00cadf90 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00cadfa0 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00cadfb0 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00cadfc0 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00cadfd0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00cadfe0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00cadff0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cae000 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x00cae010 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x00cae020 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cae030 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00cae040 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00cae050 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00cae060 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00cae070 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00cae080 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00cae090 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cae0a0 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00cae0b0 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00cae0c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cae0d0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x00cae0e0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x00cae0f0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x00cae100 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00cae110 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x00cae120 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x00cae130 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00cae140 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00cae150 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00cae160 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00cae170 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00cae180 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00cae190 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00cae1a0 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00cae1b0 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00cae1c0 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00cae1d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cae1e0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00cae1f0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x00cae200 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x00cae210 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x00cae220 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x00cae230 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cae240 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00cae250 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00cae260 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00cae270 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cae280 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00cae290 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00cae2a0 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00cae2b0 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00cae2c0 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00cae2d0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00cae2e0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x00cae2f0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x00cae300 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x00cae310 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x00cae320 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x00cae330 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cae340 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cae350 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00cae360 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00cae370 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00cae380 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00cae390 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00cae3a0 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00cae3b0 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00cae3c0 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00cae3d0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x00cae3e0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x00cae3f0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x00cae400 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00cae410 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x00cae420 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cae430 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00cae440 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00cae450 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00cae460 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00cae470 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00cae480 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00cae490 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00cae4a0 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00cae4b0 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00cae4c0 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ - 0x00cae4d0 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ - 0x00cae4e0 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ - 0x00cae4f0 64656c56 6965773b 200a2020 2020706f delView; . po │ │ │ │ - 0x00cae500 732e7879 77203d20 28706f73 202a2075 s.xyw = (pos * u │ │ │ │ - 0x00cae510 5f70726f 6a656374 696f6e29 2e787977 _projection).xyw │ │ │ │ - 0x00cae520 3b200a20 20202070 6f732e7a 203d2061 ; . pos.z = a │ │ │ │ - 0x00cae530 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ - 0x00cae540 7a536361 6c653b20 0a202020 20676c5f zScale; . gl_ │ │ │ │ - 0x00cae550 506f7369 74696f6e 203d2075 5f706976 Position = u_piv │ │ │ │ - 0x00cae560 6f745472 616e7366 6f726d20 2a20706f otTransform * po │ │ │ │ - 0x00cae570 733b200a 20202369 66646566 2056554c s; . #ifdef VUL │ │ │ │ - 0x00cae580 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ - 0x00cae590 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ - 0x00cae5a0 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ - 0x00cae5b0 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ - 0x00cae5c0 6c5f506f 73697469 6f6e2e7a 20202b20 l_Position.z + │ │ │ │ - 0x00cae5d0 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ - 0x00cae5e0 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ - 0x00cae5f0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00cae600 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ - 0x00cae610 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ - 0x00cae620 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ - 0x00cae630 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ - 0x00cae640 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ - 0x00cae650 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ - 0x00cae660 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x00cae670 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ - 0x00cae680 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cae690 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cae6a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cae6b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cae6c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cae6d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cae6e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cae6f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cae700 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cae710 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cae720 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cae730 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cae740 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cae750 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cae760 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cae770 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cae780 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cae790 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cae7a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cae7b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cae7c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cae7d0 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x00cae7e0 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ - 0x00cae7f0 20206f75 74207665 63332076 5f6e6f72 out vec3 v_nor │ │ │ │ - 0x00cae800 6d616c3b 200a2020 756e6966 6f726d20 mal; . uniform │ │ │ │ - 0x00cae810 6d617434 20755f74 72616e73 666f726d mat4 u_transform │ │ │ │ - 0x00cae820 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00cae830 3420755f 6e6f726d 616c5472 616e7366 4 u_normalTransf │ │ │ │ - 0x00cae840 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cae850 76656334 20755f63 6f6c6f72 3b200a20 vec4 u_color; . │ │ │ │ - 0x00cae860 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x00cae870 74657843 6f6f7264 466c6970 70696e67 texCoordFlipping │ │ │ │ - 0x00cae880 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00cae890 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00cae8a0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00cae8b0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00cae8c0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00cae8d0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00cae8e0 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00cae8f0 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00cae900 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cae910 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cae920 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x00cae930 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x00cae940 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x00cae950 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00cae960 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x00cae970 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00cae980 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00cae990 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00cae9a0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00cae9b0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00cae9c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cae9d0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00cae9e0 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00cae9f0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00caea00 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x00caea10 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x00caea20 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00caea30 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x00caea40 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x00caea50 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x00caea60 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00caea70 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x00caea80 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x00caea90 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x00caeaa0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00caeab0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00caeac0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00caead0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00caeae0 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00caeaf0 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00caeb00 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x00caeb10 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x00caeb20 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x00caeb30 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00caeb40 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00caeb50 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x00caeb60 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x00caeb70 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x00caeb80 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x00caeb90 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x00caeba0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x00caebb0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x00caebc0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x00caebd0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00caebe0 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x00caebf0 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x00caec00 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x00caec10 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x00caec20 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x00caec30 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00caec40 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x00caec50 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x00caec60 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x00caec70 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x00caec80 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x00caec90 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x00caeca0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x00caecb0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x00caecc0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x00caecd0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x00caece0 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x00caecf0 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x00caed00 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x00caed10 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x00caed20 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x00caed30 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x00caed40 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x00caed50 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x00caed60 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x00caed70 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x00caed80 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x00caed90 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x00caeda0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x00caedb0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00caedc0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x00caedd0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x00caede0 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x00caedf0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00caee00 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x00caee10 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x00caee20 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x00caee30 6f6e203d 20755f74 72616e73 666f726d on = u_transform │ │ │ │ - 0x00caee40 202a2076 65633428 615f706f 732c2031 * vec4(a_pos, 1 │ │ │ │ - 0x00caee50 2e30293b 200a2020 2020765f 6e6f726d .0); . v_norm │ │ │ │ - 0x00caee60 616c203d 206e6f72 6d616c69 7a652828 al = normalize(( │ │ │ │ - 0x00caee70 755f6e6f 726d616c 5472616e 73666f72 u_normalTransfor │ │ │ │ - 0x00caee80 6d202a20 76656334 28615f6e 6f726d61 m * vec4(a_norma │ │ │ │ - 0x00caee90 6c2c2030 2e302929 2e78797a 293b200a l, 0.0)).xyz); . │ │ │ │ - 0x00caeea0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00caeeb0 3d20706f 73697469 6f6e3b20 0a202023 = position; . # │ │ │ │ - 0x00caeec0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00caeed0 2020676c 5f506f73 6974696f 6e2e7920 gl_Position.y │ │ │ │ - 0x00caeee0 3d202d67 6c5f506f 73697469 6f6e2e79 = -gl_Position.y │ │ │ │ - 0x00caeef0 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x00caef00 6f6e2e7a 203d2028 676c5f50 6f736974 on.z = (gl_Posit │ │ │ │ - 0x00caef10 696f6e2e 7a202b20 676c5f50 6f736974 ion.z + gl_Posit │ │ │ │ - 0x00caef20 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ - 0x00caef30 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ - 0x00caef40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00caef50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00caef60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00caef70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00caef80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00caef90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00caefa0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00caefb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00caefc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00caefd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00caefe0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00caeff0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00caf000 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00caf010 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00caf020 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00caf030 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00caf040 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00caf050 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00caf060 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00caf070 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00caf080 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00caf090 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x00caf0a0 76656332 20615f74 6578436f 6f726473 vec2 a_texCoords │ │ │ │ - 0x00caf0b0 3b200a20 206f7574 20666c6f 61742076 ; . out float v │ │ │ │ - 0x00caf0c0 5f696e74 656e7369 74793b20 0a202075 _intensity; . u │ │ │ │ - 0x00caf0d0 6e69666f 726d206d 61743420 755f7472 niform mat4 u_tr │ │ │ │ - 0x00caf0e0 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ - 0x00caf0f0 6f726d20 6d617434 20755f6e 6f726d61 orm mat4 u_norma │ │ │ │ - 0x00caf100 6c547261 6e73666f 726d3b20 0a202075 lTransform; . u │ │ │ │ - 0x00caf110 6e69666f 726d2076 65633420 755f636f niform vec4 u_co │ │ │ │ - 0x00caf120 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x00caf130 76656332 20755f74 6578436f 6f726446 vec2 u_texCoordF │ │ │ │ - 0x00caf140 6c697070 696e673b 200a2020 636f6e73 lipping; . cons │ │ │ │ - 0x00caf150 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00caf160 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00caf170 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00caf180 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00caf190 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00caf1a0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00caf1b0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00caf1c0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00caf1d0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00caf1e0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00caf1f0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00caf200 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00caf210 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00caf220 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00caf230 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00caf240 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00caf250 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00caf260 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00caf270 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00caf280 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00caf290 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00caf2a0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00caf2b0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00caf2c0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00caf2d0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00caf2e0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00caf2f0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00caf300 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00caf310 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00caf320 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00caf330 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00caf340 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00caf350 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00caf360 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00caf370 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00caf380 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00caf390 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00caf3a0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00caf3b0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00caf3c0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00caf3d0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00caf3e0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00caf3f0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00caf400 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00caf410 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00caf420 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00caf430 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00caf440 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00caf450 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00caf460 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00caf470 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00caf480 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00caf490 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00caf4a0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00caf4b0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00caf4c0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00caf4d0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00caf4e0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00caf4f0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00caf500 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00caf510 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00caf520 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00caf530 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00caf540 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00caf550 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00caf560 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00caf570 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00caf580 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00caf590 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00caf5a0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00caf5b0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00caf5c0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00caf5d0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00caf5e0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00caf5f0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00caf600 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00caf610 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00caf620 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00caf630 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00caf640 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00caf650 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00caf660 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00caf670 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00caf680 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00caf690 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00caf6a0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00caf6b0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00caf6c0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00caf6d0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00caf6e0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00caf6f0 20706f73 6974696f 6e203d20 755f7472 position = u_tr │ │ │ │ - 0x00caf700 616e7366 6f726d20 2a207665 63342861 ansform * vec4(a │ │ │ │ - 0x00caf710 5f706f73 2c20312e 30293b20 0a202020 _pos, 1.0); . │ │ │ │ - 0x00caf720 20765f69 6e74656e 73697479 203d2061 v_intensity = a │ │ │ │ - 0x00caf730 5f746578 436f6f72 64732e78 3b200a20 _texCoords.x; . │ │ │ │ - 0x00caf740 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00caf750 20706f73 6974696f 6e3b200a 20202369 position; . #i │ │ │ │ - 0x00caf760 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00caf770 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ - 0x00caf780 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ - 0x00caf790 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00caf7a0 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ - 0x00caf7b0 6f6e2e7a 202b2067 6c5f506f 73697469 on.z + gl_Positi │ │ │ │ - 0x00caf7c0 6f6e2e77 29202a20 302e353b 200a2020 on.w) * 0.5; . │ │ │ │ - 0x00caf7d0 23656e64 6966200a 20207d20 0a000000 #endif . } .... │ │ │ │ - 0x00caf7e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00caf7f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00caf800 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00caf810 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00caf820 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00caf830 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00caf840 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00caf850 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00caf860 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00caf870 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00caf880 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00caf890 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00caf8a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00caf8b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00caf8c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00caf8d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00caf8e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00caf8f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00caf900 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00caf910 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00caf920 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00caf930 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x00caf940 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ - 0x00caf950 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ - 0x00caf960 6f6f7264 733b200a 20206f75 74207665 oords; . out ve │ │ │ │ - 0x00caf970 63332076 5f6e6f72 6d616c3b 200a2020 c3 v_normal; . │ │ │ │ - 0x00caf980 6f757420 76656332 20765f74 6578436f out vec2 v_texCo │ │ │ │ - 0x00caf990 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ - 0x00caf9a0 206d6174 3420755f 7472616e 73666f72 mat4 u_transfor │ │ │ │ - 0x00caf9b0 6d3b200a 2020756e 69666f72 6d206d61 m; . uniform ma │ │ │ │ - 0x00caf9c0 74342075 5f6e6f72 6d616c54 72616e73 t4 u_normalTrans │ │ │ │ - 0x00caf9d0 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ - 0x00caf9e0 20766563 3420755f 636f6c6f 723b200a vec4 u_color; . │ │ │ │ - 0x00caf9f0 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ - 0x00cafa00 5f746578 436f6f72 64466c69 7070696e _texCoordFlippin │ │ │ │ - 0x00cafa10 673b200a 2020636f 6e737420 666c6f61 g; . const floa │ │ │ │ - 0x00cafa20 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00cafa30 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00cafa40 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00cafa50 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00cafa60 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00cafa70 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00cafa80 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00cafa90 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00cafaa0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00cafab0 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00cafac0 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00cafad0 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00cafae0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00cafaf0 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00cafb00 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00cafb10 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00cafb20 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00cafb30 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00cafb40 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00cafb50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cafb60 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00cafb70 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00cafb80 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cafb90 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00cafba0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00cafbb0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00cafbc0 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00cafbd0 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00cafbe0 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00cafbf0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cafc00 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00cafc10 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00cafc20 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00cafc30 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00cafc40 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00cafc50 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00cafc60 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00cafc70 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00cafc80 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00cafc90 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00cafca0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00cafcb0 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00cafcc0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00cafcd0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00cafce0 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00cafcf0 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00cafd00 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00cafd10 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00cafd20 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00cafd30 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00cafd40 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00cafd50 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00cafd60 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00cafd70 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00cafd80 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00cafd90 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00cafda0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00cafdb0 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00cafdc0 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00cafdd0 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00cafde0 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00cafdf0 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00cafe00 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00cafe10 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00cafe20 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00cafe30 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00cafe40 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00cafe50 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00cafe60 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00cafe70 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00cafe80 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00cafe90 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00cafea0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00cafeb0 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00cafec0 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00cafed0 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00cafee0 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00cafef0 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00caff00 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00caff10 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00caff20 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x00caff30 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x00caff40 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00caff50 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00caff60 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00caff70 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00caff80 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00caff90 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00caffa0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00caffb0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00caffc0 696f6e20 3d20755f 7472616e 73666f72 ion = u_transfor │ │ │ │ - 0x00caffd0 6d202a20 76656334 28615f70 6f732c20 m * vec4(a_pos, │ │ │ │ - 0x00caffe0 312e3029 3b200a20 20202076 5f6e6f72 1.0); . v_nor │ │ │ │ - 0x00cafff0 6d616c20 3d206e6f 726d616c 697a6528 mal = normalize( │ │ │ │ - 0x00cb0000 28755f6e 6f726d61 6c547261 6e73666f (u_normalTransfo │ │ │ │ - 0x00cb0010 726d202a 20766563 3428615f 6e6f726d rm * vec4(a_norm │ │ │ │ - 0x00cb0020 616c2c20 302e3029 292e7879 7a293b20 al, 0.0)).xyz); │ │ │ │ - 0x00cb0030 0a202020 20765f74 6578436f 6f726473 . v_texCoords │ │ │ │ - 0x00cb0040 203d206d 69782861 5f746578 436f6f72 = mix(a_texCoor │ │ │ │ - 0x00cb0050 64732c20 312e3020 2d20615f 74657843 ds, 1.0 - a_texC │ │ │ │ - 0x00cb0060 6f6f7264 732c2075 5f746578 436f6f72 oords, u_texCoor │ │ │ │ - 0x00cb0070 64466c69 7070696e 67293b20 0a202020 dFlipping); . │ │ │ │ - 0x00cb0080 20676c5f 506f7369 74696f6e 203d2070 gl_Position = p │ │ │ │ - 0x00cb0090 6f736974 696f6e3b 200a2020 23696664 osition; . #ifd │ │ │ │ - 0x00cb00a0 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ - 0x00cb00b0 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ - 0x00cb00c0 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ - 0x00cb00d0 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ - 0x00cb00e0 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ - 0x00cb00f0 2e7a202b 20676c5f 506f7369 74696f6e .z + gl_Position │ │ │ │ - 0x00cb0100 2e772920 2a20302e 353b200a 20202365 .w) * 0.5; . #e │ │ │ │ - 0x00cb0110 6e646966 200a2020 7d200a00 00000000 ndif . } ...... │ │ │ │ - 0x00cb0120 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb0130 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb0140 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb0150 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb0160 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb0170 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb0180 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb0190 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb01a0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb01b0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb01c0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb01d0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb01e0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb01f0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb0200 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb0210 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb0220 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb0230 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb0240 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb0250 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb0260 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb0270 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cb0280 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00cb0290 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cb02a0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb02b0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00cb02c0 455f5654 46200a20 206f7574 204c4f57 E_VTF . out LOW │ │ │ │ - 0x00cb02d0 5f502076 65633420 765f636f 6c6f723b _P vec4 v_color; │ │ │ │ - 0x00cb02e0 200a2020 23656c73 65200a20 206f7574 . #else . out │ │ │ │ - 0x00cb02f0 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ - 0x00cb0300 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ - 0x00cb0310 66200a20 206f7574 20766563 3320765f f . out vec3 v_ │ │ │ │ - 0x00cb0320 72616469 75733b20 0a202075 6e69666f radius; . unifo │ │ │ │ - 0x00cb0330 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cb0340 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cb0350 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cb0360 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cb0370 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cb0380 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cb0390 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00cb03a0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00cb03b0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00cb03c0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cb03d0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00cb03e0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cb03f0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00cb0400 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cb0410 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00cb0420 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00cb0430 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x00cb0440 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x00cb0450 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x00cb0460 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00cb0470 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00cb0480 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00cb0490 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00cb04a0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00cb04b0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00cb04c0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00cb04d0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00cb04e0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00cb04f0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00cb0500 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00cb0510 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00cb0520 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00cb0530 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00cb0540 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00cb0550 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00cb0560 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00cb0570 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00cb0580 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00cb0590 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00cb05a0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb05b0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00cb05c0 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00cb05d0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00cb05e0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00cb05f0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00cb0600 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00cb0610 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00cb0620 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00cb0630 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00cb0640 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00cb0650 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00cb0660 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00cb0670 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00cb0680 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00cb0690 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cb06a0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cb06b0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cb06c0 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00cb06d0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00cb06e0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00cb06f0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00cb0700 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cb0710 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cb0720 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cb0730 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00cb0740 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00cb0750 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x00cb0760 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00cb0770 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00cb0780 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00cb0790 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00cb07a0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00cb07b0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00cb07c0 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00cb07d0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00cb07e0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00cb07f0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00cb0800 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00cb0810 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cb0820 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00cb0830 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00cb0840 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00cb0850 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x00cb0860 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00cb0870 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cb0880 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00cb0890 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00cb08a0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00cb08b0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00cb08c0 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00cb08d0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00cb08e0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00cb08f0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00cb0900 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00cb0910 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00cb0920 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00cb0930 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00cb0940 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00cb0950 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00cb0960 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00cb0970 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00cb0980 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00cb0990 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cb09a0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00cb09b0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00cb09c0 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00cb09d0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00cb09e0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00cb09f0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00cb0a00 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ - 0x00cb0a10 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ - 0x00cb0a20 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x00cb0a30 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x00cb0a40 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ - 0x00cb0a50 2c20302c 20302920 2b20703b 200a2020 , 0, 0) + p; . │ │ │ │ - 0x00cb0a60 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00cb0a70 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x00cb0a80 6f726d28 706f7320 2a20755f 70726f6a orm(pos * u_proj │ │ │ │ - 0x00cb0a90 65637469 6f6e2c20 755f7069 766f7454 ection, u_pivotT │ │ │ │ - 0x00cb0aa0 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ - 0x00cb0ab0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00cb0ac0 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ - 0x00cb0ad0 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ - 0x00cb0ae0 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ - 0x00cb0af0 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ - 0x00cb0b00 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ - 0x00cb0b10 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ - 0x00cb0b20 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x00cb0b30 2023656e 64696620 0a202020 20765f72 #endif . v_r │ │ │ │ - 0x00cb0b40 61646975 73203d20 615f6e6f 726d616c adius = a_normal │ │ │ │ - 0x00cb0b50 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x00cb0b60 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb0b70 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb0b80 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb0b90 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb0ba0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb0bb0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb0bc0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb0bd0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb0be0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb0bf0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb0c00 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb0c10 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb0c20 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb0c30 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb0c40 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb0c50 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb0c60 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb0c70 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb0c80 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb0c90 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb0ca0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb0cb0 63332061 5f6e6f72 6d616c3b 200a2020 c3 a_normal; . │ │ │ │ - 0x00cb0cc0 696e2076 65633320 615f706f 73697469 in vec3 a_positi │ │ │ │ - 0x00cb0cd0 6f6e3b20 0a202069 6e207665 63342061 on; . in vec4 a │ │ │ │ - 0x00cb0ce0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00cb0cf0 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ - 0x00cb0d00 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ - 0x00cb0d10 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ - 0x00cb0d20 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x00cb0d30 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00cb0d40 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00cb0d50 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00cb0d60 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x00cb0d70 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ - 0x00cb0d80 755f636f 6e747261 73744761 6d6d613b u_contrastGamma; │ │ │ │ - 0x00cb0d90 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00cb0da0 7420755f 6f706163 6974793b 200a2020 t u_opacity; . │ │ │ │ - 0x00cb0db0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cb0dc0 7a536361 6c653b20 0a202075 6e69666f zScale; . unifo │ │ │ │ - 0x00cb0dd0 726d2066 6c6f6174 20755f69 6e746572 rm float u_inter │ │ │ │ - 0x00cb0de0 706f6c61 74696f6e 3b200a20 20756e69 polation; . uni │ │ │ │ - 0x00cb0df0 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ - 0x00cb0e00 75746c69 6e655061 73733b20 0a202063 utlinePass; . c │ │ │ │ - 0x00cb0e10 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ - 0x00cb0e20 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ - 0x00cb0e30 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ - 0x00cb0e40 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00cb0e50 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x00cb0e60 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x00cb0e70 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x00cb0e80 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ - 0x00cb0e90 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00cb0ea0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ - 0x00cb0eb0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ - 0x00cb0ec0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00cb0ed0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00cb0ee0 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ - 0x00cb0ef0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00cb0f00 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00cb0f10 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ - 0x00cb0f20 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ - 0x00cb0f30 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cb0f40 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ - 0x00cb0f50 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ - 0x00cb0f60 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00cb0f70 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ - 0x00cb0f80 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ - 0x00cb0f90 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00cb0fa0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00cb0fb0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ - 0x00cb0fc0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00cb0fd0 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ - 0x00cb0fe0 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ - 0x00cb0ff0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00cb1000 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ - 0x00cb1010 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ - 0x00cb1020 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ - 0x00cb1030 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ - 0x00cb1040 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00cb1050 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00cb1060 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00cb1070 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ - 0x00cb1080 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ - 0x00cb1090 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ - 0x00cb10a0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ - 0x00cb10b0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x00cb10c0 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ - 0x00cb10d0 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ - 0x00cb10e0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x00cb10f0 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ - 0x00cb1100 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ - 0x00cb1110 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x00cb1120 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ - 0x00cb1130 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x00cb1140 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ - 0x00cb1150 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x00cb1160 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ - 0x00cb1170 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ - 0x00cb1180 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ - 0x00cb1190 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ - 0x00cb11a0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ - 0x00cb11b0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ - 0x00cb11c0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00cb11d0 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ - 0x00cb11e0 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ - 0x00cb11f0 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ - 0x00cb1200 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ - 0x00cb1210 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ - 0x00cb1220 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00cb1230 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ - 0x00cb1240 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ - 0x00cb1250 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x00cb1260 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ - 0x00cb1270 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ - 0x00cb1280 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ - 0x00cb1290 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ - 0x00cb12a0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ - 0x00cb12b0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ - 0x00cb12c0 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ - 0x00cb12d0 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ - 0x00cb12e0 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ - 0x00cb12f0 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ - 0x00cb1300 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ - 0x00cb1310 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ - 0x00cb1320 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ - 0x00cb1330 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00cb1340 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ - 0x00cb1350 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ - 0x00cb1360 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ - 0x00cb1370 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ - 0x00cb1380 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00cb1390 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ - 0x00cb13a0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ - 0x00cb13b0 65633320 72616469 7573203d 20615f6e ec3 radius = a_n │ │ │ │ - 0x00cb13c0 6f726d61 6c202a20 615f706f 73697469 ormal * a_positi │ │ │ │ - 0x00cb13d0 6f6e2e7a 3b200a20 20202076 65633420 on.z; . vec4 │ │ │ │ - 0x00cb13e0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x00cb13f0 6974696f 6e2e7879 2c20302c 20312920 ition.xy, 0, 1) │ │ │ │ - 0x00cb1400 2a20755f 6d6f6465 6c566965 773b200a * u_modelView; . │ │ │ │ - 0x00cb1410 20202020 76656334 20736869 66746564 vec4 shifted │ │ │ │ - 0x00cb1420 506f7320 3d207665 63342872 61646975 Pos = vec4(radiu │ │ │ │ - 0x00cb1430 732e7879 2c20302c 20302920 2b20706f s.xy, 0, 0) + po │ │ │ │ - 0x00cb1440 733b200a 20202020 676c5f50 6f736974 s; . gl_Posit │ │ │ │ - 0x00cb1450 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ - 0x00cb1460 5472616e 73666f72 6d287368 69667465 Transform(shifte │ │ │ │ - 0x00cb1470 64506f73 202a2075 5f70726f 6a656374 dPos * u_project │ │ │ │ - 0x00cb1480 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ - 0x00cb1490 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ - 0x00cb14a0 2020765f 72616469 7573203d 20726164 v_radius = rad │ │ │ │ - 0x00cb14b0 6975733b 200a2020 2020765f 636f6c6f ius; . v_colo │ │ │ │ - 0x00cb14c0 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x00cb14d0 7d200a00 00000000 00000000 00000000 } .............. │ │ │ │ - 0x00cb14e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb14f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb1500 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb1510 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb1520 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb1530 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb1540 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb1550 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb1560 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb1570 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb1580 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb1590 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb15a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb15b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb15c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb15d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb15e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb15f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb1600 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb1610 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb1620 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb1630 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cb1640 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00cb1650 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00cb1660 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb1670 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ - 0x00cb1680 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ - 0x00cb1690 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ - 0x00cb16a0 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ - 0x00cb16b0 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ - 0x00cb16c0 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x00cb16d0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x00cb16e0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ - 0x00cb16f0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cb1700 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cb1710 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cb1720 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cb1730 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cb1740 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cb1750 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00cb1760 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00cb1770 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00cb1780 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cb1790 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00cb17a0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cb17b0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00cb17c0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cb17d0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00cb17e0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00cb17f0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x00cb1800 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x00cb1810 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x00cb1820 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00cb1830 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00cb1840 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00cb1850 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00cb1860 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00cb1870 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00cb1880 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00cb1890 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00cb18a0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00cb18b0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00cb18c0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00cb18d0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00cb18e0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00cb18f0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00cb1900 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00cb1910 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00cb1920 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00cb1930 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00cb1940 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00cb1950 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00cb1960 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb1970 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00cb1980 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00cb1990 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00cb19a0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00cb19b0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00cb19c0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00cb19d0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00cb19e0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00cb19f0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00cb1a00 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00cb1a10 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00cb1a20 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00cb1a30 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00cb1a40 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00cb1a50 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cb1a60 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cb1a70 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cb1a80 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00cb1a90 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00cb1aa0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00cb1ab0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00cb1ac0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cb1ad0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cb1ae0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cb1af0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00cb1b00 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00cb1b10 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x00cb1b20 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00cb1b30 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00cb1b40 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00cb1b50 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00cb1b60 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00cb1b70 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00cb1b80 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00cb1b90 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00cb1ba0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00cb1bb0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00cb1bc0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00cb1bd0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cb1be0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00cb1bf0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00cb1c00 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00cb1c10 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x00cb1c20 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00cb1c30 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cb1c40 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00cb1c50 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00cb1c60 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00cb1c70 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00cb1c80 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00cb1c90 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00cb1ca0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00cb1cb0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00cb1cc0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00cb1cd0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00cb1ce0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00cb1cf0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00cb1d00 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00cb1d10 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00cb1d20 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00cb1d30 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00cb1d40 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00cb1d50 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cb1d60 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00cb1d70 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00cb1d80 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00cb1d90 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00cb1da0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00cb1db0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00cb1dc0 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ - 0x00cb1dd0 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ - 0x00cb1de0 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x00cb1df0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x00cb1e00 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ - 0x00cb1e10 202b2061 5f636f6c 6f725465 78436f6f + a_colorTexCoo │ │ │ │ - 0x00cb1e20 7264732e 7a772c20 302c2030 29202b20 rds.zw, 0, 0) + │ │ │ │ - 0x00cb1e30 703b200a 20202020 676c5f50 6f736974 p; . gl_Posit │ │ │ │ - 0x00cb1e40 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ - 0x00cb1e50 5472616e 73666f72 6d28706f 73202a20 Transform(pos * │ │ │ │ - 0x00cb1e60 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ - 0x00cb1e70 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cb1e80 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00cb1e90 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ - 0x00cb1ea0 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ - 0x00cb1eb0 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ - 0x00cb1ec0 636f6c6f 72546578 436f6f72 64732e78 colorTexCoords.x │ │ │ │ - 0x00cb1ed0 79293b20 0a202023 656c7365 200a2020 y); . #else . │ │ │ │ - 0x00cb1ee0 2020765f 636f6c6f 72546578 436f6f72 v_colorTexCoor │ │ │ │ - 0x00cb1ef0 6473203d 20615f63 6f6c6f72 54657843 ds = a_colorTexC │ │ │ │ - 0x00cb1f00 6f6f7264 732e7879 3b200a20 2023656e oords.xy; . #en │ │ │ │ - 0x00cb1f10 64696620 0a202020 20765f6e 6f726d61 dif . v_norma │ │ │ │ - 0x00cb1f20 6c203d20 615f6e6f 726d616c 3b200a20 l = a_normal; . │ │ │ │ - 0x00cb1f30 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ - 0x00cb1f40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb1f50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb1f60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb1f70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb1f80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb1f90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb1fa0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb1fb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb1fc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb1fd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb1fe0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb1ff0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb2000 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb2010 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb2020 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb2030 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb2040 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb2050 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb2060 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb2070 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb2080 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb2090 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cb20a0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00cb20b0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00cb20c0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb20d0 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ - 0x00cb20e0 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ - 0x00cb20f0 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ - 0x00cb2100 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ - 0x00cb2110 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ - 0x00cb2120 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x00cb2130 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x00cb2140 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ - 0x00cb2150 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cb2160 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cb2170 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cb2180 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cb2190 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cb21a0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cb21b0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00cb21c0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00cb21d0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00cb21e0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cb21f0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00cb2200 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cb2210 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00cb2220 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cb2230 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00cb2240 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00cb2250 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x00cb2260 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x00cb2270 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x00cb2280 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00cb2290 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00cb22a0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00cb22b0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00cb22c0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00cb22d0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00cb22e0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00cb22f0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00cb2300 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00cb2310 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00cb2320 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00cb2330 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00cb2340 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00cb2350 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00cb2360 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00cb2370 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00cb2380 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00cb2390 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00cb23a0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00cb23b0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00cb23c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb23d0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00cb23e0 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00cb23f0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00cb2400 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00cb2410 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00cb2420 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00cb2430 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00cb2440 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00cb2450 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00cb2460 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00cb2470 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00cb2480 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00cb2490 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00cb24a0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00cb24b0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cb24c0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cb24d0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cb24e0 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00cb24f0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00cb2500 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00cb2510 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00cb2520 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cb2530 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cb2540 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cb2550 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00cb2560 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00cb2570 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x00cb2580 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00cb2590 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00cb25a0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00cb25b0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00cb25c0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00cb25d0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00cb25e0 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00cb25f0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00cb2600 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00cb2610 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00cb2620 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00cb2630 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cb2640 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00cb2650 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00cb2660 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00cb2670 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x00cb2680 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00cb2690 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cb26a0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00cb26b0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00cb26c0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00cb26d0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00cb26e0 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00cb26f0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00cb2700 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00cb2710 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00cb2720 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00cb2730 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00cb2740 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00cb2750 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00cb2760 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00cb2770 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00cb2780 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00cb2790 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00cb27a0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00cb27b0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cb27c0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00cb27d0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00cb27e0 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00cb27f0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00cb2800 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00cb2810 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00cb2820 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ - 0x00cb2830 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ - 0x00cb2840 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ - 0x00cb2850 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x00cb2860 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ - 0x00cb2870 3428615f 6e6f726d 616c2e78 79202b20 4(a_normal.xy + │ │ │ │ - 0x00cb2880 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x00cb2890 2e7a772c 20302e30 2c20302e 3029202a .zw, 0.0, 0.0) * │ │ │ │ - 0x00cb28a0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00cb28b0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00cb28c0 3d206170 706c7942 696c6c62 6f617264 = applyBillboard │ │ │ │ - 0x00cb28d0 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ - 0x00cb28e0 69766f74 202a2075 5f70726f 6a656374 ivot * u_project │ │ │ │ - 0x00cb28f0 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ - 0x00cb2900 73666f72 6d2c2030 2e302c20 6f666673 sform, 0.0, offs │ │ │ │ - 0x00cb2910 65742e78 79293b20 0a202023 69666465 et.xy); . #ifde │ │ │ │ - 0x00cb2920 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x00cb2930 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ - 0x00cb2940 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ - 0x00cb2950 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x00cb2960 2e787929 3b200a20 2023656c 7365200a .xy); . #else . │ │ │ │ - 0x00cb2970 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ - 0x00cb2980 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ - 0x00cb2990 78436f6f 7264732e 78793b20 0a202023 xCoords.xy; . # │ │ │ │ - 0x00cb29a0 656e6469 66200a20 20202076 5f6e6f72 endif . v_nor │ │ │ │ - 0x00cb29b0 6d616c20 3d20615f 6e6f726d 616c3b20 mal = a_normal; │ │ │ │ - 0x00cb29c0 0a20207d 200a0000 00000000 00000000 . } ........... │ │ │ │ - 0x00cb29d0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb29e0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb29f0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb2a00 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb2a10 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb2a20 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb2a30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb2a40 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb2a50 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb2a60 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb2a70 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb2a80 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb2a90 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb2aa0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb2ab0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb2ac0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb2ad0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb2ae0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb2af0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb2b00 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb2b10 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb2b20 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cb2b30 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00cb2b40 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cb2b50 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x00cb2b60 0a202069 6e207665 63342061 5f6d6173 . in vec4 a_mas │ │ │ │ - 0x00cb2b70 6b546578 436f6f72 643b200a 20206f75 kTexCoord; . ou │ │ │ │ - 0x00cb2b80 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ - 0x00cb2b90 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ - 0x00cb2ba0 65633220 765f6d61 736b5465 78436f6f ec2 v_maskTexCoo │ │ │ │ - 0x00cb2bb0 72643b20 0a202075 6e69666f 726d206d rd; . uniform m │ │ │ │ - 0x00cb2bc0 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ - 0x00cb2bd0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00cb2be0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00cb2bf0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cb2c00 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ - 0x00cb2c10 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x00cb2c20 20755f63 6f6e7472 61737447 616d6d61 u_contrastGamma │ │ │ │ - 0x00cb2c30 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cb2c40 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ - 0x00cb2c50 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00cb2c60 5f7a5363 616c653b 200a2020 756e6966 _zScale; . unif │ │ │ │ - 0x00cb2c70 6f726d20 666c6f61 7420755f 696e7465 orm float u_inte │ │ │ │ - 0x00cb2c80 72706f6c 6174696f 6e3b200a 2020756e rpolation; . un │ │ │ │ - 0x00cb2c90 69666f72 6d20666c 6f617420 755f6973 iform float u_is │ │ │ │ - 0x00cb2ca0 4f75746c 696e6550 6173733b 200a2020 OutlinePass; . │ │ │ │ - 0x00cb2cb0 636f6e73 7420666c 6f617420 6b536861 const float kSha │ │ │ │ - 0x00cb2cc0 7065436f 6f726453 63616c61 72203d20 peCoordScalar = │ │ │ │ - 0x00cb2cd0 31303030 2e303b20 0a202076 65633420 1000.0; . vec4 │ │ │ │ - 0x00cb2ce0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x00cb2cf0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00cb2d00 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00cb2d10 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00cb2d20 5265616c 5a29200a 20207b20 0a202020 RealZ) . { . │ │ │ │ - 0x00cb2d30 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x00cb2d40 64506976 6f74203d 20706976 6f743b20 dPivot = pivot; │ │ │ │ - 0x00cb2d50 0a202020 20666c6f 61742077 203d2074 . float w = t │ │ │ │ - 0x00cb2d60 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb2d70 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x00cb2d80 6d656450 69766f74 2e787977 203d2028 medPivot.xyw = ( │ │ │ │ - 0x00cb2d90 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00cb2da0 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00cb2db0 64506976 6f742e78 792c2070 69766f74 dPivot.xy, pivot │ │ │ │ - 0x00cb2dc0 5265616c 5a2c2077 29292e78 79773b20 RealZ, w)).xyw; │ │ │ │ - 0x00cb2dd0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cb2de0 5069766f 742e7a20 2a3d2074 72616e73 Pivot.z *= trans │ │ │ │ - 0x00cb2df0 666f726d 65645069 766f742e 77202f20 formedPivot.w / │ │ │ │ - 0x00cb2e00 773b200a 20202369 66646566 2056554c w; . #ifdef VUL │ │ │ │ - 0x00cb2e10 4b414e20 0a202020 20747261 6e73666f KAN . transfo │ │ │ │ - 0x00cb2e20 726d6564 5069766f 742e7920 3d202d74 rmedPivot.y = -t │ │ │ │ - 0x00cb2e30 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb2e40 793b200a 20202020 7472616e 73666f72 y; . transfor │ │ │ │ - 0x00cb2e50 6d656450 69766f74 2e7a203d 20287472 medPivot.z = (tr │ │ │ │ - 0x00cb2e60 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00cb2e70 20202b20 7472616e 73666f72 6d656450 + transformedP │ │ │ │ - 0x00cb2e80 69766f74 2e772920 2f20322e 303b200a ivot.w) / 2.0; . │ │ │ │ - 0x00cb2e90 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x00cb2ea0 7475726e 20747261 6e73666f 726d6564 turn transformed │ │ │ │ - 0x00cb2eb0 5069766f 743b200a 20207d20 0a202076 Pivot; . } . v │ │ │ │ - 0x00cb2ec0 65633420 6170706c 7942696c 6c626f61 ec4 applyBillboa │ │ │ │ - 0x00cb2ed0 72645069 766f7454 72616e73 666f726d rdPivotTransform │ │ │ │ - 0x00cb2ee0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00cb2ef0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00cb2f00 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00cb2f10 6c5a2c20 76656332 206f6666 73657429 lZ, vec2 offset) │ │ │ │ - 0x00cb2f20 200a2020 7b200a20 20202066 6c6f6174 . { . float │ │ │ │ - 0x00cb2f30 206c6f67 69635a20 3d207069 766f742e logicZ = pivot. │ │ │ │ - 0x00cb2f40 7a202f20 7069766f 742e773b 200a2020 z / pivot.w; . │ │ │ │ - 0x00cb2f50 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00cb2f60 65645069 766f7420 3d207069 766f7454 edPivot = pivotT │ │ │ │ - 0x00cb2f70 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x00cb2f80 7069766f 742e7879 2c207069 766f7452 pivot.xy, pivotR │ │ │ │ - 0x00cb2f90 65616c5a 2c207069 766f742e 77293b20 ealZ, pivot.w); │ │ │ │ - 0x00cb2fa0 0a202020 20766563 34207363 616c6520 . vec4 scale │ │ │ │ - 0x00cb2fb0 3d207069 766f7454 72616e73 666f726d = pivotTransform │ │ │ │ - 0x00cb2fc0 202a2076 65633428 312e302c 202d312e * vec4(1.0, -1. │ │ │ │ - 0x00cb2fd0 302c2030 2e302c20 312e3029 3b200a20 0, 0.0, 1.0); . │ │ │ │ - 0x00cb2fe0 20202076 65633420 706f7369 74696f6e vec4 position │ │ │ │ - 0x00cb2ff0 203d2076 65633428 7472616e 73666f72 = vec4(transfor │ │ │ │ - 0x00cb3000 6d656450 69766f74 2e787920 2f207472 medPivot.xy / tr │ │ │ │ - 0x00cb3010 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00cb3020 2c206c6f 6769635a 2c20312e 3029202b , logicZ, 1.0) + │ │ │ │ - 0x00cb3030 20766563 34286f66 66736574 202f2073 vec4(offset / s │ │ │ │ - 0x00cb3040 63616c65 2e77202a 20736361 6c652e78 cale.w * scale.x │ │ │ │ - 0x00cb3050 2c20302e 302c2030 2e30293b 200a2020 , 0.0, 0.0); . │ │ │ │ - 0x00cb3060 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x00cb3070 20202070 6f736974 696f6e2e 79203d20 position.y = │ │ │ │ - 0x00cb3080 2d706f73 6974696f 6e2e793b 200a2020 -position.y; . │ │ │ │ - 0x00cb3090 2020706f 73697469 6f6e2e7a 203d2028 position.z = ( │ │ │ │ - 0x00cb30a0 706f7369 74696f6e 2e7a2020 2b20706f position.z + po │ │ │ │ - 0x00cb30b0 73697469 6f6e2e77 29202f20 322e303b sition.w) / 2.0; │ │ │ │ - 0x00cb30c0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00cb30d0 72657475 726e2070 6f736974 696f6e3b return position; │ │ │ │ - 0x00cb30e0 200a2020 7d200a20 20766563 32206361 . } . vec2 ca │ │ │ │ - 0x00cb30f0 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ - 0x00cb3100 64417869 73506f73 28766563 32206f72 dAxisPos(vec2 or │ │ │ │ - 0x00cb3110 6967696e 616c4178 6973506f 732c2076 iginalAxisPos, v │ │ │ │ - 0x00cb3120 65633220 73686966 74656450 6f732c20 ec2 shiftedPos, │ │ │ │ - 0x00cb3130 6d617434 206d6f64 656c5669 65772c20 mat4 modelView, │ │ │ │ - 0x00cb3140 666c6f61 74206861 6c665769 64746829 float halfWidth) │ │ │ │ - 0x00cb3150 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x00cb3160 70203d20 28766563 34287368 69667465 p = (vec4(shifte │ │ │ │ - 0x00cb3170 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ - 0x00cb3180 2a206d6f 64656c56 69657729 2e78793b * modelView).xy; │ │ │ │ - 0x00cb3190 200a2020 20207665 63322064 203d2070 . vec2 d = p │ │ │ │ - 0x00cb31a0 202d206f 72696769 6e616c41 78697350 - originalAxisP │ │ │ │ - 0x00cb31b0 6f733b20 0a202020 20696620 28646f74 os; . if (dot │ │ │ │ - 0x00cb31c0 28642c20 64292021 3d20302e 3029200a (d, d) != 0.0) . │ │ │ │ - 0x00cb31d0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00cb31e0 67696e61 6c417869 73506f73 202b206e ginalAxisPos + n │ │ │ │ - 0x00cb31f0 6f726d61 6c697a65 28642920 2a206861 ormalize(d) * ha │ │ │ │ - 0x00cb3200 6c665769 6474683b 200a2020 2020656c lfWidth; . el │ │ │ │ - 0x00cb3210 7365200a 20202020 20207265 7475726e se . return │ │ │ │ - 0x00cb3220 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cb3230 3b200a20 207d200a 2020766f 6964206d ; . } . void m │ │ │ │ - 0x00cb3240 61696e28 29200a20 207b200a 20202020 ain() . { . │ │ │ │ - 0x00cb3250 76656332 206e6f72 6d616c20 3d20615f vec2 normal = a_ │ │ │ │ - 0x00cb3260 6e6f726d 616c2e78 793b200a 20202020 normal.xy; . │ │ │ │ - 0x00cb3270 666c6f61 74206861 6c665769 64746820 float halfWidth │ │ │ │ - 0x00cb3280 3d206c65 6e677468 286e6f72 6d616c29 = length(normal) │ │ │ │ - 0x00cb3290 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ - 0x00cb32a0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x00cb32b0 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ - 0x00cb32c0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ - 0x00cb32d0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ - 0x00cb32e0 793b200a 20202020 69662028 68616c66 y; . if (half │ │ │ │ - 0x00cb32f0 57696474 6820213d 20302e30 29200a20 Width != 0.0) . │ │ │ │ - 0x00cb3300 2020207b 200a2020 20202020 7472616e { . tran │ │ │ │ - 0x00cb3310 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x00cb3320 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00cb3330 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ - 0x00cb3340 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x00cb3350 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ - 0x00cb3360 6e6f726d 616c2c20 0a202020 20202020 normal, . │ │ │ │ - 0x00cb3370 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb3380 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb3390 20202020 20202020 20202020 20202075 u │ │ │ │ - 0x00cb33a0 5f6d6f64 656c5669 65772c20 68616c66 _modelView, half │ │ │ │ - 0x00cb33b0 57696474 68293b20 0a202020 207d200a Width); . } . │ │ │ │ - 0x00cb33c0 20202020 666c6f61 7420754f 66667365 float uOffse │ │ │ │ - 0x00cb33d0 74203d20 6d696e28 6c656e67 74682876 t = min(length(v │ │ │ │ - 0x00cb33e0 65633428 6b536861 7065436f 6f726453 ec4(kShapeCoordS │ │ │ │ - 0x00cb33f0 63616c61 722c2030 2c20302c 20302920 calar, 0, 0, 0) │ │ │ │ - 0x00cb3400 2a20755f 6d6f6465 6c566965 7729202a * u_modelView) * │ │ │ │ - 0x00cb3410 20615f6d 61736b54 6578436f 6f72642e a_maskTexCoord. │ │ │ │ - 0x00cb3420 782c2031 2e30293b 200a2020 2020765f x, 1.0); . v_ │ │ │ │ - 0x00cb3430 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ - 0x00cb3440 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ - 0x00cb3450 200a2020 2020765f 6d61736b 54657843 . v_maskTexC │ │ │ │ - 0x00cb3460 6f6f7264 203d2076 65633228 615f6d61 oord = vec2(a_ma │ │ │ │ - 0x00cb3470 736b5465 78436f6f 72642e79 202b2075 skTexCoord.y + u │ │ │ │ - 0x00cb3480 4f666673 6574202a 20615f6d 61736b54 Offset * a_maskT │ │ │ │ - 0x00cb3490 6578436f 6f72642e 7a2c2061 5f6d6173 exCoord.z, a_mas │ │ │ │ - 0x00cb34a0 6b546578 436f6f72 642e7729 3b200a20 kTexCoord.w); . │ │ │ │ - 0x00cb34b0 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x00cb34c0 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ - 0x00cb34d0 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ - 0x00cb34e0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ - 0x00cb34f0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ - 0x00cb3500 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x00cb3510 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00cb3520 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ - 0x00cb3530 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x00cb3540 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ - 0x00cb3550 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb3560 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb3570 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb3580 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb3590 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb35a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb35b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb35c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb35d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb35e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb35f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb3600 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb3610 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb3620 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb3630 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb3640 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb3650 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb3660 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb3670 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb3680 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb3690 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb36a0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cb36b0 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00cb36c0 72546578 436f6f72 64733b20 0a202069 rTexCoords; . i │ │ │ │ - 0x00cb36d0 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ - 0x00cb36e0 436f6f72 64733b20 0a202023 69666465 Coords; . #ifde │ │ │ │ - 0x00cb36f0 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x00cb3700 6f757420 4c4f575f 50207665 63342076 out LOW_P vec4 v │ │ │ │ - 0x00cb3710 5f636f6c 6f723b20 0a202023 656c7365 _color; . #else │ │ │ │ - 0x00cb3720 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00cb3730 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00cb3740 20202365 6e646966 200a2020 6f757420 #endif . out │ │ │ │ - 0x00cb3750 76656332 20765f6d 61736b54 6578436f vec2 v_maskTexCo │ │ │ │ - 0x00cb3760 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ - 0x00cb3770 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ - 0x00cb3780 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ - 0x00cb3790 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ - 0x00cb37a0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00cb37b0 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ - 0x00cb37c0 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ - 0x00cb37d0 63322075 5f636f6e 74726173 7447616d c2 u_contrastGam │ │ │ │ - 0x00cb37e0 6d613b20 0a202075 6e69666f 726d2066 ma; . uniform f │ │ │ │ - 0x00cb37f0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ - 0x00cb3800 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x00cb3810 20755f7a 5363616c 653b200a 2020756e u_zScale; . un │ │ │ │ - 0x00cb3820 69666f72 6d20666c 6f617420 755f696e iform float u_in │ │ │ │ - 0x00cb3830 74657270 6f6c6174 696f6e3b 200a2020 terpolation; . │ │ │ │ - 0x00cb3840 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cb3850 69734f75 746c696e 65506173 733b200a isOutlinePass; . │ │ │ │ - 0x00cb3860 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ - 0x00cb3870 56544620 0a202075 6e69666f 726d2073 VTF . uniform s │ │ │ │ - 0x00cb3880 616d706c 65723244 20755f63 6f6c6f72 ampler2D u_color │ │ │ │ - 0x00cb3890 5465783b 200a2020 23656e64 6966200a Tex; . #endif . │ │ │ │ - 0x00cb38a0 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ - 0x00cb38b0 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ - 0x00cb38c0 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ - 0x00cb38d0 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ - 0x00cb38e0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00cb38f0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00cb3900 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00cb3910 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ - 0x00cb3920 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00cb3930 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00cb3940 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ - 0x00cb3950 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cb3960 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ - 0x00cb3970 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ - 0x00cb3980 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ - 0x00cb3990 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ - 0x00cb39a0 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ - 0x00cb39b0 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ - 0x00cb39c0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00cb39d0 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ - 0x00cb39e0 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ - 0x00cb39f0 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ - 0x00cb3a00 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ - 0x00cb3a10 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ - 0x00cb3a20 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ - 0x00cb3a30 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ - 0x00cb3a40 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ - 0x00cb3a50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb3a60 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ - 0x00cb3a70 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ - 0x00cb3a80 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00cb3a90 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ - 0x00cb3aa0 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ - 0x00cb3ab0 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ - 0x00cb3ac0 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ - 0x00cb3ad0 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x00cb3ae0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x00cb3af0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x00cb3b00 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ - 0x00cb3b10 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ - 0x00cb3b20 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ - 0x00cb3b30 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ - 0x00cb3b40 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00cb3b50 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00cb3b60 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00cb3b70 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ - 0x00cb3b80 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ - 0x00cb3b90 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ - 0x00cb3ba0 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ - 0x00cb3bb0 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ - 0x00cb3bc0 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ - 0x00cb3bd0 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x00cb3be0 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ - 0x00cb3bf0 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ - 0x00cb3c00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb3c10 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ - 0x00cb3c20 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ - 0x00cb3c30 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ - 0x00cb3c40 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ - 0x00cb3c50 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00cb3c60 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ - 0x00cb3c70 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ - 0x00cb3c80 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ - 0x00cb3c90 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ - 0x00cb3ca0 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ - 0x00cb3cb0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00cb3cc0 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ - 0x00cb3cd0 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ - 0x00cb3ce0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x00cb3cf0 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ - 0x00cb3d00 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ - 0x00cb3d10 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ - 0x00cb3d20 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ - 0x00cb3d30 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ - 0x00cb3d40 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ - 0x00cb3d50 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ - 0x00cb3d60 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ - 0x00cb3d70 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ - 0x00cb3d80 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ - 0x00cb3d90 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ - 0x00cb3da0 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ - 0x00cb3db0 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ - 0x00cb3dc0 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00cb3dd0 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ - 0x00cb3de0 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ - 0x00cb3df0 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ - 0x00cb3e00 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ - 0x00cb3e10 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00cb3e20 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ - 0x00cb3e30 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ - 0x00cb3e40 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x00cb3e50 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ - 0x00cb3e60 202a2075 5f6d6f64 656c5669 6577202a * u_modelView * │ │ │ │ - 0x00cb3e70 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00cb3e80 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00cb3e90 3d206170 706c7950 69766f74 5472616e = applyPivotTran │ │ │ │ - 0x00cb3ea0 73666f72 6d28706f 732c2075 5f706976 sform(pos, u_piv │ │ │ │ - 0x00cb3eb0 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ - 0x00cb3ec0 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ - 0x00cb3ed0 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ - 0x00cb3ee0 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ - 0x00cb3ef0 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ - 0x00cb3f00 6f725465 78436f6f 72647329 3b200a20 orTexCoords); . │ │ │ │ - 0x00cb3f10 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ - 0x00cb3f20 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x00cb3f30 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb3f40 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00cb3f50 765f6d61 736b5465 78436f6f 72647320 v_maskTexCoords │ │ │ │ - 0x00cb3f60 3d20615f 6d61736b 54657843 6f6f7264 = a_maskTexCoord │ │ │ │ - 0x00cb3f70 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ - 0x00cb3f80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb3f90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb3fa0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb3fb0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb3fc0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb3fd0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb3fe0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb3ff0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb4000 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb4010 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb4020 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb4030 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb4040 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb4050 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb4060 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb4070 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb4080 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb4090 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb40a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb40b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb40c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb40d0 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ - 0x00cb40e0 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ - 0x00cb40f0 6f6f7264 733b200a 2020696e 20766563 oords; . in vec │ │ │ │ - 0x00cb4100 3420615f 636f6c6f 723b200a 20206f75 4 a_color; . ou │ │ │ │ - 0x00cb4110 74207665 63322076 5f746578 436f6f72 t vec2 v_texCoor │ │ │ │ - 0x00cb4120 64733b20 0a20206f 75742076 65633420 ds; . out vec4 │ │ │ │ - 0x00cb4130 765f636f 6c6f723b 200a2020 756e6966 v_color; . unif │ │ │ │ - 0x00cb4140 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ - 0x00cb4150 6374696f 6e3b200a 2020636f 6e737420 ction; . const │ │ │ │ - 0x00cb4160 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ - 0x00cb4170 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ - 0x00cb4180 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ - 0x00cb4190 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00cb41a0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00cb41b0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00cb41c0 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ - 0x00cb41d0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00cb41e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb41f0 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ - 0x00cb4200 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ - 0x00cb4210 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ - 0x00cb4220 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cb4230 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ - 0x00cb4240 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x00cb4250 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb4260 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00cb4270 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ - 0x00cb4280 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb4290 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ - 0x00cb42a0 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ - 0x00cb42b0 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x00cb42c0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cb42d0 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ - 0x00cb42e0 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ - 0x00cb42f0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cb4300 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ - 0x00cb4310 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ - 0x00cb4320 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00cb4330 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x00cb4340 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ - 0x00cb4350 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ - 0x00cb4360 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ - 0x00cb4370 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ - 0x00cb4380 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x00cb4390 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x00cb43a0 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x00cb43b0 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ - 0x00cb43c0 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ - 0x00cb43d0 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ - 0x00cb43e0 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ - 0x00cb43f0 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ - 0x00cb4400 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cb4410 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ - 0x00cb4420 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ - 0x00cb4430 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00cb4440 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ - 0x00cb4450 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ - 0x00cb4460 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00cb4470 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ - 0x00cb4480 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ - 0x00cb4490 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ - 0x00cb44a0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00cb44b0 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ - 0x00cb44c0 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ - 0x00cb44d0 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ - 0x00cb44e0 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ - 0x00cb44f0 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ - 0x00cb4500 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ - 0x00cb4510 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ - 0x00cb4520 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ - 0x00cb4530 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ - 0x00cb4540 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ - 0x00cb4550 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ - 0x00cb4560 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00cb4570 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00cb4580 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ - 0x00cb4590 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ - 0x00cb45a0 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x00cb45b0 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ - 0x00cb45c0 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ - 0x00cb45d0 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ - 0x00cb45e0 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ - 0x00cb45f0 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ - 0x00cb4600 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ - 0x00cb4610 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ - 0x00cb4620 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ - 0x00cb4630 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x00cb4640 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ - 0x00cb4650 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00cb4660 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ - 0x00cb4670 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ - 0x00cb4680 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00cb4690 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ - 0x00cb46a0 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ - 0x00cb46b0 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ - 0x00cb46c0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00cb46d0 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ - 0x00cb46e0 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ - 0x00cb46f0 0a20207b 200a2020 2020765f 74657843 . { . v_texC │ │ │ │ - 0x00cb4700 6f6f7264 73203d20 615f7465 78436f6f oords = a_texCoo │ │ │ │ - 0x00cb4710 7264733b 200a2020 2020765f 636f6c6f rds; . v_colo │ │ │ │ - 0x00cb4720 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x00cb4730 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00cb4740 76656334 28615f70 6f736974 696f6e2c vec4(a_position, │ │ │ │ - 0x00cb4750 20302c20 3129202a 20755f70 726f6a65 0, 1) * u_proje │ │ │ │ - 0x00cb4760 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ - 0x00cb4770 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ - 0x00cb4780 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ - 0x00cb4790 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ - 0x00cb47a0 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x00cb47b0 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ - 0x00cb47c0 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ - 0x00cb47d0 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ - 0x00cb47e0 64696620 0a20207d 200a0000 00000000 dif . } ....... │ │ │ │ - 0x00cb47f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb4800 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb4810 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb4820 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb4830 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb4840 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb4850 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb4860 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb4870 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb4880 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb4890 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb48a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb48b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb48c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb48d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb48e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb48f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb4900 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb4910 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb4920 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb4930 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb4940 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cb4950 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00cb4960 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cb4970 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x00cb4980 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00cb4990 5f565446 200a2020 6f757420 4c4f575f _VTF . out LOW_ │ │ │ │ - 0x00cb49a0 50207665 63342076 5f636f6c 6f723b20 P vec4 v_color; │ │ │ │ - 0x00cb49b0 0a202023 656c7365 200a2020 6f757420 . #else . out │ │ │ │ - 0x00cb49c0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x00cb49d0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x00cb49e0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00cb49f0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00cb4a00 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00cb4a10 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x00cb4a20 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x00cb4a30 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x00cb4a40 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x00cb4a50 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x00cb4a60 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00cb4a70 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x00cb4a80 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x00cb4a90 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x00cb4aa0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x00cb4ab0 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x00cb4ac0 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x00cb4ad0 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ - 0x00cb4ae0 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x00cb4af0 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x00cb4b00 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x00cb4b10 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ - 0x00cb4b20 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00cb4b30 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00cb4b40 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00cb4b50 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00cb4b60 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00cb4b70 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00cb4b80 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00cb4b90 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00cb4ba0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00cb4bb0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00cb4bc0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00cb4bd0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00cb4be0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cb4bf0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00cb4c00 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00cb4c10 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00cb4c20 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00cb4c30 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00cb4c40 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cb4c50 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00cb4c60 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00cb4c70 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00cb4c80 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cb4c90 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00cb4ca0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00cb4cb0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cb4cc0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00cb4cd0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00cb4ce0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb4cf0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00cb4d00 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00cb4d10 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cb4d20 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00cb4d30 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00cb4d40 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00cb4d50 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00cb4d60 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00cb4d70 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00cb4d80 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00cb4d90 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00cb4da0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00cb4db0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00cb4dc0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00cb4dd0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00cb4de0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00cb4df0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00cb4e00 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00cb4e10 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00cb4e20 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cb4e30 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00cb4e40 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00cb4e50 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00cb4e60 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00cb4e70 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00cb4e80 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00cb4e90 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00cb4ea0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00cb4eb0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00cb4ec0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00cb4ed0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00cb4ee0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00cb4ef0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00cb4f00 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00cb4f10 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00cb4f20 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00cb4f30 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00cb4f40 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00cb4f50 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00cb4f60 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00cb4f70 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00cb4f80 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00cb4f90 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00cb4fa0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00cb4fb0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00cb4fc0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00cb4fd0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00cb4fe0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00cb4ff0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00cb5000 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00cb5010 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00cb5020 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00cb5030 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00cb5040 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00cb5050 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00cb5060 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00cb5070 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00cb5080 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00cb5090 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00cb50a0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00cb50b0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00cb50c0 206e6f72 6d616c20 3d20615f 6e6f726d normal = a_norm │ │ │ │ - 0x00cb50d0 616c2e78 793b200a 20202020 666c6f61 al.xy; . floa │ │ │ │ - 0x00cb50e0 74206861 6c665769 64746820 3d206c65 t halfWidth = le │ │ │ │ - 0x00cb50f0 6e677468 286e6f72 6d616c29 3b200a20 ngth(normal); . │ │ │ │ - 0x00cb5100 20202076 65633220 7472616e 73666f72 vec2 transfor │ │ │ │ - 0x00cb5110 6d656441 78697350 6f73203d 20287665 medAxisPos = (ve │ │ │ │ - 0x00cb5120 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x00cb5130 2c20302e 302c2031 2e302920 2a20755f , 0.0, 1.0) * u_ │ │ │ │ - 0x00cb5140 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x00cb5150 20202020 69662028 68616c66 57696474 if (halfWidt │ │ │ │ - 0x00cb5160 6820213d 20302e30 29200a20 2020207b h != 0.0) . { │ │ │ │ - 0x00cb5170 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ - 0x00cb5180 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ - 0x00cb5190 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x00cb51a0 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ - 0x00cb51b0 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ - 0x00cb51c0 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ - 0x00cb51d0 616c2c20 0a202020 20202020 20202020 al, . │ │ │ │ - 0x00cb51e0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb51f0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb5200 20202020 20202020 20202075 5f6d6f64 u_mod │ │ │ │ - 0x00cb5210 656c5669 65772c20 68616c66 57696474 elView, halfWidt │ │ │ │ - 0x00cb5220 68293b20 0a202020 207d200a 20202369 h); . } . #i │ │ │ │ - 0x00cb5230 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x00cb5240 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ - 0x00cb5250 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ - 0x00cb5260 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ - 0x00cb5270 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ - 0x00cb5280 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00cb5290 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ - 0x00cb52a0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x00cb52b0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x00cb52c0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00cb52d0 41786973 506f732c 20615f70 6f736974 AxisPos, a_posit │ │ │ │ - 0x00cb52e0 696f6e2e 7a2c2031 2e302920 2a20755f ion.z, 1.0) * u_ │ │ │ │ - 0x00cb52f0 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ - 0x00cb5300 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x00cb5310 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00cb5320 726d2870 6f732c20 755f7069 766f7454 rm(pos, u_pivotT │ │ │ │ - 0x00cb5330 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ - 0x00cb5340 0a20207d 200a0000 00000000 00000000 . } ........... │ │ │ │ - 0x00cb5350 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb5360 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb5370 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb5380 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb5390 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb53a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb53b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb53c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb53d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb53e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb53f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb5400 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb5410 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb5420 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb5430 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb5440 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb5450 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb5460 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb5470 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb5480 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb5490 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb54a0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00cb54b0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cb54c0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cb54d0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb54e0 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ - 0x00cb54f0 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ - 0x00cb5500 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ - 0x00cb5510 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ - 0x00cb5520 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x00cb5530 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x00cb5540 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cb5550 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cb5560 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cb5570 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cb5580 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cb5590 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cb55a0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00cb55b0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00cb55c0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00cb55d0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cb55e0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00cb55f0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cb5600 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00cb5610 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cb5620 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00cb5630 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00cb5640 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00cb5650 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00cb5660 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00cb5670 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00cb5680 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00cb5690 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00cb56a0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00cb56b0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00cb56c0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00cb56d0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00cb56e0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00cb56f0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00cb5700 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00cb5710 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00cb5720 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00cb5730 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00cb5740 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00cb5750 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00cb5760 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00cb5770 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb5780 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00cb5790 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00cb57a0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00cb57b0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00cb57c0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00cb57d0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00cb57e0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00cb57f0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00cb5800 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00cb5810 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00cb5820 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00cb5830 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00cb5840 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00cb5850 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00cb5860 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cb5870 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cb5880 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cb5890 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00cb58a0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00cb58b0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00cb58c0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00cb58d0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cb58e0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cb58f0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cb5900 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00cb5910 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00cb5920 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x00cb5930 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00cb5940 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00cb5950 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00cb5960 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00cb5970 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00cb5980 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00cb5990 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00cb59a0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00cb59b0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00cb59c0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00cb59d0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00cb59e0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cb59f0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00cb5a00 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00cb5a10 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00cb5a20 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x00cb5a30 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00cb5a40 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cb5a50 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00cb5a60 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00cb5a70 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00cb5a80 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00cb5a90 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00cb5aa0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00cb5ab0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00cb5ac0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00cb5ad0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00cb5ae0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00cb5af0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00cb5b00 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00cb5b10 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00cb5b20 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00cb5b30 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00cb5b40 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00cb5b50 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00cb5b60 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cb5b70 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00cb5b80 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00cb5b90 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00cb5ba0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00cb5bb0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00cb5bc0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00cb5bd0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x00cb5be0 65633428 615f706f 73697469 6f6e2e78 ec4(a_position.x │ │ │ │ - 0x00cb5bf0 797a2c20 3129202a 20755f6d 6f64656c yz, 1) * u_model │ │ │ │ - 0x00cb5c00 56696577 3b200a20 20202076 65633420 View; . vec4 │ │ │ │ - 0x00cb5c10 73686966 74656450 6f73203d 20766563 shiftedPos = vec │ │ │ │ - 0x00cb5c20 3428615f 6e6f726d 616c2c20 302c2030 4(a_normal, 0, 0 │ │ │ │ - 0x00cb5c30 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ - 0x00cb5c40 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ - 0x00cb5c50 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00cb5c60 73686966 74656450 6f73202a 20755f70 shiftedPos * u_p │ │ │ │ - 0x00cb5c70 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ - 0x00cb5c80 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ - 0x00cb5c90 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ - 0x00cb5ca0 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ - 0x00cb5cb0 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00cb5cc0 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ - 0x00cb5cd0 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ - 0x00cb5ce0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ - 0x00cb5cf0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb5d00 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb5d10 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb5d20 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb5d30 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb5d40 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb5d50 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb5d60 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb5d70 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb5d80 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb5d90 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb5da0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb5db0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb5dc0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb5dd0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb5de0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb5df0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb5e00 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb5e10 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb5e20 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb5e30 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb5e40 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00cb5e50 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cb5e60 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cb5e70 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb5e80 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ - 0x00cb5e90 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ - 0x00cb5ea0 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ - 0x00cb5eb0 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ - 0x00cb5ec0 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x00cb5ed0 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x00cb5ee0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cb5ef0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cb5f00 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cb5f10 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cb5f20 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cb5f30 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cb5f40 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00cb5f50 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00cb5f60 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00cb5f70 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cb5f80 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00cb5f90 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cb5fa0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00cb5fb0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cb5fc0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00cb5fd0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00cb5fe0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00cb5ff0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00cb6000 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00cb6010 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00cb6020 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00cb6030 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00cb6040 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00cb6050 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00cb6060 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00cb6070 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00cb6080 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00cb6090 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00cb60a0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00cb60b0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00cb60c0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00cb60d0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00cb60e0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00cb60f0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00cb6100 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00cb6110 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb6120 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00cb6130 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00cb6140 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00cb6150 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00cb6160 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00cb6170 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00cb6180 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00cb6190 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00cb61a0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00cb61b0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00cb61c0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00cb61d0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00cb61e0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00cb61f0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00cb6200 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cb6210 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cb6220 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cb6230 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00cb6240 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00cb6250 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00cb6260 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00cb6270 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cb6280 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cb6290 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cb62a0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00cb62b0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00cb62c0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x00cb62d0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00cb62e0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00cb62f0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00cb6300 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00cb6310 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00cb6320 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00cb6330 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00cb6340 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00cb6350 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00cb6360 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00cb6370 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00cb6380 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cb6390 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00cb63a0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00cb63b0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00cb63c0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x00cb63d0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00cb63e0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cb63f0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00cb6400 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00cb6410 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00cb6420 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00cb6430 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00cb6440 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00cb6450 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00cb6460 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00cb6470 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00cb6480 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00cb6490 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00cb64a0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00cb64b0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00cb64c0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00cb64d0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00cb64e0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00cb64f0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00cb6500 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cb6510 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00cb6520 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00cb6530 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00cb6540 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00cb6550 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00cb6560 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00cb6570 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ - 0x00cb6580 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ - 0x00cb6590 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ - 0x00cb65a0 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x00cb65b0 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ - 0x00cb65c0 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ - 0x00cb65d0 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ - 0x00cb65e0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ - 0x00cb65f0 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ - 0x00cb6600 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00cb6610 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ - 0x00cb6620 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x00cb6630 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ - 0x00cb6640 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb6650 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb6660 20202020 20202020 20202020 2020615f a_ │ │ │ │ - 0x00cb6670 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ - 0x00cb6680 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ - 0x00cb6690 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ - 0x00cb66a0 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ - 0x00cb66b0 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00cb66c0 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ - 0x00cb66d0 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ - 0x00cb66e0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ - 0x00cb66f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb6700 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb6710 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb6720 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb6730 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb6740 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb6750 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb6760 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb6770 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb6780 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb6790 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb67a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb67b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb67c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb67d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb67e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb67f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb6800 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb6810 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb6820 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb6830 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb6840 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ - 0x00cb6850 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ - 0x00cb6860 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ - 0x00cb6870 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ - 0x00cb6880 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x00cb6890 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cb68a0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cb68b0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cb68c0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cb68d0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cb68e0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cb68f0 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ - 0x00cb6900 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x00cb6910 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ - 0x00cb6920 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cb6930 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ - 0x00cb6940 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ - 0x00cb6950 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ - 0x00cb6960 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00cb6970 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ - 0x00cb6980 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ - 0x00cb6990 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00cb69a0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00cb69b0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00cb69c0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00cb69d0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cb69e0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cb69f0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cb6a00 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00cb6a10 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00cb6a20 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00cb6a30 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00cb6a40 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb6a50 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00cb6a60 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00cb6a70 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00cb6a80 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00cb6a90 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00cb6aa0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00cb6ab0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cb6ac0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00cb6ad0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00cb6ae0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00cb6af0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00cb6b00 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00cb6b10 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb6b20 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00cb6b30 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00cb6b40 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb6b50 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00cb6b60 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00cb6b70 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00cb6b80 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00cb6b90 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00cb6ba0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00cb6bb0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00cb6bc0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00cb6bd0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00cb6be0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00cb6bf0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x00cb6c00 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x00cb6c10 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00cb6c20 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00cb6c30 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00cb6c40 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00cb6c50 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cb6c60 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00cb6c70 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00cb6c80 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00cb6c90 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00cb6ca0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00cb6cb0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00cb6cc0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00cb6cd0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00cb6ce0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x00cb6cf0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb6d00 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x00cb6d10 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x00cb6d20 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00cb6d30 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00cb6d40 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cb6d50 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00cb6d60 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00cb6d70 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00cb6d80 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00cb6d90 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00cb6da0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00cb6db0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00cb6dc0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00cb6dd0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00cb6de0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x00cb6df0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x00cb6e00 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x00cb6e10 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x00cb6e20 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00cb6e30 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00cb6e40 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00cb6e50 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00cb6e60 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00cb6e70 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00cb6e80 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00cb6e90 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00cb6ea0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00cb6eb0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00cb6ec0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00cb6ed0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00cb6ee0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x00cb6ef0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x00cb6f00 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00cb6f10 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x00cb6f20 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00cb6f30 20666c6f 61742073 696e5620 3d207369 float sinV = si │ │ │ │ - 0x00cb6f40 6e28755f 617a696d 7574293b 200a2020 n(u_azimut); . │ │ │ │ - 0x00cb6f50 2020666c 6f617420 636f7356 203d2063 float cosV = c │ │ │ │ - 0x00cb6f60 6f732875 5f617a69 6d757429 3b200a20 os(u_azimut); . │ │ │ │ - 0x00cb6f70 2020206d 61743420 726f7461 74696f6e mat4 rotation │ │ │ │ - 0x00cb6f80 3b200a20 20202072 6f746174 696f6e5b ; . rotation[ │ │ │ │ - 0x00cb6f90 305d203d 20766563 3428636f 73562c20 0] = vec4(cosV, │ │ │ │ - 0x00cb6fa0 73696e56 2c20302e 302c2030 2e30293b sinV, 0.0, 0.0); │ │ │ │ - 0x00cb6fb0 200a2020 2020726f 74617469 6f6e5b31 . rotation[1 │ │ │ │ - 0x00cb6fc0 5d203d20 76656334 282d7369 6e562c20 ] = vec4(-sinV, │ │ │ │ - 0x00cb6fd0 636f7356 2c20302e 302c2030 2e30293b cosV, 0.0, 0.0); │ │ │ │ - 0x00cb6fe0 200a2020 2020726f 74617469 6f6e5b32 . rotation[2 │ │ │ │ - 0x00cb6ff0 5d203d20 76656334 28302e30 2c20302e ] = vec4(0.0, 0. │ │ │ │ - 0x00cb7000 302c2031 2e302c20 302e3029 3b200a20 0, 1.0, 0.0); . │ │ │ │ - 0x00cb7010 20202072 6f746174 696f6e5b 335d203d rotation[3] = │ │ │ │ - 0x00cb7020 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ - 0x00cb7030 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00cb7040 76656334 20706f73 203d2076 65633428 vec4 pos = vec4( │ │ │ │ - 0x00cb7050 755f706f 73697469 6f6e2e78 797a2c20 u_position.xyz, │ │ │ │ - 0x00cb7060 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ - 0x00cb7070 65773b20 0a202020 20766563 34206e6f ew; . vec4 no │ │ │ │ - 0x00cb7080 726d616c 203d2076 65633428 615f6e6f rmal = vec4(a_no │ │ │ │ - 0x00cb7090 726d616c 2c20302c 2030293b 200a2020 rmal, 0, 0); . │ │ │ │ - 0x00cb70a0 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ - 0x00cb70b0 73203d20 6e6f726d 616c202a 20726f74 s = normal * rot │ │ │ │ - 0x00cb70c0 6174696f 6e202b20 706f733b 200a2020 ation + pos; . │ │ │ │ - 0x00cb70d0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00cb70e0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x00cb70f0 6f726d28 73686966 74656450 6f73202a orm(shiftedPos * │ │ │ │ - 0x00cb7100 20755f70 726f6a65 6374696f 6e2c2075 u_projection, u │ │ │ │ - 0x00cb7110 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ - 0x00cb7120 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ - 0x00cb7130 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x00cb7140 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb7150 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ - 0x00cb7160 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb7170 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb7180 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb7190 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb71a0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb71b0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb71c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb71d0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb71e0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb71f0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb7200 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb7210 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb7220 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb7230 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb7240 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb7250 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb7260 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb7270 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb7280 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb7290 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb72a0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb72b0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00cb72c0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cb72d0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cb72e0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb72f0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00cb7300 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00cb7310 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cb7320 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00cb7330 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00cb7340 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00cb7350 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00cb7360 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00cb7370 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00cb7380 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00cb7390 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cb73a0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00cb73b0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00cb73c0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00cb73d0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00cb73e0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00cb73f0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00cb7400 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00cb7410 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00cb7420 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00cb7430 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00cb7440 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00cb7450 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00cb7460 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cb7470 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00cb7480 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00cb7490 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cb74a0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00cb74b0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00cb74c0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00cb74d0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cb74e0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00cb74f0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cb7500 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cb7510 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00cb7520 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00cb7530 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb7540 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00cb7550 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00cb7560 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cb7570 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cb7580 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00cb7590 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00cb75a0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cb75b0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00cb75c0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00cb75d0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb75e0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cb75f0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cb7600 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb7610 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00cb7620 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00cb7630 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00cb7640 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00cb7650 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00cb7660 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00cb7670 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00cb7680 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00cb7690 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00cb76a0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00cb76b0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00cb76c0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00cb76d0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00cb76e0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00cb76f0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00cb7700 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00cb7710 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cb7720 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00cb7730 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00cb7740 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00cb7750 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cb7760 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00cb7770 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00cb7780 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00cb7790 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00cb77a0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00cb77b0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00cb77c0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00cb77d0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00cb77e0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00cb77f0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00cb7800 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00cb7810 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00cb7820 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cb7830 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00cb7840 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00cb7850 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00cb7860 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00cb7870 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00cb7880 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00cb7890 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00cb78a0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00cb78b0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00cb78c0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00cb78d0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00cb78e0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00cb78f0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00cb7900 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cb7910 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00cb7920 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00cb7930 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00cb7940 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00cb7950 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00cb7960 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00cb7970 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00cb7980 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cb7990 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00cb79a0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00cb79b0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x00cb79c0 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ - 0x00cb79d0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00cb79e0 2020666c 6f617420 6e6f726d 616c4c65 float normalLe │ │ │ │ - 0x00cb79f0 6e203d20 6c656e67 74682861 5f6e6f72 n = length(a_nor │ │ │ │ - 0x00cb7a00 6d616c29 3b200a20 20202076 65633420 mal); . vec4 │ │ │ │ - 0x00cb7a10 6e203d20 76656334 28615f70 6f736974 n = vec4(a_posit │ │ │ │ - 0x00cb7a20 696f6e2e 7879202b 20615f6e 6f726d61 ion.xy + a_norma │ │ │ │ - 0x00cb7a30 6c202a20 6b536861 7065436f 6f726453 l * kShapeCoordS │ │ │ │ - 0x00cb7a40 63616c61 722c2030 2e302c20 302e3029 calar, 0.0, 0.0) │ │ │ │ - 0x00cb7a50 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x00cb7a60 0a202020 20766563 34206e6f 726d203d . vec4 norm = │ │ │ │ - 0x00cb7a70 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ - 0x00cb7a80 302e302c 20302e30 293b200a 20202020 0.0, 0.0); . │ │ │ │ - 0x00cb7a90 69662028 646f7428 6e2c206e 2920213d if (dot(n, n) != │ │ │ │ - 0x00cb7aa0 20302e30 29200a20 20202020 206e6f72 0.0) . nor │ │ │ │ - 0x00cb7ab0 6d203d20 6e6f726d 616c697a 65286e29 m = normalize(n) │ │ │ │ - 0x00cb7ac0 202a206e 6f726d61 6c4c656e 3b200a20 * normalLen; . │ │ │ │ - 0x00cb7ad0 20202076 65633420 73686966 74656450 vec4 shiftedP │ │ │ │ - 0x00cb7ae0 6f73203d 206e6f72 6d202b20 706f733b os = norm + pos; │ │ │ │ - 0x00cb7af0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00cb7b00 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x00cb7b10 616e7366 6f726d28 73686966 74656450 ansform(shiftedP │ │ │ │ - 0x00cb7b20 6f73202a 20755f70 726f6a65 6374696f os * u_projectio │ │ │ │ - 0x00cb7b30 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x00cb7b40 6f726d2c 20302e30 293b200a 20202020 orm, 0.0); . │ │ │ │ - 0x00cb7b50 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x00cb7b60 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ - 0x00cb7b70 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ - 0x00cb7b80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb7b90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb7ba0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb7bb0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb7bc0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb7bd0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb7be0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb7bf0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb7c00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb7c10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb7c20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb7c30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb7c40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb7c50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb7c60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb7c70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb7c80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb7c90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb7ca0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb7cb0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb7cc0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb7cd0 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ - 0x00cb7ce0 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ - 0x00cb7cf0 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ - 0x00cb7d00 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ - 0x00cb7d10 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x00cb7d20 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cb7d30 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cb7d40 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cb7d50 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cb7d60 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cb7d70 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cb7d80 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ - 0x00cb7d90 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x00cb7da0 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ - 0x00cb7db0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cb7dc0 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ - 0x00cb7dd0 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ - 0x00cb7de0 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ - 0x00cb7df0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00cb7e00 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ - 0x00cb7e10 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ - 0x00cb7e20 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00cb7e30 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00cb7e40 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00cb7e50 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00cb7e60 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cb7e70 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cb7e80 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cb7e90 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00cb7ea0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00cb7eb0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00cb7ec0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00cb7ed0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb7ee0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00cb7ef0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00cb7f00 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00cb7f10 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00cb7f20 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00cb7f30 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00cb7f40 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cb7f50 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00cb7f60 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00cb7f70 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00cb7f80 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00cb7f90 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00cb7fa0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cb7fb0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00cb7fc0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00cb7fd0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb7fe0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00cb7ff0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00cb8000 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00cb8010 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00cb8020 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00cb8030 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00cb8040 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00cb8050 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00cb8060 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00cb8070 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00cb8080 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x00cb8090 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x00cb80a0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00cb80b0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00cb80c0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00cb80d0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00cb80e0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cb80f0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00cb8100 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00cb8110 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00cb8120 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00cb8130 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00cb8140 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00cb8150 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00cb8160 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00cb8170 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x00cb8180 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb8190 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x00cb81a0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x00cb81b0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00cb81c0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00cb81d0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cb81e0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00cb81f0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00cb8200 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00cb8210 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00cb8220 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00cb8230 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00cb8240 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00cb8250 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00cb8260 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00cb8270 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x00cb8280 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x00cb8290 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x00cb82a0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x00cb82b0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00cb82c0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00cb82d0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00cb82e0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00cb82f0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00cb8300 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00cb8310 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00cb8320 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00cb8330 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00cb8340 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00cb8350 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00cb8360 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00cb8370 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x00cb8380 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x00cb8390 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00cb83a0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x00cb83b0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00cb83c0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00cb83d0 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ - 0x00cb83e0 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ - 0x00cb83f0 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ - 0x00cb8400 20202076 65633420 6e6f726d 616c203d vec4 normal = │ │ │ │ - 0x00cb8410 20766563 3428615f 6e6f726d 616c202a vec4(a_normal * │ │ │ │ - 0x00cb8420 20755f61 63637572 6163792c 20302e30 u_accuracy, 0.0 │ │ │ │ - 0x00cb8430 2c20302e 30293b20 0a202020 20706f73 , 0.0); . pos │ │ │ │ - 0x00cb8440 6974696f 6e203d20 28706f73 6974696f ition = (positio │ │ │ │ - 0x00cb8450 6e202b20 6e6f726d 616c2920 2a20755f n + normal) * u_ │ │ │ │ - 0x00cb8460 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ - 0x00cb8470 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x00cb8480 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00cb8490 726d2870 6f736974 696f6e2c 20755f70 rm(position, u_p │ │ │ │ - 0x00cb84a0 69766f74 5472616e 73666f72 6d2c2075 ivotTransform, u │ │ │ │ - 0x00cb84b0 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ - 0x00cb84c0 7a536361 6c65293b 200a2020 2020765f zScale); . v_ │ │ │ │ - 0x00cb84d0 636f6c6f 72546578 436f6f72 6473203d colorTexCoords = │ │ │ │ - 0x00cb84e0 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ - 0x00cb84f0 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ - 0x00cb8500 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb8510 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb8520 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb8530 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb8540 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb8550 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb8560 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb8570 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb8580 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb8590 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb85a0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb85b0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb85c0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb85d0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb85e0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb85f0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb8600 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb8610 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb8620 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb8630 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb8640 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb8650 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cb8660 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cb8670 616c3b20 0a202069 6e207665 63332061 al; . in vec3 a │ │ │ │ - 0x00cb8680 5f6c656e 6774683b 200a2020 696e2076 _length; . in v │ │ │ │ - 0x00cb8690 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x00cb86a0 6f757420 76656333 20765f6c 656e6774 out vec3 v_lengt │ │ │ │ - 0x00cb86b0 683b200a 20206f75 74207665 63342076 h; . out vec4 v │ │ │ │ - 0x00cb86c0 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ - 0x00cb86d0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cb86e0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cb86f0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cb8700 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cb8710 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cb8720 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cb8730 76656334 20755f72 6f757465 50617261 vec4 u_routePara │ │ │ │ - 0x00cb8740 6d733b20 0a202075 6e69666f 726d2076 ms; . uniform v │ │ │ │ - 0x00cb8750 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ - 0x00cb8760 756e6966 6f726d20 76656334 20755f6d uniform vec4 u_m │ │ │ │ - 0x00cb8770 61736b43 6f6c6f72 3b200a20 20756e69 askColor; . uni │ │ │ │ - 0x00cb8780 666f726d 20766563 3420755f 6f75746c form vec4 u_outl │ │ │ │ - 0x00cb8790 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ - 0x00cb87a0 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ - 0x00cb87b0 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ - 0x00cb87c0 6d207665 63342075 5f66616b 654f7574 m vec4 u_fakeOut │ │ │ │ - 0x00cb87d0 6c696e65 436f6c6f 723b200a 2020756e lineColor; . un │ │ │ │ - 0x00cb87e0 69666f72 6d207665 63322075 5f66616b iform vec2 u_fak │ │ │ │ - 0x00cb87f0 65426f72 64657273 3b200a20 20756e69 eBorders; . uni │ │ │ │ - 0x00cb8800 666f726d 20766563 3220755f 70617474 form vec2 u_patt │ │ │ │ - 0x00cb8810 65726e3b 200a2020 756e6966 6f726d20 ern; . uniform │ │ │ │ - 0x00cb8820 76656332 20755f61 6e676c65 436f7353 vec2 u_angleCosS │ │ │ │ - 0x00cb8830 696e3b20 0a202075 6e69666f 726d2066 in; . uniform f │ │ │ │ - 0x00cb8840 6c6f6174 20755f61 72726f77 48616c66 loat u_arrowHalf │ │ │ │ - 0x00cb8850 57696474 683b200a 2020756e 69666f72 Width; . unifor │ │ │ │ - 0x00cb8860 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00cb8870 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ - 0x00cb8880 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00cb8890 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00cb88a0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00cb88b0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00cb88c0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00cb88d0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00cb88e0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00cb88f0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00cb8900 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00cb8910 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00cb8920 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00cb8930 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00cb8940 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00cb8950 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00cb8960 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00cb8970 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00cb8980 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00cb8990 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00cb89a0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00cb89b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cb89c0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00cb89d0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00cb89e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cb89f0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00cb8a00 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00cb8a10 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00cb8a20 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00cb8a30 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00cb8a40 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00cb8a50 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cb8a60 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00cb8a70 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00cb8a80 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00cb8a90 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00cb8aa0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00cb8ab0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00cb8ac0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00cb8ad0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00cb8ae0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00cb8af0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00cb8b00 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00cb8b10 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00cb8b20 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00cb8b30 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00cb8b40 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00cb8b50 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00cb8b60 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00cb8b70 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00cb8b80 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00cb8b90 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00cb8ba0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00cb8bb0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00cb8bc0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00cb8bd0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00cb8be0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00cb8bf0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00cb8c00 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00cb8c10 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00cb8c20 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00cb8c30 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00cb8c40 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00cb8c50 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00cb8c60 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00cb8c70 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00cb8c80 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00cb8c90 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00cb8ca0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00cb8cb0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00cb8cc0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00cb8cd0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00cb8ce0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00cb8cf0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00cb8d00 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00cb8d10 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00cb8d20 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00cb8d30 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00cb8d40 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00cb8d50 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00cb8d60 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00cb8d70 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00cb8d80 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x00cb8d90 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x00cb8da0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00cb8db0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00cb8dc0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00cb8dd0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00cb8de0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00cb8df0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00cb8e00 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00cb8e10 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ - 0x00cb8e20 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ - 0x00cb8e30 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ - 0x00cb8e40 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ - 0x00cb8e50 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ - 0x00cb8e60 3b200a20 20202076 65633220 6c656e20 ; . vec2 len │ │ │ │ - 0x00cb8e70 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ - 0x00cb8e80 782c2061 5f6c656e 6774682e 7a293b20 x, a_length.z); │ │ │ │ - 0x00cb8e90 0a202020 20696620 28646f74 28615f6e . if (dot(a_n │ │ │ │ - 0x00cb8ea0 6f726d61 6c2c2061 5f6e6f72 6d616c29 ormal, a_normal) │ │ │ │ - 0x00cb8eb0 20213d20 302e3029 200a2020 20207b20 != 0.0) . { │ │ │ │ - 0x00cb8ec0 0a202020 20202076 65633220 6e6f726d . vec2 norm │ │ │ │ - 0x00cb8ed0 203d2061 5f6e6f72 6d616c20 2a20755f = a_normal * u_ │ │ │ │ - 0x00cb8ee0 726f7574 65506172 616d732e 783b200a routeParams.x; . │ │ │ │ - 0x00cb8ef0 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ - 0x00cb8f00 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ - 0x00cb8f10 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00cb8f20 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ - 0x00cb8f30 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ - 0x00cb8f40 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ - 0x00cb8f50 0a202020 20202020 20202020 20202020 . │ │ │ │ - 0x00cb8f60 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb8f70 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb8f80 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ - 0x00cb8f90 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ - 0x00cb8fa0 293b200a 20202020 20206966 2028755f ); . if (u_ │ │ │ │ - 0x00cb8fb0 726f7574 65506172 616d732e 7920213d routeParams.y != │ │ │ │ - 0x00cb8fc0 20302e30 29200a20 20202020 2020206c 0.0) . l │ │ │ │ - 0x00cb8fd0 656e203d 20766563 3228615f 6c656e67 en = vec2(a_leng │ │ │ │ - 0x00cb8fe0 74682e78 202b2061 5f6c656e 6774682e th.x + a_length. │ │ │ │ - 0x00cb8ff0 79202a20 755f726f 75746550 6172616d y * u_routeParam │ │ │ │ - 0x00cb9000 732e792c 20615f6c 656e6774 682e7a29 s.y, a_length.z) │ │ │ │ - 0x00cb9010 3b200a20 2020207d 200a2020 2020765f ; . } . v_ │ │ │ │ - 0x00cb9020 6c656e67 7468203d 20766563 33286c65 length = vec3(le │ │ │ │ - 0x00cb9030 6e2c2075 5f726f75 74655061 72616d73 n, u_routeParams │ │ │ │ - 0x00cb9040 2e7a293b 200a2020 2020765f 636f6c6f .z); . v_colo │ │ │ │ - 0x00cb9050 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x00cb9060 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x00cb9070 34287472 616e7366 6f726d65 64417869 4(transformedAxi │ │ │ │ - 0x00cb9080 73506f73 2c20615f 706f7369 74696f6e sPos, a_position │ │ │ │ - 0x00cb9090 2e7a2c20 312e3029 202a2075 5f70726f .z, 1.0) * u_pro │ │ │ │ - 0x00cb90a0 6a656374 696f6e3b 200a2020 2020676c jection; . gl │ │ │ │ - 0x00cb90b0 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ - 0x00cb90c0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00cb90d0 706f732c 20755f70 69766f74 5472616e pos, u_pivotTran │ │ │ │ - 0x00cb90e0 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ - 0x00cb90f0 7d200a00 00000000 00000000 00000000 } .............. │ │ │ │ - 0x00cb9100 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb9110 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb9120 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb9130 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb9140 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb9150 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb9160 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb9170 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb9180 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb9190 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb91a0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb91b0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb91c0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb91d0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb91e0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb91f0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb9200 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb9210 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb9220 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb9230 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb9240 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb9250 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00cb9260 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cb9270 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cb9280 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cb9290 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00cb92a0 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00cb92b0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cb92c0 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00cb92d0 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00cb92e0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00cb92f0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00cb9300 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00cb9310 6e69666f 726d2076 65633420 755f726f niform vec4 u_ro │ │ │ │ - 0x00cb9320 75746550 6172616d 733b200a 2020756e uteParams; . un │ │ │ │ - 0x00cb9330 69666f72 6d207665 63342075 5f636f6c iform vec4 u_col │ │ │ │ - 0x00cb9340 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ - 0x00cb9350 65633420 755f6d61 736b436f 6c6f723b ec4 u_maskColor; │ │ │ │ - 0x00cb9360 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00cb9370 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ - 0x00cb9380 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00cb9390 20755f66 616b6543 6f6c6f72 3b200a20 u_fakeColor; . │ │ │ │ - 0x00cb93a0 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ - 0x00cb93b0 66616b65 4f75746c 696e6543 6f6c6f72 fakeOutlineColor │ │ │ │ - 0x00cb93c0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00cb93d0 3220755f 66616b65 426f7264 6572733b 2 u_fakeBorders; │ │ │ │ - 0x00cb93e0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x00cb93f0 20755f70 61747465 726e3b20 0a202075 u_pattern; . u │ │ │ │ - 0x00cb9400 6e69666f 726d2076 65633220 755f616e niform vec2 u_an │ │ │ │ - 0x00cb9410 676c6543 6f735369 6e3b200a 2020756e gleCosSin; . un │ │ │ │ - 0x00cb9420 69666f72 6d20666c 6f617420 755f6172 iform float u_ar │ │ │ │ - 0x00cb9430 726f7748 616c6657 69647468 3b200a20 rowHalfWidth; . │ │ │ │ - 0x00cb9440 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00cb9450 5f6f7061 63697479 3b200a20 20636f6e _opacity; . con │ │ │ │ - 0x00cb9460 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00cb9470 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00cb9480 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00cb9490 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00cb94a0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00cb94b0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00cb94c0 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00cb94d0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x00cb94e0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00cb94f0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x00cb9500 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x00cb9510 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x00cb9520 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cb9530 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00cb9540 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cb9550 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cb9560 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00cb9570 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00cb9580 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cb9590 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00cb95a0 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00cb95b0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00cb95c0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cb95d0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x00cb95e0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x00cb95f0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cb9600 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x00cb9610 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x00cb9620 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cb9630 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00cb9640 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cb9650 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00cb9660 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00cb9670 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00cb9680 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00cb9690 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00cb96a0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00cb96b0 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00cb96c0 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x00cb96d0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x00cb96e0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x00cb96f0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x00cb9700 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00cb9710 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x00cb9720 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x00cb9730 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00cb9740 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x00cb9750 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x00cb9760 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00cb9770 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x00cb9780 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00cb9790 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x00cb97a0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00cb97b0 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x00cb97c0 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x00cb97d0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x00cb97e0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x00cb97f0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x00cb9800 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x00cb9810 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00cb9820 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x00cb9830 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x00cb9840 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x00cb9850 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x00cb9860 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x00cb9870 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00cb9880 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x00cb9890 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x00cb98a0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00cb98b0 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x00cb98c0 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x00cb98d0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x00cb98e0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x00cb98f0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x00cb9900 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x00cb9910 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x00cb9920 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x00cb9930 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x00cb9940 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x00cb9950 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00cb9960 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x00cb9970 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x00cb9980 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00cb9990 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x00cb99a0 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x00cb99b0 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x00cb99c0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00cb99d0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cb99e0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x00cb99f0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ - 0x00cb9a00 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ - 0x00cb9a10 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ - 0x00cb9a20 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ - 0x00cb9a30 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ - 0x00cb9a40 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ - 0x00cb9a50 2028646f 7428615f 6e6f726d 616c2c20 (dot(a_normal, │ │ │ │ - 0x00cb9a60 615f6e6f 726d616c 2920213d 20302e30 a_normal) != 0.0 │ │ │ │ - 0x00cb9a70 29200a20 2020207b 200a2020 20202020 ) . { . │ │ │ │ - 0x00cb9a80 76656332 206e6f72 6d203d20 615f6e6f vec2 norm = a_no │ │ │ │ - 0x00cb9a90 726d616c 202a2075 5f617272 6f774861 rmal * u_arrowHa │ │ │ │ - 0x00cb9aa0 6c665769 6474683b 200a2020 20202020 lfWidth; . │ │ │ │ - 0x00cb9ab0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ - 0x00cb9ac0 6f73203d 2063616c 634c696e 65547261 os = calcLineTra │ │ │ │ - 0x00cb9ad0 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ - 0x00cb9ae0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ - 0x00cb9af0 6f732c20 615f706f 73697469 6f6e2e78 os, a_position.x │ │ │ │ - 0x00cb9b00 79202b20 6e6f726d 2c200a20 20202020 y + norm, . │ │ │ │ - 0x00cb9b10 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb9b20 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb9b30 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cb9b40 20755f6d 6f64656c 56696577 2c206c65 u_modelView, le │ │ │ │ - 0x00cb9b50 6e677468 286e6f72 6d29293b 200a2020 ngth(norm)); . │ │ │ │ - 0x00cb9b60 20207d20 0a202020 20765f63 6f6c6f72 } . v_color │ │ │ │ - 0x00cb9b70 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ - 0x00cb9b80 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x00cb9b90 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x00cb9ba0 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ - 0x00cb9bb0 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ - 0x00cb9bc0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ - 0x00cb9bd0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ - 0x00cb9be0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x00cb9bf0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00cb9c00 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ - 0x00cb9c10 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x00cb9c20 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ - 0x00cb9c30 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cb9c40 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cb9c50 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cb9c60 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cb9c70 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cb9c80 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cb9c90 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cb9ca0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cb9cb0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cb9cc0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cb9cd0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cb9ce0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cb9cf0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cb9d00 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cb9d10 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cb9d20 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cb9d30 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cb9d40 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cb9d50 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cb9d60 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cb9d70 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cb9d80 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00cb9d90 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00cb9da0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00cb9db0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00cb9dc0 65633420 765f7261 64697573 3b200a20 ec4 v_radius; . │ │ │ │ - 0x00cb9dd0 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ - 0x00cb9de0 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ - 0x00cb9df0 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x00cb9e00 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00cb9e10 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00cb9e20 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00cb9e30 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x00cb9e40 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x00cb9e50 755f726f 75746550 6172616d 733b200a u_routeParams; . │ │ │ │ - 0x00cb9e60 2020756e 69666f72 6d207665 63342075 uniform vec4 u │ │ │ │ - 0x00cb9e70 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ - 0x00cb9e80 726d2076 65633420 755f6d61 736b436f rm vec4 u_maskCo │ │ │ │ - 0x00cb9e90 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x00cb9ea0 76656334 20755f6f 75746c69 6e65436f vec4 u_outlineCo │ │ │ │ - 0x00cb9eb0 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x00cb9ec0 76656334 20755f66 616b6543 6f6c6f72 vec4 u_fakeColor │ │ │ │ - 0x00cb9ed0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00cb9ee0 3420755f 66616b65 4f75746c 696e6543 4 u_fakeOutlineC │ │ │ │ - 0x00cb9ef0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x00cb9f00 20766563 3220755f 66616b65 426f7264 vec2 u_fakeBord │ │ │ │ - 0x00cb9f10 6572733b 200a2020 756e6966 6f726d20 ers; . uniform │ │ │ │ - 0x00cb9f20 76656332 20755f70 61747465 726e3b20 vec2 u_pattern; │ │ │ │ - 0x00cb9f30 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ - 0x00cb9f40 755f616e 676c6543 6f735369 6e3b200a u_angleCosSin; . │ │ │ │ - 0x00cb9f50 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cb9f60 755f6172 726f7748 616c6657 69647468 u_arrowHalfWidth │ │ │ │ - 0x00cb9f70 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cb9f80 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ - 0x00cb9f90 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00cb9fa0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00cb9fb0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00cb9fc0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00cb9fd0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cb9fe0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cb9ff0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cba000 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00cba010 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00cba020 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00cba030 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00cba040 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cba050 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00cba060 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00cba070 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00cba080 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00cba090 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00cba0a0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00cba0b0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cba0c0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00cba0d0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00cba0e0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00cba0f0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00cba100 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00cba110 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cba120 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00cba130 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00cba140 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cba150 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00cba160 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00cba170 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00cba180 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00cba190 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00cba1a0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00cba1b0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00cba1c0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00cba1d0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00cba1e0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00cba1f0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x00cba200 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x00cba210 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00cba220 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00cba230 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00cba240 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00cba250 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cba260 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00cba270 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00cba280 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00cba290 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00cba2a0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00cba2b0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00cba2c0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00cba2d0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00cba2e0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x00cba2f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cba300 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x00cba310 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x00cba320 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00cba330 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00cba340 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cba350 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00cba360 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00cba370 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00cba380 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00cba390 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00cba3a0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00cba3b0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00cba3c0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00cba3d0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00cba3e0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x00cba3f0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x00cba400 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x00cba410 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x00cba420 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00cba430 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00cba440 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00cba450 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00cba460 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00cba470 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00cba480 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00cba490 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00cba4a0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00cba4b0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00cba4c0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00cba4d0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00cba4e0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x00cba4f0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x00cba500 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00cba510 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x00cba520 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00cba530 20666c6f 61742072 203d2075 5f726f75 float r = u_rou │ │ │ │ - 0x00cba540 74655061 72616d73 2e78202a 20615f6e teParams.x * a_n │ │ │ │ - 0x00cba550 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ - 0x00cba560 6332206e 6f726d61 6c203d20 76656332 c2 normal = vec2 │ │ │ │ - 0x00cba570 28615f6e 6f726d61 6c2e7820 2a20755f (a_normal.x * u_ │ │ │ │ - 0x00cba580 616e676c 65436f73 53696e2e 78202d20 angleCosSin.x - │ │ │ │ - 0x00cba590 615f6e6f 726d616c 2e79202a 20755f61 a_normal.y * u_a │ │ │ │ - 0x00cba5a0 6e676c65 436f7353 696e2e79 2c200a20 ngleCosSin.y, . │ │ │ │ - 0x00cba5b0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cba5c0 20202020 2020615f 6e6f726d 616c2e78 a_normal.x │ │ │ │ - 0x00cba5d0 202a2075 5f616e67 6c65436f 7353696e * u_angleCosSin │ │ │ │ - 0x00cba5e0 2e79202b 20615f6e 6f726d61 6c2e7920 .y + a_normal.y │ │ │ │ - 0x00cba5f0 2a20755f 616e676c 65436f73 53696e2e * u_angleCosSin. │ │ │ │ - 0x00cba600 78293b20 0a202020 20766563 34207261 x); . vec4 ra │ │ │ │ - 0x00cba610 64697573 203d2076 65633428 6e6f726d dius = vec4(norm │ │ │ │ - 0x00cba620 616c2e78 79202a20 722c2072 2c20615f al.xy * r, r, a_ │ │ │ │ - 0x00cba630 706f7369 74696f6e 2e77293b 200a2020 position.w); . │ │ │ │ - 0x00cba640 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x00cba650 3428615f 706f7369 74696f6e 2e78792c 4(a_position.xy, │ │ │ │ - 0x00cba660 20302c20 3129202a 20755f6d 6f64656c 0, 1) * u_model │ │ │ │ - 0x00cba670 56696577 3b200a20 20202076 65633220 View; . vec2 │ │ │ │ - 0x00cba680 73686966 74656450 6f73203d 20726164 shiftedPos = rad │ │ │ │ - 0x00cba690 6975732e 7879202b 20706f73 2e78793b ius.xy + pos.xy; │ │ │ │ - 0x00cba6a0 200a2020 2020706f 73203d20 76656334 . pos = vec4 │ │ │ │ - 0x00cba6b0 28736869 66746564 506f732c 20615f70 (shiftedPos, a_p │ │ │ │ - 0x00cba6c0 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ - 0x00cba6d0 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ - 0x00cba6e0 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x00cba6f0 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ - 0x00cba700 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ - 0x00cba710 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x00cba720 30293b20 0a202020 20765f72 61646975 0); . v_radiu │ │ │ │ - 0x00cba730 73203d20 72616469 75733b20 0a202020 s = radius; . │ │ │ │ - 0x00cba740 20765f63 6f6c6f72 203d2061 5f636f6c v_color = a_col │ │ │ │ - 0x00cba750 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ - 0x00cba760 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cba770 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cba780 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cba790 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cba7a0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cba7b0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cba7c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cba7d0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cba7e0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cba7f0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cba800 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cba810 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cba820 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cba830 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cba840 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cba850 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cba860 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cba870 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cba880 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cba890 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cba8a0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cba8b0 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ - 0x00cba8c0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cba8d0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cba8e0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cba8f0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00cba900 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00cba910 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cba920 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00cba930 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00cba940 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00cba950 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ - 0x00cba960 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ - 0x00cba970 69666f72 6d207665 63322075 5f706f73 iform vec2 u_pos │ │ │ │ - 0x00cba980 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ - 0x00cba990 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x00cba9a0 696e6550 6173733b 200a2020 756e6966 inePass; . unif │ │ │ │ - 0x00cba9b0 6f726d20 666c6f61 7420755f 6f706163 orm float u_opac │ │ │ │ - 0x00cba9c0 6974793b 200a2020 756e6966 6f726d20 ity; . uniform │ │ │ │ - 0x00cba9d0 666c6f61 7420755f 6c656e67 74683b20 float u_length; │ │ │ │ - 0x00cba9e0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x00cba9f0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x00cbaa00 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x00cbaa10 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x00cbaa20 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00cbaa30 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00cbaa40 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00cbaa50 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00cbaa60 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00cbaa70 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00cbaa80 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00cbaa90 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00cbaaa0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x00cbaab0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x00cbaac0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x00cbaad0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x00cbaae0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x00cbaaf0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x00cbab00 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x00cbab10 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x00cbab20 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00cbab30 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00cbab40 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00cbab50 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00cbab60 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00cbab70 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00cbab80 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00cbab90 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cbaba0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00cbabb0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00cbabc0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00cbabd0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x00cbabe0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x00cbabf0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x00cbac00 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00cbac10 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00cbac20 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00cbac30 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00cbac40 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00cbac50 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00cbac60 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00cbac70 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00cbac80 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00cbac90 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00cbaca0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cbacb0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00cbacc0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00cbacd0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x00cbace0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x00cbacf0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x00cbad00 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x00cbad10 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00cbad20 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00cbad30 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00cbad40 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cbad50 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00cbad60 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00cbad70 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00cbad80 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00cbad90 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00cbada0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00cbadb0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00cbadc0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00cbadd0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x00cbade0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x00cbadf0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00cbae00 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x00cbae10 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00cbae20 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00cbae30 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00cbae40 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cbae50 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00cbae60 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00cbae70 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00cbae80 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00cbae90 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00cbaea0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00cbaeb0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00cbaec0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00cbaed0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x00cbaee0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x00cbaef0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x00cbaf00 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x00cbaf10 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00cbaf20 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00cbaf30 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00cbaf40 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00cbaf50 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00cbaf60 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00cbaf70 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00cbaf80 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00cbaf90 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ - 0x00cbafa0 202b2061 5f706f73 6974696f 6e202b20 + a_position + │ │ │ │ - 0x00cbafb0 755f6c65 6e677468 202a2061 5f6e6f72 u_length * a_nor │ │ │ │ - 0x00cbafc0 6d616c2c 20302c20 3129202a 20755f70 mal, 0, 1) * u_p │ │ │ │ - 0x00cbafd0 726f6a65 6374696f 6e3b200a 20202369 rojection; . #i │ │ │ │ - 0x00cbafe0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00cbaff0 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ - 0x00cbb000 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ - 0x00cbb010 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00cbb020 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ - 0x00cbb030 6f6e2e7a 20202b20 676c5f50 6f736974 on.z + gl_Posit │ │ │ │ - 0x00cbb040 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ - 0x00cbb050 2023656e 64696620 0a202020 20765f63 #endif . v_c │ │ │ │ - 0x00cbb060 6f6c6f72 54657843 6f6f7264 73203d20 olorTexCoords = │ │ │ │ - 0x00cbb070 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x00cbb080 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x00cbb090 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cbb0a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cbb0b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cbb0c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cbb0d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cbb0e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cbb0f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cbb100 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cbb110 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cbb120 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cbb130 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cbb140 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cbb150 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cbb160 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cbb170 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cbb180 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cbb190 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cbb1a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cbb1b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cbb1c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cbb1d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cbb1e0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cbb1f0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cbb200 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cbb210 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cbb220 200a2020 696e2076 65633320 615f6c65 . in vec3 a_le │ │ │ │ - 0x00cbb230 6e677468 3b200a20 20236966 64656620 ngth; . #ifdef │ │ │ │ - 0x00cbb240 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ - 0x00cbb250 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ - 0x00cbb260 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ - 0x00cbb270 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x00cbb280 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ - 0x00cbb290 656e6469 66200a20 206f7574 20666c6f endif . out flo │ │ │ │ - 0x00cbb2a0 61742076 5f6c656e 67746859 3b200a20 at v_lengthY; . │ │ │ │ - 0x00cbb2b0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00cbb2c0 6d6f6465 6c566965 773b200a 2020756e modelView; . un │ │ │ │ - 0x00cbb2d0 69666f72 6d206d61 74342075 5f70726f iform mat4 u_pro │ │ │ │ - 0x00cbb2e0 6a656374 696f6e3b 200a2020 756e6966 jection; . unif │ │ │ │ - 0x00cbb2f0 6f726d20 6d617434 20755f70 69766f74 orm mat4 u_pivot │ │ │ │ - 0x00cbb300 5472616e 73666f72 6d3b200a 2020756e Transform; . un │ │ │ │ - 0x00cbb310 69666f72 6d207665 63342075 5f706f73 iform vec4 u_pos │ │ │ │ - 0x00cbb320 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ - 0x00cbb330 6d207665 63322075 5f6c696e 65506172 m vec2 u_linePar │ │ │ │ - 0x00cbb340 616d733b 200a2020 756e6966 6f726d20 ams; . uniform │ │ │ │ - 0x00cbb350 666c6f61 7420755f 61636375 72616379 float u_accuracy │ │ │ │ - 0x00cbb360 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cbb370 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00cbb380 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cbb390 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00cbb3a0 6f726d20 666c6f61 7420755f 617a696d orm float u_azim │ │ │ │ - 0x00cbb3b0 75743b20 0a202023 69666465 6620454e ut; . #ifdef EN │ │ │ │ - 0x00cbb3c0 41424c45 5f565446 200a2020 756e6966 ABLE_VTF . unif │ │ │ │ - 0x00cbb3d0 6f726d20 73616d70 6c657232 4420755f orm sampler2D u_ │ │ │ │ - 0x00cbb3e0 636f6c6f 72546578 3b200a20 2023656e colorTex; . #en │ │ │ │ - 0x00cbb3f0 64696620 0a202063 6f6e7374 20666c6f dif . const flo │ │ │ │ - 0x00cbb400 6174206b 416e7469 616c6961 73696e67 at kAntialiasing │ │ │ │ - 0x00cbb410 54687265 73686f6c 64203d20 302e3932 Threshold = 0.92 │ │ │ │ - 0x00cbb420 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00cbb430 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00cbb440 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00cbb450 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00cbb460 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00cbb470 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00cbb480 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00cbb490 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00cbb4a0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cbb4b0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cbb4c0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x00cbb4d0 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x00cbb4e0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x00cbb4f0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00cbb500 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x00cbb510 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00cbb520 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00cbb530 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00cbb540 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00cbb550 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00cbb560 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cbb570 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00cbb580 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00cbb590 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00cbb5a0 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x00cbb5b0 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x00cbb5c0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00cbb5d0 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x00cbb5e0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x00cbb5f0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x00cbb600 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00cbb610 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x00cbb620 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x00cbb630 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x00cbb640 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00cbb650 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00cbb660 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00cbb670 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00cbb680 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00cbb690 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00cbb6a0 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x00cbb6b0 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x00cbb6c0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x00cbb6d0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00cbb6e0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00cbb6f0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x00cbb700 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x00cbb710 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x00cbb720 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x00cbb730 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x00cbb740 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x00cbb750 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x00cbb760 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x00cbb770 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00cbb780 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x00cbb790 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x00cbb7a0 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x00cbb7b0 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x00cbb7c0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x00cbb7d0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00cbb7e0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x00cbb7f0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x00cbb800 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x00cbb810 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x00cbb820 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x00cbb830 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x00cbb840 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x00cbb850 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x00cbb860 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x00cbb870 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x00cbb880 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x00cbb890 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x00cbb8a0 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x00cbb8b0 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x00cbb8c0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x00cbb8d0 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x00cbb8e0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x00cbb8f0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x00cbb900 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x00cbb910 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x00cbb920 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x00cbb930 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x00cbb940 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x00cbb950 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00cbb960 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x00cbb970 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x00cbb980 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x00cbb990 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00cbb9a0 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x00cbb9b0 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x00cbb9c0 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x00cbb9d0 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x00cbb9e0 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x00cbb9f0 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x00cbba00 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x00cbba10 200a2020 20207665 6332206c 656e203d . vec2 len = │ │ │ │ - 0x00cbba20 20766563 3228615f 6c656e67 74682e78 vec2(a_length.x │ │ │ │ - 0x00cbba30 2c20615f 6c656e67 74682e7a 293b200a , a_length.z); . │ │ │ │ - 0x00cbba40 20202020 69662028 646f7428 615f6e6f if (dot(a_no │ │ │ │ - 0x00cbba50 726d616c 2c20615f 6e6f726d 616c2920 rmal, a_normal) │ │ │ │ - 0x00cbba60 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ - 0x00cbba70 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ - 0x00cbba80 3d20615f 6e6f726d 616c202a 20755f6c = a_normal * u_l │ │ │ │ - 0x00cbba90 696e6550 6172616d 732e783b 200a2020 ineParams.x; . │ │ │ │ - 0x00cbbaa0 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ - 0x00cbbab0 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ - 0x00cbbac0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00cbbad0 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ - 0x00cbbae0 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x00cbbaf0 6f6e2e78 79202b20 6e6f726d 2c200a20 on.xy + norm, . │ │ │ │ - 0x00cbbb00 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cbbb10 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cbbb20 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cbbb30 20202020 20755f6d 6f64656c 56696577 u_modelView │ │ │ │ - 0x00cbbb40 2c206c65 6e677468 286e6f72 6d29293b , length(norm)); │ │ │ │ - 0x00cbbb50 200a2020 20202020 69662028 755f6c69 . if (u_li │ │ │ │ - 0x00cbbb60 6e655061 72616d73 2e792021 3d20302e neParams.y != 0. │ │ │ │ - 0x00cbbb70 3029200a 20202020 20202020 6c656e20 0) . len │ │ │ │ - 0x00cbbb80 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ - 0x00cbbb90 78202b20 615f6c65 6e677468 2e79202a x + a_length.y * │ │ │ │ - 0x00cbbba0 20755f6c 696e6550 6172616d 732e792c u_lineParams.y, │ │ │ │ - 0x00cbbbb0 20615f6c 656e6774 682e7a29 3b200a20 a_length.z); . │ │ │ │ - 0x00cbbbc0 2020207d 200a2020 23696664 65662045 } . #ifdef E │ │ │ │ - 0x00cbbbd0 4e41424c 455f5654 46200a20 20202076 NABLE_VTF . v │ │ │ │ - 0x00cbbbe0 5f636f6c 6f72203d 20746578 74757265 _color = texture │ │ │ │ - 0x00cbbbf0 28755f63 6f6c6f72 5465782c 20615f63 (u_colorTex, a_c │ │ │ │ - 0x00cbbc00 6f6c6f72 54657843 6f6f7264 73293b20 olorTexCoords); │ │ │ │ - 0x00cbbc10 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ - 0x00cbbc20 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ - 0x00cbbc30 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x00cbbc40 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00cbbc50 20765f6c 656e6774 6859203d 206c656e v_lengthY = len │ │ │ │ - 0x00cbbc60 2e793b20 0a202020 20766563 3420706f .y; . vec4 po │ │ │ │ - 0x00cbbc70 73203d20 76656334 28747261 6e73666f s = vec4(transfo │ │ │ │ - 0x00cbbc80 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ - 0x00cbbc90 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ - 0x00cbbca0 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ - 0x00cbbcb0 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x00cbbcc0 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ - 0x00cbbcd0 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ - 0x00cbbce0 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x00cbbcf0 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ - 0x00cbbd00 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cbbd10 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cbbd20 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cbbd30 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cbbd40 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cbbd50 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cbbd60 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cbbd70 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cbbd80 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cbbd90 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cbbda0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cbbdb0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cbbdc0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cbbdd0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cbbde0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cbbdf0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cbbe00 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cbbe10 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cbbe20 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cbbe30 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cbbe40 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cbbe50 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ - 0x00cbbe60 696e2076 65633420 765f6f66 66736574 in vec4 v_offset │ │ │ │ - 0x00cbbe70 303b200a 2020696e 20766563 3420765f 0; . in vec4 v_ │ │ │ │ - 0x00cbbe80 6f666673 6574313b 200a2020 696e2076 offset1; . in v │ │ │ │ - 0x00cbbe90 65633420 765f6f66 66736574 323b200a ec4 v_offset2; . │ │ │ │ - 0x00cbbea0 20206f75 74207665 63342076 5f467261 out vec4 v_Fra │ │ │ │ - 0x00cbbeb0 67436f6c 6f723b20 0a202075 6e69666f gColor; . unifo │ │ │ │ - 0x00cbbec0 726d2076 65633420 755f6672 616d6562 rm vec4 u_frameb │ │ │ │ - 0x00cbbed0 75666665 724d6574 72696373 3b200a20 ufferMetrics; . │ │ │ │ - 0x00cbbee0 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x00cbbef0 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x00cbbf00 2020756e 69666f72 6d207361 6d706c65 uniform sample │ │ │ │ - 0x00cbbf10 72324420 755f736d 61614172 65613b20 r2D u_smaaArea; │ │ │ │ - 0x00cbbf20 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x00cbbf30 65723244 20755f73 6d616153 65617263 er2D u_smaaSearc │ │ │ │ - 0x00cbbf40 683b200a 20202364 6566696e 6520534d h; . #define SM │ │ │ │ - 0x00cbbf50 41415f53 45415243 48544558 5f53495a AA_SEARCHTEX_SIZ │ │ │ │ - 0x00cbbf60 45207665 63322836 362e302c 2033332e E vec2(66.0, 33. │ │ │ │ - 0x00cbbf70 3029200a 20202364 6566696e 6520534d 0) . #define SM │ │ │ │ - 0x00cbbf80 41415f53 45415243 48544558 5f504143 AA_SEARCHTEX_PAC │ │ │ │ - 0x00cbbf90 4b45445f 53495a45 20766563 32283634 KED_SIZE vec2(64 │ │ │ │ - 0x00cbbfa0 2e302c20 31362e30 29200a20 20236465 .0, 16.0) . #de │ │ │ │ - 0x00cbbfb0 66696e65 20534d41 415f4152 45415445 fine SMAA_AREATE │ │ │ │ - 0x00cbbfc0 585f4d41 585f4449 5354414e 43452031 X_MAX_DISTANCE 1 │ │ │ │ - 0x00cbbfd0 362e3020 0a202023 64656669 6e652053 6.0 . #define S │ │ │ │ - 0x00cbbfe0 4d41415f 41524541 5445585f 50495845 MAA_AREATEX_PIXE │ │ │ │ - 0x00cbbff0 4c5f5349 5a452028 76656332 28312e30 L_SIZE (vec2(1.0 │ │ │ │ - 0x00cbc000 202f2032 35362e30 2c20312e 30202f20 / 256.0, 1.0 / │ │ │ │ - 0x00cbc010 31303234 2e302929 200a2020 23646566 1024.0)) . #def │ │ │ │ - 0x00cbc020 696e6520 534d4141 4c6f6f70 42656769 ine SMAALoopBegi │ │ │ │ - 0x00cbc030 6e28636f 6e646974 696f6e29 20776869 n(condition) whi │ │ │ │ - 0x00cbc040 6c652028 636f6e64 6974696f 6e29207b le (condition) { │ │ │ │ - 0x00cbc050 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ - 0x00cbc060 4c6f6f70 456e6420 7d200a20 20236465 LoopEnd } . #de │ │ │ │ - 0x00cbc070 66696e65 20534d41 4153616d 706c654c fine SMAASampleL │ │ │ │ - 0x00cbc080 6576656c 5a65726f 28746578 2c20636f evelZero(tex, co │ │ │ │ - 0x00cbc090 6f726429 20746578 74757265 4c6f6428 ord) textureLod( │ │ │ │ - 0x00cbc0a0 7465782c 20636f6f 72642c20 302e3029 tex, coord, 0.0) │ │ │ │ - 0x00cbc0b0 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ - 0x00cbc0c0 53616d70 6c654c65 76656c5a 65726f4f SampleLevelZeroO │ │ │ │ - 0x00cbc0d0 66667365 74287465 782c2063 6f6f7264 ffset(tex, coord │ │ │ │ - 0x00cbc0e0 2c206f66 66736574 29207465 78747572 , offset) textur │ │ │ │ - 0x00cbc0f0 654c6f64 4f666673 65742874 65782c20 eLodOffset(tex, │ │ │ │ - 0x00cbc100 636f6f72 642c2030 2e302c20 6f666673 coord, 0.0, offs │ │ │ │ - 0x00cbc110 65742920 0a202023 64656669 6e652053 et) . #define S │ │ │ │ - 0x00cbc120 4d414152 6f756e64 28762920 726f756e MAARound(v) roun │ │ │ │ - 0x00cbc130 64282876 2929200a 20202364 6566696e d((v)) . #defin │ │ │ │ - 0x00cbc140 6520534d 41414f66 66736574 28782c79 e SMAAOffset(x,y │ │ │ │ - 0x00cbc150 29206976 65633228 782c7929 200a2020 ) ivec2(x,y) . │ │ │ │ - 0x00cbc160 636f6e73 74207665 6332206b 41726561 const vec2 kArea │ │ │ │ - 0x00cbc170 5465784d 61784469 7374616e 6365203d TexMaxDistance = │ │ │ │ - 0x00cbc180 20766563 3228534d 41415f41 52454154 vec2(SMAA_AREAT │ │ │ │ - 0x00cbc190 45585f4d 41585f44 49535441 4e43452c EX_MAX_DISTANCE, │ │ │ │ - 0x00cbc1a0 20534d41 415f4152 45415445 585f4d41 SMAA_AREATEX_MA │ │ │ │ - 0x00cbc1b0 585f4449 5354414e 4345293b 200a2020 X_DISTANCE); . │ │ │ │ - 0x00cbc1c0 636f6e73 7420666c 6f617420 6b416374 const float kAct │ │ │ │ - 0x00cbc1d0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x00cbc1e0 203d2030 2e383238 313b200a 2020666c = 0.8281; . fl │ │ │ │ - 0x00cbc1f0 6f617420 534d4141 53656172 63684c65 oat SMAASearchLe │ │ │ │ - 0x00cbc200 6e677468 28766563 3220652c 20666c6f ngth(vec2 e, flo │ │ │ │ - 0x00cbc210 6174206f 66667365 7429200a 20207b20 at offset) . { │ │ │ │ - 0x00cbc220 0a202020 20766563 32207363 616c6520 . vec2 scale │ │ │ │ - 0x00cbc230 3d20534d 41415f53 45415243 48544558 = SMAA_SEARCHTEX │ │ │ │ - 0x00cbc240 5f53495a 45202a20 76656332 28302e35 _SIZE * vec2(0.5 │ │ │ │ - 0x00cbc250 2c202d31 2e30293b 200a2020 20207665 , -1.0); . ve │ │ │ │ - 0x00cbc260 63322062 69617320 3d20534d 41415f53 c2 bias = SMAA_S │ │ │ │ - 0x00cbc270 45415243 48544558 5f53495a 45202a20 EARCHTEX_SIZE * │ │ │ │ - 0x00cbc280 76656332 286f6666 7365742c 20312e30 vec2(offset, 1.0 │ │ │ │ - 0x00cbc290 293b200a 20202020 7363616c 65202b3d ); . scale += │ │ │ │ - 0x00cbc2a0 20766563 32282d31 2e302c20 20312e30 vec2(-1.0, 1.0 │ │ │ │ - 0x00cbc2b0 293b200a 20202020 62696173 202b3d20 ); . bias += │ │ │ │ - 0x00cbc2c0 76656332 2820302e 352c202d 302e3529 vec2( 0.5, -0.5) │ │ │ │ - 0x00cbc2d0 3b200a20 20202073 63616c65 202a3d20 ; . scale *= │ │ │ │ - 0x00cbc2e0 312e3020 2f20534d 41415f53 45415243 1.0 / SMAA_SEARC │ │ │ │ - 0x00cbc2f0 48544558 5f504143 4b45445f 53495a45 HTEX_PACKED_SIZE │ │ │ │ - 0x00cbc300 3b200a20 20202062 69617320 2a3d2031 ; . bias *= 1 │ │ │ │ - 0x00cbc310 2e30202f 20534d41 415f5345 41524348 .0 / SMAA_SEARCH │ │ │ │ - 0x00cbc320 5445585f 5041434b 45445f53 495a453b TEX_PACKED_SIZE; │ │ │ │ - 0x00cbc330 200a2020 20207265 7475726e 20534d41 . return SMA │ │ │ │ - 0x00cbc340 4153616d 706c654c 6576656c 5a65726f ASampleLevelZero │ │ │ │ - 0x00cbc350 28755f73 6d616153 65617263 682c2073 (u_smaaSearch, s │ │ │ │ - 0x00cbc360 63616c65 202a2065 202b2062 69617329 cale * e + bias) │ │ │ │ - 0x00cbc370 2e723b20 0a20207d 200a2020 666c6f61 .r; . } . floa │ │ │ │ - 0x00cbc380 7420534d 41415365 61726368 584c6566 t SMAASearchXLef │ │ │ │ - 0x00cbc390 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ - 0x00cbc3a0 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ - 0x00cbc3b0 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ - 0x00cbc3c0 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ - 0x00cbc3d0 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ - 0x00cbc3e0 6e287465 78636f6f 72642e78 203e2065 n(texcoord.x > e │ │ │ │ - 0x00cbc3f0 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ - 0x00cbc400 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x00cbc410 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ - 0x00cbc420 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ - 0x00cbc430 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ - 0x00cbc440 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ - 0x00cbc450 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ - 0x00cbc460 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ - 0x00cbc470 2d322e30 2c20302e 3029202a 20755f66 -2.0, 0.0) * u_f │ │ │ │ - 0x00cbc480 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ - 0x00cbc490 732e7879 202b2074 6578636f 6f72643b s.xy + texcoord; │ │ │ │ - 0x00cbc4a0 200a2020 2020534d 41414c6f 6f70456e . SMAALoopEn │ │ │ │ - 0x00cbc4b0 64200a20 20202066 6c6f6174 206f6666 d . float off │ │ │ │ - 0x00cbc4c0 73657420 3d20332e 3235202d 20283235 set = 3.25 - (25 │ │ │ │ - 0x00cbc4d0 352e3020 2f203132 372e3029 202a2053 5.0 / 127.0) * S │ │ │ │ - 0x00cbc4e0 4d414153 65617263 684c656e 67746828 MAASearchLength( │ │ │ │ - 0x00cbc4f0 652c2030 2e30293b 200a2020 20207265 e, 0.0); . re │ │ │ │ - 0x00cbc500 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ - 0x00cbc510 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ - 0x00cbc520 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x00cbc530 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ - 0x00cbc540 20534d41 41536561 72636858 52696768 SMAASearchXRigh │ │ │ │ - 0x00cbc550 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ - 0x00cbc560 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ - 0x00cbc570 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ - 0x00cbc580 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ - 0x00cbc590 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ - 0x00cbc5a0 6e287465 78636f6f 72642e78 203c2065 n(texcoord.x < e │ │ │ │ - 0x00cbc5b0 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ - 0x00cbc5c0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x00cbc5d0 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ - 0x00cbc5e0 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ - 0x00cbc5f0 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ - 0x00cbc600 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ - 0x00cbc610 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ - 0x00cbc620 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ - 0x00cbc630 322e302c 20302e30 29202a20 755f6672 2.0, 0.0) * u_fr │ │ │ │ - 0x00cbc640 616d6562 75666665 724d6574 72696373 amebufferMetrics │ │ │ │ - 0x00cbc650 2e787920 2b207465 78636f6f 72643b20 .xy + texcoord; │ │ │ │ - 0x00cbc660 0a202020 20534d41 414c6f6f 70456e64 . SMAALoopEnd │ │ │ │ - 0x00cbc670 200a2020 2020666c 6f617420 6f666673 . float offs │ │ │ │ - 0x00cbc680 6574203d 20332e32 35202d20 28323535 et = 3.25 - (255 │ │ │ │ - 0x00cbc690 2e30202f 20313237 2e302920 2a20534d .0 / 127.0) * SM │ │ │ │ - 0x00cbc6a0 41415365 61726368 4c656e67 74682865 AASearchLength(e │ │ │ │ - 0x00cbc6b0 2c20302e 35293b20 0a202020 20726574 , 0.5); . ret │ │ │ │ - 0x00cbc6c0 75726e20 2d755f66 72616d65 62756666 urn -u_framebuff │ │ │ │ - 0x00cbc6d0 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ - 0x00cbc6e0 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x00cbc6f0 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ - 0x00cbc700 20534d41 41536561 72636859 55702876 SMAASearchYUp(v │ │ │ │ - 0x00cbc710 65633220 74657863 6f6f7264 2c20666c ec2 texcoord, fl │ │ │ │ - 0x00cbc720 6f617420 656e6429 200a2020 7b200a20 oat end) . { . │ │ │ │ - 0x00cbc730 20202076 65633220 65203d20 76656332 vec2 e = vec2 │ │ │ │ - 0x00cbc740 28312e30 2c20302e 30293b20 0a202020 (1.0, 0.0); . │ │ │ │ - 0x00cbc750 20534d41 414c6f6f 70426567 696e2874 SMAALoopBegin(t │ │ │ │ - 0x00cbc760 6578636f 6f72642e 79203e20 656e6420 excoord.y > end │ │ │ │ - 0x00cbc770 26262065 2e72203e 206b4163 74697661 && e.r > kActiva │ │ │ │ - 0x00cbc780 74696f6e 54687265 73686f6c 64202626 tionThreshold && │ │ │ │ - 0x00cbc790 20652e67 203d3d20 302e3029 200a2020 e.g == 0.0) . │ │ │ │ - 0x00cbc7a0 20202020 65203d20 534d4141 53616d70 e = SMAASamp │ │ │ │ - 0x00cbc7b0 6c654c65 76656c5a 65726f28 755f636f leLevelZero(u_co │ │ │ │ - 0x00cbc7c0 6c6f7254 65782c20 74657863 6f6f7264 lorTex, texcoord │ │ │ │ - 0x00cbc7d0 292e7267 3b200a20 20202020 20746578 ).rg; . tex │ │ │ │ - 0x00cbc7e0 636f6f72 64203d20 76656332 28302e30 coord = vec2(0.0 │ │ │ │ - 0x00cbc7f0 2c202d32 2e302920 2a20755f 6672616d , -2.0) * u_fram │ │ │ │ - 0x00cbc800 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00cbc810 79202b20 74657863 6f6f7264 3b200a20 y + texcoord; . │ │ │ │ - 0x00cbc820 20202053 4d41414c 6f6f7045 6e64200a SMAALoopEnd . │ │ │ │ - 0x00cbc830 20202020 666c6f61 74206f66 66736574 float offset │ │ │ │ - 0x00cbc840 203d2033 2e323520 2d202832 35352e30 = 3.25 - (255.0 │ │ │ │ - 0x00cbc850 202f2031 32372e30 29202a20 534d4141 / 127.0) * SMAA │ │ │ │ - 0x00cbc860 53656172 63684c65 6e677468 28652e67 SearchLength(e.g │ │ │ │ - 0x00cbc870 722c2030 2e30293b 200a2020 20207265 r, 0.0); . re │ │ │ │ - 0x00cbc880 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ - 0x00cbc890 65724d65 74726963 732e7920 2a206f66 erMetrics.y * of │ │ │ │ - 0x00cbc8a0 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x00cbc8b0 793b200a 20207d20 0a202066 6c6f6174 y; . } . float │ │ │ │ - 0x00cbc8c0 20534d41 41536561 72636859 446f776e SMAASearchYDown │ │ │ │ - 0x00cbc8d0 28766563 32207465 78636f6f 72642c20 (vec2 texcoord, │ │ │ │ - 0x00cbc8e0 666c6f61 7420656e 6429200a 20207b20 float end) . { │ │ │ │ - 0x00cbc8f0 0a202020 20766563 32206520 3d207665 . vec2 e = ve │ │ │ │ - 0x00cbc900 63322831 2e302c20 302e3029 3b200a20 c2(1.0, 0.0); . │ │ │ │ - 0x00cbc910 20202053 4d41414c 6f6f7042 6567696e SMAALoopBegin │ │ │ │ - 0x00cbc920 28746578 636f6f72 642e7920 3c20656e (texcoord.y < en │ │ │ │ - 0x00cbc930 64202626 20652e72 203e206b 41637469 d && e.r > kActi │ │ │ │ - 0x00cbc940 76617469 6f6e5468 72657368 6f6c6420 vationThreshold │ │ │ │ - 0x00cbc950 26262065 2e67203d 3d20302e 3029200a && e.g == 0.0) . │ │ │ │ - 0x00cbc960 20202020 20206520 3d20534d 41415361 e = SMAASa │ │ │ │ - 0x00cbc970 6d706c65 4c657665 6c5a6572 6f28755f mpleLevelZero(u_ │ │ │ │ - 0x00cbc980 636f6c6f 72546578 2c207465 78636f6f colorTex, texcoo │ │ │ │ - 0x00cbc990 7264292e 72673b20 0a202020 20202074 rd).rg; . t │ │ │ │ - 0x00cbc9a0 6578636f 6f726420 3d207665 63322830 excoord = vec2(0 │ │ │ │ - 0x00cbc9b0 2e302c20 322e3029 202a2075 5f667261 .0, 2.0) * u_fra │ │ │ │ - 0x00cbc9c0 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ - 0x00cbc9d0 7879202b 20746578 636f6f72 643b200a xy + texcoord; . │ │ │ │ - 0x00cbc9e0 20202020 534d4141 4c6f6f70 456e6420 SMAALoopEnd │ │ │ │ - 0x00cbc9f0 0a202020 20666c6f 6174206f 66667365 . float offse │ │ │ │ - 0x00cbca00 74203d20 332e3235 202d2028 3235352e t = 3.25 - (255. │ │ │ │ - 0x00cbca10 30202f20 3132372e 3029202a 20534d41 0 / 127.0) * SMA │ │ │ │ - 0x00cbca20 41536561 7263684c 656e6774 6828652e ASearchLength(e. │ │ │ │ - 0x00cbca30 67722c20 302e3529 3b200a20 20202072 gr, 0.5); . r │ │ │ │ - 0x00cbca40 65747572 6e202d75 5f667261 6d656275 eturn -u_framebu │ │ │ │ - 0x00cbca50 66666572 4d657472 6963732e 79202a20 fferMetrics.y * │ │ │ │ - 0x00cbca60 6f666673 6574202b 20746578 636f6f72 offset + texcoor │ │ │ │ - 0x00cbca70 642e793b 200a2020 7d200a20 20766563 d.y; . } . vec │ │ │ │ - 0x00cbca80 3220534d 41414172 65612876 65633220 2 SMAAArea(vec2 │ │ │ │ - 0x00cbca90 64697374 2c20666c 6f617420 65312c20 dist, float e1, │ │ │ │ - 0x00cbcaa0 666c6f61 74206532 29200a20 207b200a float e2) . { . │ │ │ │ - 0x00cbcab0 20202020 76656332 20746578 636f6f72 vec2 texcoor │ │ │ │ - 0x00cbcac0 64203d20 6b417265 61546578 4d617844 d = kAreaTexMaxD │ │ │ │ - 0x00cbcad0 69737461 6e636520 2a20534d 4141526f istance * SMAARo │ │ │ │ - 0x00cbcae0 756e6428 342e3020 2a207665 63322865 und(4.0 * vec2(e │ │ │ │ - 0x00cbcaf0 312c2065 32292920 2b206469 73743b20 1, e2)) + dist; │ │ │ │ - 0x00cbcb00 0a202020 20746578 636f6f72 64203d20 . texcoord = │ │ │ │ - 0x00cbcb10 534d4141 5f415245 41544558 5f504958 SMAA_AREATEX_PIX │ │ │ │ - 0x00cbcb20 454c5f53 495a4520 2a202874 6578636f EL_SIZE * (texco │ │ │ │ - 0x00cbcb30 6f726420 2b20302e 35293b20 0a202020 ord + 0.5); . │ │ │ │ - 0x00cbcb40 20726574 75726e20 534d4141 53616d70 return SMAASamp │ │ │ │ - 0x00cbcb50 6c654c65 76656c5a 65726f28 755f736d leLevelZero(u_sm │ │ │ │ - 0x00cbcb60 61614172 65612c20 74657863 6f6f7264 aaArea, texcoord │ │ │ │ - 0x00cbcb70 292e7267 3b200a20 207d200a 2020636f ).rg; . } . co │ │ │ │ - 0x00cbcb80 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x00cbcb90 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x00cbcba0 30302e30 3b200a20 20766f69 64206d61 00.0; . void ma │ │ │ │ - 0x00cbcbb0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ - 0x00cbcbc0 65633420 77656967 68747320 3d207665 ec4 weights = ve │ │ │ │ - 0x00cbcbd0 63342830 2e302c20 302e302c 20302e30 c4(0.0, 0.0, 0.0 │ │ │ │ - 0x00cbcbe0 2c20302e 30293b20 0a202020 20766563 , 0.0); . vec │ │ │ │ - 0x00cbcbf0 32206520 3d207465 78747572 6528755f 2 e = texture(u_ │ │ │ │ - 0x00cbcc00 636f6c6f 72546578 2c20765f 636f6f72 colorTex, v_coor │ │ │ │ - 0x00cbcc10 64732e78 79292e72 673b200a 20202020 ds.xy).rg; . │ │ │ │ - 0x00cbcc20 69662028 652e6720 3e20302e 3029202f if (e.g > 0.0) / │ │ │ │ - 0x00cbcc30 2f204564 67652061 74206e6f 72746820 / Edge at north │ │ │ │ - 0x00cbcc40 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ - 0x00cbcc50 63322064 3b200a20 20202020 20766563 c2 d; . vec │ │ │ │ - 0x00cbcc60 3320636f 6f726473 3b200a20 20202020 3 coords; . │ │ │ │ - 0x00cbcc70 20636f6f 7264732e 78203d20 534d4141 coords.x = SMAA │ │ │ │ - 0x00cbcc80 53656172 6368584c 65667428 765f6f66 SearchXLeft(v_of │ │ │ │ - 0x00cbcc90 66736574 302e7879 2c20765f 6f666673 fset0.xy, v_offs │ │ │ │ - 0x00cbcca0 6574322e 78293b20 0a202020 20202063 et2.x); . c │ │ │ │ - 0x00cbccb0 6f6f7264 732e7920 3d20765f 6f666673 oords.y = v_offs │ │ │ │ - 0x00cbccc0 6574312e 793b200a 20202020 2020642e et1.y; . d. │ │ │ │ - 0x00cbccd0 78203d20 636f6f72 64732e78 3b200a20 x = coords.x; . │ │ │ │ - 0x00cbcce0 20202020 20666c6f 61742065 31203d20 float e1 = │ │ │ │ - 0x00cbccf0 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ - 0x00cbcd00 65726f28 755f636f 6c6f7254 65782c20 ero(u_colorTex, │ │ │ │ - 0x00cbcd10 636f6f72 64732e78 79292e72 3b200a20 coords.xy).r; . │ │ │ │ - 0x00cbcd20 20202020 20636f6f 7264732e 7a203d20 coords.z = │ │ │ │ - 0x00cbcd30 534d4141 53656172 63685852 69676874 SMAASearchXRight │ │ │ │ - 0x00cbcd40 28765f6f 66667365 74302e7a 772c2076 (v_offset0.zw, v │ │ │ │ - 0x00cbcd50 5f6f6666 73657432 2e79293b 200a2020 _offset2.y); . │ │ │ │ - 0x00cbcd60 20202020 642e7920 3d20636f 6f726473 d.y = coords │ │ │ │ - 0x00cbcd70 2e7a3b20 0a202020 20202076 65633220 .z; . vec2 │ │ │ │ - 0x00cbcd80 7a7a203d 20755f66 72616d65 62756666 zz = u_framebuff │ │ │ │ - 0x00cbcd90 65724d65 74726963 732e7a7a 3b200a20 erMetrics.zz; . │ │ │ │ - 0x00cbcda0 20202020 2064203d 20616273 28534d41 d = abs(SMA │ │ │ │ - 0x00cbcdb0 41526f75 6e64287a 7a202a20 64202d20 ARound(zz * d - │ │ │ │ - 0x00cbcdc0 765f636f 6f726473 2e7a7a29 293b200a v_coords.zz)); . │ │ │ │ - 0x00cbcdd0 20202020 20207665 63322073 7172745f vec2 sqrt_ │ │ │ │ - 0x00cbcde0 64203d20 73717274 2864293b 200a2020 d = sqrt(d); . │ │ │ │ - 0x00cbcdf0 20202020 666c6f61 74206532 203d2053 float e2 = S │ │ │ │ - 0x00cbce00 4d414153 616d706c 654c6576 656c5a65 MAASampleLevelZe │ │ │ │ - 0x00cbce10 726f4f66 66736574 28755f63 6f6c6f72 roOffset(u_color │ │ │ │ - 0x00cbce20 5465782c 20636f6f 7264732e 7a792c20 Tex, coords.zy, │ │ │ │ - 0x00cbce30 534d4141 4f666673 65742831 2c203029 SMAAOffset(1, 0) │ │ │ │ - 0x00cbce40 292e723b 200a2020 20202020 77656967 ).r; . weig │ │ │ │ - 0x00cbce50 6874732e 7267203d 20534d41 41417265 hts.rg = SMAAAre │ │ │ │ - 0x00cbce60 61287371 72745f64 2c206531 2c206532 a(sqrt_d, e1, e2 │ │ │ │ - 0x00cbce70 293b200a 20202020 7d200a20 20202069 ); . } . i │ │ │ │ - 0x00cbce80 66202865 2e72203e 20302e30 29202f2f f (e.r > 0.0) // │ │ │ │ - 0x00cbce90 20456467 65206174 20776573 74200a20 Edge at west . │ │ │ │ - 0x00cbcea0 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ - 0x00cbceb0 20643b20 0a202020 20202076 65633320 d; . vec3 │ │ │ │ - 0x00cbcec0 636f6f72 64733b20 0a202020 20202063 coords; . c │ │ │ │ - 0x00cbced0 6f6f7264 732e7920 3d20534d 41415365 oords.y = SMAASe │ │ │ │ - 0x00cbcee0 61726368 59557028 765f6f66 66736574 archYUp(v_offset │ │ │ │ - 0x00cbcef0 312e7879 2c20765f 6f666673 6574322e 1.xy, v_offset2. │ │ │ │ - 0x00cbcf00 7a293b20 0a202020 20202063 6f6f7264 z); . coord │ │ │ │ - 0x00cbcf10 732e7820 3d20765f 6f666673 6574302e s.x = v_offset0. │ │ │ │ - 0x00cbcf20 783b200a 20202020 2020642e 78203d20 x; . d.x = │ │ │ │ - 0x00cbcf30 636f6f72 64732e79 3b200a20 20202020 coords.y; . │ │ │ │ - 0x00cbcf40 20666c6f 61742065 31203d20 534d4141 float e1 = SMAA │ │ │ │ - 0x00cbcf50 53616d70 6c654c65 76656c5a 65726f28 SampleLevelZero( │ │ │ │ - 0x00cbcf60 755f636f 6c6f7254 65782c20 636f6f72 u_colorTex, coor │ │ │ │ - 0x00cbcf70 64732e78 79292e67 3b200a20 20202020 ds.xy).g; . │ │ │ │ - 0x00cbcf80 20636f6f 7264732e 7a203d20 534d4141 coords.z = SMAA │ │ │ │ - 0x00cbcf90 53656172 63685944 6f776e28 765f6f66 SearchYDown(v_of │ │ │ │ - 0x00cbcfa0 66736574 312e7a77 2c20765f 6f666673 fset1.zw, v_offs │ │ │ │ - 0x00cbcfb0 6574322e 77293b20 0a202020 20202064 et2.w); . d │ │ │ │ - 0x00cbcfc0 2e79203d 20636f6f 7264732e 7a3b200a .y = coords.z; . │ │ │ │ - 0x00cbcfd0 20202020 20207665 63322077 77203d20 vec2 ww = │ │ │ │ - 0x00cbcfe0 755f6672 616d6562 75666665 724d6574 u_framebufferMet │ │ │ │ - 0x00cbcff0 72696373 2e77773b 200a2020 20202020 rics.ww; . │ │ │ │ - 0x00cbd000 64203d20 61627328 534d4141 526f756e d = abs(SMAARoun │ │ │ │ - 0x00cbd010 64287777 202a2064 202d2076 5f636f6f d(ww * d - v_coo │ │ │ │ - 0x00cbd020 7264732e 77772929 3b200a20 20202020 rds.ww)); . │ │ │ │ - 0x00cbd030 20766563 32207371 72745f64 203d2073 vec2 sqrt_d = s │ │ │ │ - 0x00cbd040 71727428 64293b20 0a202020 20202066 qrt(d); . f │ │ │ │ - 0x00cbd050 6c6f6174 20653220 3d20534d 41415361 loat e2 = SMAASa │ │ │ │ - 0x00cbd060 6d706c65 4c657665 6c5a6572 6f4f6666 mpleLevelZeroOff │ │ │ │ - 0x00cbd070 73657428 755f636f 6c6f7254 65782c20 set(u_colorTex, │ │ │ │ - 0x00cbd080 636f6f72 64732e78 7a2c2053 4d41414f coords.xz, SMAAO │ │ │ │ - 0x00cbd090 66667365 7428302c 20312929 2e673b20 ffset(0, 1)).g; │ │ │ │ - 0x00cbd0a0 0a202020 20202077 65696768 74732e62 . weights.b │ │ │ │ - 0x00cbd0b0 61203d20 534d4141 41726561 28737172 a = SMAAArea(sqr │ │ │ │ - 0x00cbd0c0 745f642c 2065312c 20653229 3b200a20 t_d, e1, e2); . │ │ │ │ - 0x00cbd0d0 2020207d 200a2020 2020765f 46726167 } . v_Frag │ │ │ │ - 0x00cbd0e0 436f6c6f 72203d20 77656967 6874733b Color = weights; │ │ │ │ - 0x00cbd0f0 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ - 0x00cbd100 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cbd110 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cbd120 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cbd130 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cbd140 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cbd150 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cbd160 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cbd170 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cbd180 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cbd190 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cbd1a0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cbd1b0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cbd1c0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cbd1d0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cbd1e0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cbd1f0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cbd200 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cbd210 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cbd220 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cbd230 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cbd240 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cbd250 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ - 0x00cbd260 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ - 0x00cbd270 20206f75 74207665 63342076 5f636f6f out vec4 v_coo │ │ │ │ - 0x00cbd280 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ - 0x00cbd290 20765f6f 66667365 74303b20 0a20206f v_offset0; . o │ │ │ │ - 0x00cbd2a0 75742076 65633420 765f6f66 66736574 ut vec4 v_offset │ │ │ │ - 0x00cbd2b0 313b200a 20206f75 74207665 63342076 1; . out vec4 v │ │ │ │ - 0x00cbd2c0 5f6f6666 73657432 3b200a20 20756e69 _offset2; . uni │ │ │ │ - 0x00cbd2d0 666f726d 20766563 3420755f 6672616d form vec4 u_fram │ │ │ │ - 0x00cbd2e0 65627566 6665724d 65747269 63733b20 ebufferMetrics; │ │ │ │ - 0x00cbd2f0 0a202023 64656669 6e652053 4d41415f . #define SMAA_ │ │ │ │ - 0x00cbd300 4d41585f 53454152 43485f53 54455053 MAX_SEARCH_STEPS │ │ │ │ - 0x00cbd310 20382e30 200a2020 636f6e73 74207665 8.0 . const ve │ │ │ │ - 0x00cbd320 6334206b 4d617853 65617263 68537465 c4 kMaxSearchSte │ │ │ │ - 0x00cbd330 7073203d 20766563 34282d32 2e30202a ps = vec4(-2.0 * │ │ │ │ - 0x00cbd340 20534d41 415f4d41 585f5345 41524348 SMAA_MAX_SEARCH │ │ │ │ - 0x00cbd350 5f535445 50532c20 322e3020 2a20534d _STEPS, 2.0 * SM │ │ │ │ - 0x00cbd360 41415f4d 41585f53 45415243 485f5354 AA_MAX_SEARCH_ST │ │ │ │ - 0x00cbd370 4550532c 200a2020 20202020 20202020 EPS, . │ │ │ │ - 0x00cbd380 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cbd390 20202020 20202020 20202d32 2e30202a -2.0 * │ │ │ │ - 0x00cbd3a0 20534d41 415f4d41 585f5345 41524348 SMAA_MAX_SEARCH │ │ │ │ - 0x00cbd3b0 5f535445 50532c20 322e3020 202a2053 _STEPS, 2.0 * S │ │ │ │ - 0x00cbd3c0 4d41415f 4d41585f 53454152 43485f53 MAA_MAX_SEARCH_S │ │ │ │ - 0x00cbd3d0 54455053 293b200a 2020636f 6e737420 TEPS); . const │ │ │ │ - 0x00cbd3e0 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ - 0x00cbd3f0 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ - 0x00cbd400 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ - 0x00cbd410 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00cbd420 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00cbd430 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00cbd440 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ - 0x00cbd450 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00cbd460 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cbd470 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ - 0x00cbd480 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ - 0x00cbd490 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ - 0x00cbd4a0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cbd4b0 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ - 0x00cbd4c0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x00cbd4d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cbd4e0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00cbd4f0 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ - 0x00cbd500 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cbd510 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ - 0x00cbd520 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ - 0x00cbd530 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x00cbd540 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cbd550 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ - 0x00cbd560 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ - 0x00cbd570 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cbd580 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ - 0x00cbd590 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ - 0x00cbd5a0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00cbd5b0 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x00cbd5c0 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ - 0x00cbd5d0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ - 0x00cbd5e0 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ - 0x00cbd5f0 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ - 0x00cbd600 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x00cbd610 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x00cbd620 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x00cbd630 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ - 0x00cbd640 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ - 0x00cbd650 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ - 0x00cbd660 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ - 0x00cbd670 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ - 0x00cbd680 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cbd690 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ - 0x00cbd6a0 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ - 0x00cbd6b0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00cbd6c0 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ - 0x00cbd6d0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ - 0x00cbd6e0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00cbd6f0 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ - 0x00cbd700 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ - 0x00cbd710 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ - 0x00cbd720 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00cbd730 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ - 0x00cbd740 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ - 0x00cbd750 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ - 0x00cbd760 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ - 0x00cbd770 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ - 0x00cbd780 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ - 0x00cbd790 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ - 0x00cbd7a0 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ - 0x00cbd7b0 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ - 0x00cbd7c0 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ - 0x00cbd7d0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ - 0x00cbd7e0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00cbd7f0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00cbd800 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ - 0x00cbd810 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ - 0x00cbd820 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x00cbd830 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ - 0x00cbd840 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ - 0x00cbd850 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ - 0x00cbd860 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ - 0x00cbd870 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ - 0x00cbd880 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ - 0x00cbd890 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ - 0x00cbd8a0 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ - 0x00cbd8b0 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x00cbd8c0 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ - 0x00cbd8d0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00cbd8e0 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ - 0x00cbd8f0 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ - 0x00cbd900 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00cbd910 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ - 0x00cbd920 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ - 0x00cbd930 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ - 0x00cbd940 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00cbd950 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ - 0x00cbd960 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ - 0x00cbd970 0a20207b 200a2020 2020765f 636f6f72 . { . v_coor │ │ │ │ - 0x00cbd980 6473203d 20766563 3428615f 74636f6f ds = vec4(a_tcoo │ │ │ │ - 0x00cbd990 72642c20 615f7463 6f6f7264 202a2075 rd, a_tcoord * u │ │ │ │ - 0x00cbd9a0 5f667261 6d656275 66666572 4d657472 _framebufferMetr │ │ │ │ - 0x00cbd9b0 6963732e 7a77293b 200a2020 2020765f ics.zw); . v_ │ │ │ │ - 0x00cbd9c0 6f666673 65743020 3d20755f 6672616d offset0 = u_fram │ │ │ │ - 0x00cbd9d0 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00cbd9e0 79787920 2a207665 6334282d 302e3235 yxy * vec4(-0.25 │ │ │ │ - 0x00cbd9f0 2c202d30 2e313235 2c20312e 32352c20 , -0.125, 1.25, │ │ │ │ - 0x00cbda00 2d302e31 32352920 2b20615f 74636f6f -0.125) + a_tcoo │ │ │ │ - 0x00cbda10 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ - 0x00cbda20 6f666673 65743120 3d20755f 6672616d offset1 = u_fram │ │ │ │ - 0x00cbda30 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00cbda40 79787920 2a207665 6334282d 302e3132 yxy * vec4(-0.12 │ │ │ │ - 0x00cbda50 352c202d 302e3235 2c202d30 2e313235 5, -0.25, -0.125 │ │ │ │ - 0x00cbda60 2c20312e 32352920 2b20615f 74636f6f , 1.25) + a_tcoo │ │ │ │ - 0x00cbda70 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ - 0x00cbda80 6f666673 65743220 3d20755f 6672616d offset2 = u_fram │ │ │ │ - 0x00cbda90 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00cbdaa0 78797920 2a206b4d 61785365 61726368 xyy * kMaxSearch │ │ │ │ - 0x00cbdab0 53746570 73202b20 76656334 28765f6f Steps + vec4(v_o │ │ │ │ - 0x00cbdac0 66667365 74302e78 7a2c2076 5f6f6666 ffset0.xz, v_off │ │ │ │ - 0x00cbdad0 73657431 2e797729 3b200a20 20202067 set1.yw); . g │ │ │ │ - 0x00cbdae0 6c5f506f 73697469 6f6e203d 20766563 l_Position = vec │ │ │ │ - 0x00cbdaf0 3428615f 706f732c 20302e30 2c20312e 4(a_pos, 0.0, 1. │ │ │ │ - 0x00cbdb00 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ - 0x00cbdb10 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cbdb20 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cbdb30 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cbdb40 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cbdb50 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cbdb60 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cbdb70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cbdb80 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cbdb90 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cbdba0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cbdbb0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cbdbc0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cbdbd0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cbdbe0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cbdbf0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cbdc00 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cbdc10 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cbdc20 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cbdc30 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cbdc40 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cbdc50 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cbdc60 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ - 0x00cbdc70 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ - 0x00cbdc80 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x00cbdc90 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00cbdca0 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ - 0x00cbdcb0 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ - 0x00cbdcc0 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ - 0x00cbdcd0 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ - 0x00cbdce0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00cbdcf0 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ - 0x00cbdd00 65747269 63733b20 0a202063 6f6e7374 etrics; . const │ │ │ │ - 0x00cbdd10 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00cbdd20 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00cbdd30 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00cbdd40 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00cbdd50 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00cbdd60 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cbdd70 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00cbdd80 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00cbdd90 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cbdda0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00cbddb0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00cbddc0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00cbddd0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cbdde0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00cbddf0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cbde00 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cbde10 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00cbde20 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00cbde30 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cbde40 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00cbde50 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00cbde60 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cbde70 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cbde80 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00cbde90 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00cbdea0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cbdeb0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00cbdec0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00cbded0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cbdee0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cbdef0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cbdf00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cbdf10 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00cbdf20 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00cbdf30 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00cbdf40 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00cbdf50 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00cbdf60 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00cbdf70 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00cbdf80 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00cbdf90 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00cbdfa0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00cbdfb0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00cbdfc0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00cbdfd0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00cbdfe0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00cbdff0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00cbe000 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00cbe010 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cbe020 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00cbe030 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00cbe040 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00cbe050 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cbe060 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00cbe070 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00cbe080 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00cbe090 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00cbe0a0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00cbe0b0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00cbe0c0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00cbe0d0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00cbe0e0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00cbe0f0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00cbe100 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00cbe110 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00cbe120 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cbe130 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00cbe140 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00cbe150 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00cbe160 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00cbe170 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00cbe180 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00cbe190 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00cbe1a0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00cbe1b0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00cbe1c0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00cbe1d0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00cbe1e0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00cbe1f0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00cbe200 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cbe210 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00cbe220 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00cbe230 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00cbe240 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00cbe250 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00cbe260 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00cbe270 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00cbe280 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cbe290 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00cbe2a0 200a2020 7b200a20 20202076 5f636f6c . { . v_col │ │ │ │ - 0x00cbe2b0 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ - 0x00cbe2c0 74636f6f 72643b20 0a202020 20765f6f tcoord; . v_o │ │ │ │ - 0x00cbe2d0 66667365 7430203d 20755f66 72616d65 ffset0 = u_frame │ │ │ │ - 0x00cbe2e0 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ - 0x00cbe2f0 7879202a 20766563 34282d31 2e302c20 xy * vec4(-1.0, │ │ │ │ - 0x00cbe300 302e302c 20302e30 2c202d31 2e302920 0.0, 0.0, -1.0) │ │ │ │ - 0x00cbe310 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ - 0x00cbe320 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ - 0x00cbe330 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ - 0x00cbe340 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ - 0x00cbe350 63342820 312e302c 20302e30 2c20302e c4( 1.0, 0.0, 0. │ │ │ │ - 0x00cbe360 302c2020 312e3029 202b2061 5f74636f 0, 1.0) + a_tco │ │ │ │ - 0x00cbe370 6f72642e 78797879 3b200a20 20202076 ord.xyxy; . v │ │ │ │ - 0x00cbe380 5f6f6666 73657432 203d2075 5f667261 _offset2 = u_fra │ │ │ │ - 0x00cbe390 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ - 0x00cbe3a0 78797879 202a2076 65633428 2d322e30 xyxy * vec4(-2.0 │ │ │ │ - 0x00cbe3b0 2c20302e 302c2030 2e302c20 2d322e30 , 0.0, 0.0, -2.0 │ │ │ │ - 0x00cbe3c0 29202b20 615f7463 6f6f7264 2e787978 ) + a_tcoord.xyx │ │ │ │ - 0x00cbe3d0 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ - 0x00cbe3e0 696f6e20 3d207665 63342861 5f706f73 ion = vec4(a_pos │ │ │ │ - 0x00cbe3f0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x00cbe400 7d200a00 00000000 00000000 00000000 } .............. │ │ │ │ - 0x00cbe410 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cbe420 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cbe430 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cbe440 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cbe450 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cbe460 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cbe470 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cbe480 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cbe490 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cbe4a0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cbe4b0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cbe4c0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cbe4d0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cbe4e0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cbe4f0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cbe500 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cbe510 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cbe520 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cbe530 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cbe540 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cbe550 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cbe560 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ - 0x00cbe570 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ - 0x00cbe580 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x00cbe590 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00cbe5a0 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ - 0x00cbe5b0 743b200a 2020756e 69666f72 6d207665 t; . uniform ve │ │ │ │ - 0x00cbe5c0 63342075 5f667261 6d656275 66666572 c4 u_framebuffer │ │ │ │ - 0x00cbe5d0 4d657472 6963733b 200a2020 636f6e73 Metrics; . cons │ │ │ │ - 0x00cbe5e0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00cbe5f0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00cbe600 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00cbe610 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00cbe620 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00cbe630 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00cbe640 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00cbe650 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00cbe660 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00cbe670 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00cbe680 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00cbe690 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00cbe6a0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cbe6b0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00cbe6c0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00cbe6d0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00cbe6e0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00cbe6f0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00cbe700 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cbe710 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00cbe720 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00cbe730 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00cbe740 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cbe750 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00cbe760 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00cbe770 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cbe780 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00cbe790 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00cbe7a0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cbe7b0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00cbe7c0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00cbe7d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cbe7e0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00cbe7f0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00cbe800 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00cbe810 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00cbe820 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00cbe830 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00cbe840 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00cbe850 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00cbe860 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00cbe870 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00cbe880 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00cbe890 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00cbe8a0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00cbe8b0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00cbe8c0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00cbe8d0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00cbe8e0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cbe8f0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00cbe900 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00cbe910 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00cbe920 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00cbe930 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00cbe940 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00cbe950 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00cbe960 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00cbe970 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00cbe980 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00cbe990 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00cbe9a0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00cbe9b0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00cbe9c0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00cbe9d0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00cbe9e0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00cbe9f0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00cbea00 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00cbea10 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00cbea20 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00cbea30 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00cbea40 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00cbea50 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00cbea60 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00cbea70 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00cbea80 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00cbea90 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00cbeaa0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00cbeab0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00cbeac0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00cbead0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00cbeae0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00cbeaf0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00cbeb00 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00cbeb10 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00cbeb20 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00cbeb30 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00cbeb40 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00cbeb50 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00cbeb60 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00cbeb70 29200a20 207b200a 20202020 765f636f ) . { . v_co │ │ │ │ - 0x00cbeb80 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x00cbeb90 5f74636f 6f72643b 200a2020 2020765f _tcoord; . v_ │ │ │ │ - 0x00cbeba0 6f666673 6574203d 20755f66 72616d65 offset = u_frame │ │ │ │ - 0x00cbebb0 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ - 0x00cbebc0 7879202a 20766563 3428312e 302c2030 xy * vec4(1.0, 0 │ │ │ │ - 0x00cbebd0 2e302c20 302e302c 20312e30 29202b20 .0, 0.0, 1.0) + │ │ │ │ - 0x00cbebe0 615f7463 6f6f7264 2e787978 793b200a a_tcoord.xyxy; . │ │ │ │ - 0x00cbebf0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00cbec00 3d207665 63342861 5f706f73 2c20302e = vec4(a_pos, 0. │ │ │ │ - 0x00cbec10 302c2031 2e30293b 200a2020 7d200a00 0, 1.0); . } .. │ │ │ │ - 0x00cbec20 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cbec30 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cbec40 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cbec50 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cbec60 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cbec70 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cbec80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cbec90 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cbeca0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cbecb0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cbecc0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cbecd0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cbece0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cbecf0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cbed00 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cbed10 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cbed20 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cbed30 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cbed40 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cbed50 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cbed60 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cbed70 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x00cbed80 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x00cbed90 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ - 0x00cbeda0 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ - 0x00cbedb0 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ - 0x00cbedc0 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ - 0x00cbedd0 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x00cbede0 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ - 0x00cbedf0 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ - 0x00cbee00 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ - 0x00cbee10 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ - 0x00cbee20 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ - 0x00cbee30 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x00cbee40 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ - 0x00cbee50 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x00cbee60 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x00cbee70 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x00cbee80 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00cbee90 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x00cbeea0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x00cbeeb0 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x00cbeec0 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x00cbeed0 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00cbeee0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00cbeef0 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00cbef00 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x00cbef10 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x00cbef20 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00cbef30 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x00cbef40 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00cbef50 5f565446 200a2020 756e6966 6f726d20 _VTF . uniform │ │ │ │ - 0x00cbef60 73616d70 6c657232 4420755f 636f6c6f sampler2D u_colo │ │ │ │ - 0x00cbef70 72546578 3b200a20 2023656e 64696620 rTex; . #endif │ │ │ │ - 0x00cbef80 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x00cbef90 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x00cbefa0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x00cbefb0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x00cbefc0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00cbefd0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00cbefe0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00cbeff0 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00cbf000 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00cbf010 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00cbf020 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00cbf030 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00cbf040 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x00cbf050 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x00cbf060 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x00cbf070 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x00cbf080 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x00cbf090 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x00cbf0a0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x00cbf0b0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x00cbf0c0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00cbf0d0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00cbf0e0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00cbf0f0 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00cbf100 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00cbf110 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00cbf120 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00cbf130 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cbf140 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00cbf150 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00cbf160 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00cbf170 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x00cbf180 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x00cbf190 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x00cbf1a0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00cbf1b0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00cbf1c0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00cbf1d0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00cbf1e0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00cbf1f0 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00cbf200 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00cbf210 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00cbf220 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00cbf230 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00cbf240 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cbf250 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00cbf260 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00cbf270 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x00cbf280 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x00cbf290 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x00cbf2a0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x00cbf2b0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00cbf2c0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00cbf2d0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00cbf2e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cbf2f0 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00cbf300 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00cbf310 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00cbf320 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00cbf330 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00cbf340 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00cbf350 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00cbf360 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00cbf370 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x00cbf380 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x00cbf390 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00cbf3a0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x00cbf3b0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00cbf3c0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00cbf3d0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00cbf3e0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cbf3f0 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00cbf400 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00cbf410 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00cbf420 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00cbf430 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00cbf440 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00cbf450 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00cbf460 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00cbf470 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x00cbf480 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x00cbf490 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x00cbf4a0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x00cbf4b0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00cbf4c0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00cbf4d0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00cbf4e0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00cbf4f0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00cbf500 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00cbf510 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00cbf520 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x00cbf530 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x00cbf540 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ - 0x00cbf550 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ - 0x00cbf560 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ - 0x00cbf570 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ - 0x00cbf580 302e3029 202b2070 6f733b20 0a202020 0.0) + pos; . │ │ │ │ - 0x00cbf590 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x00cbf5a0 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00cbf5b0 726d2873 68696674 6564506f 73202a20 rm(shiftedPos * │ │ │ │ - 0x00cbf5c0 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ - 0x00cbf5d0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cbf5e0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00cbf5f0 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ - 0x00cbf600 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ - 0x00cbf610 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ - 0x00cbf620 636f6c6f 72546578 436f6f72 64293b20 colorTexCoord); │ │ │ │ - 0x00cbf630 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ - 0x00cbf640 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ - 0x00cbf650 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ - 0x00cbf660 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00cbf670 765f6d61 736b5465 78436f6f 7264203d v_maskTexCoord = │ │ │ │ - 0x00cbf680 20615f6d 61736b54 6578436f 6f72643b a_maskTexCoord; │ │ │ │ - 0x00cbf690 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ - 0x00cbf6a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cbf6b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cbf6c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cbf6d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cbf6e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cbf6f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cbf700 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cbf710 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cbf720 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cbf730 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cbf740 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cbf750 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cbf760 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cbf770 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cbf780 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cbf790 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cbf7a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cbf7b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cbf7c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cbf7d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cbf7e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cbf7f0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x00cbf800 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x00cbf810 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ - 0x00cbf820 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ - 0x00cbf830 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ - 0x00cbf840 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ - 0x00cbf850 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x00cbf860 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ - 0x00cbf870 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ - 0x00cbf880 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ - 0x00cbf890 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ - 0x00cbf8a0 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ - 0x00cbf8b0 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x00cbf8c0 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ - 0x00cbf8d0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x00cbf8e0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x00cbf8f0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x00cbf900 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00cbf910 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x00cbf920 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x00cbf930 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x00cbf940 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x00cbf950 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00cbf960 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00cbf970 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00cbf980 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x00cbf990 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x00cbf9a0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00cbf9b0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x00cbf9c0 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x00cbf9d0 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ - 0x00cbf9e0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00cbf9f0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00cbfa00 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00cbfa10 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00cbfa20 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00cbfa30 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00cbfa40 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00cbfa50 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00cbfa60 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00cbfa70 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00cbfa80 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00cbfa90 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00cbfaa0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00cbfab0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00cbfac0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00cbfad0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00cbfae0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00cbfaf0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00cbfb00 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00cbfb10 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00cbfb20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cbfb30 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00cbfb40 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00cbfb50 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00cbfb60 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00cbfb70 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00cbfb80 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00cbfb90 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00cbfba0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00cbfbb0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00cbfbc0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00cbfbd0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00cbfbe0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00cbfbf0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00cbfc00 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00cbfc10 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cbfc20 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cbfc30 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cbfc40 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00cbfc50 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00cbfc60 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00cbfc70 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00cbfc80 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cbfc90 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cbfca0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cbfcb0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00cbfcc0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00cbfcd0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x00cbfce0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00cbfcf0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00cbfd00 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00cbfd10 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00cbfd20 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00cbfd30 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00cbfd40 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00cbfd50 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00cbfd60 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00cbfd70 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00cbfd80 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00cbfd90 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cbfda0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00cbfdb0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00cbfdc0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00cbfdd0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x00cbfde0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00cbfdf0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cbfe00 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00cbfe10 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00cbfe20 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00cbfe30 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00cbfe40 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00cbfe50 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00cbfe60 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00cbfe70 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00cbfe80 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00cbfe90 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00cbfea0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00cbfeb0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00cbfec0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00cbfed0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00cbfee0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00cbfef0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00cbff00 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00cbff10 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cbff20 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00cbff30 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00cbff40 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00cbff50 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00cbff60 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00cbff70 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00cbff80 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ - 0x00cbff90 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ - 0x00cbffa0 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ - 0x00cbffb0 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x00cbffc0 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ - 0x00cbffd0 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ - 0x00cbffe0 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ - 0x00cbfff0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ - 0x00cc0000 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ - 0x00cc0010 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00cc0020 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ - 0x00cc0030 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x00cc0040 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ - 0x00cc0050 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc0060 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc0070 20202020 20202020 20202020 2020615f a_ │ │ │ │ - 0x00cc0080 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ - 0x00cc0090 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ - 0x00cc00a0 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ - 0x00cc00b0 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ - 0x00cc00c0 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ - 0x00cc00d0 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ - 0x00cc00e0 6f725465 78436f6f 7264293b 200a2020 orTexCoord); . │ │ │ │ - 0x00cc00f0 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ - 0x00cc0100 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ - 0x00cc0110 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x00cc0120 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ - 0x00cc0130 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ - 0x00cc0140 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ - 0x00cc0150 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ - 0x00cc0160 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc0170 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc0180 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc0190 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc01a0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc01b0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc01c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc01d0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc01e0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc01f0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc0200 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc0210 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc0220 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc0230 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc0240 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc0250 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc0260 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc0270 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc0280 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc0290 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc02a0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc02b0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x00cc02c0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x00cc02d0 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ - 0x00cc02e0 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x00cc02f0 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ - 0x00cc0300 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ - 0x00cc0310 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ - 0x00cc0320 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ - 0x00cc0330 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00cc0340 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x00cc0350 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x00cc0360 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x00cc0370 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00cc0380 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x00cc0390 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x00cc03a0 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x00cc03b0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x00cc03c0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x00cc03d0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x00cc03e0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x00cc03f0 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ - 0x00cc0400 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ - 0x00cc0410 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ - 0x00cc0420 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ - 0x00cc0430 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ - 0x00cc0440 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ - 0x00cc0450 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x00cc0460 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cc0470 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ - 0x00cc0480 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00cc0490 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ - 0x00cc04a0 733b200a 20202369 66646566 20454e41 s; . #ifdef ENA │ │ │ │ - 0x00cc04b0 424c455f 56544620 0a202075 6e69666f BLE_VTF . unifo │ │ │ │ - 0x00cc04c0 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ - 0x00cc04d0 6f6c6f72 5465783b 200a2020 23656e64 olorTex; . #end │ │ │ │ - 0x00cc04e0 6966200a 2020636f 6e737420 666c6f61 if . const floa │ │ │ │ - 0x00cc04f0 74204261 73654465 70746853 68696674 t BaseDepthShift │ │ │ │ - 0x00cc0500 203d202d 31302e30 3b200a20 20636f6e = -10.0; . con │ │ │ │ - 0x00cc0510 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00cc0520 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00cc0530 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00cc0540 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00cc0550 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00cc0560 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00cc0570 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00cc0580 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x00cc0590 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00cc05a0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x00cc05b0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x00cc05c0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x00cc05d0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cc05e0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00cc05f0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cc0600 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cc0610 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00cc0620 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00cc0630 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cc0640 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00cc0650 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00cc0660 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00cc0670 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cc0680 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x00cc0690 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x00cc06a0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cc06b0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x00cc06c0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x00cc06d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc06e0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00cc06f0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cc0700 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00cc0710 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00cc0720 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00cc0730 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00cc0740 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00cc0750 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00cc0760 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00cc0770 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x00cc0780 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x00cc0790 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x00cc07a0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x00cc07b0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00cc07c0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x00cc07d0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x00cc07e0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00cc07f0 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x00cc0800 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x00cc0810 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00cc0820 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x00cc0830 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00cc0840 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x00cc0850 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00cc0860 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x00cc0870 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x00cc0880 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x00cc0890 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x00cc08a0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x00cc08b0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x00cc08c0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00cc08d0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x00cc08e0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x00cc08f0 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x00cc0900 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x00cc0910 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x00cc0920 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00cc0930 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x00cc0940 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x00cc0950 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00cc0960 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x00cc0970 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x00cc0980 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x00cc0990 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x00cc09a0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x00cc09b0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x00cc09c0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x00cc09d0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x00cc09e0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x00cc09f0 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x00cc0a00 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00cc0a10 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x00cc0a20 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x00cc0a30 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00cc0a40 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x00cc0a50 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x00cc0a60 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x00cc0a70 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00cc0a80 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cc0a90 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x00cc0aa0 2829200a 20207b20 0a202020 20666c6f () . { . flo │ │ │ │ - 0x00cc0ab0 61742069 734f7574 6c696e65 203d2073 at isOutline = s │ │ │ │ - 0x00cc0ac0 74657028 302e352c 20755f69 734f7574 tep(0.5, u_isOut │ │ │ │ - 0x00cc0ad0 6c696e65 50617373 293b200a 20202020 linePass); . │ │ │ │ - 0x00cc0ae0 666c6f61 74206e6f 744f7574 6c696e65 float notOutline │ │ │ │ - 0x00cc0af0 203d2031 2e30202d 2069734f 75746c69 = 1.0 - isOutli │ │ │ │ - 0x00cc0b00 6e653b20 0a202020 20666c6f 61742064 ne; . float d │ │ │ │ - 0x00cc0b10 65707468 53686966 74203d20 42617365 epthShift = Base │ │ │ │ - 0x00cc0b20 44657074 68536869 6674202a 2069734f DepthShift * isO │ │ │ │ - 0x00cc0b30 75746c69 6e653b20 0a202020 20766563 utline; . vec │ │ │ │ - 0x00cc0b40 3420706f 73203d20 28766563 3428615f 4 pos = (vec4(a_ │ │ │ │ - 0x00cc0b50 706f7369 74696f6e 2e78797a 2c203129 position.xyz, 1) │ │ │ │ - 0x00cc0b60 202b2076 65633428 302e302c 20302e30 + vec4(0.0, 0.0 │ │ │ │ - 0x00cc0b70 2c206465 70746853 68696674 2c20302e , depthShift, 0. │ │ │ │ - 0x00cc0b80 30292920 2a20755f 6d6f6465 6c566965 0)) * u_modelVie │ │ │ │ - 0x00cc0b90 773b200a 20202020 76656334 20736869 w; . vec4 shi │ │ │ │ - 0x00cc0ba0 66746564 506f7320 3d207665 63342861 ftedPos = vec4(a │ │ │ │ - 0x00cc0bb0 5f6e6f72 6d616c2c 20302e30 2c20302e _normal, 0.0, 0. │ │ │ │ - 0x00cc0bc0 3029202b 20706f73 3b200a20 20202067 0) + pos; . g │ │ │ │ - 0x00cc0bd0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x00cc0be0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00cc0bf0 28736869 66746564 506f7320 2a20755f (shiftedPos * u_ │ │ │ │ - 0x00cc0c00 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x00cc0c10 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x00cc0c20 30293b20 0a202020 20766563 3220636f 0); . vec2 co │ │ │ │ - 0x00cc0c30 6c6f7254 6578436f 6f726420 3d20615f lorTexCoord = a_ │ │ │ │ - 0x00cc0c40 636f6c6f 72546578 436f6f72 64202a20 colorTexCoord * │ │ │ │ - 0x00cc0c50 6e6f744f 75746c69 6e65202b 20615f6f notOutline + a_o │ │ │ │ - 0x00cc0c60 75746c69 6e65436f 6c6f7254 6578436f utlineColorTexCo │ │ │ │ - 0x00cc0c70 6f726420 2a206973 4f75746c 696e653b ord * isOutline; │ │ │ │ - 0x00cc0c80 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00cc0c90 455f5654 46200a20 20202076 5f636f6c E_VTF . v_col │ │ │ │ - 0x00cc0ca0 6f72203d 20746578 74757265 28755f63 or = texture(u_c │ │ │ │ - 0x00cc0cb0 6f6c6f72 5465782c 20636f6c 6f725465 olorTex, colorTe │ │ │ │ - 0x00cc0cc0 78436f6f 7264293b 200a2020 23656c73 xCoord); . #els │ │ │ │ - 0x00cc0cd0 65200a20 20202076 5f636f6c 6f725465 e . v_colorTe │ │ │ │ - 0x00cc0ce0 78436f6f 7264203d 20636f6c 6f725465 xCoord = colorTe │ │ │ │ - 0x00cc0cf0 78436f6f 72643b20 0a202023 656e6469 xCoord; . #endi │ │ │ │ - 0x00cc0d00 66200a20 20202076 5f6d6173 6b546578 f . v_maskTex │ │ │ │ - 0x00cc0d10 436f6f72 64203d20 615f6d61 736b5465 Coord = a_maskTe │ │ │ │ - 0x00cc0d20 78436f6f 72643b20 0a20207d 200a0000 xCoord; . } ... │ │ │ │ - 0x00cc0d30 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc0d40 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc0d50 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc0d60 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc0d70 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc0d80 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc0d90 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc0da0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc0db0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc0dc0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc0dd0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc0de0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc0df0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc0e00 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc0e10 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc0e20 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc0e30 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc0e40 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc0e50 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc0e60 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc0e70 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc0e80 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x00cc0e90 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x00cc0ea0 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ - 0x00cc0eb0 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x00cc0ec0 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ - 0x00cc0ed0 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ - 0x00cc0ee0 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ - 0x00cc0ef0 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ - 0x00cc0f00 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00cc0f10 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x00cc0f20 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x00cc0f30 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x00cc0f40 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00cc0f50 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x00cc0f60 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x00cc0f70 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x00cc0f80 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x00cc0f90 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x00cc0fa0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x00cc0fb0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x00cc0fc0 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ - 0x00cc0fd0 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ - 0x00cc0fe0 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ - 0x00cc0ff0 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ - 0x00cc1000 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ - 0x00cc1010 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ - 0x00cc1020 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x00cc1030 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00cc1040 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ - 0x00cc1050 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00cc1060 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ - 0x00cc1070 733b200a 2020756e 69666f72 6d207361 s; . uniform sa │ │ │ │ - 0x00cc1080 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ - 0x00cc1090 65783b20 0a202063 6f6e7374 20666c6f ex; . const flo │ │ │ │ - 0x00cc10a0 6174206b 42617365 44657074 68536869 at kBaseDepthShi │ │ │ │ - 0x00cc10b0 6674203d 202d3130 2e303b20 0a202063 ft = -10.0; . c │ │ │ │ - 0x00cc10c0 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ - 0x00cc10d0 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ - 0x00cc10e0 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ - 0x00cc10f0 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00cc1100 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x00cc1110 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x00cc1120 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x00cc1130 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ - 0x00cc1140 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00cc1150 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ - 0x00cc1160 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ - 0x00cc1170 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00cc1180 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00cc1190 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ - 0x00cc11a0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00cc11b0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00cc11c0 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ - 0x00cc11d0 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ - 0x00cc11e0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cc11f0 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ - 0x00cc1200 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ - 0x00cc1210 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00cc1220 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ - 0x00cc1230 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ - 0x00cc1240 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00cc1250 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00cc1260 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ - 0x00cc1270 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00cc1280 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ - 0x00cc1290 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ - 0x00cc12a0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00cc12b0 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ - 0x00cc12c0 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ - 0x00cc12d0 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ - 0x00cc12e0 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ - 0x00cc12f0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00cc1300 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00cc1310 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00cc1320 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ - 0x00cc1330 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ - 0x00cc1340 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ - 0x00cc1350 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ - 0x00cc1360 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x00cc1370 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ - 0x00cc1380 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ - 0x00cc1390 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x00cc13a0 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ - 0x00cc13b0 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ - 0x00cc13c0 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x00cc13d0 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ - 0x00cc13e0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x00cc13f0 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ - 0x00cc1400 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x00cc1410 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ - 0x00cc1420 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ - 0x00cc1430 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ - 0x00cc1440 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ - 0x00cc1450 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ - 0x00cc1460 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ - 0x00cc1470 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00cc1480 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ - 0x00cc1490 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ - 0x00cc14a0 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ - 0x00cc14b0 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ - 0x00cc14c0 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ - 0x00cc14d0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00cc14e0 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ - 0x00cc14f0 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ - 0x00cc1500 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x00cc1510 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ - 0x00cc1520 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ - 0x00cc1530 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ - 0x00cc1540 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ - 0x00cc1550 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ - 0x00cc1560 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ - 0x00cc1570 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ - 0x00cc1580 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ - 0x00cc1590 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ - 0x00cc15a0 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ - 0x00cc15b0 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ - 0x00cc15c0 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ - 0x00cc15d0 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ - 0x00cc15e0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00cc15f0 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ - 0x00cc1600 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ - 0x00cc1610 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ - 0x00cc1620 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ - 0x00cc1630 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00cc1640 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ - 0x00cc1650 696e2829 200a2020 7b200a20 20202066 in() . { . f │ │ │ │ - 0x00cc1660 6c6f6174 2069734f 75746c69 6e65203d loat isOutline = │ │ │ │ - 0x00cc1670 20737465 7028302e 352c2075 5f69734f step(0.5, u_isO │ │ │ │ - 0x00cc1680 75746c69 6e655061 7373293b 200a2020 utlinePass); . │ │ │ │ - 0x00cc1690 2020666c 6f617420 64657074 68536869 float depthShi │ │ │ │ - 0x00cc16a0 6674203d 206b4261 73654465 70746853 ft = kBaseDepthS │ │ │ │ - 0x00cc16b0 68696674 202a2069 734f7574 6c696e65 hift * isOutline │ │ │ │ - 0x00cc16c0 3b200a20 20202076 65633420 7069766f ; . vec4 pivo │ │ │ │ - 0x00cc16d0 74203d20 28766563 3428615f 706f7369 t = (vec4(a_posi │ │ │ │ - 0x00cc16e0 74696f6e 2e78797a 2c20312e 3029202b tion.xyz, 1.0) + │ │ │ │ - 0x00cc16f0 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ - 0x00cc1700 64657074 68536869 66742c20 302e3029 depthShift, 0.0) │ │ │ │ - 0x00cc1710 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ - 0x00cc1720 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ - 0x00cc1730 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ - 0x00cc1740 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ - 0x00cc1750 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x00cc1760 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00cc1770 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00cc1780 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ - 0x00cc1790 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ - 0x00cc17a0 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x00cc17b0 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ - 0x00cc17c0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc17d0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc17e0 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ - 0x00cc17f0 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ - 0x00cc1800 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ - 0x00cc1810 65633220 636f6c6f 72546578 436f6f72 ec2 colorTexCoor │ │ │ │ - 0x00cc1820 64203d20 6d697828 615f636f 6c6f7254 d = mix(a_colorT │ │ │ │ - 0x00cc1830 6578436f 6f72642c 20615f6f 75746c69 exCoord, a_outli │ │ │ │ - 0x00cc1840 6e65436f 6c6f7254 6578436f 6f72642c neColorTexCoord, │ │ │ │ - 0x00cc1850 2069734f 75746c69 6e65293b 200a2020 isOutline); . │ │ │ │ - 0x00cc1860 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ - 0x00cc1870 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ - 0x00cc1880 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ - 0x00cc1890 5465782c 20636f6c 6f725465 78436f6f Tex, colorTexCoo │ │ │ │ - 0x00cc18a0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ - 0x00cc18b0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00cc18c0 7264203d 20636f6c 6f725465 78436f6f rd = colorTexCoo │ │ │ │ - 0x00cc18d0 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x00cc18e0 20202076 5f6d6173 6b546578 436f6f72 v_maskTexCoor │ │ │ │ - 0x00cc18f0 64203d20 615f6d61 736b5465 78436f6f d = a_maskTexCoo │ │ │ │ - 0x00cc1900 72643b20 0a20207d 200a0000 00000000 rd; . } ....... │ │ │ │ - 0x00cc1910 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc1920 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc1930 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc1940 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc1950 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc1960 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc1970 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc1980 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc1990 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc19a0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc19b0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc19c0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc19d0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc19e0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc19f0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc1a00 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc1a10 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc1a20 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc1a30 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc1a40 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc1a50 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc1a60 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cc1a70 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00cc1a80 72546578 436f6f72 643b200a 2020696e rTexCoord; . in │ │ │ │ - 0x00cc1a90 20766563 3220615f 6f75746c 696e6543 vec2 a_outlineC │ │ │ │ - 0x00cc1aa0 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x00cc1ab0 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ - 0x00cc1ac0 6c3b200a 2020696e 20766563 3220615f l; . in vec2 a_ │ │ │ │ - 0x00cc1ad0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ - 0x00cc1ae0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00cc1af0 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x00cc1b00 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x00cc1b10 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x00cc1b20 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00cc1b30 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x00cc1b40 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x00cc1b50 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x00cc1b60 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x00cc1b70 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x00cc1b80 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x00cc1b90 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x00cc1ba0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00cc1bb0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00cc1bc0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ - 0x00cc1bd0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cc1be0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ - 0x00cc1bf0 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ - 0x00cc1c00 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ - 0x00cc1c10 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x00cc1c20 20755f6c 656e6774 683b200a 20202369 u_length; . #i │ │ │ │ - 0x00cc1c30 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x00cc1c40 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x00cc1c50 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ - 0x00cc1c60 200a2020 23656e64 6966200a 2020636f . #endif . co │ │ │ │ - 0x00cc1c70 6e737420 666c6f61 74206b42 61736544 nst float kBaseD │ │ │ │ - 0x00cc1c80 65707468 53686966 74203d20 2d31302e epthShift = -10. │ │ │ │ - 0x00cc1c90 303b200a 2020636f 6e737420 666c6f61 0; . const floa │ │ │ │ - 0x00cc1ca0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00cc1cb0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00cc1cc0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00cc1cd0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00cc1ce0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00cc1cf0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00cc1d00 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00cc1d10 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00cc1d20 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00cc1d30 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00cc1d40 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00cc1d50 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00cc1d60 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00cc1d70 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00cc1d80 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00cc1d90 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00cc1da0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00cc1db0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00cc1dc0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00cc1dd0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc1de0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00cc1df0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00cc1e00 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc1e10 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00cc1e20 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00cc1e30 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00cc1e40 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00cc1e50 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00cc1e60 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00cc1e70 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cc1e80 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00cc1e90 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00cc1ea0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00cc1eb0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00cc1ec0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00cc1ed0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00cc1ee0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00cc1ef0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00cc1f00 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00cc1f10 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00cc1f20 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00cc1f30 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00cc1f40 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00cc1f50 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00cc1f60 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00cc1f70 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00cc1f80 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00cc1f90 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00cc1fa0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00cc1fb0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00cc1fc0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00cc1fd0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00cc1fe0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00cc1ff0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00cc2000 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00cc2010 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00cc2020 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00cc2030 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00cc2040 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00cc2050 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00cc2060 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00cc2070 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00cc2080 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00cc2090 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00cc20a0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00cc20b0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00cc20c0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00cc20d0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00cc20e0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00cc20f0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00cc2100 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00cc2110 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00cc2120 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00cc2130 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00cc2140 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00cc2150 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00cc2160 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00cc2170 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00cc2180 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00cc2190 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00cc21a0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x00cc21b0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x00cc21c0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00cc21d0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00cc21e0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00cc21f0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00cc2200 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00cc2210 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00cc2220 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00cc2230 200a2020 2020666c 6f617420 69734f75 . float isOu │ │ │ │ - 0x00cc2240 746c696e 65203d20 73746570 28302e35 tline = step(0.5 │ │ │ │ - 0x00cc2250 2c20755f 69734f75 746c696e 65506173 , u_isOutlinePas │ │ │ │ - 0x00cc2260 73293b20 0a202020 20666c6f 61742064 s); . float d │ │ │ │ - 0x00cc2270 65707468 53686966 74203d20 6b426173 epthShift = kBas │ │ │ │ - 0x00cc2280 65446570 74685368 69667420 2a206973 eDepthShift * is │ │ │ │ - 0x00cc2290 4f75746c 696e653b 200a2020 20207665 Outline; . ve │ │ │ │ - 0x00cc22a0 63342070 6f73203d 20287665 63342861 c4 pos = (vec4(a │ │ │ │ - 0x00cc22b0 5f706f73 6974696f 6e2c2031 2e302920 _position, 1.0) │ │ │ │ - 0x00cc22c0 2b207665 63342830 2e302c20 302e302c + vec4(0.0, 0.0, │ │ │ │ - 0x00cc22d0 20646570 74685368 6966742c 20302e30 depthShift, 0.0 │ │ │ │ - 0x00cc22e0 2929202a 20755f6d 6f64656c 56696577 )) * u_modelView │ │ │ │ - 0x00cc22f0 3b200a20 20202076 65633420 73686966 ; . vec4 shif │ │ │ │ - 0x00cc2300 74656450 6f73203d 20766563 3428615f tedPos = vec4(a_ │ │ │ │ - 0x00cc2310 6e6f726d 616c2c20 302e302c 20302e30 normal, 0.0, 0.0 │ │ │ │ - 0x00cc2320 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ - 0x00cc2330 5f506f73 6974696f 6e203d20 73686966 _Position = shif │ │ │ │ - 0x00cc2340 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ - 0x00cc2350 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ - 0x00cc2360 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ - 0x00cc2370 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ - 0x00cc2380 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ - 0x00cc2390 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x00cc23a0 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ - 0x00cc23b0 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ - 0x00cc23c0 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ - 0x00cc23d0 64696620 0a202020 20766563 3220636f dif . vec2 co │ │ │ │ - 0x00cc23e0 6c6f7254 6578436f 6f726420 3d206d69 lorTexCoord = mi │ │ │ │ - 0x00cc23f0 7828615f 636f6c6f 72546578 436f6f72 x(a_colorTexCoor │ │ │ │ - 0x00cc2400 642c2061 5f6f7574 6c696e65 436f6c6f d, a_outlineColo │ │ │ │ - 0x00cc2410 72546578 436f6f72 642c2069 734f7574 rTexCoord, isOut │ │ │ │ - 0x00cc2420 6c696e65 293b200a 20202369 66646566 line); . #ifdef │ │ │ │ - 0x00cc2430 20454e41 424c455f 56544620 0a202020 ENABLE_VTF . │ │ │ │ - 0x00cc2440 20765f63 6f6c6f72 203d2074 65787475 v_color = textu │ │ │ │ - 0x00cc2450 72652875 5f636f6c 6f725465 782c2063 re(u_colorTex, c │ │ │ │ - 0x00cc2460 6f6c6f72 54657843 6f6f7264 293b200a olorTexCoord); . │ │ │ │ - 0x00cc2470 20202365 6c736520 0a202020 20765f63 #else . v_c │ │ │ │ - 0x00cc2480 6f6c6f72 54657843 6f6f7264 203d2063 olorTexCoord = c │ │ │ │ - 0x00cc2490 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x00cc24a0 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ - 0x00cc24b0 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ - 0x00cc24c0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ - 0x00cc24d0 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ - 0x00cc24e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc24f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc2500 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc2510 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc2520 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc2530 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc2540 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc2550 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc2560 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc2570 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc2580 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc2590 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc25a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc25b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc25c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc25d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc25e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc25f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc2600 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc2610 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc2620 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc2630 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00cc2640 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cc2650 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cc2660 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cc2670 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00cc2680 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00cc2690 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cc26a0 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00cc26b0 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00cc26c0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00cc26d0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00cc26e0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00cc26f0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00cc2700 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00cc2710 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cc2720 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00cc2730 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00cc2740 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00cc2750 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00cc2760 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00cc2770 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00cc2780 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00cc2790 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00cc27a0 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00cc27b0 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00cc27c0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00cc27d0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00cc27e0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cc27f0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00cc2800 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00cc2810 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc2820 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00cc2830 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00cc2840 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00cc2850 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc2860 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00cc2870 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cc2880 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cc2890 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00cc28a0 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00cc28b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc28c0 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00cc28d0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00cc28e0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cc28f0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cc2900 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00cc2910 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00cc2920 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc2930 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00cc2940 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00cc2950 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc2960 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cc2970 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cc2980 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc2990 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00cc29a0 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00cc29b0 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00cc29c0 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00cc29d0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00cc29e0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00cc29f0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00cc2a00 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00cc2a10 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00cc2a20 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00cc2a30 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00cc2a40 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00cc2a50 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00cc2a60 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00cc2a70 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00cc2a80 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00cc2a90 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cc2aa0 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00cc2ab0 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00cc2ac0 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00cc2ad0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cc2ae0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00cc2af0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00cc2b00 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00cc2b10 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00cc2b20 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00cc2b30 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00cc2b40 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00cc2b50 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00cc2b60 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00cc2b70 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00cc2b80 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00cc2b90 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00cc2ba0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cc2bb0 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00cc2bc0 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00cc2bd0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00cc2be0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00cc2bf0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00cc2c00 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00cc2c10 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00cc2c20 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00cc2c30 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00cc2c40 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00cc2c50 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00cc2c60 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00cc2c70 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00cc2c80 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cc2c90 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00cc2ca0 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00cc2cb0 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00cc2cc0 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00cc2cd0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00cc2ce0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00cc2cf0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00cc2d00 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cc2d10 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00cc2d20 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00cc2d30 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x00cc2d40 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ - 0x00cc2d50 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00cc2d60 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ - 0x00cc2d70 73203d20 76656334 28615f6e 6f726d61 s = vec4(a_norma │ │ │ │ - 0x00cc2d80 6c2c2030 2c203029 202b2070 6f733b20 l, 0, 0) + pos; │ │ │ │ - 0x00cc2d90 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x00cc2da0 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ - 0x00cc2db0 6e73666f 726d2873 68696674 6564506f nsform(shiftedPo │ │ │ │ - 0x00cc2dc0 73202a20 755f7072 6f6a6563 74696f6e s * u_projection │ │ │ │ - 0x00cc2dd0 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ - 0x00cc2de0 726d2c20 302e3029 3b200a20 20202076 rm, 0.0); . v │ │ │ │ - 0x00cc2df0 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ - 0x00cc2e00 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ - 0x00cc2e10 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ - 0x00cc2e20 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc2e30 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc2e40 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc2e50 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc2e60 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc2e70 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc2e80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc2e90 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc2ea0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc2eb0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc2ec0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc2ed0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc2ee0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc2ef0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc2f00 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc2f10 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc2f20 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc2f30 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc2f40 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc2f50 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc2f60 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc2f70 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00cc2f80 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00cc2f90 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cc2fa0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00cc2fb0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00cc2fc0 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00cc2fd0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cc2fe0 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00cc2ff0 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00cc3000 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00cc3010 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00cc3020 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00cc3030 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00cc3040 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00cc3050 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cc3060 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00cc3070 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00cc3080 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00cc3090 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00cc30a0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00cc30b0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00cc30c0 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00cc30d0 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00cc30e0 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00cc30f0 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00cc3100 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00cc3110 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00cc3120 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cc3130 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00cc3140 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00cc3150 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc3160 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00cc3170 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00cc3180 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00cc3190 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc31a0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00cc31b0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cc31c0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cc31d0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00cc31e0 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00cc31f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc3200 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00cc3210 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00cc3220 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cc3230 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cc3240 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00cc3250 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00cc3260 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc3270 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00cc3280 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00cc3290 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc32a0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cc32b0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cc32c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc32d0 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00cc32e0 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00cc32f0 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00cc3300 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00cc3310 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00cc3320 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00cc3330 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00cc3340 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00cc3350 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00cc3360 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00cc3370 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00cc3380 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00cc3390 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00cc33a0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00cc33b0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00cc33c0 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00cc33d0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cc33e0 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00cc33f0 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00cc3400 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00cc3410 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cc3420 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00cc3430 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00cc3440 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00cc3450 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00cc3460 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00cc3470 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00cc3480 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00cc3490 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00cc34a0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00cc34b0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00cc34c0 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00cc34d0 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00cc34e0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cc34f0 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00cc3500 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00cc3510 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00cc3520 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00cc3530 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00cc3540 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00cc3550 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00cc3560 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00cc3570 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00cc3580 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00cc3590 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00cc35a0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00cc35b0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00cc35c0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cc35d0 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00cc35e0 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00cc35f0 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00cc3600 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00cc3610 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00cc3620 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00cc3630 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00cc3640 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cc3650 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00cc3660 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00cc3670 7069766f 74203d20 76656334 28615f70 pivot = vec4(a_p │ │ │ │ - 0x00cc3680 6f736974 696f6e2e 78797a2c 20312e30 osition.xyz, 1.0 │ │ │ │ - 0x00cc3690 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ - 0x00cc36a0 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ - 0x00cc36b0 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ - 0x00cc36c0 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ - 0x00cc36d0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x00cc36e0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00cc36f0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00cc3700 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ - 0x00cc3710 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ - 0x00cc3720 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x00cc3730 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ - 0x00cc3740 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc3750 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc3760 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ - 0x00cc3770 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ - 0x00cc3780 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ - 0x00cc3790 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ - 0x00cc37a0 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ - 0x00cc37b0 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ - 0x00cc37c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc37d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc37e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc37f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc3800 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc3810 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc3820 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc3830 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc3840 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc3850 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc3860 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc3870 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc3880 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc3890 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc38a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc38b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc38c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc38d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc38e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc38f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc3900 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc3910 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ - 0x00cc3920 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00cc3930 72546578 436f6f72 64733b20 0a20206f rTexCoords; . o │ │ │ │ - 0x00cc3940 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ - 0x00cc3950 6578436f 6f726473 3b200a20 20756e69 exCoords; . uni │ │ │ │ - 0x00cc3960 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x00cc3970 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x00cc3980 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x00cc3990 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x00cc39a0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00cc39b0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00cc39c0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ - 0x00cc39d0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cc39e0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ - 0x00cc39f0 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ - 0x00cc3a00 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ - 0x00cc3a10 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x00cc3a20 20755f6c 656e6774 683b200a 2020636f u_length; . co │ │ │ │ - 0x00cc3a30 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x00cc3a40 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x00cc3a50 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x00cc3a60 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00cc3a70 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00cc3a80 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00cc3a90 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00cc3aa0 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x00cc3ab0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00cc3ac0 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x00cc3ad0 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x00cc3ae0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x00cc3af0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cc3b00 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x00cc3b10 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cc3b20 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00cc3b30 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x00cc3b40 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x00cc3b50 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc3b60 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x00cc3b70 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x00cc3b80 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cc3b90 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x00cc3ba0 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x00cc3bb0 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x00cac830 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00cac840 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00cac850 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cac860 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x00cac870 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x00cac880 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ + 0x00cac890 6f757420 76656333 20765f72 61646975 out vec3 v_radiu │ │ │ │ + 0x00cac8a0 733b200a 2020756e 69666f72 6d206d61 s; . uniform ma │ │ │ │ + 0x00cac8b0 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ + 0x00cac8c0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00cac8d0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00cac8e0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00cac8f0 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ + 0x00cac900 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x00cac910 755f7472 61666669 63506172 616d733b u_trafficParams; │ │ │ │ + 0x00cac920 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00cac930 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ + 0x00cac940 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00cac950 20755f6c 69676874 4172726f 77436f6c u_lightArrowCol │ │ │ │ + 0x00cac960 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ + 0x00cac970 65633420 755f6461 726b4172 726f7743 ec4 u_darkArrowC │ │ │ │ + 0x00cac980 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ + 0x00cac990 20666c6f 61742075 5f6f7574 6c696e65 float u_outline │ │ │ │ + 0x00cac9a0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cac9b0 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ + 0x00cac9c0 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00cac9d0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00cac9e0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x00cac9f0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00caca00 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00caca10 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00caca20 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00caca30 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00caca40 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00caca50 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00caca60 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00caca70 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00caca80 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00caca90 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00cacaa0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00cacab0 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00cacac0 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00cacad0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00cacae0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cacaf0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00cacb00 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00cacb10 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00cacb20 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00cacb30 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00cacb40 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cacb50 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00cacb60 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00cacb70 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cacb80 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00cacb90 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00cacba0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00cacbb0 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00cacbc0 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00cacbd0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00cacbe0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00cacbf0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00cacc00 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00cacc10 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00cacc20 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00cacc30 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00cacc40 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00cacc50 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00cacc60 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00cacc70 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00cacc80 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cacc90 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00cacca0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00caccb0 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00caccc0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00caccd0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00cacce0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00caccf0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00cacd00 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00cacd10 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00cacd20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cacd30 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00cacd40 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00cacd50 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00cacd60 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00cacd70 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cacd80 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00cacd90 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00cacda0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00cacdb0 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00cacdc0 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00cacdd0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00cacde0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00cacdf0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00cace00 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00cace10 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00cace20 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00cace30 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00cace40 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00cace50 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00cace60 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00cace70 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00cace80 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00cace90 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00cacea0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00caceb0 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00cacec0 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00caced0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00cacee0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00cacef0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00cacf00 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00cacf10 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00cacf20 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00cacf30 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00cacf40 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00cacf50 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00cacf60 20766563 32206e6f 726d616c 203d2061 vec2 normal = a │ │ │ │ + 0x00cacf70 5f6e6f72 6d616c2e 78793b20 0a202020 _normal.xy; . │ │ │ │ + 0x00cacf80 20766563 32207472 616e7366 6f726d65 vec2 transforme │ │ │ │ + 0x00cacf90 64417869 73506f73 203d2028 76656334 dAxisPos = (vec4 │ │ │ │ + 0x00cacfa0 28615f70 6f736974 696f6e2e 78792c20 (a_position.xy, │ │ │ │ + 0x00cacfb0 302e302c 20312e30 29202a20 755f6d6f 0.0, 1.0) * u_mo │ │ │ │ + 0x00cacfc0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00cacfd0 2020696e 7420696e 64657820 3d20696e int index = in │ │ │ │ + 0x00cacfe0 7428615f 706f7369 74696f6e 2e77293b t(a_position.w); │ │ │ │ + 0x00cacff0 200a2020 2020666c 6f617420 6c656674 . float left │ │ │ │ + 0x00cad000 53697a65 203d2075 5f6c6967 68744172 Size = u_lightAr │ │ │ │ + 0x00cad010 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ + 0x00cad020 200a2020 2020666c 6f617420 72696768 . float righ │ │ │ │ + 0x00cad030 7453697a 65203d20 755f6461 726b4172 tSize = u_darkAr │ │ │ │ + 0x00cad040 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ + 0x00cad050 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ + 0x00cad060 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ + 0x00cad070 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ + 0x00cad080 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ + 0x00cad090 6e6f726d 616c202a 20302e35 202a2028 normal * 0.5 * ( │ │ │ │ + 0x00cad0a0 72696768 7453697a 65202d20 6c656674 rightSize - left │ │ │ │ + 0x00cad0b0 53697a65 293b200a 20202020 20207472 Size); . tr │ │ │ │ + 0x00cad0c0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00cad0d0 203d2063 616c634c 696e6554 72616e73 = calcLineTrans │ │ │ │ + 0x00cad0e0 666f726d 65644178 6973506f 73287472 formedAxisPos(tr │ │ │ │ + 0x00cad0f0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00cad100 2c20615f 706f7369 74696f6e 2e787920 , a_position.xy │ │ │ │ + 0x00cad110 2b206e6f 726d2c20 0a202020 20202020 + norm, . │ │ │ │ + 0x00cad120 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cad130 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cad140 20202020 20202020 20202020 20202075 u │ │ │ │ + 0x00cad150 5f6d6f64 656c5669 65772c20 6c656e67 _modelView, leng │ │ │ │ + 0x00cad160 7468286e 6f726d29 293b200a 20202020 th(norm)); . │ │ │ │ + 0x00cad170 7d200a20 20202076 5f726164 69757320 } . v_radius │ │ │ │ + 0x00cad180 3d207665 63332861 5f6e6f72 6d616c2e = vec3(a_normal. │ │ │ │ + 0x00cad190 7a772c20 312e3029 202a2030 2e35202a zw, 1.0) * 0.5 * │ │ │ │ + 0x00cad1a0 20286c65 66745369 7a65202b 20726967 (leftSize + rig │ │ │ │ + 0x00cad1b0 68745369 7a65293b 200a2020 20207665 htSize); . ve │ │ │ │ + 0x00cad1c0 63322066 696e616c 506f7320 3d207472 c2 finalPos = tr │ │ │ │ + 0x00cad1d0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00cad1e0 202b2076 5f726164 6975732e 78793b20 + v_radius.xy; │ │ │ │ + 0x00cad1f0 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ + 0x00cad200 6f6f7264 203d2061 5f636f6c 6f725465 oord = a_colorTe │ │ │ │ + 0x00cad210 78436f6f 72643b20 0a202020 20766563 xCoord; . vec │ │ │ │ + 0x00cad220 3420706f 73203d20 76656334 2866696e 4 pos = vec4(fin │ │ │ │ + 0x00cad230 616c506f 732c2061 5f706f73 6974696f alPos, a_positio │ │ │ │ + 0x00cad240 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ + 0x00cad250 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ + 0x00cad260 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x00cad270 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00cad280 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ + 0x00cad290 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x00cad2a0 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ + 0x00cad2b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cad2c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cad2d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cad2e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cad2f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cad300 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cad310 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cad320 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cad330 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cad340 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cad350 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cad360 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cad370 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cad380 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cad390 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cad3a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cad3b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cad3c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cad3d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cad3e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cad3f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cad400 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00cad410 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00cad420 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cad430 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cad440 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00cad450 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00cad460 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cad470 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00cad480 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00cad490 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00cad4a0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00cad4b0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00cad4c0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00cad4d0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x00cad4e0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cad4f0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00cad500 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00cad510 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00cad520 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00cad530 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00cad540 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00cad550 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00cad560 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00cad570 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00cad580 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00cad590 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00cad5a0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00cad5b0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00cad5c0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00cad5d0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00cad5e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cad5f0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00cad600 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00cad610 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00cad620 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cad630 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00cad640 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cad650 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cad660 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00cad670 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00cad680 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cad690 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00cad6a0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00cad6b0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cad6c0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cad6d0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00cad6e0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00cad6f0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cad700 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00cad710 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00cad720 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cad730 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00cad740 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00cad750 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cad760 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00cad770 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00cad780 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00cad790 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00cad7a0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00cad7b0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00cad7c0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00cad7d0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00cad7e0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00cad7f0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00cad800 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00cad810 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00cad820 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00cad830 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00cad840 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00cad850 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00cad860 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cad870 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00cad880 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00cad890 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00cad8a0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00cad8b0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00cad8c0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00cad8d0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00cad8e0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00cad8f0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00cad900 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00cad910 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00cad920 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00cad930 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00cad940 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00cad950 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00cad960 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00cad970 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00cad980 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00cad990 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00cad9a0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00cad9b0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00cad9c0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00cad9d0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00cad9e0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00cad9f0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00cada00 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00cada10 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00cada20 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00cada30 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00cada40 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00cada50 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00cada60 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00cada70 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00cada80 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00cada90 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00cadaa0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00cadab0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00cadac0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00cadad0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00cadae0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00cadaf0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00cadb00 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ + 0x00cadb10 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ + 0x00cadb20 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00cadb30 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ + 0x00cadb40 73203d20 76656334 28615f6e 6f726d61 s = vec4(a_norma │ │ │ │ + 0x00cadb50 6c2c2030 2c203029 202b2070 6f733b20 l, 0, 0) + pos; │ │ │ │ + 0x00cadb60 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x00cadb70 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ + 0x00cadb80 6e73666f 726d2873 68696674 6564506f nsform(shiftedPo │ │ │ │ + 0x00cadb90 73202a20 755f7072 6f6a6563 74696f6e s * u_projection │ │ │ │ + 0x00cadba0 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x00cadbb0 726d2c20 302e3029 3b200a20 20202076 rm, 0.0); . v │ │ │ │ + 0x00cadbc0 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ + 0x00cadbd0 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ + 0x00cadbe0 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ + 0x00cadbf0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cadc00 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cadc10 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cadc20 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cadc30 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cadc40 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cadc50 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cadc60 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cadc70 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cadc80 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cadc90 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cadca0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cadcb0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cadcc0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cadcd0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cadce0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cadcf0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cadd00 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cadd10 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cadd20 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cadd30 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cadd40 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00cadd50 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00cadd60 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cadd70 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cadd80 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ + 0x00cadd90 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ + 0x00cadda0 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x00caddb0 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ + 0x00caddc0 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x00caddd0 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00cadde0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00caddf0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cade00 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cade10 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cade20 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cade30 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cade40 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00cade50 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00cade60 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00cade70 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cade80 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00cade90 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cadea0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00cadeb0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cadec0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00caded0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00cadee0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00cadef0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00cadf00 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00cadf10 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00cadf20 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00cadf30 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00cadf40 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00cadf50 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00cadf60 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00cadf70 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00cadf80 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00cadf90 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00cadfa0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00cadfb0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00cadfc0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00cadfd0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00cadfe0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00cadff0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00cae000 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00cae010 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cae020 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00cae030 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00cae040 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00cae050 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00cae060 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00cae070 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00cae080 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00cae090 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00cae0a0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00cae0b0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00cae0c0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00cae0d0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00cae0e0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00cae0f0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00cae100 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cae110 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cae120 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cae130 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00cae140 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00cae150 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00cae160 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00cae170 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cae180 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cae190 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cae1a0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00cae1b0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00cae1c0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00cae1d0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00cae1e0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00cae1f0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00cae200 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00cae210 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00cae220 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00cae230 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00cae240 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00cae250 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00cae260 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00cae270 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00cae280 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cae290 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00cae2a0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00cae2b0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00cae2c0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00cae2d0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00cae2e0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cae2f0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00cae300 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00cae310 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00cae320 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00cae330 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00cae340 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00cae350 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00cae360 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00cae370 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00cae380 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00cae390 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00cae3a0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00cae3b0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00cae3c0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00cae3d0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00cae3e0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00cae3f0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00cae400 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cae410 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00cae420 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00cae430 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00cae440 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00cae450 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00cae460 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00cae470 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x00cae480 65633428 615f706f 73697469 6f6e2e78 ec4(a_position.x │ │ │ │ + 0x00cae490 797a2c20 3129202a 20755f6d 6f64656c yz, 1) * u_model │ │ │ │ + 0x00cae4a0 56696577 3b200a20 20202076 65633420 View; . vec4 │ │ │ │ + 0x00cae4b0 73686966 74656450 6f73203d 20766563 shiftedPos = vec │ │ │ │ + 0x00cae4c0 3428615f 6e6f726d 616c2c20 302c2030 4(a_normal, 0, 0 │ │ │ │ + 0x00cae4d0 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ + 0x00cae4e0 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x00cae4f0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00cae500 73686966 74656450 6f73202a 20755f70 shiftedPos * u_p │ │ │ │ + 0x00cae510 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ + 0x00cae520 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ + 0x00cae530 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ + 0x00cae540 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ + 0x00cae550 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00cae560 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ + 0x00cae570 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ + 0x00cae580 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ + 0x00cae590 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cae5a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cae5b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cae5c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cae5d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cae5e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cae5f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cae600 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cae610 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cae620 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cae630 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cae640 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cae650 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cae660 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cae670 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cae680 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cae690 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cae6a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cae6b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cae6c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cae6d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cae6e0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cae6f0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00cae700 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ + 0x00cae710 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ + 0x00cae720 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x00cae730 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ + 0x00cae740 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ + 0x00cae750 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ + 0x00cae760 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ + 0x00cae770 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cae780 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00cae790 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00cae7a0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00cae7b0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00cae7c0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00cae7d0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00cae7e0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x00cae7f0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cae800 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00cae810 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00cae820 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00cae830 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00cae840 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00cae850 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00cae860 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00cae870 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00cae880 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00cae890 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00cae8a0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00cae8b0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00cae8c0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00cae8d0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00cae8e0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00cae8f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cae900 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00cae910 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00cae920 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00cae930 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cae940 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00cae950 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cae960 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cae970 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00cae980 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00cae990 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cae9a0 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00cae9b0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00cae9c0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cae9d0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cae9e0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00cae9f0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00caea00 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00caea10 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00caea20 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00caea30 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00caea40 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00caea50 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00caea60 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00caea70 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00caea80 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00caea90 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00caeaa0 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00caeab0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00caeac0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00caead0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00caeae0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00caeaf0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00caeb00 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00caeb10 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00caeb20 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00caeb30 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00caeb40 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00caeb50 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00caeb60 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00caeb70 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00caeb80 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00caeb90 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00caeba0 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00caebb0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00caebc0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00caebd0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00caebe0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00caebf0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00caec00 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00caec10 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00caec20 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00caec30 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00caec40 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00caec50 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00caec60 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00caec70 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00caec80 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00caec90 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00caeca0 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00caecb0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00caecc0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00caecd0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00caece0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00caecf0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00caed00 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00caed10 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00caed20 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00caed30 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00caed40 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00caed50 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00caed60 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00caed70 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00caed80 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00caed90 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00caeda0 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00caedb0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00caedc0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00caedd0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00caede0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00caedf0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00caee00 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x00caee10 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ + 0x00caee20 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ + 0x00caee30 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ + 0x00caee40 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ + 0x00caee50 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ + 0x00caee60 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ + 0x00caee70 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ + 0x00caee80 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ + 0x00caee90 203d2076 65633428 615f706f 73697469 = vec4(a_positi │ │ │ │ + 0x00caeea0 6f6e2c20 312e3029 202a2075 5f6d6f64 on, 1.0) * u_mod │ │ │ │ + 0x00caeeb0 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ + 0x00caeec0 3420706f 73203d20 76656334 286e6f72 4 pos = vec4(nor │ │ │ │ + 0x00caeed0 6d616c2c 20302e30 2c20302e 3029202b mal, 0.0, 0.0) + │ │ │ │ + 0x00caeee0 20703b20 0a202020 20766563 34207072 p; . vec4 pr │ │ │ │ + 0x00caeef0 6f6a6563 74656450 69766f74 203d2070 ojectedPivot = p │ │ │ │ + 0x00caef00 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ + 0x00caef10 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x00caef20 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ + 0x00caef30 616e7366 6f726d28 706f7320 2a20755f ansform(pos * u_ │ │ │ │ + 0x00caef40 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00caef50 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x00caef60 30293b20 0a202020 20666c6f 6174206e 0); . float n │ │ │ │ + 0x00caef70 65775a20 3d207072 6f6a6563 74656450 ewZ = projectedP │ │ │ │ + 0x00caef80 69766f74 2e79202f 2070726f 6a656374 ivot.y / project │ │ │ │ + 0x00caef90 65645069 766f742e 77202a20 302e3520 edPivot.w * 0.5 │ │ │ │ + 0x00caefa0 2b20302e 353b200a 20202020 676c5f50 + 0.5; . gl_P │ │ │ │ + 0x00caefb0 6f736974 696f6e2e 7a203d20 61627328 osition.z = abs( │ │ │ │ + 0x00caefc0 615f6e6f 726d616c 416e6441 6e696d61 a_normalAndAnima │ │ │ │ + 0x00caefd0 74654f72 5a2e7a29 202a206e 65775a20 teOrZ.z) * newZ │ │ │ │ + 0x00caefe0 2b202831 2e30202d 20616273 28615f6e + (1.0 - abs(a_n │ │ │ │ + 0x00caeff0 6f726d61 6c416e64 416e696d 6174654f ormalAndAnimateO │ │ │ │ + 0x00caf000 725a2e7a 2929202a 20676c5f 506f7369 rZ.z)) * gl_Posi │ │ │ │ + 0x00caf010 74696f6e 2e7a3b20 0a202020 20765f74 tion.z; . v_t │ │ │ │ + 0x00caf020 6578436f 6f726473 203d2061 5f746578 exCoords = a_tex │ │ │ │ + 0x00caf030 436f6f72 64733b20 0a202020 20765f6d Coords; . v_m │ │ │ │ + 0x00caf040 61736b43 6f6c6f72 203d2061 5f636f6c askColor = a_col │ │ │ │ + 0x00caf050 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ + 0x00caf060 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00caf070 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00caf080 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00caf090 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00caf0a0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00caf0b0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00caf0c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00caf0d0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00caf0e0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00caf0f0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00caf100 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00caf110 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00caf120 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00caf130 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00caf140 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00caf150 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00caf160 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00caf170 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00caf180 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00caf190 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00caf1a0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00caf1b0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00caf1c0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00caf1d0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00caf1e0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00caf1f0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00caf200 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00caf210 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00caf220 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00caf230 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00caf240 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00caf250 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00caf260 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00caf270 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00caf280 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x00caf290 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00caf2a0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00caf2b0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00caf2c0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00caf2d0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00caf2e0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00caf2f0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00caf300 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00caf310 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00caf320 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00caf330 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00caf340 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00caf350 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00caf360 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00caf370 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00caf380 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00caf390 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00caf3a0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00caf3b0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00caf3c0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00caf3d0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00caf3e0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00caf3f0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00caf400 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00caf410 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00caf420 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00caf430 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00caf440 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00caf450 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00caf460 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00caf470 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00caf480 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00caf490 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00caf4a0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00caf4b0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00caf4c0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00caf4d0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00caf4e0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00caf4f0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00caf500 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00caf510 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00caf520 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00caf530 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00caf540 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00caf550 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00caf560 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00caf570 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00caf580 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00caf590 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00caf5a0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00caf5b0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00caf5c0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00caf5d0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00caf5e0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00caf5f0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00caf600 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00caf610 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00caf620 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00caf630 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00caf640 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00caf650 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00caf660 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00caf670 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00caf680 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00caf690 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00caf6a0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00caf6b0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00caf6c0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00caf6d0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00caf6e0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00caf6f0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00caf700 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00caf710 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00caf720 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00caf730 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00caf740 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00caf750 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00caf760 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00caf770 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00caf780 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00caf790 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00caf7a0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00caf7b0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00caf7c0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00caf7d0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00caf7e0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00caf7f0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00caf800 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00caf810 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00caf820 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00caf830 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00caf840 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00caf850 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00caf860 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00caf870 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00caf880 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00caf890 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00caf8a0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00caf8b0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ + 0x00caf8c0 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ + 0x00caf8d0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00caf8e0 2020666c 6f617420 6e6f726d 616c4c65 float normalLe │ │ │ │ + 0x00caf8f0 6e203d20 6c656e67 74682861 5f6e6f72 n = length(a_nor │ │ │ │ + 0x00caf900 6d616c29 3b200a20 20202076 65633420 mal); . vec4 │ │ │ │ + 0x00caf910 6e203d20 76656334 28615f70 6f736974 n = vec4(a_posit │ │ │ │ + 0x00caf920 696f6e2e 7879202b 20615f6e 6f726d61 ion.xy + a_norma │ │ │ │ + 0x00caf930 6c202a20 6b536861 7065436f 6f726453 l * kShapeCoordS │ │ │ │ + 0x00caf940 63616c61 722c2030 2e302c20 302e3029 calar, 0.0, 0.0) │ │ │ │ + 0x00caf950 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ + 0x00caf960 0a202020 20766563 34206e6f 726d203d . vec4 norm = │ │ │ │ + 0x00caf970 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ + 0x00caf980 302e302c 20302e30 293b200a 20202020 0.0, 0.0); . │ │ │ │ + 0x00caf990 69662028 646f7428 6e2c206e 2920213d if (dot(n, n) != │ │ │ │ + 0x00caf9a0 20302e30 29200a20 20202020 206e6f72 0.0) . nor │ │ │ │ + 0x00caf9b0 6d203d20 6e6f726d 616c697a 65286e29 m = normalize(n) │ │ │ │ + 0x00caf9c0 202a206e 6f726d61 6c4c656e 3b200a20 * normalLen; . │ │ │ │ + 0x00caf9d0 20202076 65633420 73686966 74656450 vec4 shiftedP │ │ │ │ + 0x00caf9e0 6f73203d 206e6f72 6d202b20 706f733b os = norm + pos; │ │ │ │ + 0x00caf9f0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x00cafa00 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ + 0x00cafa10 616e7366 6f726d28 73686966 74656450 ansform(shiftedP │ │ │ │ + 0x00cafa20 6f73202a 20755f70 726f6a65 6374696f os * u_projectio │ │ │ │ + 0x00cafa30 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ + 0x00cafa40 6f726d2c 20302e30 293b200a 20202020 orm, 0.0); . │ │ │ │ + 0x00cafa50 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ + 0x00cafa60 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ + 0x00cafa70 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ + 0x00cafa80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cafa90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cafaa0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cafab0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cafac0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cafad0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cafae0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cafaf0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cafb00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cafb10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cafb20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cafb30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cafb40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cafb50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cafb60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cafb70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cafb80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cafb90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cafba0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cafbb0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cafbc0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cafbd0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cafbe0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00cafbf0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00cafc00 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x00cafc10 65633420 765f6f66 66736574 733b200a ec4 v_offsets; . │ │ │ │ + 0x00cafc20 20206f75 74207665 63342076 5f636f6c out vec4 v_col │ │ │ │ + 0x00cafc30 6f723b20 0a202075 6e69666f 726d206d or; . uniform m │ │ │ │ + 0x00cafc40 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x00cafc50 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00cafc60 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00cafc70 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cafc80 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x00cafc90 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00cafca0 20755f70 6172616d 733b200a 2020756e u_params; . un │ │ │ │ + 0x00cafcb0 69666f72 6d20666c 6f617420 755f6c69 iform float u_li │ │ │ │ + 0x00cafcc0 6e654861 6c665769 6474683b 200a2020 neHalfWidth; . │ │ │ │ + 0x00cafcd0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cafce0 6d617852 61646975 733b200a 2020636f maxRadius; . co │ │ │ │ + 0x00cafcf0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x00cafd00 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x00cafd10 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x00cafd20 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x00cafd30 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00cafd40 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00cafd50 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00cafd60 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x00cafd70 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00cafd80 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x00cafd90 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x00cafda0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x00cafdb0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cafdc0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x00cafdd0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cafde0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00cafdf0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00cafe00 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x00cafe10 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cafe20 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x00cafe30 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x00cafe40 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cafe50 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x00cafe60 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x00cafe70 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x00cafe80 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cafe90 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x00cafea0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x00cafeb0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x00cafec0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x00cafed0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00cafee0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x00cafef0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x00caff00 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x00caff10 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00caff20 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00caff30 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00caff40 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00caff50 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x00caff60 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x00caff70 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x00caff80 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x00caff90 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x00caffa0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x00caffb0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x00caffc0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00caffd0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x00caffe0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x00cafff0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00cb0000 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x00cb0010 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x00cb0020 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x00cb0030 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x00cb0040 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x00cb0050 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x00cb0060 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x00cb0070 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x00cb0080 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x00cb0090 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x00cb00a0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x00cb00b0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x00cb00c0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x00cb00d0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x00cb00e0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x00cb00f0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x00cb0100 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x00cb0110 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x00cb0120 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x00cb0130 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x00cb0140 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x00cb0150 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x00cb0160 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x00cb0170 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x00cb0180 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x00cb0190 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x00cb01a0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x00cb01b0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x00cb01c0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x00cb01d0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x00cb01e0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cb01f0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x00cb0200 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x00cb0210 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00cb0220 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x00cb0230 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x00cb0240 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x00cb0250 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x00cb0260 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00cb0270 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x00cb0280 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ + 0x00cb0290 63342070 6f73203d 20766563 3428615f c4 pos = vec4(a_ │ │ │ │ + 0x00cb02a0 706f7369 74696f6e 2e78792c 20302c20 position.xy, 0, │ │ │ │ + 0x00cb02b0 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ + 0x00cb02c0 3b200a20 20202076 65633220 6e6f726d ; . vec2 norm │ │ │ │ + 0x00cb02d0 616c203d 20766563 3228615f 6e6f726d al = vec2(a_norm │ │ │ │ + 0x00cb02e0 616c2e78 202a2075 5f706172 616d732e al.x * u_params. │ │ │ │ + 0x00cb02f0 78202d20 615f6e6f 726d616c 2e79202a x - a_normal.y * │ │ │ │ + 0x00cb0300 20755f70 6172616d 732e792c 200a2020 u_params.y, . │ │ │ │ + 0x00cb0310 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb0320 20202020 20615f6e 6f726d61 6c2e7820 a_normal.x │ │ │ │ + 0x00cb0330 2a20755f 70617261 6d732e79 202b2061 * u_params.y + a │ │ │ │ + 0x00cb0340 5f6e6f72 6d616c2e 79202a20 755f7061 _normal.y * u_pa │ │ │ │ + 0x00cb0350 72616d73 2e78293b 200a2020 20207665 rams.x); . ve │ │ │ │ + 0x00cb0360 63322073 68696674 6564506f 73203d20 c2 shiftedPos = │ │ │ │ + 0x00cb0370 6e6f726d 616c202a 20755f70 6172616d normal * u_param │ │ │ │ + 0x00cb0380 732e7a20 2b20706f 732e7879 3b200a20 s.z + pos.xy; . │ │ │ │ + 0x00cb0390 20202070 6f73203d 20766563 34287368 pos = vec4(sh │ │ │ │ + 0x00cb03a0 69667465 64506f73 2c20615f 706f7369 iftedPos, a_posi │ │ │ │ + 0x00cb03b0 74696f6e 2e7a2c20 312e3029 202a2075 tion.z, 1.0) * u │ │ │ │ + 0x00cb03c0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x00cb03d0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00cb03e0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x00cb03f0 6f726d28 706f732c 20755f70 69766f74 orm(pos, u_pivot │ │ │ │ + 0x00cb0400 5472616e 73666f72 6d2c2030 2e30293b Transform, 0.0); │ │ │ │ + 0x00cb0410 200a2020 20207665 6332206f 66667365 . vec2 offse │ │ │ │ + 0x00cb0420 7473203d 20616273 28615f6e 6f726d61 ts = abs(a_norma │ │ │ │ + 0x00cb0430 6c2e7a77 293b200a 20202020 765f6f66 l.zw); . v_of │ │ │ │ + 0x00cb0440 66736574 73203d20 76656334 28615f6e fsets = vec4(a_n │ │ │ │ + 0x00cb0450 6f726d61 6c2e7a77 2c206f66 66736574 ormal.zw, offset │ │ │ │ + 0x00cb0460 73202d20 312e3029 3b200a20 20202076 s - 1.0); . v │ │ │ │ + 0x00cb0470 5f636f6c 6f72203d 20615f63 6f6c6f72 _color = a_color │ │ │ │ + 0x00cb0480 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x00cb0490 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb04a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb04b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb04c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb04d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb04e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb04f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb0500 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb0510 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb0520 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb0530 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb0540 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb0550 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb0560 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb0570 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb0580 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb0590 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb05a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb05b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb05c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb05d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb05e0 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ + 0x00cb05f0 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ + 0x00cb0600 6f6f7264 733b200a 2020696e 20766563 oords; . in vec │ │ │ │ + 0x00cb0610 3420615f 636f6c6f 723b200a 20206f75 4 a_color; . ou │ │ │ │ + 0x00cb0620 74207665 63322076 5f746578 436f6f72 t vec2 v_texCoor │ │ │ │ + 0x00cb0630 64733b20 0a20206f 75742076 65633420 ds; . out vec4 │ │ │ │ + 0x00cb0640 765f636f 6c6f723b 200a2020 756e6966 v_color; . unif │ │ │ │ + 0x00cb0650 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ + 0x00cb0660 6374696f 6e3b200a 2020636f 6e737420 ction; . const │ │ │ │ + 0x00cb0670 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ + 0x00cb0680 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ + 0x00cb0690 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ + 0x00cb06a0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00cb06b0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00cb06c0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00cb06d0 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ + 0x00cb06e0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00cb06f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb0700 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ + 0x00cb0710 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ + 0x00cb0720 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ + 0x00cb0730 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cb0740 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ + 0x00cb0750 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x00cb0760 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb0770 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00cb0780 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ + 0x00cb0790 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb07a0 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ + 0x00cb07b0 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ + 0x00cb07c0 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00cb07d0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cb07e0 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ + 0x00cb07f0 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ + 0x00cb0800 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cb0810 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ + 0x00cb0820 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ + 0x00cb0830 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00cb0840 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x00cb0850 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ + 0x00cb0860 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ + 0x00cb0870 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ + 0x00cb0880 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ + 0x00cb0890 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x00cb08a0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00cb08b0 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00cb08c0 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ + 0x00cb08d0 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ + 0x00cb08e0 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ + 0x00cb08f0 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ + 0x00cb0900 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ + 0x00cb0910 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb0920 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ + 0x00cb0930 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ + 0x00cb0940 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00cb0950 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ + 0x00cb0960 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ + 0x00cb0970 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00cb0980 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ + 0x00cb0990 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ + 0x00cb09a0 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ + 0x00cb09b0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00cb09c0 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ + 0x00cb09d0 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ + 0x00cb09e0 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ + 0x00cb09f0 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ + 0x00cb0a00 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ + 0x00cb0a10 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ + 0x00cb0a20 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ + 0x00cb0a30 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ + 0x00cb0a40 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ + 0x00cb0a50 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ + 0x00cb0a60 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ + 0x00cb0a70 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00cb0a80 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00cb0a90 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ + 0x00cb0aa0 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ + 0x00cb0ab0 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x00cb0ac0 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ + 0x00cb0ad0 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ + 0x00cb0ae0 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ + 0x00cb0af0 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ + 0x00cb0b00 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ + 0x00cb0b10 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ + 0x00cb0b20 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ + 0x00cb0b30 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ + 0x00cb0b40 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x00cb0b50 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ + 0x00cb0b60 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00cb0b70 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ + 0x00cb0b80 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ + 0x00cb0b90 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00cb0ba0 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ + 0x00cb0bb0 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ + 0x00cb0bc0 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ + 0x00cb0bd0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00cb0be0 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ + 0x00cb0bf0 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ + 0x00cb0c00 0a20207b 200a2020 2020765f 74657843 . { . v_texC │ │ │ │ + 0x00cb0c10 6f6f7264 73203d20 615f7465 78436f6f oords = a_texCoo │ │ │ │ + 0x00cb0c20 7264733b 200a2020 2020765f 636f6c6f rds; . v_colo │ │ │ │ + 0x00cb0c30 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ + 0x00cb0c40 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00cb0c50 76656334 28615f70 6f736974 696f6e2c vec4(a_position, │ │ │ │ + 0x00cb0c60 20302c20 3129202a 20755f70 726f6a65 0, 1) * u_proje │ │ │ │ + 0x00cb0c70 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ + 0x00cb0c80 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ + 0x00cb0c90 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ + 0x00cb0ca0 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ + 0x00cb0cb0 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ + 0x00cb0cc0 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ + 0x00cb0cd0 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ + 0x00cb0ce0 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ + 0x00cb0cf0 64696620 0a20207d 200a0000 00000000 dif . } ....... │ │ │ │ + 0x00cb0d00 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb0d10 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb0d20 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb0d30 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb0d40 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb0d50 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb0d60 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb0d70 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb0d80 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb0d90 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb0da0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb0db0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb0dc0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb0dd0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb0de0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb0df0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb0e00 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb0e10 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb0e20 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb0e30 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb0e40 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb0e50 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00cb0e60 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00cb0e70 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00cb0e80 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x00cb0e90 65633420 765f7261 64697573 3b200a20 ec4 v_radius; . │ │ │ │ + 0x00cb0ea0 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ + 0x00cb0eb0 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ + 0x00cb0ec0 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ + 0x00cb0ed0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00cb0ee0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00cb0ef0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00cb0f00 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ + 0x00cb0f10 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x00cb0f20 755f726f 75746550 6172616d 733b200a u_routeParams; . │ │ │ │ + 0x00cb0f30 2020756e 69666f72 6d207665 63342075 uniform vec4 u │ │ │ │ + 0x00cb0f40 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ + 0x00cb0f50 726d2076 65633420 755f6d61 736b436f rm vec4 u_maskCo │ │ │ │ + 0x00cb0f60 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x00cb0f70 76656334 20755f6f 75746c69 6e65436f vec4 u_outlineCo │ │ │ │ + 0x00cb0f80 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x00cb0f90 76656334 20755f66 616b6543 6f6c6f72 vec4 u_fakeColor │ │ │ │ + 0x00cb0fa0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00cb0fb0 3420755f 66616b65 4f75746c 696e6543 4 u_fakeOutlineC │ │ │ │ + 0x00cb0fc0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ + 0x00cb0fd0 20766563 3220755f 66616b65 426f7264 vec2 u_fakeBord │ │ │ │ + 0x00cb0fe0 6572733b 200a2020 756e6966 6f726d20 ers; . uniform │ │ │ │ + 0x00cb0ff0 76656332 20755f70 61747465 726e3b20 vec2 u_pattern; │ │ │ │ + 0x00cb1000 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ + 0x00cb1010 755f616e 676c6543 6f735369 6e3b200a u_angleCosSin; . │ │ │ │ + 0x00cb1020 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cb1030 755f6172 726f7748 616c6657 69647468 u_arrowHalfWidth │ │ │ │ + 0x00cb1040 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cb1050 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ + 0x00cb1060 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00cb1070 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00cb1080 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x00cb1090 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00cb10a0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cb10b0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cb10c0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cb10d0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00cb10e0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00cb10f0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00cb1100 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00cb1110 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb1120 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00cb1130 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00cb1140 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00cb1150 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00cb1160 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00cb1170 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00cb1180 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cb1190 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00cb11a0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00cb11b0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00cb11c0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00cb11d0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00cb11e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb11f0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00cb1200 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00cb1210 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb1220 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00cb1230 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00cb1240 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00cb1250 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00cb1260 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00cb1270 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00cb1280 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00cb1290 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00cb12a0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00cb12b0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00cb12c0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00cb12d0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00cb12e0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00cb12f0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00cb1300 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00cb1310 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00cb1320 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cb1330 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00cb1340 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00cb1350 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00cb1360 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00cb1370 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00cb1380 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00cb1390 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00cb13a0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00cb13b0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00cb13c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb13d0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00cb13e0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00cb13f0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00cb1400 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00cb1410 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cb1420 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00cb1430 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00cb1440 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00cb1450 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00cb1460 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00cb1470 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00cb1480 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00cb1490 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00cb14a0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00cb14b0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00cb14c0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00cb14d0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00cb14e0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00cb14f0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00cb1500 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00cb1510 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00cb1520 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00cb1530 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00cb1540 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00cb1550 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00cb1560 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00cb1570 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00cb1580 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00cb1590 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00cb15a0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00cb15b0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00cb15c0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00cb15d0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00cb15e0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00cb15f0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00cb1600 20666c6f 61742072 203d2075 5f726f75 float r = u_rou │ │ │ │ + 0x00cb1610 74655061 72616d73 2e78202a 20615f6e teParams.x * a_n │ │ │ │ + 0x00cb1620 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ + 0x00cb1630 6332206e 6f726d61 6c203d20 76656332 c2 normal = vec2 │ │ │ │ + 0x00cb1640 28615f6e 6f726d61 6c2e7820 2a20755f (a_normal.x * u_ │ │ │ │ + 0x00cb1650 616e676c 65436f73 53696e2e 78202d20 angleCosSin.x - │ │ │ │ + 0x00cb1660 615f6e6f 726d616c 2e79202a 20755f61 a_normal.y * u_a │ │ │ │ + 0x00cb1670 6e676c65 436f7353 696e2e79 2c200a20 ngleCosSin.y, . │ │ │ │ + 0x00cb1680 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb1690 20202020 2020615f 6e6f726d 616c2e78 a_normal.x │ │ │ │ + 0x00cb16a0 202a2075 5f616e67 6c65436f 7353696e * u_angleCosSin │ │ │ │ + 0x00cb16b0 2e79202b 20615f6e 6f726d61 6c2e7920 .y + a_normal.y │ │ │ │ + 0x00cb16c0 2a20755f 616e676c 65436f73 53696e2e * u_angleCosSin. │ │ │ │ + 0x00cb16d0 78293b20 0a202020 20766563 34207261 x); . vec4 ra │ │ │ │ + 0x00cb16e0 64697573 203d2076 65633428 6e6f726d dius = vec4(norm │ │ │ │ + 0x00cb16f0 616c2e78 79202a20 722c2072 2c20615f al.xy * r, r, a_ │ │ │ │ + 0x00cb1700 706f7369 74696f6e 2e77293b 200a2020 position.w); . │ │ │ │ + 0x00cb1710 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ + 0x00cb1720 3428615f 706f7369 74696f6e 2e78792c 4(a_position.xy, │ │ │ │ + 0x00cb1730 20302c20 3129202a 20755f6d 6f64656c 0, 1) * u_model │ │ │ │ + 0x00cb1740 56696577 3b200a20 20202076 65633220 View; . vec2 │ │ │ │ + 0x00cb1750 73686966 74656450 6f73203d 20726164 shiftedPos = rad │ │ │ │ + 0x00cb1760 6975732e 7879202b 20706f73 2e78793b ius.xy + pos.xy; │ │ │ │ + 0x00cb1770 200a2020 2020706f 73203d20 76656334 . pos = vec4 │ │ │ │ + 0x00cb1780 28736869 66746564 506f732c 20615f70 (shiftedPos, a_p │ │ │ │ + 0x00cb1790 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ + 0x00cb17a0 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ + 0x00cb17b0 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x00cb17c0 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ + 0x00cb17d0 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ + 0x00cb17e0 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x00cb17f0 30293b20 0a202020 20765f72 61646975 0); . v_radiu │ │ │ │ + 0x00cb1800 73203d20 72616469 75733b20 0a202020 s = radius; . │ │ │ │ + 0x00cb1810 20765f63 6f6c6f72 203d2061 5f636f6c v_color = a_col │ │ │ │ + 0x00cb1820 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ + 0x00cb1830 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb1840 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb1850 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb1860 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb1870 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb1880 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb1890 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb18a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb18b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb18c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb18d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb18e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb18f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb1900 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb1910 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb1920 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb1930 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb1940 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb1950 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb1960 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb1970 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb1980 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cb1990 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00cb19a0 616c3b20 0a202069 6e207665 63332061 al; . in vec3 a │ │ │ │ + 0x00cb19b0 5f6c656e 6774683b 200a2020 696e2076 _length; . in v │ │ │ │ + 0x00cb19c0 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ + 0x00cb19d0 6f757420 76656333 20765f6c 656e6774 out vec3 v_lengt │ │ │ │ + 0x00cb19e0 683b200a 20206f75 74207665 63342076 h; . out vec4 v │ │ │ │ + 0x00cb19f0 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ + 0x00cb1a00 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00cb1a10 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cb1a20 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cb1a30 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cb1a40 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cb1a50 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cb1a60 76656334 20755f72 6f757465 50617261 vec4 u_routePara │ │ │ │ + 0x00cb1a70 6d733b20 0a202075 6e69666f 726d2076 ms; . uniform v │ │ │ │ + 0x00cb1a80 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ + 0x00cb1a90 756e6966 6f726d20 76656334 20755f6d uniform vec4 u_m │ │ │ │ + 0x00cb1aa0 61736b43 6f6c6f72 3b200a20 20756e69 askColor; . uni │ │ │ │ + 0x00cb1ab0 666f726d 20766563 3420755f 6f75746c form vec4 u_outl │ │ │ │ + 0x00cb1ac0 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ + 0x00cb1ad0 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ + 0x00cb1ae0 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x00cb1af0 6d207665 63342075 5f66616b 654f7574 m vec4 u_fakeOut │ │ │ │ + 0x00cb1b00 6c696e65 436f6c6f 723b200a 2020756e lineColor; . un │ │ │ │ + 0x00cb1b10 69666f72 6d207665 63322075 5f66616b iform vec2 u_fak │ │ │ │ + 0x00cb1b20 65426f72 64657273 3b200a20 20756e69 eBorders; . uni │ │ │ │ + 0x00cb1b30 666f726d 20766563 3220755f 70617474 form vec2 u_patt │ │ │ │ + 0x00cb1b40 65726e3b 200a2020 756e6966 6f726d20 ern; . uniform │ │ │ │ + 0x00cb1b50 76656332 20755f61 6e676c65 436f7353 vec2 u_angleCosS │ │ │ │ + 0x00cb1b60 696e3b20 0a202075 6e69666f 726d2066 in; . uniform f │ │ │ │ + 0x00cb1b70 6c6f6174 20755f61 72726f77 48616c66 loat u_arrowHalf │ │ │ │ + 0x00cb1b80 57696474 683b200a 2020756e 69666f72 Width; . unifor │ │ │ │ + 0x00cb1b90 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x00cb1ba0 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ + 0x00cb1bb0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00cb1bc0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00cb1bd0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00cb1be0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00cb1bf0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00cb1c00 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00cb1c10 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00cb1c20 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00cb1c30 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00cb1c40 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00cb1c50 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00cb1c60 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00cb1c70 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00cb1c80 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00cb1c90 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00cb1ca0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00cb1cb0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00cb1cc0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00cb1cd0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00cb1ce0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb1cf0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00cb1d00 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00cb1d10 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb1d20 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00cb1d30 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00cb1d40 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00cb1d50 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00cb1d60 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00cb1d70 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00cb1d80 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cb1d90 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00cb1da0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00cb1db0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00cb1dc0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00cb1dd0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00cb1de0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00cb1df0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00cb1e00 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x00cb1e10 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x00cb1e20 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00cb1e30 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00cb1e40 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00cb1e50 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00cb1e60 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00cb1e70 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x00cb1e80 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x00cb1e90 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x00cb1ea0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x00cb1eb0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x00cb1ec0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x00cb1ed0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x00cb1ee0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x00cb1ef0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00cb1f00 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x00cb1f10 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x00cb1f20 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x00cb1f30 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00cb1f40 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00cb1f50 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00cb1f60 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x00cb1f70 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x00cb1f80 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x00cb1f90 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x00cb1fa0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x00cb1fb0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x00cb1fc0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x00cb1fd0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x00cb1fe0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x00cb1ff0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x00cb2000 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x00cb2010 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x00cb2020 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x00cb2030 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00cb2040 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00cb2050 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00cb2060 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x00cb2070 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x00cb2080 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x00cb2090 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x00cb20a0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x00cb20b0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x00cb20c0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x00cb20d0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00cb20e0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x00cb20f0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x00cb2100 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x00cb2110 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00cb2120 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x00cb2130 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00cb2140 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ + 0x00cb2150 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ + 0x00cb2160 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ + 0x00cb2170 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ + 0x00cb2180 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ + 0x00cb2190 3b200a20 20202076 65633220 6c656e20 ; . vec2 len │ │ │ │ + 0x00cb21a0 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ + 0x00cb21b0 782c2061 5f6c656e 6774682e 7a293b20 x, a_length.z); │ │ │ │ + 0x00cb21c0 0a202020 20696620 28646f74 28615f6e . if (dot(a_n │ │ │ │ + 0x00cb21d0 6f726d61 6c2c2061 5f6e6f72 6d616c29 ormal, a_normal) │ │ │ │ + 0x00cb21e0 20213d20 302e3029 200a2020 20207b20 != 0.0) . { │ │ │ │ + 0x00cb21f0 0a202020 20202076 65633220 6e6f726d . vec2 norm │ │ │ │ + 0x00cb2200 203d2061 5f6e6f72 6d616c20 2a20755f = a_normal * u_ │ │ │ │ + 0x00cb2210 726f7574 65506172 616d732e 783b200a routeParams.x; . │ │ │ │ + 0x00cb2220 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ + 0x00cb2230 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ + 0x00cb2240 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00cb2250 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ + 0x00cb2260 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ + 0x00cb2270 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ + 0x00cb2280 0a202020 20202020 20202020 20202020 . │ │ │ │ + 0x00cb2290 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb22a0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb22b0 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ + 0x00cb22c0 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ + 0x00cb22d0 293b200a 20202020 20206966 2028755f ); . if (u_ │ │ │ │ + 0x00cb22e0 726f7574 65506172 616d732e 7920213d routeParams.y != │ │ │ │ + 0x00cb22f0 20302e30 29200a20 20202020 2020206c 0.0) . l │ │ │ │ + 0x00cb2300 656e203d 20766563 3228615f 6c656e67 en = vec2(a_leng │ │ │ │ + 0x00cb2310 74682e78 202b2061 5f6c656e 6774682e th.x + a_length. │ │ │ │ + 0x00cb2320 79202a20 755f726f 75746550 6172616d y * u_routeParam │ │ │ │ + 0x00cb2330 732e792c 20615f6c 656e6774 682e7a29 s.y, a_length.z) │ │ │ │ + 0x00cb2340 3b200a20 2020207d 200a2020 2020765f ; . } . v_ │ │ │ │ + 0x00cb2350 6c656e67 7468203d 20766563 33286c65 length = vec3(le │ │ │ │ + 0x00cb2360 6e2c2075 5f726f75 74655061 72616d73 n, u_routeParams │ │ │ │ + 0x00cb2370 2e7a293b 200a2020 2020765f 636f6c6f .z); . v_colo │ │ │ │ + 0x00cb2380 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ + 0x00cb2390 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ + 0x00cb23a0 34287472 616e7366 6f726d65 64417869 4(transformedAxi │ │ │ │ + 0x00cb23b0 73506f73 2c20615f 706f7369 74696f6e sPos, a_position │ │ │ │ + 0x00cb23c0 2e7a2c20 312e3029 202a2075 5f70726f .z, 1.0) * u_pro │ │ │ │ + 0x00cb23d0 6a656374 696f6e3b 200a2020 2020676c jection; . gl │ │ │ │ + 0x00cb23e0 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x00cb23f0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00cb2400 706f732c 20755f70 69766f74 5472616e pos, u_pivotTran │ │ │ │ + 0x00cb2410 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ + 0x00cb2420 7d200a00 00000000 00000000 00000000 } .............. │ │ │ │ + 0x00cb2430 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb2440 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb2450 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb2460 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb2470 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb2480 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb2490 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb24a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb24b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb24c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb24d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb24e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb24f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb2500 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb2510 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb2520 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb2530 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb2540 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb2550 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb2560 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb2570 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb2580 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00cb2590 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00cb25a0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cb25b0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cb25c0 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ + 0x00cb25d0 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ + 0x00cb25e0 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x00cb25f0 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ + 0x00cb2600 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x00cb2610 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00cb2620 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00cb2630 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cb2640 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cb2650 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cb2660 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cb2670 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cb2680 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00cb2690 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00cb26a0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00cb26b0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cb26c0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00cb26d0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cb26e0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00cb26f0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cb2700 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00cb2710 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00cb2720 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00cb2730 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00cb2740 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00cb2750 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00cb2760 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00cb2770 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00cb2780 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00cb2790 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00cb27a0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00cb27b0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00cb27c0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00cb27d0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00cb27e0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00cb27f0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00cb2800 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00cb2810 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00cb2820 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00cb2830 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00cb2840 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00cb2850 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb2860 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00cb2870 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00cb2880 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00cb2890 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00cb28a0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00cb28b0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00cb28c0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00cb28d0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00cb28e0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00cb28f0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00cb2900 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00cb2910 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00cb2920 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00cb2930 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00cb2940 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cb2950 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cb2960 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cb2970 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00cb2980 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00cb2990 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00cb29a0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00cb29b0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cb29c0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cb29d0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cb29e0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00cb29f0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00cb2a00 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00cb2a10 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00cb2a20 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00cb2a30 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00cb2a40 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00cb2a50 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00cb2a60 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00cb2a70 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00cb2a80 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00cb2a90 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00cb2aa0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00cb2ab0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00cb2ac0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cb2ad0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00cb2ae0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00cb2af0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00cb2b00 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00cb2b10 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00cb2b20 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cb2b30 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00cb2b40 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00cb2b50 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00cb2b60 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00cb2b70 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00cb2b80 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00cb2b90 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00cb2ba0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00cb2bb0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00cb2bc0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00cb2bd0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00cb2be0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00cb2bf0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00cb2c00 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00cb2c10 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00cb2c20 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00cb2c30 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00cb2c40 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cb2c50 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00cb2c60 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00cb2c70 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00cb2c80 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00cb2c90 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00cb2ca0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00cb2cb0 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ + 0x00cb2cc0 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ + 0x00cb2cd0 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ + 0x00cb2ce0 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x00cb2cf0 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ + 0x00cb2d00 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ + 0x00cb2d10 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ + 0x00cb2d20 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x00cb2d30 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ + 0x00cb2d40 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00cb2d50 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ + 0x00cb2d60 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00cb2d70 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ + 0x00cb2d80 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb2d90 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb2da0 20202020 20202020 20202020 2020615f a_ │ │ │ │ + 0x00cb2db0 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ + 0x00cb2dc0 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ + 0x00cb2dd0 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ + 0x00cb2de0 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ + 0x00cb2df0 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00cb2e00 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ + 0x00cb2e10 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ + 0x00cb2e20 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ + 0x00cb2e30 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb2e40 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb2e50 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb2e60 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb2e70 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb2e80 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb2e90 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb2ea0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb2eb0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb2ec0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb2ed0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb2ee0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb2ef0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb2f00 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb2f10 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb2f20 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb2f30 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb2f40 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb2f50 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb2f60 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb2f70 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb2f80 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x00cb2f90 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x00cb2fa0 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ + 0x00cb2fb0 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ + 0x00cb2fc0 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ + 0x00cb2fd0 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ + 0x00cb2fe0 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00cb2ff0 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ + 0x00cb3000 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ + 0x00cb3010 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ + 0x00cb3020 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ + 0x00cb3030 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ + 0x00cb3040 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x00cb3050 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ + 0x00cb3060 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00cb3070 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x00cb3080 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x00cb3090 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00cb30a0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x00cb30b0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00cb30c0 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x00cb30d0 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x00cb30e0 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x00cb30f0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00cb3100 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x00cb3110 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x00cb3120 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x00cb3130 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00cb3140 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x00cb3150 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x00cb3160 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ + 0x00cb3170 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00cb3180 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00cb3190 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00cb31a0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00cb31b0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00cb31c0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00cb31d0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00cb31e0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00cb31f0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00cb3200 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00cb3210 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00cb3220 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00cb3230 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00cb3240 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00cb3250 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00cb3260 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00cb3270 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00cb3280 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00cb3290 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00cb32a0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00cb32b0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb32c0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00cb32d0 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00cb32e0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00cb32f0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00cb3300 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00cb3310 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00cb3320 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00cb3330 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00cb3340 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00cb3350 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00cb3360 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00cb3370 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00cb3380 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00cb3390 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00cb33a0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cb33b0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cb33c0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cb33d0 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00cb33e0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00cb33f0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00cb3400 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00cb3410 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cb3420 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cb3430 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cb3440 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00cb3450 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00cb3460 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00cb3470 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00cb3480 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00cb3490 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00cb34a0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00cb34b0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00cb34c0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00cb34d0 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00cb34e0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00cb34f0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00cb3500 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00cb3510 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00cb3520 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cb3530 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00cb3540 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00cb3550 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00cb3560 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00cb3570 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00cb3580 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cb3590 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00cb35a0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00cb35b0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00cb35c0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00cb35d0 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00cb35e0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00cb35f0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00cb3600 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00cb3610 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00cb3620 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00cb3630 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00cb3640 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00cb3650 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00cb3660 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00cb3670 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00cb3680 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00cb3690 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00cb36a0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cb36b0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00cb36c0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00cb36d0 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00cb36e0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00cb36f0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00cb3700 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00cb3710 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ + 0x00cb3720 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ + 0x00cb3730 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ + 0x00cb3740 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x00cb3750 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ + 0x00cb3760 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ + 0x00cb3770 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ + 0x00cb3780 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x00cb3790 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ + 0x00cb37a0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00cb37b0 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ + 0x00cb37c0 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00cb37d0 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ + 0x00cb37e0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb37f0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb3800 20202020 20202020 20202020 2020615f a_ │ │ │ │ + 0x00cb3810 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ + 0x00cb3820 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ + 0x00cb3830 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ + 0x00cb3840 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ + 0x00cb3850 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ + 0x00cb3860 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ + 0x00cb3870 6f725465 78436f6f 7264293b 200a2020 orTexCoord); . │ │ │ │ + 0x00cb3880 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ + 0x00cb3890 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ + 0x00cb38a0 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00cb38b0 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ + 0x00cb38c0 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ + 0x00cb38d0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ + 0x00cb38e0 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ + 0x00cb38f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb3900 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb3910 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb3920 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb3930 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb3940 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb3950 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb3960 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb3970 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb3980 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb3990 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb39a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb39b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb39c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb39d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb39e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb39f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb3a00 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb3a10 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb3a20 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb3a30 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb3a40 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00cb3a50 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00cb3a60 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cb3a70 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cb3a80 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00cb3a90 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00cb3aa0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cb3ab0 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00cb3ac0 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00cb3ad0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00cb3ae0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00cb3af0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00cb3b00 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00cb3b10 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x00cb3b20 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cb3b30 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00cb3b40 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00cb3b50 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00cb3b60 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00cb3b70 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00cb3b80 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00cb3b90 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00cb3ba0 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00cb3bb0 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00cb3bc0 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00cb3bd0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00cb3be0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00cb3bf0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00cb3c00 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00cb3c10 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00cb3c20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb3c30 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00cb3c40 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00cb3c50 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00cb3c60 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cb3c70 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00cb3c80 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cb3c90 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cb3ca0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00cb3cb0 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00cb3cc0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb3cd0 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00cb3ce0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00cb3cf0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cb3d00 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cb3d10 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00cb3d20 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00cb3d30 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cb3d40 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00cb3d50 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00cb3d60 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb3d70 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00cb3d80 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00cb3d90 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb3da0 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00cb3db0 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00cb3dc0 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00cb3dd0 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00cb3de0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00cb3df0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00cb3e00 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00cb3e10 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00cb3e20 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00cb3e30 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00cb3e40 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00cb3e50 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00cb3e60 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00cb3e70 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00cb3e80 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00cb3e90 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00cb3ea0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cb3eb0 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00cb3ec0 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00cb3ed0 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00cb3ee0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00cb3ef0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00cb3f00 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00cb3f10 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00cb3f20 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00cb3f30 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00cb3f40 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00cb3f50 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00cb3f60 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00cb3f70 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00cb3f80 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00cb3f90 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00cb3fa0 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00cb3fb0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00cb3fc0 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00cb3fd0 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00cb3fe0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00cb3ff0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00cb4000 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00cb4010 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00cb4020 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00cb4030 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00cb4040 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00cb4050 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00cb4060 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00cb4070 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00cb4080 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00cb4090 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00cb40a0 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00cb40b0 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00cb40c0 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00cb40d0 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00cb40e0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00cb40f0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00cb4100 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00cb4110 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00cb4120 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00cb4130 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00cb4140 7069766f 74203d20 76656334 28615f70 pivot = vec4(a_p │ │ │ │ + 0x00cb4150 6f736974 696f6e2e 78797a2c 20312e30 osition.xyz, 1.0 │ │ │ │ + 0x00cb4160 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x00cb4170 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ + 0x00cb4180 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ + 0x00cb4190 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ + 0x00cb41a0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x00cb41b0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00cb41c0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00cb41d0 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ + 0x00cb41e0 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ + 0x00cb41f0 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ + 0x00cb4200 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ + 0x00cb4210 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb4220 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb4230 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ + 0x00cb4240 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ + 0x00cb4250 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ + 0x00cb4260 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ + 0x00cb4270 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ + 0x00cb4280 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ + 0x00cb4290 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb42a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb42b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb42c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb42d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb42e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb42f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb4300 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb4310 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb4320 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb4330 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb4340 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb4350 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb4360 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb4370 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb4380 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb4390 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb43a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb43b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb43c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb43d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb43e0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x00cb43f0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x00cb4400 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ + 0x00cb4410 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ + 0x00cb4420 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ + 0x00cb4430 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ + 0x00cb4440 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00cb4450 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ + 0x00cb4460 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ + 0x00cb4470 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ + 0x00cb4480 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ + 0x00cb4490 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ + 0x00cb44a0 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x00cb44b0 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ + 0x00cb44c0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00cb44d0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x00cb44e0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x00cb44f0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00cb4500 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x00cb4510 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00cb4520 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x00cb4530 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x00cb4540 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x00cb4550 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00cb4560 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x00cb4570 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x00cb4580 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x00cb4590 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00cb45a0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x00cb45b0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00cb45c0 5f565446 200a2020 756e6966 6f726d20 _VTF . uniform │ │ │ │ + 0x00cb45d0 73616d70 6c657232 4420755f 636f6c6f sampler2D u_colo │ │ │ │ + 0x00cb45e0 72546578 3b200a20 2023656e 64696620 rTex; . #endif │ │ │ │ + 0x00cb45f0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x00cb4600 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x00cb4610 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x00cb4620 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x00cb4630 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00cb4640 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00cb4650 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00cb4660 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x00cb4670 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00cb4680 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00cb4690 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x00cb46a0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00cb46b0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x00cb46c0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x00cb46d0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x00cb46e0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x00cb46f0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x00cb4700 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x00cb4710 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00cb4720 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x00cb4730 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00cb4740 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x00cb4750 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x00cb4760 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x00cb4770 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x00cb4780 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x00cb4790 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x00cb47a0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cb47b0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x00cb47c0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x00cb47d0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00cb47e0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x00cb47f0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x00cb4800 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x00cb4810 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x00cb4820 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00cb4830 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00cb4840 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00cb4850 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00cb4860 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00cb4870 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00cb4880 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00cb4890 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00cb48a0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00cb48b0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cb48c0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x00cb48d0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x00cb48e0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x00cb48f0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x00cb4900 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x00cb4910 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x00cb4920 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00cb4930 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x00cb4940 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x00cb4950 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb4960 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00cb4970 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00cb4980 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00cb4990 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x00cb49a0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00cb49b0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x00cb49c0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x00cb49d0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x00cb49e0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x00cb49f0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x00cb4a00 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00cb4a10 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x00cb4a20 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x00cb4a30 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00cb4a40 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x00cb4a50 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cb4a60 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00cb4a70 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00cb4a80 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00cb4a90 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x00cb4aa0 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x00cb4ab0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x00cb4ac0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x00cb4ad0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x00cb4ae0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x00cb4af0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x00cb4b00 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x00cb4b10 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x00cb4b20 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x00cb4b30 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x00cb4b40 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x00cb4b50 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x00cb4b60 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00cb4b70 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00cb4b80 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00cb4b90 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x00cb4ba0 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x00cb4bb0 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ + 0x00cb4bc0 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ + 0x00cb4bd0 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ + 0x00cb4be0 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ + 0x00cb4bf0 302e3029 202b2070 6f733b20 0a202020 0.0) + pos; . │ │ │ │ + 0x00cb4c00 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x00cb4c10 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00cb4c20 726d2873 68696674 6564506f 73202a20 rm(shiftedPos * │ │ │ │ + 0x00cb4c30 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ + 0x00cb4c40 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00cb4c50 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00cb4c60 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ + 0x00cb4c70 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ + 0x00cb4c80 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ + 0x00cb4c90 636f6c6f 72546578 436f6f72 64293b20 colorTexCoord); │ │ │ │ + 0x00cb4ca0 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ + 0x00cb4cb0 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ + 0x00cb4cc0 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ + 0x00cb4cd0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00cb4ce0 765f6d61 736b5465 78436f6f 7264203d v_maskTexCoord = │ │ │ │ + 0x00cb4cf0 20615f6d 61736b54 6578436f 6f72643b a_maskTexCoord; │ │ │ │ + 0x00cb4d00 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ + 0x00cb4d10 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb4d20 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb4d30 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb4d40 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb4d50 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb4d60 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb4d70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb4d80 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb4d90 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb4da0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb4db0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb4dc0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb4dd0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb4de0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb4df0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb4e00 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb4e10 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb4e20 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb4e30 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb4e40 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb4e50 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb4e60 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cb4e70 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00cb4e80 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ + 0x00cb4e90 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ + 0x00cb4ea0 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ + 0x00cb4eb0 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ + 0x00cb4ec0 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ + 0x00cb4ed0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x00cb4ee0 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ + 0x00cb4ef0 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ + 0x00cb4f00 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ + 0x00cb4f10 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ + 0x00cb4f20 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ + 0x00cb4f30 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ + 0x00cb4f40 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ + 0x00cb4f50 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ + 0x00cb4f60 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ + 0x00cb4f70 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ + 0x00cb4f80 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ + 0x00cb4f90 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ + 0x00cb4fa0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cb4fb0 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ + 0x00cb4fc0 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ + 0x00cb4fd0 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ + 0x00cb4fe0 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ + 0x00cb4ff0 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ + 0x00cb5000 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ + 0x00cb5010 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ + 0x00cb5020 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ + 0x00cb5030 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x00cb5040 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x00cb5050 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x00cb5060 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00cb5070 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00cb5080 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00cb5090 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x00cb50a0 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x00cb50b0 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x00cb50c0 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x00cb50d0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x00cb50e0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x00cb50f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb5100 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x00cb5110 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x00cb5120 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb5130 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00cb5140 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x00cb5150 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00cb5160 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x00cb5170 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x00cb5180 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00cb5190 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cb51a0 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x00cb51b0 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x00cb51c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb51d0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x00cb51e0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x00cb51f0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x00cb5200 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x00cb5210 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x00cb5220 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x00cb5230 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x00cb5240 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x00cb5250 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00cb5260 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00cb5270 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00cb5280 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x00cb5290 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x00cb52a0 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x00cb52b0 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x00cb52c0 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x00cb52d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb52e0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00cb52f0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x00cb5300 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x00cb5310 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x00cb5320 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x00cb5330 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cb5340 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x00cb5350 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x00cb5360 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x00cb5370 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cb5380 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x00cb5390 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x00cb53a0 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x00cb53b0 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x00cb53c0 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x00cb53d0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00cb53e0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x00cb53f0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x00cb5400 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x00cb5410 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x00cb5420 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x00cb5430 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00cb5440 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00cb5450 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x00cb5460 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x00cb5470 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x00cb5480 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x00cb5490 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x00cb54a0 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x00cb54b0 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x00cb54c0 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x00cb54d0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x00cb54e0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x00cb54f0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x00cb5500 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x00cb5510 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x00cb5520 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00cb5530 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x00cb5540 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x00cb5550 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00cb5560 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x00cb5570 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x00cb5580 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x00cb5590 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00cb55a0 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x00cb55b0 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x00cb55c0 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ + 0x00cb55d0 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ + 0x00cb55e0 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ + 0x00cb55f0 64656c56 6965773b 200a2020 2020706f delView; . po │ │ │ │ + 0x00cb5600 732e7879 77203d20 28706f73 202a2075 s.xyw = (pos * u │ │ │ │ + 0x00cb5610 5f70726f 6a656374 696f6e29 2e787977 _projection).xyw │ │ │ │ + 0x00cb5620 3b200a20 20202070 6f732e7a 203d2061 ; . pos.z = a │ │ │ │ + 0x00cb5630 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ + 0x00cb5640 7a536361 6c653b20 0a202020 20676c5f zScale; . gl_ │ │ │ │ + 0x00cb5650 506f7369 74696f6e 203d2075 5f706976 Position = u_piv │ │ │ │ + 0x00cb5660 6f745472 616e7366 6f726d20 2a20706f otTransform * po │ │ │ │ + 0x00cb5670 733b200a 20202369 66646566 2056554c s; . #ifdef VUL │ │ │ │ + 0x00cb5680 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ + 0x00cb5690 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ + 0x00cb56a0 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ + 0x00cb56b0 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ + 0x00cb56c0 6c5f506f 73697469 6f6e2e7a 20202b20 l_Position.z + │ │ │ │ + 0x00cb56d0 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ + 0x00cb56e0 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ + 0x00cb56f0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00cb5700 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ + 0x00cb5710 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ + 0x00cb5720 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ + 0x00cb5730 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ + 0x00cb5740 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ + 0x00cb5750 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ + 0x00cb5760 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x00cb5770 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ + 0x00cb5780 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb5790 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb57a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb57b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb57c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb57d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb57e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb57f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb5800 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb5810 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb5820 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb5830 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb5840 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb5850 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb5860 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb5870 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb5880 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb5890 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb58a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb58b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb58c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb58d0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cb58e0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00cb58f0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cb5900 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cb5910 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00cb5920 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00cb5930 20206f75 7420666c 6f617420 765f696e out float v_in │ │ │ │ + 0x00cb5940 74656e73 6974793b 200a2020 756e6966 tensity; . unif │ │ │ │ + 0x00cb5950 6f726d20 6d617434 20755f6d 6f64656c orm mat4 u_model │ │ │ │ + 0x00cb5960 56696577 3b200a20 20756e69 666f726d View; . uniform │ │ │ │ + 0x00cb5970 206d6174 3420755f 70726f6a 65637469 mat4 u_projecti │ │ │ │ + 0x00cb5980 6f6e3b20 0a202075 6e69666f 726d206d on; . uniform m │ │ │ │ + 0x00cb5990 61743420 755f7069 766f7454 72616e73 at4 u_pivotTrans │ │ │ │ + 0x00cb59a0 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ + 0x00cb59b0 20766563 3220755f 636f6e74 72617374 vec2 u_contrast │ │ │ │ + 0x00cb59c0 47616d6d 613b200a 2020756e 69666f72 Gamma; . unifor │ │ │ │ + 0x00cb59d0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x00cb59e0 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ + 0x00cb59f0 6f617420 755f7a53 63616c65 3b200a20 oat u_zScale; . │ │ │ │ + 0x00cb5a00 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00cb5a10 5f696e74 6572706f 6c617469 6f6e3b20 _interpolation; │ │ │ │ + 0x00cb5a20 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00cb5a30 20755f69 734f7574 6c696e65 50617373 u_isOutlinePass │ │ │ │ + 0x00cb5a40 3b200a20 20636f6e 73742076 65633420 ; . const vec4 │ │ │ │ + 0x00cb5a50 6b4e6f72 6d616c69 7a65644c 69676874 kNormalizedLight │ │ │ │ + 0x00cb5a60 44697220 3d207665 63342830 2e333136 Dir = vec4(0.316 │ │ │ │ + 0x00cb5a70 322c2030 2e302c20 302e3934 38362c20 2, 0.0, 0.9486, │ │ │ │ + 0x00cb5a80 302e3029 3b200a20 20636f6e 73742066 0.0); . const f │ │ │ │ + 0x00cb5a90 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x00cb5aa0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x00cb5ab0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x00cb5ac0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00cb5ad0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00cb5ae0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00cb5af0 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x00cb5b00 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x00cb5b10 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x00cb5b20 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x00cb5b30 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x00cb5b40 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x00cb5b50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb5b60 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x00cb5b70 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x00cb5b80 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb5b90 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00cb5ba0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x00cb5bb0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00cb5bc0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x00cb5bd0 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x00cb5be0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00cb5bf0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cb5c00 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x00cb5c10 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x00cb5c20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb5c30 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x00cb5c40 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x00cb5c50 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x00cb5c60 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x00cb5c70 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x00cb5c80 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x00cb5c90 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x00cb5ca0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x00cb5cb0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00cb5cc0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00cb5cd0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00cb5ce0 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x00cb5cf0 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x00cb5d00 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x00cb5d10 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x00cb5d20 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x00cb5d30 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb5d40 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00cb5d50 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x00cb5d60 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x00cb5d70 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x00cb5d80 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x00cb5d90 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cb5da0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x00cb5db0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x00cb5dc0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x00cb5dd0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cb5de0 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x00cb5df0 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x00cb5e00 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x00cb5e10 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x00cb5e20 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x00cb5e30 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00cb5e40 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x00cb5e50 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x00cb5e60 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x00cb5e70 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x00cb5e80 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x00cb5e90 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00cb5ea0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00cb5eb0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x00cb5ec0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x00cb5ed0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x00cb5ee0 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x00cb5ef0 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x00cb5f00 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x00cb5f10 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x00cb5f20 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x00cb5f30 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x00cb5f40 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x00cb5f50 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x00cb5f60 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x00cb5f70 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x00cb5f80 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00cb5f90 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x00cb5fa0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x00cb5fb0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00cb5fc0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x00cb5fd0 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x00cb5fe0 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x00cb5ff0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00cb6000 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x00cb6010 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x00cb6020 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ + 0x00cb6030 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ + 0x00cb6040 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ + 0x00cb6050 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ + 0x00cb6060 6334206e 6f726d61 6c203d20 76656334 c4 normal = vec4 │ │ │ │ + 0x00cb6070 28615f70 6f736974 696f6e20 2b20615f (a_position + a_ │ │ │ │ + 0x00cb6080 6e6f726d 616c2c20 312e3029 202a2075 normal, 1.0) * u │ │ │ │ + 0x00cb6090 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ + 0x00cb60a0 206e6f72 6d616c2e 78797720 3d20286e normal.xyw = (n │ │ │ │ + 0x00cb60b0 6f726d61 6c202a20 755f7072 6f6a6563 ormal * u_projec │ │ │ │ + 0x00cb60c0 74696f6e 292e7879 773b200a 20202020 tion).xyw; . │ │ │ │ + 0x00cb60d0 6e6f726d 616c2e7a 203d206e 6f726d61 normal.z = norma │ │ │ │ + 0x00cb60e0 6c2e7a20 2a20755f 7a536361 6c653b20 l.z * u_zScale; │ │ │ │ + 0x00cb60f0 0a202020 20706f73 2e787977 203d2028 . pos.xyw = ( │ │ │ │ + 0x00cb6100 706f7320 2a20755f 70726f6a 65637469 pos * u_projecti │ │ │ │ + 0x00cb6110 6f6e292e 7879773b 200a2020 2020706f on).xyw; . po │ │ │ │ + 0x00cb6120 732e7a20 3d20615f 706f7369 74696f6e s.z = a_position │ │ │ │ + 0x00cb6130 2e7a202a 20755f7a 5363616c 653b200a .z * u_zScale; . │ │ │ │ + 0x00cb6140 20202020 76656334 206e6f72 6d446972 vec4 normDir │ │ │ │ + 0x00cb6150 203d206e 6f726d61 6c202d20 706f733b = normal - pos; │ │ │ │ + 0x00cb6160 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ + 0x00cb6170 726d4469 722c206e 6f726d44 69722920 rmDir, normDir) │ │ │ │ + 0x00cb6180 213d2030 2e302920 0a202020 20202076 != 0.0) . v │ │ │ │ + 0x00cb6190 5f696e74 656e7369 7479203d 206d6178 _intensity = max │ │ │ │ + 0x00cb61a0 28302e30 2c202d64 6f74286b 4e6f726d (0.0, -dot(kNorm │ │ │ │ + 0x00cb61b0 616c697a 65644c69 67687444 69722c20 alizedLightDir, │ │ │ │ + 0x00cb61c0 6e6f726d 616c697a 65286e6f 726d4469 normalize(normDi │ │ │ │ + 0x00cb61d0 72292929 3b200a20 20202065 6c736520 r))); . else │ │ │ │ + 0x00cb61e0 0a202020 20202076 5f696e74 656e7369 . v_intensi │ │ │ │ + 0x00cb61f0 7479203d 20302e30 3b200a20 20202067 ty = 0.0; . g │ │ │ │ + 0x00cb6200 6c5f506f 73697469 6f6e203d 20755f70 l_Position = u_p │ │ │ │ + 0x00cb6210 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cb6220 706f733b 200a2020 23696664 65662056 pos; . #ifdef V │ │ │ │ + 0x00cb6230 554c4b41 4e200a20 20202067 6c5f506f ULKAN . gl_Po │ │ │ │ + 0x00cb6240 73697469 6f6e2e79 203d202d 676c5f50 sition.y = -gl_P │ │ │ │ + 0x00cb6250 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x00cb6260 676c5f50 6f736974 696f6e2e 7a203d20 gl_Position.z = │ │ │ │ + 0x00cb6270 28676c5f 506f7369 74696f6e 2e7a2020 (gl_Position.z │ │ │ │ + 0x00cb6280 2b20676c 5f506f73 6974696f 6e2e7729 + gl_Position.w) │ │ │ │ + 0x00cb6290 202a2030 2e353b20 0a202023 656e6469 * 0.5; . #endi │ │ │ │ + 0x00cb62a0 66200a20 20202076 5f636f6c 6f725465 f . v_colorTe │ │ │ │ + 0x00cb62b0 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ + 0x00cb62c0 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ + 0x00cb62d0 200a0000 00000000 00000000 00000000 ............... │ │ │ │ + 0x00cb62e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb62f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb6300 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb6310 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb6320 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb6330 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb6340 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb6350 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb6360 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb6370 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb6380 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb6390 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb63a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb63b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb63c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb63d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb63e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb63f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb6400 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb6410 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb6420 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb6430 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cb6440 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00cb6450 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00cb6460 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cb6470 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ + 0x00cb6480 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ + 0x00cb6490 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ + 0x00cb64a0 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ + 0x00cb64b0 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ + 0x00cb64c0 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x00cb64d0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x00cb64e0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ + 0x00cb64f0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00cb6500 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cb6510 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cb6520 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cb6530 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cb6540 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cb6550 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00cb6560 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00cb6570 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00cb6580 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cb6590 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00cb65a0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cb65b0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00cb65c0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cb65d0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00cb65e0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00cb65f0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ + 0x00cb6600 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x00cb6610 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ + 0x00cb6620 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00cb6630 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00cb6640 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00cb6650 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00cb6660 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00cb6670 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00cb6680 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00cb6690 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00cb66a0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00cb66b0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00cb66c0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00cb66d0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00cb66e0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00cb66f0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00cb6700 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00cb6710 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00cb6720 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00cb6730 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00cb6740 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00cb6750 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00cb6760 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb6770 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00cb6780 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00cb6790 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00cb67a0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00cb67b0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00cb67c0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00cb67d0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00cb67e0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00cb67f0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00cb6800 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00cb6810 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00cb6820 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00cb6830 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00cb6840 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00cb6850 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cb6860 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cb6870 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cb6880 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00cb6890 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00cb68a0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00cb68b0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00cb68c0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cb68d0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cb68e0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cb68f0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00cb6900 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00cb6910 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00cb6920 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00cb6930 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00cb6940 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00cb6950 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00cb6960 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00cb6970 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00cb6980 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00cb6990 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00cb69a0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00cb69b0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00cb69c0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00cb69d0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cb69e0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00cb69f0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00cb6a00 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00cb6a10 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00cb6a20 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00cb6a30 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cb6a40 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00cb6a50 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00cb6a60 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00cb6a70 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00cb6a80 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00cb6a90 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00cb6aa0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00cb6ab0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00cb6ac0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00cb6ad0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00cb6ae0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00cb6af0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00cb6b00 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00cb6b10 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00cb6b20 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00cb6b30 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00cb6b40 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00cb6b50 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cb6b60 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00cb6b70 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00cb6b80 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00cb6b90 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00cb6ba0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00cb6bb0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00cb6bc0 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ + 0x00cb6bd0 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ + 0x00cb6be0 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ + 0x00cb6bf0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x00cb6c00 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ + 0x00cb6c10 202b2061 5f636f6c 6f725465 78436f6f + a_colorTexCoo │ │ │ │ + 0x00cb6c20 7264732e 7a772c20 302c2030 29202b20 rds.zw, 0, 0) + │ │ │ │ + 0x00cb6c30 703b200a 20202020 676c5f50 6f736974 p; . gl_Posit │ │ │ │ + 0x00cb6c40 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x00cb6c50 5472616e 73666f72 6d28706f 73202a20 Transform(pos * │ │ │ │ + 0x00cb6c60 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ + 0x00cb6c70 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00cb6c80 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00cb6c90 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ + 0x00cb6ca0 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ + 0x00cb6cb0 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ + 0x00cb6cc0 636f6c6f 72546578 436f6f72 64732e78 colorTexCoords.x │ │ │ │ + 0x00cb6cd0 79293b20 0a202023 656c7365 200a2020 y); . #else . │ │ │ │ + 0x00cb6ce0 2020765f 636f6c6f 72546578 436f6f72 v_colorTexCoor │ │ │ │ + 0x00cb6cf0 6473203d 20615f63 6f6c6f72 54657843 ds = a_colorTexC │ │ │ │ + 0x00cb6d00 6f6f7264 732e7879 3b200a20 2023656e oords.xy; . #en │ │ │ │ + 0x00cb6d10 64696620 0a202020 20765f6e 6f726d61 dif . v_norma │ │ │ │ + 0x00cb6d20 6c203d20 615f6e6f 726d616c 3b200a20 l = a_normal; . │ │ │ │ + 0x00cb6d30 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ + 0x00cb6d40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb6d50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb6d60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb6d70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb6d80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb6d90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb6da0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb6db0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb6dc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb6dd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb6de0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb6df0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb6e00 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb6e10 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb6e20 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb6e30 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb6e40 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb6e50 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb6e60 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb6e70 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb6e80 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb6e90 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cb6ea0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00cb6eb0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cb6ec0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x00cb6ed0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00cb6ee0 5f565446 200a2020 6f757420 4c4f575f _VTF . out LOW_ │ │ │ │ + 0x00cb6ef0 50207665 63342076 5f636f6c 6f723b20 P vec4 v_color; │ │ │ │ + 0x00cb6f00 0a202023 656c7365 200a2020 6f757420 . #else . out │ │ │ │ + 0x00cb6f10 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00cb6f20 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x00cb6f30 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00cb6f40 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00cb6f50 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x00cb6f60 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x00cb6f70 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x00cb6f80 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x00cb6f90 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x00cb6fa0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x00cb6fb0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00cb6fc0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x00cb6fd0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x00cb6fe0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x00cb6ff0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x00cb7000 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x00cb7010 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x00cb7020 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ + 0x00cb7030 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x00cb7040 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x00cb7050 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x00cb7060 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ + 0x00cb7070 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x00cb7080 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x00cb7090 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x00cb70a0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00cb70b0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00cb70c0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00cb70d0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00cb70e0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x00cb70f0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00cb7100 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00cb7110 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00cb7120 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00cb7130 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cb7140 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00cb7150 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00cb7160 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00cb7170 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00cb7180 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x00cb7190 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb71a0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x00cb71b0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x00cb71c0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00cb71d0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cb71e0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x00cb71f0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x00cb7200 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cb7210 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x00cb7220 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x00cb7230 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb7240 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00cb7250 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00cb7260 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb7270 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x00cb7280 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00cb7290 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00cb72a0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00cb72b0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00cb72c0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x00cb72d0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x00cb72e0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x00cb72f0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00cb7300 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00cb7310 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00cb7320 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00cb7330 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00cb7340 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00cb7350 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x00cb7360 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x00cb7370 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cb7380 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x00cb7390 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x00cb73a0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x00cb73b0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00cb73c0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x00cb73d0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x00cb73e0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x00cb73f0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x00cb7400 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00cb7410 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00cb7420 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00cb7430 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00cb7440 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00cb7450 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x00cb7460 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x00cb7470 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x00cb7480 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00cb7490 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x00cb74a0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x00cb74b0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x00cb74c0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x00cb74d0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x00cb74e0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x00cb74f0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x00cb7500 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00cb7510 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00cb7520 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00cb7530 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00cb7540 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00cb7550 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00cb7560 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00cb7570 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x00cb7580 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x00cb7590 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x00cb75a0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x00cb75b0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x00cb75c0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x00cb75d0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00cb75e0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00cb75f0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00cb7600 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00cb7610 206e6f72 6d616c20 3d20615f 6e6f726d normal = a_norm │ │ │ │ + 0x00cb7620 616c2e78 793b200a 20202020 666c6f61 al.xy; . floa │ │ │ │ + 0x00cb7630 74206861 6c665769 64746820 3d206c65 t halfWidth = le │ │ │ │ + 0x00cb7640 6e677468 286e6f72 6d616c29 3b200a20 ngth(normal); . │ │ │ │ + 0x00cb7650 20202076 65633220 7472616e 73666f72 vec2 transfor │ │ │ │ + 0x00cb7660 6d656441 78697350 6f73203d 20287665 medAxisPos = (ve │ │ │ │ + 0x00cb7670 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x00cb7680 2c20302e 302c2031 2e302920 2a20755f , 0.0, 1.0) * u_ │ │ │ │ + 0x00cb7690 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x00cb76a0 20202020 69662028 68616c66 57696474 if (halfWidt │ │ │ │ + 0x00cb76b0 6820213d 20302e30 29200a20 2020207b h != 0.0) . { │ │ │ │ + 0x00cb76c0 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ + 0x00cb76d0 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ + 0x00cb76e0 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x00cb76f0 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ + 0x00cb7700 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ + 0x00cb7710 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ + 0x00cb7720 616c2c20 0a202020 20202020 20202020 al, . │ │ │ │ + 0x00cb7730 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb7740 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cb7750 20202020 20202020 20202075 5f6d6f64 u_mod │ │ │ │ + 0x00cb7760 656c5669 65772c20 68616c66 57696474 elView, halfWidt │ │ │ │ + 0x00cb7770 68293b20 0a202020 207d200a 20202369 h); . } . #i │ │ │ │ + 0x00cb7780 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00cb7790 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ + 0x00cb77a0 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ + 0x00cb77b0 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ + 0x00cb77c0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ + 0x00cb77d0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00cb77e0 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ + 0x00cb77f0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x00cb7800 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x00cb7810 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00cb7820 41786973 506f732c 20615f70 6f736974 AxisPos, a_posit │ │ │ │ + 0x00cb7830 696f6e2e 7a2c2031 2e302920 2a20755f ion.z, 1.0) * u_ │ │ │ │ + 0x00cb7840 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ + 0x00cb7850 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x00cb7860 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00cb7870 726d2870 6f732c20 755f7069 766f7454 rm(pos, u_pivotT │ │ │ │ + 0x00cb7880 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ + 0x00cb7890 0a20207d 200a0000 00000000 00000000 . } ........... │ │ │ │ + 0x00cb78a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb78b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb78c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb78d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb78e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb78f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb7900 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb7910 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb7920 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb7930 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb7940 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb7950 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb7960 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb7970 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb7980 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb7990 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb79a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb79b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb79c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb79d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb79e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb79f0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cb7a00 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00cb7a10 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00cb7a20 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cb7a30 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ + 0x00cb7a40 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ + 0x00cb7a50 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ + 0x00cb7a60 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ + 0x00cb7a70 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ + 0x00cb7a80 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x00cb7a90 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x00cb7aa0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ + 0x00cb7ab0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00cb7ac0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cb7ad0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cb7ae0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cb7af0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cb7b00 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cb7b10 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00cb7b20 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00cb7b30 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00cb7b40 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cb7b50 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00cb7b60 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cb7b70 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00cb7b80 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cb7b90 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00cb7ba0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00cb7bb0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ + 0x00cb7bc0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x00cb7bd0 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ + 0x00cb7be0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00cb7bf0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00cb7c00 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00cb7c10 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00cb7c20 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00cb7c30 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00cb7c40 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00cb7c50 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00cb7c60 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00cb7c70 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00cb7c80 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00cb7c90 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00cb7ca0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00cb7cb0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00cb7cc0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00cb7cd0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00cb7ce0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00cb7cf0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00cb7d00 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00cb7d10 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00cb7d20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb7d30 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00cb7d40 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00cb7d50 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00cb7d60 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00cb7d70 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00cb7d80 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00cb7d90 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00cb7da0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00cb7db0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00cb7dc0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00cb7dd0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00cb7de0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00cb7df0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00cb7e00 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00cb7e10 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cb7e20 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cb7e30 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cb7e40 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00cb7e50 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00cb7e60 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00cb7e70 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00cb7e80 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cb7e90 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cb7ea0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cb7eb0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00cb7ec0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00cb7ed0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00cb7ee0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00cb7ef0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00cb7f00 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00cb7f10 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00cb7f20 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00cb7f30 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00cb7f40 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00cb7f50 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00cb7f60 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00cb7f70 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00cb7f80 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00cb7f90 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cb7fa0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00cb7fb0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00cb7fc0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00cb7fd0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00cb7fe0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00cb7ff0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cb8000 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00cb8010 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00cb8020 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00cb8030 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00cb8040 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00cb8050 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00cb8060 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00cb8070 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00cb8080 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00cb8090 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00cb80a0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00cb80b0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00cb80c0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00cb80d0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00cb80e0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00cb80f0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00cb8100 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00cb8110 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cb8120 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00cb8130 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00cb8140 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00cb8150 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00cb8160 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00cb8170 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00cb8180 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ + 0x00cb8190 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ + 0x00cb81a0 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ + 0x00cb81b0 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x00cb81c0 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ + 0x00cb81d0 3428615f 6e6f726d 616c2e78 79202b20 4(a_normal.xy + │ │ │ │ + 0x00cb81e0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00cb81f0 2e7a772c 20302e30 2c20302e 3029202a .zw, 0.0, 0.0) * │ │ │ │ + 0x00cb8200 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00cb8210 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x00cb8220 3d206170 706c7942 696c6c62 6f617264 = applyBillboard │ │ │ │ + 0x00cb8230 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ + 0x00cb8240 69766f74 202a2075 5f70726f 6a656374 ivot * u_project │ │ │ │ + 0x00cb8250 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ + 0x00cb8260 73666f72 6d2c2030 2e302c20 6f666673 sform, 0.0, offs │ │ │ │ + 0x00cb8270 65742e78 79293b20 0a202023 69666465 et.xy); . #ifde │ │ │ │ + 0x00cb8280 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x00cb8290 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ + 0x00cb82a0 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ + 0x00cb82b0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00cb82c0 2e787929 3b200a20 2023656c 7365200a .xy); . #else . │ │ │ │ + 0x00cb82d0 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ + 0x00cb82e0 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ + 0x00cb82f0 78436f6f 7264732e 78793b20 0a202023 xCoords.xy; . # │ │ │ │ + 0x00cb8300 656e6469 66200a20 20202076 5f6e6f72 endif . v_nor │ │ │ │ + 0x00cb8310 6d616c20 3d20615f 6e6f726d 616c3b20 mal = a_normal; │ │ │ │ + 0x00cb8320 0a20207d 200a0000 00000000 00000000 . } ........... │ │ │ │ + 0x00cb8330 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb8340 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb8350 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb8360 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb8370 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb8380 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb8390 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb83a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb83b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb83c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb83d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb83e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb83f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb8400 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb8410 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb8420 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb8430 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb8440 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb8450 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb8460 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb8470 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb8480 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ + 0x00cb8490 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ + 0x00cb84a0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x00cb84b0 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00cb84c0 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ + 0x00cb84d0 743b200a 2020756e 69666f72 6d207665 t; . uniform ve │ │ │ │ + 0x00cb84e0 63342075 5f667261 6d656275 66666572 c4 u_framebuffer │ │ │ │ + 0x00cb84f0 4d657472 6963733b 200a2020 636f6e73 Metrics; . cons │ │ │ │ + 0x00cb8500 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x00cb8510 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x00cb8520 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x00cb8530 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00cb8540 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00cb8550 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00cb8560 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00cb8570 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x00cb8580 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00cb8590 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00cb85a0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00cb85b0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00cb85c0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cb85d0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00cb85e0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00cb85f0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00cb8600 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00cb8610 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x00cb8620 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb8630 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x00cb8640 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x00cb8650 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00cb8660 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cb8670 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x00cb8680 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x00cb8690 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cb86a0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x00cb86b0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x00cb86c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb86d0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00cb86e0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00cb86f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb8700 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x00cb8710 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00cb8720 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00cb8730 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00cb8740 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00cb8750 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x00cb8760 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x00cb8770 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x00cb8780 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00cb8790 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00cb87a0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00cb87b0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00cb87c0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00cb87d0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00cb87e0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x00cb87f0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x00cb8800 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cb8810 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x00cb8820 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x00cb8830 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x00cb8840 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00cb8850 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x00cb8860 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x00cb8870 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x00cb8880 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x00cb8890 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00cb88a0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00cb88b0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00cb88c0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00cb88d0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00cb88e0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x00cb88f0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x00cb8900 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x00cb8910 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00cb8920 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x00cb8930 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x00cb8940 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x00cb8950 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x00cb8960 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x00cb8970 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x00cb8980 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x00cb8990 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00cb89a0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00cb89b0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00cb89c0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00cb89d0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00cb89e0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00cb89f0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00cb8a00 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x00cb8a10 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x00cb8a20 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x00cb8a30 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x00cb8a40 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x00cb8a50 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x00cb8a60 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00cb8a70 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00cb8a80 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00cb8a90 29200a20 207b200a 20202020 765f636f ) . { . v_co │ │ │ │ + 0x00cb8aa0 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x00cb8ab0 5f74636f 6f72643b 200a2020 2020765f _tcoord; . v_ │ │ │ │ + 0x00cb8ac0 6f666673 6574203d 20755f66 72616d65 offset = u_frame │ │ │ │ + 0x00cb8ad0 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ + 0x00cb8ae0 7879202a 20766563 3428312e 302c2030 xy * vec4(1.0, 0 │ │ │ │ + 0x00cb8af0 2e302c20 302e302c 20312e30 29202b20 .0, 0.0, 1.0) + │ │ │ │ + 0x00cb8b00 615f7463 6f6f7264 2e787978 793b200a a_tcoord.xyxy; . │ │ │ │ + 0x00cb8b10 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x00cb8b20 3d207665 63342861 5f706f73 2c20302e = vec4(a_pos, 0. │ │ │ │ + 0x00cb8b30 302c2031 2e30293b 200a2020 7d200a00 0, 1.0); . } .. │ │ │ │ + 0x00cb8b40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb8b50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb8b60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb8b70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb8b80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb8b90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb8ba0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb8bb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb8bc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb8bd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb8be0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb8bf0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb8c00 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb8c10 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb8c20 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb8c30 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb8c40 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb8c50 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb8c60 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb8c70 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb8c80 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb8c90 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ + 0x00cb8ca0 76656332 20615f74 6578436f 6f726473 vec2 a_texCoords │ │ │ │ + 0x00cb8cb0 3b200a20 206f7574 20666c6f 61742076 ; . out float v │ │ │ │ + 0x00cb8cc0 5f696e74 656e7369 74793b20 0a202075 _intensity; . u │ │ │ │ + 0x00cb8cd0 6e69666f 726d206d 61743420 755f7472 niform mat4 u_tr │ │ │ │ + 0x00cb8ce0 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ + 0x00cb8cf0 6f726d20 6d617434 20755f6e 6f726d61 orm mat4 u_norma │ │ │ │ + 0x00cb8d00 6c547261 6e73666f 726d3b20 0a202075 lTransform; . u │ │ │ │ + 0x00cb8d10 6e69666f 726d2076 65633420 755f636f niform vec4 u_co │ │ │ │ + 0x00cb8d20 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x00cb8d30 76656332 20755f74 6578436f 6f726446 vec2 u_texCoordF │ │ │ │ + 0x00cb8d40 6c697070 696e673b 200a2020 636f6e73 lipping; . cons │ │ │ │ + 0x00cb8d50 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x00cb8d60 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x00cb8d70 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x00cb8d80 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00cb8d90 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00cb8da0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00cb8db0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00cb8dc0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x00cb8dd0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00cb8de0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00cb8df0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00cb8e00 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00cb8e10 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cb8e20 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00cb8e30 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00cb8e40 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00cb8e50 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00cb8e60 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x00cb8e70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb8e80 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x00cb8e90 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x00cb8ea0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00cb8eb0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cb8ec0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x00cb8ed0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x00cb8ee0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cb8ef0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x00cb8f00 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x00cb8f10 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb8f20 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00cb8f30 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00cb8f40 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb8f50 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x00cb8f60 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00cb8f70 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00cb8f80 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00cb8f90 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00cb8fa0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x00cb8fb0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x00cb8fc0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x00cb8fd0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00cb8fe0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00cb8ff0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00cb9000 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00cb9010 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00cb9020 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00cb9030 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x00cb9040 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x00cb9050 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cb9060 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x00cb9070 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x00cb9080 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x00cb9090 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00cb90a0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x00cb90b0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x00cb90c0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x00cb90d0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x00cb90e0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00cb90f0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00cb9100 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00cb9110 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00cb9120 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00cb9130 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x00cb9140 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x00cb9150 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x00cb9160 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00cb9170 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x00cb9180 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x00cb9190 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x00cb91a0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x00cb91b0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x00cb91c0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x00cb91d0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x00cb91e0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00cb91f0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00cb9200 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00cb9210 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00cb9220 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00cb9230 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00cb9240 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00cb9250 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x00cb9260 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x00cb9270 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x00cb9280 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x00cb9290 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x00cb92a0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x00cb92b0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00cb92c0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00cb92d0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00cb92e0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00cb92f0 20706f73 6974696f 6e203d20 755f7472 position = u_tr │ │ │ │ + 0x00cb9300 616e7366 6f726d20 2a207665 63342861 ansform * vec4(a │ │ │ │ + 0x00cb9310 5f706f73 2c20312e 30293b20 0a202020 _pos, 1.0); . │ │ │ │ + 0x00cb9320 20765f69 6e74656e 73697479 203d2061 v_intensity = a │ │ │ │ + 0x00cb9330 5f746578 436f6f72 64732e78 3b200a20 _texCoords.x; . │ │ │ │ + 0x00cb9340 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x00cb9350 20706f73 6974696f 6e3b200a 20202369 position; . #i │ │ │ │ + 0x00cb9360 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x00cb9370 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ + 0x00cb9380 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ + 0x00cb9390 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x00cb93a0 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ + 0x00cb93b0 6f6e2e7a 202b2067 6c5f506f 73697469 on.z + gl_Positi │ │ │ │ + 0x00cb93c0 6f6e2e77 29202a20 302e353b 200a2020 on.w) * 0.5; . │ │ │ │ + 0x00cb93d0 23656e64 6966200a 20207d20 0a000000 #endif . } .... │ │ │ │ + 0x00cb93e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb93f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb9400 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb9410 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb9420 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb9430 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb9440 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb9450 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb9460 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb9470 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb9480 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb9490 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb94a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb94b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb94c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb94d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb94e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb94f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb9500 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb9510 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb9520 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb9530 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cb9540 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00cb9550 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ + 0x00cb9560 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ + 0x00cb9570 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ + 0x00cb9580 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ + 0x00cb9590 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ + 0x00cb95a0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x00cb95b0 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ + 0x00cb95c0 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ + 0x00cb95d0 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ + 0x00cb95e0 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ + 0x00cb95f0 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ + 0x00cb9600 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ + 0x00cb9610 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ + 0x00cb9620 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ + 0x00cb9630 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ + 0x00cb9640 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ + 0x00cb9650 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ + 0x00cb9660 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ + 0x00cb9670 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cb9680 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ + 0x00cb9690 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ + 0x00cb96a0 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ + 0x00cb96b0 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ + 0x00cb96c0 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ + 0x00cb96d0 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ + 0x00cb96e0 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ + 0x00cb96f0 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ + 0x00cb9700 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x00cb9710 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x00cb9720 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x00cb9730 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00cb9740 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00cb9750 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00cb9760 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x00cb9770 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x00cb9780 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x00cb9790 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x00cb97a0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x00cb97b0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x00cb97c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb97d0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x00cb97e0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x00cb97f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cb9800 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00cb9810 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x00cb9820 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00cb9830 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x00cb9840 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x00cb9850 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00cb9860 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cb9870 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x00cb9880 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x00cb9890 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cb98a0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x00cb98b0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x00cb98c0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x00cb98d0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x00cb98e0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x00cb98f0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x00cb9900 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x00cb9910 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x00cb9920 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00cb9930 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00cb9940 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00cb9950 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x00cb9960 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x00cb9970 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x00cb9980 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x00cb9990 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x00cb99a0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cb99b0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00cb99c0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x00cb99d0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x00cb99e0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x00cb99f0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x00cb9a00 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cb9a10 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x00cb9a20 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x00cb9a30 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x00cb9a40 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cb9a50 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x00cb9a60 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x00cb9a70 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x00cb9a80 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x00cb9a90 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x00cb9aa0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00cb9ab0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x00cb9ac0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x00cb9ad0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x00cb9ae0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x00cb9af0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x00cb9b00 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00cb9b10 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00cb9b20 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x00cb9b30 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x00cb9b40 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x00cb9b50 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x00cb9b60 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x00cb9b70 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x00cb9b80 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x00cb9b90 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x00cb9ba0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x00cb9bb0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x00cb9bc0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x00cb9bd0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x00cb9be0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x00cb9bf0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00cb9c00 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x00cb9c10 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x00cb9c20 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00cb9c30 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x00cb9c40 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x00cb9c50 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x00cb9c60 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00cb9c70 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x00cb9c80 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x00cb9c90 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ + 0x00cb9ca0 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ + 0x00cb9cb0 696f6e2c 20312920 2a20755f 6d6f6465 ion, 1) * u_mode │ │ │ │ + 0x00cb9cc0 6c566965 77202a20 755f7072 6f6a6563 lView * u_projec │ │ │ │ + 0x00cb9cd0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x00cb9ce0 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ + 0x00cb9cf0 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ + 0x00cb9d00 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x00cb9d10 726d2c20 302e3029 3b200a20 20236966 rm, 0.0); . #if │ │ │ │ + 0x00cb9d20 64656620 454e4142 4c455f56 5446200a def ENABLE_VTF . │ │ │ │ + 0x00cb9d30 20202020 765f636f 6c6f7220 3d207465 v_color = te │ │ │ │ + 0x00cb9d40 78747572 6528755f 636f6c6f 72546578 xture(u_colorTex │ │ │ │ + 0x00cb9d50 2c20615f 636f6c6f 72546578 436f6f72 , a_colorTexCoor │ │ │ │ + 0x00cb9d60 6473293b 200a2020 23656c73 65200a20 ds); . #else . │ │ │ │ + 0x00cb9d70 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00cb9d80 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ + 0x00cb9d90 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ + 0x00cb9da0 66200a20 207d200a 00000000 00000000 f . } ......... │ │ │ │ + 0x00cb9db0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cb9dc0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cb9dd0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cb9de0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cb9df0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cb9e00 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cb9e10 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cb9e20 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cb9e30 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cb9e40 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cb9e50 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cb9e60 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cb9e70 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cb9e80 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cb9e90 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cb9ea0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cb9eb0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cb9ec0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cb9ed0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cb9ee0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cb9ef0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cb9f00 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ + 0x00cb9f10 696e2076 65633420 765f6f66 66736574 in vec4 v_offset │ │ │ │ + 0x00cb9f20 303b200a 2020696e 20766563 3420765f 0; . in vec4 v_ │ │ │ │ + 0x00cb9f30 6f666673 6574313b 200a2020 696e2076 offset1; . in v │ │ │ │ + 0x00cb9f40 65633420 765f6f66 66736574 323b200a ec4 v_offset2; . │ │ │ │ + 0x00cb9f50 20206f75 74207665 63342076 5f467261 out vec4 v_Fra │ │ │ │ + 0x00cb9f60 67436f6c 6f723b20 0a202075 6e69666f gColor; . unifo │ │ │ │ + 0x00cb9f70 726d2076 65633420 755f6672 616d6562 rm vec4 u_frameb │ │ │ │ + 0x00cb9f80 75666665 724d6574 72696373 3b200a20 ufferMetrics; . │ │ │ │ + 0x00cb9f90 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x00cb9fa0 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x00cb9fb0 2020756e 69666f72 6d207361 6d706c65 uniform sample │ │ │ │ + 0x00cb9fc0 72324420 755f736d 61614172 65613b20 r2D u_smaaArea; │ │ │ │ + 0x00cb9fd0 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x00cb9fe0 65723244 20755f73 6d616153 65617263 er2D u_smaaSearc │ │ │ │ + 0x00cb9ff0 683b200a 20202364 6566696e 6520534d h; . #define SM │ │ │ │ + 0x00cba000 41415f53 45415243 48544558 5f53495a AA_SEARCHTEX_SIZ │ │ │ │ + 0x00cba010 45207665 63322836 362e302c 2033332e E vec2(66.0, 33. │ │ │ │ + 0x00cba020 3029200a 20202364 6566696e 6520534d 0) . #define SM │ │ │ │ + 0x00cba030 41415f53 45415243 48544558 5f504143 AA_SEARCHTEX_PAC │ │ │ │ + 0x00cba040 4b45445f 53495a45 20766563 32283634 KED_SIZE vec2(64 │ │ │ │ + 0x00cba050 2e302c20 31362e30 29200a20 20236465 .0, 16.0) . #de │ │ │ │ + 0x00cba060 66696e65 20534d41 415f4152 45415445 fine SMAA_AREATE │ │ │ │ + 0x00cba070 585f4d41 585f4449 5354414e 43452031 X_MAX_DISTANCE 1 │ │ │ │ + 0x00cba080 362e3020 0a202023 64656669 6e652053 6.0 . #define S │ │ │ │ + 0x00cba090 4d41415f 41524541 5445585f 50495845 MAA_AREATEX_PIXE │ │ │ │ + 0x00cba0a0 4c5f5349 5a452028 76656332 28312e30 L_SIZE (vec2(1.0 │ │ │ │ + 0x00cba0b0 202f2032 35362e30 2c20312e 30202f20 / 256.0, 1.0 / │ │ │ │ + 0x00cba0c0 31303234 2e302929 200a2020 23646566 1024.0)) . #def │ │ │ │ + 0x00cba0d0 696e6520 534d4141 4c6f6f70 42656769 ine SMAALoopBegi │ │ │ │ + 0x00cba0e0 6e28636f 6e646974 696f6e29 20776869 n(condition) whi │ │ │ │ + 0x00cba0f0 6c652028 636f6e64 6974696f 6e29207b le (condition) { │ │ │ │ + 0x00cba100 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ + 0x00cba110 4c6f6f70 456e6420 7d200a20 20236465 LoopEnd } . #de │ │ │ │ + 0x00cba120 66696e65 20534d41 4153616d 706c654c fine SMAASampleL │ │ │ │ + 0x00cba130 6576656c 5a65726f 28746578 2c20636f evelZero(tex, co │ │ │ │ + 0x00cba140 6f726429 20746578 74757265 4c6f6428 ord) textureLod( │ │ │ │ + 0x00cba150 7465782c 20636f6f 72642c20 302e3029 tex, coord, 0.0) │ │ │ │ + 0x00cba160 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ + 0x00cba170 53616d70 6c654c65 76656c5a 65726f4f SampleLevelZeroO │ │ │ │ + 0x00cba180 66667365 74287465 782c2063 6f6f7264 ffset(tex, coord │ │ │ │ + 0x00cba190 2c206f66 66736574 29207465 78747572 , offset) textur │ │ │ │ + 0x00cba1a0 654c6f64 4f666673 65742874 65782c20 eLodOffset(tex, │ │ │ │ + 0x00cba1b0 636f6f72 642c2030 2e302c20 6f666673 coord, 0.0, offs │ │ │ │ + 0x00cba1c0 65742920 0a202023 64656669 6e652053 et) . #define S │ │ │ │ + 0x00cba1d0 4d414152 6f756e64 28762920 726f756e MAARound(v) roun │ │ │ │ + 0x00cba1e0 64282876 2929200a 20202364 6566696e d((v)) . #defin │ │ │ │ + 0x00cba1f0 6520534d 41414f66 66736574 28782c79 e SMAAOffset(x,y │ │ │ │ + 0x00cba200 29206976 65633228 782c7929 200a2020 ) ivec2(x,y) . │ │ │ │ + 0x00cba210 636f6e73 74207665 6332206b 41726561 const vec2 kArea │ │ │ │ + 0x00cba220 5465784d 61784469 7374616e 6365203d TexMaxDistance = │ │ │ │ + 0x00cba230 20766563 3228534d 41415f41 52454154 vec2(SMAA_AREAT │ │ │ │ + 0x00cba240 45585f4d 41585f44 49535441 4e43452c EX_MAX_DISTANCE, │ │ │ │ + 0x00cba250 20534d41 415f4152 45415445 585f4d41 SMAA_AREATEX_MA │ │ │ │ + 0x00cba260 585f4449 5354414e 4345293b 200a2020 X_DISTANCE); . │ │ │ │ + 0x00cba270 636f6e73 7420666c 6f617420 6b416374 const float kAct │ │ │ │ + 0x00cba280 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x00cba290 203d2030 2e383238 313b200a 2020666c = 0.8281; . fl │ │ │ │ + 0x00cba2a0 6f617420 534d4141 53656172 63684c65 oat SMAASearchLe │ │ │ │ + 0x00cba2b0 6e677468 28766563 3220652c 20666c6f ngth(vec2 e, flo │ │ │ │ + 0x00cba2c0 6174206f 66667365 7429200a 20207b20 at offset) . { │ │ │ │ + 0x00cba2d0 0a202020 20766563 32207363 616c6520 . vec2 scale │ │ │ │ + 0x00cba2e0 3d20534d 41415f53 45415243 48544558 = SMAA_SEARCHTEX │ │ │ │ + 0x00cba2f0 5f53495a 45202a20 76656332 28302e35 _SIZE * vec2(0.5 │ │ │ │ + 0x00cba300 2c202d31 2e30293b 200a2020 20207665 , -1.0); . ve │ │ │ │ + 0x00cba310 63322062 69617320 3d20534d 41415f53 c2 bias = SMAA_S │ │ │ │ + 0x00cba320 45415243 48544558 5f53495a 45202a20 EARCHTEX_SIZE * │ │ │ │ + 0x00cba330 76656332 286f6666 7365742c 20312e30 vec2(offset, 1.0 │ │ │ │ + 0x00cba340 293b200a 20202020 7363616c 65202b3d ); . scale += │ │ │ │ + 0x00cba350 20766563 32282d31 2e302c20 20312e30 vec2(-1.0, 1.0 │ │ │ │ + 0x00cba360 293b200a 20202020 62696173 202b3d20 ); . bias += │ │ │ │ + 0x00cba370 76656332 2820302e 352c202d 302e3529 vec2( 0.5, -0.5) │ │ │ │ + 0x00cba380 3b200a20 20202073 63616c65 202a3d20 ; . scale *= │ │ │ │ + 0x00cba390 312e3020 2f20534d 41415f53 45415243 1.0 / SMAA_SEARC │ │ │ │ + 0x00cba3a0 48544558 5f504143 4b45445f 53495a45 HTEX_PACKED_SIZE │ │ │ │ + 0x00cba3b0 3b200a20 20202062 69617320 2a3d2031 ; . bias *= 1 │ │ │ │ + 0x00cba3c0 2e30202f 20534d41 415f5345 41524348 .0 / SMAA_SEARCH │ │ │ │ + 0x00cba3d0 5445585f 5041434b 45445f53 495a453b TEX_PACKED_SIZE; │ │ │ │ + 0x00cba3e0 200a2020 20207265 7475726e 20534d41 . return SMA │ │ │ │ + 0x00cba3f0 4153616d 706c654c 6576656c 5a65726f ASampleLevelZero │ │ │ │ + 0x00cba400 28755f73 6d616153 65617263 682c2073 (u_smaaSearch, s │ │ │ │ + 0x00cba410 63616c65 202a2065 202b2062 69617329 cale * e + bias) │ │ │ │ + 0x00cba420 2e723b20 0a20207d 200a2020 666c6f61 .r; . } . floa │ │ │ │ + 0x00cba430 7420534d 41415365 61726368 584c6566 t SMAASearchXLef │ │ │ │ + 0x00cba440 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ + 0x00cba450 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ + 0x00cba460 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ + 0x00cba470 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ + 0x00cba480 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ + 0x00cba490 6e287465 78636f6f 72642e78 203e2065 n(texcoord.x > e │ │ │ │ + 0x00cba4a0 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ + 0x00cba4b0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x00cba4c0 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ + 0x00cba4d0 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ + 0x00cba4e0 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ + 0x00cba4f0 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ + 0x00cba500 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ + 0x00cba510 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ + 0x00cba520 2d322e30 2c20302e 3029202a 20755f66 -2.0, 0.0) * u_f │ │ │ │ + 0x00cba530 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ + 0x00cba540 732e7879 202b2074 6578636f 6f72643b s.xy + texcoord; │ │ │ │ + 0x00cba550 200a2020 2020534d 41414c6f 6f70456e . SMAALoopEn │ │ │ │ + 0x00cba560 64200a20 20202066 6c6f6174 206f6666 d . float off │ │ │ │ + 0x00cba570 73657420 3d20332e 3235202d 20283235 set = 3.25 - (25 │ │ │ │ + 0x00cba580 352e3020 2f203132 372e3029 202a2053 5.0 / 127.0) * S │ │ │ │ + 0x00cba590 4d414153 65617263 684c656e 67746828 MAASearchLength( │ │ │ │ + 0x00cba5a0 652c2030 2e30293b 200a2020 20207265 e, 0.0); . re │ │ │ │ + 0x00cba5b0 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ + 0x00cba5c0 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ + 0x00cba5d0 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x00cba5e0 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ + 0x00cba5f0 20534d41 41536561 72636858 52696768 SMAASearchXRigh │ │ │ │ + 0x00cba600 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ + 0x00cba610 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ + 0x00cba620 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ + 0x00cba630 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ + 0x00cba640 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ + 0x00cba650 6e287465 78636f6f 72642e78 203c2065 n(texcoord.x < e │ │ │ │ + 0x00cba660 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ + 0x00cba670 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x00cba680 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ + 0x00cba690 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ + 0x00cba6a0 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ + 0x00cba6b0 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ + 0x00cba6c0 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ + 0x00cba6d0 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ + 0x00cba6e0 322e302c 20302e30 29202a20 755f6672 2.0, 0.0) * u_fr │ │ │ │ + 0x00cba6f0 616d6562 75666665 724d6574 72696373 amebufferMetrics │ │ │ │ + 0x00cba700 2e787920 2b207465 78636f6f 72643b20 .xy + texcoord; │ │ │ │ + 0x00cba710 0a202020 20534d41 414c6f6f 70456e64 . SMAALoopEnd │ │ │ │ + 0x00cba720 200a2020 2020666c 6f617420 6f666673 . float offs │ │ │ │ + 0x00cba730 6574203d 20332e32 35202d20 28323535 et = 3.25 - (255 │ │ │ │ + 0x00cba740 2e30202f 20313237 2e302920 2a20534d .0 / 127.0) * SM │ │ │ │ + 0x00cba750 41415365 61726368 4c656e67 74682865 AASearchLength(e │ │ │ │ + 0x00cba760 2c20302e 35293b20 0a202020 20726574 , 0.5); . ret │ │ │ │ + 0x00cba770 75726e20 2d755f66 72616d65 62756666 urn -u_framebuff │ │ │ │ + 0x00cba780 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ + 0x00cba790 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x00cba7a0 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ + 0x00cba7b0 20534d41 41536561 72636859 55702876 SMAASearchYUp(v │ │ │ │ + 0x00cba7c0 65633220 74657863 6f6f7264 2c20666c ec2 texcoord, fl │ │ │ │ + 0x00cba7d0 6f617420 656e6429 200a2020 7b200a20 oat end) . { . │ │ │ │ + 0x00cba7e0 20202076 65633220 65203d20 76656332 vec2 e = vec2 │ │ │ │ + 0x00cba7f0 28312e30 2c20302e 30293b20 0a202020 (1.0, 0.0); . │ │ │ │ + 0x00cba800 20534d41 414c6f6f 70426567 696e2874 SMAALoopBegin(t │ │ │ │ + 0x00cba810 6578636f 6f72642e 79203e20 656e6420 excoord.y > end │ │ │ │ + 0x00cba820 26262065 2e72203e 206b4163 74697661 && e.r > kActiva │ │ │ │ + 0x00cba830 74696f6e 54687265 73686f6c 64202626 tionThreshold && │ │ │ │ + 0x00cba840 20652e67 203d3d20 302e3029 200a2020 e.g == 0.0) . │ │ │ │ + 0x00cba850 20202020 65203d20 534d4141 53616d70 e = SMAASamp │ │ │ │ + 0x00cba860 6c654c65 76656c5a 65726f28 755f636f leLevelZero(u_co │ │ │ │ + 0x00cba870 6c6f7254 65782c20 74657863 6f6f7264 lorTex, texcoord │ │ │ │ + 0x00cba880 292e7267 3b200a20 20202020 20746578 ).rg; . tex │ │ │ │ + 0x00cba890 636f6f72 64203d20 76656332 28302e30 coord = vec2(0.0 │ │ │ │ + 0x00cba8a0 2c202d32 2e302920 2a20755f 6672616d , -2.0) * u_fram │ │ │ │ + 0x00cba8b0 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x00cba8c0 79202b20 74657863 6f6f7264 3b200a20 y + texcoord; . │ │ │ │ + 0x00cba8d0 20202053 4d41414c 6f6f7045 6e64200a SMAALoopEnd . │ │ │ │ + 0x00cba8e0 20202020 666c6f61 74206f66 66736574 float offset │ │ │ │ + 0x00cba8f0 203d2033 2e323520 2d202832 35352e30 = 3.25 - (255.0 │ │ │ │ + 0x00cba900 202f2031 32372e30 29202a20 534d4141 / 127.0) * SMAA │ │ │ │ + 0x00cba910 53656172 63684c65 6e677468 28652e67 SearchLength(e.g │ │ │ │ + 0x00cba920 722c2030 2e30293b 200a2020 20207265 r, 0.0); . re │ │ │ │ + 0x00cba930 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ + 0x00cba940 65724d65 74726963 732e7920 2a206f66 erMetrics.y * of │ │ │ │ + 0x00cba950 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x00cba960 793b200a 20207d20 0a202066 6c6f6174 y; . } . float │ │ │ │ + 0x00cba970 20534d41 41536561 72636859 446f776e SMAASearchYDown │ │ │ │ + 0x00cba980 28766563 32207465 78636f6f 72642c20 (vec2 texcoord, │ │ │ │ + 0x00cba990 666c6f61 7420656e 6429200a 20207b20 float end) . { │ │ │ │ + 0x00cba9a0 0a202020 20766563 32206520 3d207665 . vec2 e = ve │ │ │ │ + 0x00cba9b0 63322831 2e302c20 302e3029 3b200a20 c2(1.0, 0.0); . │ │ │ │ + 0x00cba9c0 20202053 4d41414c 6f6f7042 6567696e SMAALoopBegin │ │ │ │ + 0x00cba9d0 28746578 636f6f72 642e7920 3c20656e (texcoord.y < en │ │ │ │ + 0x00cba9e0 64202626 20652e72 203e206b 41637469 d && e.r > kActi │ │ │ │ + 0x00cba9f0 76617469 6f6e5468 72657368 6f6c6420 vationThreshold │ │ │ │ + 0x00cbaa00 26262065 2e67203d 3d20302e 3029200a && e.g == 0.0) . │ │ │ │ + 0x00cbaa10 20202020 20206520 3d20534d 41415361 e = SMAASa │ │ │ │ + 0x00cbaa20 6d706c65 4c657665 6c5a6572 6f28755f mpleLevelZero(u_ │ │ │ │ + 0x00cbaa30 636f6c6f 72546578 2c207465 78636f6f colorTex, texcoo │ │ │ │ + 0x00cbaa40 7264292e 72673b20 0a202020 20202074 rd).rg; . t │ │ │ │ + 0x00cbaa50 6578636f 6f726420 3d207665 63322830 excoord = vec2(0 │ │ │ │ + 0x00cbaa60 2e302c20 322e3029 202a2075 5f667261 .0, 2.0) * u_fra │ │ │ │ + 0x00cbaa70 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ + 0x00cbaa80 7879202b 20746578 636f6f72 643b200a xy + texcoord; . │ │ │ │ + 0x00cbaa90 20202020 534d4141 4c6f6f70 456e6420 SMAALoopEnd │ │ │ │ + 0x00cbaaa0 0a202020 20666c6f 6174206f 66667365 . float offse │ │ │ │ + 0x00cbaab0 74203d20 332e3235 202d2028 3235352e t = 3.25 - (255. │ │ │ │ + 0x00cbaac0 30202f20 3132372e 3029202a 20534d41 0 / 127.0) * SMA │ │ │ │ + 0x00cbaad0 41536561 7263684c 656e6774 6828652e ASearchLength(e. │ │ │ │ + 0x00cbaae0 67722c20 302e3529 3b200a20 20202072 gr, 0.5); . r │ │ │ │ + 0x00cbaaf0 65747572 6e202d75 5f667261 6d656275 eturn -u_framebu │ │ │ │ + 0x00cbab00 66666572 4d657472 6963732e 79202a20 fferMetrics.y * │ │ │ │ + 0x00cbab10 6f666673 6574202b 20746578 636f6f72 offset + texcoor │ │ │ │ + 0x00cbab20 642e793b 200a2020 7d200a20 20766563 d.y; . } . vec │ │ │ │ + 0x00cbab30 3220534d 41414172 65612876 65633220 2 SMAAArea(vec2 │ │ │ │ + 0x00cbab40 64697374 2c20666c 6f617420 65312c20 dist, float e1, │ │ │ │ + 0x00cbab50 666c6f61 74206532 29200a20 207b200a float e2) . { . │ │ │ │ + 0x00cbab60 20202020 76656332 20746578 636f6f72 vec2 texcoor │ │ │ │ + 0x00cbab70 64203d20 6b417265 61546578 4d617844 d = kAreaTexMaxD │ │ │ │ + 0x00cbab80 69737461 6e636520 2a20534d 4141526f istance * SMAARo │ │ │ │ + 0x00cbab90 756e6428 342e3020 2a207665 63322865 und(4.0 * vec2(e │ │ │ │ + 0x00cbaba0 312c2065 32292920 2b206469 73743b20 1, e2)) + dist; │ │ │ │ + 0x00cbabb0 0a202020 20746578 636f6f72 64203d20 . texcoord = │ │ │ │ + 0x00cbabc0 534d4141 5f415245 41544558 5f504958 SMAA_AREATEX_PIX │ │ │ │ + 0x00cbabd0 454c5f53 495a4520 2a202874 6578636f EL_SIZE * (texco │ │ │ │ + 0x00cbabe0 6f726420 2b20302e 35293b20 0a202020 ord + 0.5); . │ │ │ │ + 0x00cbabf0 20726574 75726e20 534d4141 53616d70 return SMAASamp │ │ │ │ + 0x00cbac00 6c654c65 76656c5a 65726f28 755f736d leLevelZero(u_sm │ │ │ │ + 0x00cbac10 61614172 65612c20 74657863 6f6f7264 aaArea, texcoord │ │ │ │ + 0x00cbac20 292e7267 3b200a20 207d200a 2020636f ).rg; . } . co │ │ │ │ + 0x00cbac30 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x00cbac40 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x00cbac50 30302e30 3b200a20 20766f69 64206d61 00.0; . void ma │ │ │ │ + 0x00cbac60 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ + 0x00cbac70 65633420 77656967 68747320 3d207665 ec4 weights = ve │ │ │ │ + 0x00cbac80 63342830 2e302c20 302e302c 20302e30 c4(0.0, 0.0, 0.0 │ │ │ │ + 0x00cbac90 2c20302e 30293b20 0a202020 20766563 , 0.0); . vec │ │ │ │ + 0x00cbaca0 32206520 3d207465 78747572 6528755f 2 e = texture(u_ │ │ │ │ + 0x00cbacb0 636f6c6f 72546578 2c20765f 636f6f72 colorTex, v_coor │ │ │ │ + 0x00cbacc0 64732e78 79292e72 673b200a 20202020 ds.xy).rg; . │ │ │ │ + 0x00cbacd0 69662028 652e6720 3e20302e 3029202f if (e.g > 0.0) / │ │ │ │ + 0x00cbace0 2f204564 67652061 74206e6f 72746820 / Edge at north │ │ │ │ + 0x00cbacf0 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ + 0x00cbad00 63322064 3b200a20 20202020 20766563 c2 d; . vec │ │ │ │ + 0x00cbad10 3320636f 6f726473 3b200a20 20202020 3 coords; . │ │ │ │ + 0x00cbad20 20636f6f 7264732e 78203d20 534d4141 coords.x = SMAA │ │ │ │ + 0x00cbad30 53656172 6368584c 65667428 765f6f66 SearchXLeft(v_of │ │ │ │ + 0x00cbad40 66736574 302e7879 2c20765f 6f666673 fset0.xy, v_offs │ │ │ │ + 0x00cbad50 6574322e 78293b20 0a202020 20202063 et2.x); . c │ │ │ │ + 0x00cbad60 6f6f7264 732e7920 3d20765f 6f666673 oords.y = v_offs │ │ │ │ + 0x00cbad70 6574312e 793b200a 20202020 2020642e et1.y; . d. │ │ │ │ + 0x00cbad80 78203d20 636f6f72 64732e78 3b200a20 x = coords.x; . │ │ │ │ + 0x00cbad90 20202020 20666c6f 61742065 31203d20 float e1 = │ │ │ │ + 0x00cbada0 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ + 0x00cbadb0 65726f28 755f636f 6c6f7254 65782c20 ero(u_colorTex, │ │ │ │ + 0x00cbadc0 636f6f72 64732e78 79292e72 3b200a20 coords.xy).r; . │ │ │ │ + 0x00cbadd0 20202020 20636f6f 7264732e 7a203d20 coords.z = │ │ │ │ + 0x00cbade0 534d4141 53656172 63685852 69676874 SMAASearchXRight │ │ │ │ + 0x00cbadf0 28765f6f 66667365 74302e7a 772c2076 (v_offset0.zw, v │ │ │ │ + 0x00cbae00 5f6f6666 73657432 2e79293b 200a2020 _offset2.y); . │ │ │ │ + 0x00cbae10 20202020 642e7920 3d20636f 6f726473 d.y = coords │ │ │ │ + 0x00cbae20 2e7a3b20 0a202020 20202076 65633220 .z; . vec2 │ │ │ │ + 0x00cbae30 7a7a203d 20755f66 72616d65 62756666 zz = u_framebuff │ │ │ │ + 0x00cbae40 65724d65 74726963 732e7a7a 3b200a20 erMetrics.zz; . │ │ │ │ + 0x00cbae50 20202020 2064203d 20616273 28534d41 d = abs(SMA │ │ │ │ + 0x00cbae60 41526f75 6e64287a 7a202a20 64202d20 ARound(zz * d - │ │ │ │ + 0x00cbae70 765f636f 6f726473 2e7a7a29 293b200a v_coords.zz)); . │ │ │ │ + 0x00cbae80 20202020 20207665 63322073 7172745f vec2 sqrt_ │ │ │ │ + 0x00cbae90 64203d20 73717274 2864293b 200a2020 d = sqrt(d); . │ │ │ │ + 0x00cbaea0 20202020 666c6f61 74206532 203d2053 float e2 = S │ │ │ │ + 0x00cbaeb0 4d414153 616d706c 654c6576 656c5a65 MAASampleLevelZe │ │ │ │ + 0x00cbaec0 726f4f66 66736574 28755f63 6f6c6f72 roOffset(u_color │ │ │ │ + 0x00cbaed0 5465782c 20636f6f 7264732e 7a792c20 Tex, coords.zy, │ │ │ │ + 0x00cbaee0 534d4141 4f666673 65742831 2c203029 SMAAOffset(1, 0) │ │ │ │ + 0x00cbaef0 292e723b 200a2020 20202020 77656967 ).r; . weig │ │ │ │ + 0x00cbaf00 6874732e 7267203d 20534d41 41417265 hts.rg = SMAAAre │ │ │ │ + 0x00cbaf10 61287371 72745f64 2c206531 2c206532 a(sqrt_d, e1, e2 │ │ │ │ + 0x00cbaf20 293b200a 20202020 7d200a20 20202069 ); . } . i │ │ │ │ + 0x00cbaf30 66202865 2e72203e 20302e30 29202f2f f (e.r > 0.0) // │ │ │ │ + 0x00cbaf40 20456467 65206174 20776573 74200a20 Edge at west . │ │ │ │ + 0x00cbaf50 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ + 0x00cbaf60 20643b20 0a202020 20202076 65633320 d; . vec3 │ │ │ │ + 0x00cbaf70 636f6f72 64733b20 0a202020 20202063 coords; . c │ │ │ │ + 0x00cbaf80 6f6f7264 732e7920 3d20534d 41415365 oords.y = SMAASe │ │ │ │ + 0x00cbaf90 61726368 59557028 765f6f66 66736574 archYUp(v_offset │ │ │ │ + 0x00cbafa0 312e7879 2c20765f 6f666673 6574322e 1.xy, v_offset2. │ │ │ │ + 0x00cbafb0 7a293b20 0a202020 20202063 6f6f7264 z); . coord │ │ │ │ + 0x00cbafc0 732e7820 3d20765f 6f666673 6574302e s.x = v_offset0. │ │ │ │ + 0x00cbafd0 783b200a 20202020 2020642e 78203d20 x; . d.x = │ │ │ │ + 0x00cbafe0 636f6f72 64732e79 3b200a20 20202020 coords.y; . │ │ │ │ + 0x00cbaff0 20666c6f 61742065 31203d20 534d4141 float e1 = SMAA │ │ │ │ + 0x00cbb000 53616d70 6c654c65 76656c5a 65726f28 SampleLevelZero( │ │ │ │ + 0x00cbb010 755f636f 6c6f7254 65782c20 636f6f72 u_colorTex, coor │ │ │ │ + 0x00cbb020 64732e78 79292e67 3b200a20 20202020 ds.xy).g; . │ │ │ │ + 0x00cbb030 20636f6f 7264732e 7a203d20 534d4141 coords.z = SMAA │ │ │ │ + 0x00cbb040 53656172 63685944 6f776e28 765f6f66 SearchYDown(v_of │ │ │ │ + 0x00cbb050 66736574 312e7a77 2c20765f 6f666673 fset1.zw, v_offs │ │ │ │ + 0x00cbb060 6574322e 77293b20 0a202020 20202064 et2.w); . d │ │ │ │ + 0x00cbb070 2e79203d 20636f6f 7264732e 7a3b200a .y = coords.z; . │ │ │ │ + 0x00cbb080 20202020 20207665 63322077 77203d20 vec2 ww = │ │ │ │ + 0x00cbb090 755f6672 616d6562 75666665 724d6574 u_framebufferMet │ │ │ │ + 0x00cbb0a0 72696373 2e77773b 200a2020 20202020 rics.ww; . │ │ │ │ + 0x00cbb0b0 64203d20 61627328 534d4141 526f756e d = abs(SMAARoun │ │ │ │ + 0x00cbb0c0 64287777 202a2064 202d2076 5f636f6f d(ww * d - v_coo │ │ │ │ + 0x00cbb0d0 7264732e 77772929 3b200a20 20202020 rds.ww)); . │ │ │ │ + 0x00cbb0e0 20766563 32207371 72745f64 203d2073 vec2 sqrt_d = s │ │ │ │ + 0x00cbb0f0 71727428 64293b20 0a202020 20202066 qrt(d); . f │ │ │ │ + 0x00cbb100 6c6f6174 20653220 3d20534d 41415361 loat e2 = SMAASa │ │ │ │ + 0x00cbb110 6d706c65 4c657665 6c5a6572 6f4f6666 mpleLevelZeroOff │ │ │ │ + 0x00cbb120 73657428 755f636f 6c6f7254 65782c20 set(u_colorTex, │ │ │ │ + 0x00cbb130 636f6f72 64732e78 7a2c2053 4d41414f coords.xz, SMAAO │ │ │ │ + 0x00cbb140 66667365 7428302c 20312929 2e673b20 ffset(0, 1)).g; │ │ │ │ + 0x00cbb150 0a202020 20202077 65696768 74732e62 . weights.b │ │ │ │ + 0x00cbb160 61203d20 534d4141 41726561 28737172 a = SMAAArea(sqr │ │ │ │ + 0x00cbb170 745f642c 2065312c 20653229 3b200a20 t_d, e1, e2); . │ │ │ │ + 0x00cbb180 2020207d 200a2020 2020765f 46726167 } . v_Frag │ │ │ │ + 0x00cbb190 436f6c6f 72203d20 77656967 6874733b Color = weights; │ │ │ │ + 0x00cbb1a0 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ + 0x00cbb1b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cbb1c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cbb1d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cbb1e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cbb1f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cbb200 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cbb210 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cbb220 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cbb230 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cbb240 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cbb250 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cbb260 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cbb270 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cbb280 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cbb290 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cbb2a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cbb2b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cbb2c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cbb2d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cbb2e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cbb2f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cbb300 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cbb310 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00cbb320 72546578 436f6f72 64733b20 0a202069 rTexCoords; . i │ │ │ │ + 0x00cbb330 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ + 0x00cbb340 436f6f72 64733b20 0a202023 69666465 Coords; . #ifde │ │ │ │ + 0x00cbb350 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x00cbb360 6f757420 4c4f575f 50207665 63342076 out LOW_P vec4 v │ │ │ │ + 0x00cbb370 5f636f6c 6f723b20 0a202023 656c7365 _color; . #else │ │ │ │ + 0x00cbb380 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00cbb390 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00cbb3a0 20202365 6e646966 200a2020 6f757420 #endif . out │ │ │ │ + 0x00cbb3b0 76656332 20765f6d 61736b54 6578436f vec2 v_maskTexCo │ │ │ │ + 0x00cbb3c0 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ + 0x00cbb3d0 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ + 0x00cbb3e0 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ + 0x00cbb3f0 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ + 0x00cbb400 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00cbb410 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x00cbb420 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ + 0x00cbb430 63322075 5f636f6e 74726173 7447616d c2 u_contrastGam │ │ │ │ + 0x00cbb440 6d613b20 0a202075 6e69666f 726d2066 ma; . uniform f │ │ │ │ + 0x00cbb450 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x00cbb460 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00cbb470 20755f7a 5363616c 653b200a 2020756e u_zScale; . un │ │ │ │ + 0x00cbb480 69666f72 6d20666c 6f617420 755f696e iform float u_in │ │ │ │ + 0x00cbb490 74657270 6f6c6174 696f6e3b 200a2020 terpolation; . │ │ │ │ + 0x00cbb4a0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cbb4b0 69734f75 746c696e 65506173 733b200a isOutlinePass; . │ │ │ │ + 0x00cbb4c0 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ + 0x00cbb4d0 56544620 0a202075 6e69666f 726d2073 VTF . uniform s │ │ │ │ + 0x00cbb4e0 616d706c 65723244 20755f63 6f6c6f72 ampler2D u_color │ │ │ │ + 0x00cbb4f0 5465783b 200a2020 23656e64 6966200a Tex; . #endif . │ │ │ │ + 0x00cbb500 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ + 0x00cbb510 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ + 0x00cbb520 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ + 0x00cbb530 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ + 0x00cbb540 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00cbb550 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00cbb560 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00cbb570 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ + 0x00cbb580 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00cbb590 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00cbb5a0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ + 0x00cbb5b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cbb5c0 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ + 0x00cbb5d0 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ + 0x00cbb5e0 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ + 0x00cbb5f0 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ + 0x00cbb600 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ + 0x00cbb610 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ + 0x00cbb620 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00cbb630 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ + 0x00cbb640 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ + 0x00cbb650 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ + 0x00cbb660 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ + 0x00cbb670 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ + 0x00cbb680 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ + 0x00cbb690 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ + 0x00cbb6a0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ + 0x00cbb6b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbb6c0 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ + 0x00cbb6d0 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ + 0x00cbb6e0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00cbb6f0 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ + 0x00cbb700 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ + 0x00cbb710 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ + 0x00cbb720 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ + 0x00cbb730 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00cbb740 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x00cbb750 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x00cbb760 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ + 0x00cbb770 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ + 0x00cbb780 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ + 0x00cbb790 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ + 0x00cbb7a0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00cbb7b0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00cbb7c0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00cbb7d0 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ + 0x00cbb7e0 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ + 0x00cbb7f0 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ + 0x00cbb800 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ + 0x00cbb810 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ + 0x00cbb820 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ + 0x00cbb830 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x00cbb840 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ + 0x00cbb850 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ + 0x00cbb860 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbb870 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ + 0x00cbb880 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ + 0x00cbb890 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ + 0x00cbb8a0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ + 0x00cbb8b0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00cbb8c0 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ + 0x00cbb8d0 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ + 0x00cbb8e0 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ + 0x00cbb8f0 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ + 0x00cbb900 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ + 0x00cbb910 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00cbb920 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ + 0x00cbb930 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ + 0x00cbb940 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x00cbb950 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ + 0x00cbb960 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ + 0x00cbb970 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ + 0x00cbb980 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ + 0x00cbb990 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ + 0x00cbb9a0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ + 0x00cbb9b0 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ + 0x00cbb9c0 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ + 0x00cbb9d0 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ + 0x00cbb9e0 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ + 0x00cbb9f0 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ + 0x00cbba00 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ + 0x00cbba10 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ + 0x00cbba20 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x00cbba30 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ + 0x00cbba40 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ + 0x00cbba50 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ + 0x00cbba60 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ + 0x00cbba70 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00cbba80 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ + 0x00cbba90 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ + 0x00cbbaa0 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ + 0x00cbbab0 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ + 0x00cbbac0 202a2075 5f6d6f64 656c5669 6577202a * u_modelView * │ │ │ │ + 0x00cbbad0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00cbbae0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x00cbbaf0 3d206170 706c7950 69766f74 5472616e = applyPivotTran │ │ │ │ + 0x00cbbb00 73666f72 6d28706f 732c2075 5f706976 sform(pos, u_piv │ │ │ │ + 0x00cbbb10 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ + 0x00cbbb20 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ + 0x00cbbb30 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ + 0x00cbbb40 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ + 0x00cbbb50 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ + 0x00cbbb60 6f725465 78436f6f 72647329 3b200a20 orTexCoords); . │ │ │ │ + 0x00cbbb70 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ + 0x00cbbb80 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x00cbbb90 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cbbba0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00cbbbb0 765f6d61 736b5465 78436f6f 72647320 v_maskTexCoords │ │ │ │ + 0x00cbbbc0 3d20615f 6d61736b 54657843 6f6f7264 = a_maskTexCoord │ │ │ │ + 0x00cbbbd0 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ + 0x00cbbbe0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cbbbf0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cbbc00 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cbbc10 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cbbc20 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cbbc30 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cbbc40 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cbbc50 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cbbc60 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cbbc70 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cbbc80 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cbbc90 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cbbca0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cbbcb0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cbbcc0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cbbcd0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cbbce0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cbbcf0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cbbd00 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cbbd10 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cbbd20 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cbbd30 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ + 0x00cbbd40 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ + 0x00cbbd50 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x00cbbd60 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00cbbd70 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ + 0x00cbbd80 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ + 0x00cbbd90 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ + 0x00cbbda0 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ + 0x00cbbdb0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00cbbdc0 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ + 0x00cbbdd0 65747269 63733b20 0a202063 6f6e7374 etrics; . const │ │ │ │ + 0x00cbbde0 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00cbbdf0 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00cbbe00 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00cbbe10 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00cbbe20 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00cbbe30 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00cbbe40 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00cbbe50 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00cbbe60 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cbbe70 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00cbbe80 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00cbbe90 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00cbbea0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cbbeb0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00cbbec0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cbbed0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cbbee0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00cbbef0 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00cbbf00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbbf10 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00cbbf20 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00cbbf30 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cbbf40 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cbbf50 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00cbbf60 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00cbbf70 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cbbf80 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00cbbf90 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00cbbfa0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cbbfb0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00cbbfc0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00cbbfd0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbbfe0 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00cbbff0 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00cbc000 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00cbc010 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00cbc020 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00cbc030 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00cbc040 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00cbc050 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00cbc060 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00cbc070 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00cbc080 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00cbc090 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00cbc0a0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00cbc0b0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00cbc0c0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00cbc0d0 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00cbc0e0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cbc0f0 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00cbc100 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00cbc110 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00cbc120 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00cbc130 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00cbc140 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00cbc150 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00cbc160 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00cbc170 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00cbc180 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00cbc190 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00cbc1a0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00cbc1b0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00cbc1c0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00cbc1d0 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00cbc1e0 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00cbc1f0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00cbc200 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00cbc210 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00cbc220 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00cbc230 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00cbc240 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00cbc250 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00cbc260 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00cbc270 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00cbc280 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00cbc290 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00cbc2a0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00cbc2b0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00cbc2c0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00cbc2d0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00cbc2e0 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00cbc2f0 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00cbc300 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00cbc310 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00cbc320 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00cbc330 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00cbc340 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00cbc350 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00cbc360 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00cbc370 200a2020 7b200a20 20202076 5f636f6c . { . v_col │ │ │ │ + 0x00cbc380 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ + 0x00cbc390 74636f6f 72643b20 0a202020 20765f6f tcoord; . v_o │ │ │ │ + 0x00cbc3a0 66667365 7430203d 20755f66 72616d65 ffset0 = u_frame │ │ │ │ + 0x00cbc3b0 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ + 0x00cbc3c0 7879202a 20766563 34282d31 2e302c20 xy * vec4(-1.0, │ │ │ │ + 0x00cbc3d0 302e302c 20302e30 2c202d31 2e302920 0.0, 0.0, -1.0) │ │ │ │ + 0x00cbc3e0 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ + 0x00cbc3f0 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ + 0x00cbc400 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x00cbc410 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ + 0x00cbc420 63342820 312e302c 20302e30 2c20302e c4( 1.0, 0.0, 0. │ │ │ │ + 0x00cbc430 302c2020 312e3029 202b2061 5f74636f 0, 1.0) + a_tco │ │ │ │ + 0x00cbc440 6f72642e 78797879 3b200a20 20202076 ord.xyxy; . v │ │ │ │ + 0x00cbc450 5f6f6666 73657432 203d2075 5f667261 _offset2 = u_fra │ │ │ │ + 0x00cbc460 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ + 0x00cbc470 78797879 202a2076 65633428 2d322e30 xyxy * vec4(-2.0 │ │ │ │ + 0x00cbc480 2c20302e 302c2030 2e302c20 2d322e30 , 0.0, 0.0, -2.0 │ │ │ │ + 0x00cbc490 29202b20 615f7463 6f6f7264 2e787978 ) + a_tcoord.xyx │ │ │ │ + 0x00cbc4a0 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ + 0x00cbc4b0 696f6e20 3d207665 63342861 5f706f73 ion = vec4(a_pos │ │ │ │ + 0x00cbc4c0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x00cbc4d0 7d200a00 00000000 00000000 00000000 } .............. │ │ │ │ + 0x00cbc4e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cbc4f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cbc500 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cbc510 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cbc520 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cbc530 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cbc540 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cbc550 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cbc560 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cbc570 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cbc580 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cbc590 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cbc5a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cbc5b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cbc5c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cbc5d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cbc5e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cbc5f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cbc600 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cbc610 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cbc620 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cbc630 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ + 0x00cbc640 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00cbc650 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cbc660 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cbc670 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00cbc680 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00cbc690 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cbc6a0 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00cbc6b0 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00cbc6c0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00cbc6d0 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ + 0x00cbc6e0 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ + 0x00cbc6f0 69666f72 6d207665 63322075 5f706f73 iform vec2 u_pos │ │ │ │ + 0x00cbc700 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ + 0x00cbc710 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x00cbc720 696e6550 6173733b 200a2020 756e6966 inePass; . unif │ │ │ │ + 0x00cbc730 6f726d20 666c6f61 7420755f 6f706163 orm float u_opac │ │ │ │ + 0x00cbc740 6974793b 200a2020 756e6966 6f726d20 ity; . uniform │ │ │ │ + 0x00cbc750 666c6f61 7420755f 6c656e67 74683b20 float u_length; │ │ │ │ + 0x00cbc760 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x00cbc770 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x00cbc780 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x00cbc790 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x00cbc7a0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00cbc7b0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00cbc7c0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00cbc7d0 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x00cbc7e0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00cbc7f0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00cbc800 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x00cbc810 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00cbc820 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x00cbc830 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x00cbc840 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x00cbc850 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x00cbc860 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x00cbc870 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x00cbc880 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00cbc890 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x00cbc8a0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00cbc8b0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x00cbc8c0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x00cbc8d0 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x00cbc8e0 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x00cbc8f0 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x00cbc900 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x00cbc910 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cbc920 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x00cbc930 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x00cbc940 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00cbc950 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x00cbc960 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x00cbc970 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x00cbc980 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x00cbc990 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00cbc9a0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00cbc9b0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00cbc9c0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00cbc9d0 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00cbc9e0 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00cbc9f0 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00cbca00 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00cbca10 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00cbca20 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cbca30 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x00cbca40 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x00cbca50 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x00cbca60 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x00cbca70 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x00cbca80 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x00cbca90 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00cbcaa0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x00cbcab0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x00cbcac0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cbcad0 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00cbcae0 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00cbcaf0 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00cbcb00 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x00cbcb10 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00cbcb20 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x00cbcb30 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x00cbcb40 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x00cbcb50 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x00cbcb60 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x00cbcb70 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00cbcb80 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x00cbcb90 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x00cbcba0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00cbcbb0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x00cbcbc0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cbcbd0 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00cbcbe0 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00cbcbf0 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00cbcc00 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x00cbcc10 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x00cbcc20 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x00cbcc30 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x00cbcc40 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x00cbcc50 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x00cbcc60 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x00cbcc70 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x00cbcc80 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x00cbcc90 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x00cbcca0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x00cbccb0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x00cbccc0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x00cbccd0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00cbcce0 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00cbccf0 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00cbcd00 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x00cbcd10 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ + 0x00cbcd20 202b2061 5f706f73 6974696f 6e202b20 + a_position + │ │ │ │ + 0x00cbcd30 755f6c65 6e677468 202a2061 5f6e6f72 u_length * a_nor │ │ │ │ + 0x00cbcd40 6d616c2c 20302c20 3129202a 20755f70 mal, 0, 1) * u_p │ │ │ │ + 0x00cbcd50 726f6a65 6374696f 6e3b200a 20202369 rojection; . #i │ │ │ │ + 0x00cbcd60 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x00cbcd70 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ + 0x00cbcd80 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ + 0x00cbcd90 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x00cbcda0 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ + 0x00cbcdb0 6f6e2e7a 20202b20 676c5f50 6f736974 on.z + gl_Posit │ │ │ │ + 0x00cbcdc0 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ + 0x00cbcdd0 2023656e 64696620 0a202020 20765f63 #endif . v_c │ │ │ │ + 0x00cbcde0 6f6c6f72 54657843 6f6f7264 73203d20 olorTexCoords = │ │ │ │ + 0x00cbcdf0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00cbce00 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x00cbce10 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cbce20 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cbce30 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cbce40 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cbce50 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cbce60 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cbce70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cbce80 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cbce90 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cbcea0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cbceb0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cbcec0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cbced0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cbcee0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cbcef0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cbcf00 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cbcf10 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cbcf20 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cbcf30 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cbcf40 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cbcf50 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cbcf60 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ + 0x00cbcf70 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ + 0x00cbcf80 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ + 0x00cbcf90 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ + 0x00cbcfa0 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00cbcfb0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00cbcfc0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cbcfd0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cbcfe0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cbcff0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cbd000 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cbd010 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ + 0x00cbd020 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x00cbd030 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ + 0x00cbd040 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cbd050 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ + 0x00cbd060 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ + 0x00cbd070 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ + 0x00cbd080 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x00cbd090 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ + 0x00cbd0a0 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ + 0x00cbd0b0 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00cbd0c0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00cbd0d0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x00cbd0e0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00cbd0f0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cbd100 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cbd110 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cbd120 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00cbd130 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00cbd140 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00cbd150 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00cbd160 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbd170 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00cbd180 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00cbd190 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00cbd1a0 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00cbd1b0 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00cbd1c0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00cbd1d0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cbd1e0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00cbd1f0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00cbd200 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00cbd210 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00cbd220 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00cbd230 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbd240 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00cbd250 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00cbd260 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cbd270 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00cbd280 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00cbd290 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00cbd2a0 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00cbd2b0 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00cbd2c0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00cbd2d0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00cbd2e0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00cbd2f0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00cbd300 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00cbd310 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00cbd320 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00cbd330 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00cbd340 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00cbd350 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00cbd360 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00cbd370 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cbd380 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00cbd390 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00cbd3a0 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00cbd3b0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00cbd3c0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00cbd3d0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00cbd3e0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00cbd3f0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00cbd400 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00cbd410 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cbd420 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00cbd430 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00cbd440 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00cbd450 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00cbd460 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cbd470 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00cbd480 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00cbd490 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00cbd4a0 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00cbd4b0 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00cbd4c0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00cbd4d0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00cbd4e0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00cbd4f0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00cbd500 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00cbd510 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00cbd520 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00cbd530 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00cbd540 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00cbd550 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00cbd560 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00cbd570 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00cbd580 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00cbd590 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00cbd5a0 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00cbd5b0 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00cbd5c0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00cbd5d0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00cbd5e0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00cbd5f0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00cbd600 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00cbd610 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00cbd620 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00cbd630 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00cbd640 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00cbd650 20666c6f 61742073 696e5620 3d207369 float sinV = si │ │ │ │ + 0x00cbd660 6e28755f 617a696d 7574293b 200a2020 n(u_azimut); . │ │ │ │ + 0x00cbd670 2020666c 6f617420 636f7356 203d2063 float cosV = c │ │ │ │ + 0x00cbd680 6f732875 5f617a69 6d757429 3b200a20 os(u_azimut); . │ │ │ │ + 0x00cbd690 2020206d 61743420 726f7461 74696f6e mat4 rotation │ │ │ │ + 0x00cbd6a0 3b200a20 20202072 6f746174 696f6e5b ; . rotation[ │ │ │ │ + 0x00cbd6b0 305d203d 20766563 3428636f 73562c20 0] = vec4(cosV, │ │ │ │ + 0x00cbd6c0 73696e56 2c20302e 302c2030 2e30293b sinV, 0.0, 0.0); │ │ │ │ + 0x00cbd6d0 200a2020 2020726f 74617469 6f6e5b31 . rotation[1 │ │ │ │ + 0x00cbd6e0 5d203d20 76656334 282d7369 6e562c20 ] = vec4(-sinV, │ │ │ │ + 0x00cbd6f0 636f7356 2c20302e 302c2030 2e30293b cosV, 0.0, 0.0); │ │ │ │ + 0x00cbd700 200a2020 2020726f 74617469 6f6e5b32 . rotation[2 │ │ │ │ + 0x00cbd710 5d203d20 76656334 28302e30 2c20302e ] = vec4(0.0, 0. │ │ │ │ + 0x00cbd720 302c2031 2e302c20 302e3029 3b200a20 0, 1.0, 0.0); . │ │ │ │ + 0x00cbd730 20202072 6f746174 696f6e5b 335d203d rotation[3] = │ │ │ │ + 0x00cbd740 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ + 0x00cbd750 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00cbd760 76656334 20706f73 203d2076 65633428 vec4 pos = vec4( │ │ │ │ + 0x00cbd770 755f706f 73697469 6f6e2e78 797a2c20 u_position.xyz, │ │ │ │ + 0x00cbd780 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ + 0x00cbd790 65773b20 0a202020 20766563 34206e6f ew; . vec4 no │ │ │ │ + 0x00cbd7a0 726d616c 203d2076 65633428 615f6e6f rmal = vec4(a_no │ │ │ │ + 0x00cbd7b0 726d616c 2c20302c 2030293b 200a2020 rmal, 0, 0); . │ │ │ │ + 0x00cbd7c0 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ + 0x00cbd7d0 73203d20 6e6f726d 616c202a 20726f74 s = normal * rot │ │ │ │ + 0x00cbd7e0 6174696f 6e202b20 706f733b 200a2020 ation + pos; . │ │ │ │ + 0x00cbd7f0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00cbd800 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x00cbd810 6f726d28 73686966 74656450 6f73202a orm(shiftedPos * │ │ │ │ + 0x00cbd820 20755f70 726f6a65 6374696f 6e2c2075 u_projection, u │ │ │ │ + 0x00cbd830 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x00cbd840 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ + 0x00cbd850 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x00cbd860 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cbd870 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ + 0x00cbd880 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cbd890 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cbd8a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cbd8b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cbd8c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cbd8d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cbd8e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cbd8f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cbd900 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cbd910 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cbd920 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cbd930 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cbd940 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cbd950 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cbd960 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cbd970 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cbd980 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cbd990 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cbd9a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cbd9b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cbd9c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cbd9d0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cbd9e0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00cbd9f0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cbda00 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cbda10 200a2020 696e2076 65633320 615f6c65 . in vec3 a_le │ │ │ │ + 0x00cbda20 6e677468 3b200a20 20236966 64656620 ngth; . #ifdef │ │ │ │ + 0x00cbda30 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ + 0x00cbda40 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ + 0x00cbda50 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ + 0x00cbda60 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x00cbda70 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ + 0x00cbda80 656e6469 66200a20 206f7574 20666c6f endif . out flo │ │ │ │ + 0x00cbda90 61742076 5f6c656e 67746859 3b200a20 at v_lengthY; . │ │ │ │ + 0x00cbdaa0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00cbdab0 6d6f6465 6c566965 773b200a 2020756e modelView; . un │ │ │ │ + 0x00cbdac0 69666f72 6d206d61 74342075 5f70726f iform mat4 u_pro │ │ │ │ + 0x00cbdad0 6a656374 696f6e3b 200a2020 756e6966 jection; . unif │ │ │ │ + 0x00cbdae0 6f726d20 6d617434 20755f70 69766f74 orm mat4 u_pivot │ │ │ │ + 0x00cbdaf0 5472616e 73666f72 6d3b200a 2020756e Transform; . un │ │ │ │ + 0x00cbdb00 69666f72 6d207665 63342075 5f706f73 iform vec4 u_pos │ │ │ │ + 0x00cbdb10 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ + 0x00cbdb20 6d207665 63322075 5f6c696e 65506172 m vec2 u_linePar │ │ │ │ + 0x00cbdb30 616d733b 200a2020 756e6966 6f726d20 ams; . uniform │ │ │ │ + 0x00cbdb40 666c6f61 7420755f 61636375 72616379 float u_accuracy │ │ │ │ + 0x00cbdb50 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cbdb60 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00cbdb70 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cbdb80 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00cbdb90 6f726d20 666c6f61 7420755f 617a696d orm float u_azim │ │ │ │ + 0x00cbdba0 75743b20 0a202023 69666465 6620454e ut; . #ifdef EN │ │ │ │ + 0x00cbdbb0 41424c45 5f565446 200a2020 756e6966 ABLE_VTF . unif │ │ │ │ + 0x00cbdbc0 6f726d20 73616d70 6c657232 4420755f orm sampler2D u_ │ │ │ │ + 0x00cbdbd0 636f6c6f 72546578 3b200a20 2023656e colorTex; . #en │ │ │ │ + 0x00cbdbe0 64696620 0a202063 6f6e7374 20666c6f dif . const flo │ │ │ │ + 0x00cbdbf0 6174206b 416e7469 616c6961 73696e67 at kAntialiasing │ │ │ │ + 0x00cbdc00 54687265 73686f6c 64203d20 302e3932 Threshold = 0.92 │ │ │ │ + 0x00cbdc10 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x00cbdc20 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x00cbdc30 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x00cbdc40 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00cbdc50 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00cbdc60 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00cbdc70 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00cbdc80 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x00cbdc90 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cbdca0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cbdcb0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x00cbdcc0 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x00cbdcd0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x00cbdce0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00cbdcf0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x00cbdd00 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x00cbdd10 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x00cbdd20 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x00cbdd30 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x00cbdd40 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x00cbdd50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbdd60 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x00cbdd70 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x00cbdd80 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00cbdd90 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x00cbdda0 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x00cbddb0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00cbddc0 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x00cbddd0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x00cbdde0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x00cbddf0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00cbde00 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x00cbde10 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x00cbde20 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x00cbde30 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00cbde40 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00cbde50 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00cbde60 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00cbde70 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x00cbde80 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x00cbde90 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x00cbdea0 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x00cbdeb0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x00cbdec0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00cbded0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cbdee0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x00cbdef0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x00cbdf00 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x00cbdf10 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x00cbdf20 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x00cbdf30 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x00cbdf40 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00cbdf50 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x00cbdf60 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00cbdf70 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x00cbdf80 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x00cbdf90 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x00cbdfa0 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x00cbdfb0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x00cbdfc0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00cbdfd0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x00cbdfe0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x00cbdff0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x00cbe000 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x00cbe010 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x00cbe020 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00cbe030 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x00cbe040 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x00cbe050 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x00cbe060 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x00cbe070 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x00cbe080 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x00cbe090 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x00cbe0a0 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x00cbe0b0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x00cbe0c0 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x00cbe0d0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x00cbe0e0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x00cbe0f0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x00cbe100 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x00cbe110 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x00cbe120 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x00cbe130 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x00cbe140 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00cbe150 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x00cbe160 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x00cbe170 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x00cbe180 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00cbe190 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x00cbe1a0 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x00cbe1b0 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ + 0x00cbe1c0 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ + 0x00cbe1d0 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x00cbe1e0 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ + 0x00cbe1f0 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ + 0x00cbe200 200a2020 20207665 6332206c 656e203d . vec2 len = │ │ │ │ + 0x00cbe210 20766563 3228615f 6c656e67 74682e78 vec2(a_length.x │ │ │ │ + 0x00cbe220 2c20615f 6c656e67 74682e7a 293b200a , a_length.z); . │ │ │ │ + 0x00cbe230 20202020 69662028 646f7428 615f6e6f if (dot(a_no │ │ │ │ + 0x00cbe240 726d616c 2c20615f 6e6f726d 616c2920 rmal, a_normal) │ │ │ │ + 0x00cbe250 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ + 0x00cbe260 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ + 0x00cbe270 3d20615f 6e6f726d 616c202a 20755f6c = a_normal * u_l │ │ │ │ + 0x00cbe280 696e6550 6172616d 732e783b 200a2020 ineParams.x; . │ │ │ │ + 0x00cbe290 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ + 0x00cbe2a0 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ + 0x00cbe2b0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00cbe2c0 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ + 0x00cbe2d0 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ + 0x00cbe2e0 6f6e2e78 79202b20 6e6f726d 2c200a20 on.xy + norm, . │ │ │ │ + 0x00cbe2f0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cbe300 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cbe310 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cbe320 20202020 20755f6d 6f64656c 56696577 u_modelView │ │ │ │ + 0x00cbe330 2c206c65 6e677468 286e6f72 6d29293b , length(norm)); │ │ │ │ + 0x00cbe340 200a2020 20202020 69662028 755f6c69 . if (u_li │ │ │ │ + 0x00cbe350 6e655061 72616d73 2e792021 3d20302e neParams.y != 0. │ │ │ │ + 0x00cbe360 3029200a 20202020 20202020 6c656e20 0) . len │ │ │ │ + 0x00cbe370 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ + 0x00cbe380 78202b20 615f6c65 6e677468 2e79202a x + a_length.y * │ │ │ │ + 0x00cbe390 20755f6c 696e6550 6172616d 732e792c u_lineParams.y, │ │ │ │ + 0x00cbe3a0 20615f6c 656e6774 682e7a29 3b200a20 a_length.z); . │ │ │ │ + 0x00cbe3b0 2020207d 200a2020 23696664 65662045 } . #ifdef E │ │ │ │ + 0x00cbe3c0 4e41424c 455f5654 46200a20 20202076 NABLE_VTF . v │ │ │ │ + 0x00cbe3d0 5f636f6c 6f72203d 20746578 74757265 _color = texture │ │ │ │ + 0x00cbe3e0 28755f63 6f6c6f72 5465782c 20615f63 (u_colorTex, a_c │ │ │ │ + 0x00cbe3f0 6f6c6f72 54657843 6f6f7264 73293b20 olorTexCoords); │ │ │ │ + 0x00cbe400 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ + 0x00cbe410 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ + 0x00cbe420 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00cbe430 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00cbe440 20765f6c 656e6774 6859203d 206c656e v_lengthY = len │ │ │ │ + 0x00cbe450 2e793b20 0a202020 20766563 3420706f .y; . vec4 po │ │ │ │ + 0x00cbe460 73203d20 76656334 28747261 6e73666f s = vec4(transfo │ │ │ │ + 0x00cbe470 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ + 0x00cbe480 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ + 0x00cbe490 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ + 0x00cbe4a0 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x00cbe4b0 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ + 0x00cbe4c0 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ + 0x00cbe4d0 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x00cbe4e0 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ + 0x00cbe4f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cbe500 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cbe510 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cbe520 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cbe530 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cbe540 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cbe550 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cbe560 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cbe570 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cbe580 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cbe590 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cbe5a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cbe5b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cbe5c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cbe5d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cbe5e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cbe5f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cbe600 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cbe610 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cbe620 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cbe630 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cbe640 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cbe650 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00cbe660 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cbe670 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x00cbe680 0a202069 6e207665 63342061 5f6d6173 . in vec4 a_mas │ │ │ │ + 0x00cbe690 6b546578 436f6f72 643b200a 20206f75 kTexCoord; . ou │ │ │ │ + 0x00cbe6a0 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ + 0x00cbe6b0 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ + 0x00cbe6c0 65633220 765f6d61 736b5465 78436f6f ec2 v_maskTexCoo │ │ │ │ + 0x00cbe6d0 72643b20 0a202075 6e69666f 726d206d rd; . uniform m │ │ │ │ + 0x00cbe6e0 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x00cbe6f0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00cbe700 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00cbe710 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cbe720 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x00cbe730 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x00cbe740 20755f63 6f6e7472 61737447 616d6d61 u_contrastGamma │ │ │ │ + 0x00cbe750 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cbe760 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ + 0x00cbe770 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00cbe780 5f7a5363 616c653b 200a2020 756e6966 _zScale; . unif │ │ │ │ + 0x00cbe790 6f726d20 666c6f61 7420755f 696e7465 orm float u_inte │ │ │ │ + 0x00cbe7a0 72706f6c 6174696f 6e3b200a 2020756e rpolation; . un │ │ │ │ + 0x00cbe7b0 69666f72 6d20666c 6f617420 755f6973 iform float u_is │ │ │ │ + 0x00cbe7c0 4f75746c 696e6550 6173733b 200a2020 OutlinePass; . │ │ │ │ + 0x00cbe7d0 636f6e73 7420666c 6f617420 6b536861 const float kSha │ │ │ │ + 0x00cbe7e0 7065436f 6f726453 63616c61 72203d20 peCoordScalar = │ │ │ │ + 0x00cbe7f0 31303030 2e303b20 0a202076 65633420 1000.0; . vec4 │ │ │ │ + 0x00cbe800 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x00cbe810 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00cbe820 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00cbe830 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00cbe840 5265616c 5a29200a 20207b20 0a202020 RealZ) . { . │ │ │ │ + 0x00cbe850 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x00cbe860 64506976 6f74203d 20706976 6f743b20 dPivot = pivot; │ │ │ │ + 0x00cbe870 0a202020 20666c6f 61742077 203d2074 . float w = t │ │ │ │ + 0x00cbe880 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cbe890 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00cbe8a0 6d656450 69766f74 2e787977 203d2028 medPivot.xyw = ( │ │ │ │ + 0x00cbe8b0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00cbe8c0 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x00cbe8d0 64506976 6f742e78 792c2070 69766f74 dPivot.xy, pivot │ │ │ │ + 0x00cbe8e0 5265616c 5a2c2077 29292e78 79773b20 RealZ, w)).xyw; │ │ │ │ + 0x00cbe8f0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cbe900 5069766f 742e7a20 2a3d2074 72616e73 Pivot.z *= trans │ │ │ │ + 0x00cbe910 666f726d 65645069 766f742e 77202f20 formedPivot.w / │ │ │ │ + 0x00cbe920 773b200a 20202369 66646566 2056554c w; . #ifdef VUL │ │ │ │ + 0x00cbe930 4b414e20 0a202020 20747261 6e73666f KAN . transfo │ │ │ │ + 0x00cbe940 726d6564 5069766f 742e7920 3d202d74 rmedPivot.y = -t │ │ │ │ + 0x00cbe950 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cbe960 793b200a 20202020 7472616e 73666f72 y; . transfor │ │ │ │ + 0x00cbe970 6d656450 69766f74 2e7a203d 20287472 medPivot.z = (tr │ │ │ │ + 0x00cbe980 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00cbe990 20202b20 7472616e 73666f72 6d656450 + transformedP │ │ │ │ + 0x00cbe9a0 69766f74 2e772920 2f20322e 303b200a ivot.w) / 2.0; . │ │ │ │ + 0x00cbe9b0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x00cbe9c0 7475726e 20747261 6e73666f 726d6564 turn transformed │ │ │ │ + 0x00cbe9d0 5069766f 743b200a 20207d20 0a202076 Pivot; . } . v │ │ │ │ + 0x00cbe9e0 65633420 6170706c 7942696c 6c626f61 ec4 applyBillboa │ │ │ │ + 0x00cbe9f0 72645069 766f7454 72616e73 666f726d rdPivotTransform │ │ │ │ + 0x00cbea00 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x00cbea10 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00cbea20 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00cbea30 6c5a2c20 76656332 206f6666 73657429 lZ, vec2 offset) │ │ │ │ + 0x00cbea40 200a2020 7b200a20 20202066 6c6f6174 . { . float │ │ │ │ + 0x00cbea50 206c6f67 69635a20 3d207069 766f742e logicZ = pivot. │ │ │ │ + 0x00cbea60 7a202f20 7069766f 742e773b 200a2020 z / pivot.w; . │ │ │ │ + 0x00cbea70 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00cbea80 65645069 766f7420 3d207069 766f7454 edPivot = pivotT │ │ │ │ + 0x00cbea90 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x00cbeaa0 7069766f 742e7879 2c207069 766f7452 pivot.xy, pivotR │ │ │ │ + 0x00cbeab0 65616c5a 2c207069 766f742e 77293b20 ealZ, pivot.w); │ │ │ │ + 0x00cbeac0 0a202020 20766563 34207363 616c6520 . vec4 scale │ │ │ │ + 0x00cbead0 3d207069 766f7454 72616e73 666f726d = pivotTransform │ │ │ │ + 0x00cbeae0 202a2076 65633428 312e302c 202d312e * vec4(1.0, -1. │ │ │ │ + 0x00cbeaf0 302c2030 2e302c20 312e3029 3b200a20 0, 0.0, 1.0); . │ │ │ │ + 0x00cbeb00 20202076 65633420 706f7369 74696f6e vec4 position │ │ │ │ + 0x00cbeb10 203d2076 65633428 7472616e 73666f72 = vec4(transfor │ │ │ │ + 0x00cbeb20 6d656450 69766f74 2e787920 2f207472 medPivot.xy / tr │ │ │ │ + 0x00cbeb30 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00cbeb40 2c206c6f 6769635a 2c20312e 3029202b , logicZ, 1.0) + │ │ │ │ + 0x00cbeb50 20766563 34286f66 66736574 202f2073 vec4(offset / s │ │ │ │ + 0x00cbeb60 63616c65 2e77202a 20736361 6c652e78 cale.w * scale.x │ │ │ │ + 0x00cbeb70 2c20302e 302c2030 2e30293b 200a2020 , 0.0, 0.0); . │ │ │ │ + 0x00cbeb80 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00cbeb90 20202070 6f736974 696f6e2e 79203d20 position.y = │ │ │ │ + 0x00cbeba0 2d706f73 6974696f 6e2e793b 200a2020 -position.y; . │ │ │ │ + 0x00cbebb0 2020706f 73697469 6f6e2e7a 203d2028 position.z = ( │ │ │ │ + 0x00cbebc0 706f7369 74696f6e 2e7a2020 2b20706f position.z + po │ │ │ │ + 0x00cbebd0 73697469 6f6e2e77 29202f20 322e303b sition.w) / 2.0; │ │ │ │ + 0x00cbebe0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00cbebf0 72657475 726e2070 6f736974 696f6e3b return position; │ │ │ │ + 0x00cbec00 200a2020 7d200a20 20766563 32206361 . } . vec2 ca │ │ │ │ + 0x00cbec10 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ + 0x00cbec20 64417869 73506f73 28766563 32206f72 dAxisPos(vec2 or │ │ │ │ + 0x00cbec30 6967696e 616c4178 6973506f 732c2076 iginalAxisPos, v │ │ │ │ + 0x00cbec40 65633220 73686966 74656450 6f732c20 ec2 shiftedPos, │ │ │ │ + 0x00cbec50 6d617434 206d6f64 656c5669 65772c20 mat4 modelView, │ │ │ │ + 0x00cbec60 666c6f61 74206861 6c665769 64746829 float halfWidth) │ │ │ │ + 0x00cbec70 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x00cbec80 70203d20 28766563 34287368 69667465 p = (vec4(shifte │ │ │ │ + 0x00cbec90 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ + 0x00cbeca0 2a206d6f 64656c56 69657729 2e78793b * modelView).xy; │ │ │ │ + 0x00cbecb0 200a2020 20207665 63322064 203d2070 . vec2 d = p │ │ │ │ + 0x00cbecc0 202d206f 72696769 6e616c41 78697350 - originalAxisP │ │ │ │ + 0x00cbecd0 6f733b20 0a202020 20696620 28646f74 os; . if (dot │ │ │ │ + 0x00cbece0 28642c20 64292021 3d20302e 3029200a (d, d) != 0.0) . │ │ │ │ + 0x00cbecf0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00cbed00 67696e61 6c417869 73506f73 202b206e ginalAxisPos + n │ │ │ │ + 0x00cbed10 6f726d61 6c697a65 28642920 2a206861 ormalize(d) * ha │ │ │ │ + 0x00cbed20 6c665769 6474683b 200a2020 2020656c lfWidth; . el │ │ │ │ + 0x00cbed30 7365200a 20202020 20207265 7475726e se . return │ │ │ │ + 0x00cbed40 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cbed50 3b200a20 207d200a 2020766f 6964206d ; . } . void m │ │ │ │ + 0x00cbed60 61696e28 29200a20 207b200a 20202020 ain() . { . │ │ │ │ + 0x00cbed70 76656332 206e6f72 6d616c20 3d20615f vec2 normal = a_ │ │ │ │ + 0x00cbed80 6e6f726d 616c2e78 793b200a 20202020 normal.xy; . │ │ │ │ + 0x00cbed90 666c6f61 74206861 6c665769 64746820 float halfWidth │ │ │ │ + 0x00cbeda0 3d206c65 6e677468 286e6f72 6d616c29 = length(normal) │ │ │ │ + 0x00cbedb0 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ + 0x00cbedc0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x00cbedd0 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ + 0x00cbede0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ + 0x00cbedf0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ + 0x00cbee00 793b200a 20202020 69662028 68616c66 y; . if (half │ │ │ │ + 0x00cbee10 57696474 6820213d 20302e30 29200a20 Width != 0.0) . │ │ │ │ + 0x00cbee20 2020207b 200a2020 20202020 7472616e { . tran │ │ │ │ + 0x00cbee30 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x00cbee40 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00cbee50 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ + 0x00cbee60 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x00cbee70 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ + 0x00cbee80 6e6f726d 616c2c20 0a202020 20202020 normal, . │ │ │ │ + 0x00cbee90 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cbeea0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cbeeb0 20202020 20202020 20202020 20202075 u │ │ │ │ + 0x00cbeec0 5f6d6f64 656c5669 65772c20 68616c66 _modelView, half │ │ │ │ + 0x00cbeed0 57696474 68293b20 0a202020 207d200a Width); . } . │ │ │ │ + 0x00cbeee0 20202020 666c6f61 7420754f 66667365 float uOffse │ │ │ │ + 0x00cbeef0 74203d20 6d696e28 6c656e67 74682876 t = min(length(v │ │ │ │ + 0x00cbef00 65633428 6b536861 7065436f 6f726453 ec4(kShapeCoordS │ │ │ │ + 0x00cbef10 63616c61 722c2030 2c20302c 20302920 calar, 0, 0, 0) │ │ │ │ + 0x00cbef20 2a20755f 6d6f6465 6c566965 7729202a * u_modelView) * │ │ │ │ + 0x00cbef30 20615f6d 61736b54 6578436f 6f72642e a_maskTexCoord. │ │ │ │ + 0x00cbef40 782c2031 2e30293b 200a2020 2020765f x, 1.0); . v_ │ │ │ │ + 0x00cbef50 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ + 0x00cbef60 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ + 0x00cbef70 200a2020 2020765f 6d61736b 54657843 . v_maskTexC │ │ │ │ + 0x00cbef80 6f6f7264 203d2076 65633228 615f6d61 oord = vec2(a_ma │ │ │ │ + 0x00cbef90 736b5465 78436f6f 72642e79 202b2075 skTexCoord.y + u │ │ │ │ + 0x00cbefa0 4f666673 6574202a 20615f6d 61736b54 Offset * a_maskT │ │ │ │ + 0x00cbefb0 6578436f 6f72642e 7a2c2061 5f6d6173 exCoord.z, a_mas │ │ │ │ + 0x00cbefc0 6b546578 436f6f72 642e7729 3b200a20 kTexCoord.w); . │ │ │ │ + 0x00cbefd0 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x00cbefe0 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ + 0x00cbeff0 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ + 0x00cbf000 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ + 0x00cbf010 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ + 0x00cbf020 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x00cbf030 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00cbf040 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ + 0x00cbf050 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x00cbf060 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ + 0x00cbf070 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cbf080 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cbf090 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cbf0a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cbf0b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cbf0c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cbf0d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cbf0e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cbf0f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cbf100 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cbf110 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cbf120 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cbf130 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cbf140 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cbf150 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cbf160 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cbf170 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cbf180 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cbf190 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cbf1a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cbf1b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cbf1c0 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ + 0x00cbf1d0 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ + 0x00cbf1e0 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ + 0x00cbf1f0 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ + 0x00cbf200 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00cbf210 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00cbf220 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cbf230 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cbf240 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cbf250 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cbf260 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cbf270 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ + 0x00cbf280 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x00cbf290 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ + 0x00cbf2a0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cbf2b0 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ + 0x00cbf2c0 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ + 0x00cbf2d0 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ + 0x00cbf2e0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x00cbf2f0 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ + 0x00cbf300 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ + 0x00cbf310 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00cbf320 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00cbf330 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x00cbf340 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00cbf350 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cbf360 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cbf370 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cbf380 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00cbf390 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00cbf3a0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00cbf3b0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00cbf3c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbf3d0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00cbf3e0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00cbf3f0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00cbf400 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00cbf410 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00cbf420 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00cbf430 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cbf440 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00cbf450 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00cbf460 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00cbf470 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00cbf480 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00cbf490 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cbf4a0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00cbf4b0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00cbf4c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cbf4d0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00cbf4e0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00cbf4f0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00cbf500 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00cbf510 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00cbf520 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00cbf530 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00cbf540 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00cbf550 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00cbf560 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00cbf570 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00cbf580 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00cbf590 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00cbf5a0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00cbf5b0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00cbf5c0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00cbf5d0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cbf5e0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00cbf5f0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00cbf600 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00cbf610 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00cbf620 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00cbf630 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00cbf640 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00cbf650 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00cbf660 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00cbf670 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cbf680 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00cbf690 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00cbf6a0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00cbf6b0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00cbf6c0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cbf6d0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00cbf6e0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00cbf6f0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00cbf700 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00cbf710 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00cbf720 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00cbf730 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00cbf740 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00cbf750 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00cbf760 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00cbf770 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00cbf780 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00cbf790 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00cbf7a0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00cbf7b0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00cbf7c0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00cbf7d0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00cbf7e0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00cbf7f0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00cbf800 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00cbf810 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00cbf820 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00cbf830 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00cbf840 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00cbf850 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00cbf860 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00cbf870 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00cbf880 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00cbf890 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00cbf8a0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00cbf8b0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x00cbf8c0 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ + 0x00cbf8d0 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ + 0x00cbf8e0 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ + 0x00cbf8f0 20202076 65633420 6e6f726d 616c203d vec4 normal = │ │ │ │ + 0x00cbf900 20766563 3428615f 6e6f726d 616c202a vec4(a_normal * │ │ │ │ + 0x00cbf910 20755f61 63637572 6163792c 20302e30 u_accuracy, 0.0 │ │ │ │ + 0x00cbf920 2c20302e 30293b20 0a202020 20706f73 , 0.0); . pos │ │ │ │ + 0x00cbf930 6974696f 6e203d20 28706f73 6974696f ition = (positio │ │ │ │ + 0x00cbf940 6e202b20 6e6f726d 616c2920 2a20755f n + normal) * u_ │ │ │ │ + 0x00cbf950 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ + 0x00cbf960 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x00cbf970 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00cbf980 726d2870 6f736974 696f6e2c 20755f70 rm(position, u_p │ │ │ │ + 0x00cbf990 69766f74 5472616e 73666f72 6d2c2075 ivotTransform, u │ │ │ │ + 0x00cbf9a0 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ + 0x00cbf9b0 7a536361 6c65293b 200a2020 2020765f zScale); . v_ │ │ │ │ + 0x00cbf9c0 636f6c6f 72546578 436f6f72 6473203d colorTexCoords = │ │ │ │ + 0x00cbf9d0 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ + 0x00cbf9e0 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ + 0x00cbf9f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cbfa00 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cbfa10 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cbfa20 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cbfa30 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cbfa40 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cbfa50 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cbfa60 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cbfa70 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cbfa80 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cbfa90 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cbfaa0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cbfab0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cbfac0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cbfad0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cbfae0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cbfaf0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cbfb00 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cbfb10 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cbfb20 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cbfb30 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cbfb40 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cbfb50 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00cbfb60 72546578 436f6f72 643b200a 2020696e rTexCoord; . in │ │ │ │ + 0x00cbfb70 20766563 3220615f 6f75746c 696e6543 vec2 a_outlineC │ │ │ │ + 0x00cbfb80 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00cbfb90 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ + 0x00cbfba0 6c3b200a 2020696e 20766563 3220615f l; . in vec2 a_ │ │ │ │ + 0x00cbfbb0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ + 0x00cbfbc0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00cbfbd0 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x00cbfbe0 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x00cbfbf0 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x00cbfc00 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00cbfc10 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00cbfc20 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x00cbfc30 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x00cbfc40 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00cbfc50 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00cbfc60 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00cbfc70 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00cbfc80 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00cbfc90 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00cbfca0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ + 0x00cbfcb0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cbfcc0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ + 0x00cbfcd0 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ + 0x00cbfce0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x00cbfcf0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00cbfd00 20755f6c 656e6774 683b200a 20202369 u_length; . #i │ │ │ │ + 0x00cbfd10 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00cbfd20 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x00cbfd30 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ + 0x00cbfd40 200a2020 23656e64 6966200a 2020636f . #endif . co │ │ │ │ + 0x00cbfd50 6e737420 666c6f61 74206b42 61736544 nst float kBaseD │ │ │ │ + 0x00cbfd60 65707468 53686966 74203d20 2d31302e epthShift = -10. │ │ │ │ + 0x00cbfd70 303b200a 2020636f 6e737420 666c6f61 0; . const floa │ │ │ │ + 0x00cbfd80 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00cbfd90 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00cbfda0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00cbfdb0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00cbfdc0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00cbfdd0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00cbfde0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00cbfdf0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00cbfe00 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00cbfe10 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00cbfe20 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00cbfe30 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00cbfe40 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00cbfe50 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00cbfe60 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00cbfe70 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00cbfe80 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00cbfe90 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00cbfea0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00cbfeb0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cbfec0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00cbfed0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00cbfee0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cbfef0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00cbff00 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00cbff10 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00cbff20 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00cbff30 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00cbff40 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00cbff50 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cbff60 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00cbff70 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00cbff80 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00cbff90 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00cbffa0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00cbffb0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00cbffc0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00cbffd0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x00cbffe0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x00cbfff0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00cc0000 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00cc0010 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00cc0020 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00cc0030 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00cc0040 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x00cc0050 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x00cc0060 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x00cc0070 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x00cc0080 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x00cc0090 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x00cc00a0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x00cc00b0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x00cc00c0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00cc00d0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x00cc00e0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x00cc00f0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x00cc0100 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00cc0110 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00cc0120 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00cc0130 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x00cc0140 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x00cc0150 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x00cc0160 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x00cc0170 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x00cc0180 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x00cc0190 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x00cc01a0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x00cc01b0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x00cc01c0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x00cc01d0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x00cc01e0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x00cc01f0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x00cc0200 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00cc0210 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00cc0220 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00cc0230 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x00cc0240 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x00cc0250 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x00cc0260 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x00cc0270 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x00cc0280 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x00cc0290 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x00cc02a0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00cc02b0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x00cc02c0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x00cc02d0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x00cc02e0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00cc02f0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x00cc0300 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00cc0310 200a2020 2020666c 6f617420 69734f75 . float isOu │ │ │ │ + 0x00cc0320 746c696e 65203d20 73746570 28302e35 tline = step(0.5 │ │ │ │ + 0x00cc0330 2c20755f 69734f75 746c696e 65506173 , u_isOutlinePas │ │ │ │ + 0x00cc0340 73293b20 0a202020 20666c6f 61742064 s); . float d │ │ │ │ + 0x00cc0350 65707468 53686966 74203d20 6b426173 epthShift = kBas │ │ │ │ + 0x00cc0360 65446570 74685368 69667420 2a206973 eDepthShift * is │ │ │ │ + 0x00cc0370 4f75746c 696e653b 200a2020 20207665 Outline; . ve │ │ │ │ + 0x00cc0380 63342070 6f73203d 20287665 63342861 c4 pos = (vec4(a │ │ │ │ + 0x00cc0390 5f706f73 6974696f 6e2c2031 2e302920 _position, 1.0) │ │ │ │ + 0x00cc03a0 2b207665 63342830 2e302c20 302e302c + vec4(0.0, 0.0, │ │ │ │ + 0x00cc03b0 20646570 74685368 6966742c 20302e30 depthShift, 0.0 │ │ │ │ + 0x00cc03c0 2929202a 20755f6d 6f64656c 56696577 )) * u_modelView │ │ │ │ + 0x00cc03d0 3b200a20 20202076 65633420 73686966 ; . vec4 shif │ │ │ │ + 0x00cc03e0 74656450 6f73203d 20766563 3428615f tedPos = vec4(a_ │ │ │ │ + 0x00cc03f0 6e6f726d 616c2c20 302e302c 20302e30 normal, 0.0, 0.0 │ │ │ │ + 0x00cc0400 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ + 0x00cc0410 5f506f73 6974696f 6e203d20 73686966 _Position = shif │ │ │ │ + 0x00cc0420 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ + 0x00cc0430 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ + 0x00cc0440 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ + 0x00cc0450 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ + 0x00cc0460 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ + 0x00cc0470 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ + 0x00cc0480 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ + 0x00cc0490 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ + 0x00cc04a0 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ + 0x00cc04b0 64696620 0a202020 20766563 3220636f dif . vec2 co │ │ │ │ + 0x00cc04c0 6c6f7254 6578436f 6f726420 3d206d69 lorTexCoord = mi │ │ │ │ + 0x00cc04d0 7828615f 636f6c6f 72546578 436f6f72 x(a_colorTexCoor │ │ │ │ + 0x00cc04e0 642c2061 5f6f7574 6c696e65 436f6c6f d, a_outlineColo │ │ │ │ + 0x00cc04f0 72546578 436f6f72 642c2069 734f7574 rTexCoord, isOut │ │ │ │ + 0x00cc0500 6c696e65 293b200a 20202369 66646566 line); . #ifdef │ │ │ │ + 0x00cc0510 20454e41 424c455f 56544620 0a202020 ENABLE_VTF . │ │ │ │ + 0x00cc0520 20765f63 6f6c6f72 203d2074 65787475 v_color = textu │ │ │ │ + 0x00cc0530 72652875 5f636f6c 6f725465 782c2063 re(u_colorTex, c │ │ │ │ + 0x00cc0540 6f6c6f72 54657843 6f6f7264 293b200a olorTexCoord); . │ │ │ │ + 0x00cc0550 20202365 6c736520 0a202020 20765f63 #else . v_c │ │ │ │ + 0x00cc0560 6f6c6f72 54657843 6f6f7264 203d2063 olorTexCoord = c │ │ │ │ + 0x00cc0570 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00cc0580 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ + 0x00cc0590 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ + 0x00cc05a0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ + 0x00cc05b0 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ + 0x00cc05c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc05d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc05e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc05f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc0600 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc0610 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc0620 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc0630 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc0640 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc0650 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc0660 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc0670 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc0680 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc0690 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc06a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc06b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc06c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc06d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc06e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc06f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc0700 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc0710 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x00cc0720 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x00cc0730 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ + 0x00cc0740 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x00cc0750 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ + 0x00cc0760 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ + 0x00cc0770 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ + 0x00cc0780 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ + 0x00cc0790 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00cc07a0 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x00cc07b0 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x00cc07c0 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x00cc07d0 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00cc07e0 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00cc07f0 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x00cc0800 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x00cc0810 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00cc0820 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00cc0830 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00cc0840 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00cc0850 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ + 0x00cc0860 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ + 0x00cc0870 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ + 0x00cc0880 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ + 0x00cc0890 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ + 0x00cc08a0 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ + 0x00cc08b0 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ + 0x00cc08c0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cc08d0 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ + 0x00cc08e0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00cc08f0 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ + 0x00cc0900 733b200a 2020756e 69666f72 6d207361 s; . uniform sa │ │ │ │ + 0x00cc0910 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ + 0x00cc0920 65783b20 0a202063 6f6e7374 20666c6f ex; . const flo │ │ │ │ + 0x00cc0930 6174206b 42617365 44657074 68536869 at kBaseDepthShi │ │ │ │ + 0x00cc0940 6674203d 202d3130 2e303b20 0a202063 ft = -10.0; . c │ │ │ │ + 0x00cc0950 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ + 0x00cc0960 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ + 0x00cc0970 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ + 0x00cc0980 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00cc0990 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00cc09a0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x00cc09b0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x00cc09c0 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ + 0x00cc09d0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x00cc09e0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ + 0x00cc09f0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ + 0x00cc0a00 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00cc0a10 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00cc0a20 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ + 0x00cc0a30 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cc0a40 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00cc0a50 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ + 0x00cc0a60 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ + 0x00cc0a70 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cc0a80 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ + 0x00cc0a90 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ + 0x00cc0aa0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00cc0ab0 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ + 0x00cc0ac0 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ + 0x00cc0ad0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00cc0ae0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00cc0af0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ + 0x00cc0b00 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00cc0b10 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ + 0x00cc0b20 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ + 0x00cc0b30 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00cc0b40 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ + 0x00cc0b50 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ + 0x00cc0b60 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ + 0x00cc0b70 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ + 0x00cc0b80 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00cc0b90 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00cc0ba0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00cc0bb0 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ + 0x00cc0bc0 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ + 0x00cc0bd0 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ + 0x00cc0be0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ + 0x00cc0bf0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x00cc0c00 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ + 0x00cc0c10 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ + 0x00cc0c20 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00cc0c30 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ + 0x00cc0c40 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ + 0x00cc0c50 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00cc0c60 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ + 0x00cc0c70 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x00cc0c80 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ + 0x00cc0c90 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x00cc0ca0 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ + 0x00cc0cb0 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ + 0x00cc0cc0 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ + 0x00cc0cd0 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ + 0x00cc0ce0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ + 0x00cc0cf0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ + 0x00cc0d00 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00cc0d10 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ + 0x00cc0d20 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ + 0x00cc0d30 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ + 0x00cc0d40 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ + 0x00cc0d50 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ + 0x00cc0d60 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00cc0d70 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ + 0x00cc0d80 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ + 0x00cc0d90 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x00cc0da0 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ + 0x00cc0db0 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ + 0x00cc0dc0 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ + 0x00cc0dd0 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ + 0x00cc0de0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ + 0x00cc0df0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ + 0x00cc0e00 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ + 0x00cc0e10 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ + 0x00cc0e20 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ + 0x00cc0e30 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ + 0x00cc0e40 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ + 0x00cc0e50 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ + 0x00cc0e60 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ + 0x00cc0e70 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00cc0e80 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ + 0x00cc0e90 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ + 0x00cc0ea0 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ + 0x00cc0eb0 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ + 0x00cc0ec0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00cc0ed0 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ + 0x00cc0ee0 696e2829 200a2020 7b200a20 20202066 in() . { . f │ │ │ │ + 0x00cc0ef0 6c6f6174 2069734f 75746c69 6e65203d loat isOutline = │ │ │ │ + 0x00cc0f00 20737465 7028302e 352c2075 5f69734f step(0.5, u_isO │ │ │ │ + 0x00cc0f10 75746c69 6e655061 7373293b 200a2020 utlinePass); . │ │ │ │ + 0x00cc0f20 2020666c 6f617420 64657074 68536869 float depthShi │ │ │ │ + 0x00cc0f30 6674203d 206b4261 73654465 70746853 ft = kBaseDepthS │ │ │ │ + 0x00cc0f40 68696674 202a2069 734f7574 6c696e65 hift * isOutline │ │ │ │ + 0x00cc0f50 3b200a20 20202076 65633420 7069766f ; . vec4 pivo │ │ │ │ + 0x00cc0f60 74203d20 28766563 3428615f 706f7369 t = (vec4(a_posi │ │ │ │ + 0x00cc0f70 74696f6e 2e78797a 2c20312e 3029202b tion.xyz, 1.0) + │ │ │ │ + 0x00cc0f80 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ + 0x00cc0f90 64657074 68536869 66742c20 302e3029 depthShift, 0.0) │ │ │ │ + 0x00cc0fa0 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x00cc0fb0 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ + 0x00cc0fc0 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ + 0x00cc0fd0 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ + 0x00cc0fe0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x00cc0ff0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00cc1000 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00cc1010 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ + 0x00cc1020 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ + 0x00cc1030 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ + 0x00cc1040 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ + 0x00cc1050 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc1060 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc1070 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ + 0x00cc1080 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ + 0x00cc1090 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ + 0x00cc10a0 65633220 636f6c6f 72546578 436f6f72 ec2 colorTexCoor │ │ │ │ + 0x00cc10b0 64203d20 6d697828 615f636f 6c6f7254 d = mix(a_colorT │ │ │ │ + 0x00cc10c0 6578436f 6f72642c 20615f6f 75746c69 exCoord, a_outli │ │ │ │ + 0x00cc10d0 6e65436f 6c6f7254 6578436f 6f72642c neColorTexCoord, │ │ │ │ + 0x00cc10e0 2069734f 75746c69 6e65293b 200a2020 isOutline); . │ │ │ │ + 0x00cc10f0 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ + 0x00cc1100 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ + 0x00cc1110 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ + 0x00cc1120 5465782c 20636f6c 6f725465 78436f6f Tex, colorTexCoo │ │ │ │ + 0x00cc1130 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ + 0x00cc1140 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00cc1150 7264203d 20636f6c 6f725465 78436f6f rd = colorTexCoo │ │ │ │ + 0x00cc1160 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00cc1170 20202076 5f6d6173 6b546578 436f6f72 v_maskTexCoor │ │ │ │ + 0x00cc1180 64203d20 615f6d61 736b5465 78436f6f d = a_maskTexCoo │ │ │ │ + 0x00cc1190 72643b20 0a20207d 200a0000 00000000 rd; . } ....... │ │ │ │ + 0x00cc11a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc11b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc11c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc11d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc11e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc11f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc1200 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc1210 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc1220 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc1230 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc1240 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc1250 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc1260 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc1270 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc1280 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc1290 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc12a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc12b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc12c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc12d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc12e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc12f0 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ + 0x00cc1300 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00cc1310 72546578 436f6f72 64733b20 0a20206f rTexCoords; . o │ │ │ │ + 0x00cc1320 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ + 0x00cc1330 6578436f 6f726473 3b200a20 20756e69 exCoords; . uni │ │ │ │ + 0x00cc1340 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00cc1350 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00cc1360 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00cc1370 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00cc1380 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00cc1390 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00cc13a0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ + 0x00cc13b0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cc13c0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ + 0x00cc13d0 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ + 0x00cc13e0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x00cc13f0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00cc1400 20755f6c 656e6774 683b200a 2020636f u_length; . co │ │ │ │ + 0x00cc1410 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x00cc1420 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x00cc1430 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x00cc1440 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x00cc1450 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00cc1460 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00cc1470 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00cc1480 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x00cc1490 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00cc14a0 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x00cc14b0 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x00cc14c0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x00cc14d0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cc14e0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x00cc14f0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cc1500 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00cc1510 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00cc1520 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x00cc1530 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cc1540 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x00cc1550 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x00cc1560 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cc1570 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x00cc1580 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x00cc1590 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x00cc15a0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cc15b0 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x00cc15c0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x00cc15d0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x00cc15e0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x00cc15f0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00cc1600 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x00cc1610 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x00cc1620 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x00cc1630 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00cc1640 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00cc1650 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00cc1660 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00cc1670 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x00cc1680 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x00cc1690 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x00cc16a0 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x00cc16b0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x00cc16c0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x00cc16d0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x00cc16e0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00cc16f0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x00cc1700 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x00cc1710 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00cc1720 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x00cc1730 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x00cc1740 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x00cc1750 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x00cc1760 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x00cc1770 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x00cc1780 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x00cc1790 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x00cc17a0 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x00cc17b0 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x00cc17c0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x00cc17d0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x00cc17e0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x00cc17f0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x00cc1800 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x00cc1810 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x00cc1820 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x00cc1830 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x00cc1840 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x00cc1850 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x00cc1860 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x00cc1870 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x00cc1880 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x00cc1890 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x00cc18a0 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x00cc18b0 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x00cc18c0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x00cc18d0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x00cc18e0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x00cc18f0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x00cc1900 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cc1910 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x00cc1920 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x00cc1930 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00cc1940 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x00cc1950 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x00cc1960 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x00cc1970 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x00cc1980 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00cc1990 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x00cc19a0 6e282920 0a20207b 200a2020 2020676c n() . { . gl │ │ │ │ + 0x00cc19b0 5f506f73 6974696f 6e203d20 76656334 _Position = vec4 │ │ │ │ + 0x00cc19c0 28615f70 6f736974 696f6e2c 20302c20 (a_position, 0, │ │ │ │ + 0x00cc19d0 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ + 0x00cc19e0 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ + 0x00cc19f0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cc1a00 4e200a20 20202067 6c5f506f 73697469 N . gl_Positi │ │ │ │ + 0x00cc1a10 6f6e2e79 203d202d 676c5f50 6f736974 on.y = -gl_Posit │ │ │ │ + 0x00cc1a20 696f6e2e 793b200a 20202020 676c5f50 ion.y; . gl_P │ │ │ │ + 0x00cc1a30 6f736974 696f6e2e 7a203d20 28676c5f osition.z = (gl_ │ │ │ │ + 0x00cc1a40 506f7369 74696f6e 2e7a2020 2b20676c Position.z + gl │ │ │ │ + 0x00cc1a50 5f506f73 6974696f 6e2e7729 202a2030 _Position.w) * 0 │ │ │ │ + 0x00cc1a60 2e353b20 0a202023 656e6469 66200a20 .5; . #endif . │ │ │ │ + 0x00cc1a70 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00cc1a80 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ + 0x00cc1a90 436f6f72 64733b20 0a20207d 200a0000 Coords; . } ... │ │ │ │ + 0x00cc1aa0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc1ab0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc1ac0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc1ad0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc1ae0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc1af0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc1b00 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc1b10 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc1b20 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc1b30 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc1b40 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc1b50 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc1b60 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc1b70 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc1b80 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc1b90 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc1ba0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc1bb0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc1bc0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc1bd0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc1be0 2023656e 64696620 0a202023 64656669 #endif . #defi │ │ │ │ + 0x00cc1bf0 6e652054 494c455f 4241434b 47524f55 ne TILE_BACKGROU │ │ │ │ + 0x00cc1c00 4e445f4d 41585f43 4f554e54 20363420 ND_MAX_COUNT 64 │ │ │ │ + 0x00cc1c10 0a20206f 75742076 65633320 765f7465 . out vec3 v_te │ │ │ │ + 0x00cc1c20 78436f6f 7264733b 200a2020 756e6966 xCoords; . unif │ │ │ │ + 0x00cc1c30 6f726d20 76656334 20755f74 696c6543 orm vec4 u_tileC │ │ │ │ + 0x00cc1c40 6f6f7264 734d696e 4d61785b 54494c45 oordsMinMax[TILE │ │ │ │ + 0x00cc1c50 5f424143 4b47524f 554e445f 4d41585f _BACKGROUND_MAX_ │ │ │ │ + 0x00cc1c60 434f554e 545d3b20 0a202075 6e69666f COUNT]; . unifo │ │ │ │ + 0x00cc1c70 726d2069 6e742075 5f746578 74757265 rm int u_texture │ │ │ │ + 0x00cc1c80 496e6465 785b5449 4c455f42 41434b47 Index[TILE_BACKG │ │ │ │ + 0x00cc1c90 524f554e 445f4d41 585f434f 554e545d ROUND_MAX_COUNT] │ │ │ │ + 0x00cc1ca0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00cc1cb0 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ + 0x00cc1cc0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cc1cd0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x00cc1ce0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x00cc1cf0 69766f74 5472616e 73666f72 6d3b200a ivotTransform; . │ │ │ │ + 0x00cc1d00 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ + 0x00cc1d10 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ + 0x00cc1d20 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ + 0x00cc1d30 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ + 0x00cc1d40 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00cc1d50 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00cc1d60 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00cc1d70 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ + 0x00cc1d80 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00cc1d90 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00cc1da0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ + 0x00cc1db0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cc1dc0 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ + 0x00cc1dd0 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ + 0x00cc1de0 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ + 0x00cc1df0 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ + 0x00cc1e00 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ + 0x00cc1e10 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ + 0x00cc1e20 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00cc1e30 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ + 0x00cc1e40 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ + 0x00cc1e50 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ + 0x00cc1e60 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ + 0x00cc1e70 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ + 0x00cc1e80 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ + 0x00cc1e90 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ + 0x00cc1ea0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ + 0x00cc1eb0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc1ec0 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ + 0x00cc1ed0 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ + 0x00cc1ee0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00cc1ef0 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ + 0x00cc1f00 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ + 0x00cc1f10 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ + 0x00cc1f20 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ + 0x00cc1f30 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00cc1f40 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x00cc1f50 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x00cc1f60 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ + 0x00cc1f70 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ + 0x00cc1f80 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ + 0x00cc1f90 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ + 0x00cc1fa0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00cc1fb0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00cc1fc0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00cc1fd0 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ + 0x00cc1fe0 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ + 0x00cc1ff0 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ + 0x00cc2000 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ + 0x00cc2010 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ + 0x00cc2020 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ + 0x00cc2030 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x00cc2040 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ + 0x00cc2050 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ + 0x00cc2060 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc2070 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ + 0x00cc2080 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ + 0x00cc2090 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ + 0x00cc20a0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ + 0x00cc20b0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00cc20c0 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ + 0x00cc20d0 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ + 0x00cc20e0 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ + 0x00cc20f0 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ + 0x00cc2100 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ + 0x00cc2110 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00cc2120 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ + 0x00cc2130 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ + 0x00cc2140 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x00cc2150 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ + 0x00cc2160 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ + 0x00cc2170 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ + 0x00cc2180 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ + 0x00cc2190 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ + 0x00cc21a0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ + 0x00cc21b0 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ + 0x00cc21c0 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ + 0x00cc21d0 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ + 0x00cc21e0 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ + 0x00cc21f0 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ + 0x00cc2200 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ + 0x00cc2210 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ + 0x00cc2220 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x00cc2230 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ + 0x00cc2240 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ + 0x00cc2250 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ + 0x00cc2260 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ + 0x00cc2270 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00cc2280 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ + 0x00cc2290 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ + 0x00cc22a0 20207665 63322071 75616456 65727465 vec2 quadVerte │ │ │ │ + 0x00cc22b0 78203d20 76656332 28676c5f 56657274 x = vec2(gl_Vert │ │ │ │ + 0x00cc22c0 65784944 20262031 2c202867 6c5f5665 exID & 1, (gl_Ve │ │ │ │ + 0x00cc22d0 72746578 4944203e 3e203129 20262031 rtexID >> 1) & 1 │ │ │ │ + 0x00cc22e0 293b200a 2020200a 20202020 76656334 ); . . vec4 │ │ │ │ + 0x00cc22f0 2074696c 65436f6f 7264734d 696e4d61 tileCoordsMinMa │ │ │ │ + 0x00cc2300 78203d20 755f7469 6c65436f 6f726473 x = u_tileCoords │ │ │ │ + 0x00cc2310 4d696e4d 61785b67 6c5f496e 7374616e MinMax[gl_Instan │ │ │ │ + 0x00cc2320 63654944 5d3b200a 20202020 76656332 ceID]; . vec2 │ │ │ │ + 0x00cc2330 20776f72 6c64506f 73203d20 6d697828 worldPos = mix( │ │ │ │ + 0x00cc2340 74696c65 436f6f72 64734d69 6e4d6178 tileCoordsMinMax │ │ │ │ + 0x00cc2350 2e78792c 2074696c 65436f6f 7264734d .xy, tileCoordsM │ │ │ │ + 0x00cc2360 696e4d61 782e7a77 2c207175 61645665 inMax.zw, quadVe │ │ │ │ + 0x00cc2370 72746578 293b200a 20202020 76656334 rtex); . vec4 │ │ │ │ + 0x00cc2380 20706f73 203d2076 65633428 776f726c pos = vec4(worl │ │ │ │ + 0x00cc2390 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ + 0x00cc23a0 2a20755f 6d6f6465 6c566965 77202a20 * u_modelView * │ │ │ │ + 0x00cc23b0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00cc23c0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x00cc23d0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00cc23e0 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ + 0x00cc23f0 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ + 0x00cc2400 3b200a20 20200a20 20202076 5f746578 ; . . v_tex │ │ │ │ + 0x00cc2410 436f6f72 6473203d 20766563 33287175 Coords = vec3(qu │ │ │ │ + 0x00cc2420 61645665 72746578 2c20666c 6f617428 adVertex, float( │ │ │ │ + 0x00cc2430 755f7465 78747572 65496e64 65785b67 u_textureIndex[g │ │ │ │ + 0x00cc2440 6c5f496e 7374616e 63654944 5d29293b l_InstanceID])); │ │ │ │ + 0x00cc2450 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ + 0x00cc2460 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc2470 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc2480 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc2490 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc24a0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc24b0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc24c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc24d0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc24e0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc24f0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc2500 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc2510 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc2520 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc2530 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc2540 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc2550 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc2560 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc2570 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc2580 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc2590 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc25a0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc25b0 63332061 5f6e6f72 6d616c3b 200a2020 c3 a_normal; . │ │ │ │ + 0x00cc25c0 696e2076 65633320 615f706f 73697469 in vec3 a_positi │ │ │ │ + 0x00cc25d0 6f6e3b20 0a202069 6e207665 63342061 on; . in vec4 a │ │ │ │ + 0x00cc25e0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x00cc25f0 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ + 0x00cc2600 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ + 0x00cc2610 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ + 0x00cc2620 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ + 0x00cc2630 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00cc2640 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00cc2650 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00cc2660 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ + 0x00cc2670 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ + 0x00cc2680 755f636f 6e747261 73744761 6d6d613b u_contrastGamma; │ │ │ │ + 0x00cc2690 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00cc26a0 7420755f 6f706163 6974793b 200a2020 t u_opacity; . │ │ │ │ + 0x00cc26b0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cc26c0 7a536361 6c653b20 0a202075 6e69666f zScale; . unifo │ │ │ │ + 0x00cc26d0 726d2066 6c6f6174 20755f69 6e746572 rm float u_inter │ │ │ │ + 0x00cc26e0 706f6c61 74696f6e 3b200a20 20756e69 polation; . uni │ │ │ │ + 0x00cc26f0 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ + 0x00cc2700 75746c69 6e655061 73733b20 0a202063 utlinePass; . c │ │ │ │ + 0x00cc2710 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ + 0x00cc2720 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ + 0x00cc2730 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ + 0x00cc2740 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00cc2750 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00cc2760 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x00cc2770 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x00cc2780 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ + 0x00cc2790 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x00cc27a0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ + 0x00cc27b0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ + 0x00cc27c0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00cc27d0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00cc27e0 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ + 0x00cc27f0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cc2800 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00cc2810 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ + 0x00cc2820 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ + 0x00cc2830 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cc2840 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ + 0x00cc2850 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ + 0x00cc2860 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00cc2870 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ + 0x00cc2880 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ + 0x00cc2890 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00cc28a0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00cc28b0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ + 0x00cc28c0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00cc28d0 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ + 0x00cc28e0 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ + 0x00cc28f0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00cc2900 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ + 0x00cc2910 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ + 0x00cc2920 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ + 0x00cc2930 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ + 0x00cc2940 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00cc2950 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00cc2960 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00cc2970 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ + 0x00cc2980 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ + 0x00cc2990 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ + 0x00cc29a0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ + 0x00cc29b0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x00cc29c0 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ + 0x00cc29d0 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ + 0x00cc29e0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00cc29f0 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ + 0x00cc2a00 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ + 0x00cc2a10 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00cc2a20 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ + 0x00cc2a30 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x00cc2a40 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ + 0x00cc2a50 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x00cc2a60 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ + 0x00cc2a70 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ + 0x00cc2a80 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ + 0x00cc2a90 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ + 0x00cc2aa0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ + 0x00cc2ab0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ + 0x00cc2ac0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00cc2ad0 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ + 0x00cc2ae0 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ + 0x00cc2af0 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ + 0x00cc2b00 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ + 0x00cc2b10 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ + 0x00cc2b20 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00cc2b30 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ + 0x00cc2b40 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ + 0x00cc2b50 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x00cc2b60 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ + 0x00cc2b70 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ + 0x00cc2b80 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ + 0x00cc2b90 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ + 0x00cc2ba0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ + 0x00cc2bb0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ + 0x00cc2bc0 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ + 0x00cc2bd0 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ + 0x00cc2be0 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ + 0x00cc2bf0 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ + 0x00cc2c00 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ + 0x00cc2c10 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ + 0x00cc2c20 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ + 0x00cc2c30 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00cc2c40 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ + 0x00cc2c50 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ + 0x00cc2c60 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ + 0x00cc2c70 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ + 0x00cc2c80 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00cc2c90 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ + 0x00cc2ca0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ + 0x00cc2cb0 65633320 72616469 7573203d 20615f6e ec3 radius = a_n │ │ │ │ + 0x00cc2cc0 6f726d61 6c202a20 615f706f 73697469 ormal * a_positi │ │ │ │ + 0x00cc2cd0 6f6e2e7a 3b200a20 20202076 65633420 on.z; . vec4 │ │ │ │ + 0x00cc2ce0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ + 0x00cc2cf0 6974696f 6e2e7879 2c20302c 20312920 ition.xy, 0, 1) │ │ │ │ + 0x00cc2d00 2a20755f 6d6f6465 6c566965 773b200a * u_modelView; . │ │ │ │ + 0x00cc2d10 20202020 76656334 20736869 66746564 vec4 shifted │ │ │ │ + 0x00cc2d20 506f7320 3d207665 63342872 61646975 Pos = vec4(radiu │ │ │ │ + 0x00cc2d30 732e7879 2c20302c 20302920 2b20706f s.xy, 0, 0) + po │ │ │ │ + 0x00cc2d40 733b200a 20202020 676c5f50 6f736974 s; . gl_Posit │ │ │ │ + 0x00cc2d50 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x00cc2d60 5472616e 73666f72 6d287368 69667465 Transform(shifte │ │ │ │ + 0x00cc2d70 64506f73 202a2075 5f70726f 6a656374 dPos * u_project │ │ │ │ + 0x00cc2d80 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ + 0x00cc2d90 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ + 0x00cc2da0 2020765f 72616469 7573203d 20726164 v_radius = rad │ │ │ │ + 0x00cc2db0 6975733b 200a2020 2020765f 636f6c6f ius; . v_colo │ │ │ │ + 0x00cc2dc0 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ + 0x00cc2dd0 7d200a00 00000000 00000000 00000000 } .............. │ │ │ │ + 0x00cc2de0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc2df0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc2e00 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc2e10 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc2e20 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc2e30 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc2e40 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc2e50 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc2e60 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc2e70 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc2e80 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc2e90 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc2ea0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc2eb0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc2ec0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc2ed0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc2ee0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc2ef0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc2f00 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc2f10 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc2f20 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc2f30 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ + 0x00cc2f40 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ + 0x00cc2f50 20206f75 74207665 63342076 5f636f6f out vec4 v_coo │ │ │ │ + 0x00cc2f60 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ + 0x00cc2f70 20765f6f 66667365 74303b20 0a20206f v_offset0; . o │ │ │ │ + 0x00cc2f80 75742076 65633420 765f6f66 66736574 ut vec4 v_offset │ │ │ │ + 0x00cc2f90 313b200a 20206f75 74207665 63342076 1; . out vec4 v │ │ │ │ + 0x00cc2fa0 5f6f6666 73657432 3b200a20 20756e69 _offset2; . uni │ │ │ │ + 0x00cc2fb0 666f726d 20766563 3420755f 6672616d form vec4 u_fram │ │ │ │ + 0x00cc2fc0 65627566 6665724d 65747269 63733b20 ebufferMetrics; │ │ │ │ + 0x00cc2fd0 0a202023 64656669 6e652053 4d41415f . #define SMAA_ │ │ │ │ + 0x00cc2fe0 4d41585f 53454152 43485f53 54455053 MAX_SEARCH_STEPS │ │ │ │ + 0x00cc2ff0 20382e30 200a2020 636f6e73 74207665 8.0 . const ve │ │ │ │ + 0x00cc3000 6334206b 4d617853 65617263 68537465 c4 kMaxSearchSte │ │ │ │ + 0x00cc3010 7073203d 20766563 34282d32 2e30202a ps = vec4(-2.0 * │ │ │ │ + 0x00cc3020 20534d41 415f4d41 585f5345 41524348 SMAA_MAX_SEARCH │ │ │ │ + 0x00cc3030 5f535445 50532c20 322e3020 2a20534d _STEPS, 2.0 * SM │ │ │ │ + 0x00cc3040 41415f4d 41585f53 45415243 485f5354 AA_MAX_SEARCH_ST │ │ │ │ + 0x00cc3050 4550532c 200a2020 20202020 20202020 EPS, . │ │ │ │ + 0x00cc3060 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc3070 20202020 20202020 20202d32 2e30202a -2.0 * │ │ │ │ + 0x00cc3080 20534d41 415f4d41 585f5345 41524348 SMAA_MAX_SEARCH │ │ │ │ + 0x00cc3090 5f535445 50532c20 322e3020 202a2053 _STEPS, 2.0 * S │ │ │ │ + 0x00cc30a0 4d41415f 4d41585f 53454152 43485f53 MAA_MAX_SEARCH_S │ │ │ │ + 0x00cc30b0 54455053 293b200a 2020636f 6e737420 TEPS); . const │ │ │ │ + 0x00cc30c0 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ + 0x00cc30d0 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ + 0x00cc30e0 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ + 0x00cc30f0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00cc3100 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00cc3110 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00cc3120 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ + 0x00cc3130 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00cc3140 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc3150 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ + 0x00cc3160 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ + 0x00cc3170 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ + 0x00cc3180 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cc3190 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ + 0x00cc31a0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x00cc31b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc31c0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00cc31d0 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ + 0x00cc31e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cc31f0 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ + 0x00cc3200 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ + 0x00cc3210 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00cc3220 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cc3230 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ + 0x00cc3240 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ + 0x00cc3250 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cc3260 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ + 0x00cc3270 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ + 0x00cc3280 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00cc3290 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x00cc32a0 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ + 0x00cc32b0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ + 0x00cc32c0 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ + 0x00cc32d0 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ + 0x00cc32e0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x00cc32f0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00cc3300 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00cc3310 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ + 0x00cc3320 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ + 0x00cc3330 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ + 0x00cc3340 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ + 0x00cc3350 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ + 0x00cc3360 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cc3370 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ + 0x00cc3380 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ + 0x00cc3390 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00cc33a0 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ + 0x00cc33b0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ + 0x00cc33c0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00cc33d0 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ + 0x00cc33e0 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ + 0x00cc33f0 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ + 0x00cc3400 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00cc3410 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ + 0x00cc3420 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ + 0x00cc3430 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ + 0x00cc3440 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ + 0x00cc3450 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ + 0x00cc3460 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ + 0x00cc3470 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ + 0x00cc3480 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ + 0x00cc3490 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ + 0x00cc34a0 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ + 0x00cc34b0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ + 0x00cc34c0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00cc34d0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00cc34e0 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ + 0x00cc34f0 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ + 0x00cc3500 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x00cc3510 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ + 0x00cc3520 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ + 0x00cc3530 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ + 0x00cc3540 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ + 0x00cc3550 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ + 0x00cc3560 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ + 0x00cc3570 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ + 0x00cc3580 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ + 0x00cc3590 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x00cc35a0 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ + 0x00cc35b0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00cc35c0 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ + 0x00cc35d0 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ + 0x00cc35e0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00cc35f0 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ + 0x00cc3600 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ + 0x00cc3610 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ + 0x00cc3620 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00cc3630 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ + 0x00cc3640 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ + 0x00cc3650 0a20207b 200a2020 2020765f 636f6f72 . { . v_coor │ │ │ │ + 0x00cc3660 6473203d 20766563 3428615f 74636f6f ds = vec4(a_tcoo │ │ │ │ + 0x00cc3670 72642c20 615f7463 6f6f7264 202a2075 rd, a_tcoord * u │ │ │ │ + 0x00cc3680 5f667261 6d656275 66666572 4d657472 _framebufferMetr │ │ │ │ + 0x00cc3690 6963732e 7a77293b 200a2020 2020765f ics.zw); . v_ │ │ │ │ + 0x00cc36a0 6f666673 65743020 3d20755f 6672616d offset0 = u_fram │ │ │ │ + 0x00cc36b0 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x00cc36c0 79787920 2a207665 6334282d 302e3235 yxy * vec4(-0.25 │ │ │ │ + 0x00cc36d0 2c202d30 2e313235 2c20312e 32352c20 , -0.125, 1.25, │ │ │ │ + 0x00cc36e0 2d302e31 32352920 2b20615f 74636f6f -0.125) + a_tcoo │ │ │ │ + 0x00cc36f0 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ + 0x00cc3700 6f666673 65743120 3d20755f 6672616d offset1 = u_fram │ │ │ │ + 0x00cc3710 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x00cc3720 79787920 2a207665 6334282d 302e3132 yxy * vec4(-0.12 │ │ │ │ + 0x00cc3730 352c202d 302e3235 2c202d30 2e313235 5, -0.25, -0.125 │ │ │ │ + 0x00cc3740 2c20312e 32352920 2b20615f 74636f6f , 1.25) + a_tcoo │ │ │ │ + 0x00cc3750 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ + 0x00cc3760 6f666673 65743220 3d20755f 6672616d offset2 = u_fram │ │ │ │ + 0x00cc3770 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x00cc3780 78797920 2a206b4d 61785365 61726368 xyy * kMaxSearch │ │ │ │ + 0x00cc3790 53746570 73202b20 76656334 28765f6f Steps + vec4(v_o │ │ │ │ + 0x00cc37a0 66667365 74302e78 7a2c2076 5f6f6666 ffset0.xz, v_off │ │ │ │ + 0x00cc37b0 73657431 2e797729 3b200a20 20202067 set1.yw); . g │ │ │ │ + 0x00cc37c0 6c5f506f 73697469 6f6e203d 20766563 l_Position = vec │ │ │ │ + 0x00cc37d0 3428615f 706f732c 20302e30 2c20312e 4(a_pos, 0.0, 1. │ │ │ │ + 0x00cc37e0 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ + 0x00cc37f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc3800 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc3810 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc3820 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc3830 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc3840 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc3850 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc3860 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc3870 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc3880 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc3890 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc38a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc38b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc38c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc38d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc38e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc38f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc3900 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc3910 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc3920 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc3930 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc3940 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cc3950 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00cc3960 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00cc3970 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x00cc3980 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ + 0x00cc3990 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ + 0x00cc39a0 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ + 0x00cc39b0 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ + 0x00cc39c0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00cc39d0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00cc39e0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00cc39f0 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ + 0x00cc3a00 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x00cc3a10 755f7061 72616d73 3b200a20 20756e69 u_params; . uni │ │ │ │ + 0x00cc3a20 666f726d 20666c6f 61742075 5f6c696e form float u_lin │ │ │ │ + 0x00cc3a30 6548616c 66576964 74683b20 0a202075 eHalfWidth; . u │ │ │ │ + 0x00cc3a40 6e69666f 726d2066 6c6f6174 20755f6d niform float u_m │ │ │ │ + 0x00cc3a50 61785261 64697573 3b200a20 20636f6e axRadius; . con │ │ │ │ + 0x00cc3a60 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x00cc3a70 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x00cc3a80 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x00cc3a90 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00cc3aa0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x00cc3ab0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00cc3ac0 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00cc3ad0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x00cc3ae0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00cc3af0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00cc3b00 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00cc3b10 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00cc3b20 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cc3b30 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00cc3b40 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cc3b50 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00cc3b60 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00cc3b70 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x00cc3b80 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cc3b90 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x00cc3ba0 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x00cc3bb0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ 0x00cc3bc0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cc3bd0 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x00cc3be0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x00cc3bf0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x00cc3c00 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x00cc3c10 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00cc3c20 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x00cc3c30 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x00cc3c40 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x00cc3c50 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00cc3c60 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00cc3c70 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cc3c80 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00cc3c90 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x00cc3ca0 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x00cc3cb0 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x00cc3cc0 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x00cc3cd0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00cc3ce0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x00cc3cf0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x00cc3d00 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00cc3d10 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x00cc3d20 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x00cc3d30 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00cc3d40 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x00cc3d50 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x00cc3d60 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00cc3d70 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00cc3d80 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x00cc3d90 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x00cc3da0 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x00cc3db0 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x00cc3dc0 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x00cc3dd0 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x00cc3de0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00cc3df0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x00cc3e00 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x00cc3e10 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x00cc3e20 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x00cc3e30 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x00cc3e40 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x00cc3e50 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x00cc3e60 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x00cc3e70 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x00cc3e80 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x00cc3e90 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x00cc3ea0 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x00cc3eb0 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x00cc3ec0 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x00cc3ed0 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x00cc3ee0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x00cc3ef0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x00cc3f00 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x00cc3f10 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x00cc3f20 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cc3f30 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x00cc3f40 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x00cc3f50 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00cc3f60 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x00cc3f70 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x00cc3f80 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x00cc3f90 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00cc3fa0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00cc3fb0 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x00cc3fc0 6e282920 0a20207b 200a2020 2020676c n() . { . gl │ │ │ │ - 0x00cc3fd0 5f506f73 6974696f 6e203d20 76656334 _Position = vec4 │ │ │ │ - 0x00cc3fe0 28615f70 6f736974 696f6e2c 20302c20 (a_position, 0, │ │ │ │ - 0x00cc3ff0 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ - 0x00cc4000 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ - 0x00cc4010 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cc4020 4e200a20 20202067 6c5f506f 73697469 N . gl_Positi │ │ │ │ - 0x00cc4030 6f6e2e79 203d202d 676c5f50 6f736974 on.y = -gl_Posit │ │ │ │ - 0x00cc4040 696f6e2e 793b200a 20202020 676c5f50 ion.y; . gl_P │ │ │ │ - 0x00cc4050 6f736974 696f6e2e 7a203d20 28676c5f osition.z = (gl_ │ │ │ │ - 0x00cc4060 506f7369 74696f6e 2e7a2020 2b20676c Position.z + gl │ │ │ │ - 0x00cc4070 5f506f73 6974696f 6e2e7729 202a2030 _Position.w) * 0 │ │ │ │ - 0x00cc4080 2e353b20 0a202023 656e6469 66200a20 .5; . #endif . │ │ │ │ - 0x00cc4090 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00cc40a0 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ - 0x00cc40b0 436f6f72 64733b20 0a20207d 200a0000 Coords; . } ... │ │ │ │ - 0x00cc40c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc40d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc40e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc40f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc4100 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc4110 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc4120 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc4130 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc4140 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc4150 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc4160 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc4170 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc4180 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc4190 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc41a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc41b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc41c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc41d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc41e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc41f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc4200 2023656e 64696620 0a202023 64656669 #endif . #defi │ │ │ │ - 0x00cc4210 6e652054 494c455f 4241434b 47524f55 ne TILE_BACKGROU │ │ │ │ - 0x00cc4220 4e445f4d 41585f43 4f554e54 20363420 ND_MAX_COUNT 64 │ │ │ │ - 0x00cc4230 0a20206f 75742076 65633320 765f7465 . out vec3 v_te │ │ │ │ - 0x00cc4240 78436f6f 7264733b 200a2020 756e6966 xCoords; . unif │ │ │ │ - 0x00cc4250 6f726d20 76656334 20755f74 696c6543 orm vec4 u_tileC │ │ │ │ - 0x00cc4260 6f6f7264 734d696e 4d61785b 54494c45 oordsMinMax[TILE │ │ │ │ - 0x00cc4270 5f424143 4b47524f 554e445f 4d41585f _BACKGROUND_MAX_ │ │ │ │ - 0x00cc4280 434f554e 545d3b20 0a202075 6e69666f COUNT]; . unifo │ │ │ │ - 0x00cc4290 726d2069 6e742075 5f746578 74757265 rm int u_texture │ │ │ │ - 0x00cc42a0 496e6465 785b5449 4c455f42 41434b47 Index[TILE_BACKG │ │ │ │ - 0x00cc42b0 524f554e 445f4d41 585f434f 554e545d ROUND_MAX_COUNT] │ │ │ │ - 0x00cc42c0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00cc42d0 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ - 0x00cc42e0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cc42f0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x00cc4300 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00cc4310 69766f74 5472616e 73666f72 6d3b200a ivotTransform; . │ │ │ │ - 0x00cc4320 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ - 0x00cc4330 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ - 0x00cc4340 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ - 0x00cc4350 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ - 0x00cc4360 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00cc4370 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00cc4380 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00cc4390 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ - 0x00cc43a0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00cc43b0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00cc43c0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ - 0x00cc43d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc43e0 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ - 0x00cc43f0 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ - 0x00cc4400 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ - 0x00cc4410 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ - 0x00cc4420 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ - 0x00cc4430 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ - 0x00cc4440 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00cc4450 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ - 0x00cc4460 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ - 0x00cc4470 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ - 0x00cc4480 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ - 0x00cc4490 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ - 0x00cc44a0 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ - 0x00cc44b0 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ - 0x00cc44c0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ - 0x00cc44d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc44e0 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ - 0x00cc44f0 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ - 0x00cc4500 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00cc4510 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ - 0x00cc4520 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ - 0x00cc4530 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ - 0x00cc4540 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ - 0x00cc4550 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x00cc4560 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x00cc4570 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x00cc4580 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ - 0x00cc4590 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ - 0x00cc45a0 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ - 0x00cc45b0 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ - 0x00cc45c0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00cc45d0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00cc45e0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00cc45f0 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ - 0x00cc4600 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ - 0x00cc4610 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ - 0x00cc4620 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ - 0x00cc4630 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ - 0x00cc4640 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ - 0x00cc4650 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x00cc4660 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ - 0x00cc4670 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ - 0x00cc4680 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc4690 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ - 0x00cc46a0 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ - 0x00cc46b0 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ - 0x00cc46c0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ - 0x00cc46d0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00cc46e0 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ - 0x00cc46f0 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ - 0x00cc4700 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ - 0x00cc4710 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ - 0x00cc4720 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ - 0x00cc4730 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00cc4740 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ - 0x00cc4750 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ - 0x00cc4760 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x00cc4770 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ - 0x00cc4780 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ - 0x00cc4790 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ - 0x00cc47a0 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ - 0x00cc47b0 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ - 0x00cc47c0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ - 0x00cc47d0 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ - 0x00cc47e0 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ - 0x00cc47f0 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ - 0x00cc4800 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ - 0x00cc4810 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ - 0x00cc4820 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ - 0x00cc4830 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ - 0x00cc4840 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00cc4850 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ - 0x00cc4860 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ - 0x00cc4870 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ - 0x00cc4880 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ - 0x00cc4890 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00cc48a0 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ - 0x00cc48b0 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ - 0x00cc48c0 20207665 63322071 75616456 65727465 vec2 quadVerte │ │ │ │ - 0x00cc48d0 78203d20 76656332 28676c5f 56657274 x = vec2(gl_Vert │ │ │ │ - 0x00cc48e0 65784944 20262031 2c202867 6c5f5665 exID & 1, (gl_Ve │ │ │ │ - 0x00cc48f0 72746578 4944203e 3e203129 20262031 rtexID >> 1) & 1 │ │ │ │ - 0x00cc4900 293b200a 2020200a 20202020 76656334 ); . . vec4 │ │ │ │ - 0x00cc4910 2074696c 65436f6f 7264734d 696e4d61 tileCoordsMinMa │ │ │ │ - 0x00cc4920 78203d20 755f7469 6c65436f 6f726473 x = u_tileCoords │ │ │ │ - 0x00cc4930 4d696e4d 61785b67 6c5f496e 7374616e MinMax[gl_Instan │ │ │ │ - 0x00cc4940 63654944 5d3b200a 20202020 76656332 ceID]; . vec2 │ │ │ │ - 0x00cc4950 20776f72 6c64506f 73203d20 6d697828 worldPos = mix( │ │ │ │ - 0x00cc4960 74696c65 436f6f72 64734d69 6e4d6178 tileCoordsMinMax │ │ │ │ - 0x00cc4970 2e78792c 2074696c 65436f6f 7264734d .xy, tileCoordsM │ │ │ │ - 0x00cc4980 696e4d61 782e7a77 2c207175 61645665 inMax.zw, quadVe │ │ │ │ - 0x00cc4990 72746578 293b200a 20202020 76656334 rtex); . vec4 │ │ │ │ - 0x00cc49a0 20706f73 203d2076 65633428 776f726c pos = vec4(worl │ │ │ │ - 0x00cc49b0 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ - 0x00cc49c0 2a20755f 6d6f6465 6c566965 77202a20 * u_modelView * │ │ │ │ - 0x00cc49d0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00cc49e0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00cc49f0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00cc4a00 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ - 0x00cc4a10 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ - 0x00cc4a20 3b200a20 20200a20 20202076 5f746578 ; . . v_tex │ │ │ │ - 0x00cc4a30 436f6f72 6473203d 20766563 33287175 Coords = vec3(qu │ │ │ │ - 0x00cc4a40 61645665 72746578 2c20666c 6f617428 adVertex, float( │ │ │ │ - 0x00cc4a50 755f7465 78747572 65496e64 65785b67 u_textureIndex[g │ │ │ │ - 0x00cc4a60 6c5f496e 7374616e 63654944 5d29293b l_InstanceID])); │ │ │ │ - 0x00cc4a70 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ - 0x00cc4a80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc4a90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc4aa0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc4ab0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc4ac0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc4ad0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc4ae0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc4af0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc4b00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc4b10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc4b20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc4b30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc4b40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc4b50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc4b60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc4b70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc4b80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc4b90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc4ba0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc4bb0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc4bc0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc4bd0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cc4be0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00cc4bf0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00cc4c00 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x00cc4c10 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x00cc4c20 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ - 0x00cc4c30 6f757420 76656332 20765f6d 61736b54 out vec2 v_maskT │ │ │ │ - 0x00cc4c40 6578436f 6f72643b 200a2020 6f757420 exCoord; . out │ │ │ │ - 0x00cc4c50 666c6f61 7420765f 68616c66 4c656e67 float v_halfLeng │ │ │ │ - 0x00cc4c60 74683b20 0a202075 6e69666f 726d206d th; . uniform m │ │ │ │ - 0x00cc4c70 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ - 0x00cc4c80 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00cc4c90 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00cc4ca0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cc4cb0 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ - 0x00cc4cc0 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00cc4cd0 20755f74 72616666 69635061 72616d73 u_trafficParams │ │ │ │ - 0x00cc4ce0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00cc4cf0 3420755f 6f75746c 696e6543 6f6c6f72 4 u_outlineColor │ │ │ │ - 0x00cc4d00 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00cc4d10 3420755f 6c696768 74417272 6f77436f 4 u_lightArrowCo │ │ │ │ - 0x00cc4d20 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x00cc4d30 76656334 20755f64 61726b41 72726f77 vec4 u_darkArrow │ │ │ │ - 0x00cc4d40 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ - 0x00cc4d50 6d20666c 6f617420 755f6f75 746c696e m float u_outlin │ │ │ │ - 0x00cc4d60 653b200a 2020756e 69666f72 6d20666c e; . uniform fl │ │ │ │ - 0x00cc4d70 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ - 0x00cc4d80 2020636f 6e737420 666c6f61 74206b41 const float kA │ │ │ │ - 0x00cc4d90 72726f77 5653697a 65203d20 302e3235 rrowVSize = 0.25 │ │ │ │ - 0x00cc4da0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00cc4db0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00cc4dc0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00cc4dd0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00cc4de0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00cc4df0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00cc4e00 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00cc4e10 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00cc4e20 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00cc4e30 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00cc4e40 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x00cc4e50 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x00cc4e60 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x00cc4e70 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00cc4e80 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x00cc4e90 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00cc4ea0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00cc4eb0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00cc4ec0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00cc4ed0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00cc4ee0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc4ef0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00cc4f00 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00cc4f10 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00cc4f20 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x00cc4f30 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x00cc4f40 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00cc4f50 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x00cc4f60 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x00cc4f70 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x00cc4f80 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00cc4f90 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x00cc4fa0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x00cc4fb0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x00cc4fc0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00cc4fd0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00cc4fe0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00cc4ff0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00cc5000 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00cc5010 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00cc5020 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x00cc5030 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x00cc5040 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x00cc5050 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00cc5060 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00cc5070 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x00cc5080 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x00cc5090 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x00cc50a0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x00cc50b0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x00cc50c0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x00cc50d0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x00cc50e0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x00cc50f0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00cc5100 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x00cc5110 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x00cc5120 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x00cc5130 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x00cc5140 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x00cc5150 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00cc5160 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x00cc5170 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x00cc5180 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x00cc5190 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x00cc51a0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x00cc51b0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x00cc51c0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x00cc51d0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x00cc51e0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x00cc51f0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x00cc5200 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x00cc5210 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x00cc5220 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x00cc5230 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x00cc5240 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x00cc5250 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x00cc5260 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x00cc5270 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x00cc5280 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x00cc5290 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x00cc52a0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x00cc52b0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x00cc52c0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x00cc52d0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00cc52e0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x00cc52f0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x00cc5300 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x00cc5310 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00cc5320 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x00cc5330 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x00cc5340 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ - 0x00cc5350 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ - 0x00cc5360 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x00cc5370 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x00cc5380 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x00cc5390 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x00cc53a0 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x00cc53b0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x00cc53c0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ - 0x00cc53d0 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x00cc53e0 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ - 0x00cc53f0 6e6f726d 616c202a 20755f74 72616666 normal * u_traff │ │ │ │ - 0x00cc5400 69635061 72616d73 2e783b20 0a202020 icParams.x; . │ │ │ │ - 0x00cc5410 20202069 66202861 5f6e6f72 6d616c2e if (a_normal. │ │ │ │ - 0x00cc5420 7a203c20 302e3029 200a2020 20202020 z < 0.0) . │ │ │ │ - 0x00cc5430 20206e6f 726d203d 206e6f72 6d616c20 norm = normal │ │ │ │ - 0x00cc5440 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ - 0x00cc5450 732e793b 200a2020 20202020 7472616e s.y; . tran │ │ │ │ - 0x00cc5460 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x00cc5470 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00cc5480 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ - 0x00cc5490 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x00cc54a0 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ - 0x00cc54b0 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ - 0x00cc54c0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc54d0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc54e0 20202020 20202020 20202020 20755f6d u_m │ │ │ │ - 0x00cc54f0 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ - 0x00cc5500 286e6f72 6d29293b 200a2020 20207d20 (norm)); . } │ │ │ │ - 0x00cc5510 0a202020 20666c6f 61742075 4f666673 . float uOffs │ │ │ │ - 0x00cc5520 6574203d 206c656e 67746828 76656334 et = length(vec4 │ │ │ │ - 0x00cc5530 286b5368 61706543 6f6f7264 5363616c (kShapeCoordScal │ │ │ │ - 0x00cc5540 61722c20 302c2030 2c203029 202a2075 ar, 0, 0, 0) * u │ │ │ │ - 0x00cc5550 5f6d6f64 656c5669 65772920 2a20615f _modelView) * a_ │ │ │ │ - 0x00cc5560 6e6f726d 616c2e77 3b200a20 20202076 normal.w; . v │ │ │ │ - 0x00cc5570 5f636f6c 6f725465 78436f6f 7264203d _colorTexCoord = │ │ │ │ - 0x00cc5580 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ - 0x00cc5590 2e78793b 200a2020 2020666c 6f617420 .xy; . float │ │ │ │ - 0x00cc55a0 76203d20 6d697828 615f636f 6c6f7254 v = mix(a_colorT │ │ │ │ - 0x00cc55b0 6578436f 6f72642e 7a2c2061 5f636f6c exCoord.z, a_col │ │ │ │ - 0x00cc55c0 6f725465 78436f6f 72642e7a 202b206b orTexCoord.z + k │ │ │ │ - 0x00cc55d0 4172726f 77565369 7a652c20 302e3520 ArrowVSize, 0.5 │ │ │ │ - 0x00cc55e0 2a20615f 6e6f726d 616c2e7a 202b2030 * a_normal.z + 0 │ │ │ │ - 0x00cc55f0 2e35293b 200a2020 2020765f 6d61736b .5); . v_mask │ │ │ │ - 0x00cc5600 54657843 6f6f7264 203d2076 65633228 TexCoord = vec2( │ │ │ │ - 0x00cc5610 754f6666 73657420 2a20755f 74726166 uOffset * u_traf │ │ │ │ - 0x00cc5620 66696350 6172616d 732e7a2c 20762920 ficParams.z, v) │ │ │ │ - 0x00cc5630 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ - 0x00cc5640 732e773b 200a2020 2020765f 6d61736b s.w; . v_mask │ │ │ │ - 0x00cc5650 54657843 6f6f7264 2e78202a 3d207374 TexCoord.x *= st │ │ │ │ - 0x00cc5660 65702861 5f636f6c 6f725465 78436f6f ep(a_colorTexCoo │ │ │ │ - 0x00cc5670 72642e77 2c20765f 6d61736b 54657843 rd.w, v_maskTexC │ │ │ │ - 0x00cc5680 6f6f7264 2e78293b 200a2020 2020765f oord.x); . v_ │ │ │ │ - 0x00cc5690 68616c66 4c656e67 7468203d 20615f6e halfLength = a_n │ │ │ │ - 0x00cc56a0 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ - 0x00cc56b0 63342070 6f73203d 20766563 34287472 c4 pos = vec4(tr │ │ │ │ - 0x00cc56c0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00cc56d0 2c20615f 706f7369 74696f6e 2e7a2c20 , a_position.z, │ │ │ │ - 0x00cc56e0 312e3029 202a2075 5f70726f 6a656374 1.0) * u_project │ │ │ │ - 0x00cc56f0 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ - 0x00cc5700 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ - 0x00cc5710 6f745472 616e7366 6f726d28 706f732c otTransform(pos, │ │ │ │ - 0x00cc5720 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ - 0x00cc5730 6d2c2030 2e30293b 200a2020 7d200a00 m, 0.0); . } .. │ │ │ │ - 0x00cc5740 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc5750 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc5760 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc5770 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc5780 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc5790 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc57a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc57b0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc57c0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc57d0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc57e0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc57f0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc5800 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc5810 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc5820 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc5830 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc5840 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc5850 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc5860 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc5870 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc5880 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc5890 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00cc58a0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00cc58b0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00cc58c0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x00cc58d0 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x00cc58e0 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ - 0x00cc58f0 6f757420 76656333 20765f72 61646975 out vec3 v_radiu │ │ │ │ - 0x00cc5900 733b200a 2020756e 69666f72 6d206d61 s; . uniform ma │ │ │ │ - 0x00cc5910 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x00cc5920 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00cc5930 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00cc5940 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00cc5950 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x00cc5960 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x00cc5970 755f7472 61666669 63506172 616d733b u_trafficParams; │ │ │ │ - 0x00cc5980 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00cc5990 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ - 0x00cc59a0 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00cc59b0 20755f6c 69676874 4172726f 77436f6c u_lightArrowCol │ │ │ │ - 0x00cc59c0 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ - 0x00cc59d0 65633420 755f6461 726b4172 726f7743 ec4 u_darkArrowC │ │ │ │ - 0x00cc59e0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x00cc59f0 20666c6f 61742075 5f6f7574 6c696e65 float u_outline │ │ │ │ - 0x00cc5a00 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00cc5a10 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ - 0x00cc5a20 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00cc5a30 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00cc5a40 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00cc5a50 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00cc5a60 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00cc5a70 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00cc5a80 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00cc5a90 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00cc5aa0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00cc5ab0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00cc5ac0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00cc5ad0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc5ae0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00cc5af0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00cc5b00 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00cc5b10 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00cc5b20 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00cc5b30 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00cc5b40 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cc5b50 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00cc5b60 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00cc5b70 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00cc5b80 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00cc5b90 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00cc5ba0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc5bb0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00cc5bc0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00cc5bd0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc5be0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00cc5bf0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00cc5c00 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00cc5c10 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00cc5c20 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00cc5c30 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00cc5c40 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00cc5c50 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00cc5c60 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00cc5c70 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00cc5c80 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x00cc5c90 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x00cc5ca0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00cc5cb0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00cc5cc0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00cc5cd0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00cc5ce0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cc5cf0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00cc5d00 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00cc5d10 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00cc5d20 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00cc5d30 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00cc5d40 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00cc5d50 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00cc5d60 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00cc5d70 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x00cc5d80 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc5d90 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x00cc5da0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x00cc5db0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00cc5dc0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00cc5dd0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cc5de0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00cc5df0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00cc5e00 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00cc5e10 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00cc5e20 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00cc5e30 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00cc5e40 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00cc5e50 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00cc5e60 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00cc5e70 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x00cc5e80 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x00cc5e90 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x00cc5ea0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x00cc5eb0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00cc5ec0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00cc5ed0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00cc5ee0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00cc5ef0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00cc5f00 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00cc5f10 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00cc5f20 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00cc5f30 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00cc5f40 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00cc5f50 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00cc5f60 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00cc5f70 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x00cc5f80 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x00cc5f90 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00cc5fa0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x00cc5fb0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00cc5fc0 20766563 32206e6f 726d616c 203d2061 vec2 normal = a │ │ │ │ - 0x00cc5fd0 5f6e6f72 6d616c2e 78793b20 0a202020 _normal.xy; . │ │ │ │ - 0x00cc5fe0 20766563 32207472 616e7366 6f726d65 vec2 transforme │ │ │ │ - 0x00cc5ff0 64417869 73506f73 203d2028 76656334 dAxisPos = (vec4 │ │ │ │ - 0x00cc6000 28615f70 6f736974 696f6e2e 78792c20 (a_position.xy, │ │ │ │ - 0x00cc6010 302e302c 20312e30 29202a20 755f6d6f 0.0, 1.0) * u_mo │ │ │ │ - 0x00cc6020 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00cc6030 2020696e 7420696e 64657820 3d20696e int index = in │ │ │ │ - 0x00cc6040 7428615f 706f7369 74696f6e 2e77293b t(a_position.w); │ │ │ │ - 0x00cc6050 200a2020 2020666c 6f617420 6c656674 . float left │ │ │ │ - 0x00cc6060 53697a65 203d2075 5f6c6967 68744172 Size = u_lightAr │ │ │ │ - 0x00cc6070 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ - 0x00cc6080 200a2020 2020666c 6f617420 72696768 . float righ │ │ │ │ - 0x00cc6090 7453697a 65203d20 755f6461 726b4172 tSize = u_darkAr │ │ │ │ - 0x00cc60a0 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ - 0x00cc60b0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x00cc60c0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ - 0x00cc60d0 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x00cc60e0 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ - 0x00cc60f0 6e6f726d 616c202a 20302e35 202a2028 normal * 0.5 * ( │ │ │ │ - 0x00cc6100 72696768 7453697a 65202d20 6c656674 rightSize - left │ │ │ │ - 0x00cc6110 53697a65 293b200a 20202020 20207472 Size); . tr │ │ │ │ - 0x00cc6120 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00cc6130 203d2063 616c634c 696e6554 72616e73 = calcLineTrans │ │ │ │ - 0x00cc6140 666f726d 65644178 6973506f 73287472 formedAxisPos(tr │ │ │ │ - 0x00cc6150 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00cc6160 2c20615f 706f7369 74696f6e 2e787920 , a_position.xy │ │ │ │ - 0x00cc6170 2b206e6f 726d2c20 0a202020 20202020 + norm, . │ │ │ │ - 0x00cc6180 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc6190 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc61a0 20202020 20202020 20202020 20202075 u │ │ │ │ - 0x00cc61b0 5f6d6f64 656c5669 65772c20 6c656e67 _modelView, leng │ │ │ │ - 0x00cc61c0 7468286e 6f726d29 293b200a 20202020 th(norm)); . │ │ │ │ - 0x00cc61d0 7d200a20 20202076 5f726164 69757320 } . v_radius │ │ │ │ - 0x00cc61e0 3d207665 63332861 5f6e6f72 6d616c2e = vec3(a_normal. │ │ │ │ - 0x00cc61f0 7a772c20 312e3029 202a2030 2e35202a zw, 1.0) * 0.5 * │ │ │ │ - 0x00cc6200 20286c65 66745369 7a65202b 20726967 (leftSize + rig │ │ │ │ - 0x00cc6210 68745369 7a65293b 200a2020 20207665 htSize); . ve │ │ │ │ - 0x00cc6220 63322066 696e616c 506f7320 3d207472 c2 finalPos = tr │ │ │ │ - 0x00cc6230 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00cc6240 202b2076 5f726164 6975732e 78793b20 + v_radius.xy; │ │ │ │ - 0x00cc6250 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ - 0x00cc6260 6f6f7264 203d2061 5f636f6c 6f725465 oord = a_colorTe │ │ │ │ - 0x00cc6270 78436f6f 72643b20 0a202020 20766563 xCoord; . vec │ │ │ │ - 0x00cc6280 3420706f 73203d20 76656334 2866696e 4 pos = vec4(fin │ │ │ │ - 0x00cc6290 616c506f 732c2061 5f706f73 6974696f alPos, a_positio │ │ │ │ - 0x00cc62a0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ - 0x00cc62b0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ - 0x00cc62c0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x00cc62d0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00cc62e0 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ - 0x00cc62f0 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x00cc6300 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ - 0x00cc6310 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc6320 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc6330 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc6340 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc6350 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc6360 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc6370 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc6380 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc6390 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc63a0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc63b0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc63c0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc63d0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc63e0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc63f0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc6400 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc6410 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc6420 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc6430 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc6440 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc6450 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc6460 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cc6470 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00cc6480 72546578 436f6f72 643b200a 20206f75 rTexCoord; . ou │ │ │ │ - 0x00cc6490 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ - 0x00cc64a0 78436f6f 72643b20 0a202075 6e69666f xCoord; . unifo │ │ │ │ - 0x00cc64b0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00cc64c0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00cc64d0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00cc64e0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00cc64f0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00cc6500 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00cc6510 76656334 20755f74 72616666 69635061 vec4 u_trafficPa │ │ │ │ - 0x00cc6520 72616d73 3b200a20 20756e69 666f726d rams; . uniform │ │ │ │ - 0x00cc6530 20766563 3420755f 6f75746c 696e6543 vec4 u_outlineC │ │ │ │ - 0x00cc6540 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x00cc6550 20766563 3420755f 6c696768 74417272 vec4 u_lightArr │ │ │ │ - 0x00cc6560 6f77436f 6c6f723b 200a2020 756e6966 owColor; . unif │ │ │ │ - 0x00cc6570 6f726d20 76656334 20755f64 61726b41 orm vec4 u_darkA │ │ │ │ - 0x00cc6580 72726f77 436f6c6f 723b200a 2020756e rrowColor; . un │ │ │ │ - 0x00cc6590 69666f72 6d20666c 6f617420 755f6f75 iform float u_ou │ │ │ │ - 0x00cc65a0 746c696e 653b200a 2020756e 69666f72 tline; . unifor │ │ │ │ - 0x00cc65b0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00cc65c0 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ - 0x00cc65d0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00cc65e0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00cc65f0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00cc6600 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00cc6610 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00cc6620 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00cc6630 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00cc6640 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00cc6650 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00cc6660 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00cc6670 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00cc6680 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00cc6690 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00cc66a0 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00cc66b0 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00cc66c0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00cc66d0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00cc66e0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00cc66f0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00cc6700 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc6710 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00cc6720 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00cc6730 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc6740 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00cc6750 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00cc6760 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00cc6770 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00cc6780 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00cc6790 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00cc67a0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00cc67b0 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00cc67c0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00cc67d0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00cc67e0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00cc67f0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00cc6800 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00cc6810 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00cc6820 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00cc6830 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00cc6840 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00cc6850 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00cc6860 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00cc6870 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00cc6880 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00cc6890 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00cc68a0 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00cc68b0 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00cc68c0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00cc68d0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00cc68e0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00cc68f0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00cc6900 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00cc6910 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00cc6920 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00cc6930 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00cc6940 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00cc6950 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00cc6960 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00cc6970 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00cc6980 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00cc6990 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00cc69a0 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00cc69b0 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00cc69c0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00cc69d0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00cc69e0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00cc69f0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00cc6a00 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00cc6a10 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00cc6a20 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00cc6a30 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00cc6a40 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00cc6a50 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00cc6a60 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00cc6a70 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00cc6a80 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00cc6a90 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00cc6aa0 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00cc6ab0 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00cc6ac0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00cc6ad0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x00cc6ae0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x00cc6af0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00cc6b00 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00cc6b10 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00cc6b20 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00cc6b30 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00cc6b40 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00cc6b50 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00cc6b60 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ - 0x00cc6b70 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ - 0x00cc6b80 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ - 0x00cc6b90 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ - 0x00cc6ba0 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ - 0x00cc6bb0 3b200a20 20202076 65633420 706f7320 ; . vec4 pos │ │ │ │ - 0x00cc6bc0 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x00cc6bd0 65644178 6973506f 732c2061 5f706f73 edAxisPos, a_pos │ │ │ │ - 0x00cc6be0 6974696f 6e2e7a2c 20312e30 29202a20 ition.z, 1.0) * │ │ │ │ - 0x00cc6bf0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00cc6c00 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00cc6c10 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ - 0x00cc6c20 6f6f7264 3b200a20 20202067 6c5f506f oord; . gl_Po │ │ │ │ - 0x00cc6c30 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ - 0x00cc6c40 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ - 0x00cc6c50 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ - 0x00cc6c60 726d2c20 302e3029 3b200a20 207d200a rm, 0.0); . } . │ │ │ │ - 0x00cc6c70 00000000 00000000 00000000 00000000 ................ │ │ │ │ - 0x00cc6c80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc6c90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc6ca0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc6cb0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc6cc0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc6cd0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc6ce0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc6cf0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc6d00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc6d10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc6d20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc6d30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc6d40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc6d50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc6d60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc6d70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc6d80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc6d90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc6da0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc6db0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc6dc0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc6dd0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cc6de0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00cc6df0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00cc6e00 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00cc6e10 65633420 765f636f 6c6f723b 200a2020 ec4 v_color; . │ │ │ │ - 0x00cc6e20 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ - 0x00cc6e30 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ - 0x00cc6e40 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ - 0x00cc6e50 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ - 0x00cc6e60 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ - 0x00cc6e70 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x00cc6e80 666f726d 20766563 3420755f 70617261 form vec4 u_para │ │ │ │ - 0x00cc6e90 6d733b20 0a202075 6e69666f 726d2066 ms; . uniform f │ │ │ │ - 0x00cc6ea0 6c6f6174 20755f6c 696e6548 616c6657 loat u_lineHalfW │ │ │ │ - 0x00cc6eb0 69647468 3b200a20 20756e69 666f726d idth; . uniform │ │ │ │ - 0x00cc6ec0 20666c6f 61742075 5f6d6178 52616469 float u_maxRadi │ │ │ │ - 0x00cc6ed0 75733b20 0a202063 6f6e7374 20666c6f us; . const flo │ │ │ │ - 0x00cc6ee0 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ - 0x00cc6ef0 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ - 0x00cc6f00 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ - 0x00cc6f10 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x00cc6f20 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x00cc6f30 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x00cc6f40 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ - 0x00cc6f50 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ - 0x00cc6f60 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00cc6f70 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ - 0x00cc6f80 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ - 0x00cc6f90 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ - 0x00cc6fa0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc6fb0 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ - 0x00cc6fc0 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ - 0x00cc6fd0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00cc6fe0 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ - 0x00cc6ff0 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ - 0x00cc7000 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ - 0x00cc7010 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00cc7020 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ - 0x00cc7030 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00cc7040 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc7050 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ - 0x00cc7060 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ - 0x00cc7070 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc7080 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ - 0x00cc7090 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ - 0x00cc70a0 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ - 0x00cc70b0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x00cc70c0 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ - 0x00cc70d0 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ - 0x00cc70e0 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ - 0x00cc70f0 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ - 0x00cc7100 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00cc7110 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00cc7120 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00cc7130 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ - 0x00cc7140 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ - 0x00cc7150 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ - 0x00cc7160 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ - 0x00cc7170 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ - 0x00cc7180 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ - 0x00cc7190 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x00cc71a0 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ - 0x00cc71b0 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ - 0x00cc71c0 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ - 0x00cc71d0 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ - 0x00cc71e0 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ - 0x00cc71f0 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ - 0x00cc7200 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ - 0x00cc7210 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ - 0x00cc7220 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc7230 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ - 0x00cc7240 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ - 0x00cc7250 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ - 0x00cc7260 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ - 0x00cc7270 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ - 0x00cc7280 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ - 0x00cc7290 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ - 0x00cc72a0 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ - 0x00cc72b0 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ - 0x00cc72c0 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ - 0x00cc72d0 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ - 0x00cc72e0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00cc72f0 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ - 0x00cc7300 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ - 0x00cc7310 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ - 0x00cc7320 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ - 0x00cc7330 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ - 0x00cc7340 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ - 0x00cc7350 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ - 0x00cc7360 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ - 0x00cc7370 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ - 0x00cc7380 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ - 0x00cc7390 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ - 0x00cc73a0 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ - 0x00cc73b0 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ - 0x00cc73c0 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ - 0x00cc73d0 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ - 0x00cc73e0 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ - 0x00cc73f0 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ - 0x00cc7400 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00cc7410 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ - 0x00cc7420 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ - 0x00cc7430 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ - 0x00cc7440 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00cc7450 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ - 0x00cc7460 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ - 0x00cc7470 7b200a20 20202076 65633220 6e6f726d { . vec2 norm │ │ │ │ - 0x00cc7480 616c203d 20615f6e 6f726d61 6c2e7879 al = a_normal.xy │ │ │ │ - 0x00cc7490 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ - 0x00cc74a0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x00cc74b0 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ - 0x00cc74c0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ - 0x00cc74d0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ - 0x00cc74e0 793b200a 20202020 69662028 646f7428 y; . if (dot( │ │ │ │ - 0x00cc74f0 6e6f726d 616c2c20 6e6f726d 616c2920 normal, normal) │ │ │ │ - 0x00cc7500 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ - 0x00cc7510 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ - 0x00cc7520 3d206e6f 726d616c 202a2075 5f6c696e = normal * u_lin │ │ │ │ - 0x00cc7530 6548616c 66576964 74683b20 0a202020 eHalfWidth; . │ │ │ │ - 0x00cc7540 20202074 72616e73 666f726d 65644178 transformedAx │ │ │ │ - 0x00cc7550 6973506f 73203d20 63616c63 4c696e65 isPos = calcLine │ │ │ │ - 0x00cc7560 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x00cc7570 6f732874 72616e73 666f726d 65644178 os(transformedAx │ │ │ │ - 0x00cc7580 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ - 0x00cc7590 6e2e7879 202b206e 6f726d2c 200a2020 n.xy + norm, . │ │ │ │ - 0x00cc75a0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc75b0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc75c0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc75d0 20202020 755f6d6f 64656c56 6965772c u_modelView, │ │ │ │ - 0x00cc75e0 206c656e 67746828 6e6f726d 29293b20 length(norm)); │ │ │ │ - 0x00cc75f0 0a202020 207d200a 20202020 765f636f . } . v_co │ │ │ │ - 0x00cc7600 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ - 0x00cc7610 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x00cc7620 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ - 0x00cc7630 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x00cc7640 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ - 0x00cc7650 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ - 0x00cc7660 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ - 0x00cc7670 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00cc7680 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ - 0x00cc7690 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ - 0x00cc76a0 20207d20 0a000000 00000000 00000000 } ............ │ │ │ │ - 0x00cc76b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc76c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc76d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc76e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc76f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc7700 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc7710 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc7720 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc7730 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc7740 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc7750 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc7760 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc7770 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc7780 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc7790 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc77a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc77b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc77c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc77d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc77e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc77f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc7800 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cc7810 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00cc7820 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00cc7830 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00cc7840 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ - 0x00cc7850 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ - 0x00cc7860 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ - 0x00cc7870 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x00cc7880 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00cc7890 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00cc78a0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00cc78b0 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x00cc78c0 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x00cc78d0 755f7061 72616d73 3b200a20 20756e69 u_params; . uni │ │ │ │ - 0x00cc78e0 666f726d 20666c6f 61742075 5f6c696e form float u_lin │ │ │ │ - 0x00cc78f0 6548616c 66576964 74683b20 0a202075 eHalfWidth; . u │ │ │ │ - 0x00cc7900 6e69666f 726d2066 6c6f6174 20755f6d niform float u_m │ │ │ │ - 0x00cc7910 61785261 64697573 3b200a20 20636f6e axRadius; . con │ │ │ │ - 0x00cc7920 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00cc7930 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00cc7940 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00cc7950 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00cc7960 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00cc7970 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00cc7980 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00cc7990 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x00cc79a0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00cc79b0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x00cc79c0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x00cc79d0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x00cc79e0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cc79f0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00cc7a00 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cc7a10 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cc7a20 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00cc7a30 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00cc7a40 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00cc7a50 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00cc7a60 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00cc7a70 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00cc7a80 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cc7a90 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x00cc7aa0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x00cc7ab0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00cc7ac0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x00cc7ad0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x00cc7ae0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc7af0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00cc7b00 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cc7b10 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00cc7b20 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00cc7b30 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00cc7b40 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00cc7b50 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00cc7b60 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00cc7b70 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00cc7b80 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x00cc7b90 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x00cc7ba0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x00cc7bb0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x00cc7bc0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00cc7bd0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x00cc7be0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x00cc7bf0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00cc7c00 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x00cc7c10 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x00cc7c20 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00cc7c30 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x00cc7c40 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00cc7c50 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x00cc7c60 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00cc7c70 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x00cc7c80 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x00cc7c90 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x00cc7ca0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x00cc7cb0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x00cc7cc0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x00cc7cd0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00cc7ce0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x00cc7cf0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x00cc7d00 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x00cc7d10 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x00cc7d20 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x00cc7d30 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00cc7d40 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x00cc7d50 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x00cc7d60 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00cc7d70 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x00cc7d80 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x00cc7d90 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x00cc7da0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x00cc7db0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x00cc7dc0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x00cc7dd0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x00cc7de0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x00cc7df0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x00cc7e00 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x00cc7e10 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00cc7e20 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x00cc7e30 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x00cc7e40 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00cc7e50 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x00cc7e60 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x00cc7e70 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x00cc7e80 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00cc7e90 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cc7ea0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x00cc7eb0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ - 0x00cc7ec0 32206e6f 726d616c 203d2061 5f6e6f72 2 normal = a_nor │ │ │ │ - 0x00cc7ed0 6d616c2e 78793b20 0a202020 20766563 mal.xy; . vec │ │ │ │ - 0x00cc7ee0 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ - 0x00cc7ef0 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ - 0x00cc7f00 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ - 0x00cc7f10 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ - 0x00cc7f20 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ - 0x00cc7f30 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ - 0x00cc7f40 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ - 0x00cc7f50 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ - 0x00cc7f60 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ - 0x00cc7f70 20755f6c 696e6548 616c6657 69647468 u_lineHalfWidth │ │ │ │ - 0x00cc7f80 3b200a20 20202020 20747261 6e73666f ; . transfo │ │ │ │ - 0x00cc7f90 726d6564 41786973 506f7320 3d206361 rmedAxisPos = ca │ │ │ │ - 0x00cc7fa0 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ - 0x00cc7fb0 64417869 73506f73 28747261 6e73666f dAxisPos(transfo │ │ │ │ - 0x00cc7fc0 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ - 0x00cc7fd0 6f736974 696f6e2e 7879202b 206e6f72 osition.xy + nor │ │ │ │ - 0x00cc7fe0 6d2c200a 20202020 20202020 20202020 m, . │ │ │ │ - 0x00cc7ff0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc8000 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc8010 20202020 20202020 2020755f 6d6f6465 u_mode │ │ │ │ - 0x00cc8020 6c566965 772c206c 656e6774 68286e6f lView, length(no │ │ │ │ - 0x00cc8030 726d2929 3b200a20 2020207d 200a2020 rm)); . } . │ │ │ │ - 0x00cc8040 20207472 616e7366 6f726d65 64417869 transformedAxi │ │ │ │ - 0x00cc8050 73506f73 202b3d20 615f6e6f 726d616c sPos += a_normal │ │ │ │ - 0x00cc8060 2e7a7720 2a20755f 6c696e65 48616c66 .zw * u_lineHalf │ │ │ │ - 0x00cc8070 57696474 683b200a 20202020 76656334 Width; . vec4 │ │ │ │ - 0x00cc8080 20706f73 203d2076 65633428 7472616e pos = vec4(tran │ │ │ │ - 0x00cc8090 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x00cc80a0 615f706f 73697469 6f6e2e7a 2c20312e a_position.z, 1. │ │ │ │ - 0x00cc80b0 3029202a 20755f70 726f6a65 6374696f 0) * u_projectio │ │ │ │ - 0x00cc80c0 6e3b200a 20202020 676c5f50 6f736974 n; . gl_Posit │ │ │ │ - 0x00cc80d0 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ - 0x00cc80e0 5472616e 73666f72 6d28706f 732c2075 Transform(pos, u │ │ │ │ - 0x00cc80f0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ - 0x00cc8100 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ - 0x00cc8110 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ - 0x00cc8120 20202020 765f7261 64697573 203d2076 v_radius = v │ │ │ │ - 0x00cc8130 65633328 615f6e6f 726d616c 2e7a772c ec3(a_normal.zw, │ │ │ │ - 0x00cc8140 20755f6d 61785261 64697573 29202a20 u_maxRadius) * │ │ │ │ - 0x00cc8150 755f6c69 6e654861 6c665769 6474683b u_lineHalfWidth; │ │ │ │ - 0x00cc8160 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ - 0x00cc8170 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc8180 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc8190 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc81a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc81b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc81c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc81d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc81e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc81f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc8200 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc8210 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc8220 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc8230 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc8240 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc8250 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc8260 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc8270 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc8280 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc8290 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc82a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc82b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc82c0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cc82d0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00cc82e0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00cc82f0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00cc8300 65633420 765f6f66 66736574 733b200a ec4 v_offsets; . │ │ │ │ - 0x00cc8310 20206f75 74207665 63342076 5f636f6c out vec4 v_col │ │ │ │ - 0x00cc8320 6f723b20 0a202075 6e69666f 726d206d or; . uniform m │ │ │ │ - 0x00cc8330 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ - 0x00cc8340 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00cc8350 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00cc8360 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cc8370 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ - 0x00cc8380 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00cc8390 20755f70 6172616d 733b200a 2020756e u_params; . un │ │ │ │ - 0x00cc83a0 69666f72 6d20666c 6f617420 755f6c69 iform float u_li │ │ │ │ - 0x00cc83b0 6e654861 6c665769 6474683b 200a2020 neHalfWidth; . │ │ │ │ - 0x00cc83c0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cc83d0 6d617852 61646975 733b200a 2020636f maxRadius; . co │ │ │ │ - 0x00cc83e0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x00cc83f0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x00cc8400 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x00cc8410 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00cc8420 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00cc8430 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00cc8440 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00cc8450 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x00cc8460 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00cc8470 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x00cc8480 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x00cc8490 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x00cc84a0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cc84b0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x00cc84c0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00cc84d0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00cc84e0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x00cc84f0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x00cc8500 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc8510 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x00cc8520 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x00cc8530 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00cc8540 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x00cc8550 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x00cc8560 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x00cc8570 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00cc8580 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x00cc8590 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x00cc85a0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x00cc85b0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x00cc85c0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00cc85d0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x00cc85e0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x00cc85f0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x00cc8600 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00cc8610 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00cc8620 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cc8630 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00cc8640 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x00cc8650 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x00cc8660 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x00cc8670 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x00cc8680 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00cc8690 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x00cc86a0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x00cc86b0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00cc86c0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x00cc86d0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x00cc86e0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00cc86f0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x00cc8700 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x00cc8710 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00cc8720 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00cc8730 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x00cc8740 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x00cc8750 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x00cc8760 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x00cc8770 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x00cc8780 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x00cc8790 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00cc87a0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x00cc87b0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x00cc87c0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x00cc87d0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x00cc87e0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x00cc87f0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x00cc8800 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x00cc8810 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x00cc8820 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x00cc8830 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x00cc8840 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x00cc8850 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x00cc8860 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x00cc8870 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x00cc8880 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x00cc8890 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x00cc88a0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x00cc88b0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x00cc88c0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x00cc88d0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00cc88e0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x00cc88f0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x00cc8900 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00cc8910 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x00cc8920 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x00cc8930 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x00cc8940 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00cc8950 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00cc8960 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x00cc8970 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ - 0x00cc8980 63342070 6f73203d 20766563 3428615f c4 pos = vec4(a_ │ │ │ │ - 0x00cc8990 706f7369 74696f6e 2e78792c 20302c20 position.xy, 0, │ │ │ │ - 0x00cc89a0 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ - 0x00cc89b0 3b200a20 20202076 65633220 6e6f726d ; . vec2 norm │ │ │ │ - 0x00cc89c0 616c203d 20766563 3228615f 6e6f726d al = vec2(a_norm │ │ │ │ - 0x00cc89d0 616c2e78 202a2075 5f706172 616d732e al.x * u_params. │ │ │ │ - 0x00cc89e0 78202d20 615f6e6f 726d616c 2e79202a x - a_normal.y * │ │ │ │ - 0x00cc89f0 20755f70 6172616d 732e792c 200a2020 u_params.y, . │ │ │ │ - 0x00cc8a00 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00cc8a10 20202020 20615f6e 6f726d61 6c2e7820 a_normal.x │ │ │ │ - 0x00cc8a20 2a20755f 70617261 6d732e79 202b2061 * u_params.y + a │ │ │ │ - 0x00cc8a30 5f6e6f72 6d616c2e 79202a20 755f7061 _normal.y * u_pa │ │ │ │ - 0x00cc8a40 72616d73 2e78293b 200a2020 20207665 rams.x); . ve │ │ │ │ - 0x00cc8a50 63322073 68696674 6564506f 73203d20 c2 shiftedPos = │ │ │ │ - 0x00cc8a60 6e6f726d 616c202a 20755f70 6172616d normal * u_param │ │ │ │ - 0x00cc8a70 732e7a20 2b20706f 732e7879 3b200a20 s.z + pos.xy; . │ │ │ │ - 0x00cc8a80 20202070 6f73203d 20766563 34287368 pos = vec4(sh │ │ │ │ - 0x00cc8a90 69667465 64506f73 2c20615f 706f7369 iftedPos, a_posi │ │ │ │ - 0x00cc8aa0 74696f6e 2e7a2c20 312e3029 202a2075 tion.z, 1.0) * u │ │ │ │ - 0x00cc8ab0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x00cc8ac0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00cc8ad0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x00cc8ae0 6f726d28 706f732c 20755f70 69766f74 orm(pos, u_pivot │ │ │ │ - 0x00cc8af0 5472616e 73666f72 6d2c2030 2e30293b Transform, 0.0); │ │ │ │ - 0x00cc8b00 200a2020 20207665 6332206f 66667365 . vec2 offse │ │ │ │ - 0x00cc8b10 7473203d 20616273 28615f6e 6f726d61 ts = abs(a_norma │ │ │ │ - 0x00cc8b20 6c2e7a77 293b200a 20202020 765f6f66 l.zw); . v_of │ │ │ │ - 0x00cc8b30 66736574 73203d20 76656334 28615f6e fsets = vec4(a_n │ │ │ │ - 0x00cc8b40 6f726d61 6c2e7a77 2c206f66 66736574 ormal.zw, offset │ │ │ │ - 0x00cc8b50 73202d20 312e3029 3b200a20 20202076 s - 1.0); . v │ │ │ │ - 0x00cc8b60 5f636f6c 6f72203d 20615f63 6f6c6f72 _color = a_color │ │ │ │ - 0x00cc8b70 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x00cc8b80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc8b90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc8ba0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc8bb0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc8bc0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc8bd0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc8be0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc8bf0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc8c00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc8c10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc8c20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc8c30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc8c40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc8c50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc8c60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc8c70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc8c80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc8c90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc8ca0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc8cb0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc8cc0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc8cd0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cc8ce0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00cc8cf0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ - 0x00cc8d00 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ - 0x00cc8d10 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x00cc8d20 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x00cc8d30 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ - 0x00cc8d40 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ - 0x00cc8d50 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ - 0x00cc8d60 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cc8d70 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00cc8d80 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00cc8d90 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00cc8da0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00cc8db0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00cc8dc0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00cc8dd0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00cc8de0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cc8df0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00cc8e00 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00cc8e10 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00cc8e20 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00cc8e30 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00cc8e40 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00cc8e50 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00cc8e60 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00cc8e70 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00cc8e80 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00cc8e90 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00cc8ea0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00cc8eb0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cc8ec0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00cc8ed0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00cc8ee0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc8ef0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00cc8f00 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00cc8f10 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00cc8f20 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc8f30 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00cc8f40 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cc8f50 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cc8f60 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00cc8f70 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00cc8f80 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc8f90 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00cc8fa0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00cc8fb0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cc8fc0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cc8fd0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00cc8fe0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00cc8ff0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc9000 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00cc9010 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00cc9020 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc9030 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cc9040 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cc9050 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc9060 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00cc9070 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00cc9080 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00cc9090 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00cc90a0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00cc90b0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00cc90c0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00cc90d0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00cc90e0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00cc90f0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00cc9100 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00cc9110 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00cc9120 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00cc9130 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00cc9140 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00cc9150 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00cc9160 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cc9170 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00cc9180 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00cc9190 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00cc91a0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cc91b0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00cc91c0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00cc91d0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00cc91e0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00cc91f0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00cc9200 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00cc9210 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00cc9220 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00cc9230 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00cc9240 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00cc9250 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00cc9260 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00cc9270 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cc9280 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00cc9290 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00cc92a0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00cc92b0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00cc92c0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00cc92d0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00cc92e0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00cc92f0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00cc9300 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00cc9310 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00cc9320 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00cc9330 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00cc9340 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00cc9350 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cc9360 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00cc9370 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00cc9380 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00cc9390 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00cc93a0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00cc93b0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00cc93c0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00cc93d0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cc93e0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00cc93f0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x00cc9400 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ - 0x00cc9410 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ - 0x00cc9420 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ - 0x00cc9430 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ - 0x00cc9440 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ - 0x00cc9450 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ - 0x00cc9460 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ - 0x00cc9470 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ - 0x00cc9480 203d2076 65633428 615f706f 73697469 = vec4(a_positi │ │ │ │ - 0x00cc9490 6f6e2c20 312e3029 202a2075 5f6d6f64 on, 1.0) * u_mod │ │ │ │ - 0x00cc94a0 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ - 0x00cc94b0 3420706f 73203d20 76656334 286e6f72 4 pos = vec4(nor │ │ │ │ - 0x00cc94c0 6d616c2c 20302e30 2c20302e 3029202b mal, 0.0, 0.0) + │ │ │ │ - 0x00cc94d0 20703b20 0a202020 20766563 34207072 p; . vec4 pr │ │ │ │ - 0x00cc94e0 6f6a6563 74656450 69766f74 203d2070 ojectedPivot = p │ │ │ │ - 0x00cc94f0 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ - 0x00cc9500 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00cc9510 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x00cc9520 616e7366 6f726d28 706f7320 2a20755f ansform(pos * u_ │ │ │ │ - 0x00cc9530 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x00cc9540 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x00cc9550 30293b20 0a202020 20666c6f 6174206e 0); . float n │ │ │ │ - 0x00cc9560 65775a20 3d207072 6f6a6563 74656450 ewZ = projectedP │ │ │ │ - 0x00cc9570 69766f74 2e79202f 2070726f 6a656374 ivot.y / project │ │ │ │ - 0x00cc9580 65645069 766f742e 77202a20 302e3520 edPivot.w * 0.5 │ │ │ │ - 0x00cc9590 2b20302e 353b200a 20202020 676c5f50 + 0.5; . gl_P │ │ │ │ - 0x00cc95a0 6f736974 696f6e2e 7a203d20 61627328 osition.z = abs( │ │ │ │ - 0x00cc95b0 615f6e6f 726d616c 416e6441 6e696d61 a_normalAndAnima │ │ │ │ - 0x00cc95c0 74654f72 5a2e7a29 202a206e 65775a20 teOrZ.z) * newZ │ │ │ │ - 0x00cc95d0 2b202831 2e30202d 20616273 28615f6e + (1.0 - abs(a_n │ │ │ │ - 0x00cc95e0 6f726d61 6c416e64 416e696d 6174654f ormalAndAnimateO │ │ │ │ - 0x00cc95f0 725a2e7a 2929202a 20676c5f 506f7369 rZ.z)) * gl_Posi │ │ │ │ - 0x00cc9600 74696f6e 2e7a3b20 0a202020 20765f74 tion.z; . v_t │ │ │ │ - 0x00cc9610 6578436f 6f726473 203d2061 5f746578 exCoords = a_tex │ │ │ │ - 0x00cc9620 436f6f72 64733b20 0a202020 20765f6d Coords; . v_m │ │ │ │ - 0x00cc9630 61736b43 6f6c6f72 203d2061 5f636f6c askColor = a_col │ │ │ │ - 0x00cc9640 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ - 0x00cc9650 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00cc9660 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00cc9670 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00cc9680 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00cc9690 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00cc96a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00cc96b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00cc96c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00cc96d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00cc96e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00cc96f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00cc9700 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00cc9710 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00cc9720 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00cc9730 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00cc9740 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00cc9750 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00cc9760 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00cc9770 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00cc9780 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00cc9790 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00cc97a0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00cc97b0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00cc97c0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ - 0x00cc97d0 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ - 0x00cc97e0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x00cc97f0 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x00cc9800 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ - 0x00cc9810 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ - 0x00cc9820 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ - 0x00cc9830 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00cc9840 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00cc9850 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00cc9860 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00cc9870 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00cc9880 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00cc9890 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00cc98a0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00cc98b0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00cc98c0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00cc98d0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00cc98e0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00cc98f0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00cc9900 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00cc9910 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00cc9920 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00cc9930 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00cc9940 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00cc9950 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00cc9960 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00cc9970 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00cc9980 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00cc9990 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00cc99a0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00cc99b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00cc99c0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00cc99d0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00cc99e0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00cc99f0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc9a00 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00cc9a10 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00cc9a20 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00cc9a30 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00cc9a40 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00cc9a50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc9a60 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00cc9a70 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00cc9a80 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00cc9a90 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00cc9aa0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00cc9ab0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00cc9ac0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00cc9ad0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00cc9ae0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00cc9af0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00cc9b00 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00cc9b10 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00cc9b20 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00cc9b30 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00cc9b40 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00cc9b50 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00cc9b60 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00cc9b70 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00cc9b80 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00cc9b90 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00cc9ba0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00cc9bb0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00cc9bc0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00cc9bd0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00cc9be0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00cc9bf0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00cc9c00 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00cc9c10 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00cc9c20 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00cc9c30 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00cc9c40 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00cc9c50 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00cc9c60 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00cc9c70 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00cc9c80 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00cc9c90 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00cc9ca0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00cc9cb0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00cc9cc0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00cc9cd0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00cc9ce0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00cc9cf0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00cc9d00 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00cc9d10 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00cc9d20 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00cc9d30 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00cc9d40 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00cc9d50 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00cc9d60 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00cc9d70 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00cc9d80 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00cc9d90 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00cc9da0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00cc9db0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00cc9dc0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00cc9dd0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00cc9de0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00cc9df0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00cc9e00 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00cc9e10 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00cc9e20 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00cc9e30 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00cc9e40 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00cc9e50 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00cc9e60 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00cc9e70 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00cc9e80 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00cc9e90 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00cc9ea0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00cc9eb0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00cc9ec0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x00cc9ed0 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ - 0x00cc9ee0 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ - 0x00cc9ef0 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ - 0x00cc9f00 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ - 0x00cc9f10 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ - 0x00cc9f20 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ - 0x00cc9f30 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ - 0x00cc9f40 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ - 0x00cc9f50 69766f74 203d2076 65633428 615f706f ivot = vec4(a_po │ │ │ │ - 0x00cc9f60 73697469 6f6e2c20 312e3029 202a2075 sition, 1.0) * u │ │ │ │ - 0x00cc9f70 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ - 0x00cc9f80 20766563 34206f66 66736574 203d2076 vec4 offset = v │ │ │ │ - 0x00cc9f90 65633428 6e6f726d 616c2c20 302e302c ec4(normal, 0.0, │ │ │ │ - 0x00cc9fa0 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ - 0x00cc9fb0 74696f6e 3b200a20 20202076 65633420 tion; . vec4 │ │ │ │ - 0x00cc9fc0 70726f6a 65637465 64506976 6f74203d projectedPivot = │ │ │ │ - 0x00cc9fd0 20706976 6f74202a 20755f70 726f6a65 pivot * u_proje │ │ │ │ - 0x00cc9fe0 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ - 0x00cc9ff0 6f736974 696f6e20 3d206170 706c7942 osition = applyB │ │ │ │ - 0x00cca000 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00cca010 6e73666f 726d2870 726f6a65 63746564 nsform(projected │ │ │ │ - 0x00cca020 5069766f 742c2075 5f706976 6f745472 Pivot, u_pivotTr │ │ │ │ - 0x00cca030 616e7366 6f726d2c 20302e30 2c206f66 ansform, 0.0, of │ │ │ │ - 0x00cca040 66736574 2e787929 3b200a20 20202066 fset.xy); . f │ │ │ │ - 0x00cca050 6c6f6174 206e6577 5a203d20 70726f6a loat newZ = proj │ │ │ │ - 0x00cca060 65637465 64506976 6f742e79 202f2070 ectedPivot.y / p │ │ │ │ - 0x00cca070 726f6a65 63746564 5069766f 742e7720 rojectedPivot.w │ │ │ │ - 0x00cca080 2a20302e 35202b20 302e353b 200a2020 * 0.5 + 0.5; . │ │ │ │ - 0x00cca090 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x00cca0a0 3d206162 7328615f 6e6f726d 616c416e = abs(a_normalAn │ │ │ │ - 0x00cca0b0 64416e69 6d617465 4f725a2e 7a29202a dAnimateOrZ.z) * │ │ │ │ - 0x00cca0c0 206e6577 5a20202b 2028312e 30202d20 newZ + (1.0 - │ │ │ │ - 0x00cca0d0 61627328 615f6e6f 726d616c 416e6441 abs(a_normalAndA │ │ │ │ - 0x00cca0e0 6e696d61 74654f72 5a2e7a29 29202a20 nimateOrZ.z)) * │ │ │ │ - 0x00cca0f0 676c5f50 6f736974 696f6e2e 7a3b200a gl_Position.z; . │ │ │ │ - 0x00cca100 20202020 765f7465 78436f6f 72647320 v_texCoords │ │ │ │ - 0x00cca110 3d20615f 74657843 6f6f7264 733b200a = a_texCoords; . │ │ │ │ - 0x00cca120 20202020 765f6d61 736b436f 6c6f7220 v_maskColor │ │ │ │ - 0x00cca130 3d20615f 636f6c6f 723b200a 20207d20 = a_color; . } │ │ │ │ - 0x00cca140 0a000000 00000000 00000000 00000000 ................ │ │ │ │ + 0x00cc3bd0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x00cc3be0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00cc3bf0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cc3c00 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x00cc3c10 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x00cc3c20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cc3c30 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x00cc3c40 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00cc3c50 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x00cc3c60 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x00cc3c70 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00cc3c80 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00cc3c90 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00cc3ca0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00cc3cb0 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x00cc3cc0 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x00cc3cd0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x00cc3ce0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00cc3cf0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x00cc3d00 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00cc3d10 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x00cc3d20 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x00cc3d30 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00cc3d40 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x00cc3d50 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x00cc3d60 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cc3d70 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x00cc3d80 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00cc3d90 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x00cc3da0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00cc3db0 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x00cc3dc0 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x00cc3dd0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x00cc3de0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00cc3df0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x00cc3e00 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x00cc3e10 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00cc3e20 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x00cc3e30 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x00cc3e40 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x00cc3e50 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x00cc3e60 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x00cc3e70 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00cc3e80 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x00cc3e90 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x00cc3ea0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00cc3eb0 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x00cc3ec0 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x00cc3ed0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x00cc3ee0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x00cc3ef0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x00cc3f00 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x00cc3f10 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x00cc3f20 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x00cc3f30 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x00cc3f40 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x00cc3f50 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00cc3f60 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x00cc3f70 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x00cc3f80 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00cc3f90 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x00cc3fa0 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x00cc3fb0 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x00cc3fc0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00cc3fd0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00cc3fe0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x00cc3ff0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x00cc4000 32206e6f 726d616c 203d2061 5f6e6f72 2 normal = a_nor │ │ │ │ + 0x00cc4010 6d616c2e 78793b20 0a202020 20766563 mal.xy; . vec │ │ │ │ + 0x00cc4020 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ + 0x00cc4030 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ + 0x00cc4040 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ + 0x00cc4050 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ + 0x00cc4060 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ + 0x00cc4070 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ + 0x00cc4080 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ + 0x00cc4090 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ + 0x00cc40a0 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ + 0x00cc40b0 20755f6c 696e6548 616c6657 69647468 u_lineHalfWidth │ │ │ │ + 0x00cc40c0 3b200a20 20202020 20747261 6e73666f ; . transfo │ │ │ │ + 0x00cc40d0 726d6564 41786973 506f7320 3d206361 rmedAxisPos = ca │ │ │ │ + 0x00cc40e0 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ + 0x00cc40f0 64417869 73506f73 28747261 6e73666f dAxisPos(transfo │ │ │ │ + 0x00cc4100 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ + 0x00cc4110 6f736974 696f6e2e 7879202b 206e6f72 osition.xy + nor │ │ │ │ + 0x00cc4120 6d2c200a 20202020 20202020 20202020 m, . │ │ │ │ + 0x00cc4130 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc4140 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc4150 20202020 20202020 2020755f 6d6f6465 u_mode │ │ │ │ + 0x00cc4160 6c566965 772c206c 656e6774 68286e6f lView, length(no │ │ │ │ + 0x00cc4170 726d2929 3b200a20 2020207d 200a2020 rm)); . } . │ │ │ │ + 0x00cc4180 20207472 616e7366 6f726d65 64417869 transformedAxi │ │ │ │ + 0x00cc4190 73506f73 202b3d20 615f6e6f 726d616c sPos += a_normal │ │ │ │ + 0x00cc41a0 2e7a7720 2a20755f 6c696e65 48616c66 .zw * u_lineHalf │ │ │ │ + 0x00cc41b0 57696474 683b200a 20202020 76656334 Width; . vec4 │ │ │ │ + 0x00cc41c0 20706f73 203d2076 65633428 7472616e pos = vec4(tran │ │ │ │ + 0x00cc41d0 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x00cc41e0 615f706f 73697469 6f6e2e7a 2c20312e a_position.z, 1. │ │ │ │ + 0x00cc41f0 3029202a 20755f70 726f6a65 6374696f 0) * u_projectio │ │ │ │ + 0x00cc4200 6e3b200a 20202020 676c5f50 6f736974 n; . gl_Posit │ │ │ │ + 0x00cc4210 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x00cc4220 5472616e 73666f72 6d28706f 732c2075 Transform(pos, u │ │ │ │ + 0x00cc4230 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x00cc4240 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ + 0x00cc4250 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ + 0x00cc4260 20202020 765f7261 64697573 203d2076 v_radius = v │ │ │ │ + 0x00cc4270 65633328 615f6e6f 726d616c 2e7a772c ec3(a_normal.zw, │ │ │ │ + 0x00cc4280 20755f6d 61785261 64697573 29202a20 u_maxRadius) * │ │ │ │ + 0x00cc4290 755f6c69 6e654861 6c665769 6474683b u_lineHalfWidth; │ │ │ │ + 0x00cc42a0 200a2020 7d200a00 00000000 00000000 . } .......... │ │ │ │ + 0x00cc42b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc42c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc42d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc42e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc42f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc4300 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc4310 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc4320 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc4330 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc4340 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc4350 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc4360 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc4370 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc4380 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc4390 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc43a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc43b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc43c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc43d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc43e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc43f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc4400 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ + 0x00cc4410 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ + 0x00cc4420 20206f75 74207665 63332076 5f6e6f72 out vec3 v_nor │ │ │ │ + 0x00cc4430 6d616c3b 200a2020 756e6966 6f726d20 mal; . uniform │ │ │ │ + 0x00cc4440 6d617434 20755f74 72616e73 666f726d mat4 u_transform │ │ │ │ + 0x00cc4450 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00cc4460 3420755f 6e6f726d 616c5472 616e7366 4 u_normalTransf │ │ │ │ + 0x00cc4470 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cc4480 76656334 20755f63 6f6c6f72 3b200a20 vec4 u_color; . │ │ │ │ + 0x00cc4490 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x00cc44a0 74657843 6f6f7264 466c6970 70696e67 texCoordFlipping │ │ │ │ + 0x00cc44b0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x00cc44c0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x00cc44d0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x00cc44e0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00cc44f0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00cc4500 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00cc4510 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00cc4520 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x00cc4530 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cc4540 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cc4550 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x00cc4560 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x00cc4570 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x00cc4580 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00cc4590 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x00cc45a0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x00cc45b0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x00cc45c0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x00cc45d0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x00cc45e0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x00cc45f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc4600 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x00cc4610 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x00cc4620 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00cc4630 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x00cc4640 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x00cc4650 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00cc4660 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x00cc4670 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x00cc4680 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x00cc4690 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00cc46a0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x00cc46b0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x00cc46c0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x00cc46d0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00cc46e0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00cc46f0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00cc4700 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00cc4710 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x00cc4720 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x00cc4730 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x00cc4740 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x00cc4750 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x00cc4760 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00cc4770 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cc4780 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x00cc4790 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x00cc47a0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x00cc47b0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x00cc47c0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x00cc47d0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x00cc47e0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00cc47f0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x00cc4800 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00cc4810 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x00cc4820 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x00cc4830 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x00cc4840 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x00cc4850 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x00cc4860 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00cc4870 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x00cc4880 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x00cc4890 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x00cc48a0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x00cc48b0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x00cc48c0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00cc48d0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x00cc48e0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x00cc48f0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x00cc4900 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x00cc4910 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x00cc4920 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x00cc4930 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x00cc4940 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x00cc4950 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x00cc4960 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x00cc4970 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x00cc4980 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x00cc4990 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x00cc49a0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x00cc49b0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x00cc49c0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x00cc49d0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x00cc49e0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00cc49f0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x00cc4a00 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x00cc4a10 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x00cc4a20 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00cc4a30 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x00cc4a40 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x00cc4a50 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x00cc4a60 6f6e203d 20755f74 72616e73 666f726d on = u_transform │ │ │ │ + 0x00cc4a70 202a2076 65633428 615f706f 732c2031 * vec4(a_pos, 1 │ │ │ │ + 0x00cc4a80 2e30293b 200a2020 2020765f 6e6f726d .0); . v_norm │ │ │ │ + 0x00cc4a90 616c203d 206e6f72 6d616c69 7a652828 al = normalize(( │ │ │ │ + 0x00cc4aa0 755f6e6f 726d616c 5472616e 73666f72 u_normalTransfor │ │ │ │ + 0x00cc4ab0 6d202a20 76656334 28615f6e 6f726d61 m * vec4(a_norma │ │ │ │ + 0x00cc4ac0 6c2c2030 2e302929 2e78797a 293b200a l, 0.0)).xyz); . │ │ │ │ + 0x00cc4ad0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x00cc4ae0 3d20706f 73697469 6f6e3b20 0a202023 = position; . # │ │ │ │ + 0x00cc4af0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00cc4b00 2020676c 5f506f73 6974696f 6e2e7920 gl_Position.y │ │ │ │ + 0x00cc4b10 3d202d67 6c5f506f 73697469 6f6e2e79 = -gl_Position.y │ │ │ │ + 0x00cc4b20 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x00cc4b30 6f6e2e7a 203d2028 676c5f50 6f736974 on.z = (gl_Posit │ │ │ │ + 0x00cc4b40 696f6e2e 7a202b20 676c5f50 6f736974 ion.z + gl_Posit │ │ │ │ + 0x00cc4b50 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ + 0x00cc4b60 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ + 0x00cc4b70 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc4b80 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc4b90 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc4ba0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc4bb0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc4bc0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc4bd0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc4be0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc4bf0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc4c00 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc4c10 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc4c20 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc4c30 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc4c40 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc4c50 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc4c60 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc4c70 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc4c80 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc4c90 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc4ca0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc4cb0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc4cc0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cc4cd0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00cc4ce0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cc4cf0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cc4d00 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00cc4d10 455f5654 46200a20 206f7574 204c4f57 E_VTF . out LOW │ │ │ │ + 0x00cc4d20 5f502076 65633420 765f636f 6c6f723b _P vec4 v_color; │ │ │ │ + 0x00cc4d30 200a2020 23656c73 65200a20 206f7574 . #else . out │ │ │ │ + 0x00cc4d40 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ + 0x00cc4d50 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ + 0x00cc4d60 66200a20 206f7574 20766563 3320765f f . out vec3 v_ │ │ │ │ + 0x00cc4d70 72616469 75733b20 0a202075 6e69666f radius; . unifo │ │ │ │ + 0x00cc4d80 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00cc4d90 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cc4da0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cc4db0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cc4dc0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cc4dd0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cc4de0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00cc4df0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00cc4e00 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00cc4e10 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00cc4e20 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00cc4e30 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cc4e40 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00cc4e50 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cc4e60 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00cc4e70 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00cc4e80 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ + 0x00cc4e90 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x00cc4ea0 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ + 0x00cc4eb0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00cc4ec0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00cc4ed0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00cc4ee0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00cc4ef0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00cc4f00 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00cc4f10 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00cc4f20 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00cc4f30 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00cc4f40 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00cc4f50 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00cc4f60 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00cc4f70 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00cc4f80 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00cc4f90 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00cc4fa0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00cc4fb0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00cc4fc0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00cc4fd0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00cc4fe0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00cc4ff0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cc5000 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00cc5010 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00cc5020 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00cc5030 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00cc5040 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00cc5050 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00cc5060 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00cc5070 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00cc5080 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00cc5090 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00cc50a0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00cc50b0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00cc50c0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00cc50d0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00cc50e0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00cc50f0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00cc5100 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00cc5110 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00cc5120 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00cc5130 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00cc5140 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00cc5150 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cc5160 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cc5170 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00cc5180 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00cc5190 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00cc51a0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00cc51b0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00cc51c0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00cc51d0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00cc51e0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00cc51f0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00cc5200 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00cc5210 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00cc5220 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00cc5230 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00cc5240 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00cc5250 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00cc5260 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00cc5270 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00cc5280 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00cc5290 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00cc52a0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00cc52b0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00cc52c0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cc52d0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00cc52e0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00cc52f0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00cc5300 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00cc5310 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00cc5320 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00cc5330 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00cc5340 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00cc5350 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00cc5360 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00cc5370 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00cc5380 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00cc5390 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00cc53a0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00cc53b0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00cc53c0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00cc53d0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00cc53e0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00cc53f0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00cc5400 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00cc5410 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00cc5420 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00cc5430 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00cc5440 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00cc5450 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ + 0x00cc5460 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ + 0x00cc5470 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ + 0x00cc5480 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x00cc5490 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ + 0x00cc54a0 2c20302c 20302920 2b20703b 200a2020 , 0, 0) + p; . │ │ │ │ + 0x00cc54b0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00cc54c0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x00cc54d0 6f726d28 706f7320 2a20755f 70726f6a orm(pos * u_proj │ │ │ │ + 0x00cc54e0 65637469 6f6e2c20 755f7069 766f7454 ection, u_pivotT │ │ │ │ + 0x00cc54f0 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ + 0x00cc5500 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00cc5510 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ + 0x00cc5520 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ + 0x00cc5530 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ + 0x00cc5540 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ + 0x00cc5550 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ + 0x00cc5560 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ + 0x00cc5570 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x00cc5580 2023656e 64696620 0a202020 20765f72 #endif . v_r │ │ │ │ + 0x00cc5590 61646975 73203d20 615f6e6f 726d616c adius = a_normal │ │ │ │ + 0x00cc55a0 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x00cc55b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc55c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc55d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc55e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc55f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc5600 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc5610 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc5620 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc5630 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc5640 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc5650 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc5660 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc5670 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc5680 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc5690 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc56a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc56b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc56c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc56d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc56e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc56f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc5700 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00cc5710 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00cc5720 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00cc5730 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00cc5740 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00cc5750 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00cc5760 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cc5770 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00cc5780 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00cc5790 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00cc57a0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00cc57b0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00cc57c0 6e69666f 726d2076 65633420 755f726f niform vec4 u_ro │ │ │ │ + 0x00cc57d0 75746550 6172616d 733b200a 2020756e uteParams; . un │ │ │ │ + 0x00cc57e0 69666f72 6d207665 63342075 5f636f6c iform vec4 u_col │ │ │ │ + 0x00cc57f0 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ + 0x00cc5800 65633420 755f6d61 736b436f 6c6f723b ec4 u_maskColor; │ │ │ │ + 0x00cc5810 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00cc5820 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ + 0x00cc5830 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00cc5840 20755f66 616b6543 6f6c6f72 3b200a20 u_fakeColor; . │ │ │ │ + 0x00cc5850 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ + 0x00cc5860 66616b65 4f75746c 696e6543 6f6c6f72 fakeOutlineColor │ │ │ │ + 0x00cc5870 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00cc5880 3220755f 66616b65 426f7264 6572733b 2 u_fakeBorders; │ │ │ │ + 0x00cc5890 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x00cc58a0 20755f70 61747465 726e3b20 0a202075 u_pattern; . u │ │ │ │ + 0x00cc58b0 6e69666f 726d2076 65633220 755f616e niform vec2 u_an │ │ │ │ + 0x00cc58c0 676c6543 6f735369 6e3b200a 2020756e gleCosSin; . un │ │ │ │ + 0x00cc58d0 69666f72 6d20666c 6f617420 755f6172 iform float u_ar │ │ │ │ + 0x00cc58e0 726f7748 616c6657 69647468 3b200a20 rowHalfWidth; . │ │ │ │ + 0x00cc58f0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00cc5900 5f6f7061 63697479 3b200a20 20636f6e _opacity; . con │ │ │ │ + 0x00cc5910 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x00cc5920 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x00cc5930 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x00cc5940 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00cc5950 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x00cc5960 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00cc5970 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00cc5980 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x00cc5990 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00cc59a0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00cc59b0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00cc59c0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00cc59d0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cc59e0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00cc59f0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cc5a00 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00cc5a10 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00cc5a20 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x00cc5a30 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cc5a40 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x00cc5a50 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x00cc5a60 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00cc5a70 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cc5a80 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x00cc5a90 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00cc5aa0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cc5ab0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x00cc5ac0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x00cc5ad0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cc5ae0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x00cc5af0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00cc5b00 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x00cc5b10 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x00cc5b20 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00cc5b30 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00cc5b40 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00cc5b50 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00cc5b60 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x00cc5b70 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x00cc5b80 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x00cc5b90 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00cc5ba0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x00cc5bb0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00cc5bc0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x00cc5bd0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x00cc5be0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00cc5bf0 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x00cc5c00 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x00cc5c10 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cc5c20 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x00cc5c30 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00cc5c40 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x00cc5c50 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00cc5c60 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x00cc5c70 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x00cc5c80 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x00cc5c90 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00cc5ca0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x00cc5cb0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x00cc5cc0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00cc5cd0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x00cc5ce0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x00cc5cf0 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x00cc5d00 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x00cc5d10 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x00cc5d20 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00cc5d30 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x00cc5d40 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x00cc5d50 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00cc5d60 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x00cc5d70 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x00cc5d80 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x00cc5d90 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x00cc5da0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x00cc5db0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x00cc5dc0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x00cc5dd0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x00cc5de0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x00cc5df0 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x00cc5e00 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00cc5e10 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x00cc5e20 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x00cc5e30 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00cc5e40 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x00cc5e50 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x00cc5e60 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x00cc5e70 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00cc5e80 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00cc5e90 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x00cc5ea0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x00cc5eb0 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ + 0x00cc5ec0 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ + 0x00cc5ed0 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ + 0x00cc5ee0 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ + 0x00cc5ef0 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ + 0x00cc5f00 2028646f 7428615f 6e6f726d 616c2c20 (dot(a_normal, │ │ │ │ + 0x00cc5f10 615f6e6f 726d616c 2920213d 20302e30 a_normal) != 0.0 │ │ │ │ + 0x00cc5f20 29200a20 2020207b 200a2020 20202020 ) . { . │ │ │ │ + 0x00cc5f30 76656332 206e6f72 6d203d20 615f6e6f vec2 norm = a_no │ │ │ │ + 0x00cc5f40 726d616c 202a2075 5f617272 6f774861 rmal * u_arrowHa │ │ │ │ + 0x00cc5f50 6c665769 6474683b 200a2020 20202020 lfWidth; . │ │ │ │ + 0x00cc5f60 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x00cc5f70 6f73203d 2063616c 634c696e 65547261 os = calcLineTra │ │ │ │ + 0x00cc5f80 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x00cc5f90 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x00cc5fa0 6f732c20 615f706f 73697469 6f6e2e78 os, a_position.x │ │ │ │ + 0x00cc5fb0 79202b20 6e6f726d 2c200a20 20202020 y + norm, . │ │ │ │ + 0x00cc5fc0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc5fd0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc5fe0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc5ff0 20755f6d 6f64656c 56696577 2c206c65 u_modelView, le │ │ │ │ + 0x00cc6000 6e677468 286e6f72 6d29293b 200a2020 ngth(norm)); . │ │ │ │ + 0x00cc6010 20207d20 0a202020 20765f63 6f6c6f72 } . v_color │ │ │ │ + 0x00cc6020 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ + 0x00cc6030 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x00cc6040 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x00cc6050 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ + 0x00cc6060 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ + 0x00cc6070 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ + 0x00cc6080 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ + 0x00cc6090 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x00cc60a0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00cc60b0 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ + 0x00cc60c0 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x00cc60d0 207d200a 00000000 00000000 00000000 } ............. │ │ │ │ + 0x00cc60e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc60f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc6100 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc6110 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc6120 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc6130 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc6140 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc6150 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc6160 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc6170 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc6180 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc6190 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc61a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc61b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc61c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc61d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc61e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc61f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc6200 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc6210 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc6220 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc6230 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cc6240 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00cc6250 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00cc6260 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x00cc6270 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x00cc6280 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ + 0x00cc6290 6f757420 76656332 20765f6d 61736b54 out vec2 v_maskT │ │ │ │ + 0x00cc62a0 6578436f 6f72643b 200a2020 6f757420 exCoord; . out │ │ │ │ + 0x00cc62b0 666c6f61 7420765f 68616c66 4c656e67 float v_halfLeng │ │ │ │ + 0x00cc62c0 74683b20 0a202075 6e69666f 726d206d th; . uniform m │ │ │ │ + 0x00cc62d0 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x00cc62e0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00cc62f0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00cc6300 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cc6310 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x00cc6320 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00cc6330 20755f74 72616666 69635061 72616d73 u_trafficParams │ │ │ │ + 0x00cc6340 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00cc6350 3420755f 6f75746c 696e6543 6f6c6f72 4 u_outlineColor │ │ │ │ + 0x00cc6360 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00cc6370 3420755f 6c696768 74417272 6f77436f 4 u_lightArrowCo │ │ │ │ + 0x00cc6380 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x00cc6390 76656334 20755f64 61726b41 72726f77 vec4 u_darkArrow │ │ │ │ + 0x00cc63a0 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x00cc63b0 6d20666c 6f617420 755f6f75 746c696e m float u_outlin │ │ │ │ + 0x00cc63c0 653b200a 2020756e 69666f72 6d20666c e; . uniform fl │ │ │ │ + 0x00cc63d0 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ + 0x00cc63e0 2020636f 6e737420 666c6f61 74206b41 const float kA │ │ │ │ + 0x00cc63f0 72726f77 5653697a 65203d20 302e3235 rrowVSize = 0.25 │ │ │ │ + 0x00cc6400 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x00cc6410 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x00cc6420 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x00cc6430 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00cc6440 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00cc6450 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00cc6460 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00cc6470 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x00cc6480 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00cc6490 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00cc64a0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x00cc64b0 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x00cc64c0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x00cc64d0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00cc64e0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x00cc64f0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x00cc6500 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x00cc6510 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x00cc6520 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x00cc6530 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x00cc6540 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc6550 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x00cc6560 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x00cc6570 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00cc6580 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x00cc6590 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x00cc65a0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00cc65b0 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x00cc65c0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x00cc65d0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x00cc65e0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00cc65f0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x00cc6600 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x00cc6610 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x00cc6620 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00cc6630 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00cc6640 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00cc6650 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00cc6660 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x00cc6670 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x00cc6680 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x00cc6690 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x00cc66a0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x00cc66b0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00cc66c0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cc66d0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x00cc66e0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x00cc66f0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x00cc6700 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x00cc6710 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x00cc6720 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x00cc6730 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00cc6740 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x00cc6750 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00cc6760 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x00cc6770 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x00cc6780 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x00cc6790 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x00cc67a0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x00cc67b0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00cc67c0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x00cc67d0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x00cc67e0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x00cc67f0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x00cc6800 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x00cc6810 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00cc6820 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x00cc6830 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x00cc6840 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x00cc6850 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x00cc6860 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x00cc6870 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x00cc6880 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x00cc6890 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x00cc68a0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x00cc68b0 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x00cc68c0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x00cc68d0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x00cc68e0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x00cc68f0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x00cc6900 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x00cc6910 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x00cc6920 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x00cc6930 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00cc6940 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x00cc6950 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x00cc6960 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x00cc6970 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00cc6980 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x00cc6990 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x00cc69a0 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ + 0x00cc69b0 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ + 0x00cc69c0 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ + 0x00cc69d0 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ + 0x00cc69e0 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x00cc69f0 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ + 0x00cc6a00 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ + 0x00cc6a10 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ + 0x00cc6a20 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ + 0x00cc6a30 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ + 0x00cc6a40 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ + 0x00cc6a50 6e6f726d 616c202a 20755f74 72616666 normal * u_traff │ │ │ │ + 0x00cc6a60 69635061 72616d73 2e783b20 0a202020 icParams.x; . │ │ │ │ + 0x00cc6a70 20202069 66202861 5f6e6f72 6d616c2e if (a_normal. │ │ │ │ + 0x00cc6a80 7a203c20 302e3029 200a2020 20202020 z < 0.0) . │ │ │ │ + 0x00cc6a90 20206e6f 726d203d 206e6f72 6d616c20 norm = normal │ │ │ │ + 0x00cc6aa0 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ + 0x00cc6ab0 732e793b 200a2020 20202020 7472616e s.y; . tran │ │ │ │ + 0x00cc6ac0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x00cc6ad0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00cc6ae0 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ + 0x00cc6af0 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x00cc6b00 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ + 0x00cc6b10 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ + 0x00cc6b20 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc6b30 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc6b40 20202020 20202020 20202020 20755f6d u_m │ │ │ │ + 0x00cc6b50 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ + 0x00cc6b60 286e6f72 6d29293b 200a2020 20207d20 (norm)); . } │ │ │ │ + 0x00cc6b70 0a202020 20666c6f 61742075 4f666673 . float uOffs │ │ │ │ + 0x00cc6b80 6574203d 206c656e 67746828 76656334 et = length(vec4 │ │ │ │ + 0x00cc6b90 286b5368 61706543 6f6f7264 5363616c (kShapeCoordScal │ │ │ │ + 0x00cc6ba0 61722c20 302c2030 2c203029 202a2075 ar, 0, 0, 0) * u │ │ │ │ + 0x00cc6bb0 5f6d6f64 656c5669 65772920 2a20615f _modelView) * a_ │ │ │ │ + 0x00cc6bc0 6e6f726d 616c2e77 3b200a20 20202076 normal.w; . v │ │ │ │ + 0x00cc6bd0 5f636f6c 6f725465 78436f6f 7264203d _colorTexCoord = │ │ │ │ + 0x00cc6be0 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ + 0x00cc6bf0 2e78793b 200a2020 2020666c 6f617420 .xy; . float │ │ │ │ + 0x00cc6c00 76203d20 6d697828 615f636f 6c6f7254 v = mix(a_colorT │ │ │ │ + 0x00cc6c10 6578436f 6f72642e 7a2c2061 5f636f6c exCoord.z, a_col │ │ │ │ + 0x00cc6c20 6f725465 78436f6f 72642e7a 202b206b orTexCoord.z + k │ │ │ │ + 0x00cc6c30 4172726f 77565369 7a652c20 302e3520 ArrowVSize, 0.5 │ │ │ │ + 0x00cc6c40 2a20615f 6e6f726d 616c2e7a 202b2030 * a_normal.z + 0 │ │ │ │ + 0x00cc6c50 2e35293b 200a2020 2020765f 6d61736b .5); . v_mask │ │ │ │ + 0x00cc6c60 54657843 6f6f7264 203d2076 65633228 TexCoord = vec2( │ │ │ │ + 0x00cc6c70 754f6666 73657420 2a20755f 74726166 uOffset * u_traf │ │ │ │ + 0x00cc6c80 66696350 6172616d 732e7a2c 20762920 ficParams.z, v) │ │ │ │ + 0x00cc6c90 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ + 0x00cc6ca0 732e773b 200a2020 2020765f 6d61736b s.w; . v_mask │ │ │ │ + 0x00cc6cb0 54657843 6f6f7264 2e78202a 3d207374 TexCoord.x *= st │ │ │ │ + 0x00cc6cc0 65702861 5f636f6c 6f725465 78436f6f ep(a_colorTexCoo │ │ │ │ + 0x00cc6cd0 72642e77 2c20765f 6d61736b 54657843 rd.w, v_maskTexC │ │ │ │ + 0x00cc6ce0 6f6f7264 2e78293b 200a2020 2020765f oord.x); . v_ │ │ │ │ + 0x00cc6cf0 68616c66 4c656e67 7468203d 20615f6e halfLength = a_n │ │ │ │ + 0x00cc6d00 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ + 0x00cc6d10 63342070 6f73203d 20766563 34287472 c4 pos = vec4(tr │ │ │ │ + 0x00cc6d20 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00cc6d30 2c20615f 706f7369 74696f6e 2e7a2c20 , a_position.z, │ │ │ │ + 0x00cc6d40 312e3029 202a2075 5f70726f 6a656374 1.0) * u_project │ │ │ │ + 0x00cc6d50 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ + 0x00cc6d60 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ + 0x00cc6d70 6f745472 616e7366 6f726d28 706f732c otTransform(pos, │ │ │ │ + 0x00cc6d80 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x00cc6d90 6d2c2030 2e30293b 200a2020 7d200a00 m, 0.0); . } .. │ │ │ │ + 0x00cc6da0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc6db0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc6dc0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc6dd0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc6de0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc6df0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc6e00 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc6e10 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc6e20 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc6e30 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc6e40 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc6e50 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc6e60 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc6e70 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc6e80 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc6e90 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc6ea0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc6eb0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc6ec0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc6ed0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc6ee0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc6ef0 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ + 0x00cc6f00 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ + 0x00cc6f10 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ + 0x00cc6f20 6f6f7264 733b200a 20206f75 74207665 oords; . out ve │ │ │ │ + 0x00cc6f30 63332076 5f6e6f72 6d616c3b 200a2020 c3 v_normal; . │ │ │ │ + 0x00cc6f40 6f757420 76656332 20765f74 6578436f out vec2 v_texCo │ │ │ │ + 0x00cc6f50 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ + 0x00cc6f60 206d6174 3420755f 7472616e 73666f72 mat4 u_transfor │ │ │ │ + 0x00cc6f70 6d3b200a 2020756e 69666f72 6d206d61 m; . uniform ma │ │ │ │ + 0x00cc6f80 74342075 5f6e6f72 6d616c54 72616e73 t4 u_normalTrans │ │ │ │ + 0x00cc6f90 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ + 0x00cc6fa0 20766563 3420755f 636f6c6f 723b200a vec4 u_color; . │ │ │ │ + 0x00cc6fb0 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ + 0x00cc6fc0 5f746578 436f6f72 64466c69 7070696e _texCoordFlippin │ │ │ │ + 0x00cc6fd0 673b200a 2020636f 6e737420 666c6f61 g; . const floa │ │ │ │ + 0x00cc6fe0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00cc6ff0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00cc7000 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00cc7010 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00cc7020 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00cc7030 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00cc7040 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00cc7050 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00cc7060 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00cc7070 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00cc7080 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00cc7090 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00cc70a0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00cc70b0 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00cc70c0 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00cc70d0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00cc70e0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00cc70f0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00cc7100 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00cc7110 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cc7120 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00cc7130 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00cc7140 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cc7150 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00cc7160 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00cc7170 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00cc7180 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00cc7190 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00cc71a0 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00cc71b0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cc71c0 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00cc71d0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00cc71e0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00cc71f0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00cc7200 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00cc7210 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00cc7220 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00cc7230 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x00cc7240 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x00cc7250 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00cc7260 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00cc7270 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00cc7280 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00cc7290 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00cc72a0 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x00cc72b0 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x00cc72c0 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x00cc72d0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x00cc72e0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x00cc72f0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x00cc7300 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x00cc7310 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x00cc7320 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00cc7330 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x00cc7340 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x00cc7350 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x00cc7360 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00cc7370 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00cc7380 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00cc7390 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x00cc73a0 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x00cc73b0 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x00cc73c0 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x00cc73d0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x00cc73e0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x00cc73f0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x00cc7400 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x00cc7410 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x00cc7420 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x00cc7430 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x00cc7440 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x00cc7450 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x00cc7460 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00cc7470 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00cc7480 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00cc7490 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x00cc74a0 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x00cc74b0 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x00cc74c0 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x00cc74d0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x00cc74e0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x00cc74f0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x00cc7500 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00cc7510 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x00cc7520 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x00cc7530 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x00cc7540 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00cc7550 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x00cc7560 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00cc7570 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00cc7580 696f6e20 3d20755f 7472616e 73666f72 ion = u_transfor │ │ │ │ + 0x00cc7590 6d202a20 76656334 28615f70 6f732c20 m * vec4(a_pos, │ │ │ │ + 0x00cc75a0 312e3029 3b200a20 20202076 5f6e6f72 1.0); . v_nor │ │ │ │ + 0x00cc75b0 6d616c20 3d206e6f 726d616c 697a6528 mal = normalize( │ │ │ │ + 0x00cc75c0 28755f6e 6f726d61 6c547261 6e73666f (u_normalTransfo │ │ │ │ + 0x00cc75d0 726d202a 20766563 3428615f 6e6f726d rm * vec4(a_norm │ │ │ │ + 0x00cc75e0 616c2c20 302e3029 292e7879 7a293b20 al, 0.0)).xyz); │ │ │ │ + 0x00cc75f0 0a202020 20765f74 6578436f 6f726473 . v_texCoords │ │ │ │ + 0x00cc7600 203d206d 69782861 5f746578 436f6f72 = mix(a_texCoor │ │ │ │ + 0x00cc7610 64732c20 312e3020 2d20615f 74657843 ds, 1.0 - a_texC │ │ │ │ + 0x00cc7620 6f6f7264 732c2075 5f746578 436f6f72 oords, u_texCoor │ │ │ │ + 0x00cc7630 64466c69 7070696e 67293b20 0a202020 dFlipping); . │ │ │ │ + 0x00cc7640 20676c5f 506f7369 74696f6e 203d2070 gl_Position = p │ │ │ │ + 0x00cc7650 6f736974 696f6e3b 200a2020 23696664 osition; . #ifd │ │ │ │ + 0x00cc7660 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ + 0x00cc7670 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ + 0x00cc7680 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ + 0x00cc7690 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ + 0x00cc76a0 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ + 0x00cc76b0 2e7a202b 20676c5f 506f7369 74696f6e .z + gl_Position │ │ │ │ + 0x00cc76c0 2e772920 2a20302e 353b200a 20202365 .w) * 0.5; . #e │ │ │ │ + 0x00cc76d0 6e646966 200a2020 7d200a00 00000000 ndif . } ...... │ │ │ │ + 0x00cc76e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc76f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc7700 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc7710 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc7720 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc7730 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc7740 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc7750 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc7760 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc7770 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc7780 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc7790 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc77a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc77b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc77c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc77d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc77e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc77f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc7800 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc7810 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc7820 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc7830 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cc7840 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00cc7850 72546578 436f6f72 643b200a 20206f75 rTexCoord; . ou │ │ │ │ + 0x00cc7860 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ + 0x00cc7870 78436f6f 72643b20 0a202075 6e69666f xCoord; . unifo │ │ │ │ + 0x00cc7880 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00cc7890 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00cc78a0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00cc78b0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00cc78c0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00cc78d0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00cc78e0 76656334 20755f74 72616666 69635061 vec4 u_trafficPa │ │ │ │ + 0x00cc78f0 72616d73 3b200a20 20756e69 666f726d rams; . uniform │ │ │ │ + 0x00cc7900 20766563 3420755f 6f75746c 696e6543 vec4 u_outlineC │ │ │ │ + 0x00cc7910 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ + 0x00cc7920 20766563 3420755f 6c696768 74417272 vec4 u_lightArr │ │ │ │ + 0x00cc7930 6f77436f 6c6f723b 200a2020 756e6966 owColor; . unif │ │ │ │ + 0x00cc7940 6f726d20 76656334 20755f64 61726b41 orm vec4 u_darkA │ │ │ │ + 0x00cc7950 72726f77 436f6c6f 723b200a 2020756e rrowColor; . un │ │ │ │ + 0x00cc7960 69666f72 6d20666c 6f617420 755f6f75 iform float u_ou │ │ │ │ + 0x00cc7970 746c696e 653b200a 2020756e 69666f72 tline; . unifor │ │ │ │ + 0x00cc7980 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x00cc7990 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ + 0x00cc79a0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00cc79b0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00cc79c0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00cc79d0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00cc79e0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00cc79f0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00cc7a00 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00cc7a10 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00cc7a20 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00cc7a30 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00cc7a40 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00cc7a50 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00cc7a60 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00cc7a70 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00cc7a80 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00cc7a90 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00cc7aa0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00cc7ab0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00cc7ac0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00cc7ad0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cc7ae0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00cc7af0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00cc7b00 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cc7b10 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00cc7b20 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00cc7b30 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00cc7b40 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00cc7b50 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00cc7b60 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00cc7b70 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00cc7b80 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00cc7b90 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00cc7ba0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00cc7bb0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00cc7bc0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00cc7bd0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00cc7be0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00cc7bf0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x00cc7c00 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x00cc7c10 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00cc7c20 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00cc7c30 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00cc7c40 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00cc7c50 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00cc7c60 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x00cc7c70 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x00cc7c80 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x00cc7c90 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x00cc7ca0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x00cc7cb0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x00cc7cc0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x00cc7cd0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x00cc7ce0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00cc7cf0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x00cc7d00 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x00cc7d10 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x00cc7d20 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00cc7d30 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00cc7d40 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00cc7d50 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x00cc7d60 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x00cc7d70 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x00cc7d80 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x00cc7d90 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x00cc7da0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x00cc7db0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x00cc7dc0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x00cc7dd0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x00cc7de0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x00cc7df0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x00cc7e00 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x00cc7e10 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x00cc7e20 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00cc7e30 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00cc7e40 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00cc7e50 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x00cc7e60 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x00cc7e70 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x00cc7e80 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x00cc7e90 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x00cc7ea0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x00cc7eb0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x00cc7ec0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00cc7ed0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x00cc7ee0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x00cc7ef0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x00cc7f00 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00cc7f10 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x00cc7f20 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00cc7f30 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ + 0x00cc7f40 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ + 0x00cc7f50 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ + 0x00cc7f60 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ + 0x00cc7f70 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ + 0x00cc7f80 3b200a20 20202076 65633420 706f7320 ; . vec4 pos │ │ │ │ + 0x00cc7f90 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x00cc7fa0 65644178 6973506f 732c2061 5f706f73 edAxisPos, a_pos │ │ │ │ + 0x00cc7fb0 6974696f 6e2e7a2c 20312e30 29202a20 ition.z, 1.0) * │ │ │ │ + 0x00cc7fc0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00cc7fd0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00cc7fe0 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ + 0x00cc7ff0 6f6f7264 3b200a20 20202067 6c5f506f oord; . gl_Po │ │ │ │ + 0x00cc8000 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ + 0x00cc8010 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ + 0x00cc8020 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x00cc8030 726d2c20 302e3029 3b200a20 207d200a rm, 0.0); . } . │ │ │ │ + 0x00cc8040 00000000 00000000 00000000 00000000 ................ │ │ │ │ + 0x00cc8050 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc8060 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc8070 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc8080 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc8090 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc80a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc80b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc80c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc80d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc80e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc80f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc8100 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc8110 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc8120 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc8130 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc8140 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc8150 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc8160 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc8170 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc8180 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc8190 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc81a0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cc81b0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00cc81c0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00cc81d0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x00cc81e0 65633420 765f636f 6c6f723b 200a2020 ec4 v_color; . │ │ │ │ + 0x00cc81f0 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ + 0x00cc8200 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ + 0x00cc8210 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ + 0x00cc8220 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ + 0x00cc8230 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ + 0x00cc8240 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ + 0x00cc8250 666f726d 20766563 3420755f 70617261 form vec4 u_para │ │ │ │ + 0x00cc8260 6d733b20 0a202075 6e69666f 726d2066 ms; . uniform f │ │ │ │ + 0x00cc8270 6c6f6174 20755f6c 696e6548 616c6657 loat u_lineHalfW │ │ │ │ + 0x00cc8280 69647468 3b200a20 20756e69 666f726d idth; . uniform │ │ │ │ + 0x00cc8290 20666c6f 61742075 5f6d6178 52616469 float u_maxRadi │ │ │ │ + 0x00cc82a0 75733b20 0a202063 6f6e7374 20666c6f us; . const flo │ │ │ │ + 0x00cc82b0 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ + 0x00cc82c0 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ + 0x00cc82d0 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ + 0x00cc82e0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x00cc82f0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00cc8300 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00cc8310 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ + 0x00cc8320 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ + 0x00cc8330 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00cc8340 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ + 0x00cc8350 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ + 0x00cc8360 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ + 0x00cc8370 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cc8380 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ + 0x00cc8390 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ + 0x00cc83a0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00cc83b0 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ + 0x00cc83c0 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ + 0x00cc83d0 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ + 0x00cc83e0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00cc83f0 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ + 0x00cc8400 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00cc8410 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc8420 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ + 0x00cc8430 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ + 0x00cc8440 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cc8450 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ + 0x00cc8460 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ + 0x00cc8470 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ + 0x00cc8480 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00cc8490 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ + 0x00cc84a0 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ + 0x00cc84b0 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ + 0x00cc84c0 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ + 0x00cc84d0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00cc84e0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00cc84f0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00cc8500 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ + 0x00cc8510 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ + 0x00cc8520 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ + 0x00cc8530 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ + 0x00cc8540 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ + 0x00cc8550 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ + 0x00cc8560 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00cc8570 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ + 0x00cc8580 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ + 0x00cc8590 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ + 0x00cc85a0 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ + 0x00cc85b0 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ + 0x00cc85c0 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ + 0x00cc85d0 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ + 0x00cc85e0 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ + 0x00cc85f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cc8600 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ + 0x00cc8610 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ + 0x00cc8620 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ + 0x00cc8630 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ + 0x00cc8640 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ + 0x00cc8650 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ + 0x00cc8660 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ + 0x00cc8670 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ + 0x00cc8680 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ + 0x00cc8690 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ + 0x00cc86a0 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ + 0x00cc86b0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x00cc86c0 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ + 0x00cc86d0 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ + 0x00cc86e0 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ + 0x00cc86f0 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x00cc8700 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ + 0x00cc8710 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ + 0x00cc8720 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ + 0x00cc8730 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ + 0x00cc8740 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ + 0x00cc8750 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ + 0x00cc8760 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ + 0x00cc8770 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ + 0x00cc8780 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ + 0x00cc8790 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ + 0x00cc87a0 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ + 0x00cc87b0 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ + 0x00cc87c0 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ + 0x00cc87d0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00cc87e0 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ + 0x00cc87f0 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ + 0x00cc8800 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ + 0x00cc8810 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00cc8820 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ + 0x00cc8830 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ + 0x00cc8840 7b200a20 20202076 65633220 6e6f726d { . vec2 norm │ │ │ │ + 0x00cc8850 616c203d 20615f6e 6f726d61 6c2e7879 al = a_normal.xy │ │ │ │ + 0x00cc8860 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ + 0x00cc8870 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x00cc8880 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ + 0x00cc8890 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ + 0x00cc88a0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ + 0x00cc88b0 793b200a 20202020 69662028 646f7428 y; . if (dot( │ │ │ │ + 0x00cc88c0 6e6f726d 616c2c20 6e6f726d 616c2920 normal, normal) │ │ │ │ + 0x00cc88d0 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ + 0x00cc88e0 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ + 0x00cc88f0 3d206e6f 726d616c 202a2075 5f6c696e = normal * u_lin │ │ │ │ + 0x00cc8900 6548616c 66576964 74683b20 0a202020 eHalfWidth; . │ │ │ │ + 0x00cc8910 20202074 72616e73 666f726d 65644178 transformedAx │ │ │ │ + 0x00cc8920 6973506f 73203d20 63616c63 4c696e65 isPos = calcLine │ │ │ │ + 0x00cc8930 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x00cc8940 6f732874 72616e73 666f726d 65644178 os(transformedAx │ │ │ │ + 0x00cc8950 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ + 0x00cc8960 6e2e7879 202b206e 6f726d2c 200a2020 n.xy + norm, . │ │ │ │ + 0x00cc8970 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc8980 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc8990 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00cc89a0 20202020 755f6d6f 64656c56 6965772c u_modelView, │ │ │ │ + 0x00cc89b0 206c656e 67746828 6e6f726d 29293b20 length(norm)); │ │ │ │ + 0x00cc89c0 0a202020 207d200a 20202020 765f636f . } . v_co │ │ │ │ + 0x00cc89d0 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ + 0x00cc89e0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x00cc89f0 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ + 0x00cc8a00 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ + 0x00cc8a10 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ + 0x00cc8a20 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ + 0x00cc8a30 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ + 0x00cc8a40 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x00cc8a50 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ + 0x00cc8a60 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ + 0x00cc8a70 20207d20 0a000000 00000000 00000000 } ............ │ │ │ │ + 0x00cc8a80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc8a90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc8aa0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc8ab0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc8ac0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc8ad0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc8ae0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc8af0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc8b00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc8b10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc8b20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc8b30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc8b40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc8b50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc8b60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc8b70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc8b80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc8b90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc8ba0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc8bb0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc8bc0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc8bd0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00cc8be0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00cc8bf0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ + 0x00cc8c00 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ + 0x00cc8c10 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x00cc8c20 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ + 0x00cc8c30 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ + 0x00cc8c40 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ + 0x00cc8c50 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ + 0x00cc8c60 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00cc8c70 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00cc8c80 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00cc8c90 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00cc8ca0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00cc8cb0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00cc8cc0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00cc8cd0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x00cc8ce0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00cc8cf0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00cc8d00 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00cc8d10 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00cc8d20 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00cc8d30 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00cc8d40 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00cc8d50 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00cc8d60 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00cc8d70 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00cc8d80 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00cc8d90 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00cc8da0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00cc8db0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00cc8dc0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00cc8dd0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00cc8de0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cc8df0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00cc8e00 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00cc8e10 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00cc8e20 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cc8e30 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00cc8e40 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00cc8e50 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00cc8e60 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00cc8e70 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00cc8e80 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc8e90 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00cc8ea0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00cc8eb0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00cc8ec0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00cc8ed0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00cc8ee0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00cc8ef0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00cc8f00 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00cc8f10 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00cc8f20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00cc8f30 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00cc8f40 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00cc8f50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00cc8f60 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00cc8f70 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00cc8f80 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00cc8f90 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00cc8fa0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00cc8fb0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00cc8fc0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00cc8fd0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00cc8fe0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00cc8ff0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00cc9000 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00cc9010 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00cc9020 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00cc9030 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00cc9040 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00cc9050 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00cc9060 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cc9070 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00cc9080 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00cc9090 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00cc90a0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00cc90b0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00cc90c0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00cc90d0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00cc90e0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00cc90f0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00cc9100 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00cc9110 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00cc9120 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00cc9130 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00cc9140 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00cc9150 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00cc9160 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00cc9170 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00cc9180 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00cc9190 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00cc91a0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00cc91b0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00cc91c0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00cc91d0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00cc91e0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00cc91f0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00cc9200 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00cc9210 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00cc9220 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00cc9230 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00cc9240 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00cc9250 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00cc9260 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00cc9270 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00cc9280 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00cc9290 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00cc92a0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00cc92b0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00cc92c0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00cc92d0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00cc92e0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00cc92f0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x00cc9300 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ + 0x00cc9310 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ + 0x00cc9320 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ + 0x00cc9330 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ + 0x00cc9340 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ + 0x00cc9350 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ + 0x00cc9360 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ + 0x00cc9370 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ + 0x00cc9380 69766f74 203d2076 65633428 615f706f ivot = vec4(a_po │ │ │ │ + 0x00cc9390 73697469 6f6e2c20 312e3029 202a2075 sition, 1.0) * u │ │ │ │ + 0x00cc93a0 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ + 0x00cc93b0 20766563 34206f66 66736574 203d2076 vec4 offset = v │ │ │ │ + 0x00cc93c0 65633428 6e6f726d 616c2c20 302e302c ec4(normal, 0.0, │ │ │ │ + 0x00cc93d0 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ + 0x00cc93e0 74696f6e 3b200a20 20202076 65633420 tion; . vec4 │ │ │ │ + 0x00cc93f0 70726f6a 65637465 64506976 6f74203d projectedPivot = │ │ │ │ + 0x00cc9400 20706976 6f74202a 20755f70 726f6a65 pivot * u_proje │ │ │ │ + 0x00cc9410 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ + 0x00cc9420 6f736974 696f6e20 3d206170 706c7942 osition = applyB │ │ │ │ + 0x00cc9430 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00cc9440 6e73666f 726d2870 726f6a65 63746564 nsform(projected │ │ │ │ + 0x00cc9450 5069766f 742c2075 5f706976 6f745472 Pivot, u_pivotTr │ │ │ │ + 0x00cc9460 616e7366 6f726d2c 20302e30 2c206f66 ansform, 0.0, of │ │ │ │ + 0x00cc9470 66736574 2e787929 3b200a20 20202066 fset.xy); . f │ │ │ │ + 0x00cc9480 6c6f6174 206e6577 5a203d20 70726f6a loat newZ = proj │ │ │ │ + 0x00cc9490 65637465 64506976 6f742e79 202f2070 ectedPivot.y / p │ │ │ │ + 0x00cc94a0 726f6a65 63746564 5069766f 742e7720 rojectedPivot.w │ │ │ │ + 0x00cc94b0 2a20302e 35202b20 302e353b 200a2020 * 0.5 + 0.5; . │ │ │ │ + 0x00cc94c0 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ + 0x00cc94d0 3d206162 7328615f 6e6f726d 616c416e = abs(a_normalAn │ │ │ │ + 0x00cc94e0 64416e69 6d617465 4f725a2e 7a29202a dAnimateOrZ.z) * │ │ │ │ + 0x00cc94f0 206e6577 5a20202b 2028312e 30202d20 newZ + (1.0 - │ │ │ │ + 0x00cc9500 61627328 615f6e6f 726d616c 416e6441 abs(a_normalAndA │ │ │ │ + 0x00cc9510 6e696d61 74654f72 5a2e7a29 29202a20 nimateOrZ.z)) * │ │ │ │ + 0x00cc9520 676c5f50 6f736974 696f6e2e 7a3b200a gl_Position.z; . │ │ │ │ + 0x00cc9530 20202020 765f7465 78436f6f 72647320 v_texCoords │ │ │ │ + 0x00cc9540 3d20615f 74657843 6f6f7264 733b200a = a_texCoords; . │ │ │ │ + 0x00cc9550 20202020 765f6d61 736b436f 6c6f7220 v_maskColor │ │ │ │ + 0x00cc9560 3d20615f 636f6c6f 723b200a 20207d20 = a_color; . } │ │ │ │ + 0x00cc9570 0a000000 00000000 00000000 00000000 ................ │ │ │ │ + 0x00cc9580 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00cc9590 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00cc95a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00cc95b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00cc95c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00cc95d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00cc95e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00cc95f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00cc9600 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00cc9610 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00cc9620 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00cc9630 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00cc9640 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00cc9650 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00cc9660 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00cc9670 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00cc9680 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00cc9690 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00cc96a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00cc96b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00cc96c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00cc96d0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x00cc96e0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x00cc96f0 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ + 0x00cc9700 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x00cc9710 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ + 0x00cc9720 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ + 0x00cc9730 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ + 0x00cc9740 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ + 0x00cc9750 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00cc9760 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x00cc9770 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x00cc9780 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x00cc9790 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00cc97a0 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00cc97b0 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x00cc97c0 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x00cc97d0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00cc97e0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00cc97f0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00cc9800 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00cc9810 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ + 0x00cc9820 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ + 0x00cc9830 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ + 0x00cc9840 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ + 0x00cc9850 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ + 0x00cc9860 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ + 0x00cc9870 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ + 0x00cc9880 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00cc9890 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ + 0x00cc98a0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00cc98b0 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ + 0x00cc98c0 733b200a 20202369 66646566 20454e41 s; . #ifdef ENA │ │ │ │ + 0x00cc98d0 424c455f 56544620 0a202075 6e69666f BLE_VTF . unifo │ │ │ │ + 0x00cc98e0 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ + 0x00cc98f0 6f6c6f72 5465783b 200a2020 23656e64 olorTex; . #end │ │ │ │ + 0x00cc9900 6966200a 2020636f 6e737420 666c6f61 if . const floa │ │ │ │ + 0x00cc9910 74204261 73654465 70746853 68696674 t BaseDepthShift │ │ │ │ + 0x00cc9920 203d202d 31302e30 3b200a20 20636f6e = -10.0; . con │ │ │ │ + 0x00cc9930 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x00cc9940 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x00cc9950 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x00cc9960 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00cc9970 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x00cc9980 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00cc9990 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00cc99a0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x00cc99b0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00cc99c0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00cc99d0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00cc99e0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00cc99f0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cc9a00 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00cc9a10 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00cc9a20 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00cc9a30 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00cc9a40 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x00cc9a50 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00cc9a60 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x00cc9a70 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x00cc9a80 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00cc9a90 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00cc9aa0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x00cc9ab0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00cc9ac0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00cc9ad0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x00cc9ae0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x00cc9af0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00cc9b00 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x00cc9b10 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00cc9b20 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x00cc9b30 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x00cc9b40 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00cc9b50 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00cc9b60 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00cc9b70 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00cc9b80 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x00cc9b90 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x00cc9ba0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x00cc9bb0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00cc9bc0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x00cc9bd0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00cc9be0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x00cc9bf0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x00cc9c00 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00cc9c10 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x00cc9c20 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x00cc9c30 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00cc9c40 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x00cc9c50 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00cc9c60 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x00cc9c70 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00cc9c80 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x00cc9c90 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x00cc9ca0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x00cc9cb0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00cc9cc0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x00cc9cd0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x00cc9ce0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00cc9cf0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x00cc9d00 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x00cc9d10 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x00cc9d20 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x00cc9d30 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x00cc9d40 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00cc9d50 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x00cc9d60 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x00cc9d70 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00cc9d80 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x00cc9d90 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x00cc9da0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x00cc9db0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x00cc9dc0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x00cc9dd0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x00cc9de0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x00cc9df0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x00cc9e00 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x00cc9e10 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x00cc9e20 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00cc9e30 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x00cc9e40 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x00cc9e50 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00cc9e60 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x00cc9e70 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x00cc9e80 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x00cc9e90 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00cc9ea0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00cc9eb0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x00cc9ec0 2829200a 20207b20 0a202020 20666c6f () . { . flo │ │ │ │ + 0x00cc9ed0 61742069 734f7574 6c696e65 203d2073 at isOutline = s │ │ │ │ + 0x00cc9ee0 74657028 302e352c 20755f69 734f7574 tep(0.5, u_isOut │ │ │ │ + 0x00cc9ef0 6c696e65 50617373 293b200a 20202020 linePass); . │ │ │ │ + 0x00cc9f00 666c6f61 74206e6f 744f7574 6c696e65 float notOutline │ │ │ │ + 0x00cc9f10 203d2031 2e30202d 2069734f 75746c69 = 1.0 - isOutli │ │ │ │ + 0x00cc9f20 6e653b20 0a202020 20666c6f 61742064 ne; . float d │ │ │ │ + 0x00cc9f30 65707468 53686966 74203d20 42617365 epthShift = Base │ │ │ │ + 0x00cc9f40 44657074 68536869 6674202a 2069734f DepthShift * isO │ │ │ │ + 0x00cc9f50 75746c69 6e653b20 0a202020 20766563 utline; . vec │ │ │ │ + 0x00cc9f60 3420706f 73203d20 28766563 3428615f 4 pos = (vec4(a_ │ │ │ │ + 0x00cc9f70 706f7369 74696f6e 2e78797a 2c203129 position.xyz, 1) │ │ │ │ + 0x00cc9f80 202b2076 65633428 302e302c 20302e30 + vec4(0.0, 0.0 │ │ │ │ + 0x00cc9f90 2c206465 70746853 68696674 2c20302e , depthShift, 0. │ │ │ │ + 0x00cc9fa0 30292920 2a20755f 6d6f6465 6c566965 0)) * u_modelVie │ │ │ │ + 0x00cc9fb0 773b200a 20202020 76656334 20736869 w; . vec4 shi │ │ │ │ + 0x00cc9fc0 66746564 506f7320 3d207665 63342861 ftedPos = vec4(a │ │ │ │ + 0x00cc9fd0 5f6e6f72 6d616c2c 20302e30 2c20302e _normal, 0.0, 0. │ │ │ │ + 0x00cc9fe0 3029202b 20706f73 3b200a20 20202067 0) + pos; . g │ │ │ │ + 0x00cc9ff0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x00cca000 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00cca010 28736869 66746564 506f7320 2a20755f (shiftedPos * u_ │ │ │ │ + 0x00cca020 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00cca030 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x00cca040 30293b20 0a202020 20766563 3220636f 0); . vec2 co │ │ │ │ + 0x00cca050 6c6f7254 6578436f 6f726420 3d20615f lorTexCoord = a_ │ │ │ │ + 0x00cca060 636f6c6f 72546578 436f6f72 64202a20 colorTexCoord * │ │ │ │ + 0x00cca070 6e6f744f 75746c69 6e65202b 20615f6f notOutline + a_o │ │ │ │ + 0x00cca080 75746c69 6e65436f 6c6f7254 6578436f utlineColorTexCo │ │ │ │ + 0x00cca090 6f726420 2a206973 4f75746c 696e653b ord * isOutline; │ │ │ │ + 0x00cca0a0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00cca0b0 455f5654 46200a20 20202076 5f636f6c E_VTF . v_col │ │ │ │ + 0x00cca0c0 6f72203d 20746578 74757265 28755f63 or = texture(u_c │ │ │ │ + 0x00cca0d0 6f6c6f72 5465782c 20636f6c 6f725465 olorTex, colorTe │ │ │ │ + 0x00cca0e0 78436f6f 7264293b 200a2020 23656c73 xCoord); . #els │ │ │ │ + 0x00cca0f0 65200a20 20202076 5f636f6c 6f725465 e . v_colorTe │ │ │ │ + 0x00cca100 78436f6f 7264203d 20636f6c 6f725465 xCoord = colorTe │ │ │ │ + 0x00cca110 78436f6f 72643b20 0a202023 656e6469 xCoord; . #endi │ │ │ │ + 0x00cca120 66200a20 20202076 5f6d6173 6b546578 f . v_maskTex │ │ │ │ + 0x00cca130 436f6f72 64203d20 615f6d61 736b5465 Coord = a_maskTe │ │ │ │ + 0x00cca140 78436f6f 72643b20 0a20207d 200a0000 xCoord; . } ... │ │ │ │ 0x00cca150 a87aceff ffffffff c87aceff ffffffff .z.......z...... │ │ │ │ 0x00cca160 e87aceff ffffffff 087bceff ffffffff .z.......{...... │ │ │ │ 0x00cca170 287bceff ffffffff 487bceff ffffffff ({......H{...... │ │ │ │ 0x00cca180 687bceff ffffffff 887bceff ffffffff h{.......{...... │ │ │ │ 0x00cca190 a87bceff ffffffff c87bceff ffffffff .{.......{...... │ │ │ │ 0x00cca1a0 e87bceff ffffffff 087cceff ffffffff .{.......|...... │ │ │ │ 0x00cca1b0 487cceff ffffffff 687cceff ffffffff H|......h|...... │ │ │ ├── readelf --wide --decompress --hex-dump=.gnu_debuglink {} │ │ │ │ @@ -1,7 +1,7 @@ │ │ │ │ │ │ │ │ Hex dump of section '.gnu_debuglink': │ │ │ │ - 0x00000000 61366337 34663664 61316336 30663734 a6c74f6da1c60f74 │ │ │ │ - 0x00000010 33363430 65373365 33623536 33386461 3640e73e3b5638da │ │ │ │ - 0x00000020 64363938 39392e64 65627567 00000000 d69899.debug.... │ │ │ │ - 0x00000030 3cab4909 <.I. │ │ │ │ + 0x00000000 37353030 65306465 38353961 33343736 7500e0de859a3476 │ │ │ │ + 0x00000010 34323764 62663761 66613834 31333461 427dbf7afa84134a │ │ │ │ + 0x00000020 65363534 63342e64 65627567 00000000 e654c4.debug.... │ │ │ │ + 0x00000030 4ef8986b N..k