--- /srv/rebuilderd/tmp/rebuilderdzgZSlY/inputs/organicmaps_2026.01.26-11+ds-4_riscv64.deb +++ /srv/rebuilderd/tmp/rebuilderdzgZSlY/out/organicmaps_2026.01.26-11+ds-4_riscv64.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2026-02-11 10:14:08.000000 debian-binary │ -rw-r--r-- 0 0 0 1208 2026-02-11 10:14:08.000000 control.tar.xz │ --rw-r--r-- 0 0 0 5056640 2026-02-11 10:14:08.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 5056832 2026-02-11 10:14:08.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: 698e7a487a290c869a0b4dba95ed5422576e4db2 │ │ │ │ + GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) Build ID: 32df6dd8b0da5d2405b8a3ac67bfd460de2bf7f4 │ │ │ │ │ │ │ │ Displaying notes found in: .note.ABI-tag │ │ │ │ Owner Data size Description │ │ │ │ GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) OS: Linux, ABI: 4.15.0 │ │ │ ├── strings --all --bytes=8 {} │ │ │ │ @@ -11624,15 +11624,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.02.13-0-00000000-Linux │ │ │ │ +2026.02.15-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 │ │ │ │ @@ -15730,20 +15730,22 @@ │ │ │ │ #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_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; │ │ │ │ @@ -15776,21 +15778,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, 1) * u_modelView * 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; │ │ │ │ @@ -15798,28 +15802,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_colorTexCoords; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - out float v_intensity; │ │ │ │ + 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; │ │ │ │ - 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 │ │ │ │ @@ -15841,31 +15845,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.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; │ │ │ │ + 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 GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -15873,32 +15874,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 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 │ │ │ │ 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 │ │ │ │ @@ -15920,27 +15915,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() │ │ │ │ - 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; │ │ │ │ @@ -15948,79 +15934,24 @@ │ │ │ │ #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; │ │ │ │ + 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; │ │ │ │ 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 │ │ │ │ @@ -16042,21 +15973,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 position = u_transform * vec4(a_pos, 1.0); │ │ │ │ - v_intensity = a_texCoords.x; │ │ │ │ - gl_Position = position; │ │ │ │ + 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; │ │ │ │ + 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; │ │ │ │ @@ -16064,23 +15994,30 @@ │ │ │ │ #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 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 │ │ │ │ @@ -16102,22 +16039,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 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_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); │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16126,33 +16071,27 @@ │ │ │ │ #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_colorTexCoords; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - #endif │ │ │ │ - out vec3 v_radius; │ │ │ │ + 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; │ │ │ │ - #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 │ │ │ │ @@ -16174,23 +16113,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 p = vec4(a_position, 1) * u_modelView; │ │ │ │ - vec4 pos = vec4(a_normal.xy, 0, 0) + p; │ │ │ │ + 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); │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - v_color = texture(u_colorTex, a_colorTexCoords); │ │ │ │ - #else │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ - #endif │ │ │ │ - v_radius = a_normal; │ │ │ │ + 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; │ │ │ │ @@ -16198,19 +16139,20 @@ │ │ │ │ #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_color; │ │ │ │ - out vec3 v_radius; │ │ │ │ - out vec4 v_color; │ │ │ │ + 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; │ │ │ │ @@ -16240,20 +16182,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() │ │ │ │ - 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; │ │ │ │ + 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_radius = radius; │ │ │ │ - v_color = a_color; │ │ │ │ + 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; │ │ │ │ @@ -16262,33 +16203,27 @@ │ │ │ │ #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 vec3 a_normal; │ │ │ │ + in vec2 a_colorTexCoord; │ │ │ │ + in vec4 a_maskTexCoord; │ │ │ │ + out vec2 v_colorTexCoord; │ │ │ │ + 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 │ │ │ │ @@ -16310,23 +16245,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 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; │ │ │ │ + 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; │ │ │ │ @@ -16334,34 +16271,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; │ │ │ │ + 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_colorTexCoords; │ │ │ │ + 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 │ │ │ │ @@ -16384,22 +16320,23 @@ │ │ │ │ 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); │ │ │ │ + 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_colorTexCoords.xy); │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoord); │ │ │ │ #else │ │ │ │ - v_colorTexCoords = a_colorTexCoords.xy; │ │ │ │ + v_colorTexCoord = a_colorTexCoord; │ │ │ │ #endif │ │ │ │ - v_normal = a_normal; │ │ │ │ + v_maskTexCoord = a_maskTexCoord; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16407,28 +16344,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 vec3 a_pos; │ │ │ │ in vec3 a_normal; │ │ │ │ - in vec2 a_colorTexCoord; │ │ │ │ - in vec4 a_maskTexCoord; │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ - 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; │ │ │ │ + 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 │ │ │ │ @@ -16450,25 +16382,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; │ │ │ │ - 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); │ │ │ │ + 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; │ │ │ │ @@ -16477,22 +16406,22 @@ │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ in vec3 a_position; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ - in vec2 a_maskTexCoords; │ │ │ │ + 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 │ │ │ │ - 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; │ │ │ │ @@ -16525,22 +16454,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, 1) * u_modelView * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + 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); │ │ │ │ + v_color = texture(u_colorTex, a_colorTexCoords.xy); │ │ │ │ #else │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ + v_colorTexCoords = a_colorTexCoords.xy; │ │ │ │ #endif │ │ │ │ - v_maskTexCoords = a_maskTexCoords; │ │ │ │ + v_normal = a_normal; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16548,20 +16478,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 vec3 a_pos; │ │ │ │ in vec2 a_texCoords; │ │ │ │ - in vec4 a_color; │ │ │ │ - out vec2 v_texCoords; │ │ │ │ - out vec4 v_color; │ │ │ │ - uniform mat4 u_projection; │ │ │ │ + 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 │ │ │ │ @@ -16583,20 +16514,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_texCoords = a_texCoords; │ │ │ │ - v_color = a_color; │ │ │ │ - gl_Position = vec4(a_position, 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 │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ @@ -16605,33 +16536,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 vec2 a_colorTexCoord; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ - #endif │ │ │ │ + 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 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 │ │ │ │ @@ -16653,27 +16577,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; │ │ │ │ - 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); │ │ │ │ - #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); │ │ │ │ + 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; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16681,28 +16601,32 @@ │ │ │ │ #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 vec2 a_colorTexCoords; │ │ │ │ - in vec2 a_maskTexCoords; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ out vec2 v_colorTexCoords; │ │ │ │ - out vec2 v_maskTexCoords; │ │ │ │ + #endif │ │ │ │ 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 │ │ │ │ @@ -16724,19 +16648,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() │ │ │ │ - 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 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; │ │ │ │ - v_maskTexCoords = a_maskTexCoords; │ │ │ │ + #endif │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16747,17 +16679,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; │ │ │ │ @@ -16792,15 +16722,14 @@ │ │ │ │ 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; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16808,26 +16737,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 │ │ │ │ @@ -16849,26 +16786,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() │ │ │ │ - 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; │ │ │ │ + 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; │ │ │ │ @@ -16876,26 +16810,37 @@ │ │ │ │ #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_outlineColorTexCoord; │ │ │ │ + in vec2 a_maskTexCoord; │ │ │ │ in vec4 a_position; │ │ │ │ in vec2 a_normal; │ │ │ │ - in vec2 a_colorTexCoords; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ + #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 │ │ │ │ @@ -16917,23 +16862,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() │ │ │ │ - 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; │ │ │ │ + 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); │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ + 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; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -16941,26 +16890,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 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 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; │ │ │ │ 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 │ │ │ │ @@ -16982,19 +16933,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 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); │ │ │ │ + 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; │ │ │ │ @@ -17002,34 +16954,21 @@ │ │ │ │ #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 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 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_offset0; │ │ │ │ + out vec4 v_offset1; │ │ │ │ + out vec4 v_offset2; │ │ │ │ + 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 │ │ │ │ @@ -17051,26 +16990,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() │ │ │ │ - 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; │ │ │ │ - vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ - gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0); │ │ │ │ + v_colorTexCoords = a_tcoord; │ │ │ │ + v_offset0 = u_framebufferMetrics.xyxy * vec4(-1.0, 0.0, 0.0, -1.0) + a_tcoord.xyxy; │ │ │ │ + v_offset1 = u_framebufferMetrics.xyxy * vec4( 1.0, 0.0, 0.0, 1.0) + a_tcoord.xyxy; │ │ │ │ + v_offset2 = u_framebufferMetrics.xyxy * vec4(-2.0, 0.0, 0.0, -2.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; │ │ │ │ @@ -17078,32 +17010,25 @@ │ │ │ │ #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_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_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 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 │ │ │ │ @@ -17125,22 +17050,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() │ │ │ │ - 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)); │ │ │ │ + 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; │ │ │ │ - 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; │ │ │ │ @@ -17148,33 +17071,25 @@ │ │ │ │ #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 vec3 a_position; │ │ │ │ + in vec4 a_normal; │ │ │ │ in vec4 a_color; │ │ │ │ - out vec4 v_radius; │ │ │ │ + out vec3 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; │ │ │ │ + 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 │ │ │ │ @@ -17196,24 +17111,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() │ │ │ │ - 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; │ │ │ │ + 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_radius = radius; │ │ │ │ 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; │ │ │ │ @@ -17221,25 +17137,26 @@ │ │ │ │ #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 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_length; │ │ │ │ + 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 │ │ │ │ @@ -17261,19 +17178,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() │ │ │ │ - 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 │ │ │ │ + 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 │ │ │ │ @@ -17282,37 +17205,27 @@ │ │ │ │ #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 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 float v_lengthY; │ │ │ │ + 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_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; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - #endif │ │ │ │ - const float kAntialiasingThreshold = 0.92; │ │ │ │ + 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 │ │ │ │ @@ -17334,143 +17247,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() │ │ │ │ - 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_colorTexCoords); │ │ │ │ - #else │ │ │ │ - v_colorTexCoord = 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; │ │ │ │ - #define LOW_P lowp │ │ │ │ - #define MEDIUM_P mediump │ │ │ │ - #define HIGH_P highp │ │ │ │ - #else │ │ │ │ - #define LOW_P │ │ │ │ - #define MEDIUM_P │ │ │ │ - #define HIGH_P │ │ │ │ - #endif │ │ │ │ - in vec4 v_coords; │ │ │ │ - in vec4 v_offset0; │ │ │ │ - in vec4 v_offset1; │ │ │ │ - in vec4 v_offset2; │ │ │ │ - out vec4 v_FragColor; │ │ │ │ - uniform vec4 u_framebufferMetrics; │ │ │ │ - uniform sampler2D u_colorTex; │ │ │ │ - uniform sampler2D u_smaaArea; │ │ │ │ - uniform sampler2D u_smaaSearch; │ │ │ │ - #define SMAA_SEARCHTEX_SIZE vec2(66.0, 33.0) │ │ │ │ - #define SMAA_SEARCHTEX_PACKED_SIZE vec2(64.0, 16.0) │ │ │ │ - #define SMAA_AREATEX_MAX_DISTANCE 16.0 │ │ │ │ - #define SMAA_AREATEX_PIXEL_SIZE (vec2(1.0 / 256.0, 1.0 / 1024.0)) │ │ │ │ - #define SMAALoopBegin(condition) while (condition) { │ │ │ │ - #define SMAALoopEnd } │ │ │ │ - #define SMAASampleLevelZero(tex, coord) textureLod(tex, coord, 0.0) │ │ │ │ - #define SMAASampleLevelZeroOffset(tex, coord, offset) textureLodOffset(tex, coord, 0.0, offset) │ │ │ │ - #define SMAARound(v) round((v)) │ │ │ │ - #define SMAAOffset(x,y) ivec2(x,y) │ │ │ │ - const vec2 kAreaTexMaxDistance = vec2(SMAA_AREATEX_MAX_DISTANCE, SMAA_AREATEX_MAX_DISTANCE); │ │ │ │ - const float kActivationThreshold = 0.8281; │ │ │ │ - float SMAASearchLength(vec2 e, float offset) │ │ │ │ - vec2 scale = SMAA_SEARCHTEX_SIZE * vec2(0.5, -1.0); │ │ │ │ - vec2 bias = SMAA_SEARCHTEX_SIZE * vec2(offset, 1.0); │ │ │ │ - scale += vec2(-1.0, 1.0); │ │ │ │ - bias += vec2( 0.5, -0.5); │ │ │ │ - scale *= 1.0 / SMAA_SEARCHTEX_PACKED_SIZE; │ │ │ │ - bias *= 1.0 / SMAA_SEARCHTEX_PACKED_SIZE; │ │ │ │ - return SMAASampleLevelZero(u_smaaSearch, scale * e + bias).r; │ │ │ │ - float SMAASearchXLeft(vec2 texcoord, float end) │ │ │ │ - vec2 e = vec2(0.0, 1.0); │ │ │ │ - SMAALoopBegin(texcoord.x > end && e.g > kActivationThreshold && e.r == 0.0) │ │ │ │ - e = SMAASampleLevelZero(u_colorTex, texcoord).rg; │ │ │ │ - texcoord = vec2(-2.0, 0.0) * u_framebufferMetrics.xy + texcoord; │ │ │ │ - SMAALoopEnd │ │ │ │ - float offset = 3.25 - (255.0 / 127.0) * SMAASearchLength(e, 0.0); │ │ │ │ - return u_framebufferMetrics.x * offset + texcoord.x; │ │ │ │ - float SMAASearchXRight(vec2 texcoord, float end) │ │ │ │ - vec2 e = vec2(0.0, 1.0); │ │ │ │ - SMAALoopBegin(texcoord.x < end && e.g > kActivationThreshold && e.r == 0.0) │ │ │ │ - e = SMAASampleLevelZero(u_colorTex, texcoord).rg; │ │ │ │ - texcoord = vec2(2.0, 0.0) * u_framebufferMetrics.xy + texcoord; │ │ │ │ - SMAALoopEnd │ │ │ │ - float offset = 3.25 - (255.0 / 127.0) * SMAASearchLength(e, 0.5); │ │ │ │ - return -u_framebufferMetrics.x * offset + texcoord.x; │ │ │ │ - float SMAASearchYUp(vec2 texcoord, float end) │ │ │ │ - vec2 e = vec2(1.0, 0.0); │ │ │ │ - SMAALoopBegin(texcoord.y > end && e.r > kActivationThreshold && e.g == 0.0) │ │ │ │ - e = SMAASampleLevelZero(u_colorTex, texcoord).rg; │ │ │ │ - texcoord = vec2(0.0, -2.0) * u_framebufferMetrics.xy + texcoord; │ │ │ │ - SMAALoopEnd │ │ │ │ - float offset = 3.25 - (255.0 / 127.0) * SMAASearchLength(e.gr, 0.0); │ │ │ │ - return u_framebufferMetrics.y * offset + texcoord.y; │ │ │ │ - float SMAASearchYDown(vec2 texcoord, float end) │ │ │ │ - vec2 e = vec2(1.0, 0.0); │ │ │ │ - SMAALoopBegin(texcoord.y < end && e.r > kActivationThreshold && e.g == 0.0) │ │ │ │ - e = SMAASampleLevelZero(u_colorTex, texcoord).rg; │ │ │ │ - texcoord = vec2(0.0, 2.0) * u_framebufferMetrics.xy + texcoord; │ │ │ │ - SMAALoopEnd │ │ │ │ - float offset = 3.25 - (255.0 / 127.0) * SMAASearchLength(e.gr, 0.5); │ │ │ │ - return -u_framebufferMetrics.y * offset + texcoord.y; │ │ │ │ - vec2 SMAAArea(vec2 dist, float e1, float e2) │ │ │ │ - vec2 texcoord = kAreaTexMaxDistance * SMAARound(4.0 * vec2(e1, e2)) + dist; │ │ │ │ - texcoord = SMAA_AREATEX_PIXEL_SIZE * (texcoord + 0.5); │ │ │ │ - return SMAASampleLevelZero(u_smaaArea, texcoord).rg; │ │ │ │ - const float kShapeCoordScalar = 1000.0; │ │ │ │ - void main() │ │ │ │ - vec4 weights = vec4(0.0, 0.0, 0.0, 0.0); │ │ │ │ - vec2 e = texture(u_colorTex, v_coords.xy).rg; │ │ │ │ - if (e.g > 0.0) // Edge at north │ │ │ │ - vec2 d; │ │ │ │ - vec3 coords; │ │ │ │ - coords.x = SMAASearchXLeft(v_offset0.xy, v_offset2.x); │ │ │ │ - coords.y = v_offset1.y; │ │ │ │ - d.x = coords.x; │ │ │ │ - float e1 = SMAASampleLevelZero(u_colorTex, coords.xy).r; │ │ │ │ - coords.z = SMAASearchXRight(v_offset0.zw, v_offset2.y); │ │ │ │ - d.y = coords.z; │ │ │ │ - vec2 zz = u_framebufferMetrics.zz; │ │ │ │ - d = abs(SMAARound(zz * d - v_coords.zz)); │ │ │ │ - vec2 sqrt_d = sqrt(d); │ │ │ │ - float e2 = SMAASampleLevelZeroOffset(u_colorTex, coords.zy, SMAAOffset(1, 0)).r; │ │ │ │ - weights.rg = SMAAArea(sqrt_d, e1, e2); │ │ │ │ - if (e.r > 0.0) // Edge at west │ │ │ │ - vec2 d; │ │ │ │ - vec3 coords; │ │ │ │ - coords.y = SMAASearchYUp(v_offset1.xy, v_offset2.z); │ │ │ │ - coords.x = v_offset0.x; │ │ │ │ - d.x = coords.y; │ │ │ │ - float e1 = SMAASampleLevelZero(u_colorTex, coords.xy).g; │ │ │ │ - coords.z = SMAASearchYDown(v_offset1.zw, v_offset2.w); │ │ │ │ - d.y = coords.z; │ │ │ │ - vec2 ww = u_framebufferMetrics.ww; │ │ │ │ - d = abs(SMAARound(ww * d - v_coords.ww)); │ │ │ │ - vec2 sqrt_d = sqrt(d); │ │ │ │ - float e2 = SMAASampleLevelZeroOffset(u_colorTex, coords.xz, SMAAOffset(0, 1)).g; │ │ │ │ - weights.ba = SMAAArea(sqrt_d, e1, e2); │ │ │ │ - v_FragColor = weights; │ │ │ │ + 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; │ │ │ │ @@ -17480,22 +17270,17 @@ │ │ │ │ #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; │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ + out vec4 v_offset; │ │ │ │ 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 │ │ │ │ @@ -17517,18 +17302,16 @@ │ │ │ │ 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); │ │ │ │ + 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 │ │ │ │ @@ -17537,21 +17320,35 @@ │ │ │ │ #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 vec2 v_colorTexCoords; │ │ │ │ - out vec4 v_offset0; │ │ │ │ - out vec4 v_offset1; │ │ │ │ - out vec4 v_offset2; │ │ │ │ - uniform vec4 u_framebufferMetrics; │ │ │ │ + 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; │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + 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 │ │ │ │ @@ -17573,19 +17370,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() │ │ │ │ - v_colorTexCoords = a_tcoord; │ │ │ │ - v_offset0 = u_framebufferMetrics.xyxy * vec4(-1.0, 0.0, 0.0, -1.0) + a_tcoord.xyxy; │ │ │ │ - v_offset1 = u_framebufferMetrics.xyxy * vec4( 1.0, 0.0, 0.0, 1.0) + a_tcoord.xyxy; │ │ │ │ - v_offset2 = u_framebufferMetrics.xyxy * vec4(-2.0, 0.0, 0.0, -2.0) + a_tcoord.xyxy; │ │ │ │ - gl_Position = vec4(a_pos, 0.0, 1.0); │ │ │ │ + float isOutline = step(0.5, u_isOutlinePass); │ │ │ │ + float depthShift = kBaseDepthShift * isOutline; │ │ │ │ + vec4 pivot = (vec4(a_position.xyz, 1.0) + vec4(0.0, 0.0, depthShift, 0.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); │ │ │ │ + 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 │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -17593,19 +17398,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; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ - out vec4 v_offset; │ │ │ │ - uniform vec4 u_framebufferMetrics; │ │ │ │ + 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; │ │ │ │ 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 │ │ │ │ @@ -17627,17 +17438,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() │ │ │ │ - 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); │ │ │ │ + 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); │ │ │ │ + v_color = a_color; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -17719,33 +17536,28 @@ │ │ │ │ #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; │ │ │ │ - #ifdef ENABLE_VTF │ │ │ │ - out LOW_P vec4 v_color; │ │ │ │ - #else │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ - #endif │ │ │ │ - out vec2 v_maskTexCoord; │ │ │ │ + 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; │ │ │ │ - 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 │ │ │ │ @@ -17767,24 +17579,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 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 │ │ │ │ - v_maskTexCoord = a_maskTexCoord; │ │ │ │ + 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; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -17792,37 +17605,20 @@ │ │ │ │ #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_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; │ │ │ │ + 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 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 │ │ │ │ @@ -17844,27 +17640,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() │ │ │ │ - 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; │ │ │ │ + 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_maskTexCoord = a_maskTexCoord; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -17872,35 +17662,26 @@ │ │ │ │ #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_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; │ │ │ │ + in vec2 a_colorTexCoords; │ │ │ │ + out vec2 v_colorTexCoords; │ │ │ │ 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 sampler2D u_colorTex; │ │ │ │ - const float kBaseDepthShift = -10.0; │ │ │ │ + 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 │ │ │ │ @@ -17922,27 +17703,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() │ │ │ │ - float isOutline = step(0.5, u_isOutlinePass); │ │ │ │ - float depthShift = kBaseDepthShift * isOutline; │ │ │ │ - vec4 pivot = (vec4(a_position.xyz, 1.0) + vec4(0.0, 0.0, depthShift, 0.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); │ │ │ │ - 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; │ │ │ │ + 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; │ │ │ │ @@ -18032,26 +17805,32 @@ │ │ │ │ #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 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 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 │ │ │ │ @@ -18073,18 +17852,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 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 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 │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -18092,26 +17874,24 @@ │ │ │ │ #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; │ │ │ │ - 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; │ │ │ │ + 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 │ │ │ │ @@ -18133,19 +17913,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 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_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; │ │ │ │ @@ -18153,24 +17933,37 @@ │ │ │ │ #define MEDIUM_P mediump │ │ │ │ #define HIGH_P highp │ │ │ │ #else │ │ │ │ #define LOW_P │ │ │ │ #define MEDIUM_P │ │ │ │ #define HIGH_P │ │ │ │ #endif │ │ │ │ - in vec2 a_position; │ │ │ │ + in vec3 a_position; │ │ │ │ + in vec2 a_normal; │ │ │ │ in vec2 a_colorTexCoords; │ │ │ │ - out vec2 v_colorTexCoords; │ │ │ │ + in vec3 a_length; │ │ │ │ + #ifdef ENABLE_VTF │ │ │ │ + out LOW_P vec4 v_color; │ │ │ │ + #else │ │ │ │ + out vec2 v_colorTexCoord; │ │ │ │ + #endif │ │ │ │ + out float v_lengthY; │ │ │ │ uniform mat4 u_modelView; │ │ │ │ uniform mat4 u_projection; │ │ │ │ - uniform vec2 u_contrastGamma; │ │ │ │ - uniform vec2 u_position; │ │ │ │ - uniform float u_isOutlinePass; │ │ │ │ + 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_length; │ │ │ │ + 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 │ │ │ │ @@ -18192,20 +17985,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() │ │ │ │ - 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; │ │ │ │ + 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_colorTexCoords); │ │ │ │ + #else │ │ │ │ + v_colorTexCoord = a_colorTexCoords; │ │ │ │ #endif │ │ │ │ - v_colorTexCoords = a_colorTexCoords; │ │ │ │ + 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; │ │ │ │ @@ -18213,21 +18016,26 @@ │ │ │ │ #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 vec2 a_colorTexCoord; │ │ │ │ + out vec2 v_colorTexCoord; │ │ │ │ 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 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 │ │ │ │ @@ -18249,20 +18057,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 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 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ + vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ + v_colorTexCoord = a_colorTexCoord; │ │ │ │ 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; │ │ │ │ @@ -18271,29 +18077,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 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 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 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 │ │ │ │ @@ -18315,28 +18125,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; │ │ │ │ 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; │ │ │ │ + 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)); │ │ │ │ - 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; │ │ │ │ + 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 │ │ │ │ @@ -18347,26 +18153,31 @@ │ │ │ │ #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 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_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; │ │ │ │ @@ -18389,28 +18200,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; │ │ │ │ - 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; │ │ │ │ + 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; │ │ │ │ @@ -18418,26 +18225,21 @@ │ │ │ │ #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; │ │ │ │ - out vec2 v_colorTexCoord; │ │ │ │ + #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 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 │ │ │ │ @@ -18459,18 +18261,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() │ │ │ │ - vec2 transformedAxisPos = (vec4(a_position.xy, 0.0, 1.0) * u_modelView).xy; │ │ │ │ - vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection; │ │ │ │ - v_colorTexCoord = a_colorTexCoord; │ │ │ │ + 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; │ │ │ │ @@ -18479,23 +18283,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_color; │ │ │ │ - out vec4 v_color; │ │ │ │ + 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 vec4 u_params; │ │ │ │ - uniform float u_lineHalfWidth; │ │ │ │ - uniform float u_maxRadius; │ │ │ │ + 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 │ │ │ │ @@ -18517,23 +18331,80 @@ │ │ │ │ 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; │ │ │ │ + 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; │ │ │ │ + #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; │ │ │ │ @@ -18542,24 +18413,32 @@ │ │ │ │ #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 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_params; │ │ │ │ - uniform float u_lineHalfWidth; │ │ │ │ - uniform float u_maxRadius; │ │ │ │ + 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 │ │ │ │ @@ -18582,24 +18461,26 @@ │ │ │ │ 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 (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; │ │ │ │ + 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); │ │ │ │ - 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; │ │ │ │ @@ -18608,24 +18489,27 @@ │ │ │ │ #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_offsets; │ │ │ │ - out vec4 v_color; │ │ │ │ + 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 vec4 u_params; │ │ │ │ - uniform float u_lineHalfWidth; │ │ │ │ - uniform float u_maxRadius; │ │ │ │ + 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 │ │ │ │ @@ -18647,23 +18531,144 @@ │ │ │ │ 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); │ │ │ │ - v_color = a_color; │ │ │ │ + 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 │ │ │ │ + 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 vec4 v_coords; │ │ │ │ + in vec4 v_offset0; │ │ │ │ + in vec4 v_offset1; │ │ │ │ + in vec4 v_offset2; │ │ │ │ + out vec4 v_FragColor; │ │ │ │ + uniform vec4 u_framebufferMetrics; │ │ │ │ + uniform sampler2D u_colorTex; │ │ │ │ + uniform sampler2D u_smaaArea; │ │ │ │ + uniform sampler2D u_smaaSearch; │ │ │ │ + #define SMAA_SEARCHTEX_SIZE vec2(66.0, 33.0) │ │ │ │ + #define SMAA_SEARCHTEX_PACKED_SIZE vec2(64.0, 16.0) │ │ │ │ + #define SMAA_AREATEX_MAX_DISTANCE 16.0 │ │ │ │ + #define SMAA_AREATEX_PIXEL_SIZE (vec2(1.0 / 256.0, 1.0 / 1024.0)) │ │ │ │ + #define SMAALoopBegin(condition) while (condition) { │ │ │ │ + #define SMAALoopEnd } │ │ │ │ + #define SMAASampleLevelZero(tex, coord) textureLod(tex, coord, 0.0) │ │ │ │ + #define SMAASampleLevelZeroOffset(tex, coord, offset) textureLodOffset(tex, coord, 0.0, offset) │ │ │ │ + #define SMAARound(v) round((v)) │ │ │ │ + #define SMAAOffset(x,y) ivec2(x,y) │ │ │ │ + const vec2 kAreaTexMaxDistance = vec2(SMAA_AREATEX_MAX_DISTANCE, SMAA_AREATEX_MAX_DISTANCE); │ │ │ │ + const float kActivationThreshold = 0.8281; │ │ │ │ + float SMAASearchLength(vec2 e, float offset) │ │ │ │ + vec2 scale = SMAA_SEARCHTEX_SIZE * vec2(0.5, -1.0); │ │ │ │ + vec2 bias = SMAA_SEARCHTEX_SIZE * vec2(offset, 1.0); │ │ │ │ + scale += vec2(-1.0, 1.0); │ │ │ │ + bias += vec2( 0.5, -0.5); │ │ │ │ + scale *= 1.0 / SMAA_SEARCHTEX_PACKED_SIZE; │ │ │ │ + bias *= 1.0 / SMAA_SEARCHTEX_PACKED_SIZE; │ │ │ │ + return SMAASampleLevelZero(u_smaaSearch, scale * e + bias).r; │ │ │ │ + float SMAASearchXLeft(vec2 texcoord, float end) │ │ │ │ + vec2 e = vec2(0.0, 1.0); │ │ │ │ + SMAALoopBegin(texcoord.x > end && e.g > kActivationThreshold && e.r == 0.0) │ │ │ │ + e = SMAASampleLevelZero(u_colorTex, texcoord).rg; │ │ │ │ + texcoord = vec2(-2.0, 0.0) * u_framebufferMetrics.xy + texcoord; │ │ │ │ + SMAALoopEnd │ │ │ │ + float offset = 3.25 - (255.0 / 127.0) * SMAASearchLength(e, 0.0); │ │ │ │ + return u_framebufferMetrics.x * offset + texcoord.x; │ │ │ │ + float SMAASearchXRight(vec2 texcoord, float end) │ │ │ │ + vec2 e = vec2(0.0, 1.0); │ │ │ │ + SMAALoopBegin(texcoord.x < end && e.g > kActivationThreshold && e.r == 0.0) │ │ │ │ + e = SMAASampleLevelZero(u_colorTex, texcoord).rg; │ │ │ │ + texcoord = vec2(2.0, 0.0) * u_framebufferMetrics.xy + texcoord; │ │ │ │ + SMAALoopEnd │ │ │ │ + float offset = 3.25 - (255.0 / 127.0) * SMAASearchLength(e, 0.5); │ │ │ │ + return -u_framebufferMetrics.x * offset + texcoord.x; │ │ │ │ + float SMAASearchYUp(vec2 texcoord, float end) │ │ │ │ + vec2 e = vec2(1.0, 0.0); │ │ │ │ + SMAALoopBegin(texcoord.y > end && e.r > kActivationThreshold && e.g == 0.0) │ │ │ │ + e = SMAASampleLevelZero(u_colorTex, texcoord).rg; │ │ │ │ + texcoord = vec2(0.0, -2.0) * u_framebufferMetrics.xy + texcoord; │ │ │ │ + SMAALoopEnd │ │ │ │ + float offset = 3.25 - (255.0 / 127.0) * SMAASearchLength(e.gr, 0.0); │ │ │ │ + return u_framebufferMetrics.y * offset + texcoord.y; │ │ │ │ + float SMAASearchYDown(vec2 texcoord, float end) │ │ │ │ + vec2 e = vec2(1.0, 0.0); │ │ │ │ + SMAALoopBegin(texcoord.y < end && e.r > kActivationThreshold && e.g == 0.0) │ │ │ │ + e = SMAASampleLevelZero(u_colorTex, texcoord).rg; │ │ │ │ + texcoord = vec2(0.0, 2.0) * u_framebufferMetrics.xy + texcoord; │ │ │ │ + SMAALoopEnd │ │ │ │ + float offset = 3.25 - (255.0 / 127.0) * SMAASearchLength(e.gr, 0.5); │ │ │ │ + return -u_framebufferMetrics.y * offset + texcoord.y; │ │ │ │ + vec2 SMAAArea(vec2 dist, float e1, float e2) │ │ │ │ + vec2 texcoord = kAreaTexMaxDistance * SMAARound(4.0 * vec2(e1, e2)) + dist; │ │ │ │ + texcoord = SMAA_AREATEX_PIXEL_SIZE * (texcoord + 0.5); │ │ │ │ + return SMAASampleLevelZero(u_smaaArea, texcoord).rg; │ │ │ │ + const float kShapeCoordScalar = 1000.0; │ │ │ │ + void main() │ │ │ │ + vec4 weights = vec4(0.0, 0.0, 0.0, 0.0); │ │ │ │ + vec2 e = texture(u_colorTex, v_coords.xy).rg; │ │ │ │ + if (e.g > 0.0) // Edge at north │ │ │ │ + vec2 d; │ │ │ │ + vec3 coords; │ │ │ │ + coords.x = SMAASearchXLeft(v_offset0.xy, v_offset2.x); │ │ │ │ + coords.y = v_offset1.y; │ │ │ │ + d.x = coords.x; │ │ │ │ + float e1 = SMAASampleLevelZero(u_colorTex, coords.xy).r; │ │ │ │ + coords.z = SMAASearchXRight(v_offset0.zw, v_offset2.y); │ │ │ │ + d.y = coords.z; │ │ │ │ + vec2 zz = u_framebufferMetrics.zz; │ │ │ │ + d = abs(SMAARound(zz * d - v_coords.zz)); │ │ │ │ + vec2 sqrt_d = sqrt(d); │ │ │ │ + float e2 = SMAASampleLevelZeroOffset(u_colorTex, coords.zy, SMAAOffset(1, 0)).r; │ │ │ │ + weights.rg = SMAAArea(sqrt_d, e1, e2); │ │ │ │ + if (e.r > 0.0) // Edge at west │ │ │ │ + vec2 d; │ │ │ │ + vec3 coords; │ │ │ │ + coords.y = SMAASearchYUp(v_offset1.xy, v_offset2.z); │ │ │ │ + coords.x = v_offset0.x; │ │ │ │ + d.x = coords.y; │ │ │ │ + float e1 = SMAASampleLevelZero(u_colorTex, coords.xy).g; │ │ │ │ + coords.z = SMAASearchYDown(v_offset1.zw, v_offset2.w); │ │ │ │ + d.y = coords.z; │ │ │ │ + vec2 ww = u_framebufferMetrics.ww; │ │ │ │ + d = abs(SMAARound(ww * d - v_coords.ww)); │ │ │ │ + vec2 sqrt_d = sqrt(d); │ │ │ │ + float e2 = SMAASampleLevelZeroOffset(u_colorTex, coords.xz, SMAAOffset(0, 1)).g; │ │ │ │ + weights.ba = SMAAArea(sqrt_d, e1, e2); │ │ │ │ + v_FragColor = weights; │ │ │ │ #ifdef GL_ES │ │ │ │ #ifdef GL_FRAGMENT_PRECISION_HIGH │ │ │ │ #define MAXPREC highp │ │ │ │ #else │ │ │ │ #define MAXPREC mediump │ │ │ │ #endif │ │ │ │ precision MAXPREC float; │ │ │ │ @@ -18672,27 +18677,23 @@ │ │ │ │ #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_normal; │ │ │ │ in vec4 a_color; │ │ │ │ - out vec4 v_texCoords; │ │ │ │ - out vec4 v_maskColor; │ │ │ │ + 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 │ │ │ │ @@ -18714,25 +18715,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_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; │ │ │ │ + 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; │ │ │ │ @@ -18740,28 +18739,32 @@ │ │ │ │ #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 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 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 │ │ │ │ @@ -18783,25 +18786,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_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; │ │ │ │ + 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); │ │ │ │ *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 {} │ │ │ │ @@ -2322238,16 +2322238,16 @@ │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,866 │ │ │ │ sd a5,264(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,264(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-1590 │ │ │ │ - auipc a3,0x278 │ │ │ │ - addi a3,a3,834 │ │ │ │ + auipc a3,0x27a │ │ │ │ + addi a3,a3,-454 │ │ │ │ addi a1,sp,888 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1176 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,952 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322260,16 +2322260,16 @@ │ │ │ │ addi a1,a1,838 │ │ │ │ sd a5,312(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,312(sp) │ │ │ │ ld a1,288(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-228 │ │ │ │ - auipc a3,0x289 │ │ │ │ - addi a3,a3,668 │ │ │ │ + auipc a3,0x275 │ │ │ │ + addi a3,a3,-1260 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1164 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1016 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,804 │ │ │ │ @@ -2322281,16 +2322281,16 @@ │ │ │ │ addi a1,a1,808 │ │ │ │ sd a5,360(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,360(sp) │ │ │ │ ld a1,336(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,566 │ │ │ │ - auipc a3,0x27c │ │ │ │ - addi a3,a3,262 │ │ │ │ + auipc a3,0x277 │ │ │ │ + addi a3,a3,1182 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1154 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1080 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,780 │ │ │ │ @@ -2322302,16 +2322302,16 @@ │ │ │ │ addi a1,a1,776 │ │ │ │ sd a5,408(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,408(sp) │ │ │ │ ld a1,384(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,1454 │ │ │ │ - auipc a3,0x290 │ │ │ │ - addi a3,a3,-1914 │ │ │ │ + auipc a3,0x277 │ │ │ │ + addi a3,a3,-1658 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1146 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1144 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,708 │ │ │ │ @@ -2322323,16 +2322323,16 @@ │ │ │ │ addi a1,a1,704 │ │ │ │ sd a5,456(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,456(sp) │ │ │ │ ld a1,432(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,1382 │ │ │ │ - auipc a3,0x290 │ │ │ │ - addi a3,a3,-1986 │ │ │ │ + auipc a3,0x277 │ │ │ │ + addi a3,a3,-1730 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1138 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1208 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,668 │ │ │ │ @@ -2322344,16 +2322344,16 @@ │ │ │ │ addi a1,a1,672 │ │ │ │ sd a5,504(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,504(sp) │ │ │ │ ld a1,480(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,-1650 │ │ │ │ - auipc a3,0x287 │ │ │ │ - addi a3,a3,-506 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,-1914 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1130 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1272 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,636 │ │ │ │ @@ -2322365,16 +2322365,16 @@ │ │ │ │ addi a1,a1,598 │ │ │ │ sd a5,552(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,552(sp) │ │ │ │ ld a1,528(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,-1730 │ │ │ │ - auipc a3,0x286 │ │ │ │ - addi a3,a3,-1914 │ │ │ │ + auipc a3,0x284 │ │ │ │ + addi a3,a3,-826 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1130 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1336 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,572 │ │ │ │ @@ -2322386,16 +2322386,16 @@ │ │ │ │ addi a1,a1,574 │ │ │ │ sd a5,600(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,600(sp) │ │ │ │ ld a1,576(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,-562 │ │ │ │ - auipc a3,0x288 │ │ │ │ - addi a3,a3,1302 │ │ │ │ + auipc a3,0x286 │ │ │ │ + addi a3,a3,982 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1130 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1400 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,492 │ │ │ │ @@ -2322407,16 +2322407,16 @@ │ │ │ │ addi a1,a1,494 │ │ │ │ sd a5,648(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,648(sp) │ │ │ │ ld a1,624(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,-642 │ │ │ │ - auipc a3,0x288 │ │ │ │ - addi a3,a3,1222 │ │ │ │ + auipc a3,0x286 │ │ │ │ + addi a3,a3,902 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1130 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1464 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,460 │ │ │ │ @@ -2322428,16 +2322428,16 @@ │ │ │ │ addi a1,a1,454 │ │ │ │ sd a5,696(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,696(sp) │ │ │ │ ld a1,672(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,486 │ │ │ │ - auipc a3,0x273 │ │ │ │ - addi a3,a3,686 │ │ │ │ + auipc a3,0x287 │ │ │ │ + addi a3,a3,-258 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1130 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1528 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,380 │ │ │ │ @@ -2322449,16 +2322449,16 @@ │ │ │ │ addi a1,a1,374 │ │ │ │ sd a5,744(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,744(sp) │ │ │ │ ld a1,720(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,406 │ │ │ │ - auipc a3,0x273 │ │ │ │ - addi a3,a3,606 │ │ │ │ + auipc a3,0x287 │ │ │ │ + addi a3,a3,-338 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1130 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1592 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,332 │ │ │ │ @@ -2322470,16 +2322470,16 @@ │ │ │ │ addi a1,a1,326 │ │ │ │ sd a5,792(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,792(sp) │ │ │ │ ld a1,768(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,1342 │ │ │ │ - auipc a3,0x274 │ │ │ │ - addi a3,a3,-1058 │ │ │ │ + auipc a3,0x28d │ │ │ │ + addi a3,a3,1854 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1130 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1656 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,284 │ │ │ │ @@ -2322491,31 +2322491,31 @@ │ │ │ │ addi a1,a1,214 │ │ │ │ sd a5,832(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,832(sp) │ │ │ │ ld a1,816(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,246 │ │ │ │ - auipc a3,0x274 │ │ │ │ - addi a3,a3,1766 │ │ │ │ + auipc a3,0x27b │ │ │ │ + addi a3,a3,1982 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1130 │ │ │ │ jal 6f0968 │ │ │ │ addi a0,sp,1720 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,1246 │ │ │ │ jal 6e4d6a │ │ │ │ addi a0,sp,1752 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,1254 │ │ │ │ jal 6e4d6a │ │ │ │ auipc a4,0x26b │ │ │ │ addi a4,a4,-1966 │ │ │ │ - auipc a3,0x27b │ │ │ │ - addi a3,a3,618 │ │ │ │ + auipc a3,0x28d │ │ │ │ + addi a3,a3,-1190 │ │ │ │ addi a2,sp,1752 │ │ │ │ addi a1,sp,1720 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1118 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1784 │ │ │ │ mv a0,a5 │ │ │ │ @@ -2322529,16 +2322529,16 @@ │ │ │ │ addi a1,a1,164 │ │ │ │ sd a5,24(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,24(sp) │ │ │ │ ld a1,8(sp) │ │ │ │ auipc a4,0x26b │ │ │ │ addi a4,a4,-1054 │ │ │ │ - auipc a3,0x28e │ │ │ │ - addi a3,a3,114 │ │ │ │ + auipc a3,0x280 │ │ │ │ + addi a3,a3,-574 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1110 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1848 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,136 │ │ │ │ @@ -2322550,16 +2322550,16 @@ │ │ │ │ addi a1,a1,132 │ │ │ │ sd a5,56(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,56(sp) │ │ │ │ ld a1,40(sp) │ │ │ │ auipc a4,0x26b │ │ │ │ addi a4,a4,-254 │ │ │ │ - auipc a3,0x279 │ │ │ │ - addi a3,a3,954 │ │ │ │ + auipc a3,0x278 │ │ │ │ + addi a3,a3,-1438 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1102 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1912 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,96 │ │ │ │ @@ -2322571,16 +2322571,16 @@ │ │ │ │ addi a1,a1,-292 │ │ │ │ sd a5,88(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,88(sp) │ │ │ │ ld a1,72(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-1358 │ │ │ │ - auipc a3,0x27e │ │ │ │ - addi a3,a3,-1302 │ │ │ │ + auipc a3,0x27b │ │ │ │ + addi a3,a3,-894 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1094 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,1976 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,-144 │ │ │ │ @@ -2322592,16 +2322592,16 @@ │ │ │ │ addi a1,a1,-148 │ │ │ │ sd a5,120(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,120(sp) │ │ │ │ ld a1,104(sp) │ │ │ │ auipc a4,0x26a │ │ │ │ addi a4,a4,-110 │ │ │ │ - auipc a3,0x273 │ │ │ │ - addi a3,a3,90 │ │ │ │ + auipc a3,0x287 │ │ │ │ + addi a3,a3,-854 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1086 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2040 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,936 │ │ │ │ @@ -2322614,16 +2322614,16 @@ │ │ │ │ addi a1,a1,938 │ │ │ │ sd a5,152(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,152(sp) │ │ │ │ ld a1,136(sp) │ │ │ │ auipc a4,0x26b │ │ │ │ addi a4,a4,504 │ │ │ │ - auipc a3,0x277 │ │ │ │ - addi a3,a3,-1464 │ │ │ │ + auipc a3,0x273 │ │ │ │ + addi a3,a3,16 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,57 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322637,16 +2322637,16 @@ │ │ │ │ addi a1,a1,-110 │ │ │ │ sd a5,184(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,184(sp) │ │ │ │ ld a1,168(sp) │ │ │ │ auipc a4,0x26b │ │ │ │ addi a4,a4,1752 │ │ │ │ - auipc a3,0x27a │ │ │ │ - addi a3,a3,-504 │ │ │ │ + auipc a3,0x28b │ │ │ │ + addi a3,a3,1704 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,121 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322660,16 +2322660,16 @@ │ │ │ │ addi a1,a1,-142 │ │ │ │ sd a5,216(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,216(sp) │ │ │ │ ld a1,200(sp) │ │ │ │ auipc a4,0x26c │ │ │ │ addi a4,a4,-1320 │ │ │ │ - auipc a3,0x28a │ │ │ │ - addi a3,a3,-32 │ │ │ │ + auipc a3,0x275 │ │ │ │ + addi a3,a3,-328 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,185 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322683,16 +2322683,16 @@ │ │ │ │ addi a1,a1,-182 │ │ │ │ sd a5,248(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,248(sp) │ │ │ │ ld a1,232(sp) │ │ │ │ auipc a4,0x26c │ │ │ │ addi a4,a4,-576 │ │ │ │ - auipc a3,0x281 │ │ │ │ - addi a3,a3,-168 │ │ │ │ + auipc a3,0x27f │ │ │ │ + addi a3,a3,640 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,249 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322706,16 +2322706,16 @@ │ │ │ │ addi a1,a1,-222 │ │ │ │ sd a5,296(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,296(sp) │ │ │ │ ld a1,272(sp) │ │ │ │ auipc a4,0x26c │ │ │ │ addi a4,a4,168 │ │ │ │ - auipc a3,0x27e │ │ │ │ - addi a3,a3,824 │ │ │ │ + auipc a3,0x285 │ │ │ │ + addi a3,a3,1496 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,313 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322729,16 +2322729,16 @@ │ │ │ │ addi a1,a1,-302 │ │ │ │ sd a5,344(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,344(sp) │ │ │ │ ld a1,320(sp) │ │ │ │ auipc a4,0x26c │ │ │ │ addi a4,a4,88 │ │ │ │ - auipc a3,0x27d │ │ │ │ - addi a3,a3,-416 │ │ │ │ + auipc a3,0x280 │ │ │ │ + addi a3,a3,1480 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,377 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322752,16 +2322752,16 @@ │ │ │ │ addi a1,a1,-318 │ │ │ │ sd a5,392(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,392(sp) │ │ │ │ ld a1,368(sp) │ │ │ │ auipc a4,0x26c │ │ │ │ addi a4,a4,880 │ │ │ │ - auipc a3,0x281 │ │ │ │ - addi a3,a3,1944 │ │ │ │ + auipc a3,0x288 │ │ │ │ + addi a3,a3,-416 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,441 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322775,16 +2322775,16 @@ │ │ │ │ addi a1,a1,-358 │ │ │ │ sd a5,440(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,440(sp) │ │ │ │ ld a1,416(sp) │ │ │ │ auipc a4,0x26c │ │ │ │ addi a4,a4,1952 │ │ │ │ - auipc a3,0x28d │ │ │ │ - addi a3,a3,760 │ │ │ │ + auipc a3,0x28f │ │ │ │ + addi a3,a3,608 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,505 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322798,16 +2322798,16 @@ │ │ │ │ addi a1,a1,-398 │ │ │ │ sd a5,488(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,488(sp) │ │ │ │ ld a1,464(sp) │ │ │ │ auipc a4,0x26d │ │ │ │ addi a4,a4,-1752 │ │ │ │ - auipc a3,0x28e │ │ │ │ - addi a3,a3,1928 │ │ │ │ + auipc a3,0x283 │ │ │ │ + addi a3,a3,-856 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1080 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,569 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322821,16 +2322821,16 @@ │ │ │ │ addi a1,a1,-440 │ │ │ │ sd a5,536(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,536(sp) │ │ │ │ ld a1,512(sp) │ │ │ │ auipc a4,0x26d │ │ │ │ addi a4,a4,-960 │ │ │ │ - auipc a3,0x27f │ │ │ │ - addi a3,a3,-1248 │ │ │ │ + auipc a3,0x289 │ │ │ │ + addi a3,a3,832 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1088 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,633 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322844,16 +2322844,16 @@ │ │ │ │ addi a1,a1,-512 │ │ │ │ sd a5,584(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,584(sp) │ │ │ │ ld a1,560(sp) │ │ │ │ auipc a4,0x26d │ │ │ │ addi a4,a4,872 │ │ │ │ - auipc a3,0x27f │ │ │ │ - addi a3,a3,-1336 │ │ │ │ + auipc a3,0x289 │ │ │ │ + addi a3,a3,744 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1096 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,697 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322867,16 +2322867,16 @@ │ │ │ │ addi a1,a1,-568 │ │ │ │ sd a5,632(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,632(sp) │ │ │ │ ld a1,608(sp) │ │ │ │ auipc a4,0x26e │ │ │ │ addi a4,a4,-1632 │ │ │ │ - auipc a3,0x27f │ │ │ │ - addi a3,a3,1640 │ │ │ │ + auipc a3,0x290 │ │ │ │ + addi a3,a3,-1232 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1104 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,761 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322890,16 +2322890,16 @@ │ │ │ │ addi a1,a1,-616 │ │ │ │ sd a5,680(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,680(sp) │ │ │ │ ld a1,656(sp) │ │ │ │ auipc a4,0x26e │ │ │ │ addi a4,a4,-544 │ │ │ │ - auipc a3,0x280 │ │ │ │ - addi a3,a3,312 │ │ │ │ + auipc a3,0x28a │ │ │ │ + addi a3,a3,-464 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1112 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,825 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322913,16 +2322913,16 @@ │ │ │ │ addi a1,a1,-656 │ │ │ │ sd a5,728(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,728(sp) │ │ │ │ ld a1,704(sp) │ │ │ │ auipc a4,0x26e │ │ │ │ addi a4,a4,824 │ │ │ │ - auipc a3,0x277 │ │ │ │ - addi a3,a3,80 │ │ │ │ + auipc a3,0x281 │ │ │ │ + addi a3,a3,-632 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1120 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,889 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322936,16 +2322936,16 @@ │ │ │ │ addi a1,a1,-1520 │ │ │ │ sd a5,776(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,776(sp) │ │ │ │ ld a1,752(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-848 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,-120 │ │ │ │ + auipc a3,0x276 │ │ │ │ + addi a3,a3,136 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1128 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,953 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2322959,16 +2322959,16 @@ │ │ │ │ addi a1,a1,-1608 │ │ │ │ sd a5,824(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,824(sp) │ │ │ │ ld a1,800(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-936 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,-208 │ │ │ │ + auipc a3,0x276 │ │ │ │ + addi a3,a3,48 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1136 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1017 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323028,16 +2323028,16 @@ │ │ │ │ addi a1,a1,-982 │ │ │ │ sd a5,48(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,48(sp) │ │ │ │ ld a1,32(sp) │ │ │ │ auipc a4,0x270 │ │ │ │ addi a4,a4,-1712 │ │ │ │ - auipc a3,0x275 │ │ │ │ - addi a3,a3,-1592 │ │ │ │ + auipc a3,0x28c │ │ │ │ + addi a3,a3,-1208 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1209 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323051,16 +2323051,16 @@ │ │ │ │ addi a1,a1,-1022 │ │ │ │ sd a5,80(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,80(sp) │ │ │ │ ld a1,64(sp) │ │ │ │ auipc a4,0x270 │ │ │ │ addi a4,a4,-1032 │ │ │ │ - auipc a3,0x276 │ │ │ │ - addi a3,a3,-1320 │ │ │ │ + auipc a3,0x279 │ │ │ │ + addi a3,a3,-1656 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1273 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323074,16 +2323074,16 @@ │ │ │ │ addi a1,a1,-1054 │ │ │ │ sd a5,112(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,112(sp) │ │ │ │ ld a1,96(sp) │ │ │ │ auipc a4,0x270 │ │ │ │ addi a4,a4,-232 │ │ │ │ - auipc a3,0x275 │ │ │ │ - addi a3,a3,488 │ │ │ │ + auipc a3,0x27a │ │ │ │ + addi a3,a3,-816 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1337 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323097,16 +2323097,16 @@ │ │ │ │ addi a1,a1,-1110 │ │ │ │ sd a5,144(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,144(sp) │ │ │ │ ld a1,128(sp) │ │ │ │ auipc a4,0x270 │ │ │ │ addi a4,a4,328 │ │ │ │ - auipc a3,0x275 │ │ │ │ - addi a3,a3,408 │ │ │ │ + auipc a3,0x27a │ │ │ │ + addi a3,a3,-896 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1401 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323120,16 +2323120,16 @@ │ │ │ │ addi a1,a1,1794 │ │ │ │ sd a5,176(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,176(sp) │ │ │ │ ld a1,160(sp) │ │ │ │ auipc a4,0x268 │ │ │ │ addi a4,a4,-664 │ │ │ │ - auipc a3,0x278 │ │ │ │ - addi a3,a3,312 │ │ │ │ + auipc a3,0x27c │ │ │ │ + addi a3,a3,768 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1465 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323143,16 +2323143,16 @@ │ │ │ │ addi a1,a1,1754 │ │ │ │ sd a5,208(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,208(sp) │ │ │ │ ld a1,192(sp) │ │ │ │ auipc a4,0x268 │ │ │ │ addi a4,a4,688 │ │ │ │ - auipc a3,0x289 │ │ │ │ - addi a3,a3,-144 │ │ │ │ + auipc a3,0x27c │ │ │ │ + addi a3,a3,-1776 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1529 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323166,16 +2323166,16 @@ │ │ │ │ addi a1,a1,1714 │ │ │ │ sd a5,240(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,240(sp) │ │ │ │ ld a1,224(sp) │ │ │ │ auipc a4,0x268 │ │ │ │ addi a4,a4,1472 │ │ │ │ - auipc a3,0x27c │ │ │ │ - addi a3,a3,-464 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,-1864 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1593 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323189,16 +2323189,16 @@ │ │ │ │ addi a1,a1,1674 │ │ │ │ sd a5,280(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,280(sp) │ │ │ │ ld a1,256(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-1744 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,1752 │ │ │ │ + auipc a3,0x284 │ │ │ │ + addi a3,a3,-1120 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1657 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323212,16 +2323212,16 @@ │ │ │ │ addi a1,a1,1594 │ │ │ │ sd a5,328(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,328(sp) │ │ │ │ ld a1,304(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-1824 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,1672 │ │ │ │ + auipc a3,0x284 │ │ │ │ + addi a3,a3,-1200 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1721 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323235,16 +2323235,16 @@ │ │ │ │ addi a1,a1,1514 │ │ │ │ sd a5,376(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,376(sp) │ │ │ │ ld a1,352(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-1904 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,1592 │ │ │ │ + auipc a3,0x284 │ │ │ │ + addi a3,a3,-1280 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1785 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323258,16 +2323258,16 @@ │ │ │ │ addi a1,a1,1434 │ │ │ │ sd a5,424(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,424(sp) │ │ │ │ ld a1,400(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-1984 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,1512 │ │ │ │ + auipc a3,0x284 │ │ │ │ + addi a3,a3,-1360 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1849 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323281,16 +2323281,16 @@ │ │ │ │ addi a1,a1,1394 │ │ │ │ sd a5,472(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,472(sp) │ │ │ │ ld a1,448(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-928 │ │ │ │ - auipc a3,0x287 │ │ │ │ - addi a3,a3,-856 │ │ │ │ + auipc a3,0x282 │ │ │ │ + addi a3,a3,-1544 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1144 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1913 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323304,16 +2323304,16 @@ │ │ │ │ addi a1,a1,1314 │ │ │ │ sd a5,520(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,520(sp) │ │ │ │ ld a1,496(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-1012 │ │ │ │ - auipc a3,0x285 │ │ │ │ - addi a3,a3,1484 │ │ │ │ + auipc a3,0x278 │ │ │ │ + addi a3,a3,-1188 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1148 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1977 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323327,16 +2323327,16 @@ │ │ │ │ addi a1,a1,-1708 │ │ │ │ sd a5,568(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,568(sp) │ │ │ │ ld a1,544(sp) │ │ │ │ auipc a4,0x270 │ │ │ │ addi a4,a4,180 │ │ │ │ - auipc a3,0x28b │ │ │ │ - addi a3,a3,-1732 │ │ │ │ + auipc a3,0x275 │ │ │ │ + addi a3,a3,-420 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1156 │ │ │ │ jal 6f0968 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,2041 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323351,16 +2323351,16 @@ │ │ │ │ addi a1,a1,-1754 │ │ │ │ sd a5,616(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,616(sp) │ │ │ │ ld a1,592(sp) │ │ │ │ auipc a4,0x270 │ │ │ │ addi a4,a4,1782 │ │ │ │ - auipc a3,0x28c │ │ │ │ - addi a3,a3,366 │ │ │ │ + auipc a3,0x288 │ │ │ │ + addi a3,a3,606 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1162 │ │ │ │ jal 6f0968 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,56 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2323376,16 +2323376,16 @@ │ │ │ │ addi a1,a1,-1794 │ │ │ │ sd a5,664(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,664(sp) │ │ │ │ ld a1,640(sp) │ │ │ │ auipc a4,0x271 │ │ │ │ addi a4,a4,-1530 │ │ │ │ - auipc a3,0x28b │ │ │ │ - addi a3,a3,1358 │ │ │ │ + auipc a3,0x273 │ │ │ │ + addi a3,a3,-90 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1170 │ │ │ │ jal 6f0968 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,120 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2323402,15 +2323402,15 @@ │ │ │ │ sd a5,712(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,712(sp) │ │ │ │ ld a1,688(sp) │ │ │ │ auipc a4,0x271 │ │ │ │ addi a4,a4,-378 │ │ │ │ auipc a3,0x28a │ │ │ │ - addi a3,a3,-386 │ │ │ │ + addi a3,a3,574 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1178 │ │ │ │ jal 6f0968 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,184 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2323427,15 +2323427,15 @@ │ │ │ │ sd a5,760(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,760(sp) │ │ │ │ ld a1,736(sp) │ │ │ │ auipc a4,0x271 │ │ │ │ addi a4,a4,70 │ │ │ │ auipc a3,0x28a │ │ │ │ - addi a3,a3,-474 │ │ │ │ + addi a3,a3,486 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1186 │ │ │ │ jal 6f0968 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,248 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2323451,16 +2323451,16 @@ │ │ │ │ addi a1,a1,-1938 │ │ │ │ sd a5,808(sp) │ │ │ │ jal 6e4d6a │ │ │ │ ld a2,808(sp) │ │ │ │ ld a1,784(sp) │ │ │ │ auipc a4,0x271 │ │ │ │ addi a4,a4,534 │ │ │ │ - auipc a3,0x284 │ │ │ │ - addi a3,a3,-1986 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,-314 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1194 │ │ │ │ jal 6f0968 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,312 │ │ │ │ add a0,sp,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ @@ -2323470,18 +2323470,18 @@ │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,344 │ │ │ │ add a0,sp,a5 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,-1978 │ │ │ │ add s7,sp,a5 │ │ │ │ jal 6e4d6a │ │ │ │ - auipc a4,0x282 │ │ │ │ - addi a4,a4,-1554 │ │ │ │ - auipc a3,0x283 │ │ │ │ - addi a3,a3,-546 │ │ │ │ + auipc a4,0x28d │ │ │ │ + addi a4,a4,1182 │ │ │ │ + auipc a3,0x287 │ │ │ │ + addi a3,a3,-1490 │ │ │ │ mv a2,s7 │ │ │ │ mv a1,s8 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1198 │ │ │ │ jal 6f0968 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,376 │ │ │ │ @@ -2323495,16 +2323495,16 @@ │ │ │ │ add s0,sp,a5 │ │ │ │ mv a0,s0 │ │ │ │ auipc a1,0x1e7 │ │ │ │ addi a1,a1,-2016 │ │ │ │ jal 6e4d6a │ │ │ │ auipc a4,0x272 │ │ │ │ addi a4,a4,-1892 │ │ │ │ - auipc a3,0x284 │ │ │ │ - addi a3,a3,148 │ │ │ │ + auipc a3,0x281 │ │ │ │ + addi a3,a3,-284 │ │ │ │ mv a2,s0 │ │ │ │ mv a1,s6 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1200 │ │ │ │ jal 6f0968 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,440 │ │ │ │ @@ -2323518,16 +2323518,16 @@ │ │ │ │ add s1,sp,a5 │ │ │ │ mv a0,s1 │ │ │ │ auipc a1,0x1e6 │ │ │ │ addi a1,a1,2032 │ │ │ │ jal 6e4d6a │ │ │ │ auipc a4,0x272 │ │ │ │ addi a4,a4,-340 │ │ │ │ - auipc a3,0x27a │ │ │ │ - addi a3,a3,-1052 │ │ │ │ + auipc a3,0x284 │ │ │ │ + addi a3,a3,516 │ │ │ │ mv a2,s1 │ │ │ │ mv a1,s2 │ │ │ │ auipc a0,0x4b6 │ │ │ │ addi a0,a0,-1200 │ │ │ │ jal 6f0968 │ │ │ │ auipc a2,0x4a8 │ │ │ │ addi a2,a2,-1092 │ │ │ │ @@ -2679229,15 +2679229,15 @@ │ │ │ │ ld ra,8(sp) │ │ │ │ sd a2,8(s0) │ │ │ │ mv a0,s0 │ │ │ │ ld s0,0(sp) │ │ │ │ addi sp,sp,16 │ │ │ │ ret │ │ │ │ lui a0,0x40 │ │ │ │ - addi a0,a0,-1931 │ │ │ │ + addi a0,a0,-1929 │ │ │ │ ret │ │ │ │ beqz a0,7e3750 │ │ │ │ ld a4,0(a0) │ │ │ │ auipc a3,0xffffd │ │ │ │ addi a3,a3,-268 │ │ │ │ ld a4,32(a4) │ │ │ │ bne a4,a3,7e3752 │ │ │ ├── readelf --wide --decompress --hex-dump=.rodata {} │ │ │ │ @@ -20181,15 +20181,15 @@ │ │ │ │ 0x008dbf50 50656e64 696e6750 6f736974 696f6e00 PendingPosition. │ │ │ │ 0x008dbf60 4e6f7446 6f6c6c6f 77000000 00000000 NotFollow....... │ │ │ │ 0x008dbf70 4e6f7446 6f6c6c6f 774e6f50 6f736974 NotFollowNoPosit │ │ │ │ 0x008dbf80 696f6e00 00000000 466f6c6c 6f770000 ion.....Follow.. │ │ │ │ 0x008dbf90 466f6c6c 6f77416e 64526f74 61746500 FollowAndRotate. │ │ │ │ 0x008dbfa0 50656e64 696e6700 53414a53 414a0000 Pending.SAJSAJ.. │ │ │ │ 0x008dbfb0 46414641 46410000 25456300 00000000 FAFAFA..%Ec..... │ │ │ │ - 0x008dbfc0 32303236 2e30322e 31332d30 2d303030 2026.02.13-0-000 │ │ │ │ + 0x008dbfc0 32303236 2e30322e 31352d30 2d303030 2026.02.15-0-000 │ │ │ │ 0x008dbfd0 30303030 302d4c69 6e757800 00000000 00000-Linux..... │ │ │ │ 0x008dbfe0 3136322e 35352e31 30302e31 36390000 162.55.100.169.. │ │ │ │ 0x008dbff0 436f7272 75707465 644d776d 46696c65 CorruptedMwmFile │ │ │ │ 0x008dc000 202e2f6c 6962732f 706c6174 666f726d ./libs/platform │ │ │ │ 0x008dc010 2f6d776d 5f766572 73696f6e 2e637070 /mwm_version.cpp │ │ │ │ 0x008dc020 3a333200 00000000 494f2065 78636570 :32.....IO excep │ │ │ │ 0x008dc030 74696f6e 00000000 57726974 65206578 tion....Write ex │ │ │ │ @@ -53365,7573 +53365,7573 @@ │ │ │ │ 0x0095d950 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ 0x0095d960 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ 0x0095d970 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ 0x0095d980 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ 0x0095d990 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ 0x0095d9a0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ 0x0095d9b0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0095d9c0 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x0095d9d0 64733b20 0a202023 69666465 6620454e ds; . #ifdef EN │ │ │ │ - 0x0095d9e0 41424c45 5f565446 200a2020 6f757420 ABLE_VTF . out │ │ │ │ - 0x0095d9f0 4c4f575f 50207665 63342076 5f636f6c LOW_P vec4 v_col │ │ │ │ - 0x0095da00 6f723b20 0a202023 656c7365 200a2020 or; . #else . │ │ │ │ - 0x0095da10 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ - 0x0095da20 54657843 6f6f7264 733b200a 20202365 TexCoords; . #e │ │ │ │ - 0x0095da30 6e646966 200a2020 756e6966 6f726d20 ndif . uniform │ │ │ │ - 0x0095da40 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ - 0x0095da50 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0095da60 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ - 0x0095da70 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0095da80 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ - 0x0095da90 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x0095daa0 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ - 0x0095dab0 613b200a 2020756e 69666f72 6d20666c a; . uniform fl │ │ │ │ - 0x0095dac0 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ - 0x0095dad0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x0095dae0 755f7a53 63616c65 3b200a20 20756e69 u_zScale; . uni │ │ │ │ - 0x0095daf0 666f726d 20666c6f 61742075 5f696e74 form float u_int │ │ │ │ - 0x0095db00 6572706f 6c617469 6f6e3b20 0a202075 erpolation; . u │ │ │ │ - 0x0095db10 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x0095db20 734f7574 6c696e65 50617373 3b200a20 sOutlinePass; . │ │ │ │ - 0x0095db30 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x0095db40 5446200a 2020756e 69666f72 6d207361 TF . uniform sa │ │ │ │ - 0x0095db50 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ - 0x0095db60 65783b20 0a202023 656e6469 66200a20 ex; . #endif . │ │ │ │ - 0x0095db70 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x0095db80 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x0095db90 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x0095dba0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x0095dbb0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0095dbc0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0095dbd0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0095dbe0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x0095dbf0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x0095dc00 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x0095dc10 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x0095dc20 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095dc30 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x0095dc40 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x0095dc50 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x0095dc60 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x0095dc70 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x0095dc80 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x0095dc90 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0095dca0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x0095dcb0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x0095dcc0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x0095dcd0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x0095dce0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x0095dcf0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095dd00 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x0095dd10 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x0095dd20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095dd30 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x0095dd40 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x0095dd50 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x0095dd60 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x0095dd70 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x0095dd80 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x0095dd90 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x0095dda0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x0095ddb0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x0095ddc0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x0095ddd0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x0095dde0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x0095ddf0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x0095de00 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x0095de10 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x0095de20 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x0095de30 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0095de40 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x0095de50 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x0095de60 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x0095de70 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x0095de80 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x0095de90 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x0095dea0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x0095deb0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x0095dec0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x0095ded0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095dee0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x0095def0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x0095df00 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x0095df10 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x0095df20 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0095df30 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x0095df40 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x0095df50 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x0095df60 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x0095df70 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x0095df80 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0095df90 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x0095dfa0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x0095dfb0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x0095dfc0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x0095dfd0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x0095dfe0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x0095dff0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x0095e000 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x0095e010 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x0095e020 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x0095e030 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x0095e040 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x0095e050 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x0095e060 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x0095e070 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x0095e080 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x0095e090 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x0095e0a0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x0095e0b0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x0095e0c0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x0095e0d0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x0095e0e0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0095e0f0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x0095e100 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x0095e110 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ - 0x0095e120 28615f70 6f736974 696f6e2c 20312920 (a_position, 1) │ │ │ │ - 0x0095e130 2a20755f 6d6f6465 6c566965 77202a20 * u_modelView * │ │ │ │ - 0x0095e140 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x0095e150 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x0095e160 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x0095e170 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ - 0x0095e180 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ - 0x0095e190 3b200a20 20236966 64656620 454e4142 ; . #ifdef ENAB │ │ │ │ - 0x0095e1a0 4c455f56 5446200a 20202020 765f636f LE_VTF . v_co │ │ │ │ - 0x0095e1b0 6c6f7220 3d207465 78747572 6528755f lor = texture(u_ │ │ │ │ - 0x0095e1c0 636f6c6f 72546578 2c20615f 636f6c6f colorTex, a_colo │ │ │ │ - 0x0095e1d0 72546578 436f6f72 6473293b 200a2020 rTexCoords); . │ │ │ │ - 0x0095e1e0 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ - 0x0095e1f0 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ - 0x0095e200 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ - 0x0095e210 0a202023 656e6469 66200a20 207d200a . #endif . } . │ │ │ │ - 0x0095e220 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ - 0x0095e230 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095e240 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095e250 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095e260 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095e270 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095e280 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095e290 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095e2a0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095e2b0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095e2c0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095e2d0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095e2e0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095e2f0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095e300 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095e310 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095e320 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095e330 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095e340 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095e350 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095e360 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095e370 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0095e380 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0095e390 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ - 0x0095e3a0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0095e3b0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x0095e3c0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x0095e3d0 6f6f7264 733b200a 20206f75 7420666c oords; . out fl │ │ │ │ - 0x0095e3e0 6f617420 765f696e 74656e73 6974793b oat v_intensity; │ │ │ │ - 0x0095e3f0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x0095e400 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ - 0x0095e410 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x0095e420 70726f6a 65637469 6f6e3b20 0a202075 projection; . u │ │ │ │ - 0x0095e430 6e69666f 726d206d 61743420 755f7069 niform mat4 u_pi │ │ │ │ - 0x0095e440 766f7454 72616e73 666f726d 3b200a20 votTransform; . │ │ │ │ - 0x0095e450 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x0095e460 636f6e74 72617374 47616d6d 613b200a contrastGamma; . │ │ │ │ - 0x0095e470 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x0095e480 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ - 0x0095e490 69666f72 6d20666c 6f617420 755f7a53 iform float u_zS │ │ │ │ - 0x0095e4a0 63616c65 3b200a20 20756e69 666f726d cale; . uniform │ │ │ │ - 0x0095e4b0 20666c6f 61742075 5f696e74 6572706f float u_interpo │ │ │ │ - 0x0095e4c0 6c617469 6f6e3b20 0a202075 6e69666f lation; . unifo │ │ │ │ - 0x0095e4d0 726d2066 6c6f6174 20755f69 734f7574 rm float u_isOut │ │ │ │ - 0x0095e4e0 6c696e65 50617373 3b200a20 20636f6e linePass; . con │ │ │ │ - 0x0095e4f0 73742076 65633420 6b4e6f72 6d616c69 st vec4 kNormali │ │ │ │ - 0x0095e500 7a65644c 69676874 44697220 3d207665 zedLightDir = ve │ │ │ │ - 0x0095e510 63342830 2e333136 322c2030 2e302c20 c4(0.3162, 0.0, │ │ │ │ - 0x0095e520 302e3934 38362c20 302e3029 3b200a20 0.9486, 0.0); . │ │ │ │ - 0x0095e530 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x0095e540 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x0095e550 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x0095e560 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x0095e570 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0095e580 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0095e590 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0095e5a0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x0095e5b0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x0095e5c0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x0095e5d0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x0095e5e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095e5f0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x0095e600 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x0095e610 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x0095e620 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x0095e630 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x0095e640 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x0095e650 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0095e660 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x0095e670 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x0095e680 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x0095e690 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x0095e6a0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x0095e6b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095e6c0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x0095e6d0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x0095e6e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095e6f0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x0095e700 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x0095e710 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x0095e720 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x0095e730 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x0095e740 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x0095e750 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x0095e760 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x0095e770 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x0095e780 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x0095e790 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x0095e7a0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x0095e7b0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x0095e7c0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x0095e7d0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x0095e7e0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x0095e7f0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0095e800 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x0095e810 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x0095e820 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x0095d9c0 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ + 0x0095d9d0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x0095d9e0 78436f6f 7264733b 200a2020 23696664 xCoords; . #ifd │ │ │ │ + 0x0095d9f0 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x0095da00 206f7574 204c4f57 5f502076 65633420 out LOW_P vec4 │ │ │ │ + 0x0095da10 765f636f 6c6f723b 200a2020 23656c73 v_color; . #els │ │ │ │ + 0x0095da20 65200a20 206f7574 20766563 3220765f e . out vec2 v_ │ │ │ │ + 0x0095da30 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ + 0x0095da40 0a202023 656e6469 66200a20 206f7574 . #endif . out │ │ │ │ + 0x0095da50 20766563 3320765f 72616469 75733b20 vec3 v_radius; │ │ │ │ + 0x0095da60 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0095da70 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0095da80 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0095da90 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x0095daa0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x0095dab0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x0095dac0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x0095dad0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x0095dae0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0095daf0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x0095db00 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x0095db10 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x0095db20 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x0095db30 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x0095db40 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x0095db50 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ + 0x0095db60 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x0095db70 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x0095db80 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x0095db90 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ + 0x0095dba0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x0095dbb0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x0095dbc0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x0095dbd0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0095dbe0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0095dbf0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0095dc00 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0095dc10 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x0095dc20 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0095dc30 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x0095dc40 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x0095dc50 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x0095dc60 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095dc70 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x0095dc80 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0095dc90 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0095dca0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0095dcb0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x0095dcc0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095dcd0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x0095dce0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x0095dcf0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0095dd00 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0095dd10 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x0095dd20 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x0095dd30 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095dd40 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x0095dd50 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x0095dd60 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095dd70 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0095dd80 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0095dd90 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095dda0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x0095ddb0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0095ddc0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0095ddd0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0095dde0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0095ddf0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x0095de00 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x0095de10 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x0095de20 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x0095de30 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x0095de40 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0095de50 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x0095de60 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x0095de70 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x0095de80 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x0095de90 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x0095dea0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0095deb0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x0095dec0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x0095ded0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x0095dee0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0095def0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x0095df00 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x0095df10 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x0095df20 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x0095df30 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x0095df40 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x0095df50 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x0095df60 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x0095df70 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x0095df80 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x0095df90 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x0095dfa0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x0095dfb0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0095dfc0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x0095dfd0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x0095dfe0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x0095dff0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x0095e000 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x0095e010 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x0095e020 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x0095e030 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x0095e040 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x0095e050 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x0095e060 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x0095e070 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x0095e080 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x0095e090 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0095e0a0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x0095e0b0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x0095e0c0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x0095e0d0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x0095e0e0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x0095e0f0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x0095e100 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x0095e110 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0095e120 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x0095e130 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x0095e140 2070203d 20766563 3428615f 706f7369 p = vec4(a_posi │ │ │ │ + 0x0095e150 74696f6e 2c203129 202a2075 5f6d6f64 tion, 1) * u_mod │ │ │ │ + 0x0095e160 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ + 0x0095e170 3420706f 73203d20 76656334 28615f6e 4 pos = vec4(a_n │ │ │ │ + 0x0095e180 6f726d61 6c2e7879 2c20302c 20302920 ormal.xy, 0, 0) │ │ │ │ + 0x0095e190 2b20703b 200a2020 2020676c 5f506f73 + p; . gl_Pos │ │ │ │ + 0x0095e1a0 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ + 0x0095e1b0 6f745472 616e7366 6f726d28 706f7320 otTransform(pos │ │ │ │ + 0x0095e1c0 2a20755f 70726f6a 65637469 6f6e2c20 * u_projection, │ │ │ │ + 0x0095e1d0 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x0095e1e0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x0095e1f0 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x0095e200 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ + 0x0095e210 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ + 0x0095e220 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x0095e230 293b200a 20202365 6c736520 0a202020 ); . #else . │ │ │ │ + 0x0095e240 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x0095e250 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ + 0x0095e260 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ + 0x0095e270 0a202020 20765f72 61646975 73203d20 . v_radius = │ │ │ │ + 0x0095e280 615f6e6f 726d616c 3b200a20 207d200a a_normal; . } . │ │ │ │ + 0x0095e290 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x0095e2a0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0095e2b0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0095e2c0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0095e2d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095e2e0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0095e2f0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0095e300 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0095e310 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0095e320 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0095e330 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0095e340 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0095e350 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0095e360 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0095e370 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0095e380 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0095e390 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0095e3a0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0095e3b0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0095e3c0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0095e3d0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0095e3e0 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x0095e3f0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0095e400 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x0095e410 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x0095e420 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ + 0x0095e430 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ + 0x0095e440 6f72643b 200a2020 6f757420 76656333 ord; . out vec3 │ │ │ │ + 0x0095e450 20765f72 61646975 733b200a 2020756e v_radius; . un │ │ │ │ + 0x0095e460 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ + 0x0095e470 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ + 0x0095e480 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ + 0x0095e490 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x0095e4a0 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ + 0x0095e4b0 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ + 0x0095e4c0 726d2076 65633420 755f7472 61666669 rm vec4 u_traffi │ │ │ │ + 0x0095e4d0 63506172 616d733b 200a2020 756e6966 cParams; . unif │ │ │ │ + 0x0095e4e0 6f726d20 76656334 20755f6f 75746c69 orm vec4 u_outli │ │ │ │ + 0x0095e4f0 6e65436f 6c6f723b 200a2020 756e6966 neColor; . unif │ │ │ │ + 0x0095e500 6f726d20 76656334 20755f6c 69676874 orm vec4 u_light │ │ │ │ + 0x0095e510 4172726f 77436f6c 6f723b20 0a202075 ArrowColor; . u │ │ │ │ + 0x0095e520 6e69666f 726d2076 65633420 755f6461 niform vec4 u_da │ │ │ │ + 0x0095e530 726b4172 726f7743 6f6c6f72 3b200a20 rkArrowColor; . │ │ │ │ + 0x0095e540 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0095e550 5f6f7574 6c696e65 3b200a20 20756e69 _outline; . uni │ │ │ │ + 0x0095e560 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ + 0x0095e570 63697479 3b200a20 20636f6e 73742066 city; . const f │ │ │ │ + 0x0095e580 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x0095e590 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x0095e5a0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x0095e5b0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0095e5c0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0095e5d0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0095e5e0 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x0095e5f0 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x0095e600 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x0095e610 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x0095e620 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x0095e630 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x0095e640 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095e650 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x0095e660 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x0095e670 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0095e680 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x0095e690 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x0095e6a0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x0095e6b0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x0095e6c0 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x0095e6d0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x0095e6e0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0095e6f0 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x0095e700 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x0095e710 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095e720 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x0095e730 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x0095e740 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x0095e750 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x0095e760 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x0095e770 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x0095e780 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x0095e790 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x0095e7a0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x0095e7b0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x0095e7c0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x0095e7d0 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x0095e7e0 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x0095e7f0 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x0095e800 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x0095e810 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x0095e820 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ 0x0095e830 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x0095e840 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x0095e850 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x0095e860 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x0095e870 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x0095e880 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x0095e890 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095e8a0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x0095e8b0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x0095e8c0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x0095e8d0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x0095e8e0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0095e8f0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x0095e900 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x0095e910 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x0095e920 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x0095e930 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x0095e940 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0095e950 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x0095e960 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x0095e970 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x0095e980 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x0095e990 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x0095e9a0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x0095e9b0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x0095e9c0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x0095e9d0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x0095e9e0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x0095e9f0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x0095ea00 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x0095ea10 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x0095ea20 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x0095ea30 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x0095ea40 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x0095ea50 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x0095ea60 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x0095ea70 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x0095ea80 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x0095ea90 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x0095eaa0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0095eab0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x0095eac0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x0095ead0 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ - 0x0095eae0 28615f70 6f736974 696f6e2c 20312e30 (a_position, 1.0 │ │ │ │ - 0x0095eaf0 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ - 0x0095eb00 200a2020 20207665 6334206e 6f726d61 . vec4 norma │ │ │ │ - 0x0095eb10 6c203d20 76656334 28615f70 6f736974 l = vec4(a_posit │ │ │ │ - 0x0095eb20 696f6e20 2b20615f 6e6f726d 616c2c20 ion + a_normal, │ │ │ │ - 0x0095eb30 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ - 0x0095eb40 65773b20 0a202020 206e6f72 6d616c2e ew; . normal. │ │ │ │ - 0x0095eb50 78797720 3d20286e 6f726d61 6c202a20 xyw = (normal * │ │ │ │ - 0x0095eb60 755f7072 6f6a6563 74696f6e 292e7879 u_projection).xy │ │ │ │ - 0x0095eb70 773b200a 20202020 6e6f726d 616c2e7a w; . normal.z │ │ │ │ - 0x0095eb80 203d206e 6f726d61 6c2e7a20 2a20755f = normal.z * u_ │ │ │ │ - 0x0095eb90 7a536361 6c653b20 0a202020 20706f73 zScale; . pos │ │ │ │ - 0x0095eba0 2e787977 203d2028 706f7320 2a20755f .xyw = (pos * u_ │ │ │ │ - 0x0095ebb0 70726f6a 65637469 6f6e292e 7879773b projection).xyw; │ │ │ │ - 0x0095ebc0 200a2020 2020706f 732e7a20 3d20615f . pos.z = a_ │ │ │ │ - 0x0095ebd0 706f7369 74696f6e 2e7a202a 20755f7a position.z * u_z │ │ │ │ - 0x0095ebe0 5363616c 653b200a 20202020 76656334 Scale; . vec4 │ │ │ │ - 0x0095ebf0 206e6f72 6d446972 203d206e 6f726d61 normDir = norma │ │ │ │ - 0x0095ec00 6c202d20 706f733b 200a2020 20206966 l - pos; . if │ │ │ │ - 0x0095ec10 2028646f 74286e6f 726d4469 722c206e (dot(normDir, n │ │ │ │ - 0x0095ec20 6f726d44 69722920 213d2030 2e302920 ormDir) != 0.0) │ │ │ │ - 0x0095ec30 0a202020 20202076 5f696e74 656e7369 . v_intensi │ │ │ │ - 0x0095ec40 7479203d 206d6178 28302e30 2c202d64 ty = max(0.0, -d │ │ │ │ - 0x0095ec50 6f74286b 4e6f726d 616c697a 65644c69 ot(kNormalizedLi │ │ │ │ - 0x0095ec60 67687444 69722c20 6e6f726d 616c697a ghtDir, normaliz │ │ │ │ - 0x0095ec70 65286e6f 726d4469 72292929 3b200a20 e(normDir))); . │ │ │ │ - 0x0095ec80 20202065 6c736520 0a202020 20202076 else . v │ │ │ │ - 0x0095ec90 5f696e74 656e7369 7479203d 20302e30 _intensity = 0.0 │ │ │ │ - 0x0095eca0 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x0095ecb0 6f6e203d 20755f70 69766f74 5472616e on = u_pivotTran │ │ │ │ - 0x0095ecc0 73666f72 6d202a20 706f733b 200a2020 sform * pos; . │ │ │ │ - 0x0095ecd0 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x0095ece0 20202067 6c5f506f 73697469 6f6e2e79 gl_Position.y │ │ │ │ - 0x0095ecf0 203d202d 676c5f50 6f736974 696f6e2e = -gl_Position. │ │ │ │ - 0x0095ed00 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ - 0x0095ed10 696f6e2e 7a203d20 28676c5f 506f7369 ion.z = (gl_Posi │ │ │ │ - 0x0095ed20 74696f6e 2e7a2020 2b20676c 5f506f73 tion.z + gl_Pos │ │ │ │ - 0x0095ed30 6974696f 6e2e7729 202a2030 2e353b20 ition.w) * 0.5; │ │ │ │ - 0x0095ed40 0a202023 656e6469 66200a20 20202076 . #endif . v │ │ │ │ - 0x0095ed50 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ - 0x0095ed60 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ - 0x0095ed70 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ - 0x0095ed80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0095ed90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0095eda0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0095edb0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0095edc0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0095edd0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0095ede0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095edf0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0095ee00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0095ee10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0095ee20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0095ee30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0095ee40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0095ee50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0095ee60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0095ee70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0095ee80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0095ee90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0095eea0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0095eeb0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0095eec0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0095eed0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0095eee0 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x0095eef0 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ - 0x0095ef00 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ - 0x0095ef10 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ - 0x0095ef20 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ - 0x0095ef30 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ - 0x0095ef40 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x0095ef50 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ - 0x0095ef60 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ - 0x0095ef70 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ - 0x0095ef80 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ - 0x0095ef90 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ - 0x0095efa0 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ - 0x0095efb0 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x0095efc0 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ - 0x0095efd0 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ - 0x0095efe0 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ - 0x0095eff0 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ - 0x0095f000 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ - 0x0095f010 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0095f020 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ - 0x0095f030 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ - 0x0095f040 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ - 0x0095f050 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ - 0x0095f060 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ - 0x0095f070 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ - 0x0095f080 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ - 0x0095f090 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ - 0x0095f0a0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x0095f0b0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x0095f0c0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x0095f0d0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x0095f0e0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x0095f0f0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x0095f100 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x0095f110 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x0095f120 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x0095f130 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x0095f140 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x0095f150 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x0095f160 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0095f170 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x0095f180 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x0095f190 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095f1a0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x0095f1b0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x0095f1c0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x0095f1d0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x0095f1e0 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x0095f1f0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x0095f200 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x0095f210 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x0095f220 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x0095f230 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0095f240 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x0095f250 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x0095f260 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x0095f270 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x0095f280 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x0095f290 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x0095f2a0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x0095f2b0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x0095f2c0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x0095f2d0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x0095f2e0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x0095f2f0 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x0095f300 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x0095f310 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x0095f320 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x0095f330 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x0095f340 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095f350 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x0095f360 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x0095f370 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x0095f380 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x0095f390 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x0095f3a0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0095f3b0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x0095f3c0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x0095f3d0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x0095f3e0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0095f3f0 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x0095f400 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x0095f410 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x0095f420 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x0095f430 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x0095f440 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x0095f450 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x0095f460 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x0095f470 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x0095f480 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x0095f490 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x0095f4a0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x0095f4b0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x0095f4c0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x0095f4d0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x0095f4e0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x0095f4f0 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x0095f500 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x0095f510 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x0095f520 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x0095f530 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x0095f540 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x0095f550 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x0095f560 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x0095f570 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x0095f580 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x0095f590 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x0095f5a0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x0095f5b0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x0095f5c0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x0095f5d0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x0095f5e0 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x0095f5f0 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x0095f600 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x0095f610 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x0095f620 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x0095f630 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ - 0x0095f640 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ - 0x0095f650 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ - 0x0095f660 64656c56 6965773b 200a2020 2020706f delView; . po │ │ │ │ - 0x0095f670 732e7879 77203d20 28706f73 202a2075 s.xyw = (pos * u │ │ │ │ - 0x0095f680 5f70726f 6a656374 696f6e29 2e787977 _projection).xyw │ │ │ │ - 0x0095f690 3b200a20 20202070 6f732e7a 203d2061 ; . pos.z = a │ │ │ │ - 0x0095f6a0 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ - 0x0095f6b0 7a536361 6c653b20 0a202020 20676c5f zScale; . gl_ │ │ │ │ - 0x0095f6c0 506f7369 74696f6e 203d2075 5f706976 Position = u_piv │ │ │ │ - 0x0095f6d0 6f745472 616e7366 6f726d20 2a20706f otTransform * po │ │ │ │ - 0x0095f6e0 733b200a 20202369 66646566 2056554c s; . #ifdef VUL │ │ │ │ - 0x0095f6f0 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ - 0x0095f700 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ - 0x0095f710 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ - 0x0095f720 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ - 0x0095f730 6c5f506f 73697469 6f6e2e7a 20202b20 l_Position.z + │ │ │ │ - 0x0095f740 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ - 0x0095f750 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ - 0x0095f760 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x0095f770 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ - 0x0095f780 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ - 0x0095f790 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ - 0x0095f7a0 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ - 0x0095f7b0 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ - 0x0095f7c0 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ - 0x0095f7d0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x0095f7e0 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ - 0x0095f7f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0095f800 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0095f810 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0095f820 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0095f830 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0095f840 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0095f850 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095f860 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0095f870 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0095f880 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0095f890 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0095f8a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0095f8b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0095f8c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0095f8d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0095f8e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0095f8f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0095f900 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0095f910 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0095f920 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0095f930 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0095f940 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x0095f950 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ - 0x0095f960 20206f75 74207665 63332076 5f6e6f72 out vec3 v_nor │ │ │ │ - 0x0095f970 6d616c3b 200a2020 756e6966 6f726d20 mal; . uniform │ │ │ │ - 0x0095f980 6d617434 20755f74 72616e73 666f726d mat4 u_transform │ │ │ │ - 0x0095f990 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0095f9a0 3420755f 6e6f726d 616c5472 616e7366 4 u_normalTransf │ │ │ │ - 0x0095f9b0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x0095f9c0 76656334 20755f63 6f6c6f72 3b200a20 vec4 u_color; . │ │ │ │ - 0x0095f9d0 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x0095f9e0 74657843 6f6f7264 466c6970 70696e67 texCoordFlipping │ │ │ │ - 0x0095f9f0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x0095fa00 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x0095fa10 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x0095fa20 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x0095fa30 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x0095fa40 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x0095fa50 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x0095fa60 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x0095fa70 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0095fa80 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0095fa90 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x0095faa0 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x0095fab0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x0095fac0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0095fad0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x0095fae0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x0095faf0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x0095fb00 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x0095fb10 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x0095fb20 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x0095fb30 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095fb40 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x0095fb50 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x0095fb60 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x0095fb70 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x0095fb80 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x0095fb90 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x0095fba0 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x0095fbb0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x0095fbc0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x0095fbd0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0095fbe0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x0095fbf0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x0095fc00 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x0095fc10 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x0095fc20 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0095fc30 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0095fc40 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0095fc50 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x0095fc60 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x0095fc70 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x0095fc80 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x0095fc90 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x0095fca0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x0095fcb0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0095fcc0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x0095fcd0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x0095fce0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x0095fcf0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x0095fd00 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x0095fd10 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x0095fd20 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x0095fd30 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x0095fd40 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0095fd50 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x0095fd60 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x0095fd70 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x0095fd80 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x0095fd90 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x0095fda0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x0095fdb0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x0095fdc0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x0095fdd0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x0095fde0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x0095fdf0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x0095fe00 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x0095fe10 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x0095fe20 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x0095fe30 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x0095fe40 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x0095fe50 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x0095fe60 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x0095fe70 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x0095fe80 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x0095fe90 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x0095fea0 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x0095feb0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x0095fec0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x0095fed0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x0095fee0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x0095fef0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x0095ff00 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x0095ff10 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x0095ff20 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0095ff30 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x0095ff40 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x0095ff50 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x0095ff60 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x0095ff70 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x0095ff80 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x0095ff90 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x0095ffa0 6f6e203d 20755f74 72616e73 666f726d on = u_transform │ │ │ │ - 0x0095ffb0 202a2076 65633428 615f706f 732c2031 * vec4(a_pos, 1 │ │ │ │ - 0x0095ffc0 2e30293b 200a2020 2020765f 6e6f726d .0); . v_norm │ │ │ │ - 0x0095ffd0 616c203d 206e6f72 6d616c69 7a652828 al = normalize(( │ │ │ │ - 0x0095ffe0 755f6e6f 726d616c 5472616e 73666f72 u_normalTransfor │ │ │ │ - 0x0095fff0 6d202a20 76656334 28615f6e 6f726d61 m * vec4(a_norma │ │ │ │ - 0x00960000 6c2c2030 2e302929 2e78797a 293b200a l, 0.0)).xyz); . │ │ │ │ - 0x00960010 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00960020 3d20706f 73697469 6f6e3b20 0a202023 = position; . # │ │ │ │ - 0x00960030 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00960040 2020676c 5f506f73 6974696f 6e2e7920 gl_Position.y │ │ │ │ - 0x00960050 3d202d67 6c5f506f 73697469 6f6e2e79 = -gl_Position.y │ │ │ │ - 0x00960060 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x00960070 6f6e2e7a 203d2028 676c5f50 6f736974 on.z = (gl_Posit │ │ │ │ - 0x00960080 696f6e2e 7a202b20 676c5f50 6f736974 ion.z + gl_Posit │ │ │ │ - 0x00960090 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ - 0x009600a0 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ - 0x009600b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009600c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009600d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009600e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009600f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00960100 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00960110 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00960120 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00960130 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00960140 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00960150 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00960160 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00960170 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00960180 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00960190 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009601a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009601b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009601c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009601d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009601e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009601f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00960200 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x00960210 76656332 20615f74 6578436f 6f726473 vec2 a_texCoords │ │ │ │ - 0x00960220 3b200a20 206f7574 20666c6f 61742076 ; . out float v │ │ │ │ - 0x00960230 5f696e74 656e7369 74793b20 0a202075 _intensity; . u │ │ │ │ - 0x00960240 6e69666f 726d206d 61743420 755f7472 niform mat4 u_tr │ │ │ │ - 0x00960250 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ - 0x00960260 6f726d20 6d617434 20755f6e 6f726d61 orm mat4 u_norma │ │ │ │ - 0x00960270 6c547261 6e73666f 726d3b20 0a202075 lTransform; . u │ │ │ │ - 0x00960280 6e69666f 726d2076 65633420 755f636f niform vec4 u_co │ │ │ │ - 0x00960290 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x009602a0 76656332 20755f74 6578436f 6f726446 vec2 u_texCoordF │ │ │ │ - 0x009602b0 6c697070 696e673b 200a2020 636f6e73 lipping; . cons │ │ │ │ - 0x009602c0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x009602d0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x009602e0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x009602f0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00960300 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00960310 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00960320 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00960330 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00960340 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00960350 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00960360 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00960370 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00960380 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00960390 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x009603a0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x009603b0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x009603c0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x009603d0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x009603e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009603f0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00960400 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00960410 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00960420 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00960430 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00960440 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00960450 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00960460 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00960470 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00960480 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00960490 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x009604a0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x009604b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009604c0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x009604d0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x009604e0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x009604f0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00960500 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00960510 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00960520 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00960530 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00960540 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00960550 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00960560 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00960570 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00960580 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00960590 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x009605a0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x009605b0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x009605c0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x009605d0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x009605e0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x009605f0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00960600 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00960610 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00960620 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00960630 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00960640 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00960650 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00960660 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00960670 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00960680 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00960690 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x009606a0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x009606b0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x009606c0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x009606d0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x009606e0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x009606f0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00960700 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00960710 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00960720 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00960730 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00960740 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00960750 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00960760 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00960770 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00960780 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00960790 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x009607a0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x009607b0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x009607c0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x009607d0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x009607e0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x009607f0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00960800 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00960810 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00960820 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00960830 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00960840 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00960850 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00960860 20706f73 6974696f 6e203d20 755f7472 position = u_tr │ │ │ │ - 0x00960870 616e7366 6f726d20 2a207665 63342861 ansform * vec4(a │ │ │ │ - 0x00960880 5f706f73 2c20312e 30293b20 0a202020 _pos, 1.0); . │ │ │ │ - 0x00960890 20765f69 6e74656e 73697479 203d2061 v_intensity = a │ │ │ │ - 0x009608a0 5f746578 436f6f72 64732e78 3b200a20 _texCoords.x; . │ │ │ │ - 0x009608b0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x009608c0 20706f73 6974696f 6e3b200a 20202369 position; . #i │ │ │ │ - 0x009608d0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x009608e0 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ - 0x009608f0 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ - 0x00960900 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00960910 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ - 0x00960920 6f6e2e7a 202b2067 6c5f506f 73697469 on.z + gl_Positi │ │ │ │ - 0x00960930 6f6e2e77 29202a20 302e353b 200a2020 on.w) * 0.5; . │ │ │ │ - 0x00960940 23656e64 6966200a 20207d20 0a000000 #endif . } .... │ │ │ │ - 0x00960950 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00960960 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00960970 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00960980 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00960990 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009609a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009609b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009609c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009609d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009609e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009609f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00960a00 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00960a10 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00960a20 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00960a30 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00960a40 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00960a50 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00960a60 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00960a70 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00960a80 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00960a90 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00960aa0 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x00960ab0 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ - 0x00960ac0 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ - 0x00960ad0 6f6f7264 733b200a 20206f75 74207665 oords; . out ve │ │ │ │ - 0x00960ae0 63332076 5f6e6f72 6d616c3b 200a2020 c3 v_normal; . │ │ │ │ - 0x00960af0 6f757420 76656332 20765f74 6578436f out vec2 v_texCo │ │ │ │ - 0x00960b00 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ - 0x00960b10 206d6174 3420755f 7472616e 73666f72 mat4 u_transfor │ │ │ │ - 0x00960b20 6d3b200a 2020756e 69666f72 6d206d61 m; . uniform ma │ │ │ │ - 0x00960b30 74342075 5f6e6f72 6d616c54 72616e73 t4 u_normalTrans │ │ │ │ - 0x00960b40 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ - 0x00960b50 20766563 3420755f 636f6c6f 723b200a vec4 u_color; . │ │ │ │ - 0x00960b60 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ - 0x00960b70 5f746578 436f6f72 64466c69 7070696e _texCoordFlippin │ │ │ │ - 0x00960b80 673b200a 2020636f 6e737420 666c6f61 g; . const floa │ │ │ │ - 0x00960b90 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00960ba0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00960bb0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00960bc0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00960bd0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00960be0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00960bf0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00960c00 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00960c10 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00960c20 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00960c30 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00960c40 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00960c50 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00960c60 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00960c70 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00960c80 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00960c90 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00960ca0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00960cb0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00960cc0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00960cd0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00960ce0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00960cf0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00960d00 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00960d10 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00960d20 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00960d30 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00960d40 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00960d50 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00960d60 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00960d70 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00960d80 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00960d90 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00960da0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00960db0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00960dc0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00960dd0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00960de0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00960df0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00960e00 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00960e10 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00960e20 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00960e30 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00960e40 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00960e50 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00960e60 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00960e70 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00960e80 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00960e90 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00960ea0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00960eb0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00960ec0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00960ed0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00960ee0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00960ef0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00960f00 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00960f10 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00960f20 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00960f30 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00960f40 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00960f50 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00960f60 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00960f70 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00960f80 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00960f90 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00960fa0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00960fb0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00960fc0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00960fd0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00960fe0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00960ff0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00961000 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00961010 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00961020 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00961030 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00961040 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00961050 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00961060 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00961070 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00961080 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00961090 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x009610a0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x009610b0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x009610c0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x009610d0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x009610e0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x009610f0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00961100 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00961110 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00961120 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00961130 696f6e20 3d20755f 7472616e 73666f72 ion = u_transfor │ │ │ │ - 0x00961140 6d202a20 76656334 28615f70 6f732c20 m * vec4(a_pos, │ │ │ │ - 0x00961150 312e3029 3b200a20 20202076 5f6e6f72 1.0); . v_nor │ │ │ │ - 0x00961160 6d616c20 3d206e6f 726d616c 697a6528 mal = normalize( │ │ │ │ - 0x00961170 28755f6e 6f726d61 6c547261 6e73666f (u_normalTransfo │ │ │ │ - 0x00961180 726d202a 20766563 3428615f 6e6f726d rm * vec4(a_norm │ │ │ │ - 0x00961190 616c2c20 302e3029 292e7879 7a293b20 al, 0.0)).xyz); │ │ │ │ - 0x009611a0 0a202020 20765f74 6578436f 6f726473 . v_texCoords │ │ │ │ - 0x009611b0 203d206d 69782861 5f746578 436f6f72 = mix(a_texCoor │ │ │ │ - 0x009611c0 64732c20 312e3020 2d20615f 74657843 ds, 1.0 - a_texC │ │ │ │ - 0x009611d0 6f6f7264 732c2075 5f746578 436f6f72 oords, u_texCoor │ │ │ │ - 0x009611e0 64466c69 7070696e 67293b20 0a202020 dFlipping); . │ │ │ │ - 0x009611f0 20676c5f 506f7369 74696f6e 203d2070 gl_Position = p │ │ │ │ - 0x00961200 6f736974 696f6e3b 200a2020 23696664 osition; . #ifd │ │ │ │ - 0x00961210 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ - 0x00961220 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ - 0x00961230 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ - 0x00961240 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ - 0x00961250 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ - 0x00961260 2e7a202b 20676c5f 506f7369 74696f6e .z + gl_Position │ │ │ │ - 0x00961270 2e772920 2a20302e 353b200a 20202365 .w) * 0.5; . #e │ │ │ │ - 0x00961280 6e646966 200a2020 7d200a00 00000000 ndif . } ...... │ │ │ │ - 0x00961290 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009612a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009612b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009612c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009612d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009612e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009612f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00961300 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00961310 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00961320 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00961330 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00961340 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00961350 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00961360 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00961370 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00961380 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00961390 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009613a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009613b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009613c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009613d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009613e0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x009613f0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00961400 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00961410 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00961420 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00961430 455f5654 46200a20 206f7574 204c4f57 E_VTF . out LOW │ │ │ │ - 0x00961440 5f502076 65633420 765f636f 6c6f723b _P vec4 v_color; │ │ │ │ - 0x00961450 200a2020 23656c73 65200a20 206f7574 . #else . out │ │ │ │ - 0x00961460 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ - 0x00961470 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ - 0x00961480 66200a20 206f7574 20766563 3320765f f . out vec3 v_ │ │ │ │ - 0x00961490 72616469 75733b20 0a202075 6e69666f radius; . unifo │ │ │ │ - 0x009614a0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x009614b0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x009614c0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x009614d0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x009614e0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x009614f0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00961500 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00961510 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00961520 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00961530 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00961540 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00961550 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00961560 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00961570 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00961580 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00961590 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x009615a0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x009615b0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x009615c0 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x009615d0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x009615e0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x009615f0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00961600 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00961610 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00961620 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00961630 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00961640 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00961650 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00961660 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00961670 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00961680 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00961690 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x009616a0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x009616b0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x009616c0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x009616d0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x009616e0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x009616f0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00961700 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00961710 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00961720 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00961730 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00961740 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00961750 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00961760 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00961770 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00961780 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00961790 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x009617a0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x009617b0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x009617c0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x009617d0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x009617e0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x009617f0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00961800 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00961810 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00961820 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00961830 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00961840 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00961850 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00961860 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00961870 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00961880 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00961890 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x009618a0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x009618b0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x009618c0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x009618d0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x009618e0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x009618f0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00961900 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00961910 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00961920 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00961930 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00961940 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00961950 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00961960 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00961970 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00961980 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00961990 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x009619a0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x009619b0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x009619c0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x009619d0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x009619e0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x009619f0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00961a00 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00961a10 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00961a20 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00961a30 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00961a40 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00961a50 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00961a60 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00961a70 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00961a80 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00961a90 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00961aa0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00961ab0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00961ac0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00961ad0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00961ae0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00961af0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00961b00 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00961b10 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00961b20 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00961b30 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00961b40 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00961b50 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00961b60 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00961b70 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ - 0x00961b80 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ - 0x00961b90 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x00961ba0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x00961bb0 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ - 0x00961bc0 2c20302c 20302920 2b20703b 200a2020 , 0, 0) + p; . │ │ │ │ - 0x00961bd0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00961be0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x00961bf0 6f726d28 706f7320 2a20755f 70726f6a orm(pos * u_proj │ │ │ │ - 0x00961c00 65637469 6f6e2c20 755f7069 766f7454 ection, u_pivotT │ │ │ │ - 0x00961c10 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ - 0x00961c20 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00961c30 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ - 0x00961c40 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ - 0x00961c50 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ - 0x00961c60 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ - 0x00961c70 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ - 0x00961c80 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ - 0x00961c90 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x00961ca0 2023656e 64696620 0a202020 20765f72 #endif . v_r │ │ │ │ - 0x00961cb0 61646975 73203d20 615f6e6f 726d616c adius = a_normal │ │ │ │ - 0x00961cc0 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x00961cd0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00961ce0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00961cf0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00961d00 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00961d10 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00961d20 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00961d30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00961d40 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00961d50 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00961d60 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00961d70 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00961d80 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00961d90 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00961da0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00961db0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00961dc0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00961dd0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00961de0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00961df0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00961e00 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00961e10 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00961e20 63332061 5f6e6f72 6d616c3b 200a2020 c3 a_normal; . │ │ │ │ - 0x00961e30 696e2076 65633320 615f706f 73697469 in vec3 a_positi │ │ │ │ - 0x00961e40 6f6e3b20 0a202069 6e207665 63342061 on; . in vec4 a │ │ │ │ - 0x00961e50 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00961e60 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ - 0x00961e70 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ - 0x00961e80 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ - 0x00961e90 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x00961ea0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00961eb0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00961ec0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00961ed0 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x00961ee0 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ - 0x00961ef0 755f636f 6e747261 73744761 6d6d613b u_contrastGamma; │ │ │ │ - 0x00961f00 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00961f10 7420755f 6f706163 6974793b 200a2020 t u_opacity; . │ │ │ │ - 0x00961f20 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00961f30 7a536361 6c653b20 0a202075 6e69666f zScale; . unifo │ │ │ │ - 0x00961f40 726d2066 6c6f6174 20755f69 6e746572 rm float u_inter │ │ │ │ - 0x00961f50 706f6c61 74696f6e 3b200a20 20756e69 polation; . uni │ │ │ │ - 0x00961f60 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ - 0x00961f70 75746c69 6e655061 73733b20 0a202063 utlinePass; . c │ │ │ │ - 0x00961f80 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ - 0x00961f90 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ - 0x00961fa0 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ - 0x00961fb0 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00961fc0 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x00961fd0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x00961fe0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x00961ff0 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ - 0x00962000 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00962010 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ - 0x00962020 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ - 0x00962030 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00962040 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00962050 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ - 0x00962060 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00962070 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00962080 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ - 0x00962090 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ - 0x009620a0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x009620b0 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ - 0x009620c0 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ - 0x009620d0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x009620e0 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ - 0x009620f0 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ - 0x00962100 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00962110 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00962120 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ - 0x00962130 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00962140 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ - 0x00962150 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ - 0x00962160 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00962170 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ - 0x00962180 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ - 0x00962190 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ - 0x009621a0 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ - 0x009621b0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x009621c0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x009621d0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x009621e0 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ - 0x009621f0 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ - 0x00962200 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ - 0x00962210 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ - 0x00962220 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x00962230 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ - 0x00962240 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ - 0x00962250 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x00962260 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ - 0x00962270 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ - 0x00962280 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x00962290 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ - 0x009622a0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x009622b0 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ - 0x009622c0 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x009622d0 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ - 0x009622e0 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ - 0x009622f0 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ - 0x00962300 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ - 0x00962310 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ - 0x00962320 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ - 0x00962330 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00962340 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ - 0x00962350 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ - 0x00962360 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ - 0x00962370 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ - 0x00962380 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ - 0x00962390 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x009623a0 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ - 0x009623b0 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ - 0x009623c0 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x009623d0 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ - 0x009623e0 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ - 0x009623f0 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ - 0x00962400 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ - 0x00962410 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ - 0x00962420 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ - 0x00962430 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ - 0x00962440 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ - 0x00962450 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ - 0x00962460 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ - 0x00962470 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ - 0x00962480 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ - 0x00962490 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ - 0x009624a0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x009624b0 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ - 0x009624c0 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ - 0x009624d0 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ - 0x009624e0 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ - 0x009624f0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00962500 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ - 0x00962510 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ - 0x00962520 65633320 72616469 7573203d 20615f6e ec3 radius = a_n │ │ │ │ - 0x00962530 6f726d61 6c202a20 615f706f 73697469 ormal * a_positi │ │ │ │ - 0x00962540 6f6e2e7a 3b200a20 20202076 65633420 on.z; . vec4 │ │ │ │ - 0x00962550 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x00962560 6974696f 6e2e7879 2c20302c 20312920 ition.xy, 0, 1) │ │ │ │ - 0x00962570 2a20755f 6d6f6465 6c566965 773b200a * u_modelView; . │ │ │ │ - 0x00962580 20202020 76656334 20736869 66746564 vec4 shifted │ │ │ │ - 0x00962590 506f7320 3d207665 63342872 61646975 Pos = vec4(radiu │ │ │ │ - 0x009625a0 732e7879 2c20302c 20302920 2b20706f s.xy, 0, 0) + po │ │ │ │ - 0x009625b0 733b200a 20202020 676c5f50 6f736974 s; . gl_Posit │ │ │ │ - 0x009625c0 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ - 0x009625d0 5472616e 73666f72 6d287368 69667465 Transform(shifte │ │ │ │ - 0x009625e0 64506f73 202a2075 5f70726f 6a656374 dPos * u_project │ │ │ │ - 0x009625f0 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ - 0x00962600 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ - 0x00962610 2020765f 72616469 7573203d 20726164 v_radius = rad │ │ │ │ - 0x00962620 6975733b 200a2020 2020765f 636f6c6f ius; . v_colo │ │ │ │ - 0x00962630 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x00962640 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x00962650 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00962660 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00962670 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00962680 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00962690 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x009626a0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x009626b0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x009626c0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x009626d0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009626e0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009626f0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00962700 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00962710 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00962720 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00962730 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00962740 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00962750 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00962760 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00962770 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00962780 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00962790 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x009627a0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x009627b0 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x009627c0 6e207665 63342061 5f636f6c 6f725465 n vec4 a_colorTe │ │ │ │ - 0x009627d0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x009627e0 76656334 20765f6e 6f726d61 6c3b200a vec4 v_normal; . │ │ │ │ - 0x009627f0 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ - 0x00962800 56544620 0a20206f 7574204c 4f575f50 VTF . out LOW_P │ │ │ │ - 0x00962810 20766563 3420765f 636f6c6f 723b200a vec4 v_color; . │ │ │ │ - 0x00962820 20202365 6c736520 0a20206f 75742076 #else . out v │ │ │ │ - 0x00962830 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ - 0x00962840 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ - 0x00962850 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00962860 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00962870 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00962880 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x00962890 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x009628a0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x009628b0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x009628c0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x009628d0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x009628e0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x009628f0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x00962900 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x00962910 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x00962920 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x00962930 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x00962940 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ - 0x00962950 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x00962960 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x00962970 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x00962980 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ - 0x00962990 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x009629a0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x009629b0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x009629c0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x009629d0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x009629e0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x009629f0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00962a00 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00962a10 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00962a20 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00962a30 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00962a40 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00962a50 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00962a60 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00962a70 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00962a80 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00962a90 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00962aa0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00962ab0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00962ac0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00962ad0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00962ae0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00962af0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00962b00 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00962b10 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00962b20 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00962b30 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00962b40 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00962b50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00962b60 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00962b70 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00962b80 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00962b90 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00962ba0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00962bb0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00962bc0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00962bd0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00962be0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00962bf0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00962c00 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00962c10 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00962c20 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00962c30 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00962c40 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00962c50 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00962c60 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00962c70 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00962c80 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00962c90 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00962ca0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00962cb0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00962cc0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00962cd0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00962ce0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00962cf0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00962d00 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00962d10 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00962d20 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00962d30 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00962d40 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00962d50 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00962d60 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00962d70 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00962d80 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00962d90 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00962da0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00962db0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00962dc0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00962dd0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00962de0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00962df0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00962e00 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00962e10 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00962e20 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00962e30 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00962e40 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00962e50 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00962e60 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00962e70 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00962e80 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00962e90 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00962ea0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00962eb0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00962ec0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00962ed0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00962ee0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00962ef0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00962f00 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00962f10 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00962f20 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00962f30 2070203d 20766563 3428615f 706f7369 p = vec4(a_posi │ │ │ │ - 0x00962f40 74696f6e 2c203129 202a2075 5f6d6f64 tion, 1) * u_mod │ │ │ │ - 0x00962f50 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ - 0x00962f60 3420706f 73203d20 76656334 28615f6e 4 pos = vec4(a_n │ │ │ │ - 0x00962f70 6f726d61 6c2e7879 202b2061 5f636f6c ormal.xy + a_col │ │ │ │ - 0x00962f80 6f725465 78436f6f 7264732e 7a772c20 orTexCoords.zw, │ │ │ │ - 0x00962f90 302c2030 29202b20 703b200a 20202020 0, 0) + p; . │ │ │ │ - 0x00962fa0 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ - 0x00962fb0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00962fc0 6d28706f 73202a20 755f7072 6f6a6563 m(pos * u_projec │ │ │ │ - 0x00962fd0 74696f6e 2c20755f 7069766f 74547261 tion, u_pivotTra │ │ │ │ - 0x00962fe0 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x00962ff0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00963000 5446200a 20202020 765f636f 6c6f7220 TF . v_color │ │ │ │ - 0x00963010 3d207465 78747572 6528755f 636f6c6f = texture(u_colo │ │ │ │ - 0x00963020 72546578 2c20615f 636f6c6f 72546578 rTex, a_colorTex │ │ │ │ - 0x00963030 436f6f72 64732e78 79293b20 0a202023 Coords.xy); . # │ │ │ │ - 0x00963040 656c7365 200a2020 2020765f 636f6c6f else . v_colo │ │ │ │ - 0x00963050 72546578 436f6f72 6473203d 20615f63 rTexCoords = a_c │ │ │ │ - 0x00963060 6f6c6f72 54657843 6f6f7264 732e7879 olorTexCoords.xy │ │ │ │ - 0x00963070 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00963080 20765f6e 6f726d61 6c203d20 615f6e6f v_normal = a_no │ │ │ │ - 0x00963090 726d616c 3b200a20 207d200a 00000000 rmal; . } ..... │ │ │ │ - 0x009630a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009630b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009630c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009630d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009630e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009630f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00963100 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00963110 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00963120 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00963130 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00963140 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00963150 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00963160 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00963170 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00963180 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00963190 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009631a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009631b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009631c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009631d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009631e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009631f0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00963200 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00963210 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00963220 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00963230 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ - 0x00963240 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ - 0x00963250 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ - 0x00963260 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ - 0x00963270 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ - 0x00963280 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x00963290 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x009632a0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ - 0x009632b0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x009632c0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x009632d0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x009632e0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x009632f0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00963300 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00963310 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00963320 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00963330 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00963340 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00963350 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00963360 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00963370 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00963380 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00963390 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x009633a0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x009633b0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x009633c0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x009633d0 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x009633e0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x009633f0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00963400 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00963410 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00963420 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00963430 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00963440 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00963450 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00963460 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00963470 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00963480 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00963490 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x009634a0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x009634b0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x009634c0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x009634d0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x009634e0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x009634f0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00963500 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00963510 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00963520 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00963530 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00963540 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00963550 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00963560 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00963570 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00963580 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00963590 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x009635a0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x009635b0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x009635c0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x009635d0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x009635e0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x009635f0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00963600 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00963610 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00963620 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00963630 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00963640 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00963650 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00963660 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00963670 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00963680 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00963690 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x009636a0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x009636b0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x009636c0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x009636d0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x009636e0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x009636f0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00963700 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00963710 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00963720 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00963730 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00963740 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00963750 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00963760 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00963770 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00963780 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00963790 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x009637a0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x009637b0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x009637c0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x009637d0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x009637e0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x009637f0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00963800 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00963810 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00963820 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00963830 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00963840 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00963850 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00963860 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00963870 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00963880 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00963890 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x009638a0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x009638b0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x009638c0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x009638d0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x009638e0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x009638f0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00963900 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00963910 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00963920 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00963930 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00963940 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00963950 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00963960 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00963970 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00963980 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ - 0x00963990 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ - 0x009639a0 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ - 0x009639b0 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x009639c0 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ - 0x009639d0 3428615f 6e6f726d 616c2e78 79202b20 4(a_normal.xy + │ │ │ │ - 0x009639e0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x009639f0 2e7a772c 20302e30 2c20302e 3029202a .zw, 0.0, 0.0) * │ │ │ │ - 0x00963a00 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00963a10 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00963a20 3d206170 706c7942 696c6c62 6f617264 = applyBillboard │ │ │ │ - 0x00963a30 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ - 0x00963a40 69766f74 202a2075 5f70726f 6a656374 ivot * u_project │ │ │ │ - 0x00963a50 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ - 0x00963a60 73666f72 6d2c2030 2e302c20 6f666673 sform, 0.0, offs │ │ │ │ - 0x00963a70 65742e78 79293b20 0a202023 69666465 et.xy); . #ifde │ │ │ │ - 0x00963a80 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x00963a90 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ - 0x00963aa0 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ - 0x00963ab0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x00963ac0 2e787929 3b200a20 2023656c 7365200a .xy); . #else . │ │ │ │ - 0x00963ad0 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ - 0x00963ae0 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ - 0x00963af0 78436f6f 7264732e 78793b20 0a202023 xCoords.xy; . # │ │ │ │ - 0x00963b00 656e6469 66200a20 20202076 5f6e6f72 endif . v_nor │ │ │ │ - 0x00963b10 6d616c20 3d20615f 6e6f726d 616c3b20 mal = a_normal; │ │ │ │ - 0x00963b20 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x00963b30 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00963b40 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00963b50 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00963b60 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00963b70 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00963b80 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00963b90 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00963ba0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00963bb0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00963bc0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00963bd0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00963be0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00963bf0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00963c00 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00963c10 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00963c20 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00963c30 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00963c40 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00963c50 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00963c60 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00963c70 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00963c80 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00963c90 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ - 0x00963ca0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x00963cb0 78436f6f 72643b20 0a202069 6e207665 xCoord; . in ve │ │ │ │ - 0x00963cc0 63342061 5f6d6173 6b546578 436f6f72 c4 a_maskTexCoor │ │ │ │ - 0x00963cd0 643b200a 20206f75 74207665 63322076 d; . out vec2 v │ │ │ │ - 0x00963ce0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x00963cf0 0a20206f 75742076 65633220 765f6d61 . out vec2 v_ma │ │ │ │ - 0x00963d00 736b5465 78436f6f 72643b20 0a202075 skTexCoord; . u │ │ │ │ - 0x00963d10 6e69666f 726d206d 61743420 755f6d6f niform mat4 u_mo │ │ │ │ - 0x00963d20 64656c56 6965773b 200a2020 756e6966 delView; . unif │ │ │ │ - 0x00963d30 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ - 0x00963d40 6374696f 6e3b200a 2020756e 69666f72 ction; . unifor │ │ │ │ - 0x00963d50 6d206d61 74342075 5f706976 6f745472 m mat4 u_pivotTr │ │ │ │ - 0x00963d60 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ - 0x00963d70 6f726d20 76656332 20755f63 6f6e7472 orm vec2 u_contr │ │ │ │ - 0x00963d80 61737447 616d6d61 3b200a20 20756e69 astGamma; . uni │ │ │ │ - 0x00963d90 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ - 0x00963da0 63697479 3b200a20 20756e69 666f726d city; . uniform │ │ │ │ - 0x00963db0 20666c6f 61742075 5f7a5363 616c653b float u_zScale; │ │ │ │ - 0x00963dc0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00963dd0 7420755f 696e7465 72706f6c 6174696f t u_interpolatio │ │ │ │ - 0x00963de0 6e3b200a 2020756e 69666f72 6d20666c n; . uniform fl │ │ │ │ - 0x00963df0 6f617420 755f6973 4f75746c 696e6550 oat u_isOutlineP │ │ │ │ - 0x00963e00 6173733b 200a2020 636f6e73 7420666c ass; . const fl │ │ │ │ - 0x00963e10 6f617420 6b536861 7065436f 6f726453 oat kShapeCoordS │ │ │ │ - 0x00963e20 63616c61 72203d20 31303030 2e303b20 calar = 1000.0; │ │ │ │ - 0x00963e30 0a202076 65633420 6170706c 79506976 . vec4 applyPiv │ │ │ │ - 0x00963e40 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00963e50 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00963e60 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00963e70 61742070 69766f74 5265616c 5a29200a at pivotRealZ) . │ │ │ │ - 0x00963e80 20207b20 0a202020 20766563 34207472 { . vec4 tr │ │ │ │ - 0x00963e90 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ - 0x00963ea0 20706976 6f743b20 0a202020 20666c6f pivot; . flo │ │ │ │ - 0x00963eb0 61742077 203d2074 72616e73 666f726d at w = transform │ │ │ │ - 0x00963ec0 65645069 766f742e 773b200a 20202020 edPivot.w; . │ │ │ │ - 0x00963ed0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00963ee0 2e787977 203d2028 7069766f 74547261 .xyw = (pivotTra │ │ │ │ - 0x00963ef0 6e73666f 726d202a 20766563 34287472 nsform * vec4(tr │ │ │ │ - 0x00963f00 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00963f10 792c2070 69766f74 5265616c 5a2c2077 y, pivotRealZ, w │ │ │ │ - 0x00963f20 29292e78 79773b20 0a202020 20747261 )).xyw; . tra │ │ │ │ - 0x00963f30 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00963f40 2a3d2074 72616e73 666f726d 65645069 *= transformedPi │ │ │ │ - 0x00963f50 766f742e 77202f20 773b200a 20202369 vot.w / w; . #i │ │ │ │ - 0x00963f60 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00963f70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00963f80 742e7920 3d202d74 72616e73 666f726d t.y = -transform │ │ │ │ - 0x00963f90 65645069 766f742e 793b200a 20202020 edPivot.y; . │ │ │ │ - 0x00963fa0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00963fb0 2e7a203d 20287472 616e7366 6f726d65 .z = (transforme │ │ │ │ - 0x00963fc0 64506976 6f742e7a 20202b20 7472616e dPivot.z + tran │ │ │ │ - 0x00963fd0 73666f72 6d656450 69766f74 2e772920 sformedPivot.w) │ │ │ │ - 0x00963fe0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00963ff0 200a2020 20207265 7475726e 20747261 . return tra │ │ │ │ - 0x00964000 6e73666f 726d6564 5069766f 743b200a nsformedPivot; . │ │ │ │ - 0x00964010 20207d20 0a202076 65633420 6170706c } . vec4 appl │ │ │ │ - 0x00964020 7942696c 6c626f61 72645069 766f7454 yBillboardPivotT │ │ │ │ - 0x00964030 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00964040 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00964050 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00964060 7069766f 74526561 6c5a2c20 76656332 pivotRealZ, vec2 │ │ │ │ - 0x00964070 206f6666 73657429 200a2020 7b200a20 offset) . { . │ │ │ │ - 0x00964080 20202066 6c6f6174 206c6f67 69635a20 float logicZ │ │ │ │ - 0x00964090 3d207069 766f742e 7a202f20 7069766f = pivot.z / pivo │ │ │ │ - 0x009640a0 742e773b 200a2020 20207665 63342074 t.w; . vec4 t │ │ │ │ - 0x009640b0 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x009640c0 3d207069 766f7454 72616e73 666f726d = pivotTransform │ │ │ │ - 0x009640d0 202a2076 65633428 7069766f 742e7879 * vec4(pivot.xy │ │ │ │ - 0x009640e0 2c207069 766f7452 65616c5a 2c207069 , pivotRealZ, pi │ │ │ │ - 0x009640f0 766f742e 77293b20 0a202020 20766563 vot.w); . vec │ │ │ │ - 0x00964100 34207363 616c6520 3d207069 766f7454 4 scale = pivotT │ │ │ │ - 0x00964110 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x00964120 312e302c 202d312e 302c2030 2e302c20 1.0, -1.0, 0.0, │ │ │ │ - 0x00964130 312e3029 3b200a20 20202076 65633420 1.0); . vec4 │ │ │ │ - 0x00964140 706f7369 74696f6e 203d2076 65633428 position = vec4( │ │ │ │ - 0x00964150 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00964160 2e787920 2f207472 616e7366 6f726d65 .xy / transforme │ │ │ │ - 0x00964170 64506976 6f742e77 2c206c6f 6769635a dPivot.w, logicZ │ │ │ │ - 0x00964180 2c20312e 3029202b 20766563 34286f66 , 1.0) + vec4(of │ │ │ │ - 0x00964190 66736574 202f2073 63616c65 2e77202a fset / scale.w * │ │ │ │ - 0x009641a0 20736361 6c652e78 2c20302e 302c2030 scale.x, 0.0, 0 │ │ │ │ - 0x009641b0 2e30293b 200a2020 23696664 65662056 .0); . #ifdef V │ │ │ │ - 0x009641c0 554c4b41 4e200a20 20202070 6f736974 ULKAN . posit │ │ │ │ - 0x009641d0 696f6e2e 79203d20 2d706f73 6974696f ion.y = -positio │ │ │ │ - 0x009641e0 6e2e793b 200a2020 2020706f 73697469 n.y; . positi │ │ │ │ - 0x009641f0 6f6e2e7a 203d2028 706f7369 74696f6e on.z = (position │ │ │ │ - 0x00964200 2e7a2020 2b20706f 73697469 6f6e2e77 .z + position.w │ │ │ │ - 0x00964210 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x00964220 6966200a 20202020 72657475 726e2070 if . return p │ │ │ │ - 0x00964230 6f736974 696f6e3b 200a2020 7d200a20 osition; . } . │ │ │ │ - 0x00964240 20766563 32206361 6c634c69 6e655472 vec2 calcLineTr │ │ │ │ - 0x00964250 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00964260 28766563 32206f72 6967696e 616c4178 (vec2 originalAx │ │ │ │ - 0x00964270 6973506f 732c2076 65633220 73686966 isPos, vec2 shif │ │ │ │ - 0x00964280 74656450 6f732c20 6d617434 206d6f64 tedPos, mat4 mod │ │ │ │ - 0x00964290 656c5669 65772c20 666c6f61 74206861 elView, float ha │ │ │ │ - 0x009642a0 6c665769 64746829 200a2020 7b200a20 lfWidth) . { . │ │ │ │ - 0x009642b0 20202076 65633220 70203d20 28766563 vec2 p = (vec │ │ │ │ - 0x009642c0 34287368 69667465 64506f73 2c20302e 4(shiftedPos, 0. │ │ │ │ - 0x009642d0 302c2031 2e302920 2a206d6f 64656c56 0, 1.0) * modelV │ │ │ │ - 0x009642e0 69657729 2e78793b 200a2020 20207665 iew).xy; . ve │ │ │ │ - 0x009642f0 63322064 203d2070 202d206f 72696769 c2 d = p - origi │ │ │ │ - 0x00964300 6e616c41 78697350 6f733b20 0a202020 nalAxisPos; . │ │ │ │ - 0x00964310 20696620 28646f74 28642c20 64292021 if (dot(d, d) ! │ │ │ │ - 0x00964320 3d20302e 3029200a 20202020 20207265 = 0.0) . re │ │ │ │ - 0x00964330 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00964340 73506f73 202b206e 6f726d61 6c697a65 sPos + normalize │ │ │ │ - 0x00964350 28642920 2a206861 6c665769 6474683b (d) * halfWidth; │ │ │ │ - 0x00964360 200a2020 2020656c 7365200a 20202020 . else . │ │ │ │ - 0x00964370 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00964380 6c417869 73506f73 3b200a20 207d200a lAxisPos; . } . │ │ │ │ - 0x00964390 2020766f 6964206d 61696e28 29200a20 void main() . │ │ │ │ - 0x009643a0 207b200a 20202020 76656332 206e6f72 { . vec2 nor │ │ │ │ - 0x009643b0 6d616c20 3d20615f 6e6f726d 616c2e78 mal = a_normal.x │ │ │ │ - 0x009643c0 793b200a 20202020 666c6f61 74206861 y; . float ha │ │ │ │ - 0x009643d0 6c665769 64746820 3d206c65 6e677468 lfWidth = length │ │ │ │ - 0x009643e0 286e6f72 6d616c29 3b200a20 20202076 (normal); . v │ │ │ │ - 0x009643f0 65633220 7472616e 73666f72 6d656441 ec2 transformedA │ │ │ │ - 0x00964400 78697350 6f73203d 20287665 63342861 xisPos = (vec4(a │ │ │ │ - 0x00964410 5f706f73 6974696f 6e2e7879 2c20302e _position.xy, 0. │ │ │ │ - 0x00964420 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ - 0x00964430 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x00964440 69662028 68616c66 57696474 6820213d if (halfWidth != │ │ │ │ - 0x00964450 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x00964460 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ - 0x00964470 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ - 0x00964480 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00964490 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ - 0x009644a0 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x009644b0 6f6e2e78 79202b20 6e6f726d 616c2c20 on.xy + normal, │ │ │ │ - 0x009644c0 0a202020 20202020 20202020 20202020 . │ │ │ │ - 0x009644d0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009644e0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009644f0 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ - 0x00964500 65772c20 68616c66 57696474 68293b20 ew, halfWidth); │ │ │ │ - 0x00964510 0a202020 207d200a 20202020 666c6f61 . } . floa │ │ │ │ - 0x00964520 7420754f 66667365 74203d20 6d696e28 t uOffset = min( │ │ │ │ - 0x00964530 6c656e67 74682876 65633428 6b536861 length(vec4(kSha │ │ │ │ - 0x00964540 7065436f 6f726453 63616c61 722c2030 peCoordScalar, 0 │ │ │ │ - 0x00964550 2c20302c 20302920 2a20755f 6d6f6465 , 0, 0) * u_mode │ │ │ │ - 0x00964560 6c566965 7729202a 20615f6d 61736b54 lView) * a_maskT │ │ │ │ - 0x00964570 6578436f 6f72642e 782c2031 2e30293b exCoord.x, 1.0); │ │ │ │ - 0x00964580 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ - 0x00964590 436f6f72 64203d20 615f636f 6c6f7254 Coord = a_colorT │ │ │ │ - 0x009645a0 6578436f 6f72643b 200a2020 2020765f exCoord; . v_ │ │ │ │ - 0x009645b0 6d61736b 54657843 6f6f7264 203d2076 maskTexCoord = v │ │ │ │ - 0x009645c0 65633228 615f6d61 736b5465 78436f6f ec2(a_maskTexCoo │ │ │ │ - 0x009645d0 72642e79 202b2075 4f666673 6574202a rd.y + uOffset * │ │ │ │ - 0x009645e0 20615f6d 61736b54 6578436f 6f72642e a_maskTexCoord. │ │ │ │ - 0x009645f0 7a2c2061 5f6d6173 6b546578 436f6f72 z, a_maskTexCoor │ │ │ │ - 0x00964600 642e7729 3b200a20 20202076 65633420 d.w); . vec4 │ │ │ │ - 0x00964610 706f7320 3d207665 63342874 72616e73 pos = vec4(trans │ │ │ │ - 0x00964620 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ - 0x00964630 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ - 0x00964640 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ - 0x00964650 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x00964660 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ - 0x00964670 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ - 0x00964680 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00964690 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ - 0x009646a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009646b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009646c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009646d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009646e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009646f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00964700 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00964710 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00964720 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00964730 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00964740 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00964750 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00964760 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00964770 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00964780 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00964790 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009647a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009647b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009647c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009647d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009647e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009647f0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00964800 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00964810 72546578 436f6f72 64733b20 0a202069 rTexCoords; . i │ │ │ │ - 0x00964820 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ - 0x00964830 436f6f72 64733b20 0a202023 69666465 Coords; . #ifde │ │ │ │ - 0x00964840 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x00964850 6f757420 4c4f575f 50207665 63342076 out LOW_P vec4 v │ │ │ │ - 0x00964860 5f636f6c 6f723b20 0a202023 656c7365 _color; . #else │ │ │ │ - 0x00964870 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00964880 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00964890 20202365 6e646966 200a2020 6f757420 #endif . out │ │ │ │ - 0x009648a0 76656332 20765f6d 61736b54 6578436f vec2 v_maskTexCo │ │ │ │ - 0x009648b0 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ - 0x009648c0 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ - 0x009648d0 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ - 0x009648e0 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ - 0x009648f0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00964900 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ - 0x00964910 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ - 0x00964920 63322075 5f636f6e 74726173 7447616d c2 u_contrastGam │ │ │ │ - 0x00964930 6d613b20 0a202075 6e69666f 726d2066 ma; . uniform f │ │ │ │ - 0x00964940 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ - 0x00964950 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x00964960 20755f7a 5363616c 653b200a 2020756e u_zScale; . un │ │ │ │ - 0x00964970 69666f72 6d20666c 6f617420 755f696e iform float u_in │ │ │ │ - 0x00964980 74657270 6f6c6174 696f6e3b 200a2020 terpolation; . │ │ │ │ - 0x00964990 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x009649a0 69734f75 746c696e 65506173 733b200a isOutlinePass; . │ │ │ │ - 0x009649b0 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ - 0x009649c0 56544620 0a202075 6e69666f 726d2073 VTF . uniform s │ │ │ │ - 0x009649d0 616d706c 65723244 20755f63 6f6c6f72 ampler2D u_color │ │ │ │ - 0x009649e0 5465783b 200a2020 23656e64 6966200a Tex; . #endif . │ │ │ │ - 0x009649f0 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ - 0x00964a00 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ - 0x00964a10 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ - 0x00964a20 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ - 0x00964a30 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00964a40 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00964a50 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00964a60 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ - 0x00964a70 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00964a80 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00964a90 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ - 0x00964aa0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00964ab0 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ - 0x00964ac0 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ - 0x00964ad0 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ - 0x00964ae0 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ - 0x00964af0 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ - 0x00964b00 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ - 0x00964b10 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00964b20 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ - 0x00964b30 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ - 0x00964b40 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ - 0x00964b50 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ - 0x00964b60 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ - 0x00964b70 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ - 0x00964b80 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ - 0x00964b90 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ - 0x00964ba0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00964bb0 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ - 0x00964bc0 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ - 0x00964bd0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00964be0 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ - 0x00964bf0 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ - 0x00964c00 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ - 0x00964c10 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ - 0x00964c20 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x00964c30 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x00964c40 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x00964c50 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ - 0x00964c60 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ - 0x00964c70 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ - 0x00964c80 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ - 0x00964c90 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00964ca0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00964cb0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00964cc0 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ - 0x00964cd0 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ - 0x00964ce0 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ - 0x00964cf0 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ - 0x00964d00 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ - 0x00964d10 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ - 0x00964d20 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x00964d30 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ - 0x00964d40 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ - 0x00964d50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00964d60 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ - 0x00964d70 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ - 0x00964d80 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ - 0x00964d90 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ - 0x00964da0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00964db0 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ - 0x00964dc0 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ - 0x00964dd0 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ - 0x00964de0 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ - 0x00964df0 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ - 0x00964e00 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00964e10 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ - 0x00964e20 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ - 0x00964e30 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x00964e40 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ - 0x00964e50 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ - 0x00964e60 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ - 0x00964e70 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ - 0x00964e80 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ - 0x00964e90 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ - 0x00964ea0 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ - 0x00964eb0 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ - 0x00964ec0 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ - 0x00964ed0 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ - 0x00964ee0 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ - 0x00964ef0 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ - 0x00964f00 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ - 0x00964f10 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00964f20 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ - 0x00964f30 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ - 0x00964f40 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ - 0x00964f50 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ - 0x00964f60 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00964f70 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ - 0x00964f80 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ - 0x00964f90 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x00964fa0 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ - 0x00964fb0 202a2075 5f6d6f64 656c5669 6577202a * u_modelView * │ │ │ │ - 0x00964fc0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00964fd0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00964fe0 3d206170 706c7950 69766f74 5472616e = applyPivotTran │ │ │ │ - 0x00964ff0 73666f72 6d28706f 732c2075 5f706976 sform(pos, u_piv │ │ │ │ - 0x00965000 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ - 0x00965010 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ - 0x00965020 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ - 0x00965030 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ - 0x00965040 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ - 0x00965050 6f725465 78436f6f 72647329 3b200a20 orTexCoords); . │ │ │ │ - 0x00965060 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ - 0x00965070 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x00965080 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00965090 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x009650a0 765f6d61 736b5465 78436f6f 72647320 v_maskTexCoords │ │ │ │ - 0x009650b0 3d20615f 6d61736b 54657843 6f6f7264 = a_maskTexCoord │ │ │ │ - 0x009650c0 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ - 0x009650d0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009650e0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009650f0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00965100 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00965110 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00965120 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00965130 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00965140 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00965150 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00965160 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00965170 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00965180 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00965190 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x009651a0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x009651b0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009651c0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009651d0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009651e0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009651f0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00965200 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00965210 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00965220 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ - 0x00965230 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ - 0x00965240 6f6f7264 733b200a 2020696e 20766563 oords; . in vec │ │ │ │ - 0x00965250 3420615f 636f6c6f 723b200a 20206f75 4 a_color; . ou │ │ │ │ - 0x00965260 74207665 63322076 5f746578 436f6f72 t vec2 v_texCoor │ │ │ │ - 0x00965270 64733b20 0a20206f 75742076 65633420 ds; . out vec4 │ │ │ │ - 0x00965280 765f636f 6c6f723b 200a2020 756e6966 v_color; . unif │ │ │ │ - 0x00965290 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ - 0x009652a0 6374696f 6e3b200a 2020636f 6e737420 ction; . const │ │ │ │ - 0x009652b0 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ - 0x009652c0 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ - 0x009652d0 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ - 0x009652e0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x009652f0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00965300 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00965310 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ - 0x00965320 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00965330 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00965340 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ - 0x00965350 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ - 0x00965360 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ - 0x00965370 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00965380 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ - 0x00965390 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x009653a0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009653b0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x009653c0 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ - 0x009653d0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009653e0 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ - 0x009653f0 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ - 0x00965400 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x00965410 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00965420 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ - 0x00965430 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ - 0x00965440 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00965450 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ - 0x00965460 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ - 0x00965470 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00965480 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x00965490 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ - 0x009654a0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ - 0x009654b0 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ - 0x009654c0 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ - 0x009654d0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x009654e0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x009654f0 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x00965500 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ - 0x00965510 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ - 0x00965520 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ - 0x00965530 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ - 0x00965540 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ - 0x00965550 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00965560 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ - 0x00965570 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ - 0x00965580 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00965590 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ - 0x009655a0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ - 0x009655b0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x009655c0 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ - 0x009655d0 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ - 0x009655e0 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ - 0x009655f0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00965600 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ - 0x00965610 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ - 0x00965620 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ - 0x00965630 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ - 0x00965640 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ - 0x00965650 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ - 0x00965660 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ - 0x00965670 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ - 0x00965680 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ - 0x00965690 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ - 0x009656a0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ - 0x009656b0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x009656c0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x009656d0 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ - 0x009656e0 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ - 0x009656f0 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x00965700 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ - 0x00965710 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ - 0x00965720 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ - 0x00965730 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ - 0x00965740 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ - 0x00965750 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ - 0x00965760 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ - 0x00965770 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ - 0x00965780 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x00965790 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ - 0x009657a0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x009657b0 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ - 0x009657c0 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ - 0x009657d0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x009657e0 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ - 0x009657f0 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ - 0x00965800 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ - 0x00965810 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00965820 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ - 0x00965830 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ - 0x00965840 0a20207b 200a2020 2020765f 74657843 . { . v_texC │ │ │ │ - 0x00965850 6f6f7264 73203d20 615f7465 78436f6f oords = a_texCoo │ │ │ │ - 0x00965860 7264733b 200a2020 2020765f 636f6c6f rds; . v_colo │ │ │ │ - 0x00965870 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x00965880 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00965890 76656334 28615f70 6f736974 696f6e2c vec4(a_position, │ │ │ │ - 0x009658a0 20302c20 3129202a 20755f70 726f6a65 0, 1) * u_proje │ │ │ │ - 0x009658b0 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ - 0x009658c0 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ - 0x009658d0 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ - 0x009658e0 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ - 0x009658f0 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x00965900 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ - 0x00965910 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ - 0x00965920 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ - 0x00965930 64696620 0a20207d 200a0000 00000000 dif . } ....... │ │ │ │ - 0x00965940 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00965950 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00965960 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00965970 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00965980 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00965990 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009659a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009659b0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009659c0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009659d0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009659e0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x009659f0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00965a00 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00965a10 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00965a20 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00965a30 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00965a40 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00965a50 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00965a60 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00965a70 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00965a80 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00965a90 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00965aa0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00965ab0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00965ac0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x00965ad0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00965ae0 5f565446 200a2020 6f757420 4c4f575f _VTF . out LOW_ │ │ │ │ - 0x00965af0 50207665 63342076 5f636f6c 6f723b20 P vec4 v_color; │ │ │ │ - 0x00965b00 0a202023 656c7365 200a2020 6f757420 . #else . out │ │ │ │ - 0x00965b10 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x00965b20 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x00965b30 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00965b40 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00965b50 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00965b60 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x00965b70 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x00965b80 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x00965b90 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x00965ba0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x00965bb0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00965bc0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x00965bd0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x00965be0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x00965bf0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x00965c00 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x00965c10 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x00965c20 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ - 0x00965c30 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x00965c40 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x00965c50 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x00965c60 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ - 0x00965c70 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00965c80 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00965c90 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00965ca0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00965cb0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00965cc0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00965cd0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00965ce0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00965cf0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00965d00 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00965d10 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00965d20 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00965d30 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00965d40 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00965d50 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00965d60 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00965d70 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00965d80 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00965d90 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00965da0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00965db0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00965dc0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00965dd0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00965de0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00965df0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00965e00 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00965e10 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00965e20 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00965e30 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00965e40 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00965e50 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00965e60 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00965e70 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00965e80 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00965e90 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00965ea0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00965eb0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00965ec0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00965ed0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00965ee0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00965ef0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00965f00 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00965f10 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00965f20 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00965f30 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00965f40 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00965f50 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00965f60 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00965f70 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00965f80 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00965f90 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00965fa0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00965fb0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00965fc0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00965fd0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00965fe0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00965ff0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00966000 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00966010 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00966020 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00966030 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00966040 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00966050 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00966060 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00966070 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00966080 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00966090 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x009660a0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x009660b0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x009660c0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x009660d0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x009660e0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x009660f0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00966100 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00966110 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00966120 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00966130 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00966140 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00966150 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00966160 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00966170 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00966180 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00966190 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x009661a0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x009661b0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x009661c0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x009661d0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x009661e0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x009661f0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00966200 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00966210 206e6f72 6d616c20 3d20615f 6e6f726d normal = a_norm │ │ │ │ - 0x00966220 616c2e78 793b200a 20202020 666c6f61 al.xy; . floa │ │ │ │ - 0x00966230 74206861 6c665769 64746820 3d206c65 t halfWidth = le │ │ │ │ - 0x00966240 6e677468 286e6f72 6d616c29 3b200a20 ngth(normal); . │ │ │ │ - 0x00966250 20202076 65633220 7472616e 73666f72 vec2 transfor │ │ │ │ - 0x00966260 6d656441 78697350 6f73203d 20287665 medAxisPos = (ve │ │ │ │ - 0x00966270 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x00966280 2c20302e 302c2031 2e302920 2a20755f , 0.0, 1.0) * u_ │ │ │ │ - 0x00966290 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x009662a0 20202020 69662028 68616c66 57696474 if (halfWidt │ │ │ │ - 0x009662b0 6820213d 20302e30 29200a20 2020207b h != 0.0) . { │ │ │ │ - 0x009662c0 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ - 0x009662d0 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ - 0x009662e0 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x009662f0 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ - 0x00966300 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ - 0x00966310 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ - 0x00966320 616c2c20 0a202020 20202020 20202020 al, . │ │ │ │ - 0x00966330 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00966340 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00966350 20202020 20202020 20202075 5f6d6f64 u_mod │ │ │ │ - 0x00966360 656c5669 65772c20 68616c66 57696474 elView, halfWidt │ │ │ │ - 0x00966370 68293b20 0a202020 207d200a 20202369 h); . } . #i │ │ │ │ - 0x00966380 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x00966390 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ - 0x009663a0 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ - 0x009663b0 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ - 0x009663c0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ - 0x009663d0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x009663e0 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ - 0x009663f0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x00966400 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x00966410 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00966420 41786973 506f732c 20615f70 6f736974 AxisPos, a_posit │ │ │ │ - 0x00966430 696f6e2e 7a2c2031 2e302920 2a20755f ion.z, 1.0) * u_ │ │ │ │ - 0x00966440 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ - 0x00966450 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x00966460 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00966470 726d2870 6f732c20 755f7069 766f7454 rm(pos, u_pivotT │ │ │ │ - 0x00966480 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ - 0x00966490 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x009664a0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009664b0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x009664c0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x009664d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009664e0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x009664f0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00966500 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00966510 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00966520 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00966530 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00966540 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00966550 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00966560 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00966570 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00966580 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00966590 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009665a0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009665b0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009665c0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x009665d0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x009665e0 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x009665f0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00966600 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x00966610 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x00966620 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x00966630 65633220 615f6d61 736b5465 78436f6f ec2 a_maskTexCoo │ │ │ │ - 0x00966640 7264733b 200a2020 6f757420 76656332 rds; . out vec2 │ │ │ │ - 0x00966650 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x00966660 733b200a 20206f75 74207665 63322076 s; . out vec2 v │ │ │ │ - 0x00966670 5f6d6173 6b546578 436f6f72 64733b20 _maskTexCoords; │ │ │ │ - 0x00966680 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00966690 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x009666a0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x009666b0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x009666c0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x009666d0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x009666e0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x009666f0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x00966700 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00966710 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x00966720 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x00966730 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x00966740 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x00966750 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x00966760 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x00966770 696e6550 6173733b 200a2020 636f6e73 inePass; . cons │ │ │ │ - 0x00966780 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00966790 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x009667a0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x009667b0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x009667c0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x009667d0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x009667e0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x009667f0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00966800 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00966810 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00966820 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00966830 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00966840 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00966850 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00966860 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00966870 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00966880 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00966890 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x009668a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009668b0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x009668c0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x009668d0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x009668e0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x009668f0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00966900 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00966910 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00966920 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00966930 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00966940 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00966950 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00966960 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00966970 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00966980 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00966990 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x009669a0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x009669b0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x009669c0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x009669d0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x009669e0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x009669f0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00966a00 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00966a10 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00966a20 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00966a30 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00966a40 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00966a50 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00966a60 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00966a70 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00966a80 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00966a90 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00966aa0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00966ab0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00966ac0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00966ad0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00966ae0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00966af0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00966b00 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00966b10 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00966b20 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00966b30 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00966b40 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00966b50 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00966b60 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00966b70 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00966b80 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00966b90 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00966ba0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00966bb0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00966bc0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00966bd0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00966be0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00966bf0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00966c00 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00966c10 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00966c20 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00966c30 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00966c40 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00966c50 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00966c60 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00966c70 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00966c80 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00966c90 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00966ca0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00966cb0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00966cc0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00966cd0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00966ce0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00966cf0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00966d00 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00966d10 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00966d20 20706f73 203d2076 65633428 615f706f pos = vec4(a_po │ │ │ │ - 0x00966d30 73697469 6f6e2e78 797a2c20 3129202a sition.xyz, 1) * │ │ │ │ - 0x00966d40 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ - 0x00966d50 20202076 65633420 73686966 74656450 vec4 shiftedP │ │ │ │ - 0x00966d60 6f73203d 20766563 3428615f 6e6f726d os = vec4(a_norm │ │ │ │ - 0x00966d70 616c2c20 302c2030 29202b20 706f733b al, 0, 0) + pos; │ │ │ │ - 0x00966d80 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00966d90 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x00966da0 616e7366 6f726d28 73686966 74656450 ansform(shiftedP │ │ │ │ - 0x00966db0 6f73202a 20755f70 726f6a65 6374696f os * u_projectio │ │ │ │ - 0x00966dc0 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x00966dd0 6f726d2c 20302e30 293b200a 20202020 orm, 0.0); . │ │ │ │ - 0x00966de0 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x00966df0 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ - 0x00966e00 7264733b 200a2020 2020765f 6d61736b rds; . v_mask │ │ │ │ - 0x00966e10 54657843 6f6f7264 73203d20 615f6d61 TexCoords = a_ma │ │ │ │ - 0x00966e20 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ - 0x00966e30 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x00966e40 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00966e50 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00966e60 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00966e70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00966e80 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00966e90 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00966ea0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00966eb0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00966ec0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00966ed0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00966ee0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00966ef0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00966f00 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00966f10 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00966f20 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00966f30 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00966f40 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00966f50 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00966f60 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00966f70 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00966f80 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x00966f90 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00966fa0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x00966fb0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x00966fc0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x00966fd0 65633220 615f6d61 736b5465 78436f6f ec2 a_maskTexCoo │ │ │ │ - 0x00966fe0 7264733b 200a2020 6f757420 76656332 rds; . out vec2 │ │ │ │ - 0x00966ff0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x00967000 733b200a 20206f75 74207665 63322076 s; . out vec2 v │ │ │ │ - 0x00967010 5f6d6173 6b546578 436f6f72 64733b20 _maskTexCoords; │ │ │ │ - 0x00967020 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00967030 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00967040 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00967050 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x00967060 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x00967070 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x00967080 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x00967090 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x009670a0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x009670b0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x009670c0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x009670d0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x009670e0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x009670f0 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x00967100 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x00967110 696e6550 6173733b 200a2020 636f6e73 inePass; . cons │ │ │ │ - 0x00967120 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00967130 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00967140 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00967150 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00967160 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00967170 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00967180 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00967190 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x009671a0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x009671b0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x009671c0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x009671d0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x009671e0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x009671f0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00967200 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00967210 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00967220 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00967230 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00967240 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00967250 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00967260 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00967270 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00967280 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00967290 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x009672a0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x009672b0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x009672c0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x009672d0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x009672e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009672f0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00967300 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00967310 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00967320 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00967330 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00967340 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00967350 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00967360 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00967370 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00967380 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00967390 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x009673a0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x009673b0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x009673c0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x009673d0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x009673e0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x009673f0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00967400 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00967410 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00967420 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00967430 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00967440 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00967450 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00967460 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00967470 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00967480 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00967490 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x009674a0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x009674b0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x009674c0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x009674d0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x009674e0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x009674f0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00967500 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00967510 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00967520 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00967530 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00967540 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00967550 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00967560 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00967570 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00967580 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00967590 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x009675a0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x009675b0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x009675c0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x009675d0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x009675e0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x009675f0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00967600 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00967610 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00967620 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00967630 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00967640 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00967650 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00967660 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00967670 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00967680 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00967690 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x009676a0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x009676b0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x009676c0 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ - 0x009676d0 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ - 0x009676e0 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ - 0x009676f0 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ - 0x00967700 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ - 0x00967710 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ - 0x00967720 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00967730 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00967740 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00967750 69766f74 5472616e 73666f72 6d287069 ivotTransform(pi │ │ │ │ - 0x00967760 766f7420 2a20755f 70726f6a 65637469 vot * u_projecti │ │ │ │ - 0x00967770 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ - 0x00967780 666f726d 2c200a20 20202020 20202020 form, . │ │ │ │ - 0x00967790 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009677a0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009677b0 20202020 2020615f 706f7369 74696f6e a_position │ │ │ │ - 0x009677c0 2e77202a 20755f7a 5363616c 652c206f .w * u_zScale, o │ │ │ │ - 0x009677d0 66667365 742e7879 293b200a 20202020 ffset.xy); . │ │ │ │ - 0x009677e0 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x009677f0 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ - 0x00967800 7264733b 200a2020 2020765f 6d61736b rds; . v_mask │ │ │ │ - 0x00967810 54657843 6f6f7264 73203d20 615f6d61 TexCoords = a_ma │ │ │ │ - 0x00967820 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ - 0x00967830 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x00967840 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00967850 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00967860 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00967870 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00967880 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00967890 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x009678a0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x009678b0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x009678c0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009678d0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009678e0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x009678f0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00967900 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00967910 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00967920 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00967930 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00967940 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00967950 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00967960 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00967970 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00967980 0a202069 6e207665 63322061 5f6e6f72 . in vec2 a_nor │ │ │ │ - 0x00967990 6d616c3b 200a2020 696e2076 65633220 mal; . in vec2 │ │ │ │ - 0x009679a0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x009679b0 3b200a20 206f7574 20766563 3220765f ; . out vec2 v_ │ │ │ │ - 0x009679c0 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ - 0x009679d0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x009679e0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x009679f0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00967a00 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x00967a10 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x00967a20 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x00967a30 756e6966 6f726d20 76656334 20755f70 uniform vec4 u_p │ │ │ │ - 0x00967a40 6f736974 696f6e3b 200a2020 756e6966 osition; . unif │ │ │ │ - 0x00967a50 6f726d20 76656332 20755f6c 696e6550 orm vec2 u_lineP │ │ │ │ - 0x00967a60 6172616d 733b200a 2020756e 69666f72 arams; . unifor │ │ │ │ - 0x00967a70 6d20666c 6f617420 755f6163 63757261 m float u_accura │ │ │ │ - 0x00967a80 63793b20 0a202075 6e69666f 726d2066 cy; . uniform f │ │ │ │ - 0x00967a90 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x00967aa0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00967ab0 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ - 0x00967ac0 69666f72 6d20666c 6f617420 755f617a iform float u_az │ │ │ │ - 0x00967ad0 696d7574 3b200a20 20636f6e 73742066 imut; . const f │ │ │ │ - 0x00967ae0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00967af0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00967b00 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00967b10 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00967b20 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00967b30 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00967b40 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00967b50 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00967b60 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00967b70 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00967b80 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00967b90 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00967ba0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00967bb0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x00967bc0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x00967bd0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00967be0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00967bf0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00967c00 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00967c10 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00967c20 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00967c30 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00967c40 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00967c50 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00967c60 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00967c70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00967c80 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x00967c90 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x00967ca0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x00967cb0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00967cc0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x00967cd0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x00967ce0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00967cf0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00967d00 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00967d10 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00967d20 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00967d30 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00967d40 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00967d50 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00967d60 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00967d70 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00967d80 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00967d90 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00967da0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x00967db0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x00967dc0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x00967dd0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x00967de0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00967df0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00967e00 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00967e10 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00967e20 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00967e30 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00967e40 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00967e50 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00967e60 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00967e70 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00967e80 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00967e90 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x00967ea0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x00967eb0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x00967ec0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x00967ed0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x00967ee0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00967ef0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00967f00 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00967f10 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00967f20 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00967f30 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00967f40 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00967f50 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00967f60 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00967f70 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00967f80 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x00967f90 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x00967fa0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x00967fb0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00967fc0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x00967fd0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00967fe0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00967ff0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00968000 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00968010 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00968020 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00968030 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00968040 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00968050 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00968060 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00968070 20207b20 0a202020 20666c6f 61742073 { . float s │ │ │ │ - 0x00968080 696e5620 3d207369 6e28755f 617a696d inV = sin(u_azim │ │ │ │ - 0x00968090 7574293b 200a2020 2020666c 6f617420 ut); . float │ │ │ │ - 0x009680a0 636f7356 203d2063 6f732875 5f617a69 cosV = cos(u_azi │ │ │ │ - 0x009680b0 6d757429 3b200a20 2020206d 61743420 mut); . mat4 │ │ │ │ - 0x009680c0 726f7461 74696f6e 3b200a20 20202072 rotation; . r │ │ │ │ - 0x009680d0 6f746174 696f6e5b 305d203d 20766563 otation[0] = vec │ │ │ │ - 0x009680e0 3428636f 73562c20 73696e56 2c20302e 4(cosV, sinV, 0. │ │ │ │ - 0x009680f0 302c2030 2e30293b 200a2020 2020726f 0, 0.0); . ro │ │ │ │ - 0x00968100 74617469 6f6e5b31 5d203d20 76656334 tation[1] = vec4 │ │ │ │ - 0x00968110 282d7369 6e562c20 636f7356 2c20302e (-sinV, cosV, 0. │ │ │ │ - 0x00968120 302c2030 2e30293b 200a2020 2020726f 0, 0.0); . ro │ │ │ │ - 0x00968130 74617469 6f6e5b32 5d203d20 76656334 tation[2] = vec4 │ │ │ │ - 0x00968140 28302e30 2c20302e 302c2031 2e302c20 (0.0, 0.0, 1.0, │ │ │ │ - 0x00968150 302e3029 3b200a20 20202072 6f746174 0.0); . rotat │ │ │ │ - 0x00968160 696f6e5b 335d203d 20766563 3428302e ion[3] = vec4(0. │ │ │ │ - 0x00968170 302c2030 2e302c20 302e302c 20312e30 0, 0.0, 0.0, 1.0 │ │ │ │ - 0x00968180 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x00968190 203d2076 65633428 755f706f 73697469 = vec4(u_positi │ │ │ │ - 0x009681a0 6f6e2e78 797a2c20 312e3029 202a2075 on.xyz, 1.0) * u │ │ │ │ - 0x009681b0 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ - 0x009681c0 20766563 34206e6f 726d616c 203d2076 vec4 normal = v │ │ │ │ - 0x009681d0 65633428 615f6e6f 726d616c 2c20302c ec4(a_normal, 0, │ │ │ │ - 0x009681e0 2030293b 200a2020 20207665 63342073 0); . vec4 s │ │ │ │ - 0x009681f0 68696674 6564506f 73203d20 6e6f726d hiftedPos = norm │ │ │ │ - 0x00968200 616c202a 20726f74 6174696f 6e202b20 al * rotation + │ │ │ │ - 0x00968210 706f733b 200a2020 2020676c 5f506f73 pos; . gl_Pos │ │ │ │ - 0x00968220 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ - 0x00968230 6f745472 616e7366 6f726d28 73686966 otTransform(shif │ │ │ │ - 0x00968240 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ - 0x00968250 6374696f 6e2c2075 5f706976 6f745472 ction, u_pivotTr │ │ │ │ - 0x00968260 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ - 0x00968270 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ - 0x00968280 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ - 0x00968290 78436f6f 7264733b 200a2020 7d200a00 xCoords; . } .. │ │ │ │ - 0x009682a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009682b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009682c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009682d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009682e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009682f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00968300 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00968310 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00968320 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00968330 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00968340 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00968350 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00968360 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00968370 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00968380 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00968390 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009683a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009683b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009683c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009683d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009683e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009683f0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00968400 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00968410 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00968420 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00968430 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00968440 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00968450 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00968460 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00968470 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00968480 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00968490 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x009684a0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x009684b0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x009684c0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x009684d0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x009684e0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x009684f0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00968500 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00968510 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00968520 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00968530 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00968540 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00968550 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00968560 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00968570 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00968580 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00968590 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x009685a0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x009685b0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x009685c0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x009685d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009685e0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x009685f0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00968600 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00968610 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00968620 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00968630 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00968640 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00968650 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00968660 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00968670 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00968680 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00968690 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x009686a0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x009686b0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x009686c0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x009686d0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x009686e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x009686f0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00968700 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00968710 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00968720 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00968730 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00968740 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00968750 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00968760 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00968770 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00968780 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00968790 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x009687a0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x009687b0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x009687c0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x009687d0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x009687e0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x009687f0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00968800 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00968810 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00968820 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00968830 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00968840 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00968850 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00968860 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00968870 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00968880 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00968890 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x009688a0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x009688b0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x009688c0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x009688d0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x009688e0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x009688f0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00968900 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00968910 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00968920 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00968930 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00968940 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00968950 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00968960 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00968970 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00968980 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00968990 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x009689a0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x009689b0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x009689c0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x009689d0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x009689e0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x009689f0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00968a00 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00968a10 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00968a20 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00968a30 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00968a40 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00968a50 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00968a60 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00968a70 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00968a80 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00968a90 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00968aa0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00968ab0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00968ac0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00968ad0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00968ae0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00968af0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x00968b00 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ - 0x00968b10 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00968b20 2020666c 6f617420 6e6f726d 616c4c65 float normalLe │ │ │ │ - 0x00968b30 6e203d20 6c656e67 74682861 5f6e6f72 n = length(a_nor │ │ │ │ - 0x00968b40 6d616c29 3b200a20 20202076 65633420 mal); . vec4 │ │ │ │ - 0x00968b50 6e203d20 76656334 28615f70 6f736974 n = vec4(a_posit │ │ │ │ - 0x00968b60 696f6e2e 7879202b 20615f6e 6f726d61 ion.xy + a_norma │ │ │ │ - 0x00968b70 6c202a20 6b536861 7065436f 6f726453 l * kShapeCoordS │ │ │ │ - 0x00968b80 63616c61 722c2030 2e302c20 302e3029 calar, 0.0, 0.0) │ │ │ │ - 0x00968b90 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x00968ba0 0a202020 20766563 34206e6f 726d203d . vec4 norm = │ │ │ │ - 0x00968bb0 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ - 0x00968bc0 302e302c 20302e30 293b200a 20202020 0.0, 0.0); . │ │ │ │ - 0x00968bd0 69662028 646f7428 6e2c206e 2920213d if (dot(n, n) != │ │ │ │ - 0x00968be0 20302e30 29200a20 20202020 206e6f72 0.0) . nor │ │ │ │ - 0x00968bf0 6d203d20 6e6f726d 616c697a 65286e29 m = normalize(n) │ │ │ │ - 0x00968c00 202a206e 6f726d61 6c4c656e 3b200a20 * normalLen; . │ │ │ │ - 0x00968c10 20202076 65633420 73686966 74656450 vec4 shiftedP │ │ │ │ - 0x00968c20 6f73203d 206e6f72 6d202b20 706f733b os = norm + pos; │ │ │ │ - 0x00968c30 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00968c40 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x00968c50 616e7366 6f726d28 73686966 74656450 ansform(shiftedP │ │ │ │ - 0x00968c60 6f73202a 20755f70 726f6a65 6374696f os * u_projectio │ │ │ │ - 0x00968c70 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x00968c80 6f726d2c 20302e30 293b200a 20202020 orm, 0.0); . │ │ │ │ - 0x00968c90 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x00968ca0 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ - 0x00968cb0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ - 0x00968cc0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00968cd0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00968ce0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00968cf0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00968d00 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00968d10 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00968d20 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00968d30 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00968d40 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00968d50 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00968d60 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00968d70 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00968d80 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00968d90 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00968da0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00968db0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00968dc0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00968dd0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00968de0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00968df0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00968e00 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00968e10 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ - 0x00968e20 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ - 0x00968e30 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ - 0x00968e40 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ - 0x00968e50 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x00968e60 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00968e70 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00968e80 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00968e90 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00968ea0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00968eb0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00968ec0 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ - 0x00968ed0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x00968ee0 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ - 0x00968ef0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00968f00 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ - 0x00968f10 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ - 0x00968f20 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ - 0x00968f30 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00968f40 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ - 0x00968f50 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ - 0x00968f60 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00968f70 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00968f80 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00968f90 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00968fa0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00968fb0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00968fc0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00968fd0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00968fe0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00968ff0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00969000 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00969010 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00969020 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00969030 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00969040 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00969050 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00969060 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00969070 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00969080 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00969090 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x009690a0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x009690b0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x009690c0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x009690d0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x009690e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009690f0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00969100 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00969110 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00969120 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00969130 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00969140 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00969150 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00969160 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00969170 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00969180 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00969190 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x009691a0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x009691b0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x009691c0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x009691d0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x009691e0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x009691f0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00969200 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00969210 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00969220 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00969230 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00969240 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00969250 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00969260 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00969270 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00969280 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00969290 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x009692a0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x009692b0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x009692c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009692d0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x009692e0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x009692f0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00969300 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00969310 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00969320 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00969330 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00969340 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00969350 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00969360 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00969370 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00969380 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00969390 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x009693a0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x009693b0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x009693c0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x009693d0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x009693e0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x009693f0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00969400 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00969410 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00969420 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00969430 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00969440 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00969450 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00969460 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00969470 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00969480 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00969490 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x009694a0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x009694b0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x009694c0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x009694d0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x009694e0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x009694f0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00969500 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00969510 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ - 0x00969520 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ - 0x00969530 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ - 0x00969540 20202076 65633420 6e6f726d 616c203d vec4 normal = │ │ │ │ - 0x00969550 20766563 3428615f 6e6f726d 616c202a vec4(a_normal * │ │ │ │ - 0x00969560 20755f61 63637572 6163792c 20302e30 u_accuracy, 0.0 │ │ │ │ - 0x00969570 2c20302e 30293b20 0a202020 20706f73 , 0.0); . pos │ │ │ │ - 0x00969580 6974696f 6e203d20 28706f73 6974696f ition = (positio │ │ │ │ - 0x00969590 6e202b20 6e6f726d 616c2920 2a20755f n + normal) * u_ │ │ │ │ - 0x009695a0 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ - 0x009695b0 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x009695c0 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x009695d0 726d2870 6f736974 696f6e2c 20755f70 rm(position, u_p │ │ │ │ - 0x009695e0 69766f74 5472616e 73666f72 6d2c2075 ivotTransform, u │ │ │ │ - 0x009695f0 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ - 0x00969600 7a536361 6c65293b 200a2020 2020765f zScale); . v_ │ │ │ │ - 0x00969610 636f6c6f 72546578 436f6f72 6473203d colorTexCoords = │ │ │ │ - 0x00969620 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ - 0x00969630 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ - 0x00969640 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00969650 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00969660 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00969670 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00969680 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00969690 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009696a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009696b0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009696c0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009696d0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009696e0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x009696f0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00969700 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00969710 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00969720 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00969730 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00969740 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00969750 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00969760 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00969770 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00969780 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00969790 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x009697a0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x009697b0 616c3b20 0a202069 6e207665 63332061 al; . in vec3 a │ │ │ │ - 0x009697c0 5f6c656e 6774683b 200a2020 696e2076 _length; . in v │ │ │ │ - 0x009697d0 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x009697e0 6f757420 76656333 20765f6c 656e6774 out vec3 v_lengt │ │ │ │ - 0x009697f0 683b200a 20206f75 74207665 63342076 h; . out vec4 v │ │ │ │ - 0x00969800 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ - 0x00969810 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00969820 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00969830 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00969840 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00969850 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00969860 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00969870 76656334 20755f72 6f757465 50617261 vec4 u_routePara │ │ │ │ - 0x00969880 6d733b20 0a202075 6e69666f 726d2076 ms; . uniform v │ │ │ │ - 0x00969890 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ - 0x009698a0 756e6966 6f726d20 76656334 20755f6d uniform vec4 u_m │ │ │ │ - 0x009698b0 61736b43 6f6c6f72 3b200a20 20756e69 askColor; . uni │ │ │ │ - 0x009698c0 666f726d 20766563 3420755f 6f75746c form vec4 u_outl │ │ │ │ - 0x009698d0 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ - 0x009698e0 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ - 0x009698f0 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ - 0x00969900 6d207665 63342075 5f66616b 654f7574 m vec4 u_fakeOut │ │ │ │ - 0x00969910 6c696e65 436f6c6f 723b200a 2020756e lineColor; . un │ │ │ │ - 0x00969920 69666f72 6d207665 63322075 5f66616b iform vec2 u_fak │ │ │ │ - 0x00969930 65426f72 64657273 3b200a20 20756e69 eBorders; . uni │ │ │ │ - 0x00969940 666f726d 20766563 3220755f 70617474 form vec2 u_patt │ │ │ │ - 0x00969950 65726e3b 200a2020 756e6966 6f726d20 ern; . uniform │ │ │ │ - 0x00969960 76656332 20755f61 6e676c65 436f7353 vec2 u_angleCosS │ │ │ │ - 0x00969970 696e3b20 0a202075 6e69666f 726d2066 in; . uniform f │ │ │ │ - 0x00969980 6c6f6174 20755f61 72726f77 48616c66 loat u_arrowHalf │ │ │ │ - 0x00969990 57696474 683b200a 2020756e 69666f72 Width; . unifor │ │ │ │ - 0x009699a0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x009699b0 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ - 0x009699c0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x009699d0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x009699e0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x009699f0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00969a00 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00969a10 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00969a20 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00969a30 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00969a40 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00969a50 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00969a60 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00969a70 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00969a80 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00969a90 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00969aa0 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00969ab0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00969ac0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00969ad0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00969ae0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00969af0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00969b00 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00969b10 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00969b20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00969b30 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00969b40 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00969b50 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00969b60 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00969b70 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00969b80 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00969b90 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00969ba0 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00969bb0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00969bc0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00969bd0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00969be0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00969bf0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00969c00 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00969c10 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00969c20 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00969c30 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00969c40 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00969c50 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00969c60 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00969c70 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00969c80 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00969c90 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00969ca0 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00969cb0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00969cc0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00969cd0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00969ce0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00969cf0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00969d00 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00969d10 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00969d20 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00969d30 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00969d40 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00969d50 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00969d60 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00969d70 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00969d80 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00969d90 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00969da0 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00969db0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00969dc0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00969dd0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00969de0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00969df0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00969e00 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00969e10 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00969e20 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00969e30 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00969e40 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00969e50 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00969e60 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00969e70 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00969e80 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00969e90 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00969ea0 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00969eb0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00969ec0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x00969ed0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x00969ee0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00969ef0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00969f00 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00969f10 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00969f20 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00969f30 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00969f40 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00969f50 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ - 0x00969f60 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ - 0x00969f70 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ - 0x00969f80 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ - 0x00969f90 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ - 0x00969fa0 3b200a20 20202076 65633220 6c656e20 ; . vec2 len │ │ │ │ - 0x00969fb0 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ - 0x00969fc0 782c2061 5f6c656e 6774682e 7a293b20 x, a_length.z); │ │ │ │ - 0x00969fd0 0a202020 20696620 28646f74 28615f6e . if (dot(a_n │ │ │ │ - 0x00969fe0 6f726d61 6c2c2061 5f6e6f72 6d616c29 ormal, a_normal) │ │ │ │ - 0x00969ff0 20213d20 302e3029 200a2020 20207b20 != 0.0) . { │ │ │ │ - 0x0096a000 0a202020 20202076 65633220 6e6f726d . vec2 norm │ │ │ │ - 0x0096a010 203d2061 5f6e6f72 6d616c20 2a20755f = a_normal * u_ │ │ │ │ - 0x0096a020 726f7574 65506172 616d732e 783b200a routeParams.x; . │ │ │ │ - 0x0096a030 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ - 0x0096a040 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ - 0x0096a050 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x0096a060 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ - 0x0096a070 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ - 0x0096a080 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ - 0x0096a090 0a202020 20202020 20202020 20202020 . │ │ │ │ - 0x0096a0a0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096a0b0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096a0c0 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ - 0x0096a0d0 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ - 0x0096a0e0 293b200a 20202020 20206966 2028755f ); . if (u_ │ │ │ │ - 0x0096a0f0 726f7574 65506172 616d732e 7920213d routeParams.y != │ │ │ │ - 0x0096a100 20302e30 29200a20 20202020 2020206c 0.0) . l │ │ │ │ - 0x0096a110 656e203d 20766563 3228615f 6c656e67 en = vec2(a_leng │ │ │ │ - 0x0096a120 74682e78 202b2061 5f6c656e 6774682e th.x + a_length. │ │ │ │ - 0x0096a130 79202a20 755f726f 75746550 6172616d y * u_routeParam │ │ │ │ - 0x0096a140 732e792c 20615f6c 656e6774 682e7a29 s.y, a_length.z) │ │ │ │ - 0x0096a150 3b200a20 2020207d 200a2020 2020765f ; . } . v_ │ │ │ │ - 0x0096a160 6c656e67 7468203d 20766563 33286c65 length = vec3(le │ │ │ │ - 0x0096a170 6e2c2075 5f726f75 74655061 72616d73 n, u_routeParams │ │ │ │ - 0x0096a180 2e7a293b 200a2020 2020765f 636f6c6f .z); . v_colo │ │ │ │ - 0x0096a190 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x0096a1a0 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x0096a1b0 34287472 616e7366 6f726d65 64417869 4(transformedAxi │ │ │ │ - 0x0096a1c0 73506f73 2c20615f 706f7369 74696f6e sPos, a_position │ │ │ │ - 0x0096a1d0 2e7a2c20 312e3029 202a2075 5f70726f .z, 1.0) * u_pro │ │ │ │ - 0x0096a1e0 6a656374 696f6e3b 200a2020 2020676c jection; . gl │ │ │ │ - 0x0096a1f0 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ - 0x0096a200 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x0096a210 706f732c 20755f70 69766f74 5472616e pos, u_pivotTran │ │ │ │ - 0x0096a220 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ - 0x0096a230 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x0096a240 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0096a250 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0096a260 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0096a270 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096a280 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0096a290 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0096a2a0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0096a2b0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0096a2c0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0096a2d0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0096a2e0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0096a2f0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0096a300 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0096a310 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0096a320 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0096a330 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0096a340 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0096a350 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0096a360 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0096a370 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0096a380 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x0096a390 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0096a3a0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x0096a3b0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0096a3c0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x0096a3d0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x0096a3e0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ - 0x0096a3f0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x0096a400 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x0096a410 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x0096a420 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0096a430 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x0096a440 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x0096a450 65633420 755f726f 75746550 6172616d ec4 u_routeParam │ │ │ │ - 0x0096a460 733b200a 2020756e 69666f72 6d207665 s; . uniform ve │ │ │ │ - 0x0096a470 63342075 5f636f6c 6f723b20 0a202075 c4 u_color; . u │ │ │ │ - 0x0096a480 6e69666f 726d2076 65633420 755f6d61 niform vec4 u_ma │ │ │ │ - 0x0096a490 736b436f 6c6f723b 200a2020 756e6966 skColor; . unif │ │ │ │ - 0x0096a4a0 6f726d20 76656334 20755f6f 75746c69 orm vec4 u_outli │ │ │ │ - 0x0096a4b0 6e65436f 6c6f723b 200a2020 756e6966 neColor; . unif │ │ │ │ - 0x0096a4c0 6f726d20 76656334 20755f66 616b6543 orm vec4 u_fakeC │ │ │ │ - 0x0096a4d0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x0096a4e0 20766563 3420755f 66616b65 4f75746c vec4 u_fakeOutl │ │ │ │ - 0x0096a4f0 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ - 0x0096a500 666f726d 20766563 3220755f 66616b65 form vec2 u_fake │ │ │ │ - 0x0096a510 426f7264 6572733b 200a2020 756e6966 Borders; . unif │ │ │ │ - 0x0096a520 6f726d20 76656332 20755f70 61747465 orm vec2 u_patte │ │ │ │ - 0x0096a530 726e3b20 0a202075 6e69666f 726d2076 rn; . uniform v │ │ │ │ - 0x0096a540 65633220 755f616e 676c6543 6f735369 ec2 u_angleCosSi │ │ │ │ - 0x0096a550 6e3b200a 2020756e 69666f72 6d20666c n; . uniform fl │ │ │ │ - 0x0096a560 6f617420 755f6172 726f7748 616c6657 oat u_arrowHalfW │ │ │ │ - 0x0096a570 69647468 3b200a20 20756e69 666f726d idth; . uniform │ │ │ │ - 0x0096a580 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x0096a590 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x0096a5a0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x0096a5b0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x0096a5c0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x0096a5d0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x0096a5e0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x0096a5f0 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x0096a600 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x0096a610 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0096a620 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0096a630 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x0096a640 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x0096a650 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x0096a660 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0096a670 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x0096a680 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x0096a690 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x0096a6a0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x0096a6b0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x0096a6c0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x0096a6d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096a6e0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x0096a6f0 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x0096a700 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x0096a710 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x0096a720 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x0096a730 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x0096a740 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x0096a750 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x0096a760 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x0096a770 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0096a780 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x0096a790 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x0096a7a0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x0096a7b0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x0096a7c0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0096a7d0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0096a7e0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0096a7f0 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x0096a800 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x0096a810 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x0096a820 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x0096a830 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x0096a840 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x0096a850 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0096a860 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x0096a870 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x0096a880 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x0096a890 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x0096a8a0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x0096a8b0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x0096a8c0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x0096a8d0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x0096a8e0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0096a8f0 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x0096a900 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x0096a910 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x0096a920 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x0096a930 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x0096a940 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x0096a950 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x0096a960 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x0096a970 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x0096a980 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x0096a990 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x0096a9a0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x0096a9b0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x0096a9c0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x0096a9d0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x0096a9e0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x0096a9f0 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x0096aa00 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x0096aa10 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x0096aa20 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x0096aa30 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x0096aa40 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x0096aa50 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x0096aa60 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x0096aa70 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x0096aa80 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x0096aa90 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x0096aaa0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x0096aab0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x0096aac0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0096aad0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x0096aae0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x0096aaf0 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x0096ab00 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x0096ab10 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x0096ab20 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x0096ab30 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x0096ab40 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x0096ab50 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x0096ab60 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x0096ab70 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x0096ab80 200a2020 20206966 2028646f 7428615f . if (dot(a_ │ │ │ │ - 0x0096ab90 6e6f726d 616c2c20 615f6e6f 726d616c normal, a_normal │ │ │ │ - 0x0096aba0 2920213d 20302e30 29200a20 2020207b ) != 0.0) . { │ │ │ │ - 0x0096abb0 200a2020 20202020 76656332 206e6f72 . vec2 nor │ │ │ │ - 0x0096abc0 6d203d20 615f6e6f 726d616c 202a2075 m = a_normal * u │ │ │ │ - 0x0096abd0 5f617272 6f774861 6c665769 6474683b _arrowHalfWidth; │ │ │ │ - 0x0096abe0 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ - 0x0096abf0 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ - 0x0096ac00 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x0096ac10 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ - 0x0096ac20 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ - 0x0096ac30 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ - 0x0096ac40 2c200a20 20202020 20202020 20202020 , . │ │ │ │ - 0x0096ac50 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096ac60 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096ac70 20202020 20202020 20755f6d 6f64656c u_model │ │ │ │ - 0x0096ac80 56696577 2c206c65 6e677468 286e6f72 View, length(nor │ │ │ │ - 0x0096ac90 6d29293b 200a2020 20207d20 0a202020 m)); . } . │ │ │ │ - 0x0096aca0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x0096acb0 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ - 0x0096acc0 6f726473 3b200a20 20202076 65633420 ords; . vec4 │ │ │ │ - 0x0096acd0 706f7320 3d207665 63342874 72616e73 pos = vec4(trans │ │ │ │ - 0x0096ace0 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ - 0x0096acf0 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ - 0x0096ad00 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ - 0x0096ad10 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x0096ad20 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ - 0x0096ad30 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ - 0x0096ad40 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0096ad50 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ - 0x0096ad60 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096ad70 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096ad80 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096ad90 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096ada0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096adb0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096adc0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096add0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096ade0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096adf0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096ae00 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096ae10 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096ae20 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096ae30 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096ae40 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096ae50 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096ae60 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096ae70 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096ae80 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096ae90 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096aea0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096aeb0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x0096aec0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x0096aed0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x0096aee0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x0096aef0 65633420 765f7261 64697573 3b200a20 ec4 v_radius; . │ │ │ │ - 0x0096af00 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ - 0x0096af10 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ - 0x0096af20 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x0096af30 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0096af40 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x0096af50 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x0096af60 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x0096af70 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x0096af80 755f726f 75746550 6172616d 733b200a u_routeParams; . │ │ │ │ - 0x0096af90 2020756e 69666f72 6d207665 63342075 uniform vec4 u │ │ │ │ - 0x0096afa0 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ - 0x0096afb0 726d2076 65633420 755f6d61 736b436f rm vec4 u_maskCo │ │ │ │ - 0x0096afc0 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x0096afd0 76656334 20755f6f 75746c69 6e65436f vec4 u_outlineCo │ │ │ │ - 0x0096afe0 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x0096aff0 76656334 20755f66 616b6543 6f6c6f72 vec4 u_fakeColor │ │ │ │ - 0x0096b000 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x0096b010 3420755f 66616b65 4f75746c 696e6543 4 u_fakeOutlineC │ │ │ │ - 0x0096b020 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x0096b030 20766563 3220755f 66616b65 426f7264 vec2 u_fakeBord │ │ │ │ - 0x0096b040 6572733b 200a2020 756e6966 6f726d20 ers; . uniform │ │ │ │ - 0x0096b050 76656332 20755f70 61747465 726e3b20 vec2 u_pattern; │ │ │ │ - 0x0096b060 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ - 0x0096b070 755f616e 676c6543 6f735369 6e3b200a u_angleCosSin; . │ │ │ │ - 0x0096b080 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x0096b090 755f6172 726f7748 616c6657 69647468 u_arrowHalfWidth │ │ │ │ - 0x0096b0a0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0096b0b0 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ - 0x0096b0c0 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x0096b0d0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x0096b0e0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x0096b0f0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x0096b100 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0096b110 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0096b120 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0096b130 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x0096b140 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x0096b150 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x0096b160 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x0096b170 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096b180 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x0096b190 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x0096b1a0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x0096b1b0 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x0096b1c0 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x0096b1d0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x0096b1e0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0096b1f0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x0096b200 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x0096b210 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x0096b220 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x0096b230 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x0096b240 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096b250 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x0096b260 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x0096b270 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096b280 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x0096b290 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x0096b2a0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x0096b2b0 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x0096b2c0 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x0096b2d0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x0096b2e0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x0096b2f0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x0096b300 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x0096b310 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x0096b320 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x0096b330 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x0096b340 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x0096b350 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x0096b360 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x0096b370 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x0096b380 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0096b390 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x0096b3a0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x0096b3b0 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x0096b3c0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x0096b3d0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x0096b3e0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x0096b3f0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x0096b400 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x0096b410 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x0096b420 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096b430 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x0096b440 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x0096b450 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x0096b460 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x0096b470 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0096b480 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x0096b490 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x0096b4a0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x0096b4b0 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x0096b4c0 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x0096b4d0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0096b4e0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x0096b4f0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x0096b500 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x0096b510 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x0096b520 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x0096b530 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x0096b540 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x0096b550 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x0096b560 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x0096b570 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x0096b580 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x0096b590 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x0096b5a0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x0096b5b0 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x0096b5c0 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x0096b5d0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x0096b5e0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x0096b5f0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x0096b600 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x0096b610 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x0096b620 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x0096b630 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0096b640 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x0096b650 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x0096b660 20666c6f 61742072 203d2075 5f726f75 float r = u_rou │ │ │ │ - 0x0096b670 74655061 72616d73 2e78202a 20615f6e teParams.x * a_n │ │ │ │ - 0x0096b680 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ - 0x0096b690 6332206e 6f726d61 6c203d20 76656332 c2 normal = vec2 │ │ │ │ - 0x0096b6a0 28615f6e 6f726d61 6c2e7820 2a20755f (a_normal.x * u_ │ │ │ │ - 0x0096b6b0 616e676c 65436f73 53696e2e 78202d20 angleCosSin.x - │ │ │ │ - 0x0096b6c0 615f6e6f 726d616c 2e79202a 20755f61 a_normal.y * u_a │ │ │ │ - 0x0096b6d0 6e676c65 436f7353 696e2e79 2c200a20 ngleCosSin.y, . │ │ │ │ - 0x0096b6e0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096b6f0 20202020 2020615f 6e6f726d 616c2e78 a_normal.x │ │ │ │ - 0x0096b700 202a2075 5f616e67 6c65436f 7353696e * u_angleCosSin │ │ │ │ - 0x0096b710 2e79202b 20615f6e 6f726d61 6c2e7920 .y + a_normal.y │ │ │ │ - 0x0096b720 2a20755f 616e676c 65436f73 53696e2e * u_angleCosSin. │ │ │ │ - 0x0096b730 78293b20 0a202020 20766563 34207261 x); . vec4 ra │ │ │ │ - 0x0096b740 64697573 203d2076 65633428 6e6f726d dius = vec4(norm │ │ │ │ - 0x0096b750 616c2e78 79202a20 722c2072 2c20615f al.xy * r, r, a_ │ │ │ │ - 0x0096b760 706f7369 74696f6e 2e77293b 200a2020 position.w); . │ │ │ │ - 0x0096b770 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x0096b780 3428615f 706f7369 74696f6e 2e78792c 4(a_position.xy, │ │ │ │ - 0x0096b790 20302c20 3129202a 20755f6d 6f64656c 0, 1) * u_model │ │ │ │ - 0x0096b7a0 56696577 3b200a20 20202076 65633220 View; . vec2 │ │ │ │ - 0x0096b7b0 73686966 74656450 6f73203d 20726164 shiftedPos = rad │ │ │ │ - 0x0096b7c0 6975732e 7879202b 20706f73 2e78793b ius.xy + pos.xy; │ │ │ │ - 0x0096b7d0 200a2020 2020706f 73203d20 76656334 . pos = vec4 │ │ │ │ - 0x0096b7e0 28736869 66746564 506f732c 20615f70 (shiftedPos, a_p │ │ │ │ - 0x0096b7f0 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ - 0x0096b800 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ - 0x0096b810 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x0096b820 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ - 0x0096b830 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ - 0x0096b840 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x0096b850 30293b20 0a202020 20765f72 61646975 0); . v_radiu │ │ │ │ - 0x0096b860 73203d20 72616469 75733b20 0a202020 s = radius; . │ │ │ │ - 0x0096b870 20765f63 6f6c6f72 203d2061 5f636f6c v_color = a_col │ │ │ │ - 0x0096b880 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ - 0x0096b890 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096b8a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096b8b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096b8c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096b8d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096b8e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096b8f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096b900 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096b910 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096b920 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096b930 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096b940 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096b950 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096b960 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096b970 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096b980 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096b990 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096b9a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096b9b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096b9c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096b9d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096b9e0 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ - 0x0096b9f0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x0096ba00 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x0096ba10 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x0096ba20 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x0096ba30 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x0096ba40 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0096ba50 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x0096ba60 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x0096ba70 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x0096ba80 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ - 0x0096ba90 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ - 0x0096baa0 69666f72 6d207665 63322075 5f706f73 iform vec2 u_pos │ │ │ │ - 0x0096bab0 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ - 0x0096bac0 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x0096bad0 696e6550 6173733b 200a2020 756e6966 inePass; . unif │ │ │ │ - 0x0096bae0 6f726d20 666c6f61 7420755f 6f706163 orm float u_opac │ │ │ │ - 0x0096baf0 6974793b 200a2020 756e6966 6f726d20 ity; . uniform │ │ │ │ - 0x0096bb00 666c6f61 7420755f 6c656e67 74683b20 float u_length; │ │ │ │ - 0x0096bb10 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x0096bb20 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x0096bb30 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x0096bb40 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x0096bb50 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x0096bb60 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x0096bb70 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x0096bb80 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x0096bb90 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x0096bba0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x0096bbb0 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x0096bbc0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x0096bbd0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x0096bbe0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x0096bbf0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x0096bc00 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x0096bc10 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x0096bc20 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x0096bc30 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x0096bc40 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x0096bc50 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0096bc60 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x0096bc70 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x0096bc80 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x0096bc90 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x0096bca0 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x0096bcb0 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x0096bcc0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0096bcd0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x0096bce0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x0096bcf0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0096bd00 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x0096bd10 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x0096bd20 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x0096bd30 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x0096bd40 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x0096bd50 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x0096bd60 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x0096bd70 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x0096bd80 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x0096bd90 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x0096bda0 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x0096bdb0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x0096bdc0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x0096bdd0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0096bde0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x0096bdf0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x0096be00 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x0096be10 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x0096be20 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x0096be30 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x0096be40 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x0096be50 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x0096be60 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x0096be70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096be80 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x0096be90 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x0096bea0 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x0096beb0 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x0096bec0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x0096bed0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x0096bee0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x0096bef0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x0096bf00 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x0096bf10 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x0096bf20 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0096bf30 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x0096bf40 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x0096bf50 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x0096bf60 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x0096bf70 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0096bf80 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x0096bf90 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x0096bfa0 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x0096bfb0 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x0096bfc0 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x0096bfd0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x0096bfe0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x0096bff0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x0096c000 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x0096c010 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x0096c020 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x0096c030 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x0096c040 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x0096c050 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x0096c060 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x0096c070 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x0096c080 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x0096c090 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x0096c0a0 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x0096c0b0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x0096c0c0 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ - 0x0096c0d0 202b2061 5f706f73 6974696f 6e202b20 + a_position + │ │ │ │ - 0x0096c0e0 755f6c65 6e677468 202a2061 5f6e6f72 u_length * a_nor │ │ │ │ - 0x0096c0f0 6d616c2c 20302c20 3129202a 20755f70 mal, 0, 1) * u_p │ │ │ │ - 0x0096c100 726f6a65 6374696f 6e3b200a 20202369 rojection; . #i │ │ │ │ - 0x0096c110 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x0096c120 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ - 0x0096c130 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ - 0x0096c140 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x0096c150 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ - 0x0096c160 6f6e2e7a 20202b20 676c5f50 6f736974 on.z + gl_Posit │ │ │ │ - 0x0096c170 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ - 0x0096c180 2023656e 64696620 0a202020 20765f63 #endif . v_c │ │ │ │ - 0x0096c190 6f6c6f72 54657843 6f6f7264 73203d20 olorTexCoords = │ │ │ │ - 0x0096c1a0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x0096c1b0 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x0096c1c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096c1d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096c1e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096c1f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096c200 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096c210 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096c220 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096c230 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096c240 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096c250 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096c260 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096c270 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096c280 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096c290 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096c2a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096c2b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096c2c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096c2d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096c2e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096c2f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096c300 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096c310 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0096c320 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x0096c330 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x0096c340 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x0096c350 200a2020 696e2076 65633320 615f6c65 . in vec3 a_le │ │ │ │ - 0x0096c360 6e677468 3b200a20 20236966 64656620 ngth; . #ifdef │ │ │ │ - 0x0096c370 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ - 0x0096c380 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ - 0x0096c390 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ - 0x0096c3a0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x0096c3b0 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ - 0x0096c3c0 656e6469 66200a20 206f7574 20666c6f endif . out flo │ │ │ │ - 0x0096c3d0 61742076 5f6c656e 67746859 3b200a20 at v_lengthY; . │ │ │ │ - 0x0096c3e0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x0096c3f0 6d6f6465 6c566965 773b200a 2020756e modelView; . un │ │ │ │ - 0x0096c400 69666f72 6d206d61 74342075 5f70726f iform mat4 u_pro │ │ │ │ - 0x0096c410 6a656374 696f6e3b 200a2020 756e6966 jection; . unif │ │ │ │ - 0x0096c420 6f726d20 6d617434 20755f70 69766f74 orm mat4 u_pivot │ │ │ │ - 0x0096c430 5472616e 73666f72 6d3b200a 2020756e Transform; . un │ │ │ │ - 0x0096c440 69666f72 6d207665 63342075 5f706f73 iform vec4 u_pos │ │ │ │ - 0x0096c450 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ - 0x0096c460 6d207665 63322075 5f6c696e 65506172 m vec2 u_linePar │ │ │ │ - 0x0096c470 616d733b 200a2020 756e6966 6f726d20 ams; . uniform │ │ │ │ - 0x0096c480 666c6f61 7420755f 61636375 72616379 float u_accuracy │ │ │ │ - 0x0096c490 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0096c4a0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x0096c4b0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0096c4c0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x0096c4d0 6f726d20 666c6f61 7420755f 617a696d orm float u_azim │ │ │ │ - 0x0096c4e0 75743b20 0a202023 69666465 6620454e ut; . #ifdef EN │ │ │ │ - 0x0096c4f0 41424c45 5f565446 200a2020 756e6966 ABLE_VTF . unif │ │ │ │ - 0x0096c500 6f726d20 73616d70 6c657232 4420755f orm sampler2D u_ │ │ │ │ - 0x0096c510 636f6c6f 72546578 3b200a20 2023656e colorTex; . #en │ │ │ │ - 0x0096c520 64696620 0a202063 6f6e7374 20666c6f dif . const flo │ │ │ │ - 0x0096c530 6174206b 416e7469 616c6961 73696e67 at kAntialiasing │ │ │ │ - 0x0096c540 54687265 73686f6c 64203d20 302e3932 Threshold = 0.92 │ │ │ │ - 0x0096c550 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x0096c560 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x0096c570 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x0096c580 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x0096c590 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x0096c5a0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x0096c5b0 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x0096c5c0 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x0096c5d0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0096c5e0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0096c5f0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x0096c600 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x0096c610 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x0096c620 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0096c630 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x0096c640 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x0096c650 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x0096c660 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x0096c670 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x0096c680 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x0096c690 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096c6a0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x0096c6b0 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x0096c6c0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x0096c6d0 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x0096c6e0 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x0096c6f0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x0096c700 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x0096c710 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x0096c720 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x0096c730 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0096c740 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x0096c750 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x0096c760 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x0096c770 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x0096c780 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0096c790 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0096c7a0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0096c7b0 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x0096c7c0 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x0096c7d0 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x0096c7e0 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x0096c7f0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x0096c800 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x0096c810 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0096c820 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x0096c830 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x0096c840 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x0096c850 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x0096c860 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x0096c870 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x0096c880 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x0096c890 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x0096c8a0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0096c8b0 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x0096c8c0 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x0096c8d0 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x0096c8e0 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x0096c8f0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x0096c900 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x0096c910 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x0096c920 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x0096c930 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x0096c940 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x0096c950 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x0096c960 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x0096c970 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x0096c980 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x0096c990 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x0096c9a0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x0096c9b0 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x0096c9c0 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x0096c9d0 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x0096c9e0 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x0096c9f0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x0096ca00 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x0096ca10 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x0096ca20 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x0096ca30 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x0096ca40 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x0096ca50 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x0096ca60 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x0096ca70 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x0096ca80 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0096ca90 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x0096caa0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x0096cab0 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x0096cac0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x0096cad0 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x0096cae0 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x0096caf0 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x0096cb00 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x0096cb10 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x0096cb20 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x0096cb30 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x0096cb40 200a2020 20207665 6332206c 656e203d . vec2 len = │ │ │ │ - 0x0096cb50 20766563 3228615f 6c656e67 74682e78 vec2(a_length.x │ │ │ │ - 0x0096cb60 2c20615f 6c656e67 74682e7a 293b200a , a_length.z); . │ │ │ │ - 0x0096cb70 20202020 69662028 646f7428 615f6e6f if (dot(a_no │ │ │ │ - 0x0096cb80 726d616c 2c20615f 6e6f726d 616c2920 rmal, a_normal) │ │ │ │ - 0x0096cb90 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ - 0x0096cba0 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ - 0x0096cbb0 3d20615f 6e6f726d 616c202a 20755f6c = a_normal * u_l │ │ │ │ - 0x0096cbc0 696e6550 6172616d 732e783b 200a2020 ineParams.x; . │ │ │ │ - 0x0096cbd0 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ - 0x0096cbe0 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ - 0x0096cbf0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x0096cc00 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ - 0x0096cc10 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x0096cc20 6f6e2e78 79202b20 6e6f726d 2c200a20 on.xy + norm, . │ │ │ │ - 0x0096cc30 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096cc40 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096cc50 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096cc60 20202020 20755f6d 6f64656c 56696577 u_modelView │ │ │ │ - 0x0096cc70 2c206c65 6e677468 286e6f72 6d29293b , length(norm)); │ │ │ │ - 0x0096cc80 200a2020 20202020 69662028 755f6c69 . if (u_li │ │ │ │ - 0x0096cc90 6e655061 72616d73 2e792021 3d20302e neParams.y != 0. │ │ │ │ - 0x0096cca0 3029200a 20202020 20202020 6c656e20 0) . len │ │ │ │ - 0x0096ccb0 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ - 0x0096ccc0 78202b20 615f6c65 6e677468 2e79202a x + a_length.y * │ │ │ │ - 0x0096ccd0 20755f6c 696e6550 6172616d 732e792c u_lineParams.y, │ │ │ │ - 0x0096cce0 20615f6c 656e6774 682e7a29 3b200a20 a_length.z); . │ │ │ │ - 0x0096ccf0 2020207d 200a2020 23696664 65662045 } . #ifdef E │ │ │ │ - 0x0096cd00 4e41424c 455f5654 46200a20 20202076 NABLE_VTF . v │ │ │ │ - 0x0096cd10 5f636f6c 6f72203d 20746578 74757265 _color = texture │ │ │ │ - 0x0096cd20 28755f63 6f6c6f72 5465782c 20615f63 (u_colorTex, a_c │ │ │ │ - 0x0096cd30 6f6c6f72 54657843 6f6f7264 73293b20 olorTexCoords); │ │ │ │ - 0x0096cd40 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ - 0x0096cd50 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ - 0x0096cd60 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x0096cd70 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0096cd80 20765f6c 656e6774 6859203d 206c656e v_lengthY = len │ │ │ │ - 0x0096cd90 2e793b20 0a202020 20766563 3420706f .y; . vec4 po │ │ │ │ - 0x0096cda0 73203d20 76656334 28747261 6e73666f s = vec4(transfo │ │ │ │ - 0x0096cdb0 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ - 0x0096cdc0 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ - 0x0096cdd0 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ - 0x0096cde0 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x0096cdf0 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ - 0x0096ce00 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ - 0x0096ce10 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x0096ce20 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ - 0x0096ce30 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096ce40 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096ce50 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096ce60 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096ce70 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096ce80 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096ce90 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096cea0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096ceb0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096cec0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096ced0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096cee0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096cef0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096cf00 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096cf10 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096cf20 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096cf30 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096cf40 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096cf50 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096cf60 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096cf70 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096cf80 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ - 0x0096cf90 696e2076 65633420 765f6f66 66736574 in vec4 v_offset │ │ │ │ - 0x0096cfa0 303b200a 2020696e 20766563 3420765f 0; . in vec4 v_ │ │ │ │ - 0x0096cfb0 6f666673 6574313b 200a2020 696e2076 offset1; . in v │ │ │ │ - 0x0096cfc0 65633420 765f6f66 66736574 323b200a ec4 v_offset2; . │ │ │ │ - 0x0096cfd0 20206f75 74207665 63342076 5f467261 out vec4 v_Fra │ │ │ │ - 0x0096cfe0 67436f6c 6f723b20 0a202075 6e69666f gColor; . unifo │ │ │ │ - 0x0096cff0 726d2076 65633420 755f6672 616d6562 rm vec4 u_frameb │ │ │ │ - 0x0096d000 75666665 724d6574 72696373 3b200a20 ufferMetrics; . │ │ │ │ - 0x0096d010 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x0096d020 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x0096d030 2020756e 69666f72 6d207361 6d706c65 uniform sample │ │ │ │ - 0x0096d040 72324420 755f736d 61614172 65613b20 r2D u_smaaArea; │ │ │ │ - 0x0096d050 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x0096d060 65723244 20755f73 6d616153 65617263 er2D u_smaaSearc │ │ │ │ - 0x0096d070 683b200a 20202364 6566696e 6520534d h; . #define SM │ │ │ │ - 0x0096d080 41415f53 45415243 48544558 5f53495a AA_SEARCHTEX_SIZ │ │ │ │ - 0x0096d090 45207665 63322836 362e302c 2033332e E vec2(66.0, 33. │ │ │ │ - 0x0096d0a0 3029200a 20202364 6566696e 6520534d 0) . #define SM │ │ │ │ - 0x0096d0b0 41415f53 45415243 48544558 5f504143 AA_SEARCHTEX_PAC │ │ │ │ - 0x0096d0c0 4b45445f 53495a45 20766563 32283634 KED_SIZE vec2(64 │ │ │ │ - 0x0096d0d0 2e302c20 31362e30 29200a20 20236465 .0, 16.0) . #de │ │ │ │ - 0x0096d0e0 66696e65 20534d41 415f4152 45415445 fine SMAA_AREATE │ │ │ │ - 0x0096d0f0 585f4d41 585f4449 5354414e 43452031 X_MAX_DISTANCE 1 │ │ │ │ - 0x0096d100 362e3020 0a202023 64656669 6e652053 6.0 . #define S │ │ │ │ - 0x0096d110 4d41415f 41524541 5445585f 50495845 MAA_AREATEX_PIXE │ │ │ │ - 0x0096d120 4c5f5349 5a452028 76656332 28312e30 L_SIZE (vec2(1.0 │ │ │ │ - 0x0096d130 202f2032 35362e30 2c20312e 30202f20 / 256.0, 1.0 / │ │ │ │ - 0x0096d140 31303234 2e302929 200a2020 23646566 1024.0)) . #def │ │ │ │ - 0x0096d150 696e6520 534d4141 4c6f6f70 42656769 ine SMAALoopBegi │ │ │ │ - 0x0096d160 6e28636f 6e646974 696f6e29 20776869 n(condition) whi │ │ │ │ - 0x0096d170 6c652028 636f6e64 6974696f 6e29207b le (condition) { │ │ │ │ - 0x0096d180 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ - 0x0096d190 4c6f6f70 456e6420 7d200a20 20236465 LoopEnd } . #de │ │ │ │ - 0x0096d1a0 66696e65 20534d41 4153616d 706c654c fine SMAASampleL │ │ │ │ - 0x0096d1b0 6576656c 5a65726f 28746578 2c20636f evelZero(tex, co │ │ │ │ - 0x0096d1c0 6f726429 20746578 74757265 4c6f6428 ord) textureLod( │ │ │ │ - 0x0096d1d0 7465782c 20636f6f 72642c20 302e3029 tex, coord, 0.0) │ │ │ │ - 0x0096d1e0 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ - 0x0096d1f0 53616d70 6c654c65 76656c5a 65726f4f SampleLevelZeroO │ │ │ │ - 0x0096d200 66667365 74287465 782c2063 6f6f7264 ffset(tex, coord │ │ │ │ - 0x0096d210 2c206f66 66736574 29207465 78747572 , offset) textur │ │ │ │ - 0x0096d220 654c6f64 4f666673 65742874 65782c20 eLodOffset(tex, │ │ │ │ - 0x0096d230 636f6f72 642c2030 2e302c20 6f666673 coord, 0.0, offs │ │ │ │ - 0x0096d240 65742920 0a202023 64656669 6e652053 et) . #define S │ │ │ │ - 0x0096d250 4d414152 6f756e64 28762920 726f756e MAARound(v) roun │ │ │ │ - 0x0096d260 64282876 2929200a 20202364 6566696e d((v)) . #defin │ │ │ │ - 0x0096d270 6520534d 41414f66 66736574 28782c79 e SMAAOffset(x,y │ │ │ │ - 0x0096d280 29206976 65633228 782c7929 200a2020 ) ivec2(x,y) . │ │ │ │ - 0x0096d290 636f6e73 74207665 6332206b 41726561 const vec2 kArea │ │ │ │ - 0x0096d2a0 5465784d 61784469 7374616e 6365203d TexMaxDistance = │ │ │ │ - 0x0096d2b0 20766563 3228534d 41415f41 52454154 vec2(SMAA_AREAT │ │ │ │ - 0x0096d2c0 45585f4d 41585f44 49535441 4e43452c EX_MAX_DISTANCE, │ │ │ │ - 0x0096d2d0 20534d41 415f4152 45415445 585f4d41 SMAA_AREATEX_MA │ │ │ │ - 0x0096d2e0 585f4449 5354414e 4345293b 200a2020 X_DISTANCE); . │ │ │ │ - 0x0096d2f0 636f6e73 7420666c 6f617420 6b416374 const float kAct │ │ │ │ - 0x0096d300 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x0096d310 203d2030 2e383238 313b200a 2020666c = 0.8281; . fl │ │ │ │ - 0x0096d320 6f617420 534d4141 53656172 63684c65 oat SMAASearchLe │ │ │ │ - 0x0096d330 6e677468 28766563 3220652c 20666c6f ngth(vec2 e, flo │ │ │ │ - 0x0096d340 6174206f 66667365 7429200a 20207b20 at offset) . { │ │ │ │ - 0x0096d350 0a202020 20766563 32207363 616c6520 . vec2 scale │ │ │ │ - 0x0096d360 3d20534d 41415f53 45415243 48544558 = SMAA_SEARCHTEX │ │ │ │ - 0x0096d370 5f53495a 45202a20 76656332 28302e35 _SIZE * vec2(0.5 │ │ │ │ - 0x0096d380 2c202d31 2e30293b 200a2020 20207665 , -1.0); . ve │ │ │ │ - 0x0096d390 63322062 69617320 3d20534d 41415f53 c2 bias = SMAA_S │ │ │ │ - 0x0096d3a0 45415243 48544558 5f53495a 45202a20 EARCHTEX_SIZE * │ │ │ │ - 0x0096d3b0 76656332 286f6666 7365742c 20312e30 vec2(offset, 1.0 │ │ │ │ - 0x0096d3c0 293b200a 20202020 7363616c 65202b3d ); . scale += │ │ │ │ - 0x0096d3d0 20766563 32282d31 2e302c20 20312e30 vec2(-1.0, 1.0 │ │ │ │ - 0x0096d3e0 293b200a 20202020 62696173 202b3d20 ); . bias += │ │ │ │ - 0x0096d3f0 76656332 2820302e 352c202d 302e3529 vec2( 0.5, -0.5) │ │ │ │ - 0x0096d400 3b200a20 20202073 63616c65 202a3d20 ; . scale *= │ │ │ │ - 0x0096d410 312e3020 2f20534d 41415f53 45415243 1.0 / SMAA_SEARC │ │ │ │ - 0x0096d420 48544558 5f504143 4b45445f 53495a45 HTEX_PACKED_SIZE │ │ │ │ - 0x0096d430 3b200a20 20202062 69617320 2a3d2031 ; . bias *= 1 │ │ │ │ - 0x0096d440 2e30202f 20534d41 415f5345 41524348 .0 / SMAA_SEARCH │ │ │ │ - 0x0096d450 5445585f 5041434b 45445f53 495a453b TEX_PACKED_SIZE; │ │ │ │ - 0x0096d460 200a2020 20207265 7475726e 20534d41 . return SMA │ │ │ │ - 0x0096d470 4153616d 706c654c 6576656c 5a65726f ASampleLevelZero │ │ │ │ - 0x0096d480 28755f73 6d616153 65617263 682c2073 (u_smaaSearch, s │ │ │ │ - 0x0096d490 63616c65 202a2065 202b2062 69617329 cale * e + bias) │ │ │ │ - 0x0096d4a0 2e723b20 0a20207d 200a2020 666c6f61 .r; . } . floa │ │ │ │ - 0x0096d4b0 7420534d 41415365 61726368 584c6566 t SMAASearchXLef │ │ │ │ - 0x0096d4c0 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ - 0x0096d4d0 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ - 0x0096d4e0 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ - 0x0096d4f0 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ - 0x0096d500 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ - 0x0096d510 6e287465 78636f6f 72642e78 203e2065 n(texcoord.x > e │ │ │ │ - 0x0096d520 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ - 0x0096d530 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x0096d540 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ - 0x0096d550 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ - 0x0096d560 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ - 0x0096d570 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ - 0x0096d580 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ - 0x0096d590 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ - 0x0096d5a0 2d322e30 2c20302e 3029202a 20755f66 -2.0, 0.0) * u_f │ │ │ │ - 0x0096d5b0 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ - 0x0096d5c0 732e7879 202b2074 6578636f 6f72643b s.xy + texcoord; │ │ │ │ - 0x0096d5d0 200a2020 2020534d 41414c6f 6f70456e . SMAALoopEn │ │ │ │ - 0x0096d5e0 64200a20 20202066 6c6f6174 206f6666 d . float off │ │ │ │ - 0x0096d5f0 73657420 3d20332e 3235202d 20283235 set = 3.25 - (25 │ │ │ │ - 0x0096d600 352e3020 2f203132 372e3029 202a2053 5.0 / 127.0) * S │ │ │ │ - 0x0096d610 4d414153 65617263 684c656e 67746828 MAASearchLength( │ │ │ │ - 0x0096d620 652c2030 2e30293b 200a2020 20207265 e, 0.0); . re │ │ │ │ - 0x0096d630 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ - 0x0096d640 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ - 0x0096d650 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x0096d660 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ - 0x0096d670 20534d41 41536561 72636858 52696768 SMAASearchXRigh │ │ │ │ - 0x0096d680 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ - 0x0096d690 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ - 0x0096d6a0 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ - 0x0096d6b0 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ - 0x0096d6c0 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ - 0x0096d6d0 6e287465 78636f6f 72642e78 203c2065 n(texcoord.x < e │ │ │ │ - 0x0096d6e0 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ - 0x0096d6f0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x0096d700 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ - 0x0096d710 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ - 0x0096d720 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ - 0x0096d730 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ - 0x0096d740 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ - 0x0096d750 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ - 0x0096d760 322e302c 20302e30 29202a20 755f6672 2.0, 0.0) * u_fr │ │ │ │ - 0x0096d770 616d6562 75666665 724d6574 72696373 amebufferMetrics │ │ │ │ - 0x0096d780 2e787920 2b207465 78636f6f 72643b20 .xy + texcoord; │ │ │ │ - 0x0096d790 0a202020 20534d41 414c6f6f 70456e64 . SMAALoopEnd │ │ │ │ - 0x0096d7a0 200a2020 2020666c 6f617420 6f666673 . float offs │ │ │ │ - 0x0096d7b0 6574203d 20332e32 35202d20 28323535 et = 3.25 - (255 │ │ │ │ - 0x0096d7c0 2e30202f 20313237 2e302920 2a20534d .0 / 127.0) * SM │ │ │ │ - 0x0096d7d0 41415365 61726368 4c656e67 74682865 AASearchLength(e │ │ │ │ - 0x0096d7e0 2c20302e 35293b20 0a202020 20726574 , 0.5); . ret │ │ │ │ - 0x0096d7f0 75726e20 2d755f66 72616d65 62756666 urn -u_framebuff │ │ │ │ - 0x0096d800 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ - 0x0096d810 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x0096d820 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ - 0x0096d830 20534d41 41536561 72636859 55702876 SMAASearchYUp(v │ │ │ │ - 0x0096d840 65633220 74657863 6f6f7264 2c20666c ec2 texcoord, fl │ │ │ │ - 0x0096d850 6f617420 656e6429 200a2020 7b200a20 oat end) . { . │ │ │ │ - 0x0096d860 20202076 65633220 65203d20 76656332 vec2 e = vec2 │ │ │ │ - 0x0096d870 28312e30 2c20302e 30293b20 0a202020 (1.0, 0.0); . │ │ │ │ - 0x0096d880 20534d41 414c6f6f 70426567 696e2874 SMAALoopBegin(t │ │ │ │ - 0x0096d890 6578636f 6f72642e 79203e20 656e6420 excoord.y > end │ │ │ │ - 0x0096d8a0 26262065 2e72203e 206b4163 74697661 && e.r > kActiva │ │ │ │ - 0x0096d8b0 74696f6e 54687265 73686f6c 64202626 tionThreshold && │ │ │ │ - 0x0096d8c0 20652e67 203d3d20 302e3029 200a2020 e.g == 0.0) . │ │ │ │ - 0x0096d8d0 20202020 65203d20 534d4141 53616d70 e = SMAASamp │ │ │ │ - 0x0096d8e0 6c654c65 76656c5a 65726f28 755f636f leLevelZero(u_co │ │ │ │ - 0x0096d8f0 6c6f7254 65782c20 74657863 6f6f7264 lorTex, texcoord │ │ │ │ - 0x0096d900 292e7267 3b200a20 20202020 20746578 ).rg; . tex │ │ │ │ - 0x0096d910 636f6f72 64203d20 76656332 28302e30 coord = vec2(0.0 │ │ │ │ - 0x0096d920 2c202d32 2e302920 2a20755f 6672616d , -2.0) * u_fram │ │ │ │ - 0x0096d930 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x0096d940 79202b20 74657863 6f6f7264 3b200a20 y + texcoord; . │ │ │ │ - 0x0096d950 20202053 4d41414c 6f6f7045 6e64200a SMAALoopEnd . │ │ │ │ - 0x0096d960 20202020 666c6f61 74206f66 66736574 float offset │ │ │ │ - 0x0096d970 203d2033 2e323520 2d202832 35352e30 = 3.25 - (255.0 │ │ │ │ - 0x0096d980 202f2031 32372e30 29202a20 534d4141 / 127.0) * SMAA │ │ │ │ - 0x0096d990 53656172 63684c65 6e677468 28652e67 SearchLength(e.g │ │ │ │ - 0x0096d9a0 722c2030 2e30293b 200a2020 20207265 r, 0.0); . re │ │ │ │ - 0x0096d9b0 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ - 0x0096d9c0 65724d65 74726963 732e7920 2a206f66 erMetrics.y * of │ │ │ │ - 0x0096d9d0 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x0096d9e0 793b200a 20207d20 0a202066 6c6f6174 y; . } . float │ │ │ │ - 0x0096d9f0 20534d41 41536561 72636859 446f776e SMAASearchYDown │ │ │ │ - 0x0096da00 28766563 32207465 78636f6f 72642c20 (vec2 texcoord, │ │ │ │ - 0x0096da10 666c6f61 7420656e 6429200a 20207b20 float end) . { │ │ │ │ - 0x0096da20 0a202020 20766563 32206520 3d207665 . vec2 e = ve │ │ │ │ - 0x0096da30 63322831 2e302c20 302e3029 3b200a20 c2(1.0, 0.0); . │ │ │ │ - 0x0096da40 20202053 4d41414c 6f6f7042 6567696e SMAALoopBegin │ │ │ │ - 0x0096da50 28746578 636f6f72 642e7920 3c20656e (texcoord.y < en │ │ │ │ - 0x0096da60 64202626 20652e72 203e206b 41637469 d && e.r > kActi │ │ │ │ - 0x0096da70 76617469 6f6e5468 72657368 6f6c6420 vationThreshold │ │ │ │ - 0x0096da80 26262065 2e67203d 3d20302e 3029200a && e.g == 0.0) . │ │ │ │ - 0x0096da90 20202020 20206520 3d20534d 41415361 e = SMAASa │ │ │ │ - 0x0096daa0 6d706c65 4c657665 6c5a6572 6f28755f mpleLevelZero(u_ │ │ │ │ - 0x0096dab0 636f6c6f 72546578 2c207465 78636f6f colorTex, texcoo │ │ │ │ - 0x0096dac0 7264292e 72673b20 0a202020 20202074 rd).rg; . t │ │ │ │ - 0x0096dad0 6578636f 6f726420 3d207665 63322830 excoord = vec2(0 │ │ │ │ - 0x0096dae0 2e302c20 322e3029 202a2075 5f667261 .0, 2.0) * u_fra │ │ │ │ - 0x0096daf0 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ - 0x0096db00 7879202b 20746578 636f6f72 643b200a xy + texcoord; . │ │ │ │ - 0x0096db10 20202020 534d4141 4c6f6f70 456e6420 SMAALoopEnd │ │ │ │ - 0x0096db20 0a202020 20666c6f 6174206f 66667365 . float offse │ │ │ │ - 0x0096db30 74203d20 332e3235 202d2028 3235352e t = 3.25 - (255. │ │ │ │ - 0x0096db40 30202f20 3132372e 3029202a 20534d41 0 / 127.0) * SMA │ │ │ │ - 0x0096db50 41536561 7263684c 656e6774 6828652e ASearchLength(e. │ │ │ │ - 0x0096db60 67722c20 302e3529 3b200a20 20202072 gr, 0.5); . r │ │ │ │ - 0x0096db70 65747572 6e202d75 5f667261 6d656275 eturn -u_framebu │ │ │ │ - 0x0096db80 66666572 4d657472 6963732e 79202a20 fferMetrics.y * │ │ │ │ - 0x0096db90 6f666673 6574202b 20746578 636f6f72 offset + texcoor │ │ │ │ - 0x0096dba0 642e793b 200a2020 7d200a20 20766563 d.y; . } . vec │ │ │ │ - 0x0096dbb0 3220534d 41414172 65612876 65633220 2 SMAAArea(vec2 │ │ │ │ - 0x0096dbc0 64697374 2c20666c 6f617420 65312c20 dist, float e1, │ │ │ │ - 0x0096dbd0 666c6f61 74206532 29200a20 207b200a float e2) . { . │ │ │ │ - 0x0096dbe0 20202020 76656332 20746578 636f6f72 vec2 texcoor │ │ │ │ - 0x0096dbf0 64203d20 6b417265 61546578 4d617844 d = kAreaTexMaxD │ │ │ │ - 0x0096dc00 69737461 6e636520 2a20534d 4141526f istance * SMAARo │ │ │ │ - 0x0096dc10 756e6428 342e3020 2a207665 63322865 und(4.0 * vec2(e │ │ │ │ - 0x0096dc20 312c2065 32292920 2b206469 73743b20 1, e2)) + dist; │ │ │ │ - 0x0096dc30 0a202020 20746578 636f6f72 64203d20 . texcoord = │ │ │ │ - 0x0096dc40 534d4141 5f415245 41544558 5f504958 SMAA_AREATEX_PIX │ │ │ │ - 0x0096dc50 454c5f53 495a4520 2a202874 6578636f EL_SIZE * (texco │ │ │ │ - 0x0096dc60 6f726420 2b20302e 35293b20 0a202020 ord + 0.5); . │ │ │ │ - 0x0096dc70 20726574 75726e20 534d4141 53616d70 return SMAASamp │ │ │ │ - 0x0096dc80 6c654c65 76656c5a 65726f28 755f736d leLevelZero(u_sm │ │ │ │ - 0x0096dc90 61614172 65612c20 74657863 6f6f7264 aaArea, texcoord │ │ │ │ - 0x0096dca0 292e7267 3b200a20 207d200a 2020636f ).rg; . } . co │ │ │ │ - 0x0096dcb0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x0096dcc0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x0096dcd0 30302e30 3b200a20 20766f69 64206d61 00.0; . void ma │ │ │ │ - 0x0096dce0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ - 0x0096dcf0 65633420 77656967 68747320 3d207665 ec4 weights = ve │ │ │ │ - 0x0096dd00 63342830 2e302c20 302e302c 20302e30 c4(0.0, 0.0, 0.0 │ │ │ │ - 0x0096dd10 2c20302e 30293b20 0a202020 20766563 , 0.0); . vec │ │ │ │ - 0x0096dd20 32206520 3d207465 78747572 6528755f 2 e = texture(u_ │ │ │ │ - 0x0096dd30 636f6c6f 72546578 2c20765f 636f6f72 colorTex, v_coor │ │ │ │ - 0x0096dd40 64732e78 79292e72 673b200a 20202020 ds.xy).rg; . │ │ │ │ - 0x0096dd50 69662028 652e6720 3e20302e 3029202f if (e.g > 0.0) / │ │ │ │ - 0x0096dd60 2f204564 67652061 74206e6f 72746820 / Edge at north │ │ │ │ - 0x0096dd70 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ - 0x0096dd80 63322064 3b200a20 20202020 20766563 c2 d; . vec │ │ │ │ - 0x0096dd90 3320636f 6f726473 3b200a20 20202020 3 coords; . │ │ │ │ - 0x0096dda0 20636f6f 7264732e 78203d20 534d4141 coords.x = SMAA │ │ │ │ - 0x0096ddb0 53656172 6368584c 65667428 765f6f66 SearchXLeft(v_of │ │ │ │ - 0x0096ddc0 66736574 302e7879 2c20765f 6f666673 fset0.xy, v_offs │ │ │ │ - 0x0096ddd0 6574322e 78293b20 0a202020 20202063 et2.x); . c │ │ │ │ - 0x0096dde0 6f6f7264 732e7920 3d20765f 6f666673 oords.y = v_offs │ │ │ │ - 0x0096ddf0 6574312e 793b200a 20202020 2020642e et1.y; . d. │ │ │ │ - 0x0096de00 78203d20 636f6f72 64732e78 3b200a20 x = coords.x; . │ │ │ │ - 0x0096de10 20202020 20666c6f 61742065 31203d20 float e1 = │ │ │ │ - 0x0096de20 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ - 0x0096de30 65726f28 755f636f 6c6f7254 65782c20 ero(u_colorTex, │ │ │ │ - 0x0096de40 636f6f72 64732e78 79292e72 3b200a20 coords.xy).r; . │ │ │ │ - 0x0096de50 20202020 20636f6f 7264732e 7a203d20 coords.z = │ │ │ │ - 0x0096de60 534d4141 53656172 63685852 69676874 SMAASearchXRight │ │ │ │ - 0x0096de70 28765f6f 66667365 74302e7a 772c2076 (v_offset0.zw, v │ │ │ │ - 0x0096de80 5f6f6666 73657432 2e79293b 200a2020 _offset2.y); . │ │ │ │ - 0x0096de90 20202020 642e7920 3d20636f 6f726473 d.y = coords │ │ │ │ - 0x0096dea0 2e7a3b20 0a202020 20202076 65633220 .z; . vec2 │ │ │ │ - 0x0096deb0 7a7a203d 20755f66 72616d65 62756666 zz = u_framebuff │ │ │ │ - 0x0096dec0 65724d65 74726963 732e7a7a 3b200a20 erMetrics.zz; . │ │ │ │ - 0x0096ded0 20202020 2064203d 20616273 28534d41 d = abs(SMA │ │ │ │ - 0x0096dee0 41526f75 6e64287a 7a202a20 64202d20 ARound(zz * d - │ │ │ │ - 0x0096def0 765f636f 6f726473 2e7a7a29 293b200a v_coords.zz)); . │ │ │ │ - 0x0096df00 20202020 20207665 63322073 7172745f vec2 sqrt_ │ │ │ │ - 0x0096df10 64203d20 73717274 2864293b 200a2020 d = sqrt(d); . │ │ │ │ - 0x0096df20 20202020 666c6f61 74206532 203d2053 float e2 = S │ │ │ │ - 0x0096df30 4d414153 616d706c 654c6576 656c5a65 MAASampleLevelZe │ │ │ │ - 0x0096df40 726f4f66 66736574 28755f63 6f6c6f72 roOffset(u_color │ │ │ │ - 0x0096df50 5465782c 20636f6f 7264732e 7a792c20 Tex, coords.zy, │ │ │ │ - 0x0096df60 534d4141 4f666673 65742831 2c203029 SMAAOffset(1, 0) │ │ │ │ - 0x0096df70 292e723b 200a2020 20202020 77656967 ).r; . weig │ │ │ │ - 0x0096df80 6874732e 7267203d 20534d41 41417265 hts.rg = SMAAAre │ │ │ │ - 0x0096df90 61287371 72745f64 2c206531 2c206532 a(sqrt_d, e1, e2 │ │ │ │ - 0x0096dfa0 293b200a 20202020 7d200a20 20202069 ); . } . i │ │ │ │ - 0x0096dfb0 66202865 2e72203e 20302e30 29202f2f f (e.r > 0.0) // │ │ │ │ - 0x0096dfc0 20456467 65206174 20776573 74200a20 Edge at west . │ │ │ │ - 0x0096dfd0 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ - 0x0096dfe0 20643b20 0a202020 20202076 65633320 d; . vec3 │ │ │ │ - 0x0096dff0 636f6f72 64733b20 0a202020 20202063 coords; . c │ │ │ │ - 0x0096e000 6f6f7264 732e7920 3d20534d 41415365 oords.y = SMAASe │ │ │ │ - 0x0096e010 61726368 59557028 765f6f66 66736574 archYUp(v_offset │ │ │ │ - 0x0096e020 312e7879 2c20765f 6f666673 6574322e 1.xy, v_offset2. │ │ │ │ - 0x0096e030 7a293b20 0a202020 20202063 6f6f7264 z); . coord │ │ │ │ - 0x0096e040 732e7820 3d20765f 6f666673 6574302e s.x = v_offset0. │ │ │ │ - 0x0096e050 783b200a 20202020 2020642e 78203d20 x; . d.x = │ │ │ │ - 0x0096e060 636f6f72 64732e79 3b200a20 20202020 coords.y; . │ │ │ │ - 0x0096e070 20666c6f 61742065 31203d20 534d4141 float e1 = SMAA │ │ │ │ - 0x0096e080 53616d70 6c654c65 76656c5a 65726f28 SampleLevelZero( │ │ │ │ - 0x0096e090 755f636f 6c6f7254 65782c20 636f6f72 u_colorTex, coor │ │ │ │ - 0x0096e0a0 64732e78 79292e67 3b200a20 20202020 ds.xy).g; . │ │ │ │ - 0x0096e0b0 20636f6f 7264732e 7a203d20 534d4141 coords.z = SMAA │ │ │ │ - 0x0096e0c0 53656172 63685944 6f776e28 765f6f66 SearchYDown(v_of │ │ │ │ - 0x0096e0d0 66736574 312e7a77 2c20765f 6f666673 fset1.zw, v_offs │ │ │ │ - 0x0096e0e0 6574322e 77293b20 0a202020 20202064 et2.w); . d │ │ │ │ - 0x0096e0f0 2e79203d 20636f6f 7264732e 7a3b200a .y = coords.z; . │ │ │ │ - 0x0096e100 20202020 20207665 63322077 77203d20 vec2 ww = │ │ │ │ - 0x0096e110 755f6672 616d6562 75666665 724d6574 u_framebufferMet │ │ │ │ - 0x0096e120 72696373 2e77773b 200a2020 20202020 rics.ww; . │ │ │ │ - 0x0096e130 64203d20 61627328 534d4141 526f756e d = abs(SMAARoun │ │ │ │ - 0x0096e140 64287777 202a2064 202d2076 5f636f6f d(ww * d - v_coo │ │ │ │ - 0x0096e150 7264732e 77772929 3b200a20 20202020 rds.ww)); . │ │ │ │ - 0x0096e160 20766563 32207371 72745f64 203d2073 vec2 sqrt_d = s │ │ │ │ - 0x0096e170 71727428 64293b20 0a202020 20202066 qrt(d); . f │ │ │ │ - 0x0096e180 6c6f6174 20653220 3d20534d 41415361 loat e2 = SMAASa │ │ │ │ - 0x0096e190 6d706c65 4c657665 6c5a6572 6f4f6666 mpleLevelZeroOff │ │ │ │ - 0x0096e1a0 73657428 755f636f 6c6f7254 65782c20 set(u_colorTex, │ │ │ │ - 0x0096e1b0 636f6f72 64732e78 7a2c2053 4d41414f coords.xz, SMAAO │ │ │ │ - 0x0096e1c0 66667365 7428302c 20312929 2e673b20 ffset(0, 1)).g; │ │ │ │ - 0x0096e1d0 0a202020 20202077 65696768 74732e62 . weights.b │ │ │ │ - 0x0096e1e0 61203d20 534d4141 41726561 28737172 a = SMAAArea(sqr │ │ │ │ - 0x0096e1f0 745f642c 2065312c 20653229 3b200a20 t_d, e1, e2); . │ │ │ │ - 0x0096e200 2020207d 200a2020 2020765f 46726167 } . v_Frag │ │ │ │ - 0x0096e210 436f6c6f 72203d20 77656967 6874733b Color = weights; │ │ │ │ - 0x0096e220 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x0096e230 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0096e240 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0096e250 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0096e260 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096e270 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0096e280 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0096e290 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0096e2a0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0096e2b0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0096e2c0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0096e2d0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0096e2e0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0096e2f0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0096e300 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0096e310 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0096e320 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0096e330 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0096e340 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0096e350 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0096e360 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0096e370 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x0096e380 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ - 0x0096e390 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ - 0x0096e3a0 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ - 0x0096e3b0 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ - 0x0096e3c0 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ - 0x0096e3d0 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ - 0x0096e3e0 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ - 0x0096e3f0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x0096e400 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ - 0x0096e410 65747269 63733b20 0a202023 64656669 etrics; . #defi │ │ │ │ - 0x0096e420 6e652053 4d41415f 4d41585f 53454152 ne SMAA_MAX_SEAR │ │ │ │ - 0x0096e430 43485f53 54455053 20382e30 200a2020 CH_STEPS 8.0 . │ │ │ │ - 0x0096e440 636f6e73 74207665 6334206b 4d617853 const vec4 kMaxS │ │ │ │ - 0x0096e450 65617263 68537465 7073203d 20766563 earchSteps = vec │ │ │ │ - 0x0096e460 34282d32 2e30202a 20534d41 415f4d41 4(-2.0 * SMAA_MA │ │ │ │ - 0x0096e470 585f5345 41524348 5f535445 50532c20 X_SEARCH_STEPS, │ │ │ │ - 0x0096e480 322e3020 2a20534d 41415f4d 41585f53 2.0 * SMAA_MAX_S │ │ │ │ - 0x0096e490 45415243 485f5354 4550532c 200a2020 EARCH_STEPS, . │ │ │ │ - 0x0096e4a0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096e4b0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096e4c0 20202d32 2e30202a 20534d41 415f4d41 -2.0 * SMAA_MA │ │ │ │ - 0x0096e4d0 585f5345 41524348 5f535445 50532c20 X_SEARCH_STEPS, │ │ │ │ - 0x0096e4e0 322e3020 202a2053 4d41415f 4d41585f 2.0 * SMAA_MAX_ │ │ │ │ - 0x0096e4f0 53454152 43485f53 54455053 293b200a SEARCH_STEPS); . │ │ │ │ - 0x0096e500 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ - 0x0096e510 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ - 0x0096e520 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ - 0x0096e530 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ - 0x0096e540 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0096e550 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0096e560 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0096e570 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ - 0x0096e580 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x0096e590 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x0096e5a0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ - 0x0096e5b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096e5c0 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ - 0x0096e5d0 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ - 0x0096e5e0 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ - 0x0096e5f0 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ - 0x0096e600 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ - 0x0096e610 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ - 0x0096e620 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x0096e630 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ - 0x0096e640 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ - 0x0096e650 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ - 0x0096e660 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ - 0x0096e670 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ - 0x0096e680 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ - 0x0096e690 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ - 0x0096e6a0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ - 0x0096e6b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096e6c0 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ - 0x0096e6d0 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ - 0x0096e6e0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x0096e6f0 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ - 0x0096e700 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ - 0x0096e710 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ - 0x0096e720 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ - 0x0096e730 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x0096e740 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x0096e750 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x0096e760 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ - 0x0096e770 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ - 0x0096e780 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ - 0x0096e790 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ - 0x0096e7a0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x0096e7b0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x0096e7c0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0096e7d0 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ - 0x0096e7e0 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ - 0x0096e7f0 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ - 0x0096e800 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ - 0x0096e810 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ - 0x0096e820 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ - 0x0096e830 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x0096e840 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ - 0x0096e850 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ - 0x0096e860 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096e870 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ - 0x0096e880 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ - 0x0096e890 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ - 0x0096e8a0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ - 0x0096e8b0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0096e8c0 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ - 0x0096e8d0 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ - 0x0096e8e0 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ - 0x0096e8f0 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ - 0x0096e900 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ - 0x0096e910 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x0096e920 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ - 0x0096e930 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ - 0x0096e940 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x0096e950 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ - 0x0096e960 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ - 0x0096e970 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ - 0x0096e980 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ - 0x0096e990 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ - 0x0096e9a0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ - 0x0096e9b0 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ - 0x0096e9c0 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ - 0x0096e9d0 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ - 0x0096e9e0 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ - 0x0096e9f0 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ - 0x0096ea00 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ - 0x0096ea10 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ - 0x0096ea20 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x0096ea30 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ - 0x0096ea40 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ - 0x0096ea50 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ - 0x0096ea60 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ - 0x0096ea70 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x0096ea80 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ - 0x0096ea90 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ - 0x0096eaa0 2020765f 636f6f72 6473203d 20766563 v_coords = vec │ │ │ │ - 0x0096eab0 3428615f 74636f6f 72642c20 615f7463 4(a_tcoord, a_tc │ │ │ │ - 0x0096eac0 6f6f7264 202a2075 5f667261 6d656275 oord * u_framebu │ │ │ │ - 0x0096ead0 66666572 4d657472 6963732e 7a77293b fferMetrics.zw); │ │ │ │ - 0x0096eae0 200a2020 2020765f 6f666673 65743020 . v_offset0 │ │ │ │ - 0x0096eaf0 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ - 0x0096eb00 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ - 0x0096eb10 6334282d 302e3235 2c202d30 2e313235 c4(-0.25, -0.125 │ │ │ │ - 0x0096eb20 2c20312e 32352c20 2d302e31 32352920 , 1.25, -0.125) │ │ │ │ - 0x0096eb30 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ - 0x0096eb40 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ - 0x0096eb50 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ - 0x0096eb60 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ - 0x0096eb70 6334282d 302e3132 352c202d 302e3235 c4(-0.125, -0.25 │ │ │ │ - 0x0096eb80 2c202d30 2e313235 2c20312e 32352920 , -0.125, 1.25) │ │ │ │ - 0x0096eb90 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ - 0x0096eba0 200a2020 2020765f 6f666673 65743220 . v_offset2 │ │ │ │ - 0x0096ebb0 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ - 0x0096ebc0 65747269 63732e78 78797920 2a206b4d etrics.xxyy * kM │ │ │ │ - 0x0096ebd0 61785365 61726368 53746570 73202b20 axSearchSteps + │ │ │ │ - 0x0096ebe0 76656334 28765f6f 66667365 74302e78 vec4(v_offset0.x │ │ │ │ - 0x0096ebf0 7a2c2076 5f6f6666 73657431 2e797729 z, v_offset1.yw) │ │ │ │ - 0x0096ec00 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x0096ec10 6f6e203d 20766563 3428615f 706f732c on = vec4(a_pos, │ │ │ │ - 0x0096ec20 20302e30 2c20312e 30293b20 0a20207d 0.0, 1.0); . } │ │ │ │ - 0x0096ec30 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x0096ec40 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0096ec50 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0096ec60 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0096ec70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096ec80 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0096ec90 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0096eca0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0096ecb0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0096ecc0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0096ecd0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0096ece0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0096ecf0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0096ed00 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0096ed10 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0096ed20 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0096ed30 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0096ed40 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0096ed50 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0096ed60 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0096ed70 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0096ed80 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x0096ed90 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ - 0x0096eda0 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ - 0x0096edb0 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x0096edc0 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ - 0x0096edd0 20765f6f 66667365 74303b20 0a20206f v_offset0; . o │ │ │ │ - 0x0096ede0 75742076 65633420 765f6f66 66736574 ut vec4 v_offset │ │ │ │ - 0x0096edf0 313b200a 20206f75 74207665 63342076 1; . out vec4 v │ │ │ │ - 0x0096ee00 5f6f6666 73657432 3b200a20 20756e69 _offset2; . uni │ │ │ │ - 0x0096ee10 666f726d 20766563 3420755f 6672616d form vec4 u_fram │ │ │ │ - 0x0096ee20 65627566 6665724d 65747269 63733b20 ebufferMetrics; │ │ │ │ - 0x0096ee30 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x0096ee40 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x0096ee50 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x0096ee60 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x0096ee70 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x0096ee80 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x0096ee90 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x0096eea0 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x0096eeb0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x0096eec0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x0096eed0 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x0096eee0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x0096eef0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x0096ef00 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x0096ef10 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x0096ef20 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x0096ef30 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x0096ef40 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x0096ef50 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x0096ef60 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x0096ef70 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0096ef80 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x0096ef90 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x0096efa0 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x0096efb0 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x0096efc0 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x0096efd0 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x0096efe0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0096eff0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x0096f000 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x0096f010 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0096f020 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x0096f030 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x0096f040 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x0096f050 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x0096f060 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x0096f070 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x0096f080 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x0096f090 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x0096f0a0 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x0096f0b0 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x0096f0c0 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x0096f0d0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x0096f0e0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x0096f0f0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0096f100 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x0096f110 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x0096f120 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x0096f130 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x0096f140 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x0096f150 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x0096f160 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x0096f170 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x0096f180 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x0096f190 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096f1a0 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x0096f1b0 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x0096f1c0 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x0096f1d0 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x0096f1e0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x0096f1f0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x0096f200 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x0096f210 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x0096f220 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x0096f230 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x0096f240 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0096f250 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x0096f260 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x0096f270 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x0096f280 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x0096f290 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0096f2a0 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x0096f2b0 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x0096f2c0 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x0096f2d0 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x0096f2e0 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x0096f2f0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x0096f300 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x0096f310 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x0096f320 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x0096f330 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x0096f340 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x0096f350 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x0096f360 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x0096f370 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x0096f380 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x0096f390 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x0096f3a0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x0096f3b0 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x0096f3c0 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x0096f3d0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x0096f3e0 72647320 3d20615f 74636f6f 72643b20 rds = a_tcoord; │ │ │ │ - 0x0096f3f0 0a202020 20765f6f 66667365 7430203d . v_offset0 = │ │ │ │ - 0x0096f400 20755f66 72616d65 62756666 65724d65 u_framebufferMe │ │ │ │ - 0x0096f410 74726963 732e7879 7879202a 20766563 trics.xyxy * vec │ │ │ │ - 0x0096f420 34282d31 2e302c20 302e302c 20302e30 4(-1.0, 0.0, 0.0 │ │ │ │ - 0x0096f430 2c202d31 2e302920 2b20615f 74636f6f , -1.0) + a_tcoo │ │ │ │ - 0x0096f440 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ - 0x0096f450 6f666673 65743120 3d20755f 6672616d offset1 = u_fram │ │ │ │ - 0x0096f460 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x0096f470 79787920 2a207665 63342820 312e302c yxy * vec4( 1.0, │ │ │ │ - 0x0096f480 20302e30 2c20302e 302c2020 312e3029 0.0, 0.0, 1.0) │ │ │ │ - 0x0096f490 202b2061 5f74636f 6f72642e 78797879 + a_tcoord.xyxy │ │ │ │ - 0x0096f4a0 3b200a20 20202076 5f6f6666 73657432 ; . v_offset2 │ │ │ │ - 0x0096f4b0 203d2075 5f667261 6d656275 66666572 = u_framebuffer │ │ │ │ - 0x0096f4c0 4d657472 6963732e 78797879 202a2076 Metrics.xyxy * v │ │ │ │ - 0x0096f4d0 65633428 2d322e30 2c20302e 302c2030 ec4(-2.0, 0.0, 0 │ │ │ │ - 0x0096f4e0 2e302c20 2d322e30 29202b20 615f7463 .0, -2.0) + a_tc │ │ │ │ - 0x0096f4f0 6f6f7264 2e787978 793b200a 20202020 oord.xyxy; . │ │ │ │ - 0x0096f500 676c5f50 6f736974 696f6e20 3d207665 gl_Position = ve │ │ │ │ - 0x0096f510 63342861 5f706f73 2c20302e 302c2031 c4(a_pos, 0.0, 1 │ │ │ │ - 0x0096f520 2e30293b 200a2020 7d200a00 00000000 .0); . } ...... │ │ │ │ - 0x0096f530 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096f540 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096f550 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096f560 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096f570 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096f580 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096f590 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096f5a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096f5b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096f5c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096f5d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096f5e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096f5f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096f600 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096f610 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096f620 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096f630 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096f640 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096f650 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096f660 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096f670 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096f680 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ - 0x0096f690 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ - 0x0096f6a0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x0096f6b0 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x0096f6c0 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ - 0x0096f6d0 743b200a 2020756e 69666f72 6d207665 t; . uniform ve │ │ │ │ - 0x0096f6e0 63342075 5f667261 6d656275 66666572 c4 u_framebuffer │ │ │ │ - 0x0096f6f0 4d657472 6963733b 200a2020 636f6e73 Metrics; . cons │ │ │ │ - 0x0096f700 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x0096f710 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x0096f720 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x0096f730 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x0096f740 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0096f750 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0096f760 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0096f770 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x0096f780 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0096f790 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x0096f7a0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x0096f7b0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x0096f7c0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0096f7d0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x0096f7e0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0096f7f0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0096f800 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0096f810 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x0096f820 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096f830 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x0096f840 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x0096f850 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0096f860 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x0096f870 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x0096f880 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x0096f890 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0096f8a0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x0096f8b0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x0096f8c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096f8d0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0096f8e0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0096f8f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096f900 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x0096f910 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0096f920 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x0096f930 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x0096f940 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x0096f950 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x0096f960 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x0096f970 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x0096f980 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x0096f990 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x0096f9a0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x0096f9b0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x0096f9c0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x0096f9d0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0096f9e0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x0096f9f0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x0096fa00 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0096fa10 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x0096fa20 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x0096fa30 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x0096fa40 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0096fa50 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x0096fa60 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x0096fa70 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x0096fa80 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x0096fa90 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x0096faa0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x0096fab0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x0096fac0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x0096fad0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x0096fae0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x0096faf0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x0096fb00 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x0096fb10 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0096fb20 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x0096fb30 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x0096fb40 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x0096fb50 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x0096fb60 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x0096fb70 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x0096fb80 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x0096fb90 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x0096fba0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x0096fbb0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x0096fbc0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x0096fbd0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x0096fbe0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x0096fbf0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0096fc00 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x0096fc10 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x0096fc20 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x0096fc30 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x0096fc40 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x0096fc50 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x0096fc60 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x0096fc70 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0096fc80 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x0096fc90 29200a20 207b200a 20202020 765f636f ) . { . v_co │ │ │ │ - 0x0096fca0 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x0096fcb0 5f74636f 6f72643b 200a2020 2020765f _tcoord; . v_ │ │ │ │ - 0x0096fcc0 6f666673 6574203d 20755f66 72616d65 offset = u_frame │ │ │ │ - 0x0096fcd0 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ - 0x0096fce0 7879202a 20766563 3428312e 302c2030 xy * vec4(1.0, 0 │ │ │ │ - 0x0096fcf0 2e302c20 302e302c 20312e30 29202b20 .0, 0.0, 1.0) + │ │ │ │ - 0x0096fd00 615f7463 6f6f7264 2e787978 793b200a a_tcoord.xyxy; . │ │ │ │ - 0x0096fd10 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x0096fd20 3d207665 63342861 5f706f73 2c20302e = vec4(a_pos, 0. │ │ │ │ - 0x0096fd30 302c2031 2e30293b 200a2020 7d200a00 0, 1.0); . } .. │ │ │ │ - 0x0096fd40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096fd50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096fd60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096fd70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096fd80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096fd90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096fda0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096fdb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096fdc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096fdd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096fde0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096fdf0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096fe00 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096fe10 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096fe20 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096fe30 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096fe40 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096fe50 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096fe60 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096fe70 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096fe80 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096fe90 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x0096fea0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x0096feb0 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ - 0x0096fec0 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ - 0x0096fed0 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ - 0x0096fee0 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ - 0x0096fef0 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x0096ff00 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ - 0x0096ff10 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ - 0x0096ff20 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ - 0x0096ff30 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ - 0x0096ff40 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ - 0x0096ff50 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x0096ff60 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ - 0x0096ff70 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x0096ff80 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x0096ff90 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x0096ffa0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0096ffb0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x0096ffc0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x0096ffd0 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x0096ffe0 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x0096fff0 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00970000 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00970010 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00970020 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x00970030 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x00970040 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00970050 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x00970060 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00970070 5f565446 200a2020 756e6966 6f726d20 _VTF . uniform │ │ │ │ - 0x00970080 73616d70 6c657232 4420755f 636f6c6f sampler2D u_colo │ │ │ │ - 0x00970090 72546578 3b200a20 2023656e 64696620 rTex; . #endif │ │ │ │ - 0x009700a0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x009700b0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x009700c0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x009700d0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x009700e0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x009700f0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00970100 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00970110 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00970120 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00970130 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00970140 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00970150 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00970160 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x00970170 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x00970180 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x00970190 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x009701a0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x009701b0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x009701c0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x009701d0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x009701e0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x009701f0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00970200 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00970210 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00970220 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00970230 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00970240 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00970250 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00970260 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00970270 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00970280 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00970290 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x009702a0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x009702b0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x009702c0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x009702d0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x009702e0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x009702f0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00970300 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00970310 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00970320 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00970330 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00970340 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00970350 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00970360 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00970370 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00970380 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00970390 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x009703a0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x009703b0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x009703c0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x009703d0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x009703e0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x009703f0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00970400 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00970410 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00970420 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00970430 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00970440 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00970450 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00970460 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00970470 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00970480 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00970490 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x009704a0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x009704b0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x009704c0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x009704d0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x009704e0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x009704f0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00970500 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00970510 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00970520 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00970530 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00970540 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00970550 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00970560 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00970570 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00970580 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00970590 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x009705a0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x009705b0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x009705c0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x009705d0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x009705e0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x009705f0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00970600 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00970610 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00970620 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00970630 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00970640 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x00970650 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x00970660 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ - 0x00970670 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ - 0x00970680 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ - 0x00970690 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ - 0x009706a0 302e3029 202b2070 6f733b20 0a202020 0.0) + pos; . │ │ │ │ - 0x009706b0 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x009706c0 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x009706d0 726d2873 68696674 6564506f 73202a20 rm(shiftedPos * │ │ │ │ - 0x009706e0 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ - 0x009706f0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00970700 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00970710 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ - 0x00970720 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ - 0x00970730 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ - 0x00970740 636f6c6f 72546578 436f6f72 64293b20 colorTexCoord); │ │ │ │ - 0x00970750 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ - 0x00970760 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ - 0x00970770 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ - 0x00970780 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00970790 765f6d61 736b5465 78436f6f 7264203d v_maskTexCoord = │ │ │ │ - 0x009707a0 20615f6d 61736b54 6578436f 6f72643b a_maskTexCoord; │ │ │ │ - 0x009707b0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x009707c0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009707d0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x009707e0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x009707f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00970800 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00970810 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00970820 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00970830 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00970840 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00970850 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00970860 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00970870 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00970880 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00970890 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009708a0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009708b0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009708c0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009708d0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009708e0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x009708f0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00970900 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ - 0x00970910 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ - 0x00970920 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ - 0x00970930 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x00970940 3420615f 706f7369 74696f6e 3b200a20 4 a_position; . │ │ │ │ - 0x00970950 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ - 0x00970960 6c3b200a 20202369 66646566 20454e41 l; . #ifdef ENA │ │ │ │ - 0x00970970 424c455f 56544620 0a20206f 7574204c BLE_VTF . out L │ │ │ │ - 0x00970980 4f575f50 20766563 3420765f 636f6c6f OW_P vec4 v_colo │ │ │ │ - 0x00970990 723b200a 20202365 6c736520 0a20206f r; . #else . o │ │ │ │ - 0x009709a0 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ - 0x009709b0 6578436f 6f72643b 200a2020 23656e64 exCoord; . #end │ │ │ │ - 0x009709c0 6966200a 20206f75 74207665 63322076 if . out vec2 v │ │ │ │ - 0x009709d0 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ - 0x009709e0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x009709f0 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00970a00 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00970a10 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00970a20 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00970a30 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00970a40 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00970a50 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00970a60 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00970a70 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00970a80 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00970a90 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00970aa0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00970ab0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00970ac0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00970ad0 6e655061 73733b20 0a202075 6e69666f nePass; . unifo │ │ │ │ - 0x00970ae0 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ - 0x00970af0 6f6c6f72 5465783b 200a2020 636f6e73 olorTex; . cons │ │ │ │ - 0x00970b00 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00970b10 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00970b20 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00970b30 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00970b40 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00970b50 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00970b60 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00970b70 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00970b80 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00970b90 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00970ba0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00970bb0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00970bc0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00970bd0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00970be0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00970bf0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00970c00 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00970c10 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00970c20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00970c30 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00970c40 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00970c50 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00970c60 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00970c70 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00970c80 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00970c90 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00970ca0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00970cb0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00970cc0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00970cd0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00970ce0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00970cf0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00970d00 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00970d10 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00970d20 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00970d30 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00970d40 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00970d50 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00970d60 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00970d70 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00970d80 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00970d90 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00970da0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00970db0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00970dc0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00970dd0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00970de0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00970df0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00970e00 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00970e10 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00970e20 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00970e30 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00970e40 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00970e50 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00970e60 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00970e70 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00970e80 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00970e90 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00970ea0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00970eb0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00970ec0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00970ed0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00970ee0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00970ef0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00970f00 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00970f10 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00970f20 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00970f30 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00970f40 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00970f50 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00970f60 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00970f70 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00970f80 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00970f90 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00970fa0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00970fb0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00970fc0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00970fd0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00970fe0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00970ff0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00971000 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00971010 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00971020 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00971030 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00971040 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00971050 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00971060 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00971070 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00971080 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00971090 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x009710a0 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ - 0x009710b0 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ - 0x009710c0 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ - 0x009710d0 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ - 0x009710e0 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ - 0x009710f0 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ - 0x00971100 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00971110 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00971120 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00971130 69766f74 5472616e 73666f72 6d287069 ivotTransform(pi │ │ │ │ - 0x00971140 766f7420 2a20755f 70726f6a 65637469 vot * u_projecti │ │ │ │ - 0x00971150 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ - 0x00971160 666f726d 2c200a20 20202020 20202020 form, . │ │ │ │ - 0x00971170 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00971180 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00971190 20202020 2020615f 706f7369 74696f6e a_position │ │ │ │ - 0x009711a0 2e77202a 20755f7a 5363616c 652c206f .w * u_zScale, o │ │ │ │ - 0x009711b0 66667365 742e7879 293b200a 20202369 ffset.xy); . #i │ │ │ │ - 0x009711c0 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x009711d0 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ - 0x009711e0 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ - 0x009711f0 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ - 0x00971200 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ - 0x00971210 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00971220 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ - 0x00971230 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x00971240 0a202020 20765f6d 61736b54 6578436f . v_maskTexCo │ │ │ │ - 0x00971250 6f726420 3d20615f 6d61736b 54657843 ord = a_maskTexC │ │ │ │ - 0x00971260 6f6f7264 3b200a20 207d200a 00000000 oord; . } ..... │ │ │ │ - 0x00971270 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00971280 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00971290 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009712a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009712b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009712c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009712d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009712e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009712f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00971300 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00971310 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00971320 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00971330 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00971340 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00971350 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00971360 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00971370 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00971380 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00971390 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009713a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009713b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009713c0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x009713d0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x009713e0 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ - 0x009713f0 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x00971400 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ - 0x00971410 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ - 0x00971420 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ - 0x00971430 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ - 0x00971440 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00971450 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x00971460 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x00971470 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x00971480 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00971490 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x009714a0 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x009714b0 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x009714c0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x009714d0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x009714e0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x009714f0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x00971500 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ - 0x00971510 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ - 0x00971520 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ - 0x00971530 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ - 0x00971540 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ - 0x00971550 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ - 0x00971560 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x00971570 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00971580 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ - 0x00971590 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x009715a0 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ - 0x009715b0 733b200a 20202369 66646566 20454e41 s; . #ifdef ENA │ │ │ │ - 0x009715c0 424c455f 56544620 0a202075 6e69666f BLE_VTF . unifo │ │ │ │ - 0x009715d0 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ - 0x009715e0 6f6c6f72 5465783b 200a2020 23656e64 olorTex; . #end │ │ │ │ - 0x009715f0 6966200a 2020636f 6e737420 666c6f61 if . const floa │ │ │ │ - 0x00971600 74204261 73654465 70746853 68696674 t BaseDepthShift │ │ │ │ - 0x00971610 203d202d 31302e30 3b200a20 20636f6e = -10.0; . con │ │ │ │ - 0x00971620 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00971630 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00971640 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00971650 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00971660 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00971670 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00971680 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00971690 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x009716a0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x009716b0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x009716c0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x009716d0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x009716e0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x009716f0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00971700 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00971710 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00971720 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00971730 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00971740 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00971750 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00971760 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00971770 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00971780 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00971790 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x009717a0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x009717b0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x009717c0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x009717d0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x009717e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009717f0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00971800 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00971810 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00971820 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00971830 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00971840 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00971850 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00971860 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00971870 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00971880 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x00971890 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x009718a0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x009718b0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x009718c0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x009718d0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x009718e0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x009718f0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00971900 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x00971910 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x00971920 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00971930 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x00971940 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00971950 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x00971960 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00971970 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x00971980 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x00971990 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x009719a0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x009719b0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x009719c0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x009719d0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x009719e0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x009719f0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x00971a00 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x00971a10 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x00971a20 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x00971a30 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00971a40 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x00971a50 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x00971a60 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00971a70 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x00971a80 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x00971a90 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x00971aa0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x00971ab0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x00971ac0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x00971ad0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x00971ae0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x00971af0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x00971b00 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x00971b10 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00971b20 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x00971b30 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x00971b40 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00971b50 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x00971b60 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x00971b70 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x00971b80 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00971b90 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00971ba0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x00971bb0 2829200a 20207b20 0a202020 20666c6f () . { . flo │ │ │ │ - 0x00971bc0 61742069 734f7574 6c696e65 203d2073 at isOutline = s │ │ │ │ - 0x00971bd0 74657028 302e352c 20755f69 734f7574 tep(0.5, u_isOut │ │ │ │ - 0x00971be0 6c696e65 50617373 293b200a 20202020 linePass); . │ │ │ │ - 0x00971bf0 666c6f61 74206e6f 744f7574 6c696e65 float notOutline │ │ │ │ - 0x00971c00 203d2031 2e30202d 2069734f 75746c69 = 1.0 - isOutli │ │ │ │ - 0x00971c10 6e653b20 0a202020 20666c6f 61742064 ne; . float d │ │ │ │ - 0x00971c20 65707468 53686966 74203d20 42617365 epthShift = Base │ │ │ │ - 0x00971c30 44657074 68536869 6674202a 2069734f DepthShift * isO │ │ │ │ - 0x00971c40 75746c69 6e653b20 0a202020 20766563 utline; . vec │ │ │ │ - 0x00971c50 3420706f 73203d20 28766563 3428615f 4 pos = (vec4(a_ │ │ │ │ - 0x00971c60 706f7369 74696f6e 2e78797a 2c203129 position.xyz, 1) │ │ │ │ - 0x00971c70 202b2076 65633428 302e302c 20302e30 + vec4(0.0, 0.0 │ │ │ │ - 0x00971c80 2c206465 70746853 68696674 2c20302e , depthShift, 0. │ │ │ │ - 0x00971c90 30292920 2a20755f 6d6f6465 6c566965 0)) * u_modelVie │ │ │ │ - 0x00971ca0 773b200a 20202020 76656334 20736869 w; . vec4 shi │ │ │ │ - 0x00971cb0 66746564 506f7320 3d207665 63342861 ftedPos = vec4(a │ │ │ │ - 0x00971cc0 5f6e6f72 6d616c2c 20302e30 2c20302e _normal, 0.0, 0. │ │ │ │ - 0x00971cd0 3029202b 20706f73 3b200a20 20202067 0) + pos; . g │ │ │ │ - 0x00971ce0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x00971cf0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00971d00 28736869 66746564 506f7320 2a20755f (shiftedPos * u_ │ │ │ │ - 0x00971d10 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x00971d20 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x00971d30 30293b20 0a202020 20766563 3220636f 0); . vec2 co │ │ │ │ - 0x00971d40 6c6f7254 6578436f 6f726420 3d20615f lorTexCoord = a_ │ │ │ │ - 0x00971d50 636f6c6f 72546578 436f6f72 64202a20 colorTexCoord * │ │ │ │ - 0x00971d60 6e6f744f 75746c69 6e65202b 20615f6f notOutline + a_o │ │ │ │ - 0x00971d70 75746c69 6e65436f 6c6f7254 6578436f utlineColorTexCo │ │ │ │ - 0x00971d80 6f726420 2a206973 4f75746c 696e653b ord * isOutline; │ │ │ │ - 0x00971d90 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00971da0 455f5654 46200a20 20202076 5f636f6c E_VTF . v_col │ │ │ │ - 0x00971db0 6f72203d 20746578 74757265 28755f63 or = texture(u_c │ │ │ │ - 0x00971dc0 6f6c6f72 5465782c 20636f6c 6f725465 olorTex, colorTe │ │ │ │ - 0x00971dd0 78436f6f 7264293b 200a2020 23656c73 xCoord); . #els │ │ │ │ - 0x00971de0 65200a20 20202076 5f636f6c 6f725465 e . v_colorTe │ │ │ │ - 0x00971df0 78436f6f 7264203d 20636f6c 6f725465 xCoord = colorTe │ │ │ │ - 0x00971e00 78436f6f 72643b20 0a202023 656e6469 xCoord; . #endi │ │ │ │ - 0x00971e10 66200a20 20202076 5f6d6173 6b546578 f . v_maskTex │ │ │ │ - 0x00971e20 436f6f72 64203d20 615f6d61 736b5465 Coord = a_maskTe │ │ │ │ - 0x00971e30 78436f6f 72643b20 0a20207d 200a0000 xCoord; . } ... │ │ │ │ - 0x00971e40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00971e50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00971e60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00971e70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00971e80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00971e90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00971ea0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00971eb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00971ec0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00971ed0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00971ee0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00971ef0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00971f00 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00971f10 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00971f20 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00971f30 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00971f40 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00971f50 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00971f60 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00971f70 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00971f80 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00971f90 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x00971fa0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x00971fb0 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ - 0x00971fc0 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x00971fd0 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ - 0x00971fe0 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ - 0x00971ff0 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ - 0x00972000 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ - 0x00972010 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00972020 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x00972030 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x00972040 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x00972050 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00972060 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x00972070 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x00972080 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x00972090 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x009720a0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x009720b0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x009720c0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x009720d0 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ - 0x009720e0 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ - 0x009720f0 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ - 0x00972100 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ - 0x00972110 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ - 0x00972120 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ - 0x00972130 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x00972140 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00972150 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ - 0x00972160 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00972170 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ - 0x00972180 733b200a 2020756e 69666f72 6d207361 s; . uniform sa │ │ │ │ - 0x00972190 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ - 0x009721a0 65783b20 0a202063 6f6e7374 20666c6f ex; . const flo │ │ │ │ - 0x009721b0 6174206b 42617365 44657074 68536869 at kBaseDepthShi │ │ │ │ - 0x009721c0 6674203d 202d3130 2e303b20 0a202063 ft = -10.0; . c │ │ │ │ - 0x009721d0 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ - 0x009721e0 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ - 0x009721f0 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ - 0x00972200 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00972210 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x00972220 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x00972230 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x00972240 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ - 0x00972250 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00972260 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ - 0x00972270 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ - 0x00972280 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00972290 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x009722a0 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ - 0x009722b0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x009722c0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x009722d0 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ - 0x009722e0 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ - 0x009722f0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00972300 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ - 0x00972310 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ - 0x00972320 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00972330 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ - 0x00972340 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ - 0x00972350 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00972360 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00972370 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ - 0x00972380 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00972390 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ - 0x009723a0 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ - 0x009723b0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x009723c0 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ - 0x009723d0 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ - 0x009723e0 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ - 0x009723f0 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ - 0x00972400 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00972410 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00972420 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00972430 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ - 0x00972440 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ - 0x00972450 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ - 0x00972460 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ - 0x00972470 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x00972480 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ - 0x00972490 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ - 0x009724a0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x009724b0 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ - 0x009724c0 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ - 0x009724d0 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x009724e0 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ - 0x009724f0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x00972500 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ - 0x00972510 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x00972520 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ - 0x00972530 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ - 0x00972540 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ - 0x00972550 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ - 0x00972560 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ - 0x00972570 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ - 0x00972580 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00972590 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ - 0x009725a0 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ - 0x009725b0 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ - 0x009725c0 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ - 0x009725d0 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ - 0x009725e0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x009725f0 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ - 0x00972600 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ - 0x00972610 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x00972620 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ - 0x00972630 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ - 0x00972640 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ - 0x00972650 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ - 0x00972660 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ - 0x00972670 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ - 0x00972680 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ - 0x00972690 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ - 0x009726a0 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ - 0x009726b0 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ - 0x009726c0 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ - 0x009726d0 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ - 0x009726e0 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ - 0x009726f0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00972700 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ - 0x00972710 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ - 0x00972720 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ - 0x00972730 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ - 0x00972740 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00972750 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ - 0x00972760 696e2829 200a2020 7b200a20 20202066 in() . { . f │ │ │ │ - 0x00972770 6c6f6174 2069734f 75746c69 6e65203d loat isOutline = │ │ │ │ - 0x00972780 20737465 7028302e 352c2075 5f69734f step(0.5, u_isO │ │ │ │ - 0x00972790 75746c69 6e655061 7373293b 200a2020 utlinePass); . │ │ │ │ - 0x009727a0 2020666c 6f617420 64657074 68536869 float depthShi │ │ │ │ - 0x009727b0 6674203d 206b4261 73654465 70746853 ft = kBaseDepthS │ │ │ │ - 0x009727c0 68696674 202a2069 734f7574 6c696e65 hift * isOutline │ │ │ │ - 0x009727d0 3b200a20 20202076 65633420 7069766f ; . vec4 pivo │ │ │ │ - 0x009727e0 74203d20 28766563 3428615f 706f7369 t = (vec4(a_posi │ │ │ │ - 0x009727f0 74696f6e 2e78797a 2c20312e 3029202b tion.xyz, 1.0) + │ │ │ │ - 0x00972800 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ - 0x00972810 64657074 68536869 66742c20 302e3029 depthShift, 0.0) │ │ │ │ - 0x00972820 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ - 0x00972830 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ - 0x00972840 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ - 0x00972850 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ - 0x00972860 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x00972870 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00972880 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00972890 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ - 0x009728a0 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ - 0x009728b0 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x009728c0 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ - 0x009728d0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009728e0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009728f0 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ - 0x00972900 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ - 0x00972910 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ - 0x00972920 65633220 636f6c6f 72546578 436f6f72 ec2 colorTexCoor │ │ │ │ - 0x00972930 64203d20 6d697828 615f636f 6c6f7254 d = mix(a_colorT │ │ │ │ - 0x00972940 6578436f 6f72642c 20615f6f 75746c69 exCoord, a_outli │ │ │ │ - 0x00972950 6e65436f 6c6f7254 6578436f 6f72642c neColorTexCoord, │ │ │ │ - 0x00972960 2069734f 75746c69 6e65293b 200a2020 isOutline); . │ │ │ │ - 0x00972970 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ - 0x00972980 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ - 0x00972990 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ - 0x009729a0 5465782c 20636f6c 6f725465 78436f6f Tex, colorTexCoo │ │ │ │ - 0x009729b0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ - 0x009729c0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x009729d0 7264203d 20636f6c 6f725465 78436f6f rd = colorTexCoo │ │ │ │ - 0x009729e0 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x009729f0 20202076 5f6d6173 6b546578 436f6f72 v_maskTexCoor │ │ │ │ - 0x00972a00 64203d20 615f6d61 736b5465 78436f6f d = a_maskTexCoo │ │ │ │ - 0x00972a10 72643b20 0a20207d 200a0000 00000000 rd; . } ....... │ │ │ │ - 0x00972a20 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00972a30 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00972a40 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00972a50 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00972a60 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00972a70 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00972a80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00972a90 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00972aa0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00972ab0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00972ac0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00972ad0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00972ae0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00972af0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00972b00 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00972b10 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00972b20 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00972b30 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00972b40 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00972b50 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00972b60 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00972b70 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00972b80 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00972b90 72546578 436f6f72 643b200a 2020696e rTexCoord; . in │ │ │ │ - 0x00972ba0 20766563 3220615f 6f75746c 696e6543 vec2 a_outlineC │ │ │ │ - 0x00972bb0 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x00972bc0 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ - 0x00972bd0 6c3b200a 2020696e 20766563 3220615f l; . in vec2 a_ │ │ │ │ - 0x00972be0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ - 0x00972bf0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00972c00 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x00972c10 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x00972c20 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x00972c30 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00972c40 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x00972c50 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x00972c60 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x00972c70 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x00972c80 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x00972c90 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x00972ca0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x00972cb0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00972cc0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00972cd0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ - 0x00972ce0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00972cf0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ - 0x00972d00 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ - 0x00972d10 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ - 0x00972d20 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x00972d30 20755f6c 656e6774 683b200a 20202369 u_length; . #i │ │ │ │ - 0x00972d40 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x00972d50 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x00972d60 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ - 0x00972d70 200a2020 23656e64 6966200a 2020636f . #endif . co │ │ │ │ - 0x00972d80 6e737420 666c6f61 74206b42 61736544 nst float kBaseD │ │ │ │ - 0x00972d90 65707468 53686966 74203d20 2d31302e epthShift = -10. │ │ │ │ - 0x00972da0 303b200a 2020636f 6e737420 666c6f61 0; . const floa │ │ │ │ - 0x00972db0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00972dc0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00972dd0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00972de0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00972df0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00972e00 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00972e10 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00972e20 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00972e30 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00972e40 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00972e50 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00972e60 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00972e70 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00972e80 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00972e90 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00972ea0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00972eb0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00972ec0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00972ed0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00972ee0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00972ef0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00972f00 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00972f10 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00972f20 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00972f30 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00972f40 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00972f50 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00972f60 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00972f70 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00972f80 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00972f90 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00972fa0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00972fb0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00972fc0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00972fd0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00972fe0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00972ff0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00973000 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00973010 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00973020 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00973030 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00973040 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00973050 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00973060 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00973070 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00973080 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00973090 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x009730a0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x009730b0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x009730c0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x009730d0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x009730e0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x009730f0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00973100 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00973110 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00973120 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00973130 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00973140 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00973150 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00973160 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00973170 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00973180 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00973190 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x009731a0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x009731b0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x009731c0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x009731d0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x009731e0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x009731f0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00973200 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00973210 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00973220 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00973230 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00973240 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00973250 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00973260 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00973270 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00973280 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00973290 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x009732a0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x009732b0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x009732c0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x009732d0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x009732e0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x009732f0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00973300 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00973310 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00973320 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00973330 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00973340 200a2020 2020666c 6f617420 69734f75 . float isOu │ │ │ │ - 0x00973350 746c696e 65203d20 73746570 28302e35 tline = step(0.5 │ │ │ │ - 0x00973360 2c20755f 69734f75 746c696e 65506173 , u_isOutlinePas │ │ │ │ - 0x00973370 73293b20 0a202020 20666c6f 61742064 s); . float d │ │ │ │ - 0x00973380 65707468 53686966 74203d20 6b426173 epthShift = kBas │ │ │ │ - 0x00973390 65446570 74685368 69667420 2a206973 eDepthShift * is │ │ │ │ - 0x009733a0 4f75746c 696e653b 200a2020 20207665 Outline; . ve │ │ │ │ - 0x009733b0 63342070 6f73203d 20287665 63342861 c4 pos = (vec4(a │ │ │ │ - 0x009733c0 5f706f73 6974696f 6e2c2031 2e302920 _position, 1.0) │ │ │ │ - 0x009733d0 2b207665 63342830 2e302c20 302e302c + vec4(0.0, 0.0, │ │ │ │ - 0x009733e0 20646570 74685368 6966742c 20302e30 depthShift, 0.0 │ │ │ │ - 0x009733f0 2929202a 20755f6d 6f64656c 56696577 )) * u_modelView │ │ │ │ - 0x00973400 3b200a20 20202076 65633420 73686966 ; . vec4 shif │ │ │ │ - 0x00973410 74656450 6f73203d 20766563 3428615f tedPos = vec4(a_ │ │ │ │ - 0x00973420 6e6f726d 616c2c20 302e302c 20302e30 normal, 0.0, 0.0 │ │ │ │ - 0x00973430 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ - 0x00973440 5f506f73 6974696f 6e203d20 73686966 _Position = shif │ │ │ │ - 0x00973450 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ - 0x00973460 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ - 0x00973470 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ - 0x00973480 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ - 0x00973490 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ - 0x009734a0 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x009734b0 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ - 0x009734c0 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ - 0x009734d0 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ - 0x009734e0 64696620 0a202020 20766563 3220636f dif . vec2 co │ │ │ │ - 0x009734f0 6c6f7254 6578436f 6f726420 3d206d69 lorTexCoord = mi │ │ │ │ - 0x00973500 7828615f 636f6c6f 72546578 436f6f72 x(a_colorTexCoor │ │ │ │ - 0x00973510 642c2061 5f6f7574 6c696e65 436f6c6f d, a_outlineColo │ │ │ │ - 0x00973520 72546578 436f6f72 642c2069 734f7574 rTexCoord, isOut │ │ │ │ - 0x00973530 6c696e65 293b200a 20202369 66646566 line); . #ifdef │ │ │ │ - 0x00973540 20454e41 424c455f 56544620 0a202020 ENABLE_VTF . │ │ │ │ - 0x00973550 20765f63 6f6c6f72 203d2074 65787475 v_color = textu │ │ │ │ - 0x00973560 72652875 5f636f6c 6f725465 782c2063 re(u_colorTex, c │ │ │ │ - 0x00973570 6f6c6f72 54657843 6f6f7264 293b200a olorTexCoord); . │ │ │ │ - 0x00973580 20202365 6c736520 0a202020 20765f63 #else . v_c │ │ │ │ - 0x00973590 6f6c6f72 54657843 6f6f7264 203d2063 olorTexCoord = c │ │ │ │ - 0x009735a0 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x009735b0 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ - 0x009735c0 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ - 0x009735d0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ - 0x009735e0 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ - 0x009735f0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00973600 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00973610 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00973620 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00973630 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00973640 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00973650 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00973660 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00973670 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00973680 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00973690 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x009736a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x009736b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009736c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009736d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009736e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009736f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00973700 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00973710 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00973720 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00973730 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x00973740 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00973750 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x00973760 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x00973770 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x00973780 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x00973790 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ - 0x009737a0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x009737b0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x009737c0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x009737d0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x009737e0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x009737f0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x00973800 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x00973810 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x00973820 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00973830 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00973840 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00973850 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x00973860 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x00973870 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00973880 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x00973890 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x009738a0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x009738b0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x009738c0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x009738d0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x009738e0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x009738f0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00973900 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00973910 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00973920 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00973930 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00973940 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00973950 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x00973960 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x00973970 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x00973980 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x00973990 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x009739a0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x009739b0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x009739c0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x009739d0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x009739e0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x009739f0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00973a00 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00973a10 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00973a20 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00973a30 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00973a40 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00973a50 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00973a60 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00973a70 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00973a80 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x00973a90 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x00973aa0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x00973ab0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00973ac0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00973ad0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00973ae0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00973af0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00973b00 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00973b10 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00973b20 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00973b30 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00973b40 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00973b50 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00973b60 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00973b70 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00973b80 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x00973b90 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x00973ba0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x00973bb0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x00973bc0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00973bd0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00973be0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00973bf0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00973c00 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00973c10 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00973c20 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00973c30 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00973c40 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00973c50 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00973c60 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00973c70 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00973c80 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x00973c90 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x00973ca0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00973cb0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x00973cc0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00973cd0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00973ce0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00973cf0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00973d00 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00973d10 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00973d20 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00973d30 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00973d40 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00973d50 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00973d60 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00973d70 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00973d80 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x00973d90 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x00973da0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x00973db0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x00973dc0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00973dd0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00973de0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00973df0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00973e00 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00973e10 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00973e20 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00973e30 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x00973e40 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x00973e50 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ - 0x00973e60 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ - 0x00973e70 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ - 0x00973e80 28615f6e 6f726d61 6c2c2030 2c203029 (a_normal, 0, 0) │ │ │ │ - 0x00973e90 202b2070 6f733b20 0a202020 20676c5f + pos; . gl_ │ │ │ │ - 0x00973ea0 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ - 0x00973eb0 5069766f 74547261 6e73666f 726d2873 PivotTransform(s │ │ │ │ - 0x00973ec0 68696674 6564506f 73202a20 755f7072 hiftedPos * u_pr │ │ │ │ - 0x00973ed0 6f6a6563 74696f6e 2c20755f 7069766f ojection, u_pivo │ │ │ │ - 0x00973ee0 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ - 0x00973ef0 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ - 0x00973f00 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ - 0x00973f10 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ - 0x00973f20 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x00973f30 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00973f40 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00973f50 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00973f60 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00973f70 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00973f80 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00973f90 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00973fa0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00973fb0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00973fc0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00973fd0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00973fe0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00973ff0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00974000 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00974010 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00974020 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00974030 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00974040 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00974050 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00974060 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00974070 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x00974080 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00974090 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x009740a0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x009740b0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x009740c0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x009740d0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ - 0x009740e0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x009740f0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x00974100 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x00974110 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00974120 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x00974130 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x00974140 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x00974150 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x00974160 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00974170 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00974180 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00974190 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x009741a0 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x009741b0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x009741c0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x009741d0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x009741e0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x009741f0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x00974200 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x00974210 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00974220 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00974230 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00974240 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00974250 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00974260 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00974270 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00974280 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00974290 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x009742a0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x009742b0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x009742c0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x009742d0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x009742e0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x009742f0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x00974300 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x00974310 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00974320 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00974330 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00974340 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00974350 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00974360 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00974370 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00974380 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00974390 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x009743a0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x009743b0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x009743c0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x009743d0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x009743e0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x009743f0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00974400 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00974410 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00974420 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00974430 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00974440 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00974450 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00974460 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00974470 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00974480 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00974490 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x009744a0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x009744b0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x009744c0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x009744d0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x009744e0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x009744f0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x00974500 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00974510 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00974520 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00974530 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00974540 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00974550 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00974560 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00974570 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00974580 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00974590 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x009745a0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x009745b0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x009745c0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x009745d0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x009745e0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x009745f0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x00974600 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00974610 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00974620 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00974630 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00974640 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00974650 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00974660 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00974670 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00974680 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00974690 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x009746a0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x009746b0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x009746c0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x009746d0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x009746e0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x009746f0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x00974700 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00974710 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00974720 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00974730 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00974740 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00974750 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00974760 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00974770 20202076 65633420 7069766f 74203d20 vec4 pivot = │ │ │ │ - 0x00974780 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x00974790 78797a2c 20312e30 29202a20 755f6d6f xyz, 1.0) * u_mo │ │ │ │ - 0x009747a0 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ - 0x009747b0 6334206f 66667365 74203d20 76656334 c4 offset = vec4 │ │ │ │ - 0x009747c0 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ - 0x009747d0 302e3029 202a2075 5f70726f 6a656374 0.0) * u_project │ │ │ │ - 0x009747e0 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ - 0x009747f0 6974696f 6e203d20 6170706c 7942696c ition = applyBil │ │ │ │ - 0x00974800 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00974810 666f726d 28706976 6f74202a 20755f70 form(pivot * u_p │ │ │ │ - 0x00974820 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ - 0x00974830 6f745472 616e7366 6f726d2c 200a2020 otTransform, . │ │ │ │ - 0x00974840 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00974850 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00974860 20202020 20202020 20202020 20615f70 a_p │ │ │ │ - 0x00974870 6f736974 696f6e2e 77202a20 755f7a53 osition.w * u_zS │ │ │ │ - 0x00974880 63616c65 2c206f66 66736574 2e787929 cale, offset.xy) │ │ │ │ - 0x00974890 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ - 0x009748a0 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ - 0x009748b0 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ - 0x009748c0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x009748d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009748e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x009748f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00974900 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00974910 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00974920 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00974930 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00974940 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00974950 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00974960 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00974970 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00974980 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00974990 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009749a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009749b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009749c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009749d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009749e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009749f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00974a00 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00974a10 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x00974a20 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00974a30 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x00974a40 64733b20 0a20206f 75742076 65633220 ds; . out vec2 │ │ │ │ - 0x00974a50 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x00974a60 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00974a70 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ - 0x00974a80 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00974a90 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x00974aa0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x00974ab0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x00974ac0 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x00974ad0 706f7369 74696f6e 3b200a20 20756e69 position; . uni │ │ │ │ - 0x00974ae0 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ - 0x00974af0 75746c69 6e655061 73733b20 0a202075 utlinePass; . u │ │ │ │ - 0x00974b00 6e69666f 726d2066 6c6f6174 20755f6f niform float u_o │ │ │ │ - 0x00974b10 70616369 74793b20 0a202075 6e69666f pacity; . unifo │ │ │ │ - 0x00974b20 726d2066 6c6f6174 20755f6c 656e6774 rm float u_lengt │ │ │ │ - 0x00974b30 683b200a 2020636f 6e737420 666c6f61 h; . const floa │ │ │ │ - 0x00974b40 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00974b50 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00974b60 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00974b70 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00974b80 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00974b90 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00974ba0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00974bb0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00974bc0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00974bd0 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00974be0 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00974bf0 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00974c00 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00974c10 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00974c20 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00974c30 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00974c40 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00974c50 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00974c60 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00974c70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00974c80 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00974c90 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00974ca0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00974cb0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00974cc0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00974cd0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00974ce0 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00974cf0 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00974d00 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00974d10 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00974d20 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00974d30 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00974d40 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00974d50 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00974d60 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00974d70 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00974d80 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00974d90 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00974da0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00974db0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00974dc0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00974dd0 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00974de0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00974df0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00974e00 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00974e10 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00974e20 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00974e30 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00974e40 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00974e50 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00974e60 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00974e70 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00974e80 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00974e90 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00974ea0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00974eb0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00974ec0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00974ed0 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00974ee0 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00974ef0 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00974f00 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00974f10 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00974f20 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00974f30 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00974f40 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00974f50 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00974f60 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00974f70 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00974f80 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00974f90 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00974fa0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00974fb0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00974fc0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00974fd0 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00974fe0 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00974ff0 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00975000 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00975010 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00975020 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00975030 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00975040 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x00975050 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x00975060 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00975070 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00975080 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00975090 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x009750a0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x009750b0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x009750c0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x009750d0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x009750e0 6e203d20 76656334 28615f70 6f736974 n = vec4(a_posit │ │ │ │ - 0x009750f0 696f6e2c 20302c20 3129202a 20755f6d ion, 0, 1) * u_m │ │ │ │ - 0x00975100 6f64656c 56696577 202a2075 5f70726f odelView * u_pro │ │ │ │ - 0x00975110 6a656374 696f6e3b 200a2020 23696664 jection; . #ifd │ │ │ │ - 0x00975120 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ - 0x00975130 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ - 0x00975140 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ - 0x00975150 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ - 0x00975160 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ - 0x00975170 2e7a2020 2b20676c 5f506f73 6974696f .z + gl_Positio │ │ │ │ - 0x00975180 6e2e7729 202a2030 2e353b20 0a202023 n.w) * 0.5; . # │ │ │ │ - 0x00975190 656e6469 66200a20 20202076 5f636f6c endif . v_col │ │ │ │ - 0x009751a0 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ - 0x009751b0 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ - 0x009751c0 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x009751d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009751e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x009751f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00975200 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00975210 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00975220 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00975230 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00975240 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00975250 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00975260 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00975270 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00975280 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00975290 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009752a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009752b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009752c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009752d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009752e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009752f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00975300 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00975310 0a202023 64656669 6e652054 494c455f . #define TILE_ │ │ │ │ - 0x00975320 4241434b 47524f55 4e445f4d 41585f43 BACKGROUND_MAX_C │ │ │ │ - 0x00975330 4f554e54 20363420 0a20206f 75742076 OUNT 64 . out v │ │ │ │ - 0x00975340 65633320 765f7465 78436f6f 7264733b ec3 v_texCoords; │ │ │ │ - 0x00975350 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00975360 20755f74 696c6543 6f6f7264 734d696e u_tileCoordsMin │ │ │ │ - 0x00975370 4d61785b 54494c45 5f424143 4b47524f Max[TILE_BACKGRO │ │ │ │ - 0x00975380 554e445f 4d41585f 434f554e 545d3b20 UND_MAX_COUNT]; │ │ │ │ - 0x00975390 0a202075 6e69666f 726d2069 6e742075 . uniform int u │ │ │ │ - 0x009753a0 5f746578 74757265 496e6465 785b5449 _textureIndex[TI │ │ │ │ - 0x009753b0 4c455f42 41434b47 524f554e 445f4d41 LE_BACKGROUND_MA │ │ │ │ - 0x009753c0 585f434f 554e545d 3b200a20 20756e69 X_COUNT]; . uni │ │ │ │ - 0x009753d0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x009753e0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x009753f0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x00975400 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x00975410 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ - 0x00975420 73666f72 6d3b200a 2020636f 6e737420 sform; . const │ │ │ │ - 0x00975430 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ - 0x00975440 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ - 0x00975450 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ - 0x00975460 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00975470 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00975480 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00975490 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ - 0x009754a0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x009754b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009754c0 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ - 0x009754d0 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ - 0x009754e0 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ - 0x009754f0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00975500 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ - 0x00975510 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x00975520 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00975530 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00975540 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ - 0x00975550 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00975560 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ - 0x00975570 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ - 0x00975580 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x00975590 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x009755a0 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ - 0x009755b0 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ - 0x009755c0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x009755d0 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ - 0x009755e0 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ - 0x009755f0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00975600 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x00975610 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ - 0x00975620 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ - 0x00975630 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ - 0x00975640 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ - 0x00975650 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x00975660 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x00975670 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x00975680 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ - 0x00975690 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ - 0x009756a0 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ - 0x009756b0 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ - 0x009756c0 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ - 0x009756d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009756e0 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ - 0x009756f0 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ - 0x00975700 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00975710 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ - 0x00975720 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ - 0x00975730 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00975740 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ - 0x00975750 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ - 0x00975760 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ - 0x00975770 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00975780 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ - 0x00975790 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ - 0x009757a0 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ - 0x009757b0 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ - 0x009757c0 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ - 0x009757d0 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ - 0x009757e0 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ - 0x009757f0 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ - 0x00975800 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ - 0x00975810 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ - 0x00975820 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ - 0x00975830 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00975840 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00975850 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ - 0x00975860 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ - 0x00975870 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x00975880 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ - 0x00975890 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ - 0x009758a0 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ - 0x009758b0 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ - 0x009758c0 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ - 0x009758d0 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ - 0x009758e0 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ - 0x009758f0 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ - 0x00975900 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x00975910 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ - 0x00975920 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00975930 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ - 0x00975940 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ - 0x00975950 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00975960 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ - 0x00975970 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ - 0x00975980 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ - 0x00975990 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x009759a0 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ - 0x009759b0 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ - 0x009759c0 0a20207b 200a2020 20207665 63322071 . { . vec2 q │ │ │ │ - 0x009759d0 75616456 65727465 78203d20 76656332 uadVertex = vec2 │ │ │ │ - 0x009759e0 28676c5f 56657274 65784944 20262031 (gl_VertexID & 1 │ │ │ │ - 0x009759f0 2c202867 6c5f5665 72746578 4944203e , (gl_VertexID > │ │ │ │ - 0x00975a00 3e203129 20262031 293b200a 2020200a > 1) & 1); . . │ │ │ │ - 0x00975a10 20202020 76656334 2074696c 65436f6f vec4 tileCoo │ │ │ │ - 0x00975a20 7264734d 696e4d61 78203d20 755f7469 rdsMinMax = u_ti │ │ │ │ - 0x00975a30 6c65436f 6f726473 4d696e4d 61785b67 leCoordsMinMax[g │ │ │ │ - 0x00975a40 6c5f496e 7374616e 63654944 5d3b200a l_InstanceID]; . │ │ │ │ - 0x00975a50 20202020 76656332 20776f72 6c64506f vec2 worldPo │ │ │ │ - 0x00975a60 73203d20 6d697828 74696c65 436f6f72 s = mix(tileCoor │ │ │ │ - 0x00975a70 64734d69 6e4d6178 2e78792c 2074696c dsMinMax.xy, til │ │ │ │ - 0x00975a80 65436f6f 7264734d 696e4d61 782e7a77 eCoordsMinMax.zw │ │ │ │ - 0x00975a90 2c207175 61645665 72746578 293b200a , quadVertex); . │ │ │ │ - 0x00975aa0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x00975ab0 65633428 776f726c 64506f73 2c20302e ec4(worldPos, 0. │ │ │ │ - 0x00975ac0 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ - 0x00975ad0 6c566965 77202a20 755f7072 6f6a6563 lView * u_projec │ │ │ │ - 0x00975ae0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ - 0x00975af0 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ - 0x00975b00 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ - 0x00975b10 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ - 0x00975b20 726d2c20 302e3029 3b200a20 20200a20 rm, 0.0); . . │ │ │ │ - 0x00975b30 20202076 5f746578 436f6f72 6473203d v_texCoords = │ │ │ │ - 0x00975b40 20766563 33287175 61645665 72746578 vec3(quadVertex │ │ │ │ - 0x00975b50 2c20666c 6f617428 755f7465 78747572 , float(u_textur │ │ │ │ - 0x00975b60 65496e64 65785b67 6c5f496e 7374616e eIndex[gl_Instan │ │ │ │ - 0x00975b70 63654944 5d29293b 200a2020 7d200a00 ceID])); . } .. │ │ │ │ - 0x00975b80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00975b90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00975ba0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00975bb0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00975bc0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00975bd0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00975be0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00975bf0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00975c00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00975c10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00975c20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00975c30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00975c40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00975c50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00975c60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00975c70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00975c80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00975c90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00975ca0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00975cb0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00975cc0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00975cd0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00975ce0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00975cf0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00975d00 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x00975d10 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x00975d20 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ - 0x00975d30 6f757420 76656332 20765f6d 61736b54 out vec2 v_maskT │ │ │ │ - 0x00975d40 6578436f 6f72643b 200a2020 6f757420 exCoord; . out │ │ │ │ - 0x00975d50 666c6f61 7420765f 68616c66 4c656e67 float v_halfLeng │ │ │ │ - 0x00975d60 74683b20 0a202075 6e69666f 726d206d th; . uniform m │ │ │ │ - 0x00975d70 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ - 0x00975d80 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00975d90 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00975da0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00975db0 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ - 0x00975dc0 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00975dd0 20755f74 72616666 69635061 72616d73 u_trafficParams │ │ │ │ - 0x00975de0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00975df0 3420755f 6f75746c 696e6543 6f6c6f72 4 u_outlineColor │ │ │ │ - 0x00975e00 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00975e10 3420755f 6c696768 74417272 6f77436f 4 u_lightArrowCo │ │ │ │ - 0x00975e20 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x00975e30 76656334 20755f64 61726b41 72726f77 vec4 u_darkArrow │ │ │ │ - 0x00975e40 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ - 0x00975e50 6d20666c 6f617420 755f6f75 746c696e m float u_outlin │ │ │ │ - 0x00975e60 653b200a 2020756e 69666f72 6d20666c e; . uniform fl │ │ │ │ - 0x00975e70 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ - 0x00975e80 2020636f 6e737420 666c6f61 74206b41 const float kA │ │ │ │ - 0x00975e90 72726f77 5653697a 65203d20 302e3235 rrowVSize = 0.25 │ │ │ │ - 0x00975ea0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00975eb0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00975ec0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00975ed0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00975ee0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00975ef0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00975f00 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00975f10 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00975f20 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00975f30 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00975f40 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x00975f50 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x00975f60 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x00975f70 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00975f80 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x00975f90 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00975fa0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00975fb0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00975fc0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00975fd0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00975fe0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00975ff0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00976000 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00976010 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00976020 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x00976030 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x00976040 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00976050 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x00976060 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x00976070 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x00976080 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00976090 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x009760a0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x009760b0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x009760c0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x009760d0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x009760e0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x009760f0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00976100 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00976110 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00976120 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x00976130 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x00976140 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x00976150 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00976160 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00976170 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x00976180 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x00976190 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x009761a0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x009761b0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x009761c0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x009761d0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x009761e0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x009761f0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00976200 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x00976210 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x00976220 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x00976230 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x00976240 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x00976250 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00976260 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x00976270 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x00976280 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x00976290 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x009762a0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x009762b0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x009762c0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x009762d0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x009762e0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x009762f0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x00976300 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x00976310 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x00976320 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x00976330 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x00976340 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x00976350 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x00976360 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x00976370 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x00976380 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x00976390 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x009763a0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x009763b0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x009763c0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x009763d0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x009763e0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x009763f0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x00976400 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x00976410 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00976420 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x00976430 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x00976440 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ - 0x00976450 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ - 0x00976460 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x00976470 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x00976480 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x00976490 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x009764a0 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x009764b0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x009764c0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ - 0x009764d0 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x009764e0 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ - 0x009764f0 6e6f726d 616c202a 20755f74 72616666 normal * u_traff │ │ │ │ - 0x00976500 69635061 72616d73 2e783b20 0a202020 icParams.x; . │ │ │ │ - 0x00976510 20202069 66202861 5f6e6f72 6d616c2e if (a_normal. │ │ │ │ - 0x00976520 7a203c20 302e3029 200a2020 20202020 z < 0.0) . │ │ │ │ - 0x00976530 20206e6f 726d203d 206e6f72 6d616c20 norm = normal │ │ │ │ - 0x00976540 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ - 0x00976550 732e793b 200a2020 20202020 7472616e s.y; . tran │ │ │ │ - 0x00976560 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x00976570 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00976580 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ - 0x00976590 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x009765a0 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ - 0x009765b0 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ - 0x009765c0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009765d0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009765e0 20202020 20202020 20202020 20755f6d u_m │ │ │ │ - 0x009765f0 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ - 0x00976600 286e6f72 6d29293b 200a2020 20207d20 (norm)); . } │ │ │ │ - 0x00976610 0a202020 20666c6f 61742075 4f666673 . float uOffs │ │ │ │ - 0x00976620 6574203d 206c656e 67746828 76656334 et = length(vec4 │ │ │ │ - 0x00976630 286b5368 61706543 6f6f7264 5363616c (kShapeCoordScal │ │ │ │ - 0x00976640 61722c20 302c2030 2c203029 202a2075 ar, 0, 0, 0) * u │ │ │ │ - 0x00976650 5f6d6f64 656c5669 65772920 2a20615f _modelView) * a_ │ │ │ │ - 0x00976660 6e6f726d 616c2e77 3b200a20 20202076 normal.w; . v │ │ │ │ - 0x00976670 5f636f6c 6f725465 78436f6f 7264203d _colorTexCoord = │ │ │ │ - 0x00976680 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ - 0x00976690 2e78793b 200a2020 2020666c 6f617420 .xy; . float │ │ │ │ - 0x009766a0 76203d20 6d697828 615f636f 6c6f7254 v = mix(a_colorT │ │ │ │ - 0x009766b0 6578436f 6f72642e 7a2c2061 5f636f6c exCoord.z, a_col │ │ │ │ - 0x009766c0 6f725465 78436f6f 72642e7a 202b206b orTexCoord.z + k │ │ │ │ - 0x009766d0 4172726f 77565369 7a652c20 302e3520 ArrowVSize, 0.5 │ │ │ │ - 0x009766e0 2a20615f 6e6f726d 616c2e7a 202b2030 * a_normal.z + 0 │ │ │ │ - 0x009766f0 2e35293b 200a2020 2020765f 6d61736b .5); . v_mask │ │ │ │ - 0x00976700 54657843 6f6f7264 203d2076 65633228 TexCoord = vec2( │ │ │ │ - 0x00976710 754f6666 73657420 2a20755f 74726166 uOffset * u_traf │ │ │ │ - 0x00976720 66696350 6172616d 732e7a2c 20762920 ficParams.z, v) │ │ │ │ - 0x00976730 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ - 0x00976740 732e773b 200a2020 2020765f 6d61736b s.w; . v_mask │ │ │ │ - 0x00976750 54657843 6f6f7264 2e78202a 3d207374 TexCoord.x *= st │ │ │ │ - 0x00976760 65702861 5f636f6c 6f725465 78436f6f ep(a_colorTexCoo │ │ │ │ - 0x00976770 72642e77 2c20765f 6d61736b 54657843 rd.w, v_maskTexC │ │ │ │ - 0x00976780 6f6f7264 2e78293b 200a2020 2020765f oord.x); . v_ │ │ │ │ - 0x00976790 68616c66 4c656e67 7468203d 20615f6e halfLength = a_n │ │ │ │ - 0x009767a0 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ - 0x009767b0 63342070 6f73203d 20766563 34287472 c4 pos = vec4(tr │ │ │ │ - 0x009767c0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x009767d0 2c20615f 706f7369 74696f6e 2e7a2c20 , a_position.z, │ │ │ │ - 0x009767e0 312e3029 202a2075 5f70726f 6a656374 1.0) * u_project │ │ │ │ - 0x009767f0 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ - 0x00976800 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ - 0x00976810 6f745472 616e7366 6f726d28 706f732c otTransform(pos, │ │ │ │ - 0x00976820 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ - 0x00976830 6d2c2030 2e30293b 200a2020 7d200a00 m, 0.0); . } .. │ │ │ │ - 0x00976840 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00976850 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00976860 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00976870 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00976880 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00976890 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009768a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009768b0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009768c0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009768d0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009768e0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x009768f0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00976900 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00976910 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00976920 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00976930 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00976940 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00976950 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00976960 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00976970 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00976980 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00976990 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x009769a0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x009769b0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x009769c0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x009769d0 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x009769e0 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ - 0x009769f0 6f757420 76656333 20765f72 61646975 out vec3 v_radiu │ │ │ │ - 0x00976a00 733b200a 2020756e 69666f72 6d206d61 s; . uniform ma │ │ │ │ - 0x00976a10 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x00976a20 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00976a30 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00976a40 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00976a50 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x00976a60 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x00976a70 755f7472 61666669 63506172 616d733b u_trafficParams; │ │ │ │ - 0x00976a80 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00976a90 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ - 0x00976aa0 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00976ab0 20755f6c 69676874 4172726f 77436f6c u_lightArrowCol │ │ │ │ - 0x00976ac0 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ - 0x00976ad0 65633420 755f6461 726b4172 726f7743 ec4 u_darkArrowC │ │ │ │ - 0x00976ae0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x00976af0 20666c6f 61742075 5f6f7574 6c696e65 float u_outline │ │ │ │ - 0x00976b00 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00976b10 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ - 0x00976b20 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00976b30 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00976b40 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00976b50 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00976b60 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00976b70 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00976b80 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00976b90 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00976ba0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00976bb0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00976bc0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00976bd0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00976be0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00976bf0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00976c00 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00976c10 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00976c20 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00976c30 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00976c40 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00976c50 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00976c60 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00976c70 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00976c80 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00976c90 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00976ca0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00976cb0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00976cc0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00976cd0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00976ce0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00976cf0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00976d00 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00976d10 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00976d20 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00976d30 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00976d40 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00976d50 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00976d60 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00976d70 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00976d80 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x00976d90 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x00976da0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00976db0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00976dc0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00976dd0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00976de0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00976df0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00976e00 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00976e10 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00976e20 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00976e30 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00976e40 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00976e50 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00976e60 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00976e70 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x00976e80 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00976e90 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x00976ea0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x00976eb0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00976ec0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00976ed0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00976ee0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00976ef0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00976f00 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00976f10 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00976f20 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00976f30 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00976f40 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00976f50 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00976f60 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00976f70 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x00976f80 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x00976f90 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x00976fa0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x00976fb0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00976fc0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00976fd0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00976fe0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00976ff0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00977000 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00977010 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00977020 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00977030 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00977040 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00977050 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00977060 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00977070 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x00977080 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x00977090 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x009770a0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x009770b0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x009770c0 20766563 32206e6f 726d616c 203d2061 vec2 normal = a │ │ │ │ - 0x009770d0 5f6e6f72 6d616c2e 78793b20 0a202020 _normal.xy; . │ │ │ │ - 0x009770e0 20766563 32207472 616e7366 6f726d65 vec2 transforme │ │ │ │ - 0x009770f0 64417869 73506f73 203d2028 76656334 dAxisPos = (vec4 │ │ │ │ - 0x00977100 28615f70 6f736974 696f6e2e 78792c20 (a_position.xy, │ │ │ │ - 0x00977110 302e302c 20312e30 29202a20 755f6d6f 0.0, 1.0) * u_mo │ │ │ │ - 0x00977120 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00977130 2020696e 7420696e 64657820 3d20696e int index = in │ │ │ │ - 0x00977140 7428615f 706f7369 74696f6e 2e77293b t(a_position.w); │ │ │ │ - 0x00977150 200a2020 2020666c 6f617420 6c656674 . float left │ │ │ │ - 0x00977160 53697a65 203d2075 5f6c6967 68744172 Size = u_lightAr │ │ │ │ - 0x00977170 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ - 0x00977180 200a2020 2020666c 6f617420 72696768 . float righ │ │ │ │ - 0x00977190 7453697a 65203d20 755f6461 726b4172 tSize = u_darkAr │ │ │ │ - 0x009771a0 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ - 0x009771b0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x009771c0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ - 0x009771d0 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x009771e0 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ - 0x009771f0 6e6f726d 616c202a 20302e35 202a2028 normal * 0.5 * ( │ │ │ │ - 0x00977200 72696768 7453697a 65202d20 6c656674 rightSize - left │ │ │ │ - 0x00977210 53697a65 293b200a 20202020 20207472 Size); . tr │ │ │ │ - 0x00977220 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00977230 203d2063 616c634c 696e6554 72616e73 = calcLineTrans │ │ │ │ - 0x00977240 666f726d 65644178 6973506f 73287472 formedAxisPos(tr │ │ │ │ - 0x00977250 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00977260 2c20615f 706f7369 74696f6e 2e787920 , a_position.xy │ │ │ │ - 0x00977270 2b206e6f 726d2c20 0a202020 20202020 + norm, . │ │ │ │ - 0x00977280 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00977290 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009772a0 20202020 20202020 20202020 20202075 u │ │ │ │ - 0x009772b0 5f6d6f64 656c5669 65772c20 6c656e67 _modelView, leng │ │ │ │ - 0x009772c0 7468286e 6f726d29 293b200a 20202020 th(norm)); . │ │ │ │ - 0x009772d0 7d200a20 20202076 5f726164 69757320 } . v_radius │ │ │ │ - 0x009772e0 3d207665 63332861 5f6e6f72 6d616c2e = vec3(a_normal. │ │ │ │ - 0x009772f0 7a772c20 312e3029 202a2030 2e35202a zw, 1.0) * 0.5 * │ │ │ │ - 0x00977300 20286c65 66745369 7a65202b 20726967 (leftSize + rig │ │ │ │ - 0x00977310 68745369 7a65293b 200a2020 20207665 htSize); . ve │ │ │ │ - 0x00977320 63322066 696e616c 506f7320 3d207472 c2 finalPos = tr │ │ │ │ - 0x00977330 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00977340 202b2076 5f726164 6975732e 78793b20 + v_radius.xy; │ │ │ │ - 0x00977350 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ - 0x00977360 6f6f7264 203d2061 5f636f6c 6f725465 oord = a_colorTe │ │ │ │ - 0x00977370 78436f6f 72643b20 0a202020 20766563 xCoord; . vec │ │ │ │ - 0x00977380 3420706f 73203d20 76656334 2866696e 4 pos = vec4(fin │ │ │ │ - 0x00977390 616c506f 732c2061 5f706f73 6974696f alPos, a_positio │ │ │ │ - 0x009773a0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ - 0x009773b0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ - 0x009773c0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x009773d0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x009773e0 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ - 0x009773f0 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x00977400 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ - 0x00977410 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00977420 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00977430 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00977440 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00977450 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00977460 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00977470 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00977480 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00977490 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009774a0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009774b0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x009774c0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x009774d0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009774e0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009774f0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00977500 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00977510 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00977520 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00977530 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00977540 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00977550 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00977560 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00977570 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x00977580 643b200a 20206f75 74207665 63322076 d; . out vec2 v │ │ │ │ - 0x00977590 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x009775a0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x009775b0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x009775c0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x009775d0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x009775e0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x009775f0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x00977600 756e6966 6f726d20 76656334 20755f74 uniform vec4 u_t │ │ │ │ - 0x00977610 72616666 69635061 72616d73 3b200a20 rafficParams; . │ │ │ │ - 0x00977620 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ - 0x00977630 6f75746c 696e6543 6f6c6f72 3b200a20 outlineColor; . │ │ │ │ - 0x00977640 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ - 0x00977650 6c696768 74417272 6f77436f 6c6f723b lightArrowColor; │ │ │ │ - 0x00977660 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00977670 20755f64 61726b41 72726f77 436f6c6f u_darkArrowColo │ │ │ │ - 0x00977680 723b200a 2020756e 69666f72 6d20666c r; . uniform fl │ │ │ │ - 0x00977690 6f617420 755f6f75 746c696e 653b200a oat u_outline; . │ │ │ │ - 0x009776a0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x009776b0 755f6f70 61636974 793b200a 2020636f u_opacity; . co │ │ │ │ - 0x009776c0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x009776d0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x009776e0 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x009776f0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00977700 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00977710 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00977720 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00977730 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x00977740 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00977750 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x00977760 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x00977770 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x00977780 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00977790 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x009777a0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x009777b0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x009777c0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x009777d0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x009777e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x009777f0 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x00977800 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x00977810 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00977820 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x00977830 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x00977840 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x00977850 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00977860 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x00977870 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x00977880 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x00977890 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x009778a0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x009778b0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x009778c0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x009778d0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x009778e0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x009778f0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00977900 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00977910 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00977920 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x00977930 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x00977940 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x00977950 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x00977960 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00977970 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x00977980 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x00977990 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x009779a0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x009779b0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x009779c0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x009779d0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x009779e0 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x009779f0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00977a00 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00977a10 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x00977a20 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x00977a30 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x00977a40 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x00977a50 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x00977a60 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x00977a70 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00977a80 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x00977a90 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x00977aa0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x00977ab0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x00977ac0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x00977ad0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x00977ae0 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x00977af0 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x00977b00 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x00977b10 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x00977b20 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x00977b30 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x00977b40 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x00977b50 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x00977b60 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x00977b70 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x00977b80 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x00977b90 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x00977ba0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x00977bb0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00977bc0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x00977bd0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x00977be0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00977bf0 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x00977c00 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x00977c10 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x00977c20 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00977c30 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00977c40 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x00977c50 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ - 0x00977c60 63322074 72616e73 666f726d 65644178 c2 transformedAx │ │ │ │ - 0x00977c70 6973506f 73203d20 28766563 3428615f isPos = (vec4(a_ │ │ │ │ - 0x00977c80 706f7369 74696f6e 2e78792c 20302e30 position.xy, 0.0 │ │ │ │ - 0x00977c90 2c20312e 3029202a 20755f6d 6f64656c , 1.0) * u_model │ │ │ │ - 0x00977ca0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00977cb0 65633420 706f7320 3d207665 63342874 ec4 pos = vec4(t │ │ │ │ - 0x00977cc0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00977cd0 732c2061 5f706f73 6974696f 6e2e7a2c s, a_position.z, │ │ │ │ - 0x00977ce0 20312e30 29202a20 755f7072 6f6a6563 1.0) * u_projec │ │ │ │ - 0x00977cf0 74696f6e 3b200a20 20202076 5f636f6c tion; . v_col │ │ │ │ - 0x00977d00 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ - 0x00977d10 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x00977d20 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00977d30 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00977d40 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ - 0x00977d50 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ - 0x00977d60 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x00977d70 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00977d80 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00977d90 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00977da0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00977db0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00977dc0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00977dd0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00977de0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00977df0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00977e00 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00977e10 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00977e20 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00977e30 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00977e40 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00977e50 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00977e60 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00977e70 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00977e80 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00977e90 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00977ea0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00977eb0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00977ec0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00977ed0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00977ee0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00977ef0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00977f00 65633420 765f636f 6c6f723b 200a2020 ec4 v_color; . │ │ │ │ - 0x00977f10 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ - 0x00977f20 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ - 0x00977f30 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ - 0x00977f40 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ - 0x00977f50 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ - 0x00977f60 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x00977f70 666f726d 20766563 3420755f 70617261 form vec4 u_para │ │ │ │ - 0x00977f80 6d733b20 0a202075 6e69666f 726d2066 ms; . uniform f │ │ │ │ - 0x00977f90 6c6f6174 20755f6c 696e6548 616c6657 loat u_lineHalfW │ │ │ │ - 0x00977fa0 69647468 3b200a20 20756e69 666f726d idth; . uniform │ │ │ │ - 0x00977fb0 20666c6f 61742075 5f6d6178 52616469 float u_maxRadi │ │ │ │ - 0x00977fc0 75733b20 0a202063 6f6e7374 20666c6f us; . const flo │ │ │ │ - 0x00977fd0 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ - 0x00977fe0 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ - 0x00977ff0 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ - 0x00978000 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x00978010 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x00978020 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x00978030 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ - 0x00978040 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ - 0x00978050 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00978060 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ - 0x00978070 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ - 0x00978080 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ - 0x00978090 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009780a0 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ - 0x009780b0 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ - 0x009780c0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x009780d0 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ - 0x009780e0 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ - 0x009780f0 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ - 0x00978100 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00978110 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ - 0x00978120 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00978130 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00978140 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ - 0x00978150 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ - 0x00978160 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00978170 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ - 0x00978180 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ - 0x00978190 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ - 0x009781a0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x009781b0 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ - 0x009781c0 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ - 0x009781d0 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ - 0x009781e0 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ - 0x009781f0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00978200 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00978210 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00978220 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ - 0x00978230 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ - 0x00978240 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ - 0x00978250 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ - 0x00978260 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ - 0x00978270 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ - 0x00978280 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x00978290 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ - 0x009782a0 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ - 0x009782b0 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ - 0x009782c0 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ - 0x009782d0 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ - 0x009782e0 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ - 0x009782f0 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ - 0x00978300 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ - 0x00978310 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00978320 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ - 0x00978330 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ - 0x00978340 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ - 0x00978350 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ - 0x00978360 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ - 0x00978370 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ - 0x00978380 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ - 0x00978390 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ - 0x009783a0 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ - 0x009783b0 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ - 0x009783c0 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ - 0x009783d0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x009783e0 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ - 0x009783f0 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ - 0x00978400 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ - 0x00978410 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ - 0x00978420 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ - 0x00978430 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ - 0x00978440 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ - 0x00978450 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ - 0x00978460 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ - 0x00978470 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ - 0x00978480 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ - 0x00978490 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ - 0x009784a0 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ - 0x009784b0 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ - 0x009784c0 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ - 0x009784d0 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ - 0x009784e0 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ - 0x009784f0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00978500 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ - 0x00978510 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ - 0x00978520 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ - 0x00978530 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00978540 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ - 0x00978550 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ - 0x00978560 7b200a20 20202076 65633220 6e6f726d { . vec2 norm │ │ │ │ - 0x00978570 616c203d 20615f6e 6f726d61 6c2e7879 al = a_normal.xy │ │ │ │ - 0x00978580 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ - 0x00978590 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x009785a0 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ - 0x009785b0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ - 0x009785c0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ - 0x009785d0 793b200a 20202020 69662028 646f7428 y; . if (dot( │ │ │ │ - 0x009785e0 6e6f726d 616c2c20 6e6f726d 616c2920 normal, normal) │ │ │ │ - 0x009785f0 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ - 0x00978600 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ - 0x00978610 3d206e6f 726d616c 202a2075 5f6c696e = normal * u_lin │ │ │ │ - 0x00978620 6548616c 66576964 74683b20 0a202020 eHalfWidth; . │ │ │ │ - 0x00978630 20202074 72616e73 666f726d 65644178 transformedAx │ │ │ │ - 0x00978640 6973506f 73203d20 63616c63 4c696e65 isPos = calcLine │ │ │ │ - 0x00978650 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x00978660 6f732874 72616e73 666f726d 65644178 os(transformedAx │ │ │ │ - 0x00978670 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ - 0x00978680 6e2e7879 202b206e 6f726d2c 200a2020 n.xy + norm, . │ │ │ │ - 0x00978690 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009786a0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009786b0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009786c0 20202020 755f6d6f 64656c56 6965772c u_modelView, │ │ │ │ - 0x009786d0 206c656e 67746828 6e6f726d 29293b20 length(norm)); │ │ │ │ - 0x009786e0 0a202020 207d200a 20202020 765f636f . } . v_co │ │ │ │ - 0x009786f0 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ - 0x00978700 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x00978710 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ - 0x00978720 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x00978730 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ - 0x00978740 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ - 0x00978750 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ - 0x00978760 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00978770 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ - 0x00978780 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ - 0x00978790 20207d20 0a000000 20202023 69666465 } .... #ifde │ │ │ │ - 0x009787a0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009787b0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x009787c0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x009787d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009787e0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x009787f0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00978800 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00978810 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00978820 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00978830 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00978840 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00978850 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00978860 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00978870 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00978880 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00978890 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009788a0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009788b0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009788c0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x009788d0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x009788e0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x009788f0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00978900 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x00978910 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ - 0x00978920 0a20206f 75742076 65633320 765f7261 . out vec3 v_ra │ │ │ │ - 0x00978930 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ - 0x00978940 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ - 0x00978950 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ - 0x00978960 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ - 0x00978970 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ - 0x00978980 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00978990 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ - 0x009789a0 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ - 0x009789b0 726d2076 65633420 755f7061 72616d73 rm vec4 u_params │ │ │ │ - 0x009789c0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x009789d0 61742075 5f6c696e 6548616c 66576964 at u_lineHalfWid │ │ │ │ - 0x009789e0 74683b20 0a202075 6e69666f 726d2066 th; . uniform f │ │ │ │ - 0x009789f0 6c6f6174 20755f6d 61785261 64697573 loat u_maxRadius │ │ │ │ - 0x00978a00 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00978a10 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00978a20 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00978a30 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00978a40 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00978a50 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00978a60 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00978a70 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00978a80 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00978a90 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00978aa0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x00978ab0 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x00978ac0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x00978ad0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00978ae0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x00978af0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00978b00 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00978b10 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00978b20 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00978b30 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00978b40 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00978b50 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00978b60 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00978b70 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00978b80 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x00978b90 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x00978ba0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00978bb0 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x00978bc0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x00978bd0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x00978be0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00978bf0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x00978c00 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x00978c10 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x00978c20 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00978c30 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00978c40 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00978c50 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00978c60 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00978c70 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00978c80 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x00978c90 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x00978ca0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x00978cb0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00978cc0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00978cd0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x00978ce0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x00978cf0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x00978d00 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x00978d10 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x00978d20 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x00978d30 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x00978d40 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x00978d50 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00978d60 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x00978d70 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x00978d80 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x00978d90 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x00978da0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x00978db0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00978dc0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x00978dd0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x00978de0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x00978df0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x00978e00 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x00978e10 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x00978e20 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x00978e30 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x00978e40 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x00978e50 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x00978e60 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x00978e70 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x00978e80 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x00978e90 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x00978ea0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x00978eb0 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x00978ec0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x00978ed0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x00978ee0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x00978ef0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x00978f00 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x00978f10 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x00978f20 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x00978f30 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00978f40 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x00978f50 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x00978f60 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x00978f70 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00978f80 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x00978f90 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x00978fa0 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ - 0x00978fb0 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ - 0x00978fc0 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x00978fd0 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x00978fe0 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x00978ff0 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x00979000 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x00979010 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x00979020 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ - 0x00979030 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x00979040 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ - 0x00979050 6e6f726d 616c202a 20755f6c 696e6548 normal * u_lineH │ │ │ │ - 0x00979060 616c6657 69647468 3b200a20 20202020 alfWidth; . │ │ │ │ - 0x00979070 20747261 6e73666f 726d6564 41786973 transformedAxis │ │ │ │ - 0x00979080 506f7320 3d206361 6c634c69 6e655472 Pos = calcLineTr │ │ │ │ - 0x00979090 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x009790a0 28747261 6e73666f 726d6564 41786973 (transformedAxis │ │ │ │ - 0x009790b0 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ - 0x009790c0 7879202b 206e6f72 6d2c200a 20202020 xy + norm, . │ │ │ │ - 0x009790d0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009790e0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009790f0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00979100 2020755f 6d6f6465 6c566965 772c206c u_modelView, l │ │ │ │ - 0x00979110 656e6774 68286e6f 726d2929 3b200a20 ength(norm)); . │ │ │ │ - 0x00979120 2020207d 200a2020 20207472 616e7366 } . transf │ │ │ │ - 0x00979130 6f726d65 64417869 73506f73 202b3d20 ormedAxisPos += │ │ │ │ - 0x00979140 615f6e6f 726d616c 2e7a7720 2a20755f a_normal.zw * u_ │ │ │ │ - 0x00979150 6c696e65 48616c66 57696474 683b200a lineHalfWidth; . │ │ │ │ - 0x00979160 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x00979170 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ - 0x00979180 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x00979190 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ - 0x009791a0 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ - 0x009791b0 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ - 0x009791c0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x009791d0 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ - 0x009791e0 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ - 0x009791f0 20202020 765f636f 6c6f7220 3d20615f v_color = a_ │ │ │ │ - 0x00979200 636f6c6f 723b200a 20202020 765f7261 color; . v_ra │ │ │ │ - 0x00979210 64697573 203d2076 65633328 615f6e6f dius = vec3(a_no │ │ │ │ - 0x00979220 726d616c 2e7a772c 20755f6d 61785261 rmal.zw, u_maxRa │ │ │ │ - 0x00979230 64697573 29202a20 755f6c69 6e654861 dius) * u_lineHa │ │ │ │ - 0x00979240 6c665769 6474683b 200a2020 7d200a00 lfWidth; . } .. │ │ │ │ - 0x00979250 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00979260 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00979270 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00979280 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00979290 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009792a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009792b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009792c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009792d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009792e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009792f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00979300 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00979310 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00979320 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00979330 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00979340 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00979350 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00979360 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00979370 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00979380 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00979390 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009793a0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x009793b0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x009793c0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x009793d0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x009793e0 65633420 765f6f66 66736574 733b200a ec4 v_offsets; . │ │ │ │ - 0x009793f0 20206f75 74207665 63342076 5f636f6c out vec4 v_col │ │ │ │ - 0x00979400 6f723b20 0a202075 6e69666f 726d206d or; . uniform m │ │ │ │ - 0x00979410 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ - 0x00979420 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00979430 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00979440 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00979450 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ - 0x00979460 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00979470 20755f70 6172616d 733b200a 2020756e u_params; . un │ │ │ │ - 0x00979480 69666f72 6d20666c 6f617420 755f6c69 iform float u_li │ │ │ │ - 0x00979490 6e654861 6c665769 6474683b 200a2020 neHalfWidth; . │ │ │ │ - 0x009794a0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x009794b0 6d617852 61646975 733b200a 2020636f maxRadius; . co │ │ │ │ - 0x009794c0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x009794d0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x009794e0 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x009794f0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00979500 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00979510 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00979520 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00979530 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x00979540 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00979550 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x00979560 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x00979570 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x00979580 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00979590 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x009795a0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x009795b0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x009795c0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x009795d0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x009795e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x009795f0 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x00979600 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x00979610 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00979620 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x00979630 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x00979640 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x00979650 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00979660 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x00979670 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x00979680 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x00979690 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x009796a0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x009796b0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x009796c0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x009796d0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x009796e0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x009796f0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00979700 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00979710 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00979720 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x00979730 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x00979740 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x00979750 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x00979760 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00979770 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x00979780 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x00979790 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x009797a0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x009797b0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x009797c0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x009797d0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x009797e0 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x009797f0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00979800 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00979810 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x00979820 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x00979830 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x00979840 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x00979850 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x00979860 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x00979870 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00979880 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x00979890 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x009798a0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x009798b0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x009798c0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x009798d0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x009798e0 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x009798f0 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x00979900 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x00979910 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x00979920 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x00979930 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x00979940 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x00979950 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x00979960 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x00979970 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x00979980 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x00979990 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x009799a0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x009799b0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x009799c0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x009799d0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x009799e0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x009799f0 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x00979a00 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x00979a10 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x00979a20 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00979a30 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00979a40 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x00979a50 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ - 0x00979a60 63342070 6f73203d 20766563 3428615f c4 pos = vec4(a_ │ │ │ │ - 0x00979a70 706f7369 74696f6e 2e78792c 20302c20 position.xy, 0, │ │ │ │ - 0x00979a80 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ - 0x00979a90 3b200a20 20202076 65633220 6e6f726d ; . vec2 norm │ │ │ │ - 0x00979aa0 616c203d 20766563 3228615f 6e6f726d al = vec2(a_norm │ │ │ │ - 0x00979ab0 616c2e78 202a2075 5f706172 616d732e al.x * u_params. │ │ │ │ - 0x00979ac0 78202d20 615f6e6f 726d616c 2e79202a x - a_normal.y * │ │ │ │ - 0x00979ad0 20755f70 6172616d 732e792c 200a2020 u_params.y, . │ │ │ │ - 0x00979ae0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00979af0 20202020 20615f6e 6f726d61 6c2e7820 a_normal.x │ │ │ │ - 0x00979b00 2a20755f 70617261 6d732e79 202b2061 * u_params.y + a │ │ │ │ - 0x00979b10 5f6e6f72 6d616c2e 79202a20 755f7061 _normal.y * u_pa │ │ │ │ - 0x00979b20 72616d73 2e78293b 200a2020 20207665 rams.x); . ve │ │ │ │ - 0x00979b30 63322073 68696674 6564506f 73203d20 c2 shiftedPos = │ │ │ │ - 0x00979b40 6e6f726d 616c202a 20755f70 6172616d normal * u_param │ │ │ │ - 0x00979b50 732e7a20 2b20706f 732e7879 3b200a20 s.z + pos.xy; . │ │ │ │ - 0x00979b60 20202070 6f73203d 20766563 34287368 pos = vec4(sh │ │ │ │ - 0x00979b70 69667465 64506f73 2c20615f 706f7369 iftedPos, a_posi │ │ │ │ - 0x00979b80 74696f6e 2e7a2c20 312e3029 202a2075 tion.z, 1.0) * u │ │ │ │ - 0x00979b90 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x00979ba0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00979bb0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x00979bc0 6f726d28 706f732c 20755f70 69766f74 orm(pos, u_pivot │ │ │ │ - 0x00979bd0 5472616e 73666f72 6d2c2030 2e30293b Transform, 0.0); │ │ │ │ - 0x00979be0 200a2020 20207665 6332206f 66667365 . vec2 offse │ │ │ │ - 0x00979bf0 7473203d 20616273 28615f6e 6f726d61 ts = abs(a_norma │ │ │ │ - 0x00979c00 6c2e7a77 293b200a 20202020 765f6f66 l.zw); . v_of │ │ │ │ - 0x00979c10 66736574 73203d20 76656334 28615f6e fsets = vec4(a_n │ │ │ │ - 0x00979c20 6f726d61 6c2e7a77 2c206f66 66736574 ormal.zw, offset │ │ │ │ - 0x00979c30 73202d20 312e3029 3b200a20 20202076 s - 1.0); . v │ │ │ │ - 0x00979c40 5f636f6c 6f72203d 20615f63 6f6c6f72 _color = a_color │ │ │ │ - 0x00979c50 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x00979c60 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00979c70 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00979c80 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00979c90 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00979ca0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00979cb0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00979cc0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00979cd0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00979ce0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00979cf0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00979d00 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00979d10 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00979d20 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00979d30 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00979d40 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00979d50 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00979d60 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00979d70 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00979d80 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00979d90 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00979da0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00979db0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00979dc0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00979dd0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ - 0x00979de0 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ - 0x00979df0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x00979e00 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x00979e10 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ - 0x00979e20 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ - 0x00979e30 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ - 0x00979e40 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00979e50 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00979e60 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00979e70 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00979e80 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00979e90 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00979ea0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00979eb0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00979ec0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00979ed0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00979ee0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00979ef0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00979f00 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00979f10 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00979f20 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00979f30 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00979f40 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00979f50 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00979f60 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00979f70 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00979f80 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00979f90 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00979fa0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00979fb0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00979fc0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00979fd0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00979fe0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00979ff0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x0097a000 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0097a010 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x0097a020 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0097a030 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0097a040 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0097a050 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x0097a060 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097a070 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x0097a080 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x0097a090 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0097a0a0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097a0b0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x0097a0c0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x0097a0d0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0097a0e0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x0097a0f0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x0097a100 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0097a110 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x0097a120 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x0097a130 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097a140 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x0097a150 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x0097a160 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x0097a170 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x0097a180 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x0097a190 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x0097a1a0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x0097a1b0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x0097a1c0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x0097a1d0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x0097a1e0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0097a1f0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x0097a200 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x0097a210 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x0097a220 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x0097a230 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x0097a240 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0097a250 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x0097a260 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x0097a270 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x0097a280 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x0097a290 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x0097a2a0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x0097a2b0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x0097a2c0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x0097a2d0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x0097a2e0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x0097a2f0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x0097a300 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x0097a310 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x0097a320 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x0097a330 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x0097a340 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x0097a350 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x0097a360 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x0097a370 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x0097a380 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x0097a390 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x0097a3a0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x0097a3b0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x0097a3c0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x0097a3d0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x0097a3e0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x0097a3f0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x0097a400 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x0097a410 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x0097a420 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x0097a430 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x0097a440 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x0097a450 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x0097a460 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x0097a470 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x0097a480 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x0097a490 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x0097a4a0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x0097a4b0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x0097a4c0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x0097a4d0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x0097a4e0 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ - 0x0097a4f0 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ - 0x0097a500 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ - 0x0097a510 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ - 0x0097a520 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ - 0x0097a530 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ - 0x0097a540 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ - 0x0097a550 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ - 0x0097a560 203d2076 65633428 615f706f 73697469 = vec4(a_positi │ │ │ │ - 0x0097a570 6f6e2c20 312e3029 202a2075 5f6d6f64 on, 1.0) * u_mod │ │ │ │ - 0x0097a580 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ - 0x0097a590 3420706f 73203d20 76656334 286e6f72 4 pos = vec4(nor │ │ │ │ - 0x0097a5a0 6d616c2c 20302e30 2c20302e 3029202b mal, 0.0, 0.0) + │ │ │ │ - 0x0097a5b0 20703b20 0a202020 20766563 34207072 p; . vec4 pr │ │ │ │ - 0x0097a5c0 6f6a6563 74656450 69766f74 203d2070 ojectedPivot = p │ │ │ │ - 0x0097a5d0 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ - 0x0097a5e0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x0097a5f0 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x0097a600 616e7366 6f726d28 706f7320 2a20755f ansform(pos * u_ │ │ │ │ - 0x0097a610 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x0097a620 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x0097a630 30293b20 0a202020 20666c6f 6174206e 0); . float n │ │ │ │ - 0x0097a640 65775a20 3d207072 6f6a6563 74656450 ewZ = projectedP │ │ │ │ - 0x0097a650 69766f74 2e79202f 2070726f 6a656374 ivot.y / project │ │ │ │ - 0x0097a660 65645069 766f742e 77202a20 302e3520 edPivot.w * 0.5 │ │ │ │ - 0x0097a670 2b20302e 353b200a 20202020 676c5f50 + 0.5; . gl_P │ │ │ │ - 0x0097a680 6f736974 696f6e2e 7a203d20 61627328 osition.z = abs( │ │ │ │ - 0x0097a690 615f6e6f 726d616c 416e6441 6e696d61 a_normalAndAnima │ │ │ │ - 0x0097a6a0 74654f72 5a2e7a29 202a206e 65775a20 teOrZ.z) * newZ │ │ │ │ - 0x0097a6b0 2b202831 2e30202d 20616273 28615f6e + (1.0 - abs(a_n │ │ │ │ - 0x0097a6c0 6f726d61 6c416e64 416e696d 6174654f ormalAndAnimateO │ │ │ │ - 0x0097a6d0 725a2e7a 2929202a 20676c5f 506f7369 rZ.z)) * gl_Posi │ │ │ │ - 0x0097a6e0 74696f6e 2e7a3b20 0a202020 20765f74 tion.z; . v_t │ │ │ │ - 0x0097a6f0 6578436f 6f726473 203d2061 5f746578 exCoords = a_tex │ │ │ │ - 0x0097a700 436f6f72 64733b20 0a202020 20765f6d Coords; . v_m │ │ │ │ - 0x0097a710 61736b43 6f6c6f72 203d2061 5f636f6c askColor = a_col │ │ │ │ - 0x0097a720 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ - 0x0097a730 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0097a740 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0097a750 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0097a760 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0097a770 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0097a780 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0097a790 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097a7a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0097a7b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0097a7c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0097a7d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0097a7e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0097a7f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0097a800 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0097a810 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0097a820 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0097a830 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0097a840 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0097a850 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0097a860 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0097a870 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0097a880 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0097a890 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x0097a8a0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ - 0x0097a8b0 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ - 0x0097a8c0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x0097a8d0 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x0097a8e0 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ - 0x0097a8f0 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ - 0x0097a900 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ - 0x0097a910 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0097a920 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x0097a930 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x0097a940 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x0097a950 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x0097a960 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x0097a970 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x0097a980 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x0097a990 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0097a9a0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x0097a9b0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x0097a9c0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x0097a9d0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x0097a9e0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x0097a9f0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x0097aa00 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x0097aa10 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x0097aa20 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x0097aa30 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x0097aa40 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x0097aa50 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x0097aa60 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0097aa70 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x0097aa80 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0097aa90 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097aaa0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x0097aab0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x0097aac0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x0097aad0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0097aae0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x0097aaf0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0097ab00 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0097ab10 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0097ab20 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x0097ab30 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097ab40 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x0097ab50 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x0097ab60 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0097ab70 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097ab80 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x0097ab90 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x0097aba0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0097abb0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x0097abc0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x0097abd0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0097abe0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x0097abf0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x0097ac00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097ac10 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x0097ac20 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x0097ac30 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x0097ac40 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x0097ac50 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x0097ac60 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x0097ac70 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x0097ac80 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x0097ac90 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x0097aca0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x0097acb0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0097acc0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x0097acd0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x0097ace0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x0097acf0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x0097ad00 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x0097ad10 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0097ad20 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x0097ad30 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x0097ad40 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x0097ad50 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x0097ad60 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x0097ad70 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x0097ad80 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x0097ad90 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x0097ada0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x0097adb0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x0097adc0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x0097add0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x0097ade0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x0097adf0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x0097ae00 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x0097ae10 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x0097ae20 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x0097ae30 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x0097ae40 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x0097ae50 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x0097ae60 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x0097ae70 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x0097ae80 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x0097ae90 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x0097aea0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x0097aeb0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x0097aec0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x0097aed0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x0097aee0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x0097aef0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x0097af00 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x0097af10 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x0097af20 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x0097af30 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x0097af40 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x0097af50 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x0097af60 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x0097af70 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x0097af80 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x0097af90 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x0097afa0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x0097afb0 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ - 0x0097afc0 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ - 0x0097afd0 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ - 0x0097afe0 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ - 0x0097aff0 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ - 0x0097b000 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ - 0x0097b010 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ - 0x0097b020 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ - 0x0097b030 69766f74 203d2076 65633428 615f706f ivot = vec4(a_po │ │ │ │ - 0x0097b040 73697469 6f6e2c20 312e3029 202a2075 sition, 1.0) * u │ │ │ │ - 0x0097b050 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ - 0x0097b060 20766563 34206f66 66736574 203d2076 vec4 offset = v │ │ │ │ - 0x0097b070 65633428 6e6f726d 616c2c20 302e302c ec4(normal, 0.0, │ │ │ │ - 0x0097b080 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ - 0x0097b090 74696f6e 3b200a20 20202076 65633420 tion; . vec4 │ │ │ │ - 0x0097b0a0 70726f6a 65637465 64506976 6f74203d projectedPivot = │ │ │ │ - 0x0097b0b0 20706976 6f74202a 20755f70 726f6a65 pivot * u_proje │ │ │ │ - 0x0097b0c0 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ - 0x0097b0d0 6f736974 696f6e20 3d206170 706c7942 osition = applyB │ │ │ │ - 0x0097b0e0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x0097b0f0 6e73666f 726d2870 726f6a65 63746564 nsform(projected │ │ │ │ - 0x0097b100 5069766f 742c2075 5f706976 6f745472 Pivot, u_pivotTr │ │ │ │ - 0x0097b110 616e7366 6f726d2c 20302e30 2c206f66 ansform, 0.0, of │ │ │ │ - 0x0097b120 66736574 2e787929 3b200a20 20202066 fset.xy); . f │ │ │ │ - 0x0097b130 6c6f6174 206e6577 5a203d20 70726f6a loat newZ = proj │ │ │ │ - 0x0097b140 65637465 64506976 6f742e79 202f2070 ectedPivot.y / p │ │ │ │ - 0x0097b150 726f6a65 63746564 5069766f 742e7720 rojectedPivot.w │ │ │ │ - 0x0097b160 2a20302e 35202b20 302e353b 200a2020 * 0.5 + 0.5; . │ │ │ │ - 0x0097b170 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x0097b180 3d206162 7328615f 6e6f726d 616c416e = abs(a_normalAn │ │ │ │ - 0x0097b190 64416e69 6d617465 4f725a2e 7a29202a dAnimateOrZ.z) * │ │ │ │ - 0x0097b1a0 206e6577 5a20202b 2028312e 30202d20 newZ + (1.0 - │ │ │ │ - 0x0097b1b0 61627328 615f6e6f 726d616c 416e6441 abs(a_normalAndA │ │ │ │ - 0x0097b1c0 6e696d61 74654f72 5a2e7a29 29202a20 nimateOrZ.z)) * │ │ │ │ - 0x0097b1d0 676c5f50 6f736974 696f6e2e 7a3b200a gl_Position.z; . │ │ │ │ - 0x0097b1e0 20202020 765f7465 78436f6f 72647320 v_texCoords │ │ │ │ - 0x0097b1f0 3d20615f 74657843 6f6f7264 733b200a = a_texCoords; . │ │ │ │ - 0x0097b200 20202020 765f6d61 736b436f 6c6f7220 v_maskColor │ │ │ │ - 0x0097b210 3d20615f 636f6c6f 723b200a 20207d20 = a_color; . } │ │ │ │ - 0x0097b220 0a000000 00000000 94c8d7ff a2c8d7ff ................ │ │ │ │ + 0x0095e840 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x0095e850 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x0095e860 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x0095e870 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x0095e880 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0095e890 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x0095e8a0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x0095e8b0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x0095e8c0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0095e8d0 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x0095e8e0 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x0095e8f0 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x0095e900 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x0095e910 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x0095e920 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x0095e930 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x0095e940 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x0095e950 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x0095e960 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x0095e970 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x0095e980 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x0095e990 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x0095e9a0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x0095e9b0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x0095e9c0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x0095e9d0 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x0095e9e0 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x0095e9f0 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x0095ea00 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x0095ea10 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x0095ea20 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x0095ea30 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x0095ea40 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x0095ea50 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x0095ea60 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x0095ea70 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x0095ea80 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x0095ea90 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x0095eaa0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x0095eab0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x0095eac0 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x0095ead0 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x0095eae0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x0095eaf0 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x0095eb00 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x0095eb10 20207b20 0a202020 20766563 32206e6f { . vec2 no │ │ │ │ + 0x0095eb20 726d616c 203d2061 5f6e6f72 6d616c2e rmal = a_normal. │ │ │ │ + 0x0095eb30 78793b20 0a202020 20766563 32207472 xy; . vec2 tr │ │ │ │ + 0x0095eb40 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x0095eb50 203d2028 76656334 28615f70 6f736974 = (vec4(a_posit │ │ │ │ + 0x0095eb60 696f6e2e 78792c20 302e302c 20312e30 ion.xy, 0.0, 1.0 │ │ │ │ + 0x0095eb70 29202a20 755f6d6f 64656c56 69657729 ) * u_modelView) │ │ │ │ + 0x0095eb80 2e78793b 200a2020 2020696e 7420696e .xy; . int in │ │ │ │ + 0x0095eb90 64657820 3d20696e 7428615f 706f7369 dex = int(a_posi │ │ │ │ + 0x0095eba0 74696f6e 2e77293b 200a2020 2020666c tion.w); . fl │ │ │ │ + 0x0095ebb0 6f617420 6c656674 53697a65 203d2075 oat leftSize = u │ │ │ │ + 0x0095ebc0 5f6c6967 68744172 726f7743 6f6c6f72 _lightArrowColor │ │ │ │ + 0x0095ebd0 5b696e64 65785d3b 200a2020 2020666c [index]; . fl │ │ │ │ + 0x0095ebe0 6f617420 72696768 7453697a 65203d20 oat rightSize = │ │ │ │ + 0x0095ebf0 755f6461 726b4172 726f7743 6f6c6f72 u_darkArrowColor │ │ │ │ + 0x0095ec00 5b696e64 65785d3b 200a2020 20206966 [index]; . if │ │ │ │ + 0x0095ec10 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ + 0x0095ec20 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ + 0x0095ec30 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ + 0x0095ec40 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ + 0x0095ec50 20302e35 202a2028 72696768 7453697a 0.5 * (rightSiz │ │ │ │ + 0x0095ec60 65202d20 6c656674 53697a65 293b200a e - leftSize); . │ │ │ │ + 0x0095ec70 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ + 0x0095ec80 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ + 0x0095ec90 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x0095eca0 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ + 0x0095ecb0 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ + 0x0095ecc0 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ + 0x0095ecd0 0a202020 20202020 20202020 20202020 . │ │ │ │ + 0x0095ece0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095ecf0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095ed00 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ + 0x0095ed10 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ + 0x0095ed20 293b200a 20202020 7d200a20 20202076 ); . } . v │ │ │ │ + 0x0095ed30 5f726164 69757320 3d207665 63332861 _radius = vec3(a │ │ │ │ + 0x0095ed40 5f6e6f72 6d616c2e 7a772c20 312e3029 _normal.zw, 1.0) │ │ │ │ + 0x0095ed50 202a2030 2e35202a 20286c65 66745369 * 0.5 * (leftSi │ │ │ │ + 0x0095ed60 7a65202b 20726967 68745369 7a65293b ze + rightSize); │ │ │ │ + 0x0095ed70 200a2020 20207665 63322066 696e616c . vec2 final │ │ │ │ + 0x0095ed80 506f7320 3d207472 616e7366 6f726d65 Pos = transforme │ │ │ │ + 0x0095ed90 64417869 73506f73 202b2076 5f726164 dAxisPos + v_rad │ │ │ │ + 0x0095eda0 6975732e 78793b20 0a202020 20765f63 ius.xy; . v_c │ │ │ │ + 0x0095edb0 6f6c6f72 54657843 6f6f7264 203d2061 olorTexCoord = a │ │ │ │ + 0x0095edc0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x0095edd0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x0095ede0 76656334 2866696e 616c506f 732c2061 vec4(finalPos, a │ │ │ │ + 0x0095edf0 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ + 0x0095ee00 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ + 0x0095ee10 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x0095ee20 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ + 0x0095ee30 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ + 0x0095ee40 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0095ee50 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ + 0x0095ee60 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0095ee70 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0095ee80 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0095ee90 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0095eea0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0095eeb0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0095eec0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095eed0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0095eee0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0095eef0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0095ef00 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0095ef10 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0095ef20 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0095ef30 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0095ef40 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0095ef50 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0095ef60 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0095ef70 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0095ef80 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0095ef90 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0095efa0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0095efb0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x0095efc0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x0095efd0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x0095efe0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x0095eff0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x0095f000 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x0095f010 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x0095f020 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x0095f030 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x0095f040 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x0095f050 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x0095f060 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x0095f070 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x0095f080 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x0095f090 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0095f0a0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x0095f0b0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x0095f0c0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x0095f0d0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x0095f0e0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x0095f0f0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x0095f100 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x0095f110 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x0095f120 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x0095f130 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x0095f140 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x0095f150 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x0095f160 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0095f170 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x0095f180 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x0095f190 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095f1a0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x0095f1b0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x0095f1c0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x0095f1d0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0095f1e0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x0095f1f0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0095f200 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0095f210 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x0095f220 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x0095f230 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095f240 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x0095f250 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x0095f260 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x0095f270 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095f280 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x0095f290 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x0095f2a0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0095f2b0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x0095f2c0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x0095f2d0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0095f2e0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x0095f2f0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x0095f300 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095f310 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x0095f320 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x0095f330 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x0095f340 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x0095f350 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x0095f360 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x0095f370 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x0095f380 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x0095f390 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x0095f3a0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x0095f3b0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0095f3c0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x0095f3d0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x0095f3e0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x0095f3f0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x0095f400 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x0095f410 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0095f420 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x0095f430 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x0095f440 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x0095f450 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x0095f460 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x0095f470 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x0095f480 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x0095f490 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x0095f4a0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x0095f4b0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x0095f4c0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x0095f4d0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x0095f4e0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x0095f4f0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x0095f500 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x0095f510 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x0095f520 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x0095f530 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x0095f540 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x0095f550 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x0095f560 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x0095f570 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x0095f580 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x0095f590 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x0095f5a0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x0095f5b0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x0095f5c0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x0095f5d0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x0095f5e0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x0095f5f0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x0095f600 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x0095f610 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x0095f620 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x0095f630 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x0095f640 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x0095f650 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x0095f660 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x0095f670 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x0095f680 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x0095f690 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x0095f6a0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x0095f6b0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ + 0x0095f6c0 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ + 0x0095f6d0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0095f6e0 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ + 0x0095f6f0 73203d20 76656334 28615f6e 6f726d61 s = vec4(a_norma │ │ │ │ + 0x0095f700 6c2c2030 2c203029 202b2070 6f733b20 l, 0, 0) + pos; │ │ │ │ + 0x0095f710 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x0095f720 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ + 0x0095f730 6e73666f 726d2873 68696674 6564506f nsform(shiftedPo │ │ │ │ + 0x0095f740 73202a20 755f7072 6f6a6563 74696f6e s * u_projection │ │ │ │ + 0x0095f750 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x0095f760 726d2c20 302e3029 3b200a20 20202076 rm, 0.0); . v │ │ │ │ + 0x0095f770 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ + 0x0095f780 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ + 0x0095f790 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ + 0x0095f7a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0095f7b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0095f7c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0095f7d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0095f7e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0095f7f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0095f800 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095f810 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0095f820 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0095f830 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0095f840 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0095f850 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0095f860 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0095f870 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0095f880 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0095f890 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0095f8a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0095f8b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0095f8c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0095f8d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0095f8e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0095f8f0 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ + 0x0095f900 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x0095f910 72546578 436f6f72 64733b20 0a20206f rTexCoords; . o │ │ │ │ + 0x0095f920 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ + 0x0095f930 6578436f 6f726473 3b200a20 20756e69 exCoords; . uni │ │ │ │ + 0x0095f940 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x0095f950 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x0095f960 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x0095f970 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x0095f980 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x0095f990 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x0095f9a0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ + 0x0095f9b0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0095f9c0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ + 0x0095f9d0 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ + 0x0095f9e0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x0095f9f0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x0095fa00 20755f6c 656e6774 683b200a 2020636f u_length; . co │ │ │ │ + 0x0095fa10 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x0095fa20 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x0095fa30 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x0095fa40 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0095fa50 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0095fa60 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0095fa70 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0095fa80 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x0095fa90 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0095faa0 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x0095fab0 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x0095fac0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x0095fad0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0095fae0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x0095faf0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0095fb00 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0095fb10 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x0095fb20 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x0095fb30 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0095fb40 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x0095fb50 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x0095fb60 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0095fb70 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x0095fb80 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x0095fb90 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x0095fba0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0095fbb0 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x0095fbc0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x0095fbd0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x0095fbe0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x0095fbf0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0095fc00 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x0095fc10 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x0095fc20 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x0095fc30 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x0095fc40 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x0095fc50 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0095fc60 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x0095fc70 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x0095fc80 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x0095fc90 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x0095fca0 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x0095fcb0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x0095fcc0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x0095fcd0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x0095fce0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0095fcf0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x0095fd00 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x0095fd10 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0095fd20 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x0095fd30 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x0095fd40 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x0095fd50 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x0095fd60 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x0095fd70 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x0095fd80 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x0095fd90 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x0095fda0 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x0095fdb0 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x0095fdc0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0095fdd0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x0095fde0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x0095fdf0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x0095fe00 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x0095fe10 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x0095fe20 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x0095fe30 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x0095fe40 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x0095fe50 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x0095fe60 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x0095fe70 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x0095fe80 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x0095fe90 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x0095fea0 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x0095feb0 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x0095fec0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x0095fed0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x0095fee0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x0095fef0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x0095ff00 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0095ff10 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x0095ff20 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x0095ff30 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0095ff40 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x0095ff50 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x0095ff60 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x0095ff70 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0095ff80 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0095ff90 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x0095ffa0 6e282920 0a20207b 200a2020 2020676c n() . { . gl │ │ │ │ + 0x0095ffb0 5f506f73 6974696f 6e203d20 76656334 _Position = vec4 │ │ │ │ + 0x0095ffc0 28615f70 6f736974 696f6e2c 20302c20 (a_position, 0, │ │ │ │ + 0x0095ffd0 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ + 0x0095ffe0 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ + 0x0095fff0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00960000 4e200a20 20202067 6c5f506f 73697469 N . gl_Positi │ │ │ │ + 0x00960010 6f6e2e79 203d202d 676c5f50 6f736974 on.y = -gl_Posit │ │ │ │ + 0x00960020 696f6e2e 793b200a 20202020 676c5f50 ion.y; . gl_P │ │ │ │ + 0x00960030 6f736974 696f6e2e 7a203d20 28676c5f osition.z = (gl_ │ │ │ │ + 0x00960040 506f7369 74696f6e 2e7a2020 2b20676c Position.z + gl │ │ │ │ + 0x00960050 5f506f73 6974696f 6e2e7729 202a2030 _Position.w) * 0 │ │ │ │ + 0x00960060 2e353b20 0a202023 656e6469 66200a20 .5; . #endif . │ │ │ │ + 0x00960070 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00960080 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ + 0x00960090 436f6f72 64733b20 0a20207d 200a0000 Coords; . } ... │ │ │ │ + 0x009600a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009600b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009600c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009600d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009600e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009600f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00960100 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00960110 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00960120 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00960130 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00960140 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00960150 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00960160 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00960170 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00960180 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00960190 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009601a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009601b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009601c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009601d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009601e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009601f0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00960200 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00960210 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00960220 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x00960230 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x00960240 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ + 0x00960250 6f757420 76656332 20765f6d 61736b54 out vec2 v_maskT │ │ │ │ + 0x00960260 6578436f 6f72643b 200a2020 6f757420 exCoord; . out │ │ │ │ + 0x00960270 666c6f61 7420765f 68616c66 4c656e67 float v_halfLeng │ │ │ │ + 0x00960280 74683b20 0a202075 6e69666f 726d206d th; . uniform m │ │ │ │ + 0x00960290 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x009602a0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x009602b0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x009602c0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x009602d0 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x009602e0 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x009602f0 20755f74 72616666 69635061 72616d73 u_trafficParams │ │ │ │ + 0x00960300 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00960310 3420755f 6f75746c 696e6543 6f6c6f72 4 u_outlineColor │ │ │ │ + 0x00960320 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00960330 3420755f 6c696768 74417272 6f77436f 4 u_lightArrowCo │ │ │ │ + 0x00960340 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x00960350 76656334 20755f64 61726b41 72726f77 vec4 u_darkArrow │ │ │ │ + 0x00960360 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x00960370 6d20666c 6f617420 755f6f75 746c696e m float u_outlin │ │ │ │ + 0x00960380 653b200a 2020756e 69666f72 6d20666c e; . uniform fl │ │ │ │ + 0x00960390 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ + 0x009603a0 2020636f 6e737420 666c6f61 74206b41 const float kA │ │ │ │ + 0x009603b0 72726f77 5653697a 65203d20 302e3235 rrowVSize = 0.25 │ │ │ │ + 0x009603c0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x009603d0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x009603e0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x009603f0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00960400 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00960410 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00960420 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00960430 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x00960440 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00960450 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00960460 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x00960470 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x00960480 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x00960490 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x009604a0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x009604b0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x009604c0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x009604d0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x009604e0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x009604f0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x00960500 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00960510 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x00960520 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x00960530 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00960540 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x00960550 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x00960560 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00960570 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x00960580 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x00960590 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x009605a0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x009605b0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x009605c0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x009605d0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x009605e0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x009605f0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00960600 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00960610 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00960620 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x00960630 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x00960640 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x00960650 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x00960660 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x00960670 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00960680 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00960690 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x009606a0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x009606b0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x009606c0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x009606d0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x009606e0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x009606f0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00960700 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x00960710 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00960720 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x00960730 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x00960740 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x00960750 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x00960760 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x00960770 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00960780 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x00960790 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x009607a0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x009607b0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x009607c0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x009607d0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x009607e0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x009607f0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x00960800 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x00960810 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x00960820 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x00960830 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x00960840 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x00960850 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x00960860 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x00960870 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x00960880 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x00960890 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x009608a0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x009608b0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x009608c0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x009608d0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x009608e0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x009608f0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00960900 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x00960910 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x00960920 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x00960930 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00960940 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x00960950 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x00960960 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ + 0x00960970 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ + 0x00960980 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ + 0x00960990 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ + 0x009609a0 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x009609b0 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ + 0x009609c0 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ + 0x009609d0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ + 0x009609e0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ + 0x009609f0 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ + 0x00960a00 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ + 0x00960a10 6e6f726d 616c202a 20755f74 72616666 normal * u_traff │ │ │ │ + 0x00960a20 69635061 72616d73 2e783b20 0a202020 icParams.x; . │ │ │ │ + 0x00960a30 20202069 66202861 5f6e6f72 6d616c2e if (a_normal. │ │ │ │ + 0x00960a40 7a203c20 302e3029 200a2020 20202020 z < 0.0) . │ │ │ │ + 0x00960a50 20206e6f 726d203d 206e6f72 6d616c20 norm = normal │ │ │ │ + 0x00960a60 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ + 0x00960a70 732e793b 200a2020 20202020 7472616e s.y; . tran │ │ │ │ + 0x00960a80 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x00960a90 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00960aa0 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ + 0x00960ab0 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x00960ac0 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ + 0x00960ad0 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ + 0x00960ae0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00960af0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00960b00 20202020 20202020 20202020 20755f6d u_m │ │ │ │ + 0x00960b10 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ + 0x00960b20 286e6f72 6d29293b 200a2020 20207d20 (norm)); . } │ │ │ │ + 0x00960b30 0a202020 20666c6f 61742075 4f666673 . float uOffs │ │ │ │ + 0x00960b40 6574203d 206c656e 67746828 76656334 et = length(vec4 │ │ │ │ + 0x00960b50 286b5368 61706543 6f6f7264 5363616c (kShapeCoordScal │ │ │ │ + 0x00960b60 61722c20 302c2030 2c203029 202a2075 ar, 0, 0, 0) * u │ │ │ │ + 0x00960b70 5f6d6f64 656c5669 65772920 2a20615f _modelView) * a_ │ │ │ │ + 0x00960b80 6e6f726d 616c2e77 3b200a20 20202076 normal.w; . v │ │ │ │ + 0x00960b90 5f636f6c 6f725465 78436f6f 7264203d _colorTexCoord = │ │ │ │ + 0x00960ba0 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ + 0x00960bb0 2e78793b 200a2020 2020666c 6f617420 .xy; . float │ │ │ │ + 0x00960bc0 76203d20 6d697828 615f636f 6c6f7254 v = mix(a_colorT │ │ │ │ + 0x00960bd0 6578436f 6f72642e 7a2c2061 5f636f6c exCoord.z, a_col │ │ │ │ + 0x00960be0 6f725465 78436f6f 72642e7a 202b206b orTexCoord.z + k │ │ │ │ + 0x00960bf0 4172726f 77565369 7a652c20 302e3520 ArrowVSize, 0.5 │ │ │ │ + 0x00960c00 2a20615f 6e6f726d 616c2e7a 202b2030 * a_normal.z + 0 │ │ │ │ + 0x00960c10 2e35293b 200a2020 2020765f 6d61736b .5); . v_mask │ │ │ │ + 0x00960c20 54657843 6f6f7264 203d2076 65633228 TexCoord = vec2( │ │ │ │ + 0x00960c30 754f6666 73657420 2a20755f 74726166 uOffset * u_traf │ │ │ │ + 0x00960c40 66696350 6172616d 732e7a2c 20762920 ficParams.z, v) │ │ │ │ + 0x00960c50 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ + 0x00960c60 732e773b 200a2020 2020765f 6d61736b s.w; . v_mask │ │ │ │ + 0x00960c70 54657843 6f6f7264 2e78202a 3d207374 TexCoord.x *= st │ │ │ │ + 0x00960c80 65702861 5f636f6c 6f725465 78436f6f ep(a_colorTexCoo │ │ │ │ + 0x00960c90 72642e77 2c20765f 6d61736b 54657843 rd.w, v_maskTexC │ │ │ │ + 0x00960ca0 6f6f7264 2e78293b 200a2020 2020765f oord.x); . v_ │ │ │ │ + 0x00960cb0 68616c66 4c656e67 7468203d 20615f6e halfLength = a_n │ │ │ │ + 0x00960cc0 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ + 0x00960cd0 63342070 6f73203d 20766563 34287472 c4 pos = vec4(tr │ │ │ │ + 0x00960ce0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00960cf0 2c20615f 706f7369 74696f6e 2e7a2c20 , a_position.z, │ │ │ │ + 0x00960d00 312e3029 202a2075 5f70726f 6a656374 1.0) * u_project │ │ │ │ + 0x00960d10 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ + 0x00960d20 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ + 0x00960d30 6f745472 616e7366 6f726d28 706f732c otTransform(pos, │ │ │ │ + 0x00960d40 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x00960d50 6d2c2030 2e30293b 200a2020 7d200a00 m, 0.0); . } .. │ │ │ │ + 0x00960d60 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00960d70 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00960d80 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00960d90 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00960da0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00960db0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00960dc0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00960dd0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00960de0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00960df0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00960e00 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00960e10 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00960e20 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00960e30 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00960e40 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00960e50 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00960e60 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00960e70 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00960e80 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00960e90 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00960ea0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00960eb0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00960ec0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00960ed0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ + 0x00960ee0 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ + 0x00960ef0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x00960f00 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ + 0x00960f10 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ + 0x00960f20 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ + 0x00960f30 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ + 0x00960f40 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00960f50 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00960f60 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00960f70 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00960f80 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00960f90 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00960fa0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00960fb0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x00960fc0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00960fd0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00960fe0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00960ff0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00961000 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00961010 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00961020 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00961030 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00961040 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00961050 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00961060 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00961070 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00961080 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00961090 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x009610a0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x009610b0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x009610c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009610d0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x009610e0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x009610f0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00961100 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00961110 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00961120 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00961130 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00961140 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00961150 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00961160 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00961170 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00961180 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00961190 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x009611a0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x009611b0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x009611c0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x009611d0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x009611e0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x009611f0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00961200 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00961210 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00961220 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00961230 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00961240 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00961250 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00961260 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00961270 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00961280 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00961290 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x009612a0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x009612b0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x009612c0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x009612d0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x009612e0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x009612f0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00961300 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00961310 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00961320 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00961330 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00961340 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00961350 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00961360 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00961370 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00961380 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00961390 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x009613a0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x009613b0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x009613c0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x009613d0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x009613e0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x009613f0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00961400 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00961410 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00961420 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00961430 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00961440 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00961450 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00961460 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00961470 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00961480 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00961490 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x009614a0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x009614b0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x009614c0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x009614d0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x009614e0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x009614f0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00961500 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00961510 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00961520 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00961530 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00961540 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00961550 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00961560 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00961570 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00961580 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00961590 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x009615a0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x009615b0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x009615c0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x009615d0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x009615e0 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ + 0x009615f0 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ + 0x00961600 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ + 0x00961610 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ + 0x00961620 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ + 0x00961630 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ + 0x00961640 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ + 0x00961650 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ + 0x00961660 203d2076 65633428 615f706f 73697469 = vec4(a_positi │ │ │ │ + 0x00961670 6f6e2c20 312e3029 202a2075 5f6d6f64 on, 1.0) * u_mod │ │ │ │ + 0x00961680 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ + 0x00961690 3420706f 73203d20 76656334 286e6f72 4 pos = vec4(nor │ │ │ │ + 0x009616a0 6d616c2c 20302e30 2c20302e 3029202b mal, 0.0, 0.0) + │ │ │ │ + 0x009616b0 20703b20 0a202020 20766563 34207072 p; . vec4 pr │ │ │ │ + 0x009616c0 6f6a6563 74656450 69766f74 203d2070 ojectedPivot = p │ │ │ │ + 0x009616d0 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ + 0x009616e0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x009616f0 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ + 0x00961700 616e7366 6f726d28 706f7320 2a20755f ansform(pos * u_ │ │ │ │ + 0x00961710 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00961720 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x00961730 30293b20 0a202020 20666c6f 6174206e 0); . float n │ │ │ │ + 0x00961740 65775a20 3d207072 6f6a6563 74656450 ewZ = projectedP │ │ │ │ + 0x00961750 69766f74 2e79202f 2070726f 6a656374 ivot.y / project │ │ │ │ + 0x00961760 65645069 766f742e 77202a20 302e3520 edPivot.w * 0.5 │ │ │ │ + 0x00961770 2b20302e 353b200a 20202020 676c5f50 + 0.5; . gl_P │ │ │ │ + 0x00961780 6f736974 696f6e2e 7a203d20 61627328 osition.z = abs( │ │ │ │ + 0x00961790 615f6e6f 726d616c 416e6441 6e696d61 a_normalAndAnima │ │ │ │ + 0x009617a0 74654f72 5a2e7a29 202a206e 65775a20 teOrZ.z) * newZ │ │ │ │ + 0x009617b0 2b202831 2e30202d 20616273 28615f6e + (1.0 - abs(a_n │ │ │ │ + 0x009617c0 6f726d61 6c416e64 416e696d 6174654f ormalAndAnimateO │ │ │ │ + 0x009617d0 725a2e7a 2929202a 20676c5f 506f7369 rZ.z)) * gl_Posi │ │ │ │ + 0x009617e0 74696f6e 2e7a3b20 0a202020 20765f74 tion.z; . v_t │ │ │ │ + 0x009617f0 6578436f 6f726473 203d2061 5f746578 exCoords = a_tex │ │ │ │ + 0x00961800 436f6f72 64733b20 0a202020 20765f6d Coords; . v_m │ │ │ │ + 0x00961810 61736b43 6f6c6f72 203d2061 5f636f6c askColor = a_col │ │ │ │ + 0x00961820 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ + 0x00961830 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00961840 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00961850 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00961860 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00961870 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00961880 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00961890 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009618a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009618b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x009618c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x009618d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009618e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009618f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00961900 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00961910 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00961920 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00961930 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00961940 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00961950 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00961960 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00961970 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00961980 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00961990 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x009619a0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x009619b0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x009619c0 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ + 0x009619d0 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ + 0x009619e0 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x009619f0 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ + 0x00961a00 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x00961a10 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00961a20 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00961a30 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00961a40 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00961a50 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00961a60 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00961a70 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00961a80 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00961a90 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00961aa0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00961ab0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00961ac0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00961ad0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00961ae0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00961af0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00961b00 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00961b10 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00961b20 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00961b30 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00961b40 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00961b50 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00961b60 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00961b70 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00961b80 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00961b90 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00961ba0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00961bb0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00961bc0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00961bd0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00961be0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00961bf0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00961c00 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00961c10 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00961c20 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00961c30 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00961c40 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00961c50 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00961c60 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00961c70 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00961c80 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00961c90 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00961ca0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00961cb0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00961cc0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00961cd0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00961ce0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00961cf0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00961d00 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00961d10 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00961d20 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00961d30 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00961d40 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00961d50 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00961d60 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00961d70 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00961d80 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00961d90 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00961da0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00961db0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00961dc0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00961dd0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00961de0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00961df0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00961e00 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00961e10 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00961e20 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00961e30 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00961e40 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00961e50 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00961e60 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00961e70 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00961e80 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00961e90 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00961ea0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00961eb0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00961ec0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00961ed0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00961ee0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00961ef0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00961f00 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00961f10 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00961f20 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00961f30 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00961f40 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00961f50 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00961f60 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00961f70 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00961f80 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00961f90 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00961fa0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00961fb0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00961fc0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00961fd0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00961fe0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00961ff0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00962000 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00962010 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00962020 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00962030 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00962040 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00962050 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00962060 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00962070 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00962080 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00962090 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x009620a0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x009620b0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x009620c0 65633428 615f706f 73697469 6f6e2e78 ec4(a_position.x │ │ │ │ + 0x009620d0 797a2c20 3129202a 20755f6d 6f64656c yz, 1) * u_model │ │ │ │ + 0x009620e0 56696577 3b200a20 20202076 65633420 View; . vec4 │ │ │ │ + 0x009620f0 73686966 74656450 6f73203d 20766563 shiftedPos = vec │ │ │ │ + 0x00962100 3428615f 6e6f726d 616c2c20 302c2030 4(a_normal, 0, 0 │ │ │ │ + 0x00962110 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ + 0x00962120 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x00962130 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00962140 73686966 74656450 6f73202a 20755f70 shiftedPos * u_p │ │ │ │ + 0x00962150 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ + 0x00962160 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ + 0x00962170 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ + 0x00962180 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ + 0x00962190 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x009621a0 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ + 0x009621b0 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ + 0x009621c0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ + 0x009621d0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009621e0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009621f0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00962200 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00962210 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00962220 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00962230 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00962240 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00962250 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00962260 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00962270 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00962280 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00962290 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009622a0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009622b0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009622c0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009622d0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009622e0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009622f0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00962300 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00962310 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00962320 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00962330 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00962340 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00962350 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x00962360 0a202069 6e207665 63342061 5f6d6173 . in vec4 a_mas │ │ │ │ + 0x00962370 6b546578 436f6f72 643b200a 20206f75 kTexCoord; . ou │ │ │ │ + 0x00962380 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ + 0x00962390 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ + 0x009623a0 65633220 765f6d61 736b5465 78436f6f ec2 v_maskTexCoo │ │ │ │ + 0x009623b0 72643b20 0a202075 6e69666f 726d206d rd; . uniform m │ │ │ │ + 0x009623c0 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x009623d0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x009623e0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x009623f0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00962400 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x00962410 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x00962420 20755f63 6f6e7472 61737447 616d6d61 u_contrastGamma │ │ │ │ + 0x00962430 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00962440 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ + 0x00962450 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00962460 5f7a5363 616c653b 200a2020 756e6966 _zScale; . unif │ │ │ │ + 0x00962470 6f726d20 666c6f61 7420755f 696e7465 orm float u_inte │ │ │ │ + 0x00962480 72706f6c 6174696f 6e3b200a 2020756e rpolation; . un │ │ │ │ + 0x00962490 69666f72 6d20666c 6f617420 755f6973 iform float u_is │ │ │ │ + 0x009624a0 4f75746c 696e6550 6173733b 200a2020 OutlinePass; . │ │ │ │ + 0x009624b0 636f6e73 7420666c 6f617420 6b536861 const float kSha │ │ │ │ + 0x009624c0 7065436f 6f726453 63616c61 72203d20 peCoordScalar = │ │ │ │ + 0x009624d0 31303030 2e303b20 0a202076 65633420 1000.0; . vec4 │ │ │ │ + 0x009624e0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x009624f0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00962500 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00962510 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00962520 5265616c 5a29200a 20207b20 0a202020 RealZ) . { . │ │ │ │ + 0x00962530 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x00962540 64506976 6f74203d 20706976 6f743b20 dPivot = pivot; │ │ │ │ + 0x00962550 0a202020 20666c6f 61742077 203d2074 . float w = t │ │ │ │ + 0x00962560 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00962570 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00962580 6d656450 69766f74 2e787977 203d2028 medPivot.xyw = ( │ │ │ │ + 0x00962590 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x009625a0 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x009625b0 64506976 6f742e78 792c2070 69766f74 dPivot.xy, pivot │ │ │ │ + 0x009625c0 5265616c 5a2c2077 29292e78 79773b20 RealZ, w)).xyw; │ │ │ │ + 0x009625d0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x009625e0 5069766f 742e7a20 2a3d2074 72616e73 Pivot.z *= trans │ │ │ │ + 0x009625f0 666f726d 65645069 766f742e 77202f20 formedPivot.w / │ │ │ │ + 0x00962600 773b200a 20202369 66646566 2056554c w; . #ifdef VUL │ │ │ │ + 0x00962610 4b414e20 0a202020 20747261 6e73666f KAN . transfo │ │ │ │ + 0x00962620 726d6564 5069766f 742e7920 3d202d74 rmedPivot.y = -t │ │ │ │ + 0x00962630 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00962640 793b200a 20202020 7472616e 73666f72 y; . transfor │ │ │ │ + 0x00962650 6d656450 69766f74 2e7a203d 20287472 medPivot.z = (tr │ │ │ │ + 0x00962660 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00962670 20202b20 7472616e 73666f72 6d656450 + transformedP │ │ │ │ + 0x00962680 69766f74 2e772920 2f20322e 303b200a ivot.w) / 2.0; . │ │ │ │ + 0x00962690 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x009626a0 7475726e 20747261 6e73666f 726d6564 turn transformed │ │ │ │ + 0x009626b0 5069766f 743b200a 20207d20 0a202076 Pivot; . } . v │ │ │ │ + 0x009626c0 65633420 6170706c 7942696c 6c626f61 ec4 applyBillboa │ │ │ │ + 0x009626d0 72645069 766f7454 72616e73 666f726d rdPivotTransform │ │ │ │ + 0x009626e0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x009626f0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00962700 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00962710 6c5a2c20 76656332 206f6666 73657429 lZ, vec2 offset) │ │ │ │ + 0x00962720 200a2020 7b200a20 20202066 6c6f6174 . { . float │ │ │ │ + 0x00962730 206c6f67 69635a20 3d207069 766f742e logicZ = pivot. │ │ │ │ + 0x00962740 7a202f20 7069766f 742e773b 200a2020 z / pivot.w; . │ │ │ │ + 0x00962750 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00962760 65645069 766f7420 3d207069 766f7454 edPivot = pivotT │ │ │ │ + 0x00962770 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x00962780 7069766f 742e7879 2c207069 766f7452 pivot.xy, pivotR │ │ │ │ + 0x00962790 65616c5a 2c207069 766f742e 77293b20 ealZ, pivot.w); │ │ │ │ + 0x009627a0 0a202020 20766563 34207363 616c6520 . vec4 scale │ │ │ │ + 0x009627b0 3d207069 766f7454 72616e73 666f726d = pivotTransform │ │ │ │ + 0x009627c0 202a2076 65633428 312e302c 202d312e * vec4(1.0, -1. │ │ │ │ + 0x009627d0 302c2030 2e302c20 312e3029 3b200a20 0, 0.0, 1.0); . │ │ │ │ + 0x009627e0 20202076 65633420 706f7369 74696f6e vec4 position │ │ │ │ + 0x009627f0 203d2076 65633428 7472616e 73666f72 = vec4(transfor │ │ │ │ + 0x00962800 6d656450 69766f74 2e787920 2f207472 medPivot.xy / tr │ │ │ │ + 0x00962810 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00962820 2c206c6f 6769635a 2c20312e 3029202b , logicZ, 1.0) + │ │ │ │ + 0x00962830 20766563 34286f66 66736574 202f2073 vec4(offset / s │ │ │ │ + 0x00962840 63616c65 2e77202a 20736361 6c652e78 cale.w * scale.x │ │ │ │ + 0x00962850 2c20302e 302c2030 2e30293b 200a2020 , 0.0, 0.0); . │ │ │ │ + 0x00962860 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00962870 20202070 6f736974 696f6e2e 79203d20 position.y = │ │ │ │ + 0x00962880 2d706f73 6974696f 6e2e793b 200a2020 -position.y; . │ │ │ │ + 0x00962890 2020706f 73697469 6f6e2e7a 203d2028 position.z = ( │ │ │ │ + 0x009628a0 706f7369 74696f6e 2e7a2020 2b20706f position.z + po │ │ │ │ + 0x009628b0 73697469 6f6e2e77 29202f20 322e303b sition.w) / 2.0; │ │ │ │ + 0x009628c0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x009628d0 72657475 726e2070 6f736974 696f6e3b return position; │ │ │ │ + 0x009628e0 200a2020 7d200a20 20766563 32206361 . } . vec2 ca │ │ │ │ + 0x009628f0 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ + 0x00962900 64417869 73506f73 28766563 32206f72 dAxisPos(vec2 or │ │ │ │ + 0x00962910 6967696e 616c4178 6973506f 732c2076 iginalAxisPos, v │ │ │ │ + 0x00962920 65633220 73686966 74656450 6f732c20 ec2 shiftedPos, │ │ │ │ + 0x00962930 6d617434 206d6f64 656c5669 65772c20 mat4 modelView, │ │ │ │ + 0x00962940 666c6f61 74206861 6c665769 64746829 float halfWidth) │ │ │ │ + 0x00962950 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x00962960 70203d20 28766563 34287368 69667465 p = (vec4(shifte │ │ │ │ + 0x00962970 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ + 0x00962980 2a206d6f 64656c56 69657729 2e78793b * modelView).xy; │ │ │ │ + 0x00962990 200a2020 20207665 63322064 203d2070 . vec2 d = p │ │ │ │ + 0x009629a0 202d206f 72696769 6e616c41 78697350 - originalAxisP │ │ │ │ + 0x009629b0 6f733b20 0a202020 20696620 28646f74 os; . if (dot │ │ │ │ + 0x009629c0 28642c20 64292021 3d20302e 3029200a (d, d) != 0.0) . │ │ │ │ + 0x009629d0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x009629e0 67696e61 6c417869 73506f73 202b206e ginalAxisPos + n │ │ │ │ + 0x009629f0 6f726d61 6c697a65 28642920 2a206861 ormalize(d) * ha │ │ │ │ + 0x00962a00 6c665769 6474683b 200a2020 2020656c lfWidth; . el │ │ │ │ + 0x00962a10 7365200a 20202020 20207265 7475726e se . return │ │ │ │ + 0x00962a20 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00962a30 3b200a20 207d200a 2020766f 6964206d ; . } . void m │ │ │ │ + 0x00962a40 61696e28 29200a20 207b200a 20202020 ain() . { . │ │ │ │ + 0x00962a50 76656332 206e6f72 6d616c20 3d20615f vec2 normal = a_ │ │ │ │ + 0x00962a60 6e6f726d 616c2e78 793b200a 20202020 normal.xy; . │ │ │ │ + 0x00962a70 666c6f61 74206861 6c665769 64746820 float halfWidth │ │ │ │ + 0x00962a80 3d206c65 6e677468 286e6f72 6d616c29 = length(normal) │ │ │ │ + 0x00962a90 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ + 0x00962aa0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x00962ab0 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ + 0x00962ac0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ + 0x00962ad0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ + 0x00962ae0 793b200a 20202020 69662028 68616c66 y; . if (half │ │ │ │ + 0x00962af0 57696474 6820213d 20302e30 29200a20 Width != 0.0) . │ │ │ │ + 0x00962b00 2020207b 200a2020 20202020 7472616e { . tran │ │ │ │ + 0x00962b10 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x00962b20 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00962b30 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ + 0x00962b40 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x00962b50 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ + 0x00962b60 6e6f726d 616c2c20 0a202020 20202020 normal, . │ │ │ │ + 0x00962b70 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00962b80 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00962b90 20202020 20202020 20202020 20202075 u │ │ │ │ + 0x00962ba0 5f6d6f64 656c5669 65772c20 68616c66 _modelView, half │ │ │ │ + 0x00962bb0 57696474 68293b20 0a202020 207d200a Width); . } . │ │ │ │ + 0x00962bc0 20202020 666c6f61 7420754f 66667365 float uOffse │ │ │ │ + 0x00962bd0 74203d20 6d696e28 6c656e67 74682876 t = min(length(v │ │ │ │ + 0x00962be0 65633428 6b536861 7065436f 6f726453 ec4(kShapeCoordS │ │ │ │ + 0x00962bf0 63616c61 722c2030 2c20302c 20302920 calar, 0, 0, 0) │ │ │ │ + 0x00962c00 2a20755f 6d6f6465 6c566965 7729202a * u_modelView) * │ │ │ │ + 0x00962c10 20615f6d 61736b54 6578436f 6f72642e a_maskTexCoord. │ │ │ │ + 0x00962c20 782c2031 2e30293b 200a2020 2020765f x, 1.0); . v_ │ │ │ │ + 0x00962c30 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ + 0x00962c40 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ + 0x00962c50 200a2020 2020765f 6d61736b 54657843 . v_maskTexC │ │ │ │ + 0x00962c60 6f6f7264 203d2076 65633228 615f6d61 oord = vec2(a_ma │ │ │ │ + 0x00962c70 736b5465 78436f6f 72642e79 202b2075 skTexCoord.y + u │ │ │ │ + 0x00962c80 4f666673 6574202a 20615f6d 61736b54 Offset * a_maskT │ │ │ │ + 0x00962c90 6578436f 6f72642e 7a2c2061 5f6d6173 exCoord.z, a_mas │ │ │ │ + 0x00962ca0 6b546578 436f6f72 642e7729 3b200a20 kTexCoord.w); . │ │ │ │ + 0x00962cb0 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x00962cc0 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ + 0x00962cd0 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ + 0x00962ce0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ + 0x00962cf0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ + 0x00962d00 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x00962d10 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00962d20 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ + 0x00962d30 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x00962d40 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ + 0x00962d50 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00962d60 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00962d70 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00962d80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00962d90 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00962da0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00962db0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00962dc0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00962dd0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00962de0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00962df0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00962e00 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00962e10 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00962e20 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00962e30 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00962e40 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00962e50 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00962e60 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00962e70 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00962e80 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00962e90 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ + 0x00962ea0 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ + 0x00962eb0 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ + 0x00962ec0 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x00962ed0 3420615f 706f7369 74696f6e 3b200a20 4 a_position; . │ │ │ │ + 0x00962ee0 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ + 0x00962ef0 6c3b200a 20202369 66646566 20454e41 l; . #ifdef ENA │ │ │ │ + 0x00962f00 424c455f 56544620 0a20206f 7574204c BLE_VTF . out L │ │ │ │ + 0x00962f10 4f575f50 20766563 3420765f 636f6c6f OW_P vec4 v_colo │ │ │ │ + 0x00962f20 723b200a 20202365 6c736520 0a20206f r; . #else . o │ │ │ │ + 0x00962f30 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ + 0x00962f40 6578436f 6f72643b 200a2020 23656e64 exCoord; . #end │ │ │ │ + 0x00962f50 6966200a 20206f75 74207665 63322076 if . out vec2 v │ │ │ │ + 0x00962f60 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ + 0x00962f70 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00962f80 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00962f90 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00962fa0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00962fb0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00962fc0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00962fd0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00962fe0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x00962ff0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00963000 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00963010 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00963020 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00963030 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00963040 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00963050 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00963060 6e655061 73733b20 0a202075 6e69666f nePass; . unifo │ │ │ │ + 0x00963070 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ + 0x00963080 6f6c6f72 5465783b 200a2020 636f6e73 olorTex; . cons │ │ │ │ + 0x00963090 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x009630a0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x009630b0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x009630c0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x009630d0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x009630e0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x009630f0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00963100 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x00963110 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00963120 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00963130 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00963140 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00963150 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00963160 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00963170 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00963180 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00963190 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x009631a0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x009631b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009631c0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x009631d0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x009631e0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x009631f0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00963200 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x00963210 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x00963220 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00963230 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x00963240 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x00963250 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00963260 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00963270 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00963280 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00963290 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x009632a0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x009632b0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x009632c0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x009632d0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x009632e0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x009632f0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x00963300 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x00963310 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00963320 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00963330 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00963340 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00963350 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00963360 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00963370 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x00963380 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x00963390 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x009633a0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x009633b0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x009633c0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x009633d0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x009633e0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x009633f0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x00963400 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x00963410 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x00963420 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00963430 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00963440 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00963450 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00963460 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00963470 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x00963480 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x00963490 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x009634a0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x009634b0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x009634c0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x009634d0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x009634e0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x009634f0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x00963500 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x00963510 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x00963520 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00963530 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00963540 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00963550 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00963560 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00963570 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00963580 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00963590 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x009635a0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x009635b0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x009635c0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x009635d0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x009635e0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x009635f0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00963600 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00963610 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00963620 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00963630 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ + 0x00963640 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ + 0x00963650 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ + 0x00963660 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ + 0x00963670 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ + 0x00963680 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ + 0x00963690 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x009636a0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x009636b0 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x009636c0 69766f74 5472616e 73666f72 6d287069 ivotTransform(pi │ │ │ │ + 0x009636d0 766f7420 2a20755f 70726f6a 65637469 vot * u_projecti │ │ │ │ + 0x009636e0 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ + 0x009636f0 666f726d 2c200a20 20202020 20202020 form, . │ │ │ │ + 0x00963700 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00963710 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00963720 20202020 2020615f 706f7369 74696f6e a_position │ │ │ │ + 0x00963730 2e77202a 20755f7a 5363616c 652c206f .w * u_zScale, o │ │ │ │ + 0x00963740 66667365 742e7879 293b200a 20202369 ffset.xy); . #i │ │ │ │ + 0x00963750 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00963760 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ + 0x00963770 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ + 0x00963780 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ + 0x00963790 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ + 0x009637a0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x009637b0 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ + 0x009637c0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x009637d0 0a202020 20765f6d 61736b54 6578436f . v_maskTexCo │ │ │ │ + 0x009637e0 6f726420 3d20615f 6d61736b 54657843 ord = a_maskTexC │ │ │ │ + 0x009637f0 6f6f7264 3b200a20 207d200a 00000000 oord; . } ..... │ │ │ │ + 0x00963800 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00963810 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00963820 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00963830 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00963840 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00963850 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00963860 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00963870 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00963880 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00963890 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x009638a0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009638b0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009638c0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009638d0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009638e0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009638f0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00963900 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00963910 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00963920 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00963930 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00963940 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00963950 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ + 0x00963960 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ + 0x00963970 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ + 0x00963980 6f6f7264 733b200a 20206f75 74207665 oords; . out ve │ │ │ │ + 0x00963990 63332076 5f6e6f72 6d616c3b 200a2020 c3 v_normal; . │ │ │ │ + 0x009639a0 6f757420 76656332 20765f74 6578436f out vec2 v_texCo │ │ │ │ + 0x009639b0 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ + 0x009639c0 206d6174 3420755f 7472616e 73666f72 mat4 u_transfor │ │ │ │ + 0x009639d0 6d3b200a 2020756e 69666f72 6d206d61 m; . uniform ma │ │ │ │ + 0x009639e0 74342075 5f6e6f72 6d616c54 72616e73 t4 u_normalTrans │ │ │ │ + 0x009639f0 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ + 0x00963a00 20766563 3420755f 636f6c6f 723b200a vec4 u_color; . │ │ │ │ + 0x00963a10 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ + 0x00963a20 5f746578 436f6f72 64466c69 7070696e _texCoordFlippin │ │ │ │ + 0x00963a30 673b200a 2020636f 6e737420 666c6f61 g; . const floa │ │ │ │ + 0x00963a40 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00963a50 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00963a60 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00963a70 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00963a80 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00963a90 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00963aa0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00963ab0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00963ac0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00963ad0 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00963ae0 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00963af0 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00963b00 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00963b10 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00963b20 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00963b30 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00963b40 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00963b50 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00963b60 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00963b70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00963b80 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00963b90 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00963ba0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00963bb0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00963bc0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00963bd0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00963be0 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00963bf0 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00963c00 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00963c10 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00963c20 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00963c30 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00963c40 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00963c50 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00963c60 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00963c70 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00963c80 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00963c90 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x00963ca0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x00963cb0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00963cc0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00963cd0 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00963ce0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00963cf0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00963d00 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x00963d10 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x00963d20 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x00963d30 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x00963d40 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x00963d50 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x00963d60 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x00963d70 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x00963d80 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00963d90 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x00963da0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x00963db0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x00963dc0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00963dd0 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00963de0 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00963df0 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x00963e00 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x00963e10 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x00963e20 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x00963e30 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x00963e40 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x00963e50 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x00963e60 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x00963e70 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x00963e80 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x00963e90 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x00963ea0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x00963eb0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x00963ec0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00963ed0 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00963ee0 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00963ef0 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x00963f00 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x00963f10 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x00963f20 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x00963f30 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x00963f40 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x00963f50 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x00963f60 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00963f70 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x00963f80 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x00963f90 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x00963fa0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00963fb0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x00963fc0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00963fd0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00963fe0 696f6e20 3d20755f 7472616e 73666f72 ion = u_transfor │ │ │ │ + 0x00963ff0 6d202a20 76656334 28615f70 6f732c20 m * vec4(a_pos, │ │ │ │ + 0x00964000 312e3029 3b200a20 20202076 5f6e6f72 1.0); . v_nor │ │ │ │ + 0x00964010 6d616c20 3d206e6f 726d616c 697a6528 mal = normalize( │ │ │ │ + 0x00964020 28755f6e 6f726d61 6c547261 6e73666f (u_normalTransfo │ │ │ │ + 0x00964030 726d202a 20766563 3428615f 6e6f726d rm * vec4(a_norm │ │ │ │ + 0x00964040 616c2c20 302e3029 292e7879 7a293b20 al, 0.0)).xyz); │ │ │ │ + 0x00964050 0a202020 20765f74 6578436f 6f726473 . v_texCoords │ │ │ │ + 0x00964060 203d206d 69782861 5f746578 436f6f72 = mix(a_texCoor │ │ │ │ + 0x00964070 64732c20 312e3020 2d20615f 74657843 ds, 1.0 - a_texC │ │ │ │ + 0x00964080 6f6f7264 732c2075 5f746578 436f6f72 oords, u_texCoor │ │ │ │ + 0x00964090 64466c69 7070696e 67293b20 0a202020 dFlipping); . │ │ │ │ + 0x009640a0 20676c5f 506f7369 74696f6e 203d2070 gl_Position = p │ │ │ │ + 0x009640b0 6f736974 696f6e3b 200a2020 23696664 osition; . #ifd │ │ │ │ + 0x009640c0 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ + 0x009640d0 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ + 0x009640e0 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ + 0x009640f0 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ + 0x00964100 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ + 0x00964110 2e7a202b 20676c5f 506f7369 74696f6e .z + gl_Position │ │ │ │ + 0x00964120 2e772920 2a20302e 353b200a 20202365 .w) * 0.5; . #e │ │ │ │ + 0x00964130 6e646966 200a2020 7d200a00 00000000 ndif . } ...... │ │ │ │ + 0x00964140 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00964150 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00964160 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00964170 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00964180 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00964190 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x009641a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009641b0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009641c0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x009641d0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x009641e0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009641f0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00964200 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00964210 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00964220 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00964230 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00964240 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00964250 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00964260 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00964270 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00964280 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00964290 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x009642a0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x009642b0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x009642c0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x009642d0 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ + 0x009642e0 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ + 0x009642f0 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ + 0x00964300 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ + 0x00964310 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ + 0x00964320 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x00964330 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x00964340 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ + 0x00964350 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00964360 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00964370 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00964380 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00964390 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x009643a0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x009643b0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x009643c0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x009643d0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x009643e0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x009643f0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00964400 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00964410 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00964420 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00964430 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00964440 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00964450 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ + 0x00964460 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x00964470 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ + 0x00964480 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00964490 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x009644a0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x009644b0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x009644c0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x009644d0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x009644e0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x009644f0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00964500 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00964510 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00964520 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00964530 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00964540 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00964550 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00964560 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00964570 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00964580 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00964590 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x009645a0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x009645b0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x009645c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x009645d0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x009645e0 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x009645f0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00964600 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00964610 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00964620 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00964630 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00964640 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00964650 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00964660 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00964670 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00964680 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00964690 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x009646a0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x009646b0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x009646c0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x009646d0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x009646e0 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x009646f0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00964700 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00964710 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00964720 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00964730 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00964740 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00964750 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00964760 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00964770 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00964780 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00964790 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x009647a0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x009647b0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x009647c0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x009647d0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x009647e0 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x009647f0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00964800 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00964810 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00964820 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00964830 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00964840 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00964850 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00964860 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00964870 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00964880 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00964890 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x009648a0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x009648b0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x009648c0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x009648d0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x009648e0 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x009648f0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00964900 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00964910 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00964920 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00964930 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00964940 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00964950 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00964960 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00964970 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00964980 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00964990 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x009649a0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x009649b0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x009649c0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x009649d0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x009649e0 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x009649f0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00964a00 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00964a10 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00964a20 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ + 0x00964a30 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ + 0x00964a40 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ + 0x00964a50 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x00964a60 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ + 0x00964a70 202b2061 5f636f6c 6f725465 78436f6f + a_colorTexCoo │ │ │ │ + 0x00964a80 7264732e 7a772c20 302c2030 29202b20 rds.zw, 0, 0) + │ │ │ │ + 0x00964a90 703b200a 20202020 676c5f50 6f736974 p; . gl_Posit │ │ │ │ + 0x00964aa0 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x00964ab0 5472616e 73666f72 6d28706f 73202a20 Transform(pos * │ │ │ │ + 0x00964ac0 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ + 0x00964ad0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00964ae0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00964af0 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ + 0x00964b00 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ + 0x00964b10 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ + 0x00964b20 636f6c6f 72546578 436f6f72 64732e78 colorTexCoords.x │ │ │ │ + 0x00964b30 79293b20 0a202023 656c7365 200a2020 y); . #else . │ │ │ │ + 0x00964b40 2020765f 636f6c6f 72546578 436f6f72 v_colorTexCoor │ │ │ │ + 0x00964b50 6473203d 20615f63 6f6c6f72 54657843 ds = a_colorTexC │ │ │ │ + 0x00964b60 6f6f7264 732e7879 3b200a20 2023656e oords.xy; . #en │ │ │ │ + 0x00964b70 64696620 0a202020 20765f6e 6f726d61 dif . v_norma │ │ │ │ + 0x00964b80 6c203d20 615f6e6f 726d616c 3b200a20 l = a_normal; . │ │ │ │ + 0x00964b90 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ + 0x00964ba0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00964bb0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00964bc0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00964bd0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00964be0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00964bf0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00964c00 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00964c10 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00964c20 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00964c30 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00964c40 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00964c50 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00964c60 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00964c70 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00964c80 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00964c90 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00964ca0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00964cb0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00964cc0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00964cd0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00964ce0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00964cf0 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ + 0x00964d00 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ + 0x00964d10 20666c6f 61742076 5f696e74 656e7369 float v_intensi │ │ │ │ + 0x00964d20 74793b20 0a202075 6e69666f 726d206d ty; . uniform m │ │ │ │ + 0x00964d30 61743420 755f7472 616e7366 6f726d3b at4 u_transform; │ │ │ │ + 0x00964d40 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00964d50 20755f6e 6f726d61 6c547261 6e73666f u_normalTransfo │ │ │ │ + 0x00964d60 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00964d70 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ + 0x00964d80 756e6966 6f726d20 76656332 20755f74 uniform vec2 u_t │ │ │ │ + 0x00964d90 6578436f 6f726446 6c697070 696e673b exCoordFlipping; │ │ │ │ + 0x00964da0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00964db0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00964dc0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00964dd0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00964de0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00964df0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00964e00 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00964e10 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00964e20 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00964e30 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00964e40 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00964e50 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00964e60 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00964e70 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00964e80 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00964e90 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00964ea0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00964eb0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00964ec0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00964ed0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00964ee0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00964ef0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00964f00 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00964f10 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00964f20 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00964f30 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00964f40 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00964f50 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00964f60 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00964f70 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00964f80 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00964f90 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00964fa0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00964fb0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00964fc0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00964fd0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00964fe0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00964ff0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00965000 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00965010 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00965020 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00965030 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00965040 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00965050 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00965060 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00965070 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00965080 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00965090 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x009650a0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x009650b0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x009650c0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x009650d0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x009650e0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x009650f0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00965100 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00965110 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00965120 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00965130 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00965140 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00965150 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00965160 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00965170 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00965180 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00965190 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x009651a0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x009651b0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x009651c0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x009651d0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x009651e0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x009651f0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00965200 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00965210 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00965220 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00965230 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00965240 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00965250 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00965260 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00965270 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00965280 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00965290 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x009652a0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x009652b0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x009652c0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x009652d0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x009652e0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x009652f0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00965300 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00965310 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00965320 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00965330 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00965340 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00965350 6e203d20 755f7472 616e7366 6f726d20 n = u_transform │ │ │ │ + 0x00965360 2a207665 63342861 5f706f73 2c20312e * vec4(a_pos, 1. │ │ │ │ + 0x00965370 30293b20 0a202020 20765f69 6e74656e 0); . v_inten │ │ │ │ + 0x00965380 73697479 203d2061 5f746578 436f6f72 sity = a_texCoor │ │ │ │ + 0x00965390 64732e78 3b200a20 20202067 6c5f506f ds.x; . gl_Po │ │ │ │ + 0x009653a0 73697469 6f6e203d 20706f73 6974696f sition = positio │ │ │ │ + 0x009653b0 6e3b200a 20202369 66646566 2056554c n; . #ifdef VUL │ │ │ │ + 0x009653c0 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ + 0x009653d0 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ + 0x009653e0 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ + 0x009653f0 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ + 0x00965400 6c5f506f 73697469 6f6e2e7a 202b2067 l_Position.z + g │ │ │ │ + 0x00965410 6c5f506f 73697469 6f6e2e77 29202a20 l_Position.w) * │ │ │ │ + 0x00965420 302e353b 200a2020 23656e64 6966200a 0.5; . #endif . │ │ │ │ + 0x00965430 20207d20 0a000000 20202023 69666465 } .... #ifde │ │ │ │ + 0x00965440 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00965450 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00965460 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00965470 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00965480 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00965490 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x009654a0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x009654b0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x009654c0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x009654d0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x009654e0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009654f0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00965500 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00965510 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00965520 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00965530 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00965540 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00965550 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00965560 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00965570 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00965580 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x00965590 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x009655a0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x009655b0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x009655c0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x009655d0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x009655e0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ + 0x009655f0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00965600 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x00965610 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x00965620 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00965630 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x00965640 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00965650 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x00965660 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x00965670 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x00965680 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00965690 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x009656a0 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x009656b0 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x009656c0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x009656d0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x009656e0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x009656f0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x00965700 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x00965710 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x00965720 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00965730 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00965740 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00965750 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x00965760 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00965770 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00965780 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x00965790 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x009657a0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x009657b0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x009657c0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x009657d0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x009657e0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x009657f0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x00965800 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00965810 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x00965820 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00965830 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x00965840 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x00965850 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x00965860 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x00965870 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x00965880 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x00965890 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x009658a0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x009658b0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x009658c0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x009658d0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x009658e0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x009658f0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x00965900 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x00965910 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00965920 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00965930 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00965940 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00965950 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00965960 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00965970 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00965980 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00965990 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x009659a0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x009659b0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x009659c0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x009659d0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x009659e0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x009659f0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x00965a00 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x00965a10 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00965a20 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x00965a30 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x00965a40 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00965a50 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00965a60 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00965a70 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00965a80 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x00965a90 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00965aa0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x00965ab0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x00965ac0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x00965ad0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x00965ae0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x00965af0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00965b00 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x00965b10 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x00965b20 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00965b30 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x00965b40 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00965b50 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00965b60 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00965b70 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00965b80 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x00965b90 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x00965ba0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x00965bb0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x00965bc0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x00965bd0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x00965be0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x00965bf0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x00965c00 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x00965c10 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x00965c20 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x00965c30 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x00965c40 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x00965c50 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00965c60 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00965c70 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00965c80 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x00965c90 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x00965ca0 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ + 0x00965cb0 6965773b 200a2020 2020666c 6f617420 iew; . float │ │ │ │ + 0x00965cc0 6e6f726d 616c4c65 6e203d20 6c656e67 normalLen = leng │ │ │ │ + 0x00965cd0 74682861 5f6e6f72 6d616c29 3b200a20 th(a_normal); . │ │ │ │ + 0x00965ce0 20202076 65633420 6e203d20 76656334 vec4 n = vec4 │ │ │ │ + 0x00965cf0 28615f70 6f736974 696f6e2e 7879202b (a_position.xy + │ │ │ │ + 0x00965d00 20615f6e 6f726d61 6c202a20 6b536861 a_normal * kSha │ │ │ │ + 0x00965d10 7065436f 6f726453 63616c61 722c2030 peCoordScalar, 0 │ │ │ │ + 0x00965d20 2e302c20 302e3029 202a2075 5f6d6f64 .0, 0.0) * u_mod │ │ │ │ + 0x00965d30 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ + 0x00965d40 34206e6f 726d203d 20766563 3428302e 4 norm = vec4(0. │ │ │ │ + 0x00965d50 302c2030 2e302c20 302e302c 20302e30 0, 0.0, 0.0, 0.0 │ │ │ │ + 0x00965d60 293b200a 20202020 69662028 646f7428 ); . if (dot( │ │ │ │ + 0x00965d70 6e2c206e 2920213d 20302e30 29200a20 n, n) != 0.0) . │ │ │ │ + 0x00965d80 20202020 206e6f72 6d203d20 6e6f726d norm = norm │ │ │ │ + 0x00965d90 616c697a 65286e29 202a206e 6f726d61 alize(n) * norma │ │ │ │ + 0x00965da0 6c4c656e 3b200a20 20202076 65633420 lLen; . vec4 │ │ │ │ + 0x00965db0 73686966 74656450 6f73203d 206e6f72 shiftedPos = nor │ │ │ │ + 0x00965dc0 6d202b20 706f733b 200a2020 2020676c m + pos; . gl │ │ │ │ + 0x00965dd0 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x00965de0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00965df0 73686966 74656450 6f73202a 20755f70 shiftedPos * u_p │ │ │ │ + 0x00965e00 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ + 0x00965e10 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ + 0x00965e20 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ + 0x00965e30 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ + 0x00965e40 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00965e50 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x00965e60 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00965e70 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00965e80 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00965e90 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00965ea0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00965eb0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00965ec0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00965ed0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00965ee0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00965ef0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00965f00 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00965f10 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00965f20 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00965f30 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00965f40 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00965f50 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00965f60 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00965f70 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00965f80 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00965f90 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00965fa0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00965fb0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00965fc0 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x00965fd0 64733b20 0a202023 69666465 6620454e ds; . #ifdef EN │ │ │ │ + 0x00965fe0 41424c45 5f565446 200a2020 6f757420 ABLE_VTF . out │ │ │ │ + 0x00965ff0 4c4f575f 50207665 63342076 5f636f6c LOW_P vec4 v_col │ │ │ │ + 0x00966000 6f723b20 0a202023 656c7365 200a2020 or; . #else . │ │ │ │ + 0x00966010 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x00966020 54657843 6f6f7264 733b200a 20202365 TexCoords; . #e │ │ │ │ + 0x00966030 6e646966 200a2020 756e6966 6f726d20 ndif . uniform │ │ │ │ + 0x00966040 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ + 0x00966050 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00966060 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ + 0x00966070 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00966080 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x00966090 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x009660a0 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ + 0x009660b0 613b200a 2020756e 69666f72 6d20666c a; . uniform fl │ │ │ │ + 0x009660c0 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ + 0x009660d0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009660e0 755f7a53 63616c65 3b200a20 20756e69 u_zScale; . uni │ │ │ │ + 0x009660f0 666f726d 20666c6f 61742075 5f696e74 form float u_int │ │ │ │ + 0x00966100 6572706f 6c617469 6f6e3b20 0a202075 erpolation; . u │ │ │ │ + 0x00966110 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x00966120 734f7574 6c696e65 50617373 3b200a20 sOutlinePass; . │ │ │ │ + 0x00966130 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00966140 5446200a 2020756e 69666f72 6d207361 TF . uniform sa │ │ │ │ + 0x00966150 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ + 0x00966160 65783b20 0a202023 656e6469 66200a20 ex; . #endif . │ │ │ │ + 0x00966170 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00966180 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00966190 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x009661a0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x009661b0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x009661c0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x009661d0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x009661e0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x009661f0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00966200 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00966210 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00966220 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00966230 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00966240 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00966250 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00966260 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00966270 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00966280 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00966290 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x009662a0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x009662b0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x009662c0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x009662d0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x009662e0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x009662f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00966300 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00966310 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00966320 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00966330 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00966340 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00966350 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00966360 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00966370 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00966380 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00966390 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x009663a0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x009663b0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x009663c0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x009663d0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x009663e0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x009663f0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00966400 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00966410 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00966420 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00966430 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00966440 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00966450 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00966460 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00966470 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00966480 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00966490 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x009664a0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x009664b0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x009664c0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x009664d0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x009664e0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x009664f0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00966500 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00966510 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00966520 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00966530 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00966540 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00966550 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00966560 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00966570 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00966580 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00966590 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x009665a0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x009665b0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x009665c0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x009665d0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x009665e0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x009665f0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00966600 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00966610 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00966620 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00966630 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00966640 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00966650 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00966660 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00966670 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00966680 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00966690 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x009666a0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x009666b0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x009666c0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x009666d0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x009666e0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x009666f0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00966700 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00966710 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ + 0x00966720 28615f70 6f736974 696f6e2c 20312e30 (a_position, 1.0 │ │ │ │ + 0x00966730 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x00966740 200a2020 2020706f 732e7879 77203d20 . pos.xyw = │ │ │ │ + 0x00966750 28706f73 202a2075 5f70726f 6a656374 (pos * u_project │ │ │ │ + 0x00966760 696f6e29 2e787977 3b200a20 20202070 ion).xyw; . p │ │ │ │ + 0x00966770 6f732e7a 203d2061 5f706f73 6974696f os.z = a_positio │ │ │ │ + 0x00966780 6e2e7a20 2a20755f 7a536361 6c653b20 n.z * u_zScale; │ │ │ │ + 0x00966790 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x009667a0 203d2075 5f706976 6f745472 616e7366 = u_pivotTransf │ │ │ │ + 0x009667b0 6f726d20 2a20706f 733b200a 20202369 orm * pos; . #i │ │ │ │ + 0x009667c0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x009667d0 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ + 0x009667e0 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ + 0x009667f0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x00966800 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ + 0x00966810 6f6e2e7a 20202b20 676c5f50 6f736974 on.z + gl_Posit │ │ │ │ + 0x00966820 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ + 0x00966830 2023656e 64696620 0a202023 69666465 #endif . #ifde │ │ │ │ + 0x00966840 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x00966850 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ + 0x00966860 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ + 0x00966870 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00966880 293b200a 20202365 6c736520 0a202020 ); . #else . │ │ │ │ + 0x00966890 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x009668a0 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ + 0x009668b0 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ + 0x009668c0 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ + 0x009668d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x009668e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009668f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00966900 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00966910 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00966920 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00966930 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00966940 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00966950 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00966960 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00966970 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00966980 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00966990 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009669a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009669b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x009669c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x009669d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x009669e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009669f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00966a00 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00966a10 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x00966a20 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00966a30 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x00966a40 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00966a50 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x00966a60 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00966a70 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ + 0x00966a80 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00966a90 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x00966aa0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x00966ab0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00966ac0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x00966ad0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00966ae0 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x00966af0 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x00966b00 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x00966b10 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00966b20 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x00966b30 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x00966b40 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x00966b50 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00966b60 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x00966b70 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x00966b80 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x00966b90 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x00966ba0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x00966bb0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00966bc0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00966bd0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00966be0 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x00966bf0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00966c00 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00966c10 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x00966c20 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00966c30 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x00966c40 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x00966c50 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x00966c60 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x00966c70 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x00966c80 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x00966c90 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00966ca0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x00966cb0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00966cc0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x00966cd0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x00966ce0 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x00966cf0 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x00966d00 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x00966d10 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x00966d20 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00966d30 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x00966d40 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x00966d50 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00966d60 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x00966d70 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x00966d80 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x00966d90 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x00966da0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00966db0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00966dc0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00966dd0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00966de0 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00966df0 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00966e00 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00966e10 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00966e20 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00966e30 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00966e40 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x00966e50 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x00966e60 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x00966e70 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x00966e80 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x00966e90 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x00966ea0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00966eb0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x00966ec0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x00966ed0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00966ee0 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00966ef0 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00966f00 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00966f10 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x00966f20 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00966f30 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x00966f40 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x00966f50 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x00966f60 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x00966f70 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x00966f80 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00966f90 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x00966fa0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x00966fb0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00966fc0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x00966fd0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00966fe0 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00966ff0 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00967000 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00967010 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x00967020 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x00967030 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x00967040 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x00967050 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x00967060 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x00967070 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x00967080 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x00967090 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x009670a0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x009670b0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x009670c0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x009670d0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x009670e0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x009670f0 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00967100 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00967110 20202076 65633420 7069766f 74203d20 vec4 pivot = │ │ │ │ + 0x00967120 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x00967130 78797a2c 20312e30 29202a20 755f6d6f xyz, 1.0) * u_mo │ │ │ │ + 0x00967140 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ + 0x00967150 6334206f 66667365 74203d20 76656334 c4 offset = vec4 │ │ │ │ + 0x00967160 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ + 0x00967170 302e3029 202a2075 5f70726f 6a656374 0.0) * u_project │ │ │ │ + 0x00967180 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ + 0x00967190 6974696f 6e203d20 6170706c 7942696c ition = applyBil │ │ │ │ + 0x009671a0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x009671b0 666f726d 28706976 6f74202a 20755f70 form(pivot * u_p │ │ │ │ + 0x009671c0 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ + 0x009671d0 6f745472 616e7366 6f726d2c 200a2020 otTransform, . │ │ │ │ + 0x009671e0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009671f0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00967200 20202020 20202020 20202020 20615f70 a_p │ │ │ │ + 0x00967210 6f736974 696f6e2e 77202a20 755f7a53 osition.w * u_zS │ │ │ │ + 0x00967220 63616c65 2c206f66 66736574 2e787929 cale, offset.xy) │ │ │ │ + 0x00967230 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ + 0x00967240 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ + 0x00967250 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ + 0x00967260 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x00967270 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00967280 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00967290 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x009672a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009672b0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x009672c0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x009672d0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x009672e0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x009672f0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00967300 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00967310 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00967320 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00967330 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00967340 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00967350 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00967360 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00967370 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00967380 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00967390 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x009673a0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x009673b0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x009673c0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x009673d0 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x009673e0 6e207665 63342061 5f636f6c 6f725465 n vec4 a_colorTe │ │ │ │ + 0x009673f0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x00967400 76656334 20765f6e 6f726d61 6c3b200a vec4 v_normal; . │ │ │ │ + 0x00967410 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ + 0x00967420 56544620 0a20206f 7574204c 4f575f50 VTF . out LOW_P │ │ │ │ + 0x00967430 20766563 3420765f 636f6c6f 723b200a vec4 v_color; . │ │ │ │ + 0x00967440 20202365 6c736520 0a20206f 75742076 #else . out v │ │ │ │ + 0x00967450 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ + 0x00967460 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ + 0x00967470 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00967480 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00967490 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x009674a0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x009674b0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x009674c0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x009674d0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x009674e0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x009674f0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00967500 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x00967510 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x00967520 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x00967530 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x00967540 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x00967550 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x00967560 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ + 0x00967570 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x00967580 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x00967590 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x009675a0 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ + 0x009675b0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x009675c0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x009675d0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x009675e0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x009675f0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00967600 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00967610 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00967620 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x00967630 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00967640 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00967650 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00967660 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00967670 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00967680 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00967690 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x009676a0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x009676b0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x009676c0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x009676d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009676e0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x009676f0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x00967700 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00967710 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00967720 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x00967730 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x00967740 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00967750 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x00967760 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x00967770 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00967780 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00967790 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x009677a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009677b0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x009677c0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x009677d0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x009677e0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x009677f0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00967800 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x00967810 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x00967820 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x00967830 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00967840 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00967850 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00967860 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00967870 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00967880 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00967890 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x009678a0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x009678b0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x009678c0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x009678d0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x009678e0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x009678f0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00967900 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x00967910 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x00967920 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x00967930 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x00967940 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00967950 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00967960 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00967970 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00967980 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00967990 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x009679a0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x009679b0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x009679c0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x009679d0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x009679e0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x009679f0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x00967a00 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x00967a10 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x00967a20 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x00967a30 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x00967a40 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00967a50 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00967a60 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00967a70 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00967a80 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00967a90 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00967aa0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00967ab0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x00967ac0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x00967ad0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x00967ae0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x00967af0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x00967b00 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x00967b10 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00967b20 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00967b30 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00967b40 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00967b50 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ + 0x00967b60 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ + 0x00967b70 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ + 0x00967b80 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ + 0x00967b90 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ + 0x00967ba0 616c2e78 79202b20 615f636f 6c6f7254 al.xy + a_colorT │ │ │ │ + 0x00967bb0 6578436f 6f726473 2e7a772c 20302e30 exCoords.zw, 0.0 │ │ │ │ + 0x00967bc0 2c20302e 3029202a 20755f70 726f6a65 , 0.0) * u_proje │ │ │ │ + 0x00967bd0 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ + 0x00967be0 6f736974 696f6e20 3d206170 706c7942 osition = applyB │ │ │ │ + 0x00967bf0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00967c00 6e73666f 726d2870 69766f74 202a2075 nsform(pivot * u │ │ │ │ + 0x00967c10 5f70726f 6a656374 696f6e2c 20755f70 _projection, u_p │ │ │ │ + 0x00967c20 69766f74 5472616e 73666f72 6d2c2030 ivotTransform, 0 │ │ │ │ + 0x00967c30 2e302c20 6f666673 65742e78 79293b20 .0, offset.xy); │ │ │ │ + 0x00967c40 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00967c50 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ + 0x00967c60 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ + 0x00967c70 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ + 0x00967c80 6578436f 6f726473 2e787929 3b200a20 exCoords.xy); . │ │ │ │ + 0x00967c90 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ + 0x00967ca0 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x00967cb0 5f636f6c 6f725465 78436f6f 7264732e _colorTexCoords. │ │ │ │ + 0x00967cc0 78793b20 0a202023 656e6469 66200a20 xy; . #endif . │ │ │ │ + 0x00967cd0 20202076 5f6e6f72 6d616c20 3d20615f v_normal = a_ │ │ │ │ + 0x00967ce0 6e6f726d 616c3b20 0a20207d 200a0000 normal; . } ... │ │ │ │ + 0x00967cf0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00967d00 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00967d10 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00967d20 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00967d30 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00967d40 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00967d50 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00967d60 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00967d70 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00967d80 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00967d90 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00967da0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00967db0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00967dc0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00967dd0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00967de0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00967df0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00967e00 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00967e10 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00967e20 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00967e30 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00967e40 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x00967e50 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x00967e60 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ + 0x00967e70 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x00967e80 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ + 0x00967e90 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ + 0x00967ea0 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ + 0x00967eb0 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ + 0x00967ec0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00967ed0 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x00967ee0 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x00967ef0 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x00967f00 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00967f10 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00967f20 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x00967f30 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x00967f40 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00967f50 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00967f60 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00967f70 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00967f80 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ + 0x00967f90 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ + 0x00967fa0 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ + 0x00967fb0 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ + 0x00967fc0 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ + 0x00967fd0 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ + 0x00967fe0 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ + 0x00967ff0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00968000 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ + 0x00968010 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00968020 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ + 0x00968030 733b200a 20202369 66646566 20454e41 s; . #ifdef ENA │ │ │ │ + 0x00968040 424c455f 56544620 0a202075 6e69666f BLE_VTF . unifo │ │ │ │ + 0x00968050 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ + 0x00968060 6f6c6f72 5465783b 200a2020 23656e64 olorTex; . #end │ │ │ │ + 0x00968070 6966200a 2020636f 6e737420 666c6f61 if . const floa │ │ │ │ + 0x00968080 74204261 73654465 70746853 68696674 t BaseDepthShift │ │ │ │ + 0x00968090 203d202d 31302e30 3b200a20 20636f6e = -10.0; . con │ │ │ │ + 0x009680a0 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x009680b0 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x009680c0 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x009680d0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x009680e0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x009680f0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00968100 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00968110 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x00968120 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00968130 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00968140 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00968150 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00968160 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00968170 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00968180 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00968190 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x009681a0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x009681b0 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x009681c0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x009681d0 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x009681e0 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x009681f0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00968200 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00968210 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x00968220 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00968230 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00968240 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x00968250 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x00968260 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00968270 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x00968280 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00968290 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x009682a0 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x009682b0 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x009682c0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x009682d0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x009682e0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x009682f0 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x00968300 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x00968310 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x00968320 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00968330 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x00968340 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00968350 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x00968360 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x00968370 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00968380 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x00968390 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x009683a0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x009683b0 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x009683c0 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x009683d0 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x009683e0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x009683f0 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x00968400 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x00968410 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x00968420 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00968430 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x00968440 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x00968450 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00968460 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x00968470 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x00968480 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x00968490 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x009684a0 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x009684b0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x009684c0 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x009684d0 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x009684e0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x009684f0 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x00968500 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x00968510 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x00968520 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x00968530 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x00968540 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x00968550 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x00968560 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x00968570 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x00968580 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x00968590 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x009685a0 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x009685b0 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x009685c0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x009685d0 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x009685e0 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x009685f0 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x00968600 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00968610 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00968620 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x00968630 2829200a 20207b20 0a202020 20666c6f () . { . flo │ │ │ │ + 0x00968640 61742069 734f7574 6c696e65 203d2073 at isOutline = s │ │ │ │ + 0x00968650 74657028 302e352c 20755f69 734f7574 tep(0.5, u_isOut │ │ │ │ + 0x00968660 6c696e65 50617373 293b200a 20202020 linePass); . │ │ │ │ + 0x00968670 666c6f61 74206e6f 744f7574 6c696e65 float notOutline │ │ │ │ + 0x00968680 203d2031 2e30202d 2069734f 75746c69 = 1.0 - isOutli │ │ │ │ + 0x00968690 6e653b20 0a202020 20666c6f 61742064 ne; . float d │ │ │ │ + 0x009686a0 65707468 53686966 74203d20 42617365 epthShift = Base │ │ │ │ + 0x009686b0 44657074 68536869 6674202a 2069734f DepthShift * isO │ │ │ │ + 0x009686c0 75746c69 6e653b20 0a202020 20766563 utline; . vec │ │ │ │ + 0x009686d0 3420706f 73203d20 28766563 3428615f 4 pos = (vec4(a_ │ │ │ │ + 0x009686e0 706f7369 74696f6e 2e78797a 2c203129 position.xyz, 1) │ │ │ │ + 0x009686f0 202b2076 65633428 302e302c 20302e30 + vec4(0.0, 0.0 │ │ │ │ + 0x00968700 2c206465 70746853 68696674 2c20302e , depthShift, 0. │ │ │ │ + 0x00968710 30292920 2a20755f 6d6f6465 6c566965 0)) * u_modelVie │ │ │ │ + 0x00968720 773b200a 20202020 76656334 20736869 w; . vec4 shi │ │ │ │ + 0x00968730 66746564 506f7320 3d207665 63342861 ftedPos = vec4(a │ │ │ │ + 0x00968740 5f6e6f72 6d616c2c 20302e30 2c20302e _normal, 0.0, 0. │ │ │ │ + 0x00968750 3029202b 20706f73 3b200a20 20202067 0) + pos; . g │ │ │ │ + 0x00968760 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x00968770 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00968780 28736869 66746564 506f7320 2a20755f (shiftedPos * u_ │ │ │ │ + 0x00968790 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x009687a0 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x009687b0 30293b20 0a202020 20766563 3220636f 0); . vec2 co │ │ │ │ + 0x009687c0 6c6f7254 6578436f 6f726420 3d20615f lorTexCoord = a_ │ │ │ │ + 0x009687d0 636f6c6f 72546578 436f6f72 64202a20 colorTexCoord * │ │ │ │ + 0x009687e0 6e6f744f 75746c69 6e65202b 20615f6f notOutline + a_o │ │ │ │ + 0x009687f0 75746c69 6e65436f 6c6f7254 6578436f utlineColorTexCo │ │ │ │ + 0x00968800 6f726420 2a206973 4f75746c 696e653b ord * isOutline; │ │ │ │ + 0x00968810 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00968820 455f5654 46200a20 20202076 5f636f6c E_VTF . v_col │ │ │ │ + 0x00968830 6f72203d 20746578 74757265 28755f63 or = texture(u_c │ │ │ │ + 0x00968840 6f6c6f72 5465782c 20636f6c 6f725465 olorTex, colorTe │ │ │ │ + 0x00968850 78436f6f 7264293b 200a2020 23656c73 xCoord); . #els │ │ │ │ + 0x00968860 65200a20 20202076 5f636f6c 6f725465 e . v_colorTe │ │ │ │ + 0x00968870 78436f6f 7264203d 20636f6c 6f725465 xCoord = colorTe │ │ │ │ + 0x00968880 78436f6f 72643b20 0a202023 656e6469 xCoord; . #endi │ │ │ │ + 0x00968890 66200a20 20202076 5f6d6173 6b546578 f . v_maskTex │ │ │ │ + 0x009688a0 436f6f72 64203d20 615f6d61 736b5465 Coord = a_maskTe │ │ │ │ + 0x009688b0 78436f6f 72643b20 0a20207d 200a0000 xCoord; . } ... │ │ │ │ + 0x009688c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009688d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009688e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009688f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00968900 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00968910 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00968920 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00968930 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00968940 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00968950 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00968960 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00968970 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00968980 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00968990 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009689a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009689b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009689c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009689d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009689e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009689f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00968a00 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00968a10 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00968a20 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00968a30 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00968a40 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00968a50 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ + 0x00968a60 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ + 0x00968a70 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x00968a80 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ + 0x00968a90 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x00968aa0 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00968ab0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00968ac0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00968ad0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00968ae0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00968af0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00968b00 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00968b10 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00968b20 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00968b30 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00968b40 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00968b50 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00968b60 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00968b70 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00968b80 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00968b90 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00968ba0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00968bb0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00968bc0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00968bd0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00968be0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00968bf0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00968c00 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00968c10 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00968c20 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00968c30 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00968c40 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00968c50 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00968c60 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00968c70 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00968c80 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00968c90 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00968ca0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00968cb0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00968cc0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00968cd0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00968ce0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00968cf0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00968d00 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00968d10 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00968d20 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00968d30 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00968d40 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00968d50 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00968d60 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00968d70 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00968d80 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00968d90 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00968da0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00968db0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00968dc0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00968dd0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00968de0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00968df0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00968e00 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00968e10 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00968e20 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00968e30 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00968e40 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00968e50 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00968e60 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00968e70 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00968e80 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00968e90 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00968ea0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00968eb0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00968ec0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00968ed0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00968ee0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00968ef0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00968f00 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00968f10 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00968f20 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00968f30 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00968f40 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00968f50 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00968f60 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00968f70 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00968f80 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00968f90 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00968fa0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00968fb0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00968fc0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00968fd0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00968fe0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00968ff0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00969000 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00969010 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00969020 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00969030 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00969040 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00969050 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00969060 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00969070 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00969080 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00969090 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x009690a0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x009690b0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x009690c0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x009690d0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x009690e0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x009690f0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00969100 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00969110 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00969120 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00969130 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00969140 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ + 0x00969150 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ + 0x00969160 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ + 0x00969170 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x00969180 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ + 0x00969190 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ + 0x009691a0 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ + 0x009691b0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x009691c0 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ + 0x009691d0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x009691e0 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ + 0x009691f0 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00969200 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ + 0x00969210 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00969220 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00969230 20202020 20202020 20202020 2020615f a_ │ │ │ │ + 0x00969240 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ + 0x00969250 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ + 0x00969260 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ + 0x00969270 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ + 0x00969280 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00969290 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ + 0x009692a0 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ + 0x009692b0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ + 0x009692c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009692d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009692e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009692f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00969300 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00969310 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00969320 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00969330 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00969340 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00969350 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00969360 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00969370 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00969380 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00969390 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009693a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009693b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009693c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009693d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009693e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009693f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00969400 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00969410 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ + 0x00969420 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ + 0x00969430 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x00969440 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00969450 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ + 0x00969460 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ + 0x00969470 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ + 0x00969480 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ + 0x00969490 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x009694a0 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ + 0x009694b0 65747269 63733b20 0a202063 6f6e7374 etrics; . const │ │ │ │ + 0x009694c0 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x009694d0 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x009694e0 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x009694f0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00969500 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00969510 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00969520 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00969530 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00969540 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00969550 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00969560 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00969570 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00969580 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00969590 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x009695a0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x009695b0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x009695c0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x009695d0 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x009695e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009695f0 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00969600 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00969610 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00969620 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00969630 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00969640 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00969650 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00969660 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00969670 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00969680 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00969690 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x009696a0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x009696b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009696c0 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x009696d0 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x009696e0 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x009696f0 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00969700 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00969710 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00969720 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00969730 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00969740 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00969750 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00969760 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00969770 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00969780 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00969790 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x009697a0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x009697b0 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x009697c0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x009697d0 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x009697e0 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x009697f0 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00969800 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00969810 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00969820 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00969830 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00969840 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00969850 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00969860 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00969870 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00969880 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00969890 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x009698a0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x009698b0 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x009698c0 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x009698d0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x009698e0 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x009698f0 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00969900 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00969910 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00969920 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00969930 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00969940 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00969950 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00969960 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00969970 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00969980 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00969990 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x009699a0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x009699b0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x009699c0 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x009699d0 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x009699e0 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x009699f0 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00969a00 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00969a10 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00969a20 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00969a30 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00969a40 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00969a50 200a2020 7b200a20 20202076 5f636f6c . { . v_col │ │ │ │ + 0x00969a60 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ + 0x00969a70 74636f6f 72643b20 0a202020 20765f6f tcoord; . v_o │ │ │ │ + 0x00969a80 66667365 7430203d 20755f66 72616d65 ffset0 = u_frame │ │ │ │ + 0x00969a90 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ + 0x00969aa0 7879202a 20766563 34282d31 2e302c20 xy * vec4(-1.0, │ │ │ │ + 0x00969ab0 302e302c 20302e30 2c202d31 2e302920 0.0, 0.0, -1.0) │ │ │ │ + 0x00969ac0 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ + 0x00969ad0 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ + 0x00969ae0 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x00969af0 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ + 0x00969b00 63342820 312e302c 20302e30 2c20302e c4( 1.0, 0.0, 0. │ │ │ │ + 0x00969b10 302c2020 312e3029 202b2061 5f74636f 0, 1.0) + a_tco │ │ │ │ + 0x00969b20 6f72642e 78797879 3b200a20 20202076 ord.xyxy; . v │ │ │ │ + 0x00969b30 5f6f6666 73657432 203d2075 5f667261 _offset2 = u_fra │ │ │ │ + 0x00969b40 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ + 0x00969b50 78797879 202a2076 65633428 2d322e30 xyxy * vec4(-2.0 │ │ │ │ + 0x00969b60 2c20302e 302c2030 2e302c20 2d322e30 , 0.0, 0.0, -2.0 │ │ │ │ + 0x00969b70 29202b20 615f7463 6f6f7264 2e787978 ) + a_tcoord.xyx │ │ │ │ + 0x00969b80 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ + 0x00969b90 696f6e20 3d207665 63342861 5f706f73 ion = vec4(a_pos │ │ │ │ + 0x00969ba0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x00969bb0 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x00969bc0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00969bd0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00969be0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00969bf0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00969c00 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00969c10 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00969c20 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00969c30 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00969c40 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00969c50 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00969c60 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00969c70 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00969c80 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00969c90 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00969ca0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00969cb0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00969cc0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00969cd0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00969ce0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00969cf0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00969d00 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ + 0x00969d10 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00969d20 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x00969d30 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00969d40 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x00969d50 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00969d60 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ + 0x00969d70 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00969d80 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x00969d90 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x00969da0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00969db0 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ + 0x00969dc0 613b200a 2020756e 69666f72 6d207665 a; . uniform ve │ │ │ │ + 0x00969dd0 63322075 5f706f73 6974696f 6e3b200a c2 u_position; . │ │ │ │ + 0x00969de0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00969df0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00969e00 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00969e10 7420755f 6f706163 6974793b 200a2020 t u_opacity; . │ │ │ │ + 0x00969e20 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00969e30 6c656e67 74683b20 0a202063 6f6e7374 length; . const │ │ │ │ + 0x00969e40 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00969e50 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00969e60 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00969e70 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00969e80 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00969e90 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00969ea0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00969eb0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00969ec0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00969ed0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00969ee0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00969ef0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00969f00 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00969f10 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00969f20 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00969f30 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00969f40 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00969f50 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00969f60 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00969f70 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00969f80 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00969f90 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00969fa0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00969fb0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00969fc0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00969fd0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00969fe0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00969ff0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x0096a000 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096a010 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x0096a020 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x0096a030 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096a040 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x0096a050 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x0096a060 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x0096a070 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x0096a080 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x0096a090 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x0096a0a0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x0096a0b0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x0096a0c0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x0096a0d0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x0096a0e0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0096a0f0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x0096a100 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x0096a110 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x0096a120 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x0096a130 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x0096a140 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0096a150 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x0096a160 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x0096a170 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x0096a180 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x0096a190 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x0096a1a0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x0096a1b0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x0096a1c0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x0096a1d0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x0096a1e0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x0096a1f0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x0096a200 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x0096a210 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x0096a220 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x0096a230 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x0096a240 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x0096a250 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x0096a260 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x0096a270 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x0096a280 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x0096a290 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x0096a2a0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x0096a2b0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x0096a2c0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x0096a2d0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x0096a2e0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x0096a2f0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x0096a300 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x0096a310 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x0096a320 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x0096a330 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x0096a340 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x0096a350 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x0096a360 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x0096a370 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x0096a380 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x0096a390 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x0096a3a0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x0096a3b0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x0096a3c0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x0096a3d0 200a2020 7b200a20 20202067 6c5f506f . { . gl_Po │ │ │ │ + 0x0096a3e0 73697469 6f6e203d 20766563 3428755f sition = vec4(u_ │ │ │ │ + 0x0096a3f0 706f7369 74696f6e 202b2061 5f706f73 position + a_pos │ │ │ │ + 0x0096a400 6974696f 6e202b20 755f6c65 6e677468 ition + u_length │ │ │ │ + 0x0096a410 202a2061 5f6e6f72 6d616c2c 20302c20 * a_normal, 0, │ │ │ │ + 0x0096a420 3129202a 20755f70 726f6a65 6374696f 1) * u_projectio │ │ │ │ + 0x0096a430 6e3b200a 20202369 66646566 2056554c n; . #ifdef VUL │ │ │ │ + 0x0096a440 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ + 0x0096a450 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ + 0x0096a460 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ + 0x0096a470 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ + 0x0096a480 6c5f506f 73697469 6f6e2e7a 20202b20 l_Position.z + │ │ │ │ + 0x0096a490 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ + 0x0096a4a0 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ + 0x0096a4b0 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ + 0x0096a4c0 6f6f7264 73203d20 615f636f 6c6f7254 oords = a_colorT │ │ │ │ + 0x0096a4d0 6578436f 6f726473 3b200a20 207d200a exCoords; . } . │ │ │ │ + 0x0096a4e0 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x0096a4f0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0096a500 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0096a510 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0096a520 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096a530 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0096a540 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0096a550 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0096a560 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0096a570 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0096a580 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0096a590 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0096a5a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0096a5b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0096a5c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0096a5d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0096a5e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0096a5f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0096a600 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0096a610 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0096a620 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0096a630 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0096a640 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0096a650 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x0096a660 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x0096a670 0a20206f 75742076 65633320 765f7261 . out vec3 v_ra │ │ │ │ + 0x0096a680 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ + 0x0096a690 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ + 0x0096a6a0 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ + 0x0096a6b0 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ + 0x0096a6c0 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ + 0x0096a6d0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x0096a6e0 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ + 0x0096a6f0 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ + 0x0096a700 726d2076 65633420 755f7061 72616d73 rm vec4 u_params │ │ │ │ + 0x0096a710 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0096a720 61742075 5f6c696e 6548616c 66576964 at u_lineHalfWid │ │ │ │ + 0x0096a730 74683b20 0a202075 6e69666f 726d2066 th; . uniform f │ │ │ │ + 0x0096a740 6c6f6174 20755f6d 61785261 64697573 loat u_maxRadius │ │ │ │ + 0x0096a750 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x0096a760 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x0096a770 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x0096a780 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x0096a790 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x0096a7a0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x0096a7b0 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x0096a7c0 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x0096a7d0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x0096a7e0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x0096a7f0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x0096a800 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x0096a810 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x0096a820 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x0096a830 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x0096a840 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x0096a850 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x0096a860 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x0096a870 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x0096a880 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x0096a890 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096a8a0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x0096a8b0 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x0096a8c0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x0096a8d0 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x0096a8e0 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x0096a8f0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x0096a900 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x0096a910 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x0096a920 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x0096a930 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x0096a940 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x0096a950 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x0096a960 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x0096a970 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x0096a980 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x0096a990 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x0096a9a0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x0096a9b0 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x0096a9c0 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x0096a9d0 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x0096a9e0 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x0096a9f0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x0096aa00 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x0096aa10 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x0096aa20 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x0096aa30 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x0096aa40 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x0096aa50 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x0096aa60 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x0096aa70 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x0096aa80 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x0096aa90 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x0096aaa0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x0096aab0 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x0096aac0 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x0096aad0 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x0096aae0 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x0096aaf0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x0096ab00 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x0096ab10 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x0096ab20 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x0096ab30 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x0096ab40 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x0096ab50 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x0096ab60 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x0096ab70 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x0096ab80 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x0096ab90 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x0096aba0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x0096abb0 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x0096abc0 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x0096abd0 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x0096abe0 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x0096abf0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x0096ac00 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x0096ac10 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x0096ac20 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x0096ac30 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x0096ac40 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x0096ac50 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x0096ac60 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x0096ac70 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x0096ac80 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x0096ac90 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x0096aca0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x0096acb0 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x0096acc0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x0096acd0 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x0096ace0 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x0096acf0 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ + 0x0096ad00 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ + 0x0096ad10 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ + 0x0096ad20 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ + 0x0096ad30 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x0096ad40 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ + 0x0096ad50 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ + 0x0096ad60 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ + 0x0096ad70 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ + 0x0096ad80 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ + 0x0096ad90 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ + 0x0096ada0 6e6f726d 616c202a 20755f6c 696e6548 normal * u_lineH │ │ │ │ + 0x0096adb0 616c6657 69647468 3b200a20 20202020 alfWidth; . │ │ │ │ + 0x0096adc0 20747261 6e73666f 726d6564 41786973 transformedAxis │ │ │ │ + 0x0096add0 506f7320 3d206361 6c634c69 6e655472 Pos = calcLineTr │ │ │ │ + 0x0096ade0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x0096adf0 28747261 6e73666f 726d6564 41786973 (transformedAxis │ │ │ │ + 0x0096ae00 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ + 0x0096ae10 7879202b 206e6f72 6d2c200a 20202020 xy + norm, . │ │ │ │ + 0x0096ae20 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096ae30 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096ae40 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096ae50 2020755f 6d6f6465 6c566965 772c206c u_modelView, l │ │ │ │ + 0x0096ae60 656e6774 68286e6f 726d2929 3b200a20 ength(norm)); . │ │ │ │ + 0x0096ae70 2020207d 200a2020 20207472 616e7366 } . transf │ │ │ │ + 0x0096ae80 6f726d65 64417869 73506f73 202b3d20 ormedAxisPos += │ │ │ │ + 0x0096ae90 615f6e6f 726d616c 2e7a7720 2a20755f a_normal.zw * u_ │ │ │ │ + 0x0096aea0 6c696e65 48616c66 57696474 683b200a lineHalfWidth; . │ │ │ │ + 0x0096aeb0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x0096aec0 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ + 0x0096aed0 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ + 0x0096aee0 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ + 0x0096aef0 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ + 0x0096af00 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ + 0x0096af10 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0096af20 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ + 0x0096af30 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ + 0x0096af40 20202020 765f636f 6c6f7220 3d20615f v_color = a_ │ │ │ │ + 0x0096af50 636f6c6f 723b200a 20202020 765f7261 color; . v_ra │ │ │ │ + 0x0096af60 64697573 203d2076 65633328 615f6e6f dius = vec3(a_no │ │ │ │ + 0x0096af70 726d616c 2e7a772c 20755f6d 61785261 rmal.zw, u_maxRa │ │ │ │ + 0x0096af80 64697573 29202a20 755f6c69 6e654861 dius) * u_lineHa │ │ │ │ + 0x0096af90 6c665769 6474683b 200a2020 7d200a00 lfWidth; . } .. │ │ │ │ + 0x0096afa0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096afb0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096afc0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096afd0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096afe0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096aff0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096b000 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096b010 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096b020 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096b030 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096b040 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096b050 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096b060 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096b070 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096b080 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096b090 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096b0a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096b0b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096b0c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096b0d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096b0e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096b0f0 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ + 0x0096b100 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ + 0x0096b110 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ + 0x0096b120 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ + 0x0096b130 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x0096b140 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x0096b150 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x0096b160 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x0096b170 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x0096b180 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x0096b190 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x0096b1a0 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ + 0x0096b1b0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x0096b1c0 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ + 0x0096b1d0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0096b1e0 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ + 0x0096b1f0 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ + 0x0096b200 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ + 0x0096b210 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x0096b220 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ + 0x0096b230 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ + 0x0096b240 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x0096b250 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x0096b260 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x0096b270 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x0096b280 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x0096b290 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x0096b2a0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x0096b2b0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x0096b2c0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x0096b2d0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x0096b2e0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x0096b2f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096b300 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x0096b310 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x0096b320 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x0096b330 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x0096b340 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x0096b350 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x0096b360 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0096b370 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x0096b380 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x0096b390 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x0096b3a0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x0096b3b0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x0096b3c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096b3d0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x0096b3e0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x0096b3f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096b400 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x0096b410 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x0096b420 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x0096b430 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x0096b440 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x0096b450 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x0096b460 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x0096b470 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0096b480 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0096b490 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0096b4a0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x0096b4b0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x0096b4c0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x0096b4d0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x0096b4e0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x0096b4f0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x0096b500 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0096b510 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x0096b520 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x0096b530 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x0096b540 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x0096b550 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x0096b560 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x0096b570 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x0096b580 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x0096b590 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x0096b5a0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096b5b0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x0096b5c0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x0096b5d0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x0096b5e0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x0096b5f0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x0096b600 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x0096b610 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x0096b620 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x0096b630 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x0096b640 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x0096b650 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0096b660 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x0096b670 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x0096b680 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x0096b690 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x0096b6a0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x0096b6b0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x0096b6c0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x0096b6d0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x0096b6e0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x0096b6f0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x0096b700 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x0096b710 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x0096b720 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x0096b730 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x0096b740 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x0096b750 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x0096b760 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x0096b770 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x0096b780 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x0096b790 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x0096b7a0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x0096b7b0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x0096b7c0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x0096b7d0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x0096b7e0 20666c6f 61742073 696e5620 3d207369 float sinV = si │ │ │ │ + 0x0096b7f0 6e28755f 617a696d 7574293b 200a2020 n(u_azimut); . │ │ │ │ + 0x0096b800 2020666c 6f617420 636f7356 203d2063 float cosV = c │ │ │ │ + 0x0096b810 6f732875 5f617a69 6d757429 3b200a20 os(u_azimut); . │ │ │ │ + 0x0096b820 2020206d 61743420 726f7461 74696f6e mat4 rotation │ │ │ │ + 0x0096b830 3b200a20 20202072 6f746174 696f6e5b ; . rotation[ │ │ │ │ + 0x0096b840 305d203d 20766563 3428636f 73562c20 0] = vec4(cosV, │ │ │ │ + 0x0096b850 73696e56 2c20302e 302c2030 2e30293b sinV, 0.0, 0.0); │ │ │ │ + 0x0096b860 200a2020 2020726f 74617469 6f6e5b31 . rotation[1 │ │ │ │ + 0x0096b870 5d203d20 76656334 282d7369 6e562c20 ] = vec4(-sinV, │ │ │ │ + 0x0096b880 636f7356 2c20302e 302c2030 2e30293b cosV, 0.0, 0.0); │ │ │ │ + 0x0096b890 200a2020 2020726f 74617469 6f6e5b32 . rotation[2 │ │ │ │ + 0x0096b8a0 5d203d20 76656334 28302e30 2c20302e ] = vec4(0.0, 0. │ │ │ │ + 0x0096b8b0 302c2031 2e302c20 302e3029 3b200a20 0, 1.0, 0.0); . │ │ │ │ + 0x0096b8c0 20202072 6f746174 696f6e5b 335d203d rotation[3] = │ │ │ │ + 0x0096b8d0 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ + 0x0096b8e0 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x0096b8f0 76656334 20706f73 203d2076 65633428 vec4 pos = vec4( │ │ │ │ + 0x0096b900 755f706f 73697469 6f6e2e78 797a2c20 u_position.xyz, │ │ │ │ + 0x0096b910 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ + 0x0096b920 65773b20 0a202020 20766563 34206e6f ew; . vec4 no │ │ │ │ + 0x0096b930 726d616c 203d2076 65633428 615f6e6f rmal = vec4(a_no │ │ │ │ + 0x0096b940 726d616c 2c20302c 2030293b 200a2020 rmal, 0, 0); . │ │ │ │ + 0x0096b950 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ + 0x0096b960 73203d20 6e6f726d 616c202a 20726f74 s = normal * rot │ │ │ │ + 0x0096b970 6174696f 6e202b20 706f733b 200a2020 ation + pos; . │ │ │ │ + 0x0096b980 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x0096b990 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x0096b9a0 6f726d28 73686966 74656450 6f73202a orm(shiftedPos * │ │ │ │ + 0x0096b9b0 20755f70 726f6a65 6374696f 6e2c2075 u_projection, u │ │ │ │ + 0x0096b9c0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x0096b9d0 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ + 0x0096b9e0 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x0096b9f0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x0096ba00 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x0096ba10 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0096ba20 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0096ba30 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0096ba40 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096ba50 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0096ba60 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0096ba70 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0096ba80 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0096ba90 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0096baa0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0096bab0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0096bac0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0096bad0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0096bae0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0096baf0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0096bb00 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0096bb10 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0096bb20 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0096bb30 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0096bb40 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0096bb50 0a202069 6e207665 63332061 5f6e6f72 . in vec3 a_nor │ │ │ │ + 0x0096bb60 6d616c3b 200a2020 696e2076 65633320 mal; . in vec3 │ │ │ │ + 0x0096bb70 615f706f 73697469 6f6e3b20 0a202069 a_position; . i │ │ │ │ + 0x0096bb80 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x0096bb90 0a20206f 75742076 65633320 765f7261 . out vec3 v_ra │ │ │ │ + 0x0096bba0 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ + 0x0096bbb0 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ + 0x0096bbc0 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ + 0x0096bbd0 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ + 0x0096bbe0 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ + 0x0096bbf0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x0096bc00 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ + 0x0096bc10 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ + 0x0096bc20 726d2076 65633220 755f636f 6e747261 rm vec2 u_contra │ │ │ │ + 0x0096bc30 73744761 6d6d613b 200a2020 756e6966 stGamma; . unif │ │ │ │ + 0x0096bc40 6f726d20 666c6f61 7420755f 6f706163 orm float u_opac │ │ │ │ + 0x0096bc50 6974793b 200a2020 756e6966 6f726d20 ity; . uniform │ │ │ │ + 0x0096bc60 666c6f61 7420755f 7a536361 6c653b20 float u_zScale; │ │ │ │ + 0x0096bc70 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x0096bc80 20755f69 6e746572 706f6c61 74696f6e u_interpolation │ │ │ │ + 0x0096bc90 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0096bca0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ + 0x0096bcb0 73733b20 0a202063 6f6e7374 20666c6f ss; . const flo │ │ │ │ + 0x0096bcc0 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ + 0x0096bcd0 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ + 0x0096bce0 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ + 0x0096bcf0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x0096bd00 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x0096bd10 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x0096bd20 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ + 0x0096bd30 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ + 0x0096bd40 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x0096bd50 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ + 0x0096bd60 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ + 0x0096bd70 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ + 0x0096bd80 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096bd90 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ + 0x0096bda0 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ + 0x0096bdb0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x0096bdc0 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ + 0x0096bdd0 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ + 0x0096bde0 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ + 0x0096bdf0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x0096be00 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ + 0x0096be10 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x0096be20 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096be30 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ + 0x0096be40 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ + 0x0096be50 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096be60 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ + 0x0096be70 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ + 0x0096be80 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ + 0x0096be90 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x0096bea0 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ + 0x0096beb0 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ + 0x0096bec0 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ + 0x0096bed0 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ + 0x0096bee0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x0096bef0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x0096bf00 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x0096bf10 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ + 0x0096bf20 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ + 0x0096bf30 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ + 0x0096bf40 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ + 0x0096bf50 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ + 0x0096bf60 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ + 0x0096bf70 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x0096bf80 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ + 0x0096bf90 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ + 0x0096bfa0 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ + 0x0096bfb0 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ + 0x0096bfc0 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ + 0x0096bfd0 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ + 0x0096bfe0 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ + 0x0096bff0 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ + 0x0096c000 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096c010 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ + 0x0096c020 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ + 0x0096c030 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ + 0x0096c040 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ + 0x0096c050 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ + 0x0096c060 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ + 0x0096c070 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ + 0x0096c080 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ + 0x0096c090 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ + 0x0096c0a0 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ + 0x0096c0b0 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ + 0x0096c0c0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x0096c0d0 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ + 0x0096c0e0 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ + 0x0096c0f0 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ + 0x0096c100 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x0096c110 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ + 0x0096c120 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ + 0x0096c130 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ + 0x0096c140 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ + 0x0096c150 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ + 0x0096c160 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ + 0x0096c170 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ + 0x0096c180 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ + 0x0096c190 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ + 0x0096c1a0 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ + 0x0096c1b0 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ + 0x0096c1c0 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ + 0x0096c1d0 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ + 0x0096c1e0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x0096c1f0 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ + 0x0096c200 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ + 0x0096c210 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ + 0x0096c220 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x0096c230 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ + 0x0096c240 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ + 0x0096c250 7b200a20 20202076 65633320 72616469 { . vec3 radi │ │ │ │ + 0x0096c260 7573203d 20615f6e 6f726d61 6c202a20 us = a_normal * │ │ │ │ + 0x0096c270 615f706f 73697469 6f6e2e7a 3b200a20 a_position.z; . │ │ │ │ + 0x0096c280 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x0096c290 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x0096c2a0 2c20302c 20312920 2a20755f 6d6f6465 , 0, 1) * u_mode │ │ │ │ + 0x0096c2b0 6c566965 773b200a 20202020 76656334 lView; . vec4 │ │ │ │ + 0x0096c2c0 20736869 66746564 506f7320 3d207665 shiftedPos = ve │ │ │ │ + 0x0096c2d0 63342872 61646975 732e7879 2c20302c c4(radius.xy, 0, │ │ │ │ + 0x0096c2e0 20302920 2b20706f 733b200a 20202020 0) + pos; . │ │ │ │ + 0x0096c2f0 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ + 0x0096c300 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0096c310 6d287368 69667465 64506f73 202a2075 m(shiftedPos * u │ │ │ │ + 0x0096c320 5f70726f 6a656374 696f6e2c 20755f70 _projection, u_p │ │ │ │ + 0x0096c330 69766f74 5472616e 73666f72 6d2c2030 ivotTransform, 0 │ │ │ │ + 0x0096c340 2e30293b 200a2020 2020765f 72616469 .0); . v_radi │ │ │ │ + 0x0096c350 7573203d 20726164 6975733b 200a2020 us = radius; . │ │ │ │ + 0x0096c360 2020765f 636f6c6f 72203d20 615f636f v_color = a_co │ │ │ │ + 0x0096c370 6c6f723b 200a2020 7d200a00 00000000 lor; . } ...... │ │ │ │ + 0x0096c380 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096c390 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096c3a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096c3b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096c3c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096c3d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096c3e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096c3f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096c400 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096c410 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096c420 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096c430 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096c440 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096c450 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096c460 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096c470 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096c480 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096c490 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096c4a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096c4b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096c4c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096c4d0 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ + 0x0096c4e0 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ + 0x0096c4f0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x0096c500 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x0096c510 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ + 0x0096c520 743b200a 2020756e 69666f72 6d207665 t; . uniform ve │ │ │ │ + 0x0096c530 63342075 5f667261 6d656275 66666572 c4 u_framebuffer │ │ │ │ + 0x0096c540 4d657472 6963733b 200a2020 636f6e73 Metrics; . cons │ │ │ │ + 0x0096c550 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x0096c560 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x0096c570 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x0096c580 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0096c590 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0096c5a0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0096c5b0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0096c5c0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x0096c5d0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0096c5e0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x0096c5f0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x0096c600 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x0096c610 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0096c620 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x0096c630 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0096c640 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0096c650 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0096c660 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x0096c670 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096c680 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x0096c690 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x0096c6a0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0096c6b0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0096c6c0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x0096c6d0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x0096c6e0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0096c6f0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x0096c700 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x0096c710 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096c720 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0096c730 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0096c740 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096c750 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x0096c760 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0096c770 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0096c780 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0096c790 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0096c7a0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x0096c7b0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x0096c7c0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x0096c7d0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x0096c7e0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x0096c7f0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0096c800 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x0096c810 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x0096c820 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x0096c830 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x0096c840 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x0096c850 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0096c860 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x0096c870 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x0096c880 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x0096c890 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0096c8a0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x0096c8b0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x0096c8c0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x0096c8d0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x0096c8e0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x0096c8f0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x0096c900 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x0096c910 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x0096c920 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x0096c930 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x0096c940 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x0096c950 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x0096c960 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0096c970 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x0096c980 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x0096c990 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x0096c9a0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x0096c9b0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x0096c9c0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x0096c9d0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x0096c9e0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x0096c9f0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x0096ca00 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x0096ca10 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x0096ca20 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x0096ca30 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x0096ca40 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0096ca50 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x0096ca60 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x0096ca70 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x0096ca80 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x0096ca90 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x0096caa0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x0096cab0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x0096cac0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0096cad0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x0096cae0 29200a20 207b200a 20202020 765f636f ) . { . v_co │ │ │ │ + 0x0096caf0 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x0096cb00 5f74636f 6f72643b 200a2020 2020765f _tcoord; . v_ │ │ │ │ + 0x0096cb10 6f666673 6574203d 20755f66 72616d65 offset = u_frame │ │ │ │ + 0x0096cb20 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ + 0x0096cb30 7879202a 20766563 3428312e 302c2030 xy * vec4(1.0, 0 │ │ │ │ + 0x0096cb40 2e302c20 302e302c 20312e30 29202b20 .0, 0.0, 1.0) + │ │ │ │ + 0x0096cb50 615f7463 6f6f7264 2e787978 793b200a a_tcoord.xyxy; . │ │ │ │ + 0x0096cb60 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x0096cb70 3d207665 63342861 5f706f73 2c20302e = vec4(a_pos, 0. │ │ │ │ + 0x0096cb80 302c2031 2e30293b 200a2020 7d200a00 0, 1.0); . } .. │ │ │ │ + 0x0096cb90 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096cba0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096cbb0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096cbc0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096cbd0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096cbe0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096cbf0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096cc00 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096cc10 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096cc20 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096cc30 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096cc40 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096cc50 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096cc60 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096cc70 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096cc80 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096cc90 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096cca0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096ccb0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096ccc0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096ccd0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096cce0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x0096ccf0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x0096cd00 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ + 0x0096cd10 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x0096cd20 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ + 0x0096cd30 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ + 0x0096cd40 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ + 0x0096cd50 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ + 0x0096cd60 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x0096cd70 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x0096cd80 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x0096cd90 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x0096cda0 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x0096cdb0 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x0096cdc0 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x0096cdd0 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x0096cde0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x0096cdf0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x0096ce00 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x0096ce10 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x0096ce20 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ + 0x0096ce30 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ + 0x0096ce40 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ + 0x0096ce50 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ + 0x0096ce60 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ + 0x0096ce70 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ + 0x0096ce80 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ + 0x0096ce90 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0096cea0 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ + 0x0096ceb0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0096cec0 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ + 0x0096ced0 733b200a 2020756e 69666f72 6d207361 s; . uniform sa │ │ │ │ + 0x0096cee0 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ + 0x0096cef0 65783b20 0a202063 6f6e7374 20666c6f ex; . const flo │ │ │ │ + 0x0096cf00 6174206b 42617365 44657074 68536869 at kBaseDepthShi │ │ │ │ + 0x0096cf10 6674203d 202d3130 2e303b20 0a202063 ft = -10.0; . c │ │ │ │ + 0x0096cf20 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ + 0x0096cf30 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ + 0x0096cf40 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ + 0x0096cf50 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x0096cf60 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x0096cf70 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x0096cf80 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x0096cf90 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ + 0x0096cfa0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x0096cfb0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ + 0x0096cfc0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ + 0x0096cfd0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0096cfe0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x0096cff0 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ + 0x0096d000 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x0096d010 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x0096d020 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ + 0x0096d030 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ + 0x0096d040 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0096d050 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ + 0x0096d060 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ + 0x0096d070 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x0096d080 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ + 0x0096d090 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ + 0x0096d0a0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x0096d0b0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x0096d0c0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ + 0x0096d0d0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x0096d0e0 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ + 0x0096d0f0 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ + 0x0096d100 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x0096d110 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ + 0x0096d120 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ + 0x0096d130 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ + 0x0096d140 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ + 0x0096d150 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0096d160 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0096d170 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0096d180 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ + 0x0096d190 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ + 0x0096d1a0 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ + 0x0096d1b0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ + 0x0096d1c0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x0096d1d0 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ + 0x0096d1e0 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ + 0x0096d1f0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x0096d200 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ + 0x0096d210 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ + 0x0096d220 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x0096d230 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ + 0x0096d240 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x0096d250 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ + 0x0096d260 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x0096d270 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ + 0x0096d280 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ + 0x0096d290 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ + 0x0096d2a0 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ + 0x0096d2b0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ + 0x0096d2c0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ + 0x0096d2d0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x0096d2e0 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ + 0x0096d2f0 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ + 0x0096d300 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ + 0x0096d310 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ + 0x0096d320 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ + 0x0096d330 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x0096d340 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ + 0x0096d350 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ + 0x0096d360 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x0096d370 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ + 0x0096d380 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ + 0x0096d390 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ + 0x0096d3a0 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ + 0x0096d3b0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ + 0x0096d3c0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ + 0x0096d3d0 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ + 0x0096d3e0 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ + 0x0096d3f0 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ + 0x0096d400 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ + 0x0096d410 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ + 0x0096d420 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ + 0x0096d430 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ + 0x0096d440 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x0096d450 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ + 0x0096d460 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ + 0x0096d470 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ + 0x0096d480 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ + 0x0096d490 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x0096d4a0 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ + 0x0096d4b0 696e2829 200a2020 7b200a20 20202066 in() . { . f │ │ │ │ + 0x0096d4c0 6c6f6174 2069734f 75746c69 6e65203d loat isOutline = │ │ │ │ + 0x0096d4d0 20737465 7028302e 352c2075 5f69734f step(0.5, u_isO │ │ │ │ + 0x0096d4e0 75746c69 6e655061 7373293b 200a2020 utlinePass); . │ │ │ │ + 0x0096d4f0 2020666c 6f617420 64657074 68536869 float depthShi │ │ │ │ + 0x0096d500 6674203d 206b4261 73654465 70746853 ft = kBaseDepthS │ │ │ │ + 0x0096d510 68696674 202a2069 734f7574 6c696e65 hift * isOutline │ │ │ │ + 0x0096d520 3b200a20 20202076 65633420 7069766f ; . vec4 pivo │ │ │ │ + 0x0096d530 74203d20 28766563 3428615f 706f7369 t = (vec4(a_posi │ │ │ │ + 0x0096d540 74696f6e 2e78797a 2c20312e 3029202b tion.xyz, 1.0) + │ │ │ │ + 0x0096d550 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ + 0x0096d560 64657074 68536869 66742c20 302e3029 depthShift, 0.0) │ │ │ │ + 0x0096d570 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x0096d580 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ + 0x0096d590 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ + 0x0096d5a0 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ + 0x0096d5b0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x0096d5c0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x0096d5d0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0096d5e0 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ + 0x0096d5f0 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ + 0x0096d600 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ + 0x0096d610 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ + 0x0096d620 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096d630 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096d640 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ + 0x0096d650 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ + 0x0096d660 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ + 0x0096d670 65633220 636f6c6f 72546578 436f6f72 ec2 colorTexCoor │ │ │ │ + 0x0096d680 64203d20 6d697828 615f636f 6c6f7254 d = mix(a_colorT │ │ │ │ + 0x0096d690 6578436f 6f72642c 20615f6f 75746c69 exCoord, a_outli │ │ │ │ + 0x0096d6a0 6e65436f 6c6f7254 6578436f 6f72642c neColorTexCoord, │ │ │ │ + 0x0096d6b0 2069734f 75746c69 6e65293b 200a2020 isOutline); . │ │ │ │ + 0x0096d6c0 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ + 0x0096d6d0 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ + 0x0096d6e0 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ + 0x0096d6f0 5465782c 20636f6c 6f725465 78436f6f Tex, colorTexCoo │ │ │ │ + 0x0096d700 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ + 0x0096d710 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x0096d720 7264203d 20636f6c 6f725465 78436f6f rd = colorTexCoo │ │ │ │ + 0x0096d730 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x0096d740 20202076 5f6d6173 6b546578 436f6f72 v_maskTexCoor │ │ │ │ + 0x0096d750 64203d20 615f6d61 736b5465 78436f6f d = a_maskTexCoo │ │ │ │ + 0x0096d760 72643b20 0a20207d 200a0000 00000000 rd; . } ....... │ │ │ │ + 0x0096d770 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096d780 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096d790 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096d7a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096d7b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096d7c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096d7d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096d7e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096d7f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096d800 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096d810 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096d820 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096d830 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096d840 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096d850 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096d860 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096d870 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096d880 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096d890 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096d8a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096d8b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096d8c0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0096d8d0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x0096d8e0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x0096d8f0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x0096d900 65633420 765f6f66 66736574 733b200a ec4 v_offsets; . │ │ │ │ + 0x0096d910 20206f75 74207665 63342076 5f636f6c out vec4 v_col │ │ │ │ + 0x0096d920 6f723b20 0a202075 6e69666f 726d206d or; . uniform m │ │ │ │ + 0x0096d930 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x0096d940 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x0096d950 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x0096d960 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x0096d970 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x0096d980 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x0096d990 20755f70 6172616d 733b200a 2020756e u_params; . un │ │ │ │ + 0x0096d9a0 69666f72 6d20666c 6f617420 755f6c69 iform float u_li │ │ │ │ + 0x0096d9b0 6e654861 6c665769 6474683b 200a2020 neHalfWidth; . │ │ │ │ + 0x0096d9c0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0096d9d0 6d617852 61646975 733b200a 2020636f maxRadius; . co │ │ │ │ + 0x0096d9e0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x0096d9f0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x0096da00 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x0096da10 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0096da20 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0096da30 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0096da40 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0096da50 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x0096da60 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0096da70 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x0096da80 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x0096da90 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x0096daa0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0096dab0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x0096dac0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0096dad0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0096dae0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x0096daf0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x0096db00 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0096db10 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x0096db20 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x0096db30 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0096db40 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x0096db50 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x0096db60 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x0096db70 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0096db80 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x0096db90 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x0096dba0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x0096dbb0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x0096dbc0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0096dbd0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x0096dbe0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x0096dbf0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x0096dc00 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x0096dc10 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x0096dc20 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0096dc30 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x0096dc40 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x0096dc50 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x0096dc60 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x0096dc70 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x0096dc80 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x0096dc90 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x0096dca0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x0096dcb0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0096dcc0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x0096dcd0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x0096dce0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0096dcf0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x0096dd00 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x0096dd10 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x0096dd20 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x0096dd30 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x0096dd40 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x0096dd50 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x0096dd60 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x0096dd70 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x0096dd80 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x0096dd90 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0096dda0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x0096ddb0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x0096ddc0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x0096ddd0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x0096dde0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x0096ddf0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x0096de00 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x0096de10 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x0096de20 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x0096de30 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x0096de40 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x0096de50 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x0096de60 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x0096de70 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x0096de80 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x0096de90 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x0096dea0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x0096deb0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x0096dec0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x0096ded0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0096dee0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x0096def0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x0096df00 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0096df10 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x0096df20 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x0096df30 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x0096df40 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0096df50 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0096df60 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x0096df70 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ + 0x0096df80 63342070 6f73203d 20766563 3428615f c4 pos = vec4(a_ │ │ │ │ + 0x0096df90 706f7369 74696f6e 2e78792c 20302c20 position.xy, 0, │ │ │ │ + 0x0096dfa0 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ + 0x0096dfb0 3b200a20 20202076 65633220 6e6f726d ; . vec2 norm │ │ │ │ + 0x0096dfc0 616c203d 20766563 3228615f 6e6f726d al = vec2(a_norm │ │ │ │ + 0x0096dfd0 616c2e78 202a2075 5f706172 616d732e al.x * u_params. │ │ │ │ + 0x0096dfe0 78202d20 615f6e6f 726d616c 2e79202a x - a_normal.y * │ │ │ │ + 0x0096dff0 20755f70 6172616d 732e792c 200a2020 u_params.y, . │ │ │ │ + 0x0096e000 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096e010 20202020 20615f6e 6f726d61 6c2e7820 a_normal.x │ │ │ │ + 0x0096e020 2a20755f 70617261 6d732e79 202b2061 * u_params.y + a │ │ │ │ + 0x0096e030 5f6e6f72 6d616c2e 79202a20 755f7061 _normal.y * u_pa │ │ │ │ + 0x0096e040 72616d73 2e78293b 200a2020 20207665 rams.x); . ve │ │ │ │ + 0x0096e050 63322073 68696674 6564506f 73203d20 c2 shiftedPos = │ │ │ │ + 0x0096e060 6e6f726d 616c202a 20755f70 6172616d normal * u_param │ │ │ │ + 0x0096e070 732e7a20 2b20706f 732e7879 3b200a20 s.z + pos.xy; . │ │ │ │ + 0x0096e080 20202070 6f73203d 20766563 34287368 pos = vec4(sh │ │ │ │ + 0x0096e090 69667465 64506f73 2c20615f 706f7369 iftedPos, a_posi │ │ │ │ + 0x0096e0a0 74696f6e 2e7a2c20 312e3029 202a2075 tion.z, 1.0) * u │ │ │ │ + 0x0096e0b0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x0096e0c0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x0096e0d0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x0096e0e0 6f726d28 706f732c 20755f70 69766f74 orm(pos, u_pivot │ │ │ │ + 0x0096e0f0 5472616e 73666f72 6d2c2030 2e30293b Transform, 0.0); │ │ │ │ + 0x0096e100 200a2020 20207665 6332206f 66667365 . vec2 offse │ │ │ │ + 0x0096e110 7473203d 20616273 28615f6e 6f726d61 ts = abs(a_norma │ │ │ │ + 0x0096e120 6c2e7a77 293b200a 20202020 765f6f66 l.zw); . v_of │ │ │ │ + 0x0096e130 66736574 73203d20 76656334 28615f6e fsets = vec4(a_n │ │ │ │ + 0x0096e140 6f726d61 6c2e7a77 2c206f66 66736574 ormal.zw, offset │ │ │ │ + 0x0096e150 73202d20 312e3029 3b200a20 20202076 s - 1.0); . v │ │ │ │ + 0x0096e160 5f636f6c 6f72203d 20615f63 6f6c6f72 _color = a_color │ │ │ │ + 0x0096e170 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x0096e180 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096e190 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096e1a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096e1b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096e1c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096e1d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096e1e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096e1f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096e200 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096e210 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096e220 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096e230 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096e240 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096e250 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096e260 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096e270 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096e280 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096e290 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096e2a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096e2b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096e2c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096e2d0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x0096e2e0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x0096e2f0 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ + 0x0096e300 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ + 0x0096e310 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ + 0x0096e320 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ + 0x0096e330 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x0096e340 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ + 0x0096e350 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ + 0x0096e360 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ + 0x0096e370 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ + 0x0096e380 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ + 0x0096e390 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x0096e3a0 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ + 0x0096e3b0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x0096e3c0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x0096e3d0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x0096e3e0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0096e3f0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x0096e400 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x0096e410 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x0096e420 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x0096e430 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x0096e440 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0096e450 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x0096e460 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x0096e470 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x0096e480 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0096e490 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x0096e4a0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x0096e4b0 5f565446 200a2020 756e6966 6f726d20 _VTF . uniform │ │ │ │ + 0x0096e4c0 73616d70 6c657232 4420755f 636f6c6f sampler2D u_colo │ │ │ │ + 0x0096e4d0 72546578 3b200a20 2023656e 64696620 rTex; . #endif │ │ │ │ + 0x0096e4e0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x0096e4f0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x0096e500 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x0096e510 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x0096e520 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x0096e530 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x0096e540 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x0096e550 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x0096e560 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x0096e570 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x0096e580 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x0096e590 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x0096e5a0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x0096e5b0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x0096e5c0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x0096e5d0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x0096e5e0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x0096e5f0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x0096e600 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x0096e610 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x0096e620 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0096e630 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x0096e640 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x0096e650 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x0096e660 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x0096e670 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x0096e680 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x0096e690 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0096e6a0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x0096e6b0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x0096e6c0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0096e6d0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x0096e6e0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x0096e6f0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x0096e700 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x0096e710 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x0096e720 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x0096e730 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x0096e740 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x0096e750 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x0096e760 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x0096e770 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x0096e780 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0096e790 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0096e7a0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0096e7b0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x0096e7c0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x0096e7d0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x0096e7e0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x0096e7f0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x0096e800 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x0096e810 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x0096e820 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x0096e830 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x0096e840 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096e850 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x0096e860 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x0096e870 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x0096e880 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x0096e890 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x0096e8a0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x0096e8b0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x0096e8c0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x0096e8d0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x0096e8e0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x0096e8f0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x0096e900 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x0096e910 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x0096e920 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x0096e930 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x0096e940 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0096e950 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x0096e960 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x0096e970 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x0096e980 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x0096e990 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x0096e9a0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x0096e9b0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x0096e9c0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x0096e9d0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x0096e9e0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x0096e9f0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x0096ea00 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x0096ea10 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x0096ea20 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x0096ea30 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x0096ea40 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x0096ea50 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x0096ea60 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x0096ea70 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x0096ea80 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x0096ea90 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x0096eaa0 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ + 0x0096eab0 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ + 0x0096eac0 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ + 0x0096ead0 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ + 0x0096eae0 302e3029 202b2070 6f733b20 0a202020 0.0) + pos; . │ │ │ │ + 0x0096eaf0 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x0096eb00 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x0096eb10 726d2873 68696674 6564506f 73202a20 rm(shiftedPos * │ │ │ │ + 0x0096eb20 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ + 0x0096eb30 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0096eb40 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x0096eb50 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ + 0x0096eb60 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ + 0x0096eb70 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ + 0x0096eb80 636f6c6f 72546578 436f6f72 64293b20 colorTexCoord); │ │ │ │ + 0x0096eb90 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ + 0x0096eba0 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ + 0x0096ebb0 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ + 0x0096ebc0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x0096ebd0 765f6d61 736b5465 78436f6f 7264203d v_maskTexCoord = │ │ │ │ + 0x0096ebe0 20615f6d 61736b54 6578436f 6f72643b a_maskTexCoord; │ │ │ │ + 0x0096ebf0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x0096ec00 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0096ec10 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0096ec20 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0096ec30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096ec40 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0096ec50 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0096ec60 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0096ec70 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0096ec80 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0096ec90 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0096eca0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0096ecb0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0096ecc0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0096ecd0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0096ece0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0096ecf0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0096ed00 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0096ed10 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0096ed20 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0096ed30 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0096ed40 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0096ed50 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0096ed60 3320615f 6e6f726d 616c416e 64416e69 3 a_normalAndAni │ │ │ │ + 0x0096ed70 6d617465 4f725a3b 200a2020 696e2076 mateOrZ; . in v │ │ │ │ + 0x0096ed80 65633420 615f7465 78436f6f 7264733b ec4 a_texCoords; │ │ │ │ + 0x0096ed90 200a2020 696e2076 65633420 615f636f . in vec4 a_co │ │ │ │ + 0x0096eda0 6c6f723b 200a2020 6f757420 76656334 lor; . out vec4 │ │ │ │ + 0x0096edb0 20765f74 6578436f 6f726473 3b200a20 v_texCoords; . │ │ │ │ + 0x0096edc0 206f7574 20766563 3420765f 6d61736b out vec4 v_mask │ │ │ │ + 0x0096edd0 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x0096ede0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x0096edf0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x0096ee00 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x0096ee10 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0096ee20 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x0096ee30 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x0096ee40 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x0096ee50 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x0096ee60 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x0096ee70 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0096ee80 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x0096ee90 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x0096eea0 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x0096eeb0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0096eec0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x0096eed0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x0096eee0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x0096eef0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x0096ef00 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x0096ef10 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x0096ef20 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x0096ef30 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x0096ef40 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x0096ef50 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x0096ef60 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x0096ef70 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x0096ef80 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x0096ef90 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x0096efa0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x0096efb0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x0096efc0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x0096efd0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x0096efe0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x0096eff0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x0096f000 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x0096f010 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0096f020 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x0096f030 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x0096f040 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x0096f050 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x0096f060 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x0096f070 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x0096f080 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0096f090 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x0096f0a0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x0096f0b0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0096f0c0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x0096f0d0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x0096f0e0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x0096f0f0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x0096f100 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x0096f110 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x0096f120 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x0096f130 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x0096f140 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x0096f150 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x0096f160 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x0096f170 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0096f180 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0096f190 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0096f1a0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x0096f1b0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x0096f1c0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x0096f1d0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x0096f1e0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x0096f1f0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x0096f200 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x0096f210 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x0096f220 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x0096f230 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096f240 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x0096f250 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x0096f260 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x0096f270 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x0096f280 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x0096f290 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x0096f2a0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x0096f2b0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x0096f2c0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x0096f2d0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x0096f2e0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x0096f2f0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x0096f300 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x0096f310 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x0096f320 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x0096f330 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0096f340 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x0096f350 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x0096f360 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x0096f370 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x0096f380 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x0096f390 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x0096f3a0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x0096f3b0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x0096f3c0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x0096f3d0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x0096f3e0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x0096f3f0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x0096f400 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x0096f410 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x0096f420 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x0096f430 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x0096f440 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x0096f450 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x0096f460 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x0096f470 20202076 65633220 6e6f726d 616c203d vec2 normal = │ │ │ │ + 0x0096f480 20615f6e 6f726d61 6c416e64 416e696d a_normalAndAnim │ │ │ │ + 0x0096f490 6174654f 725a2e78 793b200a 20202020 ateOrZ.xy; . │ │ │ │ + 0x0096f4a0 69662028 615f6e6f 726d616c 416e6441 if (a_normalAndA │ │ │ │ + 0x0096f4b0 6e696d61 74654f72 5a2e7a20 3e20302e nimateOrZ.z > 0. │ │ │ │ + 0x0096f4c0 3029200a 20202020 20206e6f 726d616c 0) . normal │ │ │ │ + 0x0096f4d0 203d2075 5f696e74 6572706f 6c617469 = u_interpolati │ │ │ │ + 0x0096f4e0 6f6e202a 206e6f72 6d616c3b 200a2020 on * normal; . │ │ │ │ + 0x0096f4f0 20207665 63342070 69766f74 203d2076 vec4 pivot = v │ │ │ │ + 0x0096f500 65633428 615f706f 73697469 6f6e2c20 ec4(a_position, │ │ │ │ + 0x0096f510 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ + 0x0096f520 65773b20 0a202020 20766563 34206f66 ew; . vec4 of │ │ │ │ + 0x0096f530 66736574 203d2076 65633428 6e6f726d fset = vec4(norm │ │ │ │ + 0x0096f540 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ + 0x0096f550 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x0096f560 20202076 65633420 70726f6a 65637465 vec4 projecte │ │ │ │ + 0x0096f570 64506976 6f74203d 20706976 6f74202a dPivot = pivot * │ │ │ │ + 0x0096f580 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x0096f590 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x0096f5a0 3d206170 706c7942 696c6c62 6f617264 = applyBillboard │ │ │ │ + 0x0096f5b0 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ + 0x0096f5c0 726f6a65 63746564 5069766f 742c2075 rojectedPivot, u │ │ │ │ + 0x0096f5d0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x0096f5e0 20302e30 2c206f66 66736574 2e787929 0.0, offset.xy) │ │ │ │ + 0x0096f5f0 3b200a20 20202066 6c6f6174 206e6577 ; . float new │ │ │ │ + 0x0096f600 5a203d20 70726f6a 65637465 64506976 Z = projectedPiv │ │ │ │ + 0x0096f610 6f742e79 202f2070 726f6a65 63746564 ot.y / projected │ │ │ │ + 0x0096f620 5069766f 742e7720 2a20302e 35202b20 Pivot.w * 0.5 + │ │ │ │ + 0x0096f630 302e353b 200a2020 2020676c 5f506f73 0.5; . gl_Pos │ │ │ │ + 0x0096f640 6974696f 6e2e7a20 3d206162 7328615f ition.z = abs(a_ │ │ │ │ + 0x0096f650 6e6f726d 616c416e 64416e69 6d617465 normalAndAnimate │ │ │ │ + 0x0096f660 4f725a2e 7a29202a 206e6577 5a20202b OrZ.z) * newZ + │ │ │ │ + 0x0096f670 2028312e 30202d20 61627328 615f6e6f (1.0 - abs(a_no │ │ │ │ + 0x0096f680 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ + 0x0096f690 5a2e7a29 29202a20 676c5f50 6f736974 Z.z)) * gl_Posit │ │ │ │ + 0x0096f6a0 696f6e2e 7a3b200a 20202020 765f7465 ion.z; . v_te │ │ │ │ + 0x0096f6b0 78436f6f 72647320 3d20615f 74657843 xCoords = a_texC │ │ │ │ + 0x0096f6c0 6f6f7264 733b200a 20202020 765f6d61 oords; . v_ma │ │ │ │ + 0x0096f6d0 736b436f 6c6f7220 3d20615f 636f6c6f skColor = a_colo │ │ │ │ + 0x0096f6e0 723b200a 20207d20 0a000000 00000000 r; . } ........ │ │ │ │ + 0x0096f6f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096f700 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096f710 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096f720 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096f730 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096f740 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096f750 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096f760 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096f770 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096f780 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096f790 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096f7a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096f7b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096f7c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096f7d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096f7e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096f7f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096f800 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096f810 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096f820 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096f830 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096f840 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ + 0x0096f850 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ + 0x0096f860 6f6f7264 733b200a 2020696e 20766563 oords; . in vec │ │ │ │ + 0x0096f870 3420615f 636f6c6f 723b200a 20206f75 4 a_color; . ou │ │ │ │ + 0x0096f880 74207665 63322076 5f746578 436f6f72 t vec2 v_texCoor │ │ │ │ + 0x0096f890 64733b20 0a20206f 75742076 65633420 ds; . out vec4 │ │ │ │ + 0x0096f8a0 765f636f 6c6f723b 200a2020 756e6966 v_color; . unif │ │ │ │ + 0x0096f8b0 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ + 0x0096f8c0 6374696f 6e3b200a 2020636f 6e737420 ction; . const │ │ │ │ + 0x0096f8d0 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ + 0x0096f8e0 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ + 0x0096f8f0 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ + 0x0096f900 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x0096f910 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x0096f920 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x0096f930 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ + 0x0096f940 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x0096f950 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096f960 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ + 0x0096f970 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ + 0x0096f980 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ + 0x0096f990 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0096f9a0 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ + 0x0096f9b0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x0096f9c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096f9d0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x0096f9e0 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ + 0x0096f9f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096fa00 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ + 0x0096fa10 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ + 0x0096fa20 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x0096fa30 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0096fa40 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ + 0x0096fa50 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ + 0x0096fa60 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0096fa70 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ + 0x0096fa80 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ + 0x0096fa90 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0096faa0 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x0096fab0 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ + 0x0096fac0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ + 0x0096fad0 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ + 0x0096fae0 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ + 0x0096faf0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x0096fb00 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x0096fb10 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x0096fb20 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ + 0x0096fb30 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ + 0x0096fb40 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ + 0x0096fb50 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ + 0x0096fb60 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ + 0x0096fb70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096fb80 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ + 0x0096fb90 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ + 0x0096fba0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x0096fbb0 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ + 0x0096fbc0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ + 0x0096fbd0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0096fbe0 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ + 0x0096fbf0 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ + 0x0096fc00 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ + 0x0096fc10 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0096fc20 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ + 0x0096fc30 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ + 0x0096fc40 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ + 0x0096fc50 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ + 0x0096fc60 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ + 0x0096fc70 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ + 0x0096fc80 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ + 0x0096fc90 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ + 0x0096fca0 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ + 0x0096fcb0 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ + 0x0096fcc0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ + 0x0096fcd0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0096fce0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0096fcf0 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ + 0x0096fd00 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ + 0x0096fd10 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x0096fd20 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ + 0x0096fd30 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ + 0x0096fd40 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ + 0x0096fd50 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ + 0x0096fd60 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ + 0x0096fd70 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ + 0x0096fd80 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ + 0x0096fd90 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ + 0x0096fda0 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x0096fdb0 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ + 0x0096fdc0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0096fdd0 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ + 0x0096fde0 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ + 0x0096fdf0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x0096fe00 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ + 0x0096fe10 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ + 0x0096fe20 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ + 0x0096fe30 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0096fe40 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ + 0x0096fe50 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ + 0x0096fe60 0a20207b 200a2020 2020765f 74657843 . { . v_texC │ │ │ │ + 0x0096fe70 6f6f7264 73203d20 615f7465 78436f6f oords = a_texCoo │ │ │ │ + 0x0096fe80 7264733b 200a2020 2020765f 636f6c6f rds; . v_colo │ │ │ │ + 0x0096fe90 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ + 0x0096fea0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x0096feb0 76656334 28615f70 6f736974 696f6e2c vec4(a_position, │ │ │ │ + 0x0096fec0 20302c20 3129202a 20755f70 726f6a65 0, 1) * u_proje │ │ │ │ + 0x0096fed0 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ + 0x0096fee0 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ + 0x0096fef0 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ + 0x0096ff00 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ + 0x0096ff10 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ + 0x0096ff20 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ + 0x0096ff30 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ + 0x0096ff40 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ + 0x0096ff50 64696620 0a20207d 200a0000 00000000 dif . } ....... │ │ │ │ + 0x0096ff60 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096ff70 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096ff80 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096ff90 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096ffa0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096ffb0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096ffc0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096ffd0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096ffe0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096fff0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00970000 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00970010 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00970020 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00970030 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00970040 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00970050 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00970060 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00970070 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00970080 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00970090 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009700a0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009700b0 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ + 0x009700c0 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ + 0x009700d0 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ + 0x009700e0 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ + 0x009700f0 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00970100 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00970110 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00970120 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00970130 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00970140 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00970150 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00970160 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ + 0x00970170 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x00970180 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ + 0x00970190 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009701a0 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ + 0x009701b0 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ + 0x009701c0 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ + 0x009701d0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x009701e0 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ + 0x009701f0 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ + 0x00970200 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00970210 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00970220 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x00970230 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00970240 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00970250 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00970260 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00970270 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00970280 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00970290 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x009702a0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x009702b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009702c0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x009702d0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x009702e0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x009702f0 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00970300 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00970310 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00970320 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00970330 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00970340 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00970350 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00970360 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00970370 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00970380 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00970390 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x009703a0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x009703b0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x009703c0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x009703d0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x009703e0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x009703f0 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00970400 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00970410 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00970420 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00970430 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00970440 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00970450 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00970460 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00970470 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00970480 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00970490 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x009704a0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x009704b0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x009704c0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x009704d0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x009704e0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x009704f0 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00970500 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00970510 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00970520 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00970530 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00970540 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00970550 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00970560 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00970570 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00970580 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00970590 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x009705a0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x009705b0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x009705c0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x009705d0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x009705e0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x009705f0 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00970600 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00970610 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00970620 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00970630 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00970640 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00970650 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00970660 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00970670 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00970680 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00970690 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x009706a0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x009706b0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x009706c0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x009706d0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x009706e0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x009706f0 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00970700 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00970710 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00970720 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00970730 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00970740 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00970750 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00970760 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00970770 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00970780 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00970790 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x009707a0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x009707b0 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ + 0x009707c0 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ + 0x009707d0 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ + 0x009707e0 20202076 65633420 6e6f726d 616c203d vec4 normal = │ │ │ │ + 0x009707f0 20766563 3428615f 6e6f726d 616c202a vec4(a_normal * │ │ │ │ + 0x00970800 20755f61 63637572 6163792c 20302e30 u_accuracy, 0.0 │ │ │ │ + 0x00970810 2c20302e 30293b20 0a202020 20706f73 , 0.0); . pos │ │ │ │ + 0x00970820 6974696f 6e203d20 28706f73 6974696f ition = (positio │ │ │ │ + 0x00970830 6e202b20 6e6f726d 616c2920 2a20755f n + normal) * u_ │ │ │ │ + 0x00970840 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ + 0x00970850 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x00970860 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00970870 726d2870 6f736974 696f6e2c 20755f70 rm(position, u_p │ │ │ │ + 0x00970880 69766f74 5472616e 73666f72 6d2c2075 ivotTransform, u │ │ │ │ + 0x00970890 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ + 0x009708a0 7a536361 6c65293b 200a2020 2020765f zScale); . v_ │ │ │ │ + 0x009708b0 636f6c6f 72546578 436f6f72 6473203d colorTexCoords = │ │ │ │ + 0x009708c0 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ + 0x009708d0 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ + 0x009708e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009708f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00970900 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00970910 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00970920 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00970930 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00970940 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00970950 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00970960 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00970970 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00970980 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00970990 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009709a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009709b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009709c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009709d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009709e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009709f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00970a00 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00970a10 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00970a20 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00970a30 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00970a40 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00970a50 72546578 436f6f72 643b200a 2020696e rTexCoord; . in │ │ │ │ + 0x00970a60 20766563 3220615f 6f75746c 696e6543 vec2 a_outlineC │ │ │ │ + 0x00970a70 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00970a80 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ + 0x00970a90 6c3b200a 2020696e 20766563 3220615f l; . in vec2 a_ │ │ │ │ + 0x00970aa0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ + 0x00970ab0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00970ac0 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x00970ad0 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x00970ae0 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x00970af0 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00970b00 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00970b10 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x00970b20 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x00970b30 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00970b40 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00970b50 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00970b60 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00970b70 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00970b80 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00970b90 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ + 0x00970ba0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00970bb0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ + 0x00970bc0 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ + 0x00970bd0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x00970be0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00970bf0 20755f6c 656e6774 683b200a 20202369 u_length; . #i │ │ │ │ + 0x00970c00 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00970c10 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x00970c20 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ + 0x00970c30 200a2020 23656e64 6966200a 2020636f . #endif . co │ │ │ │ + 0x00970c40 6e737420 666c6f61 74206b42 61736544 nst float kBaseD │ │ │ │ + 0x00970c50 65707468 53686966 74203d20 2d31302e epthShift = -10. │ │ │ │ + 0x00970c60 303b200a 2020636f 6e737420 666c6f61 0; . const floa │ │ │ │ + 0x00970c70 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00970c80 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00970c90 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00970ca0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00970cb0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00970cc0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00970cd0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00970ce0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00970cf0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00970d00 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00970d10 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00970d20 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00970d30 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00970d40 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00970d50 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00970d60 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00970d70 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00970d80 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00970d90 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00970da0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00970db0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00970dc0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00970dd0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00970de0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00970df0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00970e00 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00970e10 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00970e20 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00970e30 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00970e40 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00970e50 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00970e60 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00970e70 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00970e80 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00970e90 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00970ea0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00970eb0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00970ec0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x00970ed0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x00970ee0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00970ef0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00970f00 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00970f10 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00970f20 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00970f30 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x00970f40 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x00970f50 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x00970f60 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x00970f70 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x00970f80 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x00970f90 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x00970fa0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x00970fb0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00970fc0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x00970fd0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x00970fe0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x00970ff0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00971000 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00971010 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00971020 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x00971030 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x00971040 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x00971050 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x00971060 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x00971070 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x00971080 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x00971090 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x009710a0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x009710b0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x009710c0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x009710d0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x009710e0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x009710f0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00971100 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00971110 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00971120 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x00971130 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x00971140 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x00971150 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x00971160 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x00971170 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x00971180 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x00971190 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x009711a0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x009711b0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x009711c0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x009711d0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x009711e0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x009711f0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00971200 200a2020 2020666c 6f617420 69734f75 . float isOu │ │ │ │ + 0x00971210 746c696e 65203d20 73746570 28302e35 tline = step(0.5 │ │ │ │ + 0x00971220 2c20755f 69734f75 746c696e 65506173 , u_isOutlinePas │ │ │ │ + 0x00971230 73293b20 0a202020 20666c6f 61742064 s); . float d │ │ │ │ + 0x00971240 65707468 53686966 74203d20 6b426173 epthShift = kBas │ │ │ │ + 0x00971250 65446570 74685368 69667420 2a206973 eDepthShift * is │ │ │ │ + 0x00971260 4f75746c 696e653b 200a2020 20207665 Outline; . ve │ │ │ │ + 0x00971270 63342070 6f73203d 20287665 63342861 c4 pos = (vec4(a │ │ │ │ + 0x00971280 5f706f73 6974696f 6e2c2031 2e302920 _position, 1.0) │ │ │ │ + 0x00971290 2b207665 63342830 2e302c20 302e302c + vec4(0.0, 0.0, │ │ │ │ + 0x009712a0 20646570 74685368 6966742c 20302e30 depthShift, 0.0 │ │ │ │ + 0x009712b0 2929202a 20755f6d 6f64656c 56696577 )) * u_modelView │ │ │ │ + 0x009712c0 3b200a20 20202076 65633420 73686966 ; . vec4 shif │ │ │ │ + 0x009712d0 74656450 6f73203d 20766563 3428615f tedPos = vec4(a_ │ │ │ │ + 0x009712e0 6e6f726d 616c2c20 302e302c 20302e30 normal, 0.0, 0.0 │ │ │ │ + 0x009712f0 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ + 0x00971300 5f506f73 6974696f 6e203d20 73686966 _Position = shif │ │ │ │ + 0x00971310 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ + 0x00971320 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ + 0x00971330 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ + 0x00971340 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ + 0x00971350 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ + 0x00971360 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ + 0x00971370 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ + 0x00971380 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ + 0x00971390 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ + 0x009713a0 64696620 0a202020 20766563 3220636f dif . vec2 co │ │ │ │ + 0x009713b0 6c6f7254 6578436f 6f726420 3d206d69 lorTexCoord = mi │ │ │ │ + 0x009713c0 7828615f 636f6c6f 72546578 436f6f72 x(a_colorTexCoor │ │ │ │ + 0x009713d0 642c2061 5f6f7574 6c696e65 436f6c6f d, a_outlineColo │ │ │ │ + 0x009713e0 72546578 436f6f72 642c2069 734f7574 rTexCoord, isOut │ │ │ │ + 0x009713f0 6c696e65 293b200a 20202369 66646566 line); . #ifdef │ │ │ │ + 0x00971400 20454e41 424c455f 56544620 0a202020 ENABLE_VTF . │ │ │ │ + 0x00971410 20765f63 6f6c6f72 203d2074 65787475 v_color = textu │ │ │ │ + 0x00971420 72652875 5f636f6c 6f725465 782c2063 re(u_colorTex, c │ │ │ │ + 0x00971430 6f6c6f72 54657843 6f6f7264 293b200a olorTexCoord); . │ │ │ │ + 0x00971440 20202365 6c736520 0a202020 20765f63 #else . v_c │ │ │ │ + 0x00971450 6f6c6f72 54657843 6f6f7264 203d2063 olorTexCoord = c │ │ │ │ + 0x00971460 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00971470 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ + 0x00971480 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ + 0x00971490 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ + 0x009714a0 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ + 0x009714b0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x009714c0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009714d0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x009714e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009714f0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00971500 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00971510 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00971520 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00971530 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00971540 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00971550 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00971560 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00971570 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00971580 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00971590 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x009715a0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x009715b0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x009715c0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009715d0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x009715e0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x009715f0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00971600 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00971610 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x00971620 64733b20 0a202023 69666465 6620454e ds; . #ifdef EN │ │ │ │ + 0x00971630 41424c45 5f565446 200a2020 6f757420 ABLE_VTF . out │ │ │ │ + 0x00971640 4c4f575f 50207665 63342076 5f636f6c LOW_P vec4 v_col │ │ │ │ + 0x00971650 6f723b20 0a202023 656c7365 200a2020 or; . #else . │ │ │ │ + 0x00971660 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x00971670 54657843 6f6f7264 733b200a 20202365 TexCoords; . #e │ │ │ │ + 0x00971680 6e646966 200a2020 756e6966 6f726d20 ndif . uniform │ │ │ │ + 0x00971690 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ + 0x009716a0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x009716b0 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ + 0x009716c0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x009716d0 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x009716e0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x009716f0 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ + 0x00971700 613b200a 2020756e 69666f72 6d20666c a; . uniform fl │ │ │ │ + 0x00971710 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ + 0x00971720 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00971730 755f7a53 63616c65 3b200a20 20756e69 u_zScale; . uni │ │ │ │ + 0x00971740 666f726d 20666c6f 61742075 5f696e74 form float u_int │ │ │ │ + 0x00971750 6572706f 6c617469 6f6e3b20 0a202075 erpolation; . u │ │ │ │ + 0x00971760 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x00971770 734f7574 6c696e65 50617373 3b200a20 sOutlinePass; . │ │ │ │ + 0x00971780 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00971790 5446200a 2020756e 69666f72 6d207361 TF . uniform sa │ │ │ │ + 0x009717a0 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ + 0x009717b0 65783b20 0a202023 656e6469 66200a20 ex; . #endif . │ │ │ │ + 0x009717c0 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x009717d0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x009717e0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x009717f0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00971800 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00971810 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00971820 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00971830 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00971840 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00971850 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00971860 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00971870 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00971880 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00971890 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x009718a0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x009718b0 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x009718c0 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x009718d0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x009718e0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x009718f0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00971900 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00971910 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00971920 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00971930 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00971940 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00971950 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00971960 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00971970 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00971980 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00971990 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x009719a0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x009719b0 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x009719c0 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x009719d0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x009719e0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x009719f0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00971a00 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00971a10 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00971a20 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00971a30 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00971a40 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00971a50 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00971a60 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00971a70 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00971a80 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00971a90 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00971aa0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00971ab0 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00971ac0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00971ad0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00971ae0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00971af0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00971b00 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00971b10 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00971b20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00971b30 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00971b40 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00971b50 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00971b60 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00971b70 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00971b80 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00971b90 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00971ba0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00971bb0 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00971bc0 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00971bd0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00971be0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00971bf0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00971c00 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00971c10 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00971c20 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00971c30 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00971c40 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00971c50 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00971c60 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00971c70 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00971c80 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00971c90 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00971ca0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00971cb0 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00971cc0 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00971cd0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00971ce0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00971cf0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00971d00 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00971d10 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00971d20 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00971d30 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00971d40 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00971d50 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00971d60 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ + 0x00971d70 28615f70 6f736974 696f6e2c 20312920 (a_position, 1) │ │ │ │ + 0x00971d80 2a20755f 6d6f6465 6c566965 77202a20 * u_modelView * │ │ │ │ + 0x00971d90 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00971da0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x00971db0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00971dc0 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ + 0x00971dd0 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ + 0x00971de0 3b200a20 20236966 64656620 454e4142 ; . #ifdef ENAB │ │ │ │ + 0x00971df0 4c455f56 5446200a 20202020 765f636f LE_VTF . v_co │ │ │ │ + 0x00971e00 6c6f7220 3d207465 78747572 6528755f lor = texture(u_ │ │ │ │ + 0x00971e10 636f6c6f 72546578 2c20615f 636f6c6f colorTex, a_colo │ │ │ │ + 0x00971e20 72546578 436f6f72 6473293b 200a2020 rTexCoords); . │ │ │ │ + 0x00971e30 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ + 0x00971e40 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ + 0x00971e50 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ + 0x00971e60 0a202023 656e6469 66200a20 207d200a . #endif . } . │ │ │ │ + 0x00971e70 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x00971e80 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00971e90 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00971ea0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00971eb0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00971ec0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00971ed0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00971ee0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00971ef0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00971f00 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00971f10 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00971f20 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00971f30 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00971f40 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00971f50 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00971f60 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00971f70 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00971f80 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00971f90 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00971fa0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00971fb0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00971fc0 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ + 0x00971fd0 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ + 0x00971fe0 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ + 0x00971ff0 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ + 0x00972000 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ + 0x00972010 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ + 0x00972020 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ + 0x00972030 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ + 0x00972040 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00972050 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ + 0x00972060 65747269 63733b20 0a202023 64656669 etrics; . #defi │ │ │ │ + 0x00972070 6e652053 4d41415f 4d41585f 53454152 ne SMAA_MAX_SEAR │ │ │ │ + 0x00972080 43485f53 54455053 20382e30 200a2020 CH_STEPS 8.0 . │ │ │ │ + 0x00972090 636f6e73 74207665 6334206b 4d617853 const vec4 kMaxS │ │ │ │ + 0x009720a0 65617263 68537465 7073203d 20766563 earchSteps = vec │ │ │ │ + 0x009720b0 34282d32 2e30202a 20534d41 415f4d41 4(-2.0 * SMAA_MA │ │ │ │ + 0x009720c0 585f5345 41524348 5f535445 50532c20 X_SEARCH_STEPS, │ │ │ │ + 0x009720d0 322e3020 2a20534d 41415f4d 41585f53 2.0 * SMAA_MAX_S │ │ │ │ + 0x009720e0 45415243 485f5354 4550532c 200a2020 EARCH_STEPS, . │ │ │ │ + 0x009720f0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00972100 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00972110 20202d32 2e30202a 20534d41 415f4d41 -2.0 * SMAA_MA │ │ │ │ + 0x00972120 585f5345 41524348 5f535445 50532c20 X_SEARCH_STEPS, │ │ │ │ + 0x00972130 322e3020 202a2053 4d41415f 4d41585f 2.0 * SMAA_MAX_ │ │ │ │ + 0x00972140 53454152 43485f53 54455053 293b200a SEARCH_STEPS); . │ │ │ │ + 0x00972150 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ + 0x00972160 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ + 0x00972170 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ + 0x00972180 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ + 0x00972190 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x009721a0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x009721b0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x009721c0 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ + 0x009721d0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x009721e0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x009721f0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ + 0x00972200 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00972210 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ + 0x00972220 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ + 0x00972230 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ + 0x00972240 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ + 0x00972250 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ + 0x00972260 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ + 0x00972270 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00972280 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ + 0x00972290 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ + 0x009722a0 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ + 0x009722b0 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ + 0x009722c0 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ + 0x009722d0 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ + 0x009722e0 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ + 0x009722f0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ + 0x00972300 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00972310 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ + 0x00972320 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ + 0x00972330 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00972340 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ + 0x00972350 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ + 0x00972360 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ + 0x00972370 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ + 0x00972380 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00972390 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x009723a0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x009723b0 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ + 0x009723c0 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ + 0x009723d0 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ + 0x009723e0 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ + 0x009723f0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00972400 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00972410 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00972420 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ + 0x00972430 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ + 0x00972440 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ + 0x00972450 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ + 0x00972460 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ + 0x00972470 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ + 0x00972480 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x00972490 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ + 0x009724a0 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ + 0x009724b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009724c0 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ + 0x009724d0 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ + 0x009724e0 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ + 0x009724f0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ + 0x00972500 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00972510 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ + 0x00972520 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ + 0x00972530 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ + 0x00972540 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ + 0x00972550 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ + 0x00972560 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00972570 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ + 0x00972580 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ + 0x00972590 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x009725a0 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ + 0x009725b0 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ + 0x009725c0 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ + 0x009725d0 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ + 0x009725e0 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ + 0x009725f0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ + 0x00972600 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ + 0x00972610 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ + 0x00972620 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ + 0x00972630 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ + 0x00972640 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ + 0x00972650 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ + 0x00972660 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ + 0x00972670 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x00972680 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ + 0x00972690 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ + 0x009726a0 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ + 0x009726b0 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ + 0x009726c0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x009726d0 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ + 0x009726e0 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ + 0x009726f0 2020765f 636f6f72 6473203d 20766563 v_coords = vec │ │ │ │ + 0x00972700 3428615f 74636f6f 72642c20 615f7463 4(a_tcoord, a_tc │ │ │ │ + 0x00972710 6f6f7264 202a2075 5f667261 6d656275 oord * u_framebu │ │ │ │ + 0x00972720 66666572 4d657472 6963732e 7a77293b fferMetrics.zw); │ │ │ │ + 0x00972730 200a2020 2020765f 6f666673 65743020 . v_offset0 │ │ │ │ + 0x00972740 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x00972750 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ + 0x00972760 6334282d 302e3235 2c202d30 2e313235 c4(-0.25, -0.125 │ │ │ │ + 0x00972770 2c20312e 32352c20 2d302e31 32352920 , 1.25, -0.125) │ │ │ │ + 0x00972780 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ + 0x00972790 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ + 0x009727a0 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x009727b0 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ + 0x009727c0 6334282d 302e3132 352c202d 302e3235 c4(-0.125, -0.25 │ │ │ │ + 0x009727d0 2c202d30 2e313235 2c20312e 32352920 , -0.125, 1.25) │ │ │ │ + 0x009727e0 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ + 0x009727f0 200a2020 2020765f 6f666673 65743220 . v_offset2 │ │ │ │ + 0x00972800 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x00972810 65747269 63732e78 78797920 2a206b4d etrics.xxyy * kM │ │ │ │ + 0x00972820 61785365 61726368 53746570 73202b20 axSearchSteps + │ │ │ │ + 0x00972830 76656334 28765f6f 66667365 74302e78 vec4(v_offset0.x │ │ │ │ + 0x00972840 7a2c2076 5f6f6666 73657431 2e797729 z, v_offset1.yw) │ │ │ │ + 0x00972850 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x00972860 6f6e203d 20766563 3428615f 706f732c on = vec4(a_pos, │ │ │ │ + 0x00972870 20302e30 2c20312e 30293b20 0a20207d 0.0, 1.0); . } │ │ │ │ + 0x00972880 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x00972890 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x009728a0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009728b0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x009728c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009728d0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x009728e0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x009728f0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00972900 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00972910 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00972920 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00972930 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00972940 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00972950 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00972960 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00972970 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00972980 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00972990 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x009729a0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009729b0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x009729c0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x009729d0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x009729e0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x009729f0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x00972a00 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00972a10 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x00972a20 65633320 615f6c65 6e677468 3b200a20 ec3 a_length; . │ │ │ │ + 0x00972a30 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00972a40 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x00972a50 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x00972a60 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x00972a70 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00972a80 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00972a90 206f7574 20666c6f 61742076 5f6c656e out float v_len │ │ │ │ + 0x00972aa0 67746859 3b200a20 20756e69 666f726d gthY; . uniform │ │ │ │ + 0x00972ab0 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ + 0x00972ac0 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ + 0x00972ad0 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ + 0x00972ae0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00972af0 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x00972b00 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ + 0x00972b10 63342075 5f706f73 6974696f 6e3b200a c4 u_position; . │ │ │ │ + 0x00972b20 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ + 0x00972b30 5f6c696e 65506172 616d733b 200a2020 _lineParams; . │ │ │ │ + 0x00972b40 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00972b50 61636375 72616379 3b200a20 20756e69 accuracy; . uni │ │ │ │ + 0x00972b60 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x00972b70 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x00972b80 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x00972b90 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00972ba0 7420755f 617a696d 75743b20 0a202023 t u_azimut; . # │ │ │ │ + 0x00972bb0 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ + 0x00972bc0 200a2020 756e6966 6f726d20 73616d70 . uniform samp │ │ │ │ + 0x00972bd0 6c657232 4420755f 636f6c6f 72546578 ler2D u_colorTex │ │ │ │ + 0x00972be0 3b200a20 2023656e 64696620 0a202063 ; . #endif . c │ │ │ │ + 0x00972bf0 6f6e7374 20666c6f 6174206b 416e7469 onst float kAnti │ │ │ │ + 0x00972c00 616c6961 73696e67 54687265 73686f6c aliasingThreshol │ │ │ │ + 0x00972c10 64203d20 302e3932 3b200a20 20636f6e d = 0.92; . con │ │ │ │ + 0x00972c20 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x00972c30 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x00972c40 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x00972c50 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00972c60 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x00972c70 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00972c80 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00972c90 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x00972ca0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00972cb0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00972cc0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00972cd0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00972ce0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00972cf0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00972d00 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00972d10 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00972d20 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00972d30 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x00972d40 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00972d50 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x00972d60 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x00972d70 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00972d80 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00972d90 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x00972da0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00972db0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00972dc0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x00972dd0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x00972de0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00972df0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x00972e00 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00972e10 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x00972e20 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x00972e30 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00972e40 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00972e50 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00972e60 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00972e70 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x00972e80 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x00972e90 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x00972ea0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00972eb0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x00972ec0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00972ed0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x00972ee0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x00972ef0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00972f00 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x00972f10 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x00972f20 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00972f30 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x00972f40 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00972f50 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x00972f60 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00972f70 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x00972f80 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x00972f90 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x00972fa0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00972fb0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x00972fc0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x00972fd0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00972fe0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x00972ff0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x00973000 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x00973010 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x00973020 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x00973030 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00973040 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x00973050 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x00973060 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00973070 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x00973080 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x00973090 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x009730a0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x009730b0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x009730c0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x009730d0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x009730e0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x009730f0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x00973100 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x00973110 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00973120 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x00973130 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x00973140 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00973150 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x00973160 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x00973170 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x00973180 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00973190 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x009731a0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x009731b0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x009731c0 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ + 0x009731d0 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ + 0x009731e0 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ + 0x009731f0 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ + 0x00973200 69657729 2e78793b 200a2020 20207665 iew).xy; . ve │ │ │ │ + 0x00973210 6332206c 656e203d 20766563 3228615f c2 len = vec2(a_ │ │ │ │ + 0x00973220 6c656e67 74682e78 2c20615f 6c656e67 length.x, a_leng │ │ │ │ + 0x00973230 74682e7a 293b200a 20202020 69662028 th.z); . if ( │ │ │ │ + 0x00973240 646f7428 615f6e6f 726d616c 2c20615f dot(a_normal, a_ │ │ │ │ + 0x00973250 6e6f726d 616c2920 213d2030 2e302920 normal) != 0.0) │ │ │ │ + 0x00973260 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ + 0x00973270 6332206e 6f726d20 3d20615f 6e6f726d c2 norm = a_norm │ │ │ │ + 0x00973280 616c202a 20755f6c 696e6550 6172616d al * u_lineParam │ │ │ │ + 0x00973290 732e783b 200a2020 20202020 7472616e s.x; . tran │ │ │ │ + 0x009732a0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x009732b0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x009732c0 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ + 0x009732d0 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x009732e0 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ + 0x009732f0 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ + 0x00973300 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00973310 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00973320 20202020 20202020 20202020 20755f6d u_m │ │ │ │ + 0x00973330 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ + 0x00973340 286e6f72 6d29293b 200a2020 20202020 (norm)); . │ │ │ │ + 0x00973350 69662028 755f6c69 6e655061 72616d73 if (u_lineParams │ │ │ │ + 0x00973360 2e792021 3d20302e 3029200a 20202020 .y != 0.0) . │ │ │ │ + 0x00973370 20202020 6c656e20 3d207665 63322861 len = vec2(a │ │ │ │ + 0x00973380 5f6c656e 6774682e 78202b20 615f6c65 _length.x + a_le │ │ │ │ + 0x00973390 6e677468 2e79202a 20755f6c 696e6550 ngth.y * u_lineP │ │ │ │ + 0x009733a0 6172616d 732e792c 20615f6c 656e6774 arams.y, a_lengt │ │ │ │ + 0x009733b0 682e7a29 3b200a20 2020207d 200a2020 h.z); . } . │ │ │ │ + 0x009733c0 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ + 0x009733d0 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ + 0x009733e0 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ + 0x009733f0 5465782c 20615f63 6f6c6f72 54657843 Tex, a_colorTexC │ │ │ │ + 0x00973400 6f6f7264 73293b20 0a202023 656c7365 oords); . #else │ │ │ │ + 0x00973410 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ + 0x00973420 436f6f72 64203d20 615f636f 6c6f7254 Coord = a_colorT │ │ │ │ + 0x00973430 6578436f 6f726473 3b200a20 2023656e exCoords; . #en │ │ │ │ + 0x00973440 64696620 0a202020 20765f6c 656e6774 dif . v_lengt │ │ │ │ + 0x00973450 6859203d 206c656e 2e793b20 0a202020 hY = len.y; . │ │ │ │ + 0x00973460 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ + 0x00973470 28747261 6e73666f 726d6564 41786973 (transformedAxis │ │ │ │ + 0x00973480 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ + 0x00973490 7a2c2031 2e302920 2a20755f 70726f6a z, 1.0) * u_proj │ │ │ │ + 0x009734a0 65637469 6f6e3b20 0a202020 20676c5f ection; . gl_ │ │ │ │ + 0x009734b0 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ + 0x009734c0 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ + 0x009734d0 6f732c20 755f7069 766f7454 72616e73 os, u_pivotTrans │ │ │ │ + 0x009734e0 666f726d 2c20302e 30293b20 0a20207d form, 0.0); . } │ │ │ │ + 0x009734f0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x00973500 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00973510 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00973520 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00973530 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00973540 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00973550 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00973560 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00973570 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00973580 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00973590 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x009735a0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009735b0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x009735c0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009735d0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009735e0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x009735f0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00973600 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00973610 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00973620 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00973630 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00973640 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00973650 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00973660 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x00973670 643b200a 20206f75 74207665 63322076 d; . out vec2 v │ │ │ │ + 0x00973680 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x00973690 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x009736a0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x009736b0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x009736c0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x009736d0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x009736e0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x009736f0 756e6966 6f726d20 76656334 20755f74 uniform vec4 u_t │ │ │ │ + 0x00973700 72616666 69635061 72616d73 3b200a20 rafficParams; . │ │ │ │ + 0x00973710 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ + 0x00973720 6f75746c 696e6543 6f6c6f72 3b200a20 outlineColor; . │ │ │ │ + 0x00973730 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ + 0x00973740 6c696768 74417272 6f77436f 6c6f723b lightArrowColor; │ │ │ │ + 0x00973750 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00973760 20755f64 61726b41 72726f77 436f6c6f u_darkArrowColo │ │ │ │ + 0x00973770 723b200a 2020756e 69666f72 6d20666c r; . uniform fl │ │ │ │ + 0x00973780 6f617420 755f6f75 746c696e 653b200a oat u_outline; . │ │ │ │ + 0x00973790 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009737a0 755f6f70 61636974 793b200a 2020636f u_opacity; . co │ │ │ │ + 0x009737b0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x009737c0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x009737d0 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x009737e0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x009737f0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00973800 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00973810 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00973820 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x00973830 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00973840 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x00973850 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x00973860 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x00973870 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00973880 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x00973890 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x009738a0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x009738b0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x009738c0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x009738d0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x009738e0 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x009738f0 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x00973900 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00973910 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x00973920 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x00973930 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x00973940 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00973950 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x00973960 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x00973970 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x00973980 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x00973990 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x009739a0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x009739b0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x009739c0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x009739d0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x009739e0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x009739f0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00973a00 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00973a10 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x00973a20 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x00973a30 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x00973a40 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x00973a50 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x00973a60 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x00973a70 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x00973a80 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00973a90 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x00973aa0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x00973ab0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00973ac0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x00973ad0 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x00973ae0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x00973af0 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x00973b00 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x00973b10 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x00973b20 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x00973b30 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x00973b40 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x00973b50 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x00973b60 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x00973b70 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x00973b80 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x00973b90 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x00973ba0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x00973bb0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x00973bc0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x00973bd0 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x00973be0 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x00973bf0 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x00973c00 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x00973c10 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x00973c20 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x00973c30 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x00973c40 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x00973c50 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x00973c60 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x00973c70 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x00973c80 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x00973c90 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x00973ca0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00973cb0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x00973cc0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x00973cd0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00973ce0 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x00973cf0 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x00973d00 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x00973d10 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x00973d20 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00973d30 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x00973d40 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ + 0x00973d50 63322074 72616e73 666f726d 65644178 c2 transformedAx │ │ │ │ + 0x00973d60 6973506f 73203d20 28766563 3428615f isPos = (vec4(a_ │ │ │ │ + 0x00973d70 706f7369 74696f6e 2e78792c 20302e30 position.xy, 0.0 │ │ │ │ + 0x00973d80 2c20312e 3029202a 20755f6d 6f64656c , 1.0) * u_model │ │ │ │ + 0x00973d90 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x00973da0 65633420 706f7320 3d207665 63342874 ec4 pos = vec4(t │ │ │ │ + 0x00973db0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x00973dc0 732c2061 5f706f73 6974696f 6e2e7a2c s, a_position.z, │ │ │ │ + 0x00973dd0 20312e30 29202a20 755f7072 6f6a6563 1.0) * u_projec │ │ │ │ + 0x00973de0 74696f6e 3b200a20 20202076 5f636f6c tion; . v_col │ │ │ │ + 0x00973df0 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ + 0x00973e00 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00973e10 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x00973e20 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00973e30 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ + 0x00973e40 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ + 0x00973e50 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x00973e60 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00973e70 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00973e80 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00973e90 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00973ea0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00973eb0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00973ec0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00973ed0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00973ee0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00973ef0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00973f00 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00973f10 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00973f20 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00973f30 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00973f40 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00973f50 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00973f60 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00973f70 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00973f80 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00973f90 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00973fa0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00973fb0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00973fc0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00973fd0 616c3b20 0a202069 6e207665 63332061 al; . in vec3 a │ │ │ │ + 0x00973fe0 5f6c656e 6774683b 200a2020 696e2076 _length; . in v │ │ │ │ + 0x00973ff0 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ + 0x00974000 6f757420 76656333 20765f6c 656e6774 out vec3 v_lengt │ │ │ │ + 0x00974010 683b200a 20206f75 74207665 63342076 h; . out vec4 v │ │ │ │ + 0x00974020 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ + 0x00974030 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00974040 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00974050 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00974060 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00974070 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00974080 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00974090 76656334 20755f72 6f757465 50617261 vec4 u_routePara │ │ │ │ + 0x009740a0 6d733b20 0a202075 6e69666f 726d2076 ms; . uniform v │ │ │ │ + 0x009740b0 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ + 0x009740c0 756e6966 6f726d20 76656334 20755f6d uniform vec4 u_m │ │ │ │ + 0x009740d0 61736b43 6f6c6f72 3b200a20 20756e69 askColor; . uni │ │ │ │ + 0x009740e0 666f726d 20766563 3420755f 6f75746c form vec4 u_outl │ │ │ │ + 0x009740f0 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ + 0x00974100 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ + 0x00974110 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x00974120 6d207665 63342075 5f66616b 654f7574 m vec4 u_fakeOut │ │ │ │ + 0x00974130 6c696e65 436f6c6f 723b200a 2020756e lineColor; . un │ │ │ │ + 0x00974140 69666f72 6d207665 63322075 5f66616b iform vec2 u_fak │ │ │ │ + 0x00974150 65426f72 64657273 3b200a20 20756e69 eBorders; . uni │ │ │ │ + 0x00974160 666f726d 20766563 3220755f 70617474 form vec2 u_patt │ │ │ │ + 0x00974170 65726e3b 200a2020 756e6966 6f726d20 ern; . uniform │ │ │ │ + 0x00974180 76656332 20755f61 6e676c65 436f7353 vec2 u_angleCosS │ │ │ │ + 0x00974190 696e3b20 0a202075 6e69666f 726d2066 in; . uniform f │ │ │ │ + 0x009741a0 6c6f6174 20755f61 72726f77 48616c66 loat u_arrowHalf │ │ │ │ + 0x009741b0 57696474 683b200a 2020756e 69666f72 Width; . unifor │ │ │ │ + 0x009741c0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x009741d0 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ + 0x009741e0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x009741f0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00974200 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00974210 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00974220 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00974230 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00974240 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00974250 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00974260 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00974270 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00974280 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00974290 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x009742a0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x009742b0 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x009742c0 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x009742d0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x009742e0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x009742f0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00974300 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00974310 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00974320 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00974330 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00974340 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00974350 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00974360 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00974370 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00974380 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00974390 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x009743a0 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x009743b0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x009743c0 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x009743d0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x009743e0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x009743f0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00974400 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00974410 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00974420 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00974430 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x00974440 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x00974450 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00974460 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00974470 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00974480 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00974490 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x009744a0 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x009744b0 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x009744c0 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x009744d0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x009744e0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x009744f0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x00974500 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x00974510 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x00974520 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00974530 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x00974540 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x00974550 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x00974560 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00974570 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00974580 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00974590 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x009745a0 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x009745b0 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x009745c0 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x009745d0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x009745e0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x009745f0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x00974600 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x00974610 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x00974620 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x00974630 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x00974640 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x00974650 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x00974660 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00974670 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00974680 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00974690 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x009746a0 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x009746b0 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x009746c0 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x009746d0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x009746e0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x009746f0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x00974700 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00974710 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x00974720 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x00974730 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x00974740 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00974750 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x00974760 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00974770 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ + 0x00974780 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ + 0x00974790 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ + 0x009747a0 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ + 0x009747b0 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ + 0x009747c0 3b200a20 20202076 65633220 6c656e20 ; . vec2 len │ │ │ │ + 0x009747d0 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ + 0x009747e0 782c2061 5f6c656e 6774682e 7a293b20 x, a_length.z); │ │ │ │ + 0x009747f0 0a202020 20696620 28646f74 28615f6e . if (dot(a_n │ │ │ │ + 0x00974800 6f726d61 6c2c2061 5f6e6f72 6d616c29 ormal, a_normal) │ │ │ │ + 0x00974810 20213d20 302e3029 200a2020 20207b20 != 0.0) . { │ │ │ │ + 0x00974820 0a202020 20202076 65633220 6e6f726d . vec2 norm │ │ │ │ + 0x00974830 203d2061 5f6e6f72 6d616c20 2a20755f = a_normal * u_ │ │ │ │ + 0x00974840 726f7574 65506172 616d732e 783b200a routeParams.x; . │ │ │ │ + 0x00974850 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ + 0x00974860 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ + 0x00974870 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00974880 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ + 0x00974890 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ + 0x009748a0 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ + 0x009748b0 0a202020 20202020 20202020 20202020 . │ │ │ │ + 0x009748c0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009748d0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009748e0 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ + 0x009748f0 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ + 0x00974900 293b200a 20202020 20206966 2028755f ); . if (u_ │ │ │ │ + 0x00974910 726f7574 65506172 616d732e 7920213d routeParams.y != │ │ │ │ + 0x00974920 20302e30 29200a20 20202020 2020206c 0.0) . l │ │ │ │ + 0x00974930 656e203d 20766563 3228615f 6c656e67 en = vec2(a_leng │ │ │ │ + 0x00974940 74682e78 202b2061 5f6c656e 6774682e th.x + a_length. │ │ │ │ + 0x00974950 79202a20 755f726f 75746550 6172616d y * u_routeParam │ │ │ │ + 0x00974960 732e792c 20615f6c 656e6774 682e7a29 s.y, a_length.z) │ │ │ │ + 0x00974970 3b200a20 2020207d 200a2020 2020765f ; . } . v_ │ │ │ │ + 0x00974980 6c656e67 7468203d 20766563 33286c65 length = vec3(le │ │ │ │ + 0x00974990 6e2c2075 5f726f75 74655061 72616d73 n, u_routeParams │ │ │ │ + 0x009749a0 2e7a293b 200a2020 2020765f 636f6c6f .z); . v_colo │ │ │ │ + 0x009749b0 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ + 0x009749c0 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ + 0x009749d0 34287472 616e7366 6f726d65 64417869 4(transformedAxi │ │ │ │ + 0x009749e0 73506f73 2c20615f 706f7369 74696f6e sPos, a_position │ │ │ │ + 0x009749f0 2e7a2c20 312e3029 202a2075 5f70726f .z, 1.0) * u_pro │ │ │ │ + 0x00974a00 6a656374 696f6e3b 200a2020 2020676c jection; . gl │ │ │ │ + 0x00974a10 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x00974a20 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00974a30 706f732c 20755f70 69766f74 5472616e pos, u_pivotTran │ │ │ │ + 0x00974a40 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ + 0x00974a50 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x00974a60 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00974a70 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00974a80 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00974a90 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00974aa0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00974ab0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00974ac0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00974ad0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00974ae0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00974af0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00974b00 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00974b10 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00974b20 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00974b30 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00974b40 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00974b50 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00974b60 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00974b70 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00974b80 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00974b90 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00974ba0 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x00974bb0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00974bc0 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ + 0x00974bd0 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x00974be0 0a20206f 75742076 65633420 765f7261 . out vec4 v_ra │ │ │ │ + 0x00974bf0 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ + 0x00974c00 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ + 0x00974c10 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ + 0x00974c20 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ + 0x00974c30 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ + 0x00974c40 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00974c50 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ + 0x00974c60 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ + 0x00974c70 726d2076 65633420 755f726f 75746550 rm vec4 u_routeP │ │ │ │ + 0x00974c80 6172616d 733b200a 2020756e 69666f72 arams; . unifor │ │ │ │ + 0x00974c90 6d207665 63342075 5f636f6c 6f723b20 m vec4 u_color; │ │ │ │ + 0x00974ca0 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x00974cb0 755f6d61 736b436f 6c6f723b 200a2020 u_maskColor; . │ │ │ │ + 0x00974cc0 756e6966 6f726d20 76656334 20755f6f uniform vec4 u_o │ │ │ │ + 0x00974cd0 75746c69 6e65436f 6c6f723b 200a2020 utlineColor; . │ │ │ │ + 0x00974ce0 756e6966 6f726d20 76656334 20755f66 uniform vec4 u_f │ │ │ │ + 0x00974cf0 616b6543 6f6c6f72 3b200a20 20756e69 akeColor; . uni │ │ │ │ + 0x00974d00 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ + 0x00974d10 4f75746c 696e6543 6f6c6f72 3b200a20 OutlineColor; . │ │ │ │ + 0x00974d20 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x00974d30 66616b65 426f7264 6572733b 200a2020 fakeBorders; . │ │ │ │ + 0x00974d40 756e6966 6f726d20 76656332 20755f70 uniform vec2 u_p │ │ │ │ + 0x00974d50 61747465 726e3b20 0a202075 6e69666f attern; . unifo │ │ │ │ + 0x00974d60 726d2076 65633220 755f616e 676c6543 rm vec2 u_angleC │ │ │ │ + 0x00974d70 6f735369 6e3b200a 2020756e 69666f72 osSin; . unifor │ │ │ │ + 0x00974d80 6d20666c 6f617420 755f6172 726f7748 m float u_arrowH │ │ │ │ + 0x00974d90 616c6657 69647468 3b200a20 20756e69 alfWidth; . uni │ │ │ │ + 0x00974da0 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ + 0x00974db0 63697479 3b200a20 20636f6e 73742066 city; . const f │ │ │ │ + 0x00974dc0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x00974dd0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x00974de0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x00974df0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00974e00 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00974e10 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00974e20 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x00974e30 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x00974e40 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x00974e50 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x00974e60 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x00974e70 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x00974e80 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00974e90 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x00974ea0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x00974eb0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00974ec0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00974ed0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x00974ee0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00974ef0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x00974f00 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x00974f10 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00974f20 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00974f30 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x00974f40 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x00974f50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00974f60 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x00974f70 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x00974f80 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x00974f90 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x00974fa0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x00974fb0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x00974fc0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x00974fd0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x00974fe0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00974ff0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00975000 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00975010 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x00975020 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x00975030 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x00975040 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x00975050 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x00975060 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00975070 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00975080 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x00975090 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x009750a0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x009750b0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x009750c0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x009750d0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x009750e0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x009750f0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x00975100 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00975110 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x00975120 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x00975130 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x00975140 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x00975150 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x00975160 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00975170 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x00975180 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x00975190 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x009751a0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x009751b0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x009751c0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x009751d0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x009751e0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x009751f0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x00975200 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x00975210 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x00975220 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x00975230 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x00975240 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x00975250 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x00975260 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x00975270 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x00975280 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x00975290 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x009752a0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x009752b0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x009752c0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x009752d0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x009752e0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x009752f0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x00975300 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x00975310 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x00975320 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00975330 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x00975340 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x00975350 20207b20 0a202020 20666c6f 61742072 { . float r │ │ │ │ + 0x00975360 203d2075 5f726f75 74655061 72616d73 = u_routeParams │ │ │ │ + 0x00975370 2e78202a 20615f6e 6f726d61 6c2e7a3b .x * a_normal.z; │ │ │ │ + 0x00975380 200a2020 20207665 6332206e 6f726d61 . vec2 norma │ │ │ │ + 0x00975390 6c203d20 76656332 28615f6e 6f726d61 l = vec2(a_norma │ │ │ │ + 0x009753a0 6c2e7820 2a20755f 616e676c 65436f73 l.x * u_angleCos │ │ │ │ + 0x009753b0 53696e2e 78202d20 615f6e6f 726d616c Sin.x - a_normal │ │ │ │ + 0x009753c0 2e79202a 20755f61 6e676c65 436f7353 .y * u_angleCosS │ │ │ │ + 0x009753d0 696e2e79 2c200a20 20202020 20202020 in.y, . │ │ │ │ + 0x009753e0 20202020 20202020 20202020 2020615f a_ │ │ │ │ + 0x009753f0 6e6f726d 616c2e78 202a2075 5f616e67 normal.x * u_ang │ │ │ │ + 0x00975400 6c65436f 7353696e 2e79202b 20615f6e leCosSin.y + a_n │ │ │ │ + 0x00975410 6f726d61 6c2e7920 2a20755f 616e676c ormal.y * u_angl │ │ │ │ + 0x00975420 65436f73 53696e2e 78293b20 0a202020 eCosSin.x); . │ │ │ │ + 0x00975430 20766563 34207261 64697573 203d2076 vec4 radius = v │ │ │ │ + 0x00975440 65633428 6e6f726d 616c2e78 79202a20 ec4(normal.xy * │ │ │ │ + 0x00975450 722c2072 2c20615f 706f7369 74696f6e r, r, a_position │ │ │ │ + 0x00975460 2e77293b 200a2020 20207665 63342070 .w); . vec4 p │ │ │ │ + 0x00975470 6f73203d 20766563 3428615f 706f7369 os = vec4(a_posi │ │ │ │ + 0x00975480 74696f6e 2e78792c 20302c20 3129202a tion.xy, 0, 1) * │ │ │ │ + 0x00975490 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ + 0x009754a0 20202076 65633220 73686966 74656450 vec2 shiftedP │ │ │ │ + 0x009754b0 6f73203d 20726164 6975732e 7879202b os = radius.xy + │ │ │ │ + 0x009754c0 20706f73 2e78793b 200a2020 2020706f pos.xy; . po │ │ │ │ + 0x009754d0 73203d20 76656334 28736869 66746564 s = vec4(shifted │ │ │ │ + 0x009754e0 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ + 0x009754f0 7a2c2031 2e302920 2a20755f 70726f6a z, 1.0) * u_proj │ │ │ │ + 0x00975500 65637469 6f6e3b20 0a202020 20676c5f ection; . gl_ │ │ │ │ + 0x00975510 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ + 0x00975520 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ + 0x00975530 6f732c20 755f7069 766f7454 72616e73 os, u_pivotTrans │ │ │ │ + 0x00975540 666f726d 2c20302e 30293b20 0a202020 form, 0.0); . │ │ │ │ + 0x00975550 20765f72 61646975 73203d20 72616469 v_radius = radi │ │ │ │ + 0x00975560 75733b20 0a202020 20765f63 6f6c6f72 us; . v_color │ │ │ │ + 0x00975570 203d2061 5f636f6c 6f723b20 0a20207d = a_color; . } │ │ │ │ + 0x00975580 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x00975590 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x009755a0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009755b0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x009755c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009755d0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x009755e0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x009755f0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00975600 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00975610 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00975620 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00975630 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00975640 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00975650 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00975660 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00975670 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00975680 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00975690 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x009756a0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009756b0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x009756c0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x009756d0 0a202023 64656669 6e652054 494c455f . #define TILE_ │ │ │ │ + 0x009756e0 4241434b 47524f55 4e445f4d 41585f43 BACKGROUND_MAX_C │ │ │ │ + 0x009756f0 4f554e54 20363420 0a20206f 75742076 OUNT 64 . out v │ │ │ │ + 0x00975700 65633320 765f7465 78436f6f 7264733b ec3 v_texCoords; │ │ │ │ + 0x00975710 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00975720 20755f74 696c6543 6f6f7264 734d696e u_tileCoordsMin │ │ │ │ + 0x00975730 4d61785b 54494c45 5f424143 4b47524f Max[TILE_BACKGRO │ │ │ │ + 0x00975740 554e445f 4d41585f 434f554e 545d3b20 UND_MAX_COUNT]; │ │ │ │ + 0x00975750 0a202075 6e69666f 726d2069 6e742075 . uniform int u │ │ │ │ + 0x00975760 5f746578 74757265 496e6465 785b5449 _textureIndex[TI │ │ │ │ + 0x00975770 4c455f42 41434b47 524f554e 445f4d41 LE_BACKGROUND_MA │ │ │ │ + 0x00975780 585f434f 554e545d 3b200a20 20756e69 X_COUNT]; . uni │ │ │ │ + 0x00975790 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x009757a0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x009757b0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x009757c0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x009757d0 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ + 0x009757e0 73666f72 6d3b200a 2020636f 6e737420 sform; . const │ │ │ │ + 0x009757f0 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ + 0x00975800 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ + 0x00975810 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ + 0x00975820 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00975830 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00975840 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00975850 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ + 0x00975860 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00975870 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00975880 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ + 0x00975890 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ + 0x009758a0 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ + 0x009758b0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x009758c0 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ + 0x009758d0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x009758e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009758f0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00975900 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ + 0x00975910 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00975920 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ + 0x00975930 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ + 0x00975940 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00975950 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00975960 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ + 0x00975970 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ + 0x00975980 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00975990 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ + 0x009759a0 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ + 0x009759b0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x009759c0 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x009759d0 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ + 0x009759e0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ + 0x009759f0 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ + 0x00975a00 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ + 0x00975a10 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x00975a20 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00975a30 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00975a40 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ + 0x00975a50 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ + 0x00975a60 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ + 0x00975a70 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ + 0x00975a80 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ + 0x00975a90 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00975aa0 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ + 0x00975ab0 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ + 0x00975ac0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00975ad0 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ + 0x00975ae0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ + 0x00975af0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00975b00 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ + 0x00975b10 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ + 0x00975b20 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ + 0x00975b30 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00975b40 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ + 0x00975b50 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ + 0x00975b60 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ + 0x00975b70 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ + 0x00975b80 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ + 0x00975b90 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ + 0x00975ba0 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ + 0x00975bb0 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ + 0x00975bc0 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ + 0x00975bd0 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ + 0x00975be0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ + 0x00975bf0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00975c00 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00975c10 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ + 0x00975c20 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ + 0x00975c30 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x00975c40 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ + 0x00975c50 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ + 0x00975c60 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ + 0x00975c70 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ + 0x00975c80 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ + 0x00975c90 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ + 0x00975ca0 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ + 0x00975cb0 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ + 0x00975cc0 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x00975cd0 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ + 0x00975ce0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00975cf0 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ + 0x00975d00 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ + 0x00975d10 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00975d20 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ + 0x00975d30 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ + 0x00975d40 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ + 0x00975d50 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00975d60 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ + 0x00975d70 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ + 0x00975d80 0a20207b 200a2020 20207665 63322071 . { . vec2 q │ │ │ │ + 0x00975d90 75616456 65727465 78203d20 76656332 uadVertex = vec2 │ │ │ │ + 0x00975da0 28676c5f 56657274 65784944 20262031 (gl_VertexID & 1 │ │ │ │ + 0x00975db0 2c202867 6c5f5665 72746578 4944203e , (gl_VertexID > │ │ │ │ + 0x00975dc0 3e203129 20262031 293b200a 2020200a > 1) & 1); . . │ │ │ │ + 0x00975dd0 20202020 76656334 2074696c 65436f6f vec4 tileCoo │ │ │ │ + 0x00975de0 7264734d 696e4d61 78203d20 755f7469 rdsMinMax = u_ti │ │ │ │ + 0x00975df0 6c65436f 6f726473 4d696e4d 61785b67 leCoordsMinMax[g │ │ │ │ + 0x00975e00 6c5f496e 7374616e 63654944 5d3b200a l_InstanceID]; . │ │ │ │ + 0x00975e10 20202020 76656332 20776f72 6c64506f vec2 worldPo │ │ │ │ + 0x00975e20 73203d20 6d697828 74696c65 436f6f72 s = mix(tileCoor │ │ │ │ + 0x00975e30 64734d69 6e4d6178 2e78792c 2074696c dsMinMax.xy, til │ │ │ │ + 0x00975e40 65436f6f 7264734d 696e4d61 782e7a77 eCoordsMinMax.zw │ │ │ │ + 0x00975e50 2c207175 61645665 72746578 293b200a , quadVertex); . │ │ │ │ + 0x00975e60 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x00975e70 65633428 776f726c 64506f73 2c20302e ec4(worldPos, 0. │ │ │ │ + 0x00975e80 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ + 0x00975e90 6c566965 77202a20 755f7072 6f6a6563 lView * u_projec │ │ │ │ + 0x00975ea0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x00975eb0 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ + 0x00975ec0 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ + 0x00975ed0 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x00975ee0 726d2c20 302e3029 3b200a20 20200a20 rm, 0.0); . . │ │ │ │ + 0x00975ef0 20202076 5f746578 436f6f72 6473203d v_texCoords = │ │ │ │ + 0x00975f00 20766563 33287175 61645665 72746578 vec3(quadVertex │ │ │ │ + 0x00975f10 2c20666c 6f617428 755f7465 78747572 , float(u_textur │ │ │ │ + 0x00975f20 65496e64 65785b67 6c5f496e 7374616e eIndex[gl_Instan │ │ │ │ + 0x00975f30 63654944 5d29293b 200a2020 7d200a00 ceID])); . } .. │ │ │ │ + 0x00975f40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00975f50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00975f60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00975f70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00975f80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00975f90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00975fa0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00975fb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00975fc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00975fd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00975fe0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00975ff0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00976000 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00976010 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00976020 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00976030 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00976040 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00976050 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00976060 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00976070 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00976080 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00976090 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x009760a0 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x009760b0 72546578 436f6f72 64733b20 0a202069 rTexCoords; . i │ │ │ │ + 0x009760c0 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ + 0x009760d0 436f6f72 64733b20 0a202023 69666465 Coords; . #ifde │ │ │ │ + 0x009760e0 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x009760f0 6f757420 4c4f575f 50207665 63342076 out LOW_P vec4 v │ │ │ │ + 0x00976100 5f636f6c 6f723b20 0a202023 656c7365 _color; . #else │ │ │ │ + 0x00976110 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00976120 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00976130 20202365 6e646966 200a2020 6f757420 #endif . out │ │ │ │ + 0x00976140 76656332 20765f6d 61736b54 6578436f vec2 v_maskTexCo │ │ │ │ + 0x00976150 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ + 0x00976160 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ + 0x00976170 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ + 0x00976180 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ + 0x00976190 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x009761a0 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x009761b0 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ + 0x009761c0 63322075 5f636f6e 74726173 7447616d c2 u_contrastGam │ │ │ │ + 0x009761d0 6d613b20 0a202075 6e69666f 726d2066 ma; . uniform f │ │ │ │ + 0x009761e0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x009761f0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00976200 20755f7a 5363616c 653b200a 2020756e u_zScale; . un │ │ │ │ + 0x00976210 69666f72 6d20666c 6f617420 755f696e iform float u_in │ │ │ │ + 0x00976220 74657270 6f6c6174 696f6e3b 200a2020 terpolation; . │ │ │ │ + 0x00976230 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00976240 69734f75 746c696e 65506173 733b200a isOutlinePass; . │ │ │ │ + 0x00976250 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ + 0x00976260 56544620 0a202075 6e69666f 726d2073 VTF . uniform s │ │ │ │ + 0x00976270 616d706c 65723244 20755f63 6f6c6f72 ampler2D u_color │ │ │ │ + 0x00976280 5465783b 200a2020 23656e64 6966200a Tex; . #endif . │ │ │ │ + 0x00976290 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ + 0x009762a0 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ + 0x009762b0 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ + 0x009762c0 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ + 0x009762d0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x009762e0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x009762f0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00976300 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ + 0x00976310 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00976320 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00976330 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ + 0x00976340 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00976350 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ + 0x00976360 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ + 0x00976370 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ + 0x00976380 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ + 0x00976390 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ + 0x009763a0 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ + 0x009763b0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x009763c0 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ + 0x009763d0 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ + 0x009763e0 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ + 0x009763f0 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ + 0x00976400 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ + 0x00976410 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ + 0x00976420 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ + 0x00976430 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ + 0x00976440 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00976450 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ + 0x00976460 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ + 0x00976470 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00976480 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ + 0x00976490 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ + 0x009764a0 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ + 0x009764b0 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ + 0x009764c0 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x009764d0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x009764e0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x009764f0 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ + 0x00976500 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ + 0x00976510 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ + 0x00976520 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ + 0x00976530 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00976540 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00976550 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00976560 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ + 0x00976570 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ + 0x00976580 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ + 0x00976590 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ + 0x009765a0 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ + 0x009765b0 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ + 0x009765c0 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x009765d0 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ + 0x009765e0 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ + 0x009765f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00976600 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ + 0x00976610 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ + 0x00976620 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ + 0x00976630 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ + 0x00976640 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00976650 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ + 0x00976660 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ + 0x00976670 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ + 0x00976680 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ + 0x00976690 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ + 0x009766a0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x009766b0 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ + 0x009766c0 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ + 0x009766d0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x009766e0 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ + 0x009766f0 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ + 0x00976700 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ + 0x00976710 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ + 0x00976720 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ + 0x00976730 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ + 0x00976740 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ + 0x00976750 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ + 0x00976760 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ + 0x00976770 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ + 0x00976780 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ + 0x00976790 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ + 0x009767a0 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ + 0x009767b0 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x009767c0 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ + 0x009767d0 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ + 0x009767e0 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ + 0x009767f0 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ + 0x00976800 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x00976810 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ + 0x00976820 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ + 0x00976830 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ + 0x00976840 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ + 0x00976850 202a2075 5f6d6f64 656c5669 6577202a * u_modelView * │ │ │ │ + 0x00976860 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00976870 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x00976880 3d206170 706c7950 69766f74 5472616e = applyPivotTran │ │ │ │ + 0x00976890 73666f72 6d28706f 732c2075 5f706976 sform(pos, u_piv │ │ │ │ + 0x009768a0 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ + 0x009768b0 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ + 0x009768c0 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ + 0x009768d0 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ + 0x009768e0 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ + 0x009768f0 6f725465 78436f6f 72647329 3b200a20 orTexCoords); . │ │ │ │ + 0x00976900 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ + 0x00976910 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x00976920 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00976930 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00976940 765f6d61 736b5465 78436f6f 72647320 v_maskTexCoords │ │ │ │ + 0x00976950 3d20615f 6d61736b 54657843 6f6f7264 = a_maskTexCoord │ │ │ │ + 0x00976960 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ + 0x00976970 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00976980 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00976990 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009769a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009769b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009769c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x009769d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009769e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009769f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00976a00 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00976a10 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00976a20 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00976a30 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00976a40 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00976a50 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00976a60 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00976a70 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00976a80 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00976a90 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00976aa0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00976ab0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00976ac0 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ + 0x00976ad0 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ + 0x00976ae0 20206f75 74207665 63332076 5f6e6f72 out vec3 v_nor │ │ │ │ + 0x00976af0 6d616c3b 200a2020 756e6966 6f726d20 mal; . uniform │ │ │ │ + 0x00976b00 6d617434 20755f74 72616e73 666f726d mat4 u_transform │ │ │ │ + 0x00976b10 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00976b20 3420755f 6e6f726d 616c5472 616e7366 4 u_normalTransf │ │ │ │ + 0x00976b30 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00976b40 76656334 20755f63 6f6c6f72 3b200a20 vec4 u_color; . │ │ │ │ + 0x00976b50 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x00976b60 74657843 6f6f7264 466c6970 70696e67 texCoordFlipping │ │ │ │ + 0x00976b70 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x00976b80 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x00976b90 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x00976ba0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00976bb0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00976bc0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00976bd0 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00976be0 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x00976bf0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00976c00 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00976c10 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x00976c20 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x00976c30 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x00976c40 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00976c50 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x00976c60 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x00976c70 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x00976c80 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x00976c90 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x00976ca0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x00976cb0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00976cc0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x00976cd0 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x00976ce0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00976cf0 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x00976d00 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x00976d10 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00976d20 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x00976d30 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x00976d40 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x00976d50 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00976d60 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x00976d70 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x00976d80 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x00976d90 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00976da0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00976db0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00976dc0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00976dd0 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x00976de0 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x00976df0 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x00976e00 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x00976e10 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x00976e20 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00976e30 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00976e40 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x00976e50 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x00976e60 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x00976e70 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x00976e80 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x00976e90 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x00976ea0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00976eb0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x00976ec0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00976ed0 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x00976ee0 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x00976ef0 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x00976f00 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x00976f10 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x00976f20 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00976f30 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x00976f40 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x00976f50 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x00976f60 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x00976f70 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x00976f80 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00976f90 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x00976fa0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x00976fb0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x00976fc0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x00976fd0 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x00976fe0 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x00976ff0 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x00977000 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x00977010 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x00977020 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x00977030 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x00977040 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x00977050 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x00977060 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x00977070 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x00977080 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x00977090 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x009770a0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x009770b0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x009770c0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x009770d0 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x009770e0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x009770f0 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x00977100 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x00977110 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x00977120 6f6e203d 20755f74 72616e73 666f726d on = u_transform │ │ │ │ + 0x00977130 202a2076 65633428 615f706f 732c2031 * vec4(a_pos, 1 │ │ │ │ + 0x00977140 2e30293b 200a2020 2020765f 6e6f726d .0); . v_norm │ │ │ │ + 0x00977150 616c203d 206e6f72 6d616c69 7a652828 al = normalize(( │ │ │ │ + 0x00977160 755f6e6f 726d616c 5472616e 73666f72 u_normalTransfor │ │ │ │ + 0x00977170 6d202a20 76656334 28615f6e 6f726d61 m * vec4(a_norma │ │ │ │ + 0x00977180 6c2c2030 2e302929 2e78797a 293b200a l, 0.0)).xyz); . │ │ │ │ + 0x00977190 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x009771a0 3d20706f 73697469 6f6e3b20 0a202023 = position; . # │ │ │ │ + 0x009771b0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x009771c0 2020676c 5f506f73 6974696f 6e2e7920 gl_Position.y │ │ │ │ + 0x009771d0 3d202d67 6c5f506f 73697469 6f6e2e79 = -gl_Position.y │ │ │ │ + 0x009771e0 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x009771f0 6f6e2e7a 203d2028 676c5f50 6f736974 on.z = (gl_Posit │ │ │ │ + 0x00977200 696f6e2e 7a202b20 676c5f50 6f736974 ion.z + gl_Posit │ │ │ │ + 0x00977210 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ + 0x00977220 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ + 0x00977230 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00977240 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00977250 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00977260 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00977270 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00977280 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00977290 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009772a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009772b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x009772c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x009772d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009772e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009772f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00977300 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00977310 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00977320 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00977330 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00977340 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00977350 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00977360 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00977370 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00977380 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00977390 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x009773a0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x009773b0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x009773c0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x009773d0 5f565446 200a2020 6f757420 4c4f575f _VTF . out LOW_ │ │ │ │ + 0x009773e0 50207665 63342076 5f636f6c 6f723b20 P vec4 v_color; │ │ │ │ + 0x009773f0 0a202023 656c7365 200a2020 6f757420 . #else . out │ │ │ │ + 0x00977400 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00977410 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x00977420 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00977430 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00977440 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x00977450 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x00977460 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x00977470 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x00977480 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x00977490 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x009774a0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x009774b0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x009774c0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x009774d0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x009774e0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x009774f0 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x00977500 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x00977510 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ + 0x00977520 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x00977530 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x00977540 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x00977550 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ + 0x00977560 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x00977570 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x00977580 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x00977590 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x009775a0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x009775b0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x009775c0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x009775d0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x009775e0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x009775f0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00977600 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00977610 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00977620 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00977630 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00977640 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00977650 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00977660 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00977670 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x00977680 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00977690 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x009776a0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x009776b0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x009776c0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x009776d0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x009776e0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x009776f0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00977700 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x00977710 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x00977720 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00977730 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00977740 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00977750 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00977760 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x00977770 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00977780 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00977790 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x009777a0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x009777b0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x009777c0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x009777d0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x009777e0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x009777f0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00977800 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00977810 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00977820 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00977830 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00977840 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x00977850 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x00977860 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00977870 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x00977880 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x00977890 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x009778a0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x009778b0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x009778c0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x009778d0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x009778e0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x009778f0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00977900 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00977910 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00977920 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00977930 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00977940 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x00977950 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x00977960 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x00977970 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00977980 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x00977990 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x009779a0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x009779b0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x009779c0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x009779d0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x009779e0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x009779f0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00977a00 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00977a10 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00977a20 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00977a30 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00977a40 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00977a50 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00977a60 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x00977a70 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x00977a80 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x00977a90 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x00977aa0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x00977ab0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x00977ac0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00977ad0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00977ae0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00977af0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00977b00 206e6f72 6d616c20 3d20615f 6e6f726d normal = a_norm │ │ │ │ + 0x00977b10 616c2e78 793b200a 20202020 666c6f61 al.xy; . floa │ │ │ │ + 0x00977b20 74206861 6c665769 64746820 3d206c65 t halfWidth = le │ │ │ │ + 0x00977b30 6e677468 286e6f72 6d616c29 3b200a20 ngth(normal); . │ │ │ │ + 0x00977b40 20202076 65633220 7472616e 73666f72 vec2 transfor │ │ │ │ + 0x00977b50 6d656441 78697350 6f73203d 20287665 medAxisPos = (ve │ │ │ │ + 0x00977b60 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x00977b70 2c20302e 302c2031 2e302920 2a20755f , 0.0, 1.0) * u_ │ │ │ │ + 0x00977b80 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x00977b90 20202020 69662028 68616c66 57696474 if (halfWidt │ │ │ │ + 0x00977ba0 6820213d 20302e30 29200a20 2020207b h != 0.0) . { │ │ │ │ + 0x00977bb0 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ + 0x00977bc0 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ + 0x00977bd0 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x00977be0 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ + 0x00977bf0 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ + 0x00977c00 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ + 0x00977c10 616c2c20 0a202020 20202020 20202020 al, . │ │ │ │ + 0x00977c20 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00977c30 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00977c40 20202020 20202020 20202075 5f6d6f64 u_mod │ │ │ │ + 0x00977c50 656c5669 65772c20 68616c66 57696474 elView, halfWidt │ │ │ │ + 0x00977c60 68293b20 0a202020 207d200a 20202369 h); . } . #i │ │ │ │ + 0x00977c70 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00977c80 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ + 0x00977c90 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ + 0x00977ca0 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ + 0x00977cb0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ + 0x00977cc0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00977cd0 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ + 0x00977ce0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x00977cf0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x00977d00 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00977d10 41786973 506f732c 20615f70 6f736974 AxisPos, a_posit │ │ │ │ + 0x00977d20 696f6e2e 7a2c2031 2e302920 2a20755f ion.z, 1.0) * u_ │ │ │ │ + 0x00977d30 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ + 0x00977d40 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x00977d50 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00977d60 726d2870 6f732c20 755f7069 766f7454 rm(pos, u_pivotT │ │ │ │ + 0x00977d70 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ + 0x00977d80 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ + 0x00977d90 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00977da0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00977db0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00977dc0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00977dd0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00977de0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00977df0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00977e00 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00977e10 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00977e20 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00977e30 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00977e40 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00977e50 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00977e60 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00977e70 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00977e80 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00977e90 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00977ea0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00977eb0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00977ec0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00977ed0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00977ee0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00977ef0 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ + 0x00977f00 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00977f10 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x00977f20 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00977f30 6f6f7264 733b200a 20206f75 7420666c oords; . out fl │ │ │ │ + 0x00977f40 6f617420 765f696e 74656e73 6974793b oat v_intensity; │ │ │ │ + 0x00977f50 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00977f60 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ + 0x00977f70 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00977f80 70726f6a 65637469 6f6e3b20 0a202075 projection; . u │ │ │ │ + 0x00977f90 6e69666f 726d206d 61743420 755f7069 niform mat4 u_pi │ │ │ │ + 0x00977fa0 766f7454 72616e73 666f726d 3b200a20 votTransform; . │ │ │ │ + 0x00977fb0 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x00977fc0 636f6e74 72617374 47616d6d 613b200a contrastGamma; . │ │ │ │ + 0x00977fd0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00977fe0 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ + 0x00977ff0 69666f72 6d20666c 6f617420 755f7a53 iform float u_zS │ │ │ │ + 0x00978000 63616c65 3b200a20 20756e69 666f726d cale; . uniform │ │ │ │ + 0x00978010 20666c6f 61742075 5f696e74 6572706f float u_interpo │ │ │ │ + 0x00978020 6c617469 6f6e3b20 0a202075 6e69666f lation; . unifo │ │ │ │ + 0x00978030 726d2066 6c6f6174 20755f69 734f7574 rm float u_isOut │ │ │ │ + 0x00978040 6c696e65 50617373 3b200a20 20636f6e linePass; . con │ │ │ │ + 0x00978050 73742076 65633420 6b4e6f72 6d616c69 st vec4 kNormali │ │ │ │ + 0x00978060 7a65644c 69676874 44697220 3d207665 zedLightDir = ve │ │ │ │ + 0x00978070 63342830 2e333136 322c2030 2e302c20 c4(0.3162, 0.0, │ │ │ │ + 0x00978080 302e3934 38362c20 302e3029 3b200a20 0.9486, 0.0); . │ │ │ │ + 0x00978090 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x009780a0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x009780b0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x009780c0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x009780d0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x009780e0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x009780f0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00978100 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00978110 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00978120 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00978130 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00978140 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00978150 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00978160 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00978170 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00978180 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00978190 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x009781a0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x009781b0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x009781c0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x009781d0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x009781e0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x009781f0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00978200 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00978210 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00978220 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00978230 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00978240 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00978250 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00978260 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00978270 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00978280 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00978290 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x009782a0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x009782b0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x009782c0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x009782d0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x009782e0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x009782f0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00978300 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00978310 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00978320 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00978330 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00978340 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00978350 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00978360 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00978370 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00978380 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00978390 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x009783a0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x009783b0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x009783c0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x009783d0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x009783e0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x009783f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00978400 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00978410 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00978420 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00978430 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00978440 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00978450 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00978460 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00978470 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00978480 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00978490 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x009784a0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x009784b0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x009784c0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x009784d0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x009784e0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x009784f0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00978500 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00978510 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00978520 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00978530 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00978540 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00978550 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00978560 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00978570 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00978580 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00978590 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x009785a0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x009785b0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x009785c0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x009785d0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x009785e0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x009785f0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00978600 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00978610 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00978620 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00978630 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ + 0x00978640 28615f70 6f736974 696f6e2c 20312e30 (a_position, 1.0 │ │ │ │ + 0x00978650 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x00978660 200a2020 20207665 6334206e 6f726d61 . vec4 norma │ │ │ │ + 0x00978670 6c203d20 76656334 28615f70 6f736974 l = vec4(a_posit │ │ │ │ + 0x00978680 696f6e20 2b20615f 6e6f726d 616c2c20 ion + a_normal, │ │ │ │ + 0x00978690 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ + 0x009786a0 65773b20 0a202020 206e6f72 6d616c2e ew; . normal. │ │ │ │ + 0x009786b0 78797720 3d20286e 6f726d61 6c202a20 xyw = (normal * │ │ │ │ + 0x009786c0 755f7072 6f6a6563 74696f6e 292e7879 u_projection).xy │ │ │ │ + 0x009786d0 773b200a 20202020 6e6f726d 616c2e7a w; . normal.z │ │ │ │ + 0x009786e0 203d206e 6f726d61 6c2e7a20 2a20755f = normal.z * u_ │ │ │ │ + 0x009786f0 7a536361 6c653b20 0a202020 20706f73 zScale; . pos │ │ │ │ + 0x00978700 2e787977 203d2028 706f7320 2a20755f .xyw = (pos * u_ │ │ │ │ + 0x00978710 70726f6a 65637469 6f6e292e 7879773b projection).xyw; │ │ │ │ + 0x00978720 200a2020 2020706f 732e7a20 3d20615f . pos.z = a_ │ │ │ │ + 0x00978730 706f7369 74696f6e 2e7a202a 20755f7a position.z * u_z │ │ │ │ + 0x00978740 5363616c 653b200a 20202020 76656334 Scale; . vec4 │ │ │ │ + 0x00978750 206e6f72 6d446972 203d206e 6f726d61 normDir = norma │ │ │ │ + 0x00978760 6c202d20 706f733b 200a2020 20206966 l - pos; . if │ │ │ │ + 0x00978770 2028646f 74286e6f 726d4469 722c206e (dot(normDir, n │ │ │ │ + 0x00978780 6f726d44 69722920 213d2030 2e302920 ormDir) != 0.0) │ │ │ │ + 0x00978790 0a202020 20202076 5f696e74 656e7369 . v_intensi │ │ │ │ + 0x009787a0 7479203d 206d6178 28302e30 2c202d64 ty = max(0.0, -d │ │ │ │ + 0x009787b0 6f74286b 4e6f726d 616c697a 65644c69 ot(kNormalizedLi │ │ │ │ + 0x009787c0 67687444 69722c20 6e6f726d 616c697a ghtDir, normaliz │ │ │ │ + 0x009787d0 65286e6f 726d4469 72292929 3b200a20 e(normDir))); . │ │ │ │ + 0x009787e0 20202065 6c736520 0a202020 20202076 else . v │ │ │ │ + 0x009787f0 5f696e74 656e7369 7479203d 20302e30 _intensity = 0.0 │ │ │ │ + 0x00978800 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x00978810 6f6e203d 20755f70 69766f74 5472616e on = u_pivotTran │ │ │ │ + 0x00978820 73666f72 6d202a20 706f733b 200a2020 sform * pos; . │ │ │ │ + 0x00978830 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00978840 20202067 6c5f506f 73697469 6f6e2e79 gl_Position.y │ │ │ │ + 0x00978850 203d202d 676c5f50 6f736974 696f6e2e = -gl_Position. │ │ │ │ + 0x00978860 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ + 0x00978870 696f6e2e 7a203d20 28676c5f 506f7369 ion.z = (gl_Posi │ │ │ │ + 0x00978880 74696f6e 2e7a2020 2b20676c 5f506f73 tion.z + gl_Pos │ │ │ │ + 0x00978890 6974696f 6e2e7729 202a2030 2e353b20 ition.w) * 0.5; │ │ │ │ + 0x009788a0 0a202023 656e6469 66200a20 20202076 . #endif . v │ │ │ │ + 0x009788b0 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ + 0x009788c0 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ + 0x009788d0 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ + 0x009788e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009788f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00978900 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00978910 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00978920 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00978930 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00978940 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00978950 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00978960 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00978970 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00978980 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00978990 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009789a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009789b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009789c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009789d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009789e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009789f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00978a00 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00978a10 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00978a20 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00978a30 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ + 0x00978a40 696e2076 65633420 765f6f66 66736574 in vec4 v_offset │ │ │ │ + 0x00978a50 303b200a 2020696e 20766563 3420765f 0; . in vec4 v_ │ │ │ │ + 0x00978a60 6f666673 6574313b 200a2020 696e2076 offset1; . in v │ │ │ │ + 0x00978a70 65633420 765f6f66 66736574 323b200a ec4 v_offset2; . │ │ │ │ + 0x00978a80 20206f75 74207665 63342076 5f467261 out vec4 v_Fra │ │ │ │ + 0x00978a90 67436f6c 6f723b20 0a202075 6e69666f gColor; . unifo │ │ │ │ + 0x00978aa0 726d2076 65633420 755f6672 616d6562 rm vec4 u_frameb │ │ │ │ + 0x00978ab0 75666665 724d6574 72696373 3b200a20 ufferMetrics; . │ │ │ │ + 0x00978ac0 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x00978ad0 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x00978ae0 2020756e 69666f72 6d207361 6d706c65 uniform sample │ │ │ │ + 0x00978af0 72324420 755f736d 61614172 65613b20 r2D u_smaaArea; │ │ │ │ + 0x00978b00 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x00978b10 65723244 20755f73 6d616153 65617263 er2D u_smaaSearc │ │ │ │ + 0x00978b20 683b200a 20202364 6566696e 6520534d h; . #define SM │ │ │ │ + 0x00978b30 41415f53 45415243 48544558 5f53495a AA_SEARCHTEX_SIZ │ │ │ │ + 0x00978b40 45207665 63322836 362e302c 2033332e E vec2(66.0, 33. │ │ │ │ + 0x00978b50 3029200a 20202364 6566696e 6520534d 0) . #define SM │ │ │ │ + 0x00978b60 41415f53 45415243 48544558 5f504143 AA_SEARCHTEX_PAC │ │ │ │ + 0x00978b70 4b45445f 53495a45 20766563 32283634 KED_SIZE vec2(64 │ │ │ │ + 0x00978b80 2e302c20 31362e30 29200a20 20236465 .0, 16.0) . #de │ │ │ │ + 0x00978b90 66696e65 20534d41 415f4152 45415445 fine SMAA_AREATE │ │ │ │ + 0x00978ba0 585f4d41 585f4449 5354414e 43452031 X_MAX_DISTANCE 1 │ │ │ │ + 0x00978bb0 362e3020 0a202023 64656669 6e652053 6.0 . #define S │ │ │ │ + 0x00978bc0 4d41415f 41524541 5445585f 50495845 MAA_AREATEX_PIXE │ │ │ │ + 0x00978bd0 4c5f5349 5a452028 76656332 28312e30 L_SIZE (vec2(1.0 │ │ │ │ + 0x00978be0 202f2032 35362e30 2c20312e 30202f20 / 256.0, 1.0 / │ │ │ │ + 0x00978bf0 31303234 2e302929 200a2020 23646566 1024.0)) . #def │ │ │ │ + 0x00978c00 696e6520 534d4141 4c6f6f70 42656769 ine SMAALoopBegi │ │ │ │ + 0x00978c10 6e28636f 6e646974 696f6e29 20776869 n(condition) whi │ │ │ │ + 0x00978c20 6c652028 636f6e64 6974696f 6e29207b le (condition) { │ │ │ │ + 0x00978c30 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ + 0x00978c40 4c6f6f70 456e6420 7d200a20 20236465 LoopEnd } . #de │ │ │ │ + 0x00978c50 66696e65 20534d41 4153616d 706c654c fine SMAASampleL │ │ │ │ + 0x00978c60 6576656c 5a65726f 28746578 2c20636f evelZero(tex, co │ │ │ │ + 0x00978c70 6f726429 20746578 74757265 4c6f6428 ord) textureLod( │ │ │ │ + 0x00978c80 7465782c 20636f6f 72642c20 302e3029 tex, coord, 0.0) │ │ │ │ + 0x00978c90 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ + 0x00978ca0 53616d70 6c654c65 76656c5a 65726f4f SampleLevelZeroO │ │ │ │ + 0x00978cb0 66667365 74287465 782c2063 6f6f7264 ffset(tex, coord │ │ │ │ + 0x00978cc0 2c206f66 66736574 29207465 78747572 , offset) textur │ │ │ │ + 0x00978cd0 654c6f64 4f666673 65742874 65782c20 eLodOffset(tex, │ │ │ │ + 0x00978ce0 636f6f72 642c2030 2e302c20 6f666673 coord, 0.0, offs │ │ │ │ + 0x00978cf0 65742920 0a202023 64656669 6e652053 et) . #define S │ │ │ │ + 0x00978d00 4d414152 6f756e64 28762920 726f756e MAARound(v) roun │ │ │ │ + 0x00978d10 64282876 2929200a 20202364 6566696e d((v)) . #defin │ │ │ │ + 0x00978d20 6520534d 41414f66 66736574 28782c79 e SMAAOffset(x,y │ │ │ │ + 0x00978d30 29206976 65633228 782c7929 200a2020 ) ivec2(x,y) . │ │ │ │ + 0x00978d40 636f6e73 74207665 6332206b 41726561 const vec2 kArea │ │ │ │ + 0x00978d50 5465784d 61784469 7374616e 6365203d TexMaxDistance = │ │ │ │ + 0x00978d60 20766563 3228534d 41415f41 52454154 vec2(SMAA_AREAT │ │ │ │ + 0x00978d70 45585f4d 41585f44 49535441 4e43452c EX_MAX_DISTANCE, │ │ │ │ + 0x00978d80 20534d41 415f4152 45415445 585f4d41 SMAA_AREATEX_MA │ │ │ │ + 0x00978d90 585f4449 5354414e 4345293b 200a2020 X_DISTANCE); . │ │ │ │ + 0x00978da0 636f6e73 7420666c 6f617420 6b416374 const float kAct │ │ │ │ + 0x00978db0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x00978dc0 203d2030 2e383238 313b200a 2020666c = 0.8281; . fl │ │ │ │ + 0x00978dd0 6f617420 534d4141 53656172 63684c65 oat SMAASearchLe │ │ │ │ + 0x00978de0 6e677468 28766563 3220652c 20666c6f ngth(vec2 e, flo │ │ │ │ + 0x00978df0 6174206f 66667365 7429200a 20207b20 at offset) . { │ │ │ │ + 0x00978e00 0a202020 20766563 32207363 616c6520 . vec2 scale │ │ │ │ + 0x00978e10 3d20534d 41415f53 45415243 48544558 = SMAA_SEARCHTEX │ │ │ │ + 0x00978e20 5f53495a 45202a20 76656332 28302e35 _SIZE * vec2(0.5 │ │ │ │ + 0x00978e30 2c202d31 2e30293b 200a2020 20207665 , -1.0); . ve │ │ │ │ + 0x00978e40 63322062 69617320 3d20534d 41415f53 c2 bias = SMAA_S │ │ │ │ + 0x00978e50 45415243 48544558 5f53495a 45202a20 EARCHTEX_SIZE * │ │ │ │ + 0x00978e60 76656332 286f6666 7365742c 20312e30 vec2(offset, 1.0 │ │ │ │ + 0x00978e70 293b200a 20202020 7363616c 65202b3d ); . scale += │ │ │ │ + 0x00978e80 20766563 32282d31 2e302c20 20312e30 vec2(-1.0, 1.0 │ │ │ │ + 0x00978e90 293b200a 20202020 62696173 202b3d20 ); . bias += │ │ │ │ + 0x00978ea0 76656332 2820302e 352c202d 302e3529 vec2( 0.5, -0.5) │ │ │ │ + 0x00978eb0 3b200a20 20202073 63616c65 202a3d20 ; . scale *= │ │ │ │ + 0x00978ec0 312e3020 2f20534d 41415f53 45415243 1.0 / SMAA_SEARC │ │ │ │ + 0x00978ed0 48544558 5f504143 4b45445f 53495a45 HTEX_PACKED_SIZE │ │ │ │ + 0x00978ee0 3b200a20 20202062 69617320 2a3d2031 ; . bias *= 1 │ │ │ │ + 0x00978ef0 2e30202f 20534d41 415f5345 41524348 .0 / SMAA_SEARCH │ │ │ │ + 0x00978f00 5445585f 5041434b 45445f53 495a453b TEX_PACKED_SIZE; │ │ │ │ + 0x00978f10 200a2020 20207265 7475726e 20534d41 . return SMA │ │ │ │ + 0x00978f20 4153616d 706c654c 6576656c 5a65726f ASampleLevelZero │ │ │ │ + 0x00978f30 28755f73 6d616153 65617263 682c2073 (u_smaaSearch, s │ │ │ │ + 0x00978f40 63616c65 202a2065 202b2062 69617329 cale * e + bias) │ │ │ │ + 0x00978f50 2e723b20 0a20207d 200a2020 666c6f61 .r; . } . floa │ │ │ │ + 0x00978f60 7420534d 41415365 61726368 584c6566 t SMAASearchXLef │ │ │ │ + 0x00978f70 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ + 0x00978f80 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ + 0x00978f90 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ + 0x00978fa0 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ + 0x00978fb0 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ + 0x00978fc0 6e287465 78636f6f 72642e78 203e2065 n(texcoord.x > e │ │ │ │ + 0x00978fd0 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ + 0x00978fe0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x00978ff0 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ + 0x00979000 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ + 0x00979010 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ + 0x00979020 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ + 0x00979030 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ + 0x00979040 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ + 0x00979050 2d322e30 2c20302e 3029202a 20755f66 -2.0, 0.0) * u_f │ │ │ │ + 0x00979060 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ + 0x00979070 732e7879 202b2074 6578636f 6f72643b s.xy + texcoord; │ │ │ │ + 0x00979080 200a2020 2020534d 41414c6f 6f70456e . SMAALoopEn │ │ │ │ + 0x00979090 64200a20 20202066 6c6f6174 206f6666 d . float off │ │ │ │ + 0x009790a0 73657420 3d20332e 3235202d 20283235 set = 3.25 - (25 │ │ │ │ + 0x009790b0 352e3020 2f203132 372e3029 202a2053 5.0 / 127.0) * S │ │ │ │ + 0x009790c0 4d414153 65617263 684c656e 67746828 MAASearchLength( │ │ │ │ + 0x009790d0 652c2030 2e30293b 200a2020 20207265 e, 0.0); . re │ │ │ │ + 0x009790e0 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ + 0x009790f0 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ + 0x00979100 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x00979110 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ + 0x00979120 20534d41 41536561 72636858 52696768 SMAASearchXRigh │ │ │ │ + 0x00979130 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ + 0x00979140 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ + 0x00979150 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ + 0x00979160 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ + 0x00979170 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ + 0x00979180 6e287465 78636f6f 72642e78 203c2065 n(texcoord.x < e │ │ │ │ + 0x00979190 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ + 0x009791a0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x009791b0 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ + 0x009791c0 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ + 0x009791d0 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ + 0x009791e0 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ + 0x009791f0 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ + 0x00979200 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ + 0x00979210 322e302c 20302e30 29202a20 755f6672 2.0, 0.0) * u_fr │ │ │ │ + 0x00979220 616d6562 75666665 724d6574 72696373 amebufferMetrics │ │ │ │ + 0x00979230 2e787920 2b207465 78636f6f 72643b20 .xy + texcoord; │ │ │ │ + 0x00979240 0a202020 20534d41 414c6f6f 70456e64 . SMAALoopEnd │ │ │ │ + 0x00979250 200a2020 2020666c 6f617420 6f666673 . float offs │ │ │ │ + 0x00979260 6574203d 20332e32 35202d20 28323535 et = 3.25 - (255 │ │ │ │ + 0x00979270 2e30202f 20313237 2e302920 2a20534d .0 / 127.0) * SM │ │ │ │ + 0x00979280 41415365 61726368 4c656e67 74682865 AASearchLength(e │ │ │ │ + 0x00979290 2c20302e 35293b20 0a202020 20726574 , 0.5); . ret │ │ │ │ + 0x009792a0 75726e20 2d755f66 72616d65 62756666 urn -u_framebuff │ │ │ │ + 0x009792b0 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ + 0x009792c0 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x009792d0 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ + 0x009792e0 20534d41 41536561 72636859 55702876 SMAASearchYUp(v │ │ │ │ + 0x009792f0 65633220 74657863 6f6f7264 2c20666c ec2 texcoord, fl │ │ │ │ + 0x00979300 6f617420 656e6429 200a2020 7b200a20 oat end) . { . │ │ │ │ + 0x00979310 20202076 65633220 65203d20 76656332 vec2 e = vec2 │ │ │ │ + 0x00979320 28312e30 2c20302e 30293b20 0a202020 (1.0, 0.0); . │ │ │ │ + 0x00979330 20534d41 414c6f6f 70426567 696e2874 SMAALoopBegin(t │ │ │ │ + 0x00979340 6578636f 6f72642e 79203e20 656e6420 excoord.y > end │ │ │ │ + 0x00979350 26262065 2e72203e 206b4163 74697661 && e.r > kActiva │ │ │ │ + 0x00979360 74696f6e 54687265 73686f6c 64202626 tionThreshold && │ │ │ │ + 0x00979370 20652e67 203d3d20 302e3029 200a2020 e.g == 0.0) . │ │ │ │ + 0x00979380 20202020 65203d20 534d4141 53616d70 e = SMAASamp │ │ │ │ + 0x00979390 6c654c65 76656c5a 65726f28 755f636f leLevelZero(u_co │ │ │ │ + 0x009793a0 6c6f7254 65782c20 74657863 6f6f7264 lorTex, texcoord │ │ │ │ + 0x009793b0 292e7267 3b200a20 20202020 20746578 ).rg; . tex │ │ │ │ + 0x009793c0 636f6f72 64203d20 76656332 28302e30 coord = vec2(0.0 │ │ │ │ + 0x009793d0 2c202d32 2e302920 2a20755f 6672616d , -2.0) * u_fram │ │ │ │ + 0x009793e0 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x009793f0 79202b20 74657863 6f6f7264 3b200a20 y + texcoord; . │ │ │ │ + 0x00979400 20202053 4d41414c 6f6f7045 6e64200a SMAALoopEnd . │ │ │ │ + 0x00979410 20202020 666c6f61 74206f66 66736574 float offset │ │ │ │ + 0x00979420 203d2033 2e323520 2d202832 35352e30 = 3.25 - (255.0 │ │ │ │ + 0x00979430 202f2031 32372e30 29202a20 534d4141 / 127.0) * SMAA │ │ │ │ + 0x00979440 53656172 63684c65 6e677468 28652e67 SearchLength(e.g │ │ │ │ + 0x00979450 722c2030 2e30293b 200a2020 20207265 r, 0.0); . re │ │ │ │ + 0x00979460 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ + 0x00979470 65724d65 74726963 732e7920 2a206f66 erMetrics.y * of │ │ │ │ + 0x00979480 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x00979490 793b200a 20207d20 0a202066 6c6f6174 y; . } . float │ │ │ │ + 0x009794a0 20534d41 41536561 72636859 446f776e SMAASearchYDown │ │ │ │ + 0x009794b0 28766563 32207465 78636f6f 72642c20 (vec2 texcoord, │ │ │ │ + 0x009794c0 666c6f61 7420656e 6429200a 20207b20 float end) . { │ │ │ │ + 0x009794d0 0a202020 20766563 32206520 3d207665 . vec2 e = ve │ │ │ │ + 0x009794e0 63322831 2e302c20 302e3029 3b200a20 c2(1.0, 0.0); . │ │ │ │ + 0x009794f0 20202053 4d41414c 6f6f7042 6567696e SMAALoopBegin │ │ │ │ + 0x00979500 28746578 636f6f72 642e7920 3c20656e (texcoord.y < en │ │ │ │ + 0x00979510 64202626 20652e72 203e206b 41637469 d && e.r > kActi │ │ │ │ + 0x00979520 76617469 6f6e5468 72657368 6f6c6420 vationThreshold │ │ │ │ + 0x00979530 26262065 2e67203d 3d20302e 3029200a && e.g == 0.0) . │ │ │ │ + 0x00979540 20202020 20206520 3d20534d 41415361 e = SMAASa │ │ │ │ + 0x00979550 6d706c65 4c657665 6c5a6572 6f28755f mpleLevelZero(u_ │ │ │ │ + 0x00979560 636f6c6f 72546578 2c207465 78636f6f colorTex, texcoo │ │ │ │ + 0x00979570 7264292e 72673b20 0a202020 20202074 rd).rg; . t │ │ │ │ + 0x00979580 6578636f 6f726420 3d207665 63322830 excoord = vec2(0 │ │ │ │ + 0x00979590 2e302c20 322e3029 202a2075 5f667261 .0, 2.0) * u_fra │ │ │ │ + 0x009795a0 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ + 0x009795b0 7879202b 20746578 636f6f72 643b200a xy + texcoord; . │ │ │ │ + 0x009795c0 20202020 534d4141 4c6f6f70 456e6420 SMAALoopEnd │ │ │ │ + 0x009795d0 0a202020 20666c6f 6174206f 66667365 . float offse │ │ │ │ + 0x009795e0 74203d20 332e3235 202d2028 3235352e t = 3.25 - (255. │ │ │ │ + 0x009795f0 30202f20 3132372e 3029202a 20534d41 0 / 127.0) * SMA │ │ │ │ + 0x00979600 41536561 7263684c 656e6774 6828652e ASearchLength(e. │ │ │ │ + 0x00979610 67722c20 302e3529 3b200a20 20202072 gr, 0.5); . r │ │ │ │ + 0x00979620 65747572 6e202d75 5f667261 6d656275 eturn -u_framebu │ │ │ │ + 0x00979630 66666572 4d657472 6963732e 79202a20 fferMetrics.y * │ │ │ │ + 0x00979640 6f666673 6574202b 20746578 636f6f72 offset + texcoor │ │ │ │ + 0x00979650 642e793b 200a2020 7d200a20 20766563 d.y; . } . vec │ │ │ │ + 0x00979660 3220534d 41414172 65612876 65633220 2 SMAAArea(vec2 │ │ │ │ + 0x00979670 64697374 2c20666c 6f617420 65312c20 dist, float e1, │ │ │ │ + 0x00979680 666c6f61 74206532 29200a20 207b200a float e2) . { . │ │ │ │ + 0x00979690 20202020 76656332 20746578 636f6f72 vec2 texcoor │ │ │ │ + 0x009796a0 64203d20 6b417265 61546578 4d617844 d = kAreaTexMaxD │ │ │ │ + 0x009796b0 69737461 6e636520 2a20534d 4141526f istance * SMAARo │ │ │ │ + 0x009796c0 756e6428 342e3020 2a207665 63322865 und(4.0 * vec2(e │ │ │ │ + 0x009796d0 312c2065 32292920 2b206469 73743b20 1, e2)) + dist; │ │ │ │ + 0x009796e0 0a202020 20746578 636f6f72 64203d20 . texcoord = │ │ │ │ + 0x009796f0 534d4141 5f415245 41544558 5f504958 SMAA_AREATEX_PIX │ │ │ │ + 0x00979700 454c5f53 495a4520 2a202874 6578636f EL_SIZE * (texco │ │ │ │ + 0x00979710 6f726420 2b20302e 35293b20 0a202020 ord + 0.5); . │ │ │ │ + 0x00979720 20726574 75726e20 534d4141 53616d70 return SMAASamp │ │ │ │ + 0x00979730 6c654c65 76656c5a 65726f28 755f736d leLevelZero(u_sm │ │ │ │ + 0x00979740 61614172 65612c20 74657863 6f6f7264 aaArea, texcoord │ │ │ │ + 0x00979750 292e7267 3b200a20 207d200a 2020636f ).rg; . } . co │ │ │ │ + 0x00979760 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x00979770 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x00979780 30302e30 3b200a20 20766f69 64206d61 00.0; . void ma │ │ │ │ + 0x00979790 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ + 0x009797a0 65633420 77656967 68747320 3d207665 ec4 weights = ve │ │ │ │ + 0x009797b0 63342830 2e302c20 302e302c 20302e30 c4(0.0, 0.0, 0.0 │ │ │ │ + 0x009797c0 2c20302e 30293b20 0a202020 20766563 , 0.0); . vec │ │ │ │ + 0x009797d0 32206520 3d207465 78747572 6528755f 2 e = texture(u_ │ │ │ │ + 0x009797e0 636f6c6f 72546578 2c20765f 636f6f72 colorTex, v_coor │ │ │ │ + 0x009797f0 64732e78 79292e72 673b200a 20202020 ds.xy).rg; . │ │ │ │ + 0x00979800 69662028 652e6720 3e20302e 3029202f if (e.g > 0.0) / │ │ │ │ + 0x00979810 2f204564 67652061 74206e6f 72746820 / Edge at north │ │ │ │ + 0x00979820 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ + 0x00979830 63322064 3b200a20 20202020 20766563 c2 d; . vec │ │ │ │ + 0x00979840 3320636f 6f726473 3b200a20 20202020 3 coords; . │ │ │ │ + 0x00979850 20636f6f 7264732e 78203d20 534d4141 coords.x = SMAA │ │ │ │ + 0x00979860 53656172 6368584c 65667428 765f6f66 SearchXLeft(v_of │ │ │ │ + 0x00979870 66736574 302e7879 2c20765f 6f666673 fset0.xy, v_offs │ │ │ │ + 0x00979880 6574322e 78293b20 0a202020 20202063 et2.x); . c │ │ │ │ + 0x00979890 6f6f7264 732e7920 3d20765f 6f666673 oords.y = v_offs │ │ │ │ + 0x009798a0 6574312e 793b200a 20202020 2020642e et1.y; . d. │ │ │ │ + 0x009798b0 78203d20 636f6f72 64732e78 3b200a20 x = coords.x; . │ │ │ │ + 0x009798c0 20202020 20666c6f 61742065 31203d20 float e1 = │ │ │ │ + 0x009798d0 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ + 0x009798e0 65726f28 755f636f 6c6f7254 65782c20 ero(u_colorTex, │ │ │ │ + 0x009798f0 636f6f72 64732e78 79292e72 3b200a20 coords.xy).r; . │ │ │ │ + 0x00979900 20202020 20636f6f 7264732e 7a203d20 coords.z = │ │ │ │ + 0x00979910 534d4141 53656172 63685852 69676874 SMAASearchXRight │ │ │ │ + 0x00979920 28765f6f 66667365 74302e7a 772c2076 (v_offset0.zw, v │ │ │ │ + 0x00979930 5f6f6666 73657432 2e79293b 200a2020 _offset2.y); . │ │ │ │ + 0x00979940 20202020 642e7920 3d20636f 6f726473 d.y = coords │ │ │ │ + 0x00979950 2e7a3b20 0a202020 20202076 65633220 .z; . vec2 │ │ │ │ + 0x00979960 7a7a203d 20755f66 72616d65 62756666 zz = u_framebuff │ │ │ │ + 0x00979970 65724d65 74726963 732e7a7a 3b200a20 erMetrics.zz; . │ │ │ │ + 0x00979980 20202020 2064203d 20616273 28534d41 d = abs(SMA │ │ │ │ + 0x00979990 41526f75 6e64287a 7a202a20 64202d20 ARound(zz * d - │ │ │ │ + 0x009799a0 765f636f 6f726473 2e7a7a29 293b200a v_coords.zz)); . │ │ │ │ + 0x009799b0 20202020 20207665 63322073 7172745f vec2 sqrt_ │ │ │ │ + 0x009799c0 64203d20 73717274 2864293b 200a2020 d = sqrt(d); . │ │ │ │ + 0x009799d0 20202020 666c6f61 74206532 203d2053 float e2 = S │ │ │ │ + 0x009799e0 4d414153 616d706c 654c6576 656c5a65 MAASampleLevelZe │ │ │ │ + 0x009799f0 726f4f66 66736574 28755f63 6f6c6f72 roOffset(u_color │ │ │ │ + 0x00979a00 5465782c 20636f6f 7264732e 7a792c20 Tex, coords.zy, │ │ │ │ + 0x00979a10 534d4141 4f666673 65742831 2c203029 SMAAOffset(1, 0) │ │ │ │ + 0x00979a20 292e723b 200a2020 20202020 77656967 ).r; . weig │ │ │ │ + 0x00979a30 6874732e 7267203d 20534d41 41417265 hts.rg = SMAAAre │ │ │ │ + 0x00979a40 61287371 72745f64 2c206531 2c206532 a(sqrt_d, e1, e2 │ │ │ │ + 0x00979a50 293b200a 20202020 7d200a20 20202069 ); . } . i │ │ │ │ + 0x00979a60 66202865 2e72203e 20302e30 29202f2f f (e.r > 0.0) // │ │ │ │ + 0x00979a70 20456467 65206174 20776573 74200a20 Edge at west . │ │ │ │ + 0x00979a80 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ + 0x00979a90 20643b20 0a202020 20202076 65633320 d; . vec3 │ │ │ │ + 0x00979aa0 636f6f72 64733b20 0a202020 20202063 coords; . c │ │ │ │ + 0x00979ab0 6f6f7264 732e7920 3d20534d 41415365 oords.y = SMAASe │ │ │ │ + 0x00979ac0 61726368 59557028 765f6f66 66736574 archYUp(v_offset │ │ │ │ + 0x00979ad0 312e7879 2c20765f 6f666673 6574322e 1.xy, v_offset2. │ │ │ │ + 0x00979ae0 7a293b20 0a202020 20202063 6f6f7264 z); . coord │ │ │ │ + 0x00979af0 732e7820 3d20765f 6f666673 6574302e s.x = v_offset0. │ │ │ │ + 0x00979b00 783b200a 20202020 2020642e 78203d20 x; . d.x = │ │ │ │ + 0x00979b10 636f6f72 64732e79 3b200a20 20202020 coords.y; . │ │ │ │ + 0x00979b20 20666c6f 61742065 31203d20 534d4141 float e1 = SMAA │ │ │ │ + 0x00979b30 53616d70 6c654c65 76656c5a 65726f28 SampleLevelZero( │ │ │ │ + 0x00979b40 755f636f 6c6f7254 65782c20 636f6f72 u_colorTex, coor │ │ │ │ + 0x00979b50 64732e78 79292e67 3b200a20 20202020 ds.xy).g; . │ │ │ │ + 0x00979b60 20636f6f 7264732e 7a203d20 534d4141 coords.z = SMAA │ │ │ │ + 0x00979b70 53656172 63685944 6f776e28 765f6f66 SearchYDown(v_of │ │ │ │ + 0x00979b80 66736574 312e7a77 2c20765f 6f666673 fset1.zw, v_offs │ │ │ │ + 0x00979b90 6574322e 77293b20 0a202020 20202064 et2.w); . d │ │ │ │ + 0x00979ba0 2e79203d 20636f6f 7264732e 7a3b200a .y = coords.z; . │ │ │ │ + 0x00979bb0 20202020 20207665 63322077 77203d20 vec2 ww = │ │ │ │ + 0x00979bc0 755f6672 616d6562 75666665 724d6574 u_framebufferMet │ │ │ │ + 0x00979bd0 72696373 2e77773b 200a2020 20202020 rics.ww; . │ │ │ │ + 0x00979be0 64203d20 61627328 534d4141 526f756e d = abs(SMAARoun │ │ │ │ + 0x00979bf0 64287777 202a2064 202d2076 5f636f6f d(ww * d - v_coo │ │ │ │ + 0x00979c00 7264732e 77772929 3b200a20 20202020 rds.ww)); . │ │ │ │ + 0x00979c10 20766563 32207371 72745f64 203d2073 vec2 sqrt_d = s │ │ │ │ + 0x00979c20 71727428 64293b20 0a202020 20202066 qrt(d); . f │ │ │ │ + 0x00979c30 6c6f6174 20653220 3d20534d 41415361 loat e2 = SMAASa │ │ │ │ + 0x00979c40 6d706c65 4c657665 6c5a6572 6f4f6666 mpleLevelZeroOff │ │ │ │ + 0x00979c50 73657428 755f636f 6c6f7254 65782c20 set(u_colorTex, │ │ │ │ + 0x00979c60 636f6f72 64732e78 7a2c2053 4d41414f coords.xz, SMAAO │ │ │ │ + 0x00979c70 66667365 7428302c 20312929 2e673b20 ffset(0, 1)).g; │ │ │ │ + 0x00979c80 0a202020 20202077 65696768 74732e62 . weights.b │ │ │ │ + 0x00979c90 61203d20 534d4141 41726561 28737172 a = SMAAArea(sqr │ │ │ │ + 0x00979ca0 745f642c 2065312c 20653229 3b200a20 t_d, e1, e2); . │ │ │ │ + 0x00979cb0 2020207d 200a2020 2020765f 46726167 } . v_Frag │ │ │ │ + 0x00979cc0 436f6c6f 72203d20 77656967 6874733b Color = weights; │ │ │ │ + 0x00979cd0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x00979ce0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00979cf0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00979d00 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00979d10 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00979d20 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00979d30 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00979d40 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00979d50 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00979d60 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00979d70 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00979d80 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00979d90 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00979da0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00979db0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00979dc0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00979dd0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00979de0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00979df0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00979e00 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00979e10 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00979e20 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00979e30 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00979e40 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x00979e50 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x00979e60 0a20206f 75742076 65633420 765f636f . out vec4 v_co │ │ │ │ + 0x00979e70 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x00979e80 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ + 0x00979e90 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00979ea0 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ + 0x00979eb0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00979ec0 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x00979ed0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00979ee0 3420755f 70617261 6d733b20 0a202075 4 u_params; . u │ │ │ │ + 0x00979ef0 6e69666f 726d2066 6c6f6174 20755f6c niform float u_l │ │ │ │ + 0x00979f00 696e6548 616c6657 69647468 3b200a20 ineHalfWidth; . │ │ │ │ + 0x00979f10 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00979f20 5f6d6178 52616469 75733b20 0a202063 _maxRadius; . c │ │ │ │ + 0x00979f30 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ + 0x00979f40 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ + 0x00979f50 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ + 0x00979f60 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00979f70 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00979f80 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x00979f90 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x00979fa0 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ + 0x00979fb0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x00979fc0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ + 0x00979fd0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ + 0x00979fe0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00979ff0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x0097a000 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ + 0x0097a010 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x0097a020 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x0097a030 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ + 0x0097a040 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ + 0x0097a050 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0097a060 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ + 0x0097a070 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ + 0x0097a080 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x0097a090 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ + 0x0097a0a0 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ + 0x0097a0b0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x0097a0c0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x0097a0d0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ + 0x0097a0e0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x0097a0f0 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ + 0x0097a100 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ + 0x0097a110 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x0097a120 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ + 0x0097a130 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ + 0x0097a140 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ + 0x0097a150 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ + 0x0097a160 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0097a170 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0097a180 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0097a190 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ + 0x0097a1a0 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ + 0x0097a1b0 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ + 0x0097a1c0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ + 0x0097a1d0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x0097a1e0 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ + 0x0097a1f0 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ + 0x0097a200 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x0097a210 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ + 0x0097a220 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ + 0x0097a230 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x0097a240 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ + 0x0097a250 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x0097a260 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ + 0x0097a270 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x0097a280 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ + 0x0097a290 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ + 0x0097a2a0 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ + 0x0097a2b0 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ + 0x0097a2c0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ + 0x0097a2d0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ + 0x0097a2e0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x0097a2f0 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ + 0x0097a300 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ + 0x0097a310 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ + 0x0097a320 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ + 0x0097a330 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ + 0x0097a340 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x0097a350 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ + 0x0097a360 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ + 0x0097a370 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x0097a380 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ + 0x0097a390 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ + 0x0097a3a0 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ + 0x0097a3b0 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ + 0x0097a3c0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ + 0x0097a3d0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ + 0x0097a3e0 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ + 0x0097a3f0 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ + 0x0097a400 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ + 0x0097a410 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ + 0x0097a420 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ + 0x0097a430 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ + 0x0097a440 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ + 0x0097a450 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x0097a460 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ + 0x0097a470 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ + 0x0097a480 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ + 0x0097a490 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ + 0x0097a4a0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x0097a4b0 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ + 0x0097a4c0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ + 0x0097a4d0 65633220 6e6f726d 616c203d 20615f6e ec2 normal = a_n │ │ │ │ + 0x0097a4e0 6f726d61 6c2e7879 3b200a20 20202076 ormal.xy; . v │ │ │ │ + 0x0097a4f0 65633220 7472616e 73666f72 6d656441 ec2 transformedA │ │ │ │ + 0x0097a500 78697350 6f73203d 20287665 63342861 xisPos = (vec4(a │ │ │ │ + 0x0097a510 5f706f73 6974696f 6e2e7879 2c20302e _position.xy, 0. │ │ │ │ + 0x0097a520 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ + 0x0097a530 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x0097a540 69662028 646f7428 6e6f726d 616c2c20 if (dot(normal, │ │ │ │ + 0x0097a550 6e6f726d 616c2920 213d2030 2e302920 normal) != 0.0) │ │ │ │ + 0x0097a560 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ + 0x0097a570 6332206e 6f726d20 3d206e6f 726d616c c2 norm = normal │ │ │ │ + 0x0097a580 202a2075 5f6c696e 6548616c 66576964 * u_lineHalfWid │ │ │ │ + 0x0097a590 74683b20 0a202020 20202074 72616e73 th; . trans │ │ │ │ + 0x0097a5a0 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ + 0x0097a5b0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x0097a5c0 6d656441 78697350 6f732874 72616e73 medAxisPos(trans │ │ │ │ + 0x0097a5d0 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ + 0x0097a5e0 5f706f73 6974696f 6e2e7879 202b206e _position.xy + n │ │ │ │ + 0x0097a5f0 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ + 0x0097a600 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097a610 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097a620 20202020 20202020 20202020 755f6d6f u_mo │ │ │ │ + 0x0097a630 64656c56 6965772c 206c656e 67746828 delView, length( │ │ │ │ + 0x0097a640 6e6f726d 29293b20 0a202020 207d200a norm)); . } . │ │ │ │ + 0x0097a650 20202020 765f636f 6c6f7220 3d20615f v_color = a_ │ │ │ │ + 0x0097a660 636f6c6f 723b200a 20202020 76656334 color; . vec4 │ │ │ │ + 0x0097a670 20706f73 203d2076 65633428 7472616e pos = vec4(tran │ │ │ │ + 0x0097a680 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x0097a690 615f706f 73697469 6f6e2e7a 2c20312e a_position.z, 1. │ │ │ │ + 0x0097a6a0 3029202a 20755f70 726f6a65 6374696f 0) * u_projectio │ │ │ │ + 0x0097a6b0 6e3b200a 20202020 676c5f50 6f736974 n; . gl_Posit │ │ │ │ + 0x0097a6c0 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x0097a6d0 5472616e 73666f72 6d28706f 732c2075 Transform(pos, u │ │ │ │ + 0x0097a6e0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x0097a6f0 20302e30 293b200a 20207d20 0a000000 0.0); . } .... │ │ │ │ + 0x0097a700 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0097a710 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0097a720 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0097a730 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0097a740 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0097a750 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0097a760 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097a770 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0097a780 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0097a790 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0097a7a0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0097a7b0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0097a7c0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0097a7d0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0097a7e0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0097a7f0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0097a800 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0097a810 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0097a820 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0097a830 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0097a840 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0097a850 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x0097a860 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x0097a870 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x0097a880 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x0097a890 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x0097a8a0 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x0097a8b0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x0097a8c0 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x0097a8d0 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x0097a8e0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x0097a8f0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x0097a900 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x0097a910 6e69666f 726d2076 65633420 755f726f niform vec4 u_ro │ │ │ │ + 0x0097a920 75746550 6172616d 733b200a 2020756e uteParams; . un │ │ │ │ + 0x0097a930 69666f72 6d207665 63342075 5f636f6c iform vec4 u_col │ │ │ │ + 0x0097a940 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ + 0x0097a950 65633420 755f6d61 736b436f 6c6f723b ec4 u_maskColor; │ │ │ │ + 0x0097a960 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x0097a970 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ + 0x0097a980 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x0097a990 20755f66 616b6543 6f6c6f72 3b200a20 u_fakeColor; . │ │ │ │ + 0x0097a9a0 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ + 0x0097a9b0 66616b65 4f75746c 696e6543 6f6c6f72 fakeOutlineColor │ │ │ │ + 0x0097a9c0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x0097a9d0 3220755f 66616b65 426f7264 6572733b 2 u_fakeBorders; │ │ │ │ + 0x0097a9e0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x0097a9f0 20755f70 61747465 726e3b20 0a202075 u_pattern; . u │ │ │ │ + 0x0097aa00 6e69666f 726d2076 65633220 755f616e niform vec2 u_an │ │ │ │ + 0x0097aa10 676c6543 6f735369 6e3b200a 2020756e gleCosSin; . un │ │ │ │ + 0x0097aa20 69666f72 6d20666c 6f617420 755f6172 iform float u_ar │ │ │ │ + 0x0097aa30 726f7748 616c6657 69647468 3b200a20 rowHalfWidth; . │ │ │ │ + 0x0097aa40 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0097aa50 5f6f7061 63697479 3b200a20 20636f6e _opacity; . con │ │ │ │ + 0x0097aa60 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x0097aa70 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x0097aa80 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x0097aa90 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x0097aaa0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x0097aab0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x0097aac0 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x0097aad0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x0097aae0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0097aaf0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x0097ab00 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x0097ab10 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x0097ab20 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0097ab30 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x0097ab40 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0097ab50 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x0097ab60 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0097ab70 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x0097ab80 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0097ab90 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x0097aba0 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x0097abb0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x0097abc0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0097abd0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x0097abe0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x0097abf0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0097ac00 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x0097ac10 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x0097ac20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0097ac30 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x0097ac40 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x0097ac50 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x0097ac60 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x0097ac70 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x0097ac80 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x0097ac90 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x0097aca0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x0097acb0 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x0097acc0 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x0097acd0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x0097ace0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x0097acf0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x0097ad00 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0097ad10 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x0097ad20 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x0097ad30 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0097ad40 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x0097ad50 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x0097ad60 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x0097ad70 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x0097ad80 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x0097ad90 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x0097ada0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x0097adb0 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x0097adc0 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x0097add0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x0097ade0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x0097adf0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x0097ae00 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x0097ae10 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x0097ae20 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x0097ae30 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x0097ae40 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x0097ae50 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x0097ae60 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x0097ae70 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x0097ae80 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x0097ae90 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x0097aea0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x0097aeb0 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x0097aec0 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x0097aed0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x0097aee0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x0097aef0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x0097af00 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x0097af10 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x0097af20 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x0097af30 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x0097af40 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x0097af50 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x0097af60 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x0097af70 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x0097af80 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x0097af90 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x0097afa0 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x0097afb0 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x0097afc0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x0097afd0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x0097afe0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x0097aff0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x0097b000 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ + 0x0097b010 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ + 0x0097b020 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ + 0x0097b030 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ + 0x0097b040 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ + 0x0097b050 2028646f 7428615f 6e6f726d 616c2c20 (dot(a_normal, │ │ │ │ + 0x0097b060 615f6e6f 726d616c 2920213d 20302e30 a_normal) != 0.0 │ │ │ │ + 0x0097b070 29200a20 2020207b 200a2020 20202020 ) . { . │ │ │ │ + 0x0097b080 76656332 206e6f72 6d203d20 615f6e6f vec2 norm = a_no │ │ │ │ + 0x0097b090 726d616c 202a2075 5f617272 6f774861 rmal * u_arrowHa │ │ │ │ + 0x0097b0a0 6c665769 6474683b 200a2020 20202020 lfWidth; . │ │ │ │ + 0x0097b0b0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x0097b0c0 6f73203d 2063616c 634c696e 65547261 os = calcLineTra │ │ │ │ + 0x0097b0d0 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x0097b0e0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x0097b0f0 6f732c20 615f706f 73697469 6f6e2e78 os, a_position.x │ │ │ │ + 0x0097b100 79202b20 6e6f726d 2c200a20 20202020 y + norm, . │ │ │ │ + 0x0097b110 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097b120 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097b130 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097b140 20755f6d 6f64656c 56696577 2c206c65 u_modelView, le │ │ │ │ + 0x0097b150 6e677468 286e6f72 6d29293b 200a2020 ngth(norm)); . │ │ │ │ + 0x0097b160 20207d20 0a202020 20765f63 6f6c6f72 } . v_color │ │ │ │ + 0x0097b170 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ + 0x0097b180 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x0097b190 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x0097b1a0 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ + 0x0097b1b0 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ + 0x0097b1c0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ + 0x0097b1d0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ + 0x0097b1e0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x0097b1f0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x0097b200 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ + 0x0097b210 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x0097b220 207d200a 00000000 94c8d7ff a2c8d7ff } ............. │ │ │ │ 0x0097b230 b0c8d7ff bec8d7ff ccc8d7ff dac8d7ff ................ │ │ │ │ 0x0097b240 e8c8d7ff f6c8d7ff dec7d7ff ecc7d7ff ................ │ │ │ │ 0x0097b250 fac7d7ff 08c8d7ff 24c8d7ff 32c8d7ff ........$...2... │ │ │ │ 0x0097b260 16c8d7ff 40c8d7ff 86c8d7ff 78c8d7ff ....@.......x... │ │ │ │ 0x0097b270 6cc7d7ff 5ec7d7ff 06c8d7ff 7ac7d7ff l...^.......z... │ │ │ │ 0x0097b280 88c7d7ff b0cad7ff accad7ff 96cad7ff ................ │ │ │ │ 0x0097b290 b6cad7ff c4cad7ff cecad7ff 00000000 ................ │ │ │ ├── readelf --wide --decompress --hex-dump=.gnu_debuglink {} │ │ │ │ @@ -1,7 +1,7 @@ │ │ │ │ │ │ │ │ Hex dump of section '.gnu_debuglink': │ │ │ │ - 0x00000000 38653761 34383761 32393063 38363961 8e7a487a290c869a │ │ │ │ - 0x00000010 30623464 62613935 65643534 32323537 0b4dba95ed542257 │ │ │ │ - 0x00000020 36653464 62322e64 65627567 00000000 6e4db2.debug.... │ │ │ │ - 0x00000030 20bea153 ..S │ │ │ │ + 0x00000000 64663664 64386230 64613564 32343035 df6dd8b0da5d2405 │ │ │ │ + 0x00000010 62386133 61633637 62666434 36306465 b8a3ac67bfd460de │ │ │ │ + 0x00000020 32626637 66342e64 65627567 00000000 2bf7f4.debug.... │ │ │ │ + 0x00000030 8287f934 ...4