--- /srv/rebuilderd/tmp/rebuilderdlTlGJ4/inputs/organicmaps_2026.02.18-5+ds-1_riscv64.deb +++ /srv/rebuilderd/tmp/rebuilderdlTlGJ4/out/organicmaps_2026.02.18-5+ds-1_riscv64.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2026-02-26 19:30:57.000000 debian-binary │ -rw-r--r-- 0 0 0 1212 2026-02-26 19:30:57.000000 control.tar.xz │ --rw-r--r-- 0 0 0 5075604 2026-02-26 19:30:57.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 5074912 2026-02-26 19:30:57.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: 32e0381d7801164c7de0d1de47792837f228ce7a │ │ │ │ + GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) Build ID: bef6ff7d5f232b6d6378bfef2612929bb30a19f8 │ │ │ │ │ │ │ │ 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 {} │ │ │ │ @@ -1,8 +1,8 @@ │ │ │ │ -z/lib/ld-linux-riscv64-lp64d.so.1 │ │ │ │ +/lib/ld-linux-riscv64-lp64d.so.1 │ │ │ │ _ITM_deregisterTMCloneTable │ │ │ │ _ITM_registerTMCloneTable │ │ │ │ _ZN6google14FlagRegistererC1IiEEPKcS3_S3_PT_S5_ │ │ │ │ _ZN6google16SetVersionStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE │ │ │ │ _ZSt19piecewise_construct │ │ │ │ _ZN6google21ParseCommandLineFlagsEPiPPPcb │ │ │ │ _ZN6google21RegisterFlagValidatorEPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFbPKcRS6_E │ │ │ │ @@ -11644,15 +11644,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.03.03-0-00000000-Linux │ │ │ │ +2026.03.16-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 │ │ │ │ @@ -15751,20 +15751,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; │ │ │ │ @@ -15797,21 +15799,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; │ │ │ │ @@ -15819,28 +15823,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 │ │ │ │ @@ -15862,31 +15866,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; │ │ │ │ @@ -15894,32 +15895,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 │ │ │ │ @@ -15941,27 +15936,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; │ │ │ │ @@ -15969,79 +15955,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 │ │ │ │ @@ -16063,21 +15994,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; │ │ │ │ @@ -16085,23 +16015,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 │ │ │ │ @@ -16123,22 +16060,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; │ │ │ │ @@ -16147,33 +16092,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 │ │ │ │ @@ -16195,23 +16134,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; │ │ │ │ @@ -16219,19 +16160,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; │ │ │ │ @@ -16261,20 +16203,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; │ │ │ │ @@ -16283,33 +16224,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 │ │ │ │ @@ -16331,23 +16266,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; │ │ │ │ @@ -16355,34 +16292,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 │ │ │ │ @@ -16405,22 +16341,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; │ │ │ │ @@ -16428,28 +16365,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 │ │ │ │ @@ -16471,25 +16403,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; │ │ │ │ @@ -16498,22 +16427,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; │ │ │ │ @@ -16546,22 +16475,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; │ │ │ │ @@ -16569,20 +16499,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 │ │ │ │ @@ -16604,20 +16535,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 │ │ │ │ @@ -16626,33 +16557,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 │ │ │ │ @@ -16674,27 +16598,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; │ │ │ │ @@ -16702,28 +16622,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 │ │ │ │ @@ -16745,19 +16669,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; │ │ │ │ @@ -16768,17 +16700,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; │ │ │ │ @@ -16813,15 +16743,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; │ │ │ │ @@ -16829,26 +16758,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 │ │ │ │ @@ -16870,26 +16807,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; │ │ │ │ @@ -16897,26 +16831,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 │ │ │ │ @@ -16938,23 +16883,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; │ │ │ │ @@ -16962,26 +16911,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 │ │ │ │ @@ -17003,19 +16954,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; │ │ │ │ @@ -17023,34 +16975,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 │ │ │ │ @@ -17072,26 +17011,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; │ │ │ │ @@ -17099,32 +17031,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 │ │ │ │ @@ -17146,22 +17071,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; │ │ │ │ @@ -17169,33 +17092,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 │ │ │ │ @@ -17217,24 +17132,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; │ │ │ │ @@ -17242,25 +17158,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 │ │ │ │ @@ -17282,19 +17199,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 │ │ │ │ @@ -17303,37 +17226,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 │ │ │ │ @@ -17355,143 +17268,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; │ │ │ │ @@ -17501,22 +17291,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 │ │ │ │ @@ -17538,18 +17323,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 │ │ │ │ @@ -17558,21 +17341,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 │ │ │ │ @@ -17594,19 +17391,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; │ │ │ │ @@ -17614,19 +17419,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 │ │ │ │ @@ -17648,17 +17459,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; │ │ │ │ @@ -17740,33 +17557,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 │ │ │ │ @@ -17788,24 +17600,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; │ │ │ │ @@ -17813,37 +17626,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 │ │ │ │ @@ -17865,27 +17661,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; │ │ │ │ @@ -17893,35 +17683,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 │ │ │ │ @@ -17943,27 +17724,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; │ │ │ │ @@ -18053,26 +17826,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 │ │ │ │ @@ -18094,18 +17873,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; │ │ │ │ @@ -18113,26 +17895,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 │ │ │ │ @@ -18154,19 +17934,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; │ │ │ │ @@ -18174,24 +17954,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 │ │ │ │ @@ -18213,20 +18006,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; │ │ │ │ @@ -18234,21 +18037,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 │ │ │ │ @@ -18270,20 +18078,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; │ │ │ │ @@ -18292,29 +18098,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 │ │ │ │ @@ -18336,28 +18146,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 │ │ │ │ @@ -18368,26 +18174,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; │ │ │ │ @@ -18410,28 +18221,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; │ │ │ │ @@ -18439,26 +18246,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 │ │ │ │ @@ -18480,18 +18282,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; │ │ │ │ @@ -18500,23 +18304,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 │ │ │ │ @@ -18538,23 +18352,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; │ │ │ │ @@ -18563,24 +18434,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 │ │ │ │ @@ -18603,24 +18482,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; │ │ │ │ @@ -18629,24 +18510,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 │ │ │ │ @@ -18668,23 +18552,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; │ │ │ │ @@ -18693,27 +18698,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 │ │ │ │ @@ -18735,25 +18736,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; │ │ │ │ @@ -18761,28 +18760,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 │ │ │ │ @@ -18804,25 +18807,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 {} │ │ │ │ @@ -2332926,16 +2332926,16 @@ │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1362 │ │ │ │ sd a5,264(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,264(sp) │ │ │ │ auipc a4,0x278 │ │ │ │ addi a4,a4,1894 │ │ │ │ - auipc a3,0x288 │ │ │ │ - addi a3,a3,230 │ │ │ │ + auipc a3,0x28a │ │ │ │ + addi a3,a3,-1058 │ │ │ │ addi a1,sp,888 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,180 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,952 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ @@ -2332948,16 +2332948,16 @@ │ │ │ │ addi a1,a1,-1390 │ │ │ │ sd a5,312(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,312(sp) │ │ │ │ ld a1,288(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,-840 │ │ │ │ - auipc a3,0x299 │ │ │ │ - addi a3,a3,64 │ │ │ │ + auipc a3,0x285 │ │ │ │ + addi a3,a3,-1864 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,192 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1016 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1424 │ │ │ │ @@ -2332969,16 +2332969,16 @@ │ │ │ │ addi a1,a1,-1420 │ │ │ │ sd a5,360(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,360(sp) │ │ │ │ ld a1,336(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,-46 │ │ │ │ - auipc a3,0x28c │ │ │ │ - addi a3,a3,-342 │ │ │ │ + auipc a3,0x287 │ │ │ │ + addi a3,a3,578 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,202 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1080 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1448 │ │ │ │ @@ -2332990,16 +2332990,16 @@ │ │ │ │ addi a1,a1,-1452 │ │ │ │ sd a5,408(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,408(sp) │ │ │ │ ld a1,384(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,842 │ │ │ │ - auipc a3,0x29f │ │ │ │ - addi a3,a3,1578 │ │ │ │ + auipc a3,0x286 │ │ │ │ + addi a3,a3,1834 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,210 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1144 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1520 │ │ │ │ @@ -2333011,16 +2333011,16 @@ │ │ │ │ addi a1,a1,-1524 │ │ │ │ sd a5,456(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,456(sp) │ │ │ │ ld a1,432(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,770 │ │ │ │ - auipc a3,0x29f │ │ │ │ - addi a3,a3,1506 │ │ │ │ + auipc a3,0x286 │ │ │ │ + addi a3,a3,1762 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,218 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1208 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1560 │ │ │ │ @@ -2333032,16 +2333032,16 @@ │ │ │ │ addi a1,a1,-1556 │ │ │ │ sd a5,504(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,504(sp) │ │ │ │ ld a1,480(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,1834 │ │ │ │ - auipc a3,0x297 │ │ │ │ - addi a3,a3,-1110 │ │ │ │ + auipc a3,0x28d │ │ │ │ + addi a3,a3,1578 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,226 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1272 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1592 │ │ │ │ @@ -2333053,16 +2333053,16 @@ │ │ │ │ addi a1,a1,-1630 │ │ │ │ sd a5,552(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,552(sp) │ │ │ │ ld a1,528(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,1754 │ │ │ │ - auipc a3,0x295 │ │ │ │ - addi a3,a3,1578 │ │ │ │ + auipc a3,0x294 │ │ │ │ + addi a3,a3,-1430 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,226 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1336 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1656 │ │ │ │ @@ -2333074,16 +2333074,16 @@ │ │ │ │ addi a1,a1,-1654 │ │ │ │ sd a5,600(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,600(sp) │ │ │ │ ld a1,576(sp) │ │ │ │ auipc a4,0x27a │ │ │ │ addi a4,a4,-1174 │ │ │ │ - auipc a3,0x298 │ │ │ │ - addi a3,a3,698 │ │ │ │ + auipc a3,0x296 │ │ │ │ + addi a3,a3,378 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,226 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1400 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1736 │ │ │ │ @@ -2333095,16 +2333095,16 @@ │ │ │ │ addi a1,a1,-1734 │ │ │ │ sd a5,648(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,648(sp) │ │ │ │ ld a1,624(sp) │ │ │ │ auipc a4,0x27a │ │ │ │ addi a4,a4,-1254 │ │ │ │ - auipc a3,0x298 │ │ │ │ - addi a3,a3,618 │ │ │ │ + auipc a3,0x296 │ │ │ │ + addi a3,a3,298 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,226 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1464 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1768 │ │ │ │ @@ -2333116,16 +2333116,16 @@ │ │ │ │ addi a1,a1,-1774 │ │ │ │ sd a5,696(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,696(sp) │ │ │ │ ld a1,672(sp) │ │ │ │ auipc a4,0x27a │ │ │ │ addi a4,a4,-126 │ │ │ │ - auipc a3,0x283 │ │ │ │ - addi a3,a3,82 │ │ │ │ + auipc a3,0x297 │ │ │ │ + addi a3,a3,-862 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,226 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1528 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1848 │ │ │ │ @@ -2333137,16 +2333137,16 @@ │ │ │ │ addi a1,a1,-1854 │ │ │ │ sd a5,744(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,744(sp) │ │ │ │ ld a1,720(sp) │ │ │ │ auipc a4,0x27a │ │ │ │ addi a4,a4,-206 │ │ │ │ - auipc a3,0x283 │ │ │ │ - addi a3,a3,2 │ │ │ │ + auipc a3,0x297 │ │ │ │ + addi a3,a3,-942 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,226 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1592 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1896 │ │ │ │ @@ -2333158,16 +2333158,16 @@ │ │ │ │ addi a1,a1,-1902 │ │ │ │ sd a5,792(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,792(sp) │ │ │ │ ld a1,768(sp) │ │ │ │ auipc a4,0x27a │ │ │ │ addi a4,a4,730 │ │ │ │ - auipc a3,0x284 │ │ │ │ - addi a3,a3,-1662 │ │ │ │ + auipc a3,0x29d │ │ │ │ + addi a3,a3,1250 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,226 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1656 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1944 │ │ │ │ @@ -2333179,31 +2333179,31 @@ │ │ │ │ addi a1,a1,-2014 │ │ │ │ sd a5,832(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,832(sp) │ │ │ │ ld a1,816(sp) │ │ │ │ auipc a4,0x27a │ │ │ │ addi a4,a4,-366 │ │ │ │ - auipc a3,0x284 │ │ │ │ - addi a3,a3,1162 │ │ │ │ + auipc a3,0x28b │ │ │ │ + addi a3,a3,1378 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,226 │ │ │ │ jal 6fb754 │ │ │ │ addi a0,sp,1720 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-982 │ │ │ │ jal 6f0196 │ │ │ │ addi a0,sp,1752 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-974 │ │ │ │ jal 6f0196 │ │ │ │ auipc a4,0x27a │ │ │ │ addi a4,a4,1518 │ │ │ │ - auipc a3,0x28b │ │ │ │ - addi a3,a3,14 │ │ │ │ + auipc a3,0x29d │ │ │ │ + addi a3,a3,-1794 │ │ │ │ addi a2,sp,1752 │ │ │ │ addi a1,sp,1720 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,238 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1784 │ │ │ │ mv a0,a5 │ │ │ │ @@ -2333217,16 +2333217,16 @@ │ │ │ │ addi a1,a1,2032 │ │ │ │ sd a5,24(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,24(sp) │ │ │ │ ld a1,8(sp) │ │ │ │ auipc a4,0x27b │ │ │ │ addi a4,a4,-1666 │ │ │ │ - auipc a3,0x29e │ │ │ │ - addi a3,a3,-490 │ │ │ │ + auipc a3,0x290 │ │ │ │ + addi a3,a3,-1178 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,246 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1848 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ addi a1,a1,2004 │ │ │ │ @@ -2333238,16 +2333238,16 @@ │ │ │ │ addi a1,a1,2000 │ │ │ │ sd a5,56(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,56(sp) │ │ │ │ ld a1,40(sp) │ │ │ │ auipc a4,0x27b │ │ │ │ addi a4,a4,-866 │ │ │ │ - auipc a3,0x289 │ │ │ │ - addi a3,a3,350 │ │ │ │ + auipc a3,0x288 │ │ │ │ + addi a3,a3,-2042 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,254 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1912 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ addi a1,a1,1964 │ │ │ │ @@ -2333259,16 +2333259,16 @@ │ │ │ │ addi a1,a1,1576 │ │ │ │ sd a5,88(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,88(sp) │ │ │ │ ld a1,72(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,-1970 │ │ │ │ - auipc a3,0x28e │ │ │ │ - addi a3,a3,-1906 │ │ │ │ + auipc a3,0x28b │ │ │ │ + addi a3,a3,-1498 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,262 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,1976 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ addi a1,a1,1724 │ │ │ │ @@ -2333280,16 +2333280,16 @@ │ │ │ │ addi a1,a1,1720 │ │ │ │ sd a5,120(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,120(sp) │ │ │ │ ld a1,104(sp) │ │ │ │ auipc a4,0x27a │ │ │ │ addi a4,a4,-722 │ │ │ │ - auipc a3,0x283 │ │ │ │ - addi a3,a3,-514 │ │ │ │ + auipc a3,0x297 │ │ │ │ + addi a3,a3,-1458 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,270 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2040 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ed │ │ │ │ addi a1,a1,-1292 │ │ │ │ @@ -2333302,16 +2333302,16 @@ │ │ │ │ addi a1,a1,-1290 │ │ │ │ sd a5,152(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,152(sp) │ │ │ │ ld a1,136(sp) │ │ │ │ auipc a4,0x27b │ │ │ │ addi a4,a4,-108 │ │ │ │ - auipc a3,0x286 │ │ │ │ - addi a3,a3,2028 │ │ │ │ + auipc a3,0x283 │ │ │ │ + addi a3,a3,-588 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,57 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333325,16 +2333325,16 @@ │ │ │ │ addi a1,a1,1758 │ │ │ │ sd a5,184(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,184(sp) │ │ │ │ ld a1,168(sp) │ │ │ │ auipc a4,0x27b │ │ │ │ addi a4,a4,1140 │ │ │ │ - auipc a3,0x28a │ │ │ │ - addi a3,a3,-1108 │ │ │ │ + auipc a3,0x29b │ │ │ │ + addi a3,a3,1100 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,121 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333348,16 +2333348,16 @@ │ │ │ │ addi a1,a1,1726 │ │ │ │ sd a5,216(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,216(sp) │ │ │ │ ld a1,200(sp) │ │ │ │ auipc a4,0x27c │ │ │ │ addi a4,a4,-1932 │ │ │ │ - auipc a3,0x29a │ │ │ │ - addi a3,a3,-636 │ │ │ │ + auipc a3,0x285 │ │ │ │ + addi a3,a3,-932 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,185 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333371,16 +2333371,16 @@ │ │ │ │ addi a1,a1,1686 │ │ │ │ sd a5,248(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,248(sp) │ │ │ │ ld a1,232(sp) │ │ │ │ auipc a4,0x27c │ │ │ │ addi a4,a4,-1188 │ │ │ │ - auipc a3,0x291 │ │ │ │ - addi a3,a3,-772 │ │ │ │ + auipc a3,0x28f │ │ │ │ + addi a3,a3,36 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,249 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333394,16 +2333394,16 @@ │ │ │ │ addi a1,a1,1646 │ │ │ │ sd a5,296(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,296(sp) │ │ │ │ ld a1,272(sp) │ │ │ │ auipc a4,0x27c │ │ │ │ addi a4,a4,-444 │ │ │ │ - auipc a3,0x28e │ │ │ │ - addi a3,a3,220 │ │ │ │ + auipc a3,0x295 │ │ │ │ + addi a3,a3,892 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,313 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333417,16 +2333417,16 @@ │ │ │ │ addi a1,a1,1566 │ │ │ │ sd a5,344(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,344(sp) │ │ │ │ ld a1,320(sp) │ │ │ │ auipc a4,0x27c │ │ │ │ addi a4,a4,-524 │ │ │ │ - auipc a3,0x28d │ │ │ │ - addi a3,a3,-1020 │ │ │ │ + auipc a3,0x290 │ │ │ │ + addi a3,a3,876 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,377 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333440,16 +2333440,16 @@ │ │ │ │ addi a1,a1,1550 │ │ │ │ sd a5,392(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,392(sp) │ │ │ │ ld a1,368(sp) │ │ │ │ auipc a4,0x27c │ │ │ │ addi a4,a4,268 │ │ │ │ - auipc a3,0x291 │ │ │ │ - addi a3,a3,1340 │ │ │ │ + auipc a3,0x298 │ │ │ │ + addi a3,a3,-1020 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,441 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333463,16 +2333463,16 @@ │ │ │ │ addi a1,a1,1510 │ │ │ │ sd a5,440(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,440(sp) │ │ │ │ ld a1,416(sp) │ │ │ │ auipc a4,0x27c │ │ │ │ addi a4,a4,1340 │ │ │ │ - auipc a3,0x29d │ │ │ │ - addi a3,a3,156 │ │ │ │ + auipc a3,0x29f │ │ │ │ + addi a3,a3,4 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,505 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333486,16 +2333486,16 @@ │ │ │ │ addi a1,a1,1470 │ │ │ │ sd a5,488(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,488(sp) │ │ │ │ ld a1,464(sp) │ │ │ │ auipc a4,0x27c │ │ │ │ addi a4,a4,1732 │ │ │ │ - auipc a3,0x29e │ │ │ │ - addi a3,a3,1324 │ │ │ │ + auipc a3,0x293 │ │ │ │ + addi a3,a3,-1460 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,276 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,569 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333509,16 +2333509,16 @@ │ │ │ │ addi a1,a1,1428 │ │ │ │ sd a5,536(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,536(sp) │ │ │ │ ld a1,512(sp) │ │ │ │ auipc a4,0x27d │ │ │ │ addi a4,a4,-1572 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,-1852 │ │ │ │ + auipc a3,0x299 │ │ │ │ + addi a3,a3,228 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,268 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,633 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333532,16 +2333532,16 @@ │ │ │ │ addi a1,a1,1356 │ │ │ │ sd a5,584(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,584(sp) │ │ │ │ ld a1,560(sp) │ │ │ │ auipc a4,0x27d │ │ │ │ addi a4,a4,260 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,-1940 │ │ │ │ + auipc a3,0x299 │ │ │ │ + addi a3,a3,140 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,260 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,697 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333555,16 +2333555,16 @@ │ │ │ │ addi a1,a1,1300 │ │ │ │ sd a5,632(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,632(sp) │ │ │ │ ld a1,608(sp) │ │ │ │ auipc a4,0x27d │ │ │ │ addi a4,a4,1852 │ │ │ │ - auipc a3,0x28f │ │ │ │ - addi a3,a3,1036 │ │ │ │ + auipc a3,0x2a0 │ │ │ │ + addi a3,a3,-1836 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,252 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,761 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333578,16 +2333578,16 @@ │ │ │ │ addi a1,a1,1252 │ │ │ │ sd a5,680(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,680(sp) │ │ │ │ ld a1,656(sp) │ │ │ │ auipc a4,0x27e │ │ │ │ addi a4,a4,-1156 │ │ │ │ - auipc a3,0x290 │ │ │ │ - addi a3,a3,-292 │ │ │ │ + auipc a3,0x29a │ │ │ │ + addi a3,a3,-1068 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,244 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,825 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333601,16 +2333601,16 @@ │ │ │ │ addi a1,a1,1212 │ │ │ │ sd a5,728(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,728(sp) │ │ │ │ ld a1,704(sp) │ │ │ │ auipc a4,0x27e │ │ │ │ addi a4,a4,212 │ │ │ │ - auipc a3,0x287 │ │ │ │ - addi a3,a3,-524 │ │ │ │ + auipc a3,0x291 │ │ │ │ + addi a3,a3,-1236 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,236 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,889 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333624,16 +2333624,16 @@ │ │ │ │ addi a1,a1,348 │ │ │ │ sd a5,776(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,776(sp) │ │ │ │ ld a1,752(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,-1460 │ │ │ │ - auipc a3,0x29f │ │ │ │ - addi a3,a3,-724 │ │ │ │ + auipc a3,0x286 │ │ │ │ + addi a3,a3,-468 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,228 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,953 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333647,16 +2333647,16 @@ │ │ │ │ addi a1,a1,260 │ │ │ │ sd a5,824(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,824(sp) │ │ │ │ ld a1,800(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,-1548 │ │ │ │ - auipc a3,0x29f │ │ │ │ - addi a3,a3,-812 │ │ │ │ + auipc a3,0x286 │ │ │ │ + addi a3,a3,-556 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,220 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1017 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333716,16 +2333716,16 @@ │ │ │ │ addi a1,a1,886 │ │ │ │ sd a5,48(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,48(sp) │ │ │ │ ld a1,32(sp) │ │ │ │ auipc a4,0x27f │ │ │ │ addi a4,a4,1772 │ │ │ │ - auipc a3,0x284 │ │ │ │ - addi a3,a3,1900 │ │ │ │ + auipc a3,0x29c │ │ │ │ + addi a3,a3,-1812 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1209 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333739,16 +2333739,16 @@ │ │ │ │ addi a1,a1,846 │ │ │ │ sd a5,80(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,80(sp) │ │ │ │ ld a1,64(sp) │ │ │ │ auipc a4,0x280 │ │ │ │ addi a4,a4,-1644 │ │ │ │ - auipc a3,0x286 │ │ │ │ - addi a3,a3,-1924 │ │ │ │ + auipc a3,0x288 │ │ │ │ + addi a3,a3,1836 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1273 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333762,16 +2333762,16 @@ │ │ │ │ addi a1,a1,814 │ │ │ │ sd a5,112(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,112(sp) │ │ │ │ ld a1,96(sp) │ │ │ │ auipc a4,0x280 │ │ │ │ addi a4,a4,-844 │ │ │ │ - auipc a3,0x285 │ │ │ │ - addi a3,a3,-116 │ │ │ │ + auipc a3,0x28a │ │ │ │ + addi a3,a3,-1420 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1337 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333785,16 +2333785,16 @@ │ │ │ │ addi a1,a1,758 │ │ │ │ sd a5,144(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,144(sp) │ │ │ │ ld a1,128(sp) │ │ │ │ auipc a4,0x280 │ │ │ │ addi a4,a4,-284 │ │ │ │ - auipc a3,0x285 │ │ │ │ - addi a3,a3,-196 │ │ │ │ + auipc a3,0x28a │ │ │ │ + addi a3,a3,-1500 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1401 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333808,16 +2333808,16 @@ │ │ │ │ addi a1,a1,-434 │ │ │ │ sd a5,176(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,176(sp) │ │ │ │ ld a1,160(sp) │ │ │ │ auipc a4,0x278 │ │ │ │ addi a4,a4,-1276 │ │ │ │ - auipc a3,0x288 │ │ │ │ - addi a3,a3,-292 │ │ │ │ + auipc a3,0x28c │ │ │ │ + addi a3,a3,164 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1465 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333831,16 +2333831,16 @@ │ │ │ │ addi a1,a1,-474 │ │ │ │ sd a5,208(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,208(sp) │ │ │ │ ld a1,192(sp) │ │ │ │ auipc a4,0x278 │ │ │ │ addi a4,a4,76 │ │ │ │ - auipc a3,0x299 │ │ │ │ - addi a3,a3,-748 │ │ │ │ + auipc a3,0x28b │ │ │ │ + addi a3,a3,1716 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1529 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333854,16 +2333854,16 @@ │ │ │ │ addi a1,a1,-514 │ │ │ │ sd a5,240(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,240(sp) │ │ │ │ ld a1,224(sp) │ │ │ │ auipc a4,0x278 │ │ │ │ addi a4,a4,860 │ │ │ │ - auipc a3,0x28c │ │ │ │ - addi a3,a3,-1068 │ │ │ │ + auipc a3,0x28d │ │ │ │ + addi a3,a3,1628 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1593 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333877,16 +2333877,16 @@ │ │ │ │ addi a1,a1,-554 │ │ │ │ sd a5,280(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,280(sp) │ │ │ │ ld a1,256(sp) │ │ │ │ auipc a4,0x278 │ │ │ │ addi a4,a4,1740 │ │ │ │ - auipc a3,0x29f │ │ │ │ - addi a3,a3,1148 │ │ │ │ + auipc a3,0x294 │ │ │ │ + addi a3,a3,-1724 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1657 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333900,16 +2333900,16 @@ │ │ │ │ addi a1,a1,-634 │ │ │ │ sd a5,328(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,328(sp) │ │ │ │ ld a1,304(sp) │ │ │ │ auipc a4,0x278 │ │ │ │ addi a4,a4,1660 │ │ │ │ - auipc a3,0x29f │ │ │ │ - addi a3,a3,1068 │ │ │ │ + auipc a3,0x294 │ │ │ │ + addi a3,a3,-1804 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1721 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333923,16 +2333923,16 @@ │ │ │ │ addi a1,a1,-714 │ │ │ │ sd a5,376(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,376(sp) │ │ │ │ ld a1,352(sp) │ │ │ │ auipc a4,0x278 │ │ │ │ addi a4,a4,1580 │ │ │ │ - auipc a3,0x29f │ │ │ │ - addi a3,a3,988 │ │ │ │ + auipc a3,0x294 │ │ │ │ + addi a3,a3,-1884 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1785 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333946,16 +2333946,16 @@ │ │ │ │ addi a1,a1,-794 │ │ │ │ sd a5,424(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,424(sp) │ │ │ │ ld a1,400(sp) │ │ │ │ auipc a4,0x278 │ │ │ │ addi a4,a4,1500 │ │ │ │ - auipc a3,0x29f │ │ │ │ - addi a3,a3,908 │ │ │ │ + auipc a3,0x294 │ │ │ │ + addi a3,a3,-1964 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1849 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333969,16 +2333969,16 @@ │ │ │ │ addi a1,a1,-834 │ │ │ │ sd a5,472(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,472(sp) │ │ │ │ ld a1,448(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,-1540 │ │ │ │ - auipc a3,0x297 │ │ │ │ - addi a3,a3,-1460 │ │ │ │ + auipc a3,0x291 │ │ │ │ + addi a3,a3,1948 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,212 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1913 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2333992,16 +2333992,16 @@ │ │ │ │ addi a1,a1,-914 │ │ │ │ sd a5,520(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,520(sp) │ │ │ │ ld a1,496(sp) │ │ │ │ auipc a4,0x279 │ │ │ │ addi a4,a4,-1624 │ │ │ │ - auipc a3,0x295 │ │ │ │ - addi a3,a3,880 │ │ │ │ + auipc a3,0x288 │ │ │ │ + addi a3,a3,-1792 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,208 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1977 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2334015,16 +2334015,16 @@ │ │ │ │ addi a1,a1,160 │ │ │ │ sd a5,568(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,568(sp) │ │ │ │ ld a1,544(sp) │ │ │ │ auipc a4,0x280 │ │ │ │ addi a4,a4,-432 │ │ │ │ - auipc a3,0x29a │ │ │ │ - addi a3,a3,1760 │ │ │ │ + auipc a3,0x285 │ │ │ │ + addi a3,a3,-1024 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,200 │ │ │ │ jal 6fb754 │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,2041 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2334039,16 +2334039,16 @@ │ │ │ │ addi a1,a1,114 │ │ │ │ sd a5,616(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,616(sp) │ │ │ │ ld a1,592(sp) │ │ │ │ auipc a4,0x280 │ │ │ │ addi a4,a4,1170 │ │ │ │ - auipc a3,0x29c │ │ │ │ - addi a3,a3,-238 │ │ │ │ + auipc a3,0x298 │ │ │ │ + addi a3,a3,2 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,194 │ │ │ │ jal 6fb754 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,56 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2334064,16 +2334064,16 @@ │ │ │ │ addi a1,a1,74 │ │ │ │ sd a5,664(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,664(sp) │ │ │ │ ld a1,640(sp) │ │ │ │ auipc a4,0x280 │ │ │ │ addi a4,a4,1954 │ │ │ │ - auipc a3,0x29b │ │ │ │ - addi a3,a3,754 │ │ │ │ + auipc a3,0x283 │ │ │ │ + addi a3,a3,-694 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,186 │ │ │ │ jal 6fb754 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,120 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2334090,15 +2334090,15 @@ │ │ │ │ sd a5,712(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,712(sp) │ │ │ │ ld a1,688(sp) │ │ │ │ auipc a4,0x281 │ │ │ │ addi a4,a4,-990 │ │ │ │ auipc a3,0x29a │ │ │ │ - addi a3,a3,-990 │ │ │ │ + addi a3,a3,-30 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,178 │ │ │ │ jal 6fb754 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,184 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2334115,15 +2334115,15 @@ │ │ │ │ sd a5,760(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,760(sp) │ │ │ │ ld a1,736(sp) │ │ │ │ auipc a4,0x281 │ │ │ │ addi a4,a4,-542 │ │ │ │ auipc a3,0x29a │ │ │ │ - addi a3,a3,-1078 │ │ │ │ + addi a3,a3,-118 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,170 │ │ │ │ jal 6fb754 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,248 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2334139,16 +2334139,16 @@ │ │ │ │ addi a1,a1,-70 │ │ │ │ sd a5,808(sp) │ │ │ │ jal 6f0196 │ │ │ │ ld a2,808(sp) │ │ │ │ ld a1,784(sp) │ │ │ │ auipc a4,0x281 │ │ │ │ addi a4,a4,-78 │ │ │ │ - auipc a3,0x293 │ │ │ │ - addi a3,a3,1506 │ │ │ │ + auipc a3,0x28e │ │ │ │ + addi a3,a3,-918 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,162 │ │ │ │ jal 6fb754 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,312 │ │ │ │ add a0,sp,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ @@ -2334158,18 +2334158,18 @@ │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,344 │ │ │ │ add a0,sp,a5 │ │ │ │ auipc a1,0x1ec │ │ │ │ addi a1,a1,-110 │ │ │ │ add s7,sp,a5 │ │ │ │ jal 6f0196 │ │ │ │ - auipc a4,0x291 │ │ │ │ - addi a4,a4,1938 │ │ │ │ - auipc a3,0x293 │ │ │ │ - addi a3,a3,-1150 │ │ │ │ + auipc a4,0x29d │ │ │ │ + addi a4,a4,578 │ │ │ │ + auipc a3,0x296 │ │ │ │ + addi a3,a3,2002 │ │ │ │ mv a2,s7 │ │ │ │ mv a1,s8 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,158 │ │ │ │ jal 6fb754 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,376 │ │ │ │ @@ -2334183,16 +2334183,16 @@ │ │ │ │ add s0,sp,a5 │ │ │ │ mv a0,s0 │ │ │ │ auipc a1,0x1ec │ │ │ │ addi a1,a1,-148 │ │ │ │ jal 6f0196 │ │ │ │ auipc a4,0x281 │ │ │ │ addi a4,a4,1592 │ │ │ │ - auipc a3,0x294 │ │ │ │ - addi a3,a3,-456 │ │ │ │ + auipc a3,0x291 │ │ │ │ + addi a3,a3,-888 │ │ │ │ mv a2,s0 │ │ │ │ mv a1,s6 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,156 │ │ │ │ jal 6fb754 │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,440 │ │ │ │ @@ -2334206,16 +2334206,16 @@ │ │ │ │ add s1,sp,a5 │ │ │ │ mv a0,s1 │ │ │ │ auipc a1,0x1ec │ │ │ │ addi a1,a1,-196 │ │ │ │ jal 6f0196 │ │ │ │ auipc a4,0x282 │ │ │ │ addi a4,a4,-952 │ │ │ │ - auipc a3,0x28a │ │ │ │ - addi a3,a3,-1656 │ │ │ │ + auipc a3,0x294 │ │ │ │ + addi a3,a3,-88 │ │ │ │ mv a2,s1 │ │ │ │ mv a1,s2 │ │ │ │ auipc a0,0x4c7 │ │ │ │ addi a0,a0,156 │ │ │ │ jal 6fb754 │ │ │ │ auipc a2,0x4b9 │ │ │ │ addi a2,a2,336 │ │ │ │ @@ -2695499,15 +2695499,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,-1841 │ │ │ │ + addi a0,a0,-1828 │ │ │ │ ret │ │ │ │ beqz a0,7f0018 │ │ │ │ ld a4,0(a0) │ │ │ │ auipc a3,0xffffd │ │ │ │ addi a3,a3,-276 │ │ │ │ ld a4,32(a4) │ │ │ │ bne a4,a3,7f001a │ │ │ ├── readelf --wide --decompress --hex-dump=.rodata {} │ │ │ │ @@ -20187,15 +20187,15 @@ │ │ │ │ 0x008ea680 6f736974 696f6e00 4e6f7446 6f6c6c6f osition.NotFollo │ │ │ │ 0x008ea690 77000000 00000000 4e6f7446 6f6c6c6f w.......NotFollo │ │ │ │ 0x008ea6a0 774e6f50 6f736974 696f6e00 00000000 wNoPosition..... │ │ │ │ 0x008ea6b0 466f6c6c 6f770000 466f6c6c 6f77416e Follow..FollowAn │ │ │ │ 0x008ea6c0 64526f74 61746500 50656e64 696e6700 dRotate.Pending. │ │ │ │ 0x008ea6d0 53414a53 414a0000 46414641 46410000 SAJSAJ..FAFAFA.. │ │ │ │ 0x008ea6e0 25456300 00000000 32303236 2e30332e %Ec.....2026.03. │ │ │ │ - 0x008ea6f0 30332d30 2d303030 30303030 302d4c69 03-0-00000000-Li │ │ │ │ + 0x008ea6f0 31362d30 2d303030 30303030 302d4c69 16-0-00000000-Li │ │ │ │ 0x008ea700 6e757800 00000000 3136322e 35352e31 nux.....162.55.1 │ │ │ │ 0x008ea710 30302e31 36390000 436f7272 75707465 00.169..Corrupte │ │ │ │ 0x008ea720 644d776d 46696c65 202e2f6c 6962732f dMwmFile ./libs/ │ │ │ │ 0x008ea730 706c6174 666f726d 2f6d776d 5f766572 platform/mwm_ver │ │ │ │ 0x008ea740 73696f6e 2e637070 3a333200 00000000 sion.cpp:32..... │ │ │ │ 0x008ea750 494f2065 78636570 74696f6e 00000000 IO exception.... │ │ │ │ 0x008ea760 57726974 65206578 63657074 696f6e00 Write exception. │ │ │ │ @@ -55945,7573 +55945,7573 @@ │ │ │ │ 0x00976160 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ 0x00976170 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ 0x00976180 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ 0x00976190 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ 0x009761a0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ 0x009761b0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ 0x009761c0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x009761d0 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x009761e0 64733b20 0a202023 69666465 6620454e ds; . #ifdef EN │ │ │ │ - 0x009761f0 41424c45 5f565446 200a2020 6f757420 ABLE_VTF . out │ │ │ │ - 0x00976200 4c4f575f 50207665 63342076 5f636f6c LOW_P vec4 v_col │ │ │ │ - 0x00976210 6f723b20 0a202023 656c7365 200a2020 or; . #else . │ │ │ │ - 0x00976220 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ - 0x00976230 54657843 6f6f7264 733b200a 20202365 TexCoords; . #e │ │ │ │ - 0x00976240 6e646966 200a2020 756e6966 6f726d20 ndif . uniform │ │ │ │ - 0x00976250 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ - 0x00976260 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00976270 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ - 0x00976280 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00976290 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ - 0x009762a0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x009762b0 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ - 0x009762c0 613b200a 2020756e 69666f72 6d20666c a; . uniform fl │ │ │ │ - 0x009762d0 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ - 0x009762e0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x009762f0 755f7a53 63616c65 3b200a20 20756e69 u_zScale; . uni │ │ │ │ - 0x00976300 666f726d 20666c6f 61742075 5f696e74 form float u_int │ │ │ │ - 0x00976310 6572706f 6c617469 6f6e3b20 0a202075 erpolation; . u │ │ │ │ - 0x00976320 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x00976330 734f7574 6c696e65 50617373 3b200a20 sOutlinePass; . │ │ │ │ - 0x00976340 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00976350 5446200a 2020756e 69666f72 6d207361 TF . uniform sa │ │ │ │ - 0x00976360 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ - 0x00976370 65783b20 0a202023 656e6469 66200a20 ex; . #endif . │ │ │ │ - 0x00976380 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00976390 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x009763a0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x009763b0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x009763c0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x009763d0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x009763e0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x009763f0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00976400 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00976410 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00976420 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00976430 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00976440 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00976450 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00976460 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00976470 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00976480 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00976490 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x009764a0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x009764b0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x009764c0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x009764d0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x009764e0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x009764f0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00976500 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00976510 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00976520 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00976530 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00976540 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00976550 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00976560 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00976570 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00976580 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00976590 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x009765a0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x009765b0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x009765c0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x009765d0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x009765e0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x009765f0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x00976600 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00976610 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00976620 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00976630 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00976640 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00976650 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00976660 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00976670 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00976680 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00976690 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x009766a0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x009766b0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x009766c0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x009766d0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x009766e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009766f0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x00976700 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x00976710 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00976720 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00976730 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00976740 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00976750 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00976760 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00976770 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00976780 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00976790 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x009767a0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x009767b0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x009767c0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x009767d0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x009767e0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x009767f0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x00976800 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x00976810 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00976820 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00976830 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00976840 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00976850 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00976860 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00976870 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00976880 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00976890 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x009768a0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x009768b0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x009768c0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x009768d0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x009768e0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x009768f0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00976900 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x00976910 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00976920 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ - 0x00976930 28615f70 6f736974 696f6e2c 20312920 (a_position, 1) │ │ │ │ - 0x00976940 2a20755f 6d6f6465 6c566965 77202a20 * u_modelView * │ │ │ │ - 0x00976950 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00976960 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00976970 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00976980 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ - 0x00976990 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ - 0x009769a0 3b200a20 20236966 64656620 454e4142 ; . #ifdef ENAB │ │ │ │ - 0x009769b0 4c455f56 5446200a 20202020 765f636f LE_VTF . v_co │ │ │ │ - 0x009769c0 6c6f7220 3d207465 78747572 6528755f lor = texture(u_ │ │ │ │ - 0x009769d0 636f6c6f 72546578 2c20615f 636f6c6f colorTex, a_colo │ │ │ │ - 0x009769e0 72546578 436f6f72 6473293b 200a2020 rTexCoords); . │ │ │ │ - 0x009769f0 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ - 0x00976a00 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ - 0x00976a10 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ - 0x00976a20 0a202023 656e6469 66200a20 207d200a . #endif . } . │ │ │ │ - 0x00976a30 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ - 0x00976a40 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00976a50 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00976a60 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00976a70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00976a80 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00976a90 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00976aa0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00976ab0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00976ac0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00976ad0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00976ae0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00976af0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00976b00 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00976b10 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00976b20 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00976b30 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00976b40 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00976b50 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00976b60 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00976b70 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00976b80 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00976b90 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00976ba0 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ - 0x00976bb0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x00976bc0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x00976bd0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x00976be0 6f6f7264 733b200a 20206f75 7420666c oords; . out fl │ │ │ │ - 0x00976bf0 6f617420 765f696e 74656e73 6974793b oat v_intensity; │ │ │ │ - 0x00976c00 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00976c10 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ - 0x00976c20 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00976c30 70726f6a 65637469 6f6e3b20 0a202075 projection; . u │ │ │ │ - 0x00976c40 6e69666f 726d206d 61743420 755f7069 niform mat4 u_pi │ │ │ │ - 0x00976c50 766f7454 72616e73 666f726d 3b200a20 votTransform; . │ │ │ │ - 0x00976c60 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x00976c70 636f6e74 72617374 47616d6d 613b200a contrastGamma; . │ │ │ │ - 0x00976c80 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00976c90 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ - 0x00976ca0 69666f72 6d20666c 6f617420 755f7a53 iform float u_zS │ │ │ │ - 0x00976cb0 63616c65 3b200a20 20756e69 666f726d cale; . uniform │ │ │ │ - 0x00976cc0 20666c6f 61742075 5f696e74 6572706f float u_interpo │ │ │ │ - 0x00976cd0 6c617469 6f6e3b20 0a202075 6e69666f lation; . unifo │ │ │ │ - 0x00976ce0 726d2066 6c6f6174 20755f69 734f7574 rm float u_isOut │ │ │ │ - 0x00976cf0 6c696e65 50617373 3b200a20 20636f6e linePass; . con │ │ │ │ - 0x00976d00 73742076 65633420 6b4e6f72 6d616c69 st vec4 kNormali │ │ │ │ - 0x00976d10 7a65644c 69676874 44697220 3d207665 zedLightDir = ve │ │ │ │ - 0x00976d20 63342830 2e333136 322c2030 2e302c20 c4(0.3162, 0.0, │ │ │ │ - 0x00976d30 302e3934 38362c20 302e3029 3b200a20 0.9486, 0.0); . │ │ │ │ - 0x00976d40 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00976d50 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00976d60 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00976d70 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00976d80 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00976d90 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00976da0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00976db0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00976dc0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00976dd0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00976de0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00976df0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00976e00 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00976e10 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00976e20 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00976e30 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00976e40 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00976e50 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00976e60 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00976e70 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00976e80 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00976e90 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00976ea0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00976eb0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00976ec0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00976ed0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00976ee0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00976ef0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00976f00 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00976f10 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00976f20 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00976f30 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00976f40 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00976f50 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00976f60 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00976f70 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00976f80 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00976f90 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00976fa0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x00976fb0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x00976fc0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00976fd0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00976fe0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00976ff0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00977000 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00977010 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00977020 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00977030 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x009761d0 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ + 0x009761e0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x009761f0 78436f6f 7264733b 200a2020 23696664 xCoords; . #ifd │ │ │ │ + 0x00976200 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x00976210 206f7574 204c4f57 5f502076 65633420 out LOW_P vec4 │ │ │ │ + 0x00976220 765f636f 6c6f723b 200a2020 23656c73 v_color; . #els │ │ │ │ + 0x00976230 65200a20 206f7574 20766563 3220765f e . out vec2 v_ │ │ │ │ + 0x00976240 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ + 0x00976250 0a202023 656e6469 66200a20 206f7574 . #endif . out │ │ │ │ + 0x00976260 20766563 3320765f 72616469 75733b20 vec3 v_radius; │ │ │ │ + 0x00976270 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00976280 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00976290 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x009762a0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x009762b0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x009762c0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x009762d0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x009762e0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x009762f0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00976300 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x00976310 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x00976320 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x00976330 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x00976340 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x00976350 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x00976360 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ + 0x00976370 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x00976380 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x00976390 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x009763a0 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ + 0x009763b0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x009763c0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x009763d0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x009763e0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x009763f0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00976400 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00976410 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00976420 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x00976430 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00976440 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00976450 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00976460 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00976470 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00976480 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00976490 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x009764a0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x009764b0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x009764c0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x009764d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009764e0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x009764f0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x00976500 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00976510 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00976520 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x00976530 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x00976540 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00976550 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x00976560 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x00976570 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00976580 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00976590 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x009765a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009765b0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x009765c0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x009765d0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x009765e0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x009765f0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00976600 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x00976610 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x00976620 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x00976630 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00976640 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00976650 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00976660 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00976670 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00976680 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00976690 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x009766a0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x009766b0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x009766c0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x009766d0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x009766e0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x009766f0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00976700 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x00976710 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x00976720 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x00976730 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x00976740 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00976750 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00976760 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00976770 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00976780 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00976790 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x009767a0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x009767b0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x009767c0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x009767d0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x009767e0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x009767f0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x00976800 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x00976810 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x00976820 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x00976830 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x00976840 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00976850 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00976860 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00976870 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00976880 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00976890 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x009768a0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x009768b0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x009768c0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x009768d0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x009768e0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x009768f0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x00976900 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x00976910 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00976920 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00976930 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00976940 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00976950 2070203d 20766563 3428615f 706f7369 p = vec4(a_posi │ │ │ │ + 0x00976960 74696f6e 2c203129 202a2075 5f6d6f64 tion, 1) * u_mod │ │ │ │ + 0x00976970 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ + 0x00976980 3420706f 73203d20 76656334 28615f6e 4 pos = vec4(a_n │ │ │ │ + 0x00976990 6f726d61 6c2e7879 2c20302c 20302920 ormal.xy, 0, 0) │ │ │ │ + 0x009769a0 2b20703b 200a2020 2020676c 5f506f73 + p; . gl_Pos │ │ │ │ + 0x009769b0 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ + 0x009769c0 6f745472 616e7366 6f726d28 706f7320 otTransform(pos │ │ │ │ + 0x009769d0 2a20755f 70726f6a 65637469 6f6e2c20 * u_projection, │ │ │ │ + 0x009769e0 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x009769f0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00976a00 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x00976a10 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ + 0x00976a20 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ + 0x00976a30 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00976a40 293b200a 20202365 6c736520 0a202020 ); . #else . │ │ │ │ + 0x00976a50 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x00976a60 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ + 0x00976a70 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ + 0x00976a80 0a202020 20765f72 61646975 73203d20 . v_radius = │ │ │ │ + 0x00976a90 615f6e6f 726d616c 3b200a20 207d200a a_normal; . } . │ │ │ │ + 0x00976aa0 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x00976ab0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00976ac0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00976ad0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00976ae0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00976af0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00976b00 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00976b10 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00976b20 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00976b30 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00976b40 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00976b50 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00976b60 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00976b70 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00976b80 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00976b90 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00976ba0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00976bb0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00976bc0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00976bd0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00976be0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00976bf0 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x00976c00 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00976c10 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x00976c20 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00976c30 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ + 0x00976c40 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ + 0x00976c50 6f72643b 200a2020 6f757420 76656333 ord; . out vec3 │ │ │ │ + 0x00976c60 20765f72 61646975 733b200a 2020756e v_radius; . un │ │ │ │ + 0x00976c70 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ + 0x00976c80 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ + 0x00976c90 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ + 0x00976ca0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00976cb0 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ + 0x00976cc0 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ + 0x00976cd0 726d2076 65633420 755f7472 61666669 rm vec4 u_traffi │ │ │ │ + 0x00976ce0 63506172 616d733b 200a2020 756e6966 cParams; . unif │ │ │ │ + 0x00976cf0 6f726d20 76656334 20755f6f 75746c69 orm vec4 u_outli │ │ │ │ + 0x00976d00 6e65436f 6c6f723b 200a2020 756e6966 neColor; . unif │ │ │ │ + 0x00976d10 6f726d20 76656334 20755f6c 69676874 orm vec4 u_light │ │ │ │ + 0x00976d20 4172726f 77436f6c 6f723b20 0a202075 ArrowColor; . u │ │ │ │ + 0x00976d30 6e69666f 726d2076 65633420 755f6461 niform vec4 u_da │ │ │ │ + 0x00976d40 726b4172 726f7743 6f6c6f72 3b200a20 rkArrowColor; . │ │ │ │ + 0x00976d50 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00976d60 5f6f7574 6c696e65 3b200a20 20756e69 _outline; . uni │ │ │ │ + 0x00976d70 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ + 0x00976d80 63697479 3b200a20 20636f6e 73742066 city; . const f │ │ │ │ + 0x00976d90 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x00976da0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x00976db0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x00976dc0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00976dd0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00976de0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00976df0 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x00976e00 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x00976e10 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x00976e20 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x00976e30 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x00976e40 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x00976e50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00976e60 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x00976e70 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x00976e80 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00976e90 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00976ea0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x00976eb0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00976ec0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x00976ed0 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x00976ee0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00976ef0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00976f00 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x00976f10 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x00976f20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00976f30 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x00976f40 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x00976f50 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x00976f60 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x00976f70 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x00976f80 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x00976f90 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x00976fa0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x00976fb0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00976fc0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00976fd0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00976fe0 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x00976ff0 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x00977000 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x00977010 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x00977020 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x00977030 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ 0x00977040 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00977050 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00977060 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00977070 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00977080 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00977090 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x009770a0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009770b0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x009770c0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x009770d0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x009770e0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x009770f0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00977100 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00977110 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00977120 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00977130 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00977140 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00977150 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00977160 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00977170 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00977180 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00977190 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x009771a0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x009771b0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x009771c0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x009771d0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x009771e0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x009771f0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00977200 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00977210 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00977220 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00977230 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00977240 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00977250 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00977260 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00977270 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00977280 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00977290 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x009772a0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x009772b0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x009772c0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x009772d0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x009772e0 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ - 0x009772f0 28615f70 6f736974 696f6e2c 20312e30 (a_position, 1.0 │ │ │ │ - 0x00977300 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ - 0x00977310 200a2020 20207665 6334206e 6f726d61 . vec4 norma │ │ │ │ - 0x00977320 6c203d20 76656334 28615f70 6f736974 l = vec4(a_posit │ │ │ │ - 0x00977330 696f6e20 2b20615f 6e6f726d 616c2c20 ion + a_normal, │ │ │ │ - 0x00977340 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ - 0x00977350 65773b20 0a202020 206e6f72 6d616c2e ew; . normal. │ │ │ │ - 0x00977360 78797720 3d20286e 6f726d61 6c202a20 xyw = (normal * │ │ │ │ - 0x00977370 755f7072 6f6a6563 74696f6e 292e7879 u_projection).xy │ │ │ │ - 0x00977380 773b200a 20202020 6e6f726d 616c2e7a w; . normal.z │ │ │ │ - 0x00977390 203d206e 6f726d61 6c2e7a20 2a20755f = normal.z * u_ │ │ │ │ - 0x009773a0 7a536361 6c653b20 0a202020 20706f73 zScale; . pos │ │ │ │ - 0x009773b0 2e787977 203d2028 706f7320 2a20755f .xyw = (pos * u_ │ │ │ │ - 0x009773c0 70726f6a 65637469 6f6e292e 7879773b projection).xyw; │ │ │ │ - 0x009773d0 200a2020 2020706f 732e7a20 3d20615f . pos.z = a_ │ │ │ │ - 0x009773e0 706f7369 74696f6e 2e7a202a 20755f7a position.z * u_z │ │ │ │ - 0x009773f0 5363616c 653b200a 20202020 76656334 Scale; . vec4 │ │ │ │ - 0x00977400 206e6f72 6d446972 203d206e 6f726d61 normDir = norma │ │ │ │ - 0x00977410 6c202d20 706f733b 200a2020 20206966 l - pos; . if │ │ │ │ - 0x00977420 2028646f 74286e6f 726d4469 722c206e (dot(normDir, n │ │ │ │ - 0x00977430 6f726d44 69722920 213d2030 2e302920 ormDir) != 0.0) │ │ │ │ - 0x00977440 0a202020 20202076 5f696e74 656e7369 . v_intensi │ │ │ │ - 0x00977450 7479203d 206d6178 28302e30 2c202d64 ty = max(0.0, -d │ │ │ │ - 0x00977460 6f74286b 4e6f726d 616c697a 65644c69 ot(kNormalizedLi │ │ │ │ - 0x00977470 67687444 69722c20 6e6f726d 616c697a ghtDir, normaliz │ │ │ │ - 0x00977480 65286e6f 726d4469 72292929 3b200a20 e(normDir))); . │ │ │ │ - 0x00977490 20202065 6c736520 0a202020 20202076 else . v │ │ │ │ - 0x009774a0 5f696e74 656e7369 7479203d 20302e30 _intensity = 0.0 │ │ │ │ - 0x009774b0 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x009774c0 6f6e203d 20755f70 69766f74 5472616e on = u_pivotTran │ │ │ │ - 0x009774d0 73666f72 6d202a20 706f733b 200a2020 sform * pos; . │ │ │ │ - 0x009774e0 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x009774f0 20202067 6c5f506f 73697469 6f6e2e79 gl_Position.y │ │ │ │ - 0x00977500 203d202d 676c5f50 6f736974 696f6e2e = -gl_Position. │ │ │ │ - 0x00977510 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ - 0x00977520 696f6e2e 7a203d20 28676c5f 506f7369 ion.z = (gl_Posi │ │ │ │ - 0x00977530 74696f6e 2e7a2020 2b20676c 5f506f73 tion.z + gl_Pos │ │ │ │ - 0x00977540 6974696f 6e2e7729 202a2030 2e353b20 ition.w) * 0.5; │ │ │ │ - 0x00977550 0a202023 656e6469 66200a20 20202076 . #endif . v │ │ │ │ - 0x00977560 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ - 0x00977570 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ - 0x00977580 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ - 0x00977590 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009775a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009775b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009775c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009775d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009775e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009775f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00977600 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00977610 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00977620 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00977630 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00977640 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00977650 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00977660 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00977670 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00977680 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00977690 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009776a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009776b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009776c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009776d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009776e0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x009776f0 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00977700 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ - 0x00977710 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ - 0x00977720 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ - 0x00977730 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ - 0x00977740 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ - 0x00977750 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x00977760 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ - 0x00977770 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ - 0x00977780 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ - 0x00977790 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ - 0x009777a0 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ - 0x009777b0 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ - 0x009777c0 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x009777d0 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ - 0x009777e0 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ - 0x009777f0 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ - 0x00977800 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ - 0x00977810 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ - 0x00977820 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00977830 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ - 0x00977840 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ - 0x00977850 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ - 0x00977860 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ - 0x00977870 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ - 0x00977880 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ - 0x00977890 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ - 0x009778a0 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ - 0x009778b0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x009778c0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x009778d0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x009778e0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x009778f0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00977900 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00977910 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00977920 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00977930 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00977940 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00977950 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00977960 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00977970 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00977980 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x00977990 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x009779a0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009779b0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x009779c0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x009779d0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x009779e0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x009779f0 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00977a00 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00977a10 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00977a20 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00977a30 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00977a40 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00977a50 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x00977a60 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x00977a70 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x00977a80 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00977a90 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x00977aa0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x00977ab0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00977ac0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00977ad0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00977ae0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00977af0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00977b00 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00977b10 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00977b20 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00977b30 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00977b40 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00977b50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00977b60 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00977b70 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x00977b80 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x00977b90 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x00977ba0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x00977bb0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00977bc0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00977bd0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00977be0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00977bf0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00977c00 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00977c10 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00977c20 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00977c30 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00977c40 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00977c50 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00977c60 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x00977c70 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x00977c80 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x00977c90 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x00977ca0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x00977cb0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00977cc0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00977cd0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00977ce0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00977cf0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00977d00 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00977d10 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00977d20 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00977d30 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00977d40 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00977d50 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x00977d60 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x00977d70 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x00977d80 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00977d90 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x00977da0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00977db0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00977dc0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00977dd0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00977de0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00977df0 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00977e00 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00977e10 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00977e20 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00977e30 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00977e40 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ - 0x00977e50 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ - 0x00977e60 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ - 0x00977e70 64656c56 6965773b 200a2020 2020706f delView; . po │ │ │ │ - 0x00977e80 732e7879 77203d20 28706f73 202a2075 s.xyw = (pos * u │ │ │ │ - 0x00977e90 5f70726f 6a656374 696f6e29 2e787977 _projection).xyw │ │ │ │ - 0x00977ea0 3b200a20 20202070 6f732e7a 203d2061 ; . pos.z = a │ │ │ │ - 0x00977eb0 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ - 0x00977ec0 7a536361 6c653b20 0a202020 20676c5f zScale; . gl_ │ │ │ │ - 0x00977ed0 506f7369 74696f6e 203d2075 5f706976 Position = u_piv │ │ │ │ - 0x00977ee0 6f745472 616e7366 6f726d20 2a20706f otTransform * po │ │ │ │ - 0x00977ef0 733b200a 20202369 66646566 2056554c s; . #ifdef VUL │ │ │ │ - 0x00977f00 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ - 0x00977f10 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ - 0x00977f20 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ - 0x00977f30 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ - 0x00977f40 6c5f506f 73697469 6f6e2e7a 20202b20 l_Position.z + │ │ │ │ - 0x00977f50 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ - 0x00977f60 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ - 0x00977f70 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00977f80 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ - 0x00977f90 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ - 0x00977fa0 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ - 0x00977fb0 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ - 0x00977fc0 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ - 0x00977fd0 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ - 0x00977fe0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x00977ff0 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ - 0x00978000 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00978010 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00978020 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00978030 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00978040 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00978050 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00978060 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00978070 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00978080 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00978090 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009780a0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x009780b0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x009780c0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x009780d0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x009780e0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009780f0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00978100 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00978110 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00978120 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00978130 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00978140 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00978150 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x00978160 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ - 0x00978170 20206f75 74207665 63332076 5f6e6f72 out vec3 v_nor │ │ │ │ - 0x00978180 6d616c3b 200a2020 756e6966 6f726d20 mal; . uniform │ │ │ │ - 0x00978190 6d617434 20755f74 72616e73 666f726d mat4 u_transform │ │ │ │ - 0x009781a0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x009781b0 3420755f 6e6f726d 616c5472 616e7366 4 u_normalTransf │ │ │ │ - 0x009781c0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x009781d0 76656334 20755f63 6f6c6f72 3b200a20 vec4 u_color; . │ │ │ │ - 0x009781e0 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x009781f0 74657843 6f6f7264 466c6970 70696e67 texCoordFlipping │ │ │ │ - 0x00978200 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00978210 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00978220 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00978230 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00978240 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00978250 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00978260 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00978270 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00978280 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00978290 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x009782a0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x009782b0 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x009782c0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x009782d0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x009782e0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x009782f0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00978300 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00978310 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00978320 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00978330 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00978340 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00978350 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00978360 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00978370 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00978380 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x00978390 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x009783a0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x009783b0 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x009783c0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x009783d0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x009783e0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x009783f0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x00978400 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x00978410 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x00978420 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00978430 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00978440 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00978450 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00978460 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00978470 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00978480 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x00978490 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x009784a0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x009784b0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x009784c0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x009784d0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x009784e0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x009784f0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x00978500 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x00978510 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x00978520 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x00978530 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x00978540 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x00978550 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00978560 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x00978570 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x00978580 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x00978590 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x009785a0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x009785b0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x009785c0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x009785d0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x009785e0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x009785f0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x00978600 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x00978610 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x00978620 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x00978630 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x00978640 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x00978650 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x00978660 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x00978670 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x00978680 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x00978690 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x009786a0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x009786b0 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x009786c0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x009786d0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x009786e0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x009786f0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x00978700 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x00978710 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x00978720 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x00978730 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00978740 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x00978750 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x00978760 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x00978770 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00978780 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x00978790 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x009787a0 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x009787b0 6f6e203d 20755f74 72616e73 666f726d on = u_transform │ │ │ │ - 0x009787c0 202a2076 65633428 615f706f 732c2031 * vec4(a_pos, 1 │ │ │ │ - 0x009787d0 2e30293b 200a2020 2020765f 6e6f726d .0); . v_norm │ │ │ │ - 0x009787e0 616c203d 206e6f72 6d616c69 7a652828 al = normalize(( │ │ │ │ - 0x009787f0 755f6e6f 726d616c 5472616e 73666f72 u_normalTransfor │ │ │ │ - 0x00978800 6d202a20 76656334 28615f6e 6f726d61 m * vec4(a_norma │ │ │ │ - 0x00978810 6c2c2030 2e302929 2e78797a 293b200a l, 0.0)).xyz); . │ │ │ │ - 0x00978820 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00978830 3d20706f 73697469 6f6e3b20 0a202023 = position; . # │ │ │ │ - 0x00978840 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00978850 2020676c 5f506f73 6974696f 6e2e7920 gl_Position.y │ │ │ │ - 0x00978860 3d202d67 6c5f506f 73697469 6f6e2e79 = -gl_Position.y │ │ │ │ - 0x00978870 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x00978880 6f6e2e7a 203d2028 676c5f50 6f736974 on.z = (gl_Posit │ │ │ │ - 0x00978890 696f6e2e 7a202b20 676c5f50 6f736974 ion.z + gl_Posit │ │ │ │ - 0x009788a0 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ - 0x009788b0 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ - 0x009788c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009788d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009788e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009788f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00978900 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00978910 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00978920 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00978930 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00978940 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00978950 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00978960 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00978970 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00978980 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00978990 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x009789a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009789b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009789c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009789d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009789e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009789f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00978a00 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00978a10 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x00978a20 76656332 20615f74 6578436f 6f726473 vec2 a_texCoords │ │ │ │ - 0x00978a30 3b200a20 206f7574 20666c6f 61742076 ; . out float v │ │ │ │ - 0x00978a40 5f696e74 656e7369 74793b20 0a202075 _intensity; . u │ │ │ │ - 0x00978a50 6e69666f 726d206d 61743420 755f7472 niform mat4 u_tr │ │ │ │ - 0x00978a60 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ - 0x00978a70 6f726d20 6d617434 20755f6e 6f726d61 orm mat4 u_norma │ │ │ │ - 0x00978a80 6c547261 6e73666f 726d3b20 0a202075 lTransform; . u │ │ │ │ - 0x00978a90 6e69666f 726d2076 65633420 755f636f niform vec4 u_co │ │ │ │ - 0x00978aa0 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x00978ab0 76656332 20755f74 6578436f 6f726446 vec2 u_texCoordF │ │ │ │ - 0x00978ac0 6c697070 696e673b 200a2020 636f6e73 lipping; . cons │ │ │ │ - 0x00978ad0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00978ae0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00978af0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00978b00 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00978b10 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00978b20 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00978b30 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00978b40 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00978b50 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00978b60 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00978b70 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00978b80 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00978b90 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00978ba0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00978bb0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00978bc0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00978bd0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00978be0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00978bf0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00978c00 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00978c10 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00978c20 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00978c30 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00978c40 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00978c50 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x00978c60 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00978c70 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x00978c80 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x00978c90 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00978ca0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00978cb0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00978cc0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00978cd0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00978ce0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00978cf0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00978d00 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00978d10 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00978d20 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00978d30 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00978d40 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00978d50 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x00978d60 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x00978d70 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00978d80 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x00978d90 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x00978da0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00978db0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00978dc0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00978dd0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00978de0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00978df0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00978e00 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00978e10 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00978e20 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00978e30 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00978e40 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00978e50 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x00978e60 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x00978e70 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x00978e80 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x00978e90 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x00978ea0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x00978eb0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00978ec0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00978ed0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00978ee0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00978ef0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00978f00 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00978f10 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00978f20 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00978f30 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00978f40 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00978f50 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x00978f60 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x00978f70 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x00978f80 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x00978f90 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x00978fa0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x00978fb0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00978fc0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00978fd0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00978fe0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00978ff0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00979000 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00979010 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00979020 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00979030 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00979040 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00979050 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x00979060 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00979070 20706f73 6974696f 6e203d20 755f7472 position = u_tr │ │ │ │ - 0x00979080 616e7366 6f726d20 2a207665 63342861 ansform * vec4(a │ │ │ │ - 0x00979090 5f706f73 2c20312e 30293b20 0a202020 _pos, 1.0); . │ │ │ │ - 0x009790a0 20765f69 6e74656e 73697479 203d2061 v_intensity = a │ │ │ │ - 0x009790b0 5f746578 436f6f72 64732e78 3b200a20 _texCoords.x; . │ │ │ │ - 0x009790c0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x009790d0 20706f73 6974696f 6e3b200a 20202369 position; . #i │ │ │ │ - 0x009790e0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x009790f0 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ - 0x00979100 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ - 0x00979110 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00979120 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ - 0x00979130 6f6e2e7a 202b2067 6c5f506f 73697469 on.z + gl_Positi │ │ │ │ - 0x00979140 6f6e2e77 29202a20 302e353b 200a2020 on.w) * 0.5; . │ │ │ │ - 0x00979150 23656e64 6966200a 20207d20 0a000000 #endif . } .... │ │ │ │ - 0x00979160 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00979170 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00979180 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00979190 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009791a0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009791b0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009791c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009791d0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009791e0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009791f0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00979200 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00979210 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00979220 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00979230 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00979240 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00979250 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00979260 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00979270 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00979280 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00979290 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009792a0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009792b0 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ - 0x009792c0 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ - 0x009792d0 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ - 0x009792e0 6f6f7264 733b200a 20206f75 74207665 oords; . out ve │ │ │ │ - 0x009792f0 63332076 5f6e6f72 6d616c3b 200a2020 c3 v_normal; . │ │ │ │ - 0x00979300 6f757420 76656332 20765f74 6578436f out vec2 v_texCo │ │ │ │ - 0x00979310 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ - 0x00979320 206d6174 3420755f 7472616e 73666f72 mat4 u_transfor │ │ │ │ - 0x00979330 6d3b200a 2020756e 69666f72 6d206d61 m; . uniform ma │ │ │ │ - 0x00979340 74342075 5f6e6f72 6d616c54 72616e73 t4 u_normalTrans │ │ │ │ - 0x00979350 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ - 0x00979360 20766563 3420755f 636f6c6f 723b200a vec4 u_color; . │ │ │ │ - 0x00979370 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ - 0x00979380 5f746578 436f6f72 64466c69 7070696e _texCoordFlippin │ │ │ │ - 0x00979390 673b200a 2020636f 6e737420 666c6f61 g; . const floa │ │ │ │ - 0x009793a0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x009793b0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x009793c0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x009793d0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x009793e0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x009793f0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00979400 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00979410 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00979420 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00979430 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00979440 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00979450 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00979460 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00979470 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00979480 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00979490 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x009794a0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x009794b0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x009794c0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x009794d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009794e0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x009794f0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00979500 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00979510 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00979520 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00979530 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00979540 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00979550 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00979560 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00979570 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00979580 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00979590 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x009795a0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x009795b0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x009795c0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x009795d0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x009795e0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x009795f0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00979600 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00979610 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00979620 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00979630 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00979640 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00979650 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00979660 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00979670 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00979680 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00979690 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x009796a0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x009796b0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x009796c0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x009796d0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x009796e0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x009796f0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00979700 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00979710 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00979720 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00979730 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00979740 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00979750 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00979760 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00979770 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00979780 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00979790 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x009797a0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x009797b0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x009797c0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x009797d0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x009797e0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x009797f0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00979800 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00979810 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00979820 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00979830 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00979840 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00979850 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00979860 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00979870 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00979880 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00979890 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x009798a0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x009798b0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x009798c0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x009798d0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x009798e0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x009798f0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00979900 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00979910 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00979920 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00979930 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00979940 696f6e20 3d20755f 7472616e 73666f72 ion = u_transfor │ │ │ │ - 0x00979950 6d202a20 76656334 28615f70 6f732c20 m * vec4(a_pos, │ │ │ │ - 0x00979960 312e3029 3b200a20 20202076 5f6e6f72 1.0); . v_nor │ │ │ │ - 0x00979970 6d616c20 3d206e6f 726d616c 697a6528 mal = normalize( │ │ │ │ - 0x00979980 28755f6e 6f726d61 6c547261 6e73666f (u_normalTransfo │ │ │ │ - 0x00979990 726d202a 20766563 3428615f 6e6f726d rm * vec4(a_norm │ │ │ │ - 0x009799a0 616c2c20 302e3029 292e7879 7a293b20 al, 0.0)).xyz); │ │ │ │ - 0x009799b0 0a202020 20765f74 6578436f 6f726473 . v_texCoords │ │ │ │ - 0x009799c0 203d206d 69782861 5f746578 436f6f72 = mix(a_texCoor │ │ │ │ - 0x009799d0 64732c20 312e3020 2d20615f 74657843 ds, 1.0 - a_texC │ │ │ │ - 0x009799e0 6f6f7264 732c2075 5f746578 436f6f72 oords, u_texCoor │ │ │ │ - 0x009799f0 64466c69 7070696e 67293b20 0a202020 dFlipping); . │ │ │ │ - 0x00979a00 20676c5f 506f7369 74696f6e 203d2070 gl_Position = p │ │ │ │ - 0x00979a10 6f736974 696f6e3b 200a2020 23696664 osition; . #ifd │ │ │ │ - 0x00979a20 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ - 0x00979a30 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ - 0x00979a40 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ - 0x00979a50 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ - 0x00979a60 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ - 0x00979a70 2e7a202b 20676c5f 506f7369 74696f6e .z + gl_Position │ │ │ │ - 0x00979a80 2e772920 2a20302e 353b200a 20202365 .w) * 0.5; . #e │ │ │ │ - 0x00979a90 6e646966 200a2020 7d200a00 00000000 ndif . } ...... │ │ │ │ - 0x00979aa0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00979ab0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00979ac0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00979ad0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00979ae0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00979af0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00979b00 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00979b10 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00979b20 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00979b30 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00979b40 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00979b50 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00979b60 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00979b70 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00979b80 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00979b90 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00979ba0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00979bb0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00979bc0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00979bd0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00979be0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00979bf0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00979c00 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00979c10 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00979c20 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00979c30 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00979c40 455f5654 46200a20 206f7574 204c4f57 E_VTF . out LOW │ │ │ │ - 0x00979c50 5f502076 65633420 765f636f 6c6f723b _P vec4 v_color; │ │ │ │ - 0x00979c60 200a2020 23656c73 65200a20 206f7574 . #else . out │ │ │ │ - 0x00979c70 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ - 0x00979c80 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ - 0x00979c90 66200a20 206f7574 20766563 3320765f f . out vec3 v_ │ │ │ │ - 0x00979ca0 72616469 75733b20 0a202075 6e69666f radius; . unifo │ │ │ │ - 0x00979cb0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00979cc0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00979cd0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00979ce0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00979cf0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00979d00 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00979d10 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00979d20 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00979d30 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00979d40 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00979d50 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00979d60 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00979d70 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00979d80 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00979d90 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00979da0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x00979db0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x00979dc0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x00979dd0 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x00979de0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00979df0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00979e00 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00979e10 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00979e20 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00979e30 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00979e40 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00979e50 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00979e60 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00979e70 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00979e80 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00979e90 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00979ea0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00979eb0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00979ec0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00979ed0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00979ee0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00979ef0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00979f00 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00979f10 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00979f20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00979f30 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00979f40 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00979f50 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00979f60 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00979f70 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00979f80 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00979f90 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00979fa0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00979fb0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00979fc0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00979fd0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00979fe0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00979ff0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x0097a000 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x0097a010 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0097a020 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0097a030 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0097a040 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x0097a050 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x0097a060 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x0097a070 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x0097a080 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0097a090 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0097a0a0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0097a0b0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x0097a0c0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x0097a0d0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x0097a0e0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x0097a0f0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x0097a100 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x0097a110 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x0097a120 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x0097a130 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x0097a140 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x0097a150 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x0097a160 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x0097a170 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x0097a180 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x0097a190 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0097a1a0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x0097a1b0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x0097a1c0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x0097a1d0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x0097a1e0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x0097a1f0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x0097a200 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x0097a210 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x0097a220 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x0097a230 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x0097a240 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x0097a250 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x0097a260 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x0097a270 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x0097a280 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x0097a290 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x0097a2a0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x0097a2b0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x0097a2c0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x0097a2d0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x0097a2e0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x0097a2f0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x0097a300 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x0097a310 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0097a320 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x0097a330 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x0097a340 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x0097a350 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x0097a360 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x0097a370 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x0097a380 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ - 0x0097a390 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ - 0x0097a3a0 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x0097a3b0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x0097a3c0 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ - 0x0097a3d0 2c20302c 20302920 2b20703b 200a2020 , 0, 0) + p; . │ │ │ │ - 0x0097a3e0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x0097a3f0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x0097a400 6f726d28 706f7320 2a20755f 70726f6a orm(pos * u_proj │ │ │ │ - 0x0097a410 65637469 6f6e2c20 755f7069 766f7454 ection, u_pivotT │ │ │ │ - 0x0097a420 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ - 0x0097a430 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x0097a440 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ - 0x0097a450 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ - 0x0097a460 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ - 0x0097a470 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ - 0x0097a480 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ - 0x0097a490 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ - 0x0097a4a0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x0097a4b0 2023656e 64696620 0a202020 20765f72 #endif . v_r │ │ │ │ - 0x0097a4c0 61646975 73203d20 615f6e6f 726d616c adius = a_normal │ │ │ │ - 0x0097a4d0 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x0097a4e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0097a4f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0097a500 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0097a510 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0097a520 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0097a530 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0097a540 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097a550 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0097a560 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0097a570 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0097a580 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0097a590 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0097a5a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0097a5b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0097a5c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0097a5d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0097a5e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0097a5f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0097a600 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0097a610 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0097a620 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0097a630 63332061 5f6e6f72 6d616c3b 200a2020 c3 a_normal; . │ │ │ │ - 0x0097a640 696e2076 65633320 615f706f 73697469 in vec3 a_positi │ │ │ │ - 0x0097a650 6f6e3b20 0a202069 6e207665 63342061 on; . in vec4 a │ │ │ │ - 0x0097a660 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x0097a670 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ - 0x0097a680 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ - 0x0097a690 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ - 0x0097a6a0 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x0097a6b0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0097a6c0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x0097a6d0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x0097a6e0 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x0097a6f0 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ - 0x0097a700 755f636f 6e747261 73744761 6d6d613b u_contrastGamma; │ │ │ │ - 0x0097a710 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x0097a720 7420755f 6f706163 6974793b 200a2020 t u_opacity; . │ │ │ │ - 0x0097a730 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0097a740 7a536361 6c653b20 0a202075 6e69666f zScale; . unifo │ │ │ │ - 0x0097a750 726d2066 6c6f6174 20755f69 6e746572 rm float u_inter │ │ │ │ - 0x0097a760 706f6c61 74696f6e 3b200a20 20756e69 polation; . uni │ │ │ │ - 0x0097a770 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ - 0x0097a780 75746c69 6e655061 73733b20 0a202063 utlinePass; . c │ │ │ │ - 0x0097a790 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ - 0x0097a7a0 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ - 0x0097a7b0 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ - 0x0097a7c0 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x0097a7d0 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x0097a7e0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x0097a7f0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x0097a800 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ - 0x0097a810 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x0097a820 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ - 0x0097a830 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ - 0x0097a840 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0097a850 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x0097a860 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ - 0x0097a870 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0097a880 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x0097a890 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ - 0x0097a8a0 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ - 0x0097a8b0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097a8c0 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ - 0x0097a8d0 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ - 0x0097a8e0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x0097a8f0 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ - 0x0097a900 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ - 0x0097a910 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x0097a920 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x0097a930 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ - 0x0097a940 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x0097a950 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ - 0x0097a960 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ - 0x0097a970 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x0097a980 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ - 0x0097a990 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ - 0x0097a9a0 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ - 0x0097a9b0 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ - 0x0097a9c0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0097a9d0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0097a9e0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0097a9f0 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ - 0x0097aa00 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ - 0x0097aa10 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ - 0x0097aa20 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ - 0x0097aa30 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x0097aa40 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ - 0x0097aa50 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ - 0x0097aa60 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x0097aa70 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ - 0x0097aa80 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ - 0x0097aa90 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x0097aaa0 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ - 0x0097aab0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x0097aac0 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ - 0x0097aad0 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x0097aae0 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ - 0x0097aaf0 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ - 0x0097ab00 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ - 0x0097ab10 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ - 0x0097ab20 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ - 0x0097ab30 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ - 0x0097ab40 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x0097ab50 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ - 0x0097ab60 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ - 0x0097ab70 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ - 0x0097ab80 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ - 0x0097ab90 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ - 0x0097aba0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x0097abb0 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ - 0x0097abc0 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ - 0x0097abd0 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x0097abe0 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ - 0x0097abf0 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ - 0x0097ac00 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ - 0x0097ac10 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ - 0x0097ac20 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ - 0x0097ac30 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ - 0x0097ac40 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ - 0x0097ac50 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ - 0x0097ac60 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ - 0x0097ac70 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ - 0x0097ac80 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ - 0x0097ac90 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ - 0x0097aca0 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ - 0x0097acb0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x0097acc0 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ - 0x0097acd0 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ - 0x0097ace0 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ - 0x0097acf0 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ - 0x0097ad00 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x0097ad10 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ - 0x0097ad20 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ - 0x0097ad30 65633320 72616469 7573203d 20615f6e ec3 radius = a_n │ │ │ │ - 0x0097ad40 6f726d61 6c202a20 615f706f 73697469 ormal * a_positi │ │ │ │ - 0x0097ad50 6f6e2e7a 3b200a20 20202076 65633420 on.z; . vec4 │ │ │ │ - 0x0097ad60 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x0097ad70 6974696f 6e2e7879 2c20302c 20312920 ition.xy, 0, 1) │ │ │ │ - 0x0097ad80 2a20755f 6d6f6465 6c566965 773b200a * u_modelView; . │ │ │ │ - 0x0097ad90 20202020 76656334 20736869 66746564 vec4 shifted │ │ │ │ - 0x0097ada0 506f7320 3d207665 63342872 61646975 Pos = vec4(radiu │ │ │ │ - 0x0097adb0 732e7879 2c20302c 20302920 2b20706f s.xy, 0, 0) + po │ │ │ │ - 0x0097adc0 733b200a 20202020 676c5f50 6f736974 s; . gl_Posit │ │ │ │ - 0x0097add0 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ - 0x0097ade0 5472616e 73666f72 6d287368 69667465 Transform(shifte │ │ │ │ - 0x0097adf0 64506f73 202a2075 5f70726f 6a656374 dPos * u_project │ │ │ │ - 0x0097ae00 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ - 0x0097ae10 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ - 0x0097ae20 2020765f 72616469 7573203d 20726164 v_radius = rad │ │ │ │ - 0x0097ae30 6975733b 200a2020 2020765f 636f6c6f ius; . v_colo │ │ │ │ - 0x0097ae40 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x0097ae50 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x0097ae60 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0097ae70 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0097ae80 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0097ae90 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097aea0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0097aeb0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0097aec0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0097aed0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0097aee0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0097aef0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0097af00 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0097af10 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0097af20 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0097af30 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0097af40 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0097af50 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0097af60 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0097af70 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0097af80 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0097af90 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0097afa0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0097afb0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0097afc0 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x0097afd0 6e207665 63342061 5f636f6c 6f725465 n vec4 a_colorTe │ │ │ │ - 0x0097afe0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x0097aff0 76656334 20765f6e 6f726d61 6c3b200a vec4 v_normal; . │ │ │ │ - 0x0097b000 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ - 0x0097b010 56544620 0a20206f 7574204c 4f575f50 VTF . out LOW_P │ │ │ │ - 0x0097b020 20766563 3420765f 636f6c6f 723b200a vec4 v_color; . │ │ │ │ - 0x0097b030 20202365 6c736520 0a20206f 75742076 #else . out v │ │ │ │ - 0x0097b040 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ - 0x0097b050 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ - 0x0097b060 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0097b070 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0097b080 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0097b090 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x0097b0a0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x0097b0b0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x0097b0c0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x0097b0d0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x0097b0e0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0097b0f0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x0097b100 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x0097b110 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x0097b120 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x0097b130 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x0097b140 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x0097b150 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ - 0x0097b160 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x0097b170 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x0097b180 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x0097b190 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ - 0x0097b1a0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x0097b1b0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x0097b1c0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x0097b1d0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x0097b1e0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0097b1f0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0097b200 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0097b210 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x0097b220 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0097b230 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x0097b240 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x0097b250 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x0097b260 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097b270 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x0097b280 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0097b290 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0097b2a0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0097b2b0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x0097b2c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097b2d0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x0097b2e0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x0097b2f0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0097b300 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x0097b310 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x0097b320 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x0097b330 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097b340 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x0097b350 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x0097b360 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097b370 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0097b380 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0097b390 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097b3a0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x0097b3b0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0097b3c0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x0097b3d0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x0097b3e0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x0097b3f0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x0097b400 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x0097b410 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x0097b420 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x0097b430 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x0097b440 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x0097b450 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x0097b460 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x0097b470 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0097b480 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x0097b490 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x0097b4a0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0097b4b0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x0097b4c0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x0097b4d0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x0097b4e0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0097b4f0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x0097b500 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x0097b510 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x0097b520 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x0097b530 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x0097b540 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x0097b550 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x0097b560 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x0097b570 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x0097b580 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x0097b590 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x0097b5a0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x0097b5b0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0097b5c0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x0097b5d0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x0097b5e0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x0097b5f0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x0097b600 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x0097b610 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x0097b620 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x0097b630 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x0097b640 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x0097b650 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x0097b660 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x0097b670 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x0097b680 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x0097b690 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0097b6a0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x0097b6b0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x0097b6c0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x0097b6d0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x0097b6e0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x0097b6f0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x0097b700 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x0097b710 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0097b720 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x0097b730 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0097b740 2070203d 20766563 3428615f 706f7369 p = vec4(a_posi │ │ │ │ - 0x0097b750 74696f6e 2c203129 202a2075 5f6d6f64 tion, 1) * u_mod │ │ │ │ - 0x0097b760 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ - 0x0097b770 3420706f 73203d20 76656334 28615f6e 4 pos = vec4(a_n │ │ │ │ - 0x0097b780 6f726d61 6c2e7879 202b2061 5f636f6c ormal.xy + a_col │ │ │ │ - 0x0097b790 6f725465 78436f6f 7264732e 7a772c20 orTexCoords.zw, │ │ │ │ - 0x0097b7a0 302c2030 29202b20 703b200a 20202020 0, 0) + p; . │ │ │ │ - 0x0097b7b0 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ - 0x0097b7c0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x0097b7d0 6d28706f 73202a20 755f7072 6f6a6563 m(pos * u_projec │ │ │ │ - 0x0097b7e0 74696f6e 2c20755f 7069766f 74547261 tion, u_pivotTra │ │ │ │ - 0x0097b7f0 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x0097b800 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x0097b810 5446200a 20202020 765f636f 6c6f7220 TF . v_color │ │ │ │ - 0x0097b820 3d207465 78747572 6528755f 636f6c6f = texture(u_colo │ │ │ │ - 0x0097b830 72546578 2c20615f 636f6c6f 72546578 rTex, a_colorTex │ │ │ │ - 0x0097b840 436f6f72 64732e78 79293b20 0a202023 Coords.xy); . # │ │ │ │ - 0x0097b850 656c7365 200a2020 2020765f 636f6c6f else . v_colo │ │ │ │ - 0x0097b860 72546578 436f6f72 6473203d 20615f63 rTexCoords = a_c │ │ │ │ - 0x0097b870 6f6c6f72 54657843 6f6f7264 732e7879 olorTexCoords.xy │ │ │ │ - 0x0097b880 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0097b890 20765f6e 6f726d61 6c203d20 615f6e6f v_normal = a_no │ │ │ │ - 0x0097b8a0 726d616c 3b200a20 207d200a 00000000 rmal; . } ..... │ │ │ │ - 0x0097b8b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0097b8c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0097b8d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0097b8e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0097b8f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0097b900 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0097b910 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097b920 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0097b930 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0097b940 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0097b950 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0097b960 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0097b970 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0097b980 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0097b990 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0097b9a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0097b9b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0097b9c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0097b9d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0097b9e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0097b9f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0097ba00 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0097ba10 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x0097ba20 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x0097ba30 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x0097ba40 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ - 0x0097ba50 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ - 0x0097ba60 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ - 0x0097ba70 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ - 0x0097ba80 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ - 0x0097ba90 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x0097baa0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x0097bab0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ - 0x0097bac0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x0097bad0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x0097bae0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x0097baf0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x0097bb00 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x0097bb10 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x0097bb20 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x0097bb30 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x0097bb40 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x0097bb50 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0097bb60 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x0097bb70 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0097bb80 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x0097bb90 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x0097bba0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x0097bbb0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x0097bbc0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x0097bbd0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x0097bbe0 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x0097bbf0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x0097bc00 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x0097bc10 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x0097bc20 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x0097bc30 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x0097bc40 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x0097bc50 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x0097bc60 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x0097bc70 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x0097bc80 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x0097bc90 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x0097bca0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x0097bcb0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x0097bcc0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x0097bcd0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x0097bce0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x0097bcf0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x0097bd00 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x0097bd10 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x0097bd20 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x0097bd30 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0097bd40 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x0097bd50 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x0097bd60 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x0097bd70 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x0097bd80 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x0097bd90 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x0097bda0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x0097bdb0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x0097bdc0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x0097bdd0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x0097bde0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x0097bdf0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x0097be00 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x0097be10 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x0097be20 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0097be30 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0097be40 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0097be50 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x0097be60 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x0097be70 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x0097be80 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x0097be90 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0097bea0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0097beb0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0097bec0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x0097bed0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x0097bee0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x0097bef0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x0097bf00 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x0097bf10 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x0097bf20 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x0097bf30 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x0097bf40 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x0097bf50 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x0097bf60 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x0097bf70 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x0097bf80 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x0097bf90 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x0097bfa0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0097bfb0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x0097bfc0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x0097bfd0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x0097bfe0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x0097bff0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x0097c000 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x0097c010 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x0097c020 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x0097c030 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x0097c040 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x0097c050 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x0097c060 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x0097c070 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x0097c080 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x0097c090 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x0097c0a0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x0097c0b0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x0097c0c0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x0097c0d0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x0097c0e0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x0097c0f0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x0097c100 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x0097c110 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x0097c120 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0097c130 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x0097c140 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x0097c150 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x0097c160 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x0097c170 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x0097c180 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x0097c190 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ - 0x0097c1a0 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ - 0x0097c1b0 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ - 0x0097c1c0 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x0097c1d0 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ - 0x0097c1e0 3428615f 6e6f726d 616c2e78 79202b20 4(a_normal.xy + │ │ │ │ - 0x0097c1f0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x0097c200 2e7a772c 20302e30 2c20302e 3029202a .zw, 0.0, 0.0) * │ │ │ │ - 0x0097c210 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x0097c220 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x0097c230 3d206170 706c7942 696c6c62 6f617264 = applyBillboard │ │ │ │ - 0x0097c240 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ - 0x0097c250 69766f74 202a2075 5f70726f 6a656374 ivot * u_project │ │ │ │ - 0x0097c260 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ - 0x0097c270 73666f72 6d2c2030 2e302c20 6f666673 sform, 0.0, offs │ │ │ │ - 0x0097c280 65742e78 79293b20 0a202023 69666465 et.xy); . #ifde │ │ │ │ - 0x0097c290 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x0097c2a0 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ - 0x0097c2b0 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ - 0x0097c2c0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x0097c2d0 2e787929 3b200a20 2023656c 7365200a .xy); . #else . │ │ │ │ - 0x0097c2e0 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ - 0x0097c2f0 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ - 0x0097c300 78436f6f 7264732e 78793b20 0a202023 xCoords.xy; . # │ │ │ │ - 0x0097c310 656e6469 66200a20 20202076 5f6e6f72 endif . v_nor │ │ │ │ - 0x0097c320 6d616c20 3d20615f 6e6f726d 616c3b20 mal = a_normal; │ │ │ │ - 0x0097c330 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x0097c340 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0097c350 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0097c360 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0097c370 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097c380 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0097c390 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0097c3a0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0097c3b0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0097c3c0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0097c3d0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0097c3e0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0097c3f0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0097c400 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0097c410 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0097c420 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0097c430 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0097c440 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0097c450 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0097c460 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0097c470 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0097c480 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0097c490 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0097c4a0 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ - 0x0097c4b0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0097c4c0 78436f6f 72643b20 0a202069 6e207665 xCoord; . in ve │ │ │ │ - 0x0097c4d0 63342061 5f6d6173 6b546578 436f6f72 c4 a_maskTexCoor │ │ │ │ - 0x0097c4e0 643b200a 20206f75 74207665 63322076 d; . out vec2 v │ │ │ │ - 0x0097c4f0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x0097c500 0a20206f 75742076 65633220 765f6d61 . out vec2 v_ma │ │ │ │ - 0x0097c510 736b5465 78436f6f 72643b20 0a202075 skTexCoord; . u │ │ │ │ - 0x0097c520 6e69666f 726d206d 61743420 755f6d6f niform mat4 u_mo │ │ │ │ - 0x0097c530 64656c56 6965773b 200a2020 756e6966 delView; . unif │ │ │ │ - 0x0097c540 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ - 0x0097c550 6374696f 6e3b200a 2020756e 69666f72 ction; . unifor │ │ │ │ - 0x0097c560 6d206d61 74342075 5f706976 6f745472 m mat4 u_pivotTr │ │ │ │ - 0x0097c570 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ - 0x0097c580 6f726d20 76656332 20755f63 6f6e7472 orm vec2 u_contr │ │ │ │ - 0x0097c590 61737447 616d6d61 3b200a20 20756e69 astGamma; . uni │ │ │ │ - 0x0097c5a0 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ - 0x0097c5b0 63697479 3b200a20 20756e69 666f726d city; . uniform │ │ │ │ - 0x0097c5c0 20666c6f 61742075 5f7a5363 616c653b float u_zScale; │ │ │ │ - 0x0097c5d0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x0097c5e0 7420755f 696e7465 72706f6c 6174696f t u_interpolatio │ │ │ │ - 0x0097c5f0 6e3b200a 2020756e 69666f72 6d20666c n; . uniform fl │ │ │ │ - 0x0097c600 6f617420 755f6973 4f75746c 696e6550 oat u_isOutlineP │ │ │ │ - 0x0097c610 6173733b 200a2020 636f6e73 7420666c ass; . const fl │ │ │ │ - 0x0097c620 6f617420 6b536861 7065436f 6f726453 oat kShapeCoordS │ │ │ │ - 0x0097c630 63616c61 72203d20 31303030 2e303b20 calar = 1000.0; │ │ │ │ - 0x0097c640 0a202076 65633420 6170706c 79506976 . vec4 applyPiv │ │ │ │ - 0x0097c650 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x0097c660 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x0097c670 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x0097c680 61742070 69766f74 5265616c 5a29200a at pivotRealZ) . │ │ │ │ - 0x0097c690 20207b20 0a202020 20766563 34207472 { . vec4 tr │ │ │ │ - 0x0097c6a0 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ - 0x0097c6b0 20706976 6f743b20 0a202020 20666c6f pivot; . flo │ │ │ │ - 0x0097c6c0 61742077 203d2074 72616e73 666f726d at w = transform │ │ │ │ - 0x0097c6d0 65645069 766f742e 773b200a 20202020 edPivot.w; . │ │ │ │ - 0x0097c6e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097c6f0 2e787977 203d2028 7069766f 74547261 .xyw = (pivotTra │ │ │ │ - 0x0097c700 6e73666f 726d202a 20766563 34287472 nsform * vec4(tr │ │ │ │ - 0x0097c710 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x0097c720 792c2070 69766f74 5265616c 5a2c2077 y, pivotRealZ, w │ │ │ │ - 0x0097c730 29292e78 79773b20 0a202020 20747261 )).xyw; . tra │ │ │ │ - 0x0097c740 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x0097c750 2a3d2074 72616e73 666f726d 65645069 *= transformedPi │ │ │ │ - 0x0097c760 766f742e 77202f20 773b200a 20202369 vot.w / w; . #i │ │ │ │ - 0x0097c770 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x0097c780 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097c790 742e7920 3d202d74 72616e73 666f726d t.y = -transform │ │ │ │ - 0x0097c7a0 65645069 766f742e 793b200a 20202020 edPivot.y; . │ │ │ │ - 0x0097c7b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097c7c0 2e7a203d 20287472 616e7366 6f726d65 .z = (transforme │ │ │ │ - 0x0097c7d0 64506976 6f742e7a 20202b20 7472616e dPivot.z + tran │ │ │ │ - 0x0097c7e0 73666f72 6d656450 69766f74 2e772920 sformedPivot.w) │ │ │ │ - 0x0097c7f0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x0097c800 200a2020 20207265 7475726e 20747261 . return tra │ │ │ │ - 0x0097c810 6e73666f 726d6564 5069766f 743b200a nsformedPivot; . │ │ │ │ - 0x0097c820 20207d20 0a202076 65633420 6170706c } . vec4 appl │ │ │ │ - 0x0097c830 7942696c 6c626f61 72645069 766f7454 yBillboardPivotT │ │ │ │ - 0x0097c840 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x0097c850 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x0097c860 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x0097c870 7069766f 74526561 6c5a2c20 76656332 pivotRealZ, vec2 │ │ │ │ - 0x0097c880 206f6666 73657429 200a2020 7b200a20 offset) . { . │ │ │ │ - 0x0097c890 20202066 6c6f6174 206c6f67 69635a20 float logicZ │ │ │ │ - 0x0097c8a0 3d207069 766f742e 7a202f20 7069766f = pivot.z / pivo │ │ │ │ - 0x0097c8b0 742e773b 200a2020 20207665 63342074 t.w; . vec4 t │ │ │ │ - 0x0097c8c0 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x0097c8d0 3d207069 766f7454 72616e73 666f726d = pivotTransform │ │ │ │ - 0x0097c8e0 202a2076 65633428 7069766f 742e7879 * vec4(pivot.xy │ │ │ │ - 0x0097c8f0 2c207069 766f7452 65616c5a 2c207069 , pivotRealZ, pi │ │ │ │ - 0x0097c900 766f742e 77293b20 0a202020 20766563 vot.w); . vec │ │ │ │ - 0x0097c910 34207363 616c6520 3d207069 766f7454 4 scale = pivotT │ │ │ │ - 0x0097c920 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x0097c930 312e302c 202d312e 302c2030 2e302c20 1.0, -1.0, 0.0, │ │ │ │ - 0x0097c940 312e3029 3b200a20 20202076 65633420 1.0); . vec4 │ │ │ │ - 0x0097c950 706f7369 74696f6e 203d2076 65633428 position = vec4( │ │ │ │ - 0x0097c960 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097c970 2e787920 2f207472 616e7366 6f726d65 .xy / transforme │ │ │ │ - 0x0097c980 64506976 6f742e77 2c206c6f 6769635a dPivot.w, logicZ │ │ │ │ - 0x0097c990 2c20312e 3029202b 20766563 34286f66 , 1.0) + vec4(of │ │ │ │ - 0x0097c9a0 66736574 202f2073 63616c65 2e77202a fset / scale.w * │ │ │ │ - 0x0097c9b0 20736361 6c652e78 2c20302e 302c2030 scale.x, 0.0, 0 │ │ │ │ - 0x0097c9c0 2e30293b 200a2020 23696664 65662056 .0); . #ifdef V │ │ │ │ - 0x0097c9d0 554c4b41 4e200a20 20202070 6f736974 ULKAN . posit │ │ │ │ - 0x0097c9e0 696f6e2e 79203d20 2d706f73 6974696f ion.y = -positio │ │ │ │ - 0x0097c9f0 6e2e793b 200a2020 2020706f 73697469 n.y; . positi │ │ │ │ - 0x0097ca00 6f6e2e7a 203d2028 706f7369 74696f6e on.z = (position │ │ │ │ - 0x0097ca10 2e7a2020 2b20706f 73697469 6f6e2e77 .z + position.w │ │ │ │ - 0x0097ca20 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x0097ca30 6966200a 20202020 72657475 726e2070 if . return p │ │ │ │ - 0x0097ca40 6f736974 696f6e3b 200a2020 7d200a20 osition; . } . │ │ │ │ - 0x0097ca50 20766563 32206361 6c634c69 6e655472 vec2 calcLineTr │ │ │ │ - 0x0097ca60 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x0097ca70 28766563 32206f72 6967696e 616c4178 (vec2 originalAx │ │ │ │ - 0x0097ca80 6973506f 732c2076 65633220 73686966 isPos, vec2 shif │ │ │ │ - 0x0097ca90 74656450 6f732c20 6d617434 206d6f64 tedPos, mat4 mod │ │ │ │ - 0x0097caa0 656c5669 65772c20 666c6f61 74206861 elView, float ha │ │ │ │ - 0x0097cab0 6c665769 64746829 200a2020 7b200a20 lfWidth) . { . │ │ │ │ - 0x0097cac0 20202076 65633220 70203d20 28766563 vec2 p = (vec │ │ │ │ - 0x0097cad0 34287368 69667465 64506f73 2c20302e 4(shiftedPos, 0. │ │ │ │ - 0x0097cae0 302c2031 2e302920 2a206d6f 64656c56 0, 1.0) * modelV │ │ │ │ - 0x0097caf0 69657729 2e78793b 200a2020 20207665 iew).xy; . ve │ │ │ │ - 0x0097cb00 63322064 203d2070 202d206f 72696769 c2 d = p - origi │ │ │ │ - 0x0097cb10 6e616c41 78697350 6f733b20 0a202020 nalAxisPos; . │ │ │ │ - 0x0097cb20 20696620 28646f74 28642c20 64292021 if (dot(d, d) ! │ │ │ │ - 0x0097cb30 3d20302e 3029200a 20202020 20207265 = 0.0) . re │ │ │ │ - 0x0097cb40 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x0097cb50 73506f73 202b206e 6f726d61 6c697a65 sPos + normalize │ │ │ │ - 0x0097cb60 28642920 2a206861 6c665769 6474683b (d) * halfWidth; │ │ │ │ - 0x0097cb70 200a2020 2020656c 7365200a 20202020 . else . │ │ │ │ - 0x0097cb80 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x0097cb90 6c417869 73506f73 3b200a20 207d200a lAxisPos; . } . │ │ │ │ - 0x0097cba0 2020766f 6964206d 61696e28 29200a20 void main() . │ │ │ │ - 0x0097cbb0 207b200a 20202020 76656332 206e6f72 { . vec2 nor │ │ │ │ - 0x0097cbc0 6d616c20 3d20615f 6e6f726d 616c2e78 mal = a_normal.x │ │ │ │ - 0x0097cbd0 793b200a 20202020 666c6f61 74206861 y; . float ha │ │ │ │ - 0x0097cbe0 6c665769 64746820 3d206c65 6e677468 lfWidth = length │ │ │ │ - 0x0097cbf0 286e6f72 6d616c29 3b200a20 20202076 (normal); . v │ │ │ │ - 0x0097cc00 65633220 7472616e 73666f72 6d656441 ec2 transformedA │ │ │ │ - 0x0097cc10 78697350 6f73203d 20287665 63342861 xisPos = (vec4(a │ │ │ │ - 0x0097cc20 5f706f73 6974696f 6e2e7879 2c20302e _position.xy, 0. │ │ │ │ - 0x0097cc30 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ - 0x0097cc40 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x0097cc50 69662028 68616c66 57696474 6820213d if (halfWidth != │ │ │ │ - 0x0097cc60 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x0097cc70 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ - 0x0097cc80 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ - 0x0097cc90 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x0097cca0 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ - 0x0097ccb0 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x0097ccc0 6f6e2e78 79202b20 6e6f726d 616c2c20 on.xy + normal, │ │ │ │ - 0x0097ccd0 0a202020 20202020 20202020 20202020 . │ │ │ │ - 0x0097cce0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0097ccf0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0097cd00 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ - 0x0097cd10 65772c20 68616c66 57696474 68293b20 ew, halfWidth); │ │ │ │ - 0x0097cd20 0a202020 207d200a 20202020 666c6f61 . } . floa │ │ │ │ - 0x0097cd30 7420754f 66667365 74203d20 6d696e28 t uOffset = min( │ │ │ │ - 0x0097cd40 6c656e67 74682876 65633428 6b536861 length(vec4(kSha │ │ │ │ - 0x0097cd50 7065436f 6f726453 63616c61 722c2030 peCoordScalar, 0 │ │ │ │ - 0x0097cd60 2c20302c 20302920 2a20755f 6d6f6465 , 0, 0) * u_mode │ │ │ │ - 0x0097cd70 6c566965 7729202a 20615f6d 61736b54 lView) * a_maskT │ │ │ │ - 0x0097cd80 6578436f 6f72642e 782c2031 2e30293b exCoord.x, 1.0); │ │ │ │ - 0x0097cd90 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ - 0x0097cda0 436f6f72 64203d20 615f636f 6c6f7254 Coord = a_colorT │ │ │ │ - 0x0097cdb0 6578436f 6f72643b 200a2020 2020765f exCoord; . v_ │ │ │ │ - 0x0097cdc0 6d61736b 54657843 6f6f7264 203d2076 maskTexCoord = v │ │ │ │ - 0x0097cdd0 65633228 615f6d61 736b5465 78436f6f ec2(a_maskTexCoo │ │ │ │ - 0x0097cde0 72642e79 202b2075 4f666673 6574202a rd.y + uOffset * │ │ │ │ - 0x0097cdf0 20615f6d 61736b54 6578436f 6f72642e a_maskTexCoord. │ │ │ │ - 0x0097ce00 7a2c2061 5f6d6173 6b546578 436f6f72 z, a_maskTexCoor │ │ │ │ - 0x0097ce10 642e7729 3b200a20 20202076 65633420 d.w); . vec4 │ │ │ │ - 0x0097ce20 706f7320 3d207665 63342874 72616e73 pos = vec4(trans │ │ │ │ - 0x0097ce30 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ - 0x0097ce40 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ - 0x0097ce50 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ - 0x0097ce60 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x0097ce70 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ - 0x0097ce80 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ - 0x0097ce90 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0097cea0 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ - 0x0097ceb0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0097cec0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0097ced0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0097cee0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0097cef0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0097cf00 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0097cf10 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097cf20 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0097cf30 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0097cf40 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0097cf50 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0097cf60 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0097cf70 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0097cf80 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0097cf90 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0097cfa0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0097cfb0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0097cfc0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0097cfd0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0097cfe0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0097cff0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0097d000 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0097d010 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x0097d020 72546578 436f6f72 64733b20 0a202069 rTexCoords; . i │ │ │ │ - 0x0097d030 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ - 0x0097d040 436f6f72 64733b20 0a202023 69666465 Coords; . #ifde │ │ │ │ - 0x0097d050 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x0097d060 6f757420 4c4f575f 50207665 63342076 out LOW_P vec4 v │ │ │ │ - 0x0097d070 5f636f6c 6f723b20 0a202023 656c7365 _color; . #else │ │ │ │ - 0x0097d080 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x0097d090 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x0097d0a0 20202365 6e646966 200a2020 6f757420 #endif . out │ │ │ │ - 0x0097d0b0 76656332 20765f6d 61736b54 6578436f vec2 v_maskTexCo │ │ │ │ - 0x0097d0c0 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ - 0x0097d0d0 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ - 0x0097d0e0 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ - 0x0097d0f0 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ - 0x0097d100 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x0097d110 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ - 0x0097d120 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ - 0x0097d130 63322075 5f636f6e 74726173 7447616d c2 u_contrastGam │ │ │ │ - 0x0097d140 6d613b20 0a202075 6e69666f 726d2066 ma; . uniform f │ │ │ │ - 0x0097d150 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ - 0x0097d160 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x0097d170 20755f7a 5363616c 653b200a 2020756e u_zScale; . un │ │ │ │ - 0x0097d180 69666f72 6d20666c 6f617420 755f696e iform float u_in │ │ │ │ - 0x0097d190 74657270 6f6c6174 696f6e3b 200a2020 terpolation; . │ │ │ │ - 0x0097d1a0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0097d1b0 69734f75 746c696e 65506173 733b200a isOutlinePass; . │ │ │ │ - 0x0097d1c0 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ - 0x0097d1d0 56544620 0a202075 6e69666f 726d2073 VTF . uniform s │ │ │ │ - 0x0097d1e0 616d706c 65723244 20755f63 6f6c6f72 ampler2D u_color │ │ │ │ - 0x0097d1f0 5465783b 200a2020 23656e64 6966200a Tex; . #endif . │ │ │ │ - 0x0097d200 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ - 0x0097d210 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ - 0x0097d220 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ - 0x0097d230 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ - 0x0097d240 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0097d250 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0097d260 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0097d270 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ - 0x0097d280 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x0097d290 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x0097d2a0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ - 0x0097d2b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097d2c0 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ - 0x0097d2d0 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ - 0x0097d2e0 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ - 0x0097d2f0 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ - 0x0097d300 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ - 0x0097d310 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ - 0x0097d320 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x0097d330 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ - 0x0097d340 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ - 0x0097d350 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ - 0x0097d360 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ - 0x0097d370 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ - 0x0097d380 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ - 0x0097d390 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ - 0x0097d3a0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ - 0x0097d3b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097d3c0 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ - 0x0097d3d0 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ - 0x0097d3e0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x0097d3f0 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ - 0x0097d400 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ - 0x0097d410 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ - 0x0097d420 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ - 0x0097d430 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x0097d440 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x0097d450 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x0097d460 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ - 0x0097d470 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ - 0x0097d480 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ - 0x0097d490 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ - 0x0097d4a0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x0097d4b0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x0097d4c0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0097d4d0 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ - 0x0097d4e0 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ - 0x0097d4f0 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ - 0x0097d500 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ - 0x0097d510 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ - 0x0097d520 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ - 0x0097d530 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x0097d540 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ - 0x0097d550 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ - 0x0097d560 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097d570 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ - 0x0097d580 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ - 0x0097d590 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ - 0x0097d5a0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ - 0x0097d5b0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0097d5c0 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ - 0x0097d5d0 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ - 0x0097d5e0 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ - 0x0097d5f0 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ - 0x0097d600 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ - 0x0097d610 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x0097d620 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ - 0x0097d630 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ - 0x0097d640 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x0097d650 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ - 0x0097d660 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ - 0x0097d670 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ - 0x0097d680 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ - 0x0097d690 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ - 0x0097d6a0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ - 0x0097d6b0 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ - 0x0097d6c0 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ - 0x0097d6d0 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ - 0x0097d6e0 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ - 0x0097d6f0 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ - 0x0097d700 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ - 0x0097d710 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ - 0x0097d720 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x0097d730 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ - 0x0097d740 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ - 0x0097d750 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ - 0x0097d760 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ - 0x0097d770 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x0097d780 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ - 0x0097d790 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ - 0x0097d7a0 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x0097d7b0 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ - 0x0097d7c0 202a2075 5f6d6f64 656c5669 6577202a * u_modelView * │ │ │ │ - 0x0097d7d0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x0097d7e0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x0097d7f0 3d206170 706c7950 69766f74 5472616e = applyPivotTran │ │ │ │ - 0x0097d800 73666f72 6d28706f 732c2075 5f706976 sform(pos, u_piv │ │ │ │ - 0x0097d810 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ - 0x0097d820 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ - 0x0097d830 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ - 0x0097d840 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ - 0x0097d850 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ - 0x0097d860 6f725465 78436f6f 72647329 3b200a20 orTexCoords); . │ │ │ │ - 0x0097d870 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ - 0x0097d880 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x0097d890 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x0097d8a0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x0097d8b0 765f6d61 736b5465 78436f6f 72647320 v_maskTexCoords │ │ │ │ - 0x0097d8c0 3d20615f 6d61736b 54657843 6f6f7264 = a_maskTexCoord │ │ │ │ - 0x0097d8d0 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ - 0x0097d8e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0097d8f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0097d900 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0097d910 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0097d920 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0097d930 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0097d940 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097d950 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0097d960 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0097d970 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0097d980 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0097d990 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0097d9a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0097d9b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0097d9c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0097d9d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0097d9e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0097d9f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0097da00 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0097da10 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0097da20 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0097da30 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ - 0x0097da40 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ - 0x0097da50 6f6f7264 733b200a 2020696e 20766563 oords; . in vec │ │ │ │ - 0x0097da60 3420615f 636f6c6f 723b200a 20206f75 4 a_color; . ou │ │ │ │ - 0x0097da70 74207665 63322076 5f746578 436f6f72 t vec2 v_texCoor │ │ │ │ - 0x0097da80 64733b20 0a20206f 75742076 65633420 ds; . out vec4 │ │ │ │ - 0x0097da90 765f636f 6c6f723b 200a2020 756e6966 v_color; . unif │ │ │ │ - 0x0097daa0 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ - 0x0097dab0 6374696f 6e3b200a 2020636f 6e737420 ction; . const │ │ │ │ - 0x0097dac0 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ - 0x0097dad0 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ - 0x0097dae0 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ - 0x0097daf0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x0097db00 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x0097db10 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x0097db20 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ - 0x0097db30 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x0097db40 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097db50 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ - 0x0097db60 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ - 0x0097db70 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ - 0x0097db80 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x0097db90 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ - 0x0097dba0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x0097dbb0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097dbc0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x0097dbd0 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ - 0x0097dbe0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0097dbf0 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ - 0x0097dc00 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ - 0x0097dc10 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x0097dc20 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0097dc30 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ - 0x0097dc40 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ - 0x0097dc50 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x0097dc60 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ - 0x0097dc70 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ - 0x0097dc80 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0097dc90 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x0097dca0 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ - 0x0097dcb0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ - 0x0097dcc0 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ - 0x0097dcd0 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ - 0x0097dce0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x0097dcf0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x0097dd00 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x0097dd10 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ - 0x0097dd20 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ - 0x0097dd30 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ - 0x0097dd40 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ - 0x0097dd50 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ - 0x0097dd60 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097dd70 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ - 0x0097dd80 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ - 0x0097dd90 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x0097dda0 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ - 0x0097ddb0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ - 0x0097ddc0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0097ddd0 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ - 0x0097dde0 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ - 0x0097ddf0 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ - 0x0097de00 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0097de10 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ - 0x0097de20 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ - 0x0097de30 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ - 0x0097de40 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ - 0x0097de50 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ - 0x0097de60 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ - 0x0097de70 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ - 0x0097de80 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ - 0x0097de90 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ - 0x0097dea0 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ - 0x0097deb0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ - 0x0097dec0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0097ded0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0097dee0 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ - 0x0097def0 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ - 0x0097df00 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x0097df10 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ - 0x0097df20 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ - 0x0097df30 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ - 0x0097df40 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ - 0x0097df50 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ - 0x0097df60 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ - 0x0097df70 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ - 0x0097df80 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ - 0x0097df90 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x0097dfa0 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ - 0x0097dfb0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0097dfc0 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ - 0x0097dfd0 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ - 0x0097dfe0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x0097dff0 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ - 0x0097e000 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ - 0x0097e010 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ - 0x0097e020 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x0097e030 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ - 0x0097e040 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ - 0x0097e050 0a20207b 200a2020 2020765f 74657843 . { . v_texC │ │ │ │ - 0x0097e060 6f6f7264 73203d20 615f7465 78436f6f oords = a_texCoo │ │ │ │ - 0x0097e070 7264733b 200a2020 2020765f 636f6c6f rds; . v_colo │ │ │ │ - 0x0097e080 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x0097e090 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x0097e0a0 76656334 28615f70 6f736974 696f6e2c vec4(a_position, │ │ │ │ - 0x0097e0b0 20302c20 3129202a 20755f70 726f6a65 0, 1) * u_proje │ │ │ │ - 0x0097e0c0 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ - 0x0097e0d0 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ - 0x0097e0e0 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ - 0x0097e0f0 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ - 0x0097e100 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x0097e110 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ - 0x0097e120 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ - 0x0097e130 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ - 0x0097e140 64696620 0a20207d 200a0000 00000000 dif . } ....... │ │ │ │ - 0x0097e150 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0097e160 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0097e170 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0097e180 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0097e190 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0097e1a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0097e1b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097e1c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0097e1d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0097e1e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0097e1f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0097e200 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0097e210 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0097e220 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0097e230 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0097e240 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0097e250 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0097e260 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0097e270 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0097e280 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0097e290 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0097e2a0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0097e2b0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x0097e2c0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x0097e2d0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x0097e2e0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x0097e2f0 5f565446 200a2020 6f757420 4c4f575f _VTF . out LOW_ │ │ │ │ - 0x0097e300 50207665 63342076 5f636f6c 6f723b20 P vec4 v_color; │ │ │ │ - 0x0097e310 0a202023 656c7365 200a2020 6f757420 . #else . out │ │ │ │ - 0x0097e320 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x0097e330 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x0097e340 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0097e350 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0097e360 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0097e370 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x0097e380 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x0097e390 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x0097e3a0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x0097e3b0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x0097e3c0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0097e3d0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x0097e3e0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x0097e3f0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x0097e400 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x0097e410 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x0097e420 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x0097e430 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ - 0x0097e440 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x0097e450 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x0097e460 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x0097e470 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ - 0x0097e480 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x0097e490 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x0097e4a0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x0097e4b0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x0097e4c0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0097e4d0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0097e4e0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0097e4f0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x0097e500 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0097e510 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x0097e520 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x0097e530 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x0097e540 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097e550 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x0097e560 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0097e570 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0097e580 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0097e590 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x0097e5a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097e5b0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x0097e5c0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x0097e5d0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0097e5e0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x0097e5f0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x0097e600 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x0097e610 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097e620 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x0097e630 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x0097e640 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097e650 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0097e660 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0097e670 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097e680 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x0097e690 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0097e6a0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x0097e6b0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x0097e6c0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x0097e6d0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x0097e6e0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x0097e6f0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x0097e700 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x0097e710 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x0097e720 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x0097e730 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x0097e740 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x0097e750 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0097e760 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x0097e770 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x0097e780 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0097e790 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x0097e7a0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x0097e7b0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x0097e7c0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0097e7d0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x0097e7e0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x0097e7f0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x0097e800 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x0097e810 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x0097e820 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x0097e830 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x0097e840 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x0097e850 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x0097e860 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x0097e870 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x0097e880 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x0097e890 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0097e8a0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x0097e8b0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x0097e8c0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x0097e8d0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x0097e8e0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x0097e8f0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x0097e900 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x0097e910 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x0097e920 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x0097e930 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x0097e940 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x0097e950 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x0097e960 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x0097e970 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0097e980 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x0097e990 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x0097e9a0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x0097e9b0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x0097e9c0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x0097e9d0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x0097e9e0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x0097e9f0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0097ea00 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x0097ea10 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x0097ea20 206e6f72 6d616c20 3d20615f 6e6f726d normal = a_norm │ │ │ │ - 0x0097ea30 616c2e78 793b200a 20202020 666c6f61 al.xy; . floa │ │ │ │ - 0x0097ea40 74206861 6c665769 64746820 3d206c65 t halfWidth = le │ │ │ │ - 0x0097ea50 6e677468 286e6f72 6d616c29 3b200a20 ngth(normal); . │ │ │ │ - 0x0097ea60 20202076 65633220 7472616e 73666f72 vec2 transfor │ │ │ │ - 0x0097ea70 6d656441 78697350 6f73203d 20287665 medAxisPos = (ve │ │ │ │ - 0x0097ea80 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x0097ea90 2c20302e 302c2031 2e302920 2a20755f , 0.0, 1.0) * u_ │ │ │ │ - 0x0097eaa0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x0097eab0 20202020 69662028 68616c66 57696474 if (halfWidt │ │ │ │ - 0x0097eac0 6820213d 20302e30 29200a20 2020207b h != 0.0) . { │ │ │ │ - 0x0097ead0 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ - 0x0097eae0 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ - 0x0097eaf0 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x0097eb00 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ - 0x0097eb10 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ - 0x0097eb20 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ - 0x0097eb30 616c2c20 0a202020 20202020 20202020 al, . │ │ │ │ - 0x0097eb40 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0097eb50 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0097eb60 20202020 20202020 20202075 5f6d6f64 u_mod │ │ │ │ - 0x0097eb70 656c5669 65772c20 68616c66 57696474 elView, halfWidt │ │ │ │ - 0x0097eb80 68293b20 0a202020 207d200a 20202369 h); . } . #i │ │ │ │ - 0x0097eb90 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x0097eba0 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ - 0x0097ebb0 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ - 0x0097ebc0 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ - 0x0097ebd0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ - 0x0097ebe0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x0097ebf0 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ - 0x0097ec00 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x0097ec10 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x0097ec20 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x0097ec30 41786973 506f732c 20615f70 6f736974 AxisPos, a_posit │ │ │ │ - 0x0097ec40 696f6e2e 7a2c2031 2e302920 2a20755f ion.z, 1.0) * u_ │ │ │ │ - 0x0097ec50 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ - 0x0097ec60 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x0097ec70 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x0097ec80 726d2870 6f732c20 755f7069 766f7454 rm(pos, u_pivotT │ │ │ │ - 0x0097ec90 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ - 0x0097eca0 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x0097ecb0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0097ecc0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0097ecd0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0097ece0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097ecf0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0097ed00 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0097ed10 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0097ed20 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0097ed30 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0097ed40 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0097ed50 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0097ed60 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0097ed70 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0097ed80 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0097ed90 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0097eda0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0097edb0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0097edc0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0097edd0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0097ede0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0097edf0 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x0097ee00 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0097ee10 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x0097ee20 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0097ee30 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x0097ee40 65633220 615f6d61 736b5465 78436f6f ec2 a_maskTexCoo │ │ │ │ - 0x0097ee50 7264733b 200a2020 6f757420 76656332 rds; . out vec2 │ │ │ │ - 0x0097ee60 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x0097ee70 733b200a 20206f75 74207665 63322076 s; . out vec2 v │ │ │ │ - 0x0097ee80 5f6d6173 6b546578 436f6f72 64733b20 _maskTexCoords; │ │ │ │ - 0x0097ee90 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0097eea0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0097eeb0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0097eec0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x0097eed0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x0097eee0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x0097eef0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x0097ef00 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x0097ef10 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0097ef20 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x0097ef30 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x0097ef40 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x0097ef50 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x0097ef60 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x0097ef70 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x0097ef80 696e6550 6173733b 200a2020 636f6e73 inePass; . cons │ │ │ │ - 0x0097ef90 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x0097efa0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x0097efb0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x0097efc0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x0097efd0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0097efe0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0097eff0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0097f000 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x0097f010 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0097f020 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x0097f030 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x0097f040 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x0097f050 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097f060 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x0097f070 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0097f080 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0097f090 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0097f0a0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x0097f0b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097f0c0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x0097f0d0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x0097f0e0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0097f0f0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x0097f100 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x0097f110 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x0097f120 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097f130 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x0097f140 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x0097f150 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097f160 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0097f170 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0097f180 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097f190 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x0097f1a0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0097f1b0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x0097f1c0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x0097f1d0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x0097f1e0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x0097f1f0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x0097f200 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x0097f210 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x0097f220 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x0097f230 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x0097f240 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x0097f250 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x0097f260 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0097f270 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x0097f280 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x0097f290 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0097f2a0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x0097f2b0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x0097f2c0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x0097f2d0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0097f2e0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x0097f2f0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x0097f300 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x0097f310 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x0097f320 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x0097f330 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x0097f340 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x0097f350 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x0097f360 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x0097f370 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x0097f380 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x0097f390 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x0097f3a0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0097f3b0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x0097f3c0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x0097f3d0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x0097f3e0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x0097f3f0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x0097f400 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x0097f410 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x0097f420 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x0097f430 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x0097f440 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x0097f450 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x0097f460 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x0097f470 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x0097f480 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0097f490 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x0097f4a0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x0097f4b0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x0097f4c0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x0097f4d0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x0097f4e0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x0097f4f0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x0097f500 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0097f510 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x0097f520 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0097f530 20706f73 203d2076 65633428 615f706f pos = vec4(a_po │ │ │ │ - 0x0097f540 73697469 6f6e2e78 797a2c20 3129202a sition.xyz, 1) * │ │ │ │ - 0x0097f550 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ - 0x0097f560 20202076 65633420 73686966 74656450 vec4 shiftedP │ │ │ │ - 0x0097f570 6f73203d 20766563 3428615f 6e6f726d os = vec4(a_norm │ │ │ │ - 0x0097f580 616c2c20 302c2030 29202b20 706f733b al, 0, 0) + pos; │ │ │ │ - 0x0097f590 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x0097f5a0 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x0097f5b0 616e7366 6f726d28 73686966 74656450 ansform(shiftedP │ │ │ │ - 0x0097f5c0 6f73202a 20755f70 726f6a65 6374696f os * u_projectio │ │ │ │ - 0x0097f5d0 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x0097f5e0 6f726d2c 20302e30 293b200a 20202020 orm, 0.0); . │ │ │ │ - 0x0097f5f0 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x0097f600 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ - 0x0097f610 7264733b 200a2020 2020765f 6d61736b rds; . v_mask │ │ │ │ - 0x0097f620 54657843 6f6f7264 73203d20 615f6d61 TexCoords = a_ma │ │ │ │ - 0x0097f630 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ - 0x0097f640 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x0097f650 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0097f660 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0097f670 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0097f680 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0097f690 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0097f6a0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0097f6b0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0097f6c0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0097f6d0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0097f6e0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0097f6f0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0097f700 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0097f710 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0097f720 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0097f730 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0097f740 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0097f750 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0097f760 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0097f770 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0097f780 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0097f790 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x0097f7a0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0097f7b0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x0097f7c0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0097f7d0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x0097f7e0 65633220 615f6d61 736b5465 78436f6f ec2 a_maskTexCoo │ │ │ │ - 0x0097f7f0 7264733b 200a2020 6f757420 76656332 rds; . out vec2 │ │ │ │ - 0x0097f800 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x0097f810 733b200a 20206f75 74207665 63322076 s; . out vec2 v │ │ │ │ - 0x0097f820 5f6d6173 6b546578 436f6f72 64733b20 _maskTexCoords; │ │ │ │ - 0x0097f830 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0097f840 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0097f850 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0097f860 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x0097f870 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x0097f880 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x0097f890 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x0097f8a0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x0097f8b0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0097f8c0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x0097f8d0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x0097f8e0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x0097f8f0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x0097f900 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x0097f910 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x0097f920 696e6550 6173733b 200a2020 636f6e73 inePass; . cons │ │ │ │ - 0x0097f930 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x0097f940 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x0097f950 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x0097f960 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x0097f970 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0097f980 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0097f990 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0097f9a0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x0097f9b0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0097f9c0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x0097f9d0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x0097f9e0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x0097f9f0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097fa00 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x0097fa10 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0097fa20 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0097fa30 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0097fa40 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x0097fa50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097fa60 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x0097fa70 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x0097fa80 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0097fa90 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x0097faa0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x0097fab0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x0097fac0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0097fad0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x0097fae0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x0097faf0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0097fb00 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0097fb10 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0097fb20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0097fb30 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x0097fb40 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0097fb50 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x0097fb60 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x0097fb70 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x0097fb80 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x0097fb90 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x0097fba0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x0097fbb0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x0097fbc0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x0097fbd0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x0097fbe0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x0097fbf0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x0097fc00 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0097fc10 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x0097fc20 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x0097fc30 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0097fc40 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x0097fc50 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x0097fc60 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x0097fc70 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0097fc80 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x0097fc90 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x0097fca0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x0097fcb0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x0097fcc0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x0097fcd0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x0097fce0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x0097fcf0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x0097fd00 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x0097fd10 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x0097fd20 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x0097fd30 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x0097fd40 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0097fd50 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x0097fd60 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x0097fd70 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x0097fd80 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x0097fd90 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x0097fda0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x0097fdb0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x0097fdc0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x0097fdd0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x0097fde0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x0097fdf0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x0097fe00 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x0097fe10 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x0097fe20 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0097fe30 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x0097fe40 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x0097fe50 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x0097fe60 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x0097fe70 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x0097fe80 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x0097fe90 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x0097fea0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0097feb0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x0097fec0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0097fed0 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ - 0x0097fee0 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ - 0x0097fef0 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ - 0x0097ff00 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ - 0x0097ff10 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ - 0x0097ff20 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ - 0x0097ff30 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x0097ff40 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x0097ff50 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x0097ff60 69766f74 5472616e 73666f72 6d287069 ivotTransform(pi │ │ │ │ - 0x0097ff70 766f7420 2a20755f 70726f6a 65637469 vot * u_projecti │ │ │ │ - 0x0097ff80 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ - 0x0097ff90 666f726d 2c200a20 20202020 20202020 form, . │ │ │ │ - 0x0097ffa0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0097ffb0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0097ffc0 20202020 2020615f 706f7369 74696f6e a_position │ │ │ │ - 0x0097ffd0 2e77202a 20755f7a 5363616c 652c206f .w * u_zScale, o │ │ │ │ - 0x0097ffe0 66667365 742e7879 293b200a 20202020 ffset.xy); . │ │ │ │ - 0x0097fff0 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x00980000 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ - 0x00980010 7264733b 200a2020 2020765f 6d61736b rds; . v_mask │ │ │ │ - 0x00980020 54657843 6f6f7264 73203d20 615f6d61 TexCoords = a_ma │ │ │ │ - 0x00980030 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ - 0x00980040 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x00980050 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00980060 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00980070 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00980080 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00980090 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x009800a0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x009800b0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x009800c0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x009800d0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009800e0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009800f0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00980100 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00980110 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00980120 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00980130 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00980140 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00980150 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00980160 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00980170 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00980180 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00980190 0a202069 6e207665 63322061 5f6e6f72 . in vec2 a_nor │ │ │ │ - 0x009801a0 6d616c3b 200a2020 696e2076 65633220 mal; . in vec2 │ │ │ │ - 0x009801b0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x009801c0 3b200a20 206f7574 20766563 3220765f ; . out vec2 v_ │ │ │ │ - 0x009801d0 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ - 0x009801e0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x009801f0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00980200 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00980210 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x00980220 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x00980230 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x00980240 756e6966 6f726d20 76656334 20755f70 uniform vec4 u_p │ │ │ │ - 0x00980250 6f736974 696f6e3b 200a2020 756e6966 osition; . unif │ │ │ │ - 0x00980260 6f726d20 76656332 20755f6c 696e6550 orm vec2 u_lineP │ │ │ │ - 0x00980270 6172616d 733b200a 2020756e 69666f72 arams; . unifor │ │ │ │ - 0x00980280 6d20666c 6f617420 755f6163 63757261 m float u_accura │ │ │ │ - 0x00980290 63793b20 0a202075 6e69666f 726d2066 cy; . uniform f │ │ │ │ - 0x009802a0 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x009802b0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x009802c0 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ - 0x009802d0 69666f72 6d20666c 6f617420 755f617a iform float u_az │ │ │ │ - 0x009802e0 696d7574 3b200a20 20636f6e 73742066 imut; . const f │ │ │ │ - 0x009802f0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00980300 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00980310 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00980320 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00980330 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00980340 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00980350 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00980360 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00980370 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00980380 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00980390 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x009803a0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x009803b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009803c0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x009803d0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x009803e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009803f0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00980400 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00980410 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00980420 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00980430 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00980440 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00980450 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00980460 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00980470 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00980480 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00980490 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x009804a0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x009804b0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x009804c0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x009804d0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x009804e0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x009804f0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00980500 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00980510 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00980520 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00980530 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00980540 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00980550 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00980560 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00980570 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00980580 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00980590 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009805a0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x009805b0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x009805c0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x009805d0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x009805e0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x009805f0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00980600 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00980610 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00980620 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00980630 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00980640 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00980650 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00980660 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00980670 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00980680 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00980690 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x009806a0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x009806b0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x009806c0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x009806d0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x009806e0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x009806f0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00980700 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00980710 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00980720 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00980730 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00980740 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00980750 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00980760 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00980770 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00980780 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00980790 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x009807a0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x009807b0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x009807c0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x009807d0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x009807e0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x009807f0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00980800 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00980810 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00980820 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00980830 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00980840 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00980850 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00980860 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00980870 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00980880 20207b20 0a202020 20666c6f 61742073 { . float s │ │ │ │ - 0x00980890 696e5620 3d207369 6e28755f 617a696d inV = sin(u_azim │ │ │ │ - 0x009808a0 7574293b 200a2020 2020666c 6f617420 ut); . float │ │ │ │ - 0x009808b0 636f7356 203d2063 6f732875 5f617a69 cosV = cos(u_azi │ │ │ │ - 0x009808c0 6d757429 3b200a20 2020206d 61743420 mut); . mat4 │ │ │ │ - 0x009808d0 726f7461 74696f6e 3b200a20 20202072 rotation; . r │ │ │ │ - 0x009808e0 6f746174 696f6e5b 305d203d 20766563 otation[0] = vec │ │ │ │ - 0x009808f0 3428636f 73562c20 73696e56 2c20302e 4(cosV, sinV, 0. │ │ │ │ - 0x00980900 302c2030 2e30293b 200a2020 2020726f 0, 0.0); . ro │ │ │ │ - 0x00980910 74617469 6f6e5b31 5d203d20 76656334 tation[1] = vec4 │ │ │ │ - 0x00980920 282d7369 6e562c20 636f7356 2c20302e (-sinV, cosV, 0. │ │ │ │ - 0x00980930 302c2030 2e30293b 200a2020 2020726f 0, 0.0); . ro │ │ │ │ - 0x00980940 74617469 6f6e5b32 5d203d20 76656334 tation[2] = vec4 │ │ │ │ - 0x00980950 28302e30 2c20302e 302c2031 2e302c20 (0.0, 0.0, 1.0, │ │ │ │ - 0x00980960 302e3029 3b200a20 20202072 6f746174 0.0); . rotat │ │ │ │ - 0x00980970 696f6e5b 335d203d 20766563 3428302e ion[3] = vec4(0. │ │ │ │ - 0x00980980 302c2030 2e302c20 302e302c 20312e30 0, 0.0, 0.0, 1.0 │ │ │ │ - 0x00980990 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x009809a0 203d2076 65633428 755f706f 73697469 = vec4(u_positi │ │ │ │ - 0x009809b0 6f6e2e78 797a2c20 312e3029 202a2075 on.xyz, 1.0) * u │ │ │ │ - 0x009809c0 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ - 0x009809d0 20766563 34206e6f 726d616c 203d2076 vec4 normal = v │ │ │ │ - 0x009809e0 65633428 615f6e6f 726d616c 2c20302c ec4(a_normal, 0, │ │ │ │ - 0x009809f0 2030293b 200a2020 20207665 63342073 0); . vec4 s │ │ │ │ - 0x00980a00 68696674 6564506f 73203d20 6e6f726d hiftedPos = norm │ │ │ │ - 0x00980a10 616c202a 20726f74 6174696f 6e202b20 al * rotation + │ │ │ │ - 0x00980a20 706f733b 200a2020 2020676c 5f506f73 pos; . gl_Pos │ │ │ │ - 0x00980a30 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ - 0x00980a40 6f745472 616e7366 6f726d28 73686966 otTransform(shif │ │ │ │ - 0x00980a50 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ - 0x00980a60 6374696f 6e2c2075 5f706976 6f745472 ction, u_pivotTr │ │ │ │ - 0x00980a70 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ - 0x00980a80 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ - 0x00980a90 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ - 0x00980aa0 78436f6f 7264733b 200a2020 7d200a00 xCoords; . } .. │ │ │ │ - 0x00980ab0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00980ac0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00980ad0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00980ae0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00980af0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00980b00 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00980b10 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00980b20 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00980b30 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00980b40 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00980b50 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00980b60 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00980b70 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00980b80 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00980b90 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00980ba0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00980bb0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00980bc0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00980bd0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00980be0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00980bf0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00980c00 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00980c10 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00980c20 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00980c30 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00980c40 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00980c50 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00980c60 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00980c70 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00980c80 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00980c90 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00980ca0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00980cb0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00980cc0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00980cd0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00980ce0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00980cf0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00980d00 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00980d10 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00980d20 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00980d30 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00980d40 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00980d50 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00980d60 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00980d70 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00980d80 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00980d90 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00980da0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00980db0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00980dc0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00980dd0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00980de0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00980df0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00980e00 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00980e10 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00980e20 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00980e30 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00980e40 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00980e50 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00980e60 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00980e70 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00980e80 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00980e90 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00980ea0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00980eb0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00980ec0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00980ed0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00980ee0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00980ef0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00980f00 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00980f10 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00980f20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00980f30 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00980f40 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00980f50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00980f60 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00980f70 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00980f80 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00980f90 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00980fa0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00980fb0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00980fc0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00980fd0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00980fe0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00980ff0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00981000 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00981010 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00981020 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00981030 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00981040 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00981050 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00981060 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00981070 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00981080 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00981090 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x009810a0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x009810b0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x009810c0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x009810d0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x009810e0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x009810f0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00981100 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00981110 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00981120 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00981130 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00981140 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00981150 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00981160 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00981170 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00981180 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00981190 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x009811a0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x009811b0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x009811c0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x009811d0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x009811e0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x009811f0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00981200 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00981210 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00981220 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00981230 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00981240 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00981250 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00981260 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00981270 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00981280 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00981290 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x009812a0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x009812b0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x009812c0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x009812d0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x009812e0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x009812f0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00981300 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x00981310 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ - 0x00981320 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00981330 2020666c 6f617420 6e6f726d 616c4c65 float normalLe │ │ │ │ - 0x00981340 6e203d20 6c656e67 74682861 5f6e6f72 n = length(a_nor │ │ │ │ - 0x00981350 6d616c29 3b200a20 20202076 65633420 mal); . vec4 │ │ │ │ - 0x00981360 6e203d20 76656334 28615f70 6f736974 n = vec4(a_posit │ │ │ │ - 0x00981370 696f6e2e 7879202b 20615f6e 6f726d61 ion.xy + a_norma │ │ │ │ - 0x00981380 6c202a20 6b536861 7065436f 6f726453 l * kShapeCoordS │ │ │ │ - 0x00981390 63616c61 722c2030 2e302c20 302e3029 calar, 0.0, 0.0) │ │ │ │ - 0x009813a0 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x009813b0 0a202020 20766563 34206e6f 726d203d . vec4 norm = │ │ │ │ - 0x009813c0 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ - 0x009813d0 302e302c 20302e30 293b200a 20202020 0.0, 0.0); . │ │ │ │ - 0x009813e0 69662028 646f7428 6e2c206e 2920213d if (dot(n, n) != │ │ │ │ - 0x009813f0 20302e30 29200a20 20202020 206e6f72 0.0) . nor │ │ │ │ - 0x00981400 6d203d20 6e6f726d 616c697a 65286e29 m = normalize(n) │ │ │ │ - 0x00981410 202a206e 6f726d61 6c4c656e 3b200a20 * normalLen; . │ │ │ │ - 0x00981420 20202076 65633420 73686966 74656450 vec4 shiftedP │ │ │ │ - 0x00981430 6f73203d 206e6f72 6d202b20 706f733b os = norm + pos; │ │ │ │ - 0x00981440 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00981450 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x00981460 616e7366 6f726d28 73686966 74656450 ansform(shiftedP │ │ │ │ - 0x00981470 6f73202a 20755f70 726f6a65 6374696f os * u_projectio │ │ │ │ - 0x00981480 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x00981490 6f726d2c 20302e30 293b200a 20202020 orm, 0.0); . │ │ │ │ - 0x009814a0 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x009814b0 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ - 0x009814c0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ - 0x009814d0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009814e0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009814f0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00981500 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00981510 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00981520 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00981530 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00981540 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00981550 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00981560 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00981570 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00981580 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00981590 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x009815a0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x009815b0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009815c0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009815d0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009815e0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009815f0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00981600 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00981610 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00981620 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ - 0x00981630 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ - 0x00981640 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ - 0x00981650 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ - 0x00981660 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x00981670 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00981680 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00981690 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x009816a0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x009816b0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x009816c0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x009816d0 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ - 0x009816e0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x009816f0 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ - 0x00981700 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00981710 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ - 0x00981720 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ - 0x00981730 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ - 0x00981740 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00981750 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ - 0x00981760 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ - 0x00981770 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00981780 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00981790 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x009817a0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x009817b0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x009817c0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x009817d0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x009817e0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x009817f0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00981800 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00981810 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00981820 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00981830 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00981840 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00981850 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00981860 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00981870 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00981880 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00981890 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x009818a0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x009818b0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x009818c0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x009818d0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x009818e0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x009818f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00981900 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00981910 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00981920 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00981930 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00981940 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00981950 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00981960 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00981970 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00981980 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00981990 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x009819a0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x009819b0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x009819c0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x009819d0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x009819e0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x009819f0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00981a00 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00981a10 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00981a20 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00981a30 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00981a40 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00981a50 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00981a60 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00981a70 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00981a80 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00981a90 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00981aa0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00981ab0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00981ac0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x00981ad0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00981ae0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x00981af0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x00981b00 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00981b10 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00981b20 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00981b30 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00981b40 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00981b50 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00981b60 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00981b70 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00981b80 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00981b90 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00981ba0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00981bb0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00981bc0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x00981bd0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x00981be0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x00981bf0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x00981c00 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00981c10 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00981c20 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00981c30 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00981c40 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00981c50 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00981c60 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00981c70 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00981c80 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00981c90 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00981ca0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00981cb0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00981cc0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x00981cd0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x00981ce0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00981cf0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x00981d00 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00981d10 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00981d20 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ - 0x00981d30 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ - 0x00981d40 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ - 0x00981d50 20202076 65633420 6e6f726d 616c203d vec4 normal = │ │ │ │ - 0x00981d60 20766563 3428615f 6e6f726d 616c202a vec4(a_normal * │ │ │ │ - 0x00981d70 20755f61 63637572 6163792c 20302e30 u_accuracy, 0.0 │ │ │ │ - 0x00981d80 2c20302e 30293b20 0a202020 20706f73 , 0.0); . pos │ │ │ │ - 0x00981d90 6974696f 6e203d20 28706f73 6974696f ition = (positio │ │ │ │ - 0x00981da0 6e202b20 6e6f726d 616c2920 2a20755f n + normal) * u_ │ │ │ │ - 0x00981db0 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ - 0x00981dc0 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x00981dd0 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00981de0 726d2870 6f736974 696f6e2c 20755f70 rm(position, u_p │ │ │ │ - 0x00981df0 69766f74 5472616e 73666f72 6d2c2075 ivotTransform, u │ │ │ │ - 0x00981e00 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ - 0x00981e10 7a536361 6c65293b 200a2020 2020765f zScale); . v_ │ │ │ │ - 0x00981e20 636f6c6f 72546578 436f6f72 6473203d colorTexCoords = │ │ │ │ - 0x00981e30 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ - 0x00981e40 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ - 0x00981e50 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00981e60 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00981e70 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00981e80 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00981e90 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00981ea0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00981eb0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00981ec0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00981ed0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00981ee0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00981ef0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00981f00 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00981f10 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00981f20 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00981f30 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00981f40 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00981f50 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00981f60 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00981f70 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00981f80 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00981f90 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00981fa0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00981fb0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00981fc0 616c3b20 0a202069 6e207665 63332061 al; . in vec3 a │ │ │ │ - 0x00981fd0 5f6c656e 6774683b 200a2020 696e2076 _length; . in v │ │ │ │ - 0x00981fe0 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x00981ff0 6f757420 76656333 20765f6c 656e6774 out vec3 v_lengt │ │ │ │ - 0x00982000 683b200a 20206f75 74207665 63342076 h; . out vec4 v │ │ │ │ - 0x00982010 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ - 0x00982020 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00982030 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00982040 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00982050 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00982060 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00982070 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00982080 76656334 20755f72 6f757465 50617261 vec4 u_routePara │ │ │ │ - 0x00982090 6d733b20 0a202075 6e69666f 726d2076 ms; . uniform v │ │ │ │ - 0x009820a0 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ - 0x009820b0 756e6966 6f726d20 76656334 20755f6d uniform vec4 u_m │ │ │ │ - 0x009820c0 61736b43 6f6c6f72 3b200a20 20756e69 askColor; . uni │ │ │ │ - 0x009820d0 666f726d 20766563 3420755f 6f75746c form vec4 u_outl │ │ │ │ - 0x009820e0 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ - 0x009820f0 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ - 0x00982100 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ - 0x00982110 6d207665 63342075 5f66616b 654f7574 m vec4 u_fakeOut │ │ │ │ - 0x00982120 6c696e65 436f6c6f 723b200a 2020756e lineColor; . un │ │ │ │ - 0x00982130 69666f72 6d207665 63322075 5f66616b iform vec2 u_fak │ │ │ │ - 0x00982140 65426f72 64657273 3b200a20 20756e69 eBorders; . uni │ │ │ │ - 0x00982150 666f726d 20766563 3220755f 70617474 form vec2 u_patt │ │ │ │ - 0x00982160 65726e3b 200a2020 756e6966 6f726d20 ern; . uniform │ │ │ │ - 0x00982170 76656332 20755f61 6e676c65 436f7353 vec2 u_angleCosS │ │ │ │ - 0x00982180 696e3b20 0a202075 6e69666f 726d2066 in; . uniform f │ │ │ │ - 0x00982190 6c6f6174 20755f61 72726f77 48616c66 loat u_arrowHalf │ │ │ │ - 0x009821a0 57696474 683b200a 2020756e 69666f72 Width; . unifor │ │ │ │ - 0x009821b0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x009821c0 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ - 0x009821d0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x009821e0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x009821f0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00982200 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00982210 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00982220 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00982230 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00982240 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00982250 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00982260 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00982270 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00982280 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00982290 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x009822a0 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x009822b0 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x009822c0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x009822d0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x009822e0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x009822f0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00982300 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00982310 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00982320 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00982330 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00982340 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00982350 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00982360 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00982370 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00982380 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00982390 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x009823a0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x009823b0 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x009823c0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x009823d0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x009823e0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x009823f0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00982400 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00982410 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00982420 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00982430 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00982440 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00982450 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00982460 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00982470 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00982480 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00982490 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x009824a0 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x009824b0 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x009824c0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x009824d0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x009824e0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x009824f0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00982500 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00982510 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00982520 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00982530 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00982540 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00982550 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00982560 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00982570 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00982580 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00982590 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x009825a0 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x009825b0 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x009825c0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x009825d0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x009825e0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x009825f0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00982600 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00982610 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00982620 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00982630 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00982640 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00982650 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00982660 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00982670 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00982680 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00982690 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x009826a0 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x009826b0 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x009826c0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x009826d0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x009826e0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x009826f0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00982700 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00982710 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00982720 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00982730 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00982740 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00982750 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00982760 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ - 0x00982770 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ - 0x00982780 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ - 0x00982790 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ - 0x009827a0 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ - 0x009827b0 3b200a20 20202076 65633220 6c656e20 ; . vec2 len │ │ │ │ - 0x009827c0 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ - 0x009827d0 782c2061 5f6c656e 6774682e 7a293b20 x, a_length.z); │ │ │ │ - 0x009827e0 0a202020 20696620 28646f74 28615f6e . if (dot(a_n │ │ │ │ - 0x009827f0 6f726d61 6c2c2061 5f6e6f72 6d616c29 ormal, a_normal) │ │ │ │ - 0x00982800 20213d20 302e3029 200a2020 20207b20 != 0.0) . { │ │ │ │ - 0x00982810 0a202020 20202076 65633220 6e6f726d . vec2 norm │ │ │ │ - 0x00982820 203d2061 5f6e6f72 6d616c20 2a20755f = a_normal * u_ │ │ │ │ - 0x00982830 726f7574 65506172 616d732e 783b200a routeParams.x; . │ │ │ │ - 0x00982840 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ - 0x00982850 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ - 0x00982860 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00982870 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ - 0x00982880 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ - 0x00982890 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ - 0x009828a0 0a202020 20202020 20202020 20202020 . │ │ │ │ - 0x009828b0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009828c0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009828d0 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ - 0x009828e0 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ - 0x009828f0 293b200a 20202020 20206966 2028755f ); . if (u_ │ │ │ │ - 0x00982900 726f7574 65506172 616d732e 7920213d routeParams.y != │ │ │ │ - 0x00982910 20302e30 29200a20 20202020 2020206c 0.0) . l │ │ │ │ - 0x00982920 656e203d 20766563 3228615f 6c656e67 en = vec2(a_leng │ │ │ │ - 0x00982930 74682e78 202b2061 5f6c656e 6774682e th.x + a_length. │ │ │ │ - 0x00982940 79202a20 755f726f 75746550 6172616d y * u_routeParam │ │ │ │ - 0x00982950 732e792c 20615f6c 656e6774 682e7a29 s.y, a_length.z) │ │ │ │ - 0x00982960 3b200a20 2020207d 200a2020 2020765f ; . } . v_ │ │ │ │ - 0x00982970 6c656e67 7468203d 20766563 33286c65 length = vec3(le │ │ │ │ - 0x00982980 6e2c2075 5f726f75 74655061 72616d73 n, u_routeParams │ │ │ │ - 0x00982990 2e7a293b 200a2020 2020765f 636f6c6f .z); . v_colo │ │ │ │ - 0x009829a0 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ - 0x009829b0 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x009829c0 34287472 616e7366 6f726d65 64417869 4(transformedAxi │ │ │ │ - 0x009829d0 73506f73 2c20615f 706f7369 74696f6e sPos, a_position │ │ │ │ - 0x009829e0 2e7a2c20 312e3029 202a2075 5f70726f .z, 1.0) * u_pro │ │ │ │ - 0x009829f0 6a656374 696f6e3b 200a2020 2020676c jection; . gl │ │ │ │ - 0x00982a00 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ - 0x00982a10 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00982a20 706f732c 20755f70 69766f74 5472616e pos, u_pivotTran │ │ │ │ - 0x00982a30 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ - 0x00982a40 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x00982a50 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00982a60 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00982a70 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00982a80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00982a90 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00982aa0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00982ab0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00982ac0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00982ad0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00982ae0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00982af0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00982b00 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00982b10 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00982b20 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00982b30 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00982b40 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00982b50 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00982b60 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00982b70 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00982b80 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00982b90 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x00982ba0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00982bb0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x00982bc0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x00982bd0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x00982be0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x00982bf0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ - 0x00982c00 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x00982c10 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x00982c20 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x00982c30 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00982c40 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x00982c50 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x00982c60 65633420 755f726f 75746550 6172616d ec4 u_routeParam │ │ │ │ - 0x00982c70 733b200a 2020756e 69666f72 6d207665 s; . uniform ve │ │ │ │ - 0x00982c80 63342075 5f636f6c 6f723b20 0a202075 c4 u_color; . u │ │ │ │ - 0x00982c90 6e69666f 726d2076 65633420 755f6d61 niform vec4 u_ma │ │ │ │ - 0x00982ca0 736b436f 6c6f723b 200a2020 756e6966 skColor; . unif │ │ │ │ - 0x00982cb0 6f726d20 76656334 20755f6f 75746c69 orm vec4 u_outli │ │ │ │ - 0x00982cc0 6e65436f 6c6f723b 200a2020 756e6966 neColor; . unif │ │ │ │ - 0x00982cd0 6f726d20 76656334 20755f66 616b6543 orm vec4 u_fakeC │ │ │ │ - 0x00982ce0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x00982cf0 20766563 3420755f 66616b65 4f75746c vec4 u_fakeOutl │ │ │ │ - 0x00982d00 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ - 0x00982d10 666f726d 20766563 3220755f 66616b65 form vec2 u_fake │ │ │ │ - 0x00982d20 426f7264 6572733b 200a2020 756e6966 Borders; . unif │ │ │ │ - 0x00982d30 6f726d20 76656332 20755f70 61747465 orm vec2 u_patte │ │ │ │ - 0x00982d40 726e3b20 0a202075 6e69666f 726d2076 rn; . uniform v │ │ │ │ - 0x00982d50 65633220 755f616e 676c6543 6f735369 ec2 u_angleCosSi │ │ │ │ - 0x00982d60 6e3b200a 2020756e 69666f72 6d20666c n; . uniform fl │ │ │ │ - 0x00982d70 6f617420 755f6172 726f7748 616c6657 oat u_arrowHalfW │ │ │ │ - 0x00982d80 69647468 3b200a20 20756e69 666f726d idth; . uniform │ │ │ │ - 0x00982d90 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00982da0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00982db0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00982dc0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00982dd0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00982de0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00982df0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00982e00 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00982e10 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00982e20 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00982e30 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00982e40 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x00982e50 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x00982e60 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x00982e70 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00982e80 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x00982e90 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00982ea0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00982eb0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00982ec0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00982ed0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00982ee0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00982ef0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00982f00 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00982f10 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00982f20 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x00982f30 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x00982f40 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00982f50 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x00982f60 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x00982f70 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x00982f80 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00982f90 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x00982fa0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x00982fb0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x00982fc0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00982fd0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00982fe0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00982ff0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00983000 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00983010 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00983020 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x00983030 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x00983040 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x00983050 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00983060 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00983070 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x00983080 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x00983090 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x009830a0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x009830b0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x009830c0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x009830d0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x009830e0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x009830f0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00983100 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x00983110 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x00983120 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x00983130 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x00983140 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x00983150 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00983160 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x00983170 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x00983180 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x00983190 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x009831a0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x009831b0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x009831c0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x009831d0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x009831e0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x009831f0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x00983200 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x00983210 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x00983220 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x00983230 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x00983240 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x00983250 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x00983260 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x00983270 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x00983280 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x00983290 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x009832a0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x009832b0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x009832c0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x009832d0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x009832e0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x009832f0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x00983300 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x00983310 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00983320 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x00983330 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x00983340 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x00983350 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x00983360 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x00983370 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x00983380 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x00983390 200a2020 20206966 2028646f 7428615f . if (dot(a_ │ │ │ │ - 0x009833a0 6e6f726d 616c2c20 615f6e6f 726d616c normal, a_normal │ │ │ │ - 0x009833b0 2920213d 20302e30 29200a20 2020207b ) != 0.0) . { │ │ │ │ - 0x009833c0 200a2020 20202020 76656332 206e6f72 . vec2 nor │ │ │ │ - 0x009833d0 6d203d20 615f6e6f 726d616c 202a2075 m = a_normal * u │ │ │ │ - 0x009833e0 5f617272 6f774861 6c665769 6474683b _arrowHalfWidth; │ │ │ │ - 0x009833f0 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ - 0x00983400 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ - 0x00983410 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x00983420 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ - 0x00983430 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ - 0x00983440 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ - 0x00983450 2c200a20 20202020 20202020 20202020 , . │ │ │ │ - 0x00983460 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00983470 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00983480 20202020 20202020 20755f6d 6f64656c u_model │ │ │ │ - 0x00983490 56696577 2c206c65 6e677468 286e6f72 View, length(nor │ │ │ │ - 0x009834a0 6d29293b 200a2020 20207d20 0a202020 m)); . } . │ │ │ │ - 0x009834b0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x009834c0 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ - 0x009834d0 6f726473 3b200a20 20202076 65633420 ords; . vec4 │ │ │ │ - 0x009834e0 706f7320 3d207665 63342874 72616e73 pos = vec4(trans │ │ │ │ - 0x009834f0 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ - 0x00983500 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ - 0x00983510 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ - 0x00983520 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x00983530 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ - 0x00983540 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ - 0x00983550 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00983560 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ - 0x00983570 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00983580 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00983590 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009835a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009835b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009835c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009835d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009835e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009835f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00983600 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00983610 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00983620 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00983630 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00983640 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00983650 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00983660 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00983670 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00983680 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00983690 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009836a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009836b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009836c0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x009836d0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x009836e0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x009836f0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00983700 65633420 765f7261 64697573 3b200a20 ec4 v_radius; . │ │ │ │ - 0x00983710 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ - 0x00983720 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ - 0x00983730 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x00983740 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00983750 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00983760 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00983770 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x00983780 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x00983790 755f726f 75746550 6172616d 733b200a u_routeParams; . │ │ │ │ - 0x009837a0 2020756e 69666f72 6d207665 63342075 uniform vec4 u │ │ │ │ - 0x009837b0 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ - 0x009837c0 726d2076 65633420 755f6d61 736b436f rm vec4 u_maskCo │ │ │ │ - 0x009837d0 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x009837e0 76656334 20755f6f 75746c69 6e65436f vec4 u_outlineCo │ │ │ │ - 0x009837f0 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x00983800 76656334 20755f66 616b6543 6f6c6f72 vec4 u_fakeColor │ │ │ │ - 0x00983810 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00983820 3420755f 66616b65 4f75746c 696e6543 4 u_fakeOutlineC │ │ │ │ - 0x00983830 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x00983840 20766563 3220755f 66616b65 426f7264 vec2 u_fakeBord │ │ │ │ - 0x00983850 6572733b 200a2020 756e6966 6f726d20 ers; . uniform │ │ │ │ - 0x00983860 76656332 20755f70 61747465 726e3b20 vec2 u_pattern; │ │ │ │ - 0x00983870 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ - 0x00983880 755f616e 676c6543 6f735369 6e3b200a u_angleCosSin; . │ │ │ │ - 0x00983890 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x009838a0 755f6172 726f7748 616c6657 69647468 u_arrowHalfWidth │ │ │ │ - 0x009838b0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x009838c0 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ - 0x009838d0 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x009838e0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x009838f0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00983900 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00983910 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00983920 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00983930 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00983940 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00983950 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00983960 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00983970 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00983980 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00983990 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x009839a0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x009839b0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x009839c0 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x009839d0 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x009839e0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x009839f0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00983a00 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00983a10 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00983a20 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00983a30 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00983a40 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00983a50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00983a60 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00983a70 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00983a80 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00983a90 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00983aa0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00983ab0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00983ac0 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00983ad0 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00983ae0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00983af0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00983b00 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00983b10 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00983b20 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00983b30 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x00983b40 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x00983b50 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x00983b60 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00983b70 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00983b80 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00983b90 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00983ba0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00983bb0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00983bc0 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00983bd0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00983be0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00983bf0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00983c00 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00983c10 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00983c20 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x00983c30 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00983c40 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x00983c50 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x00983c60 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00983c70 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00983c80 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00983c90 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00983ca0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00983cb0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00983cc0 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00983cd0 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00983ce0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00983cf0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00983d00 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00983d10 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00983d20 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x00983d30 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x00983d40 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x00983d50 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x00983d60 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00983d70 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00983d80 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00983d90 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00983da0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00983db0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00983dc0 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00983dd0 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00983de0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00983df0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00983e00 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00983e10 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00983e20 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x00983e30 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x00983e40 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00983e50 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x00983e60 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00983e70 20666c6f 61742072 203d2075 5f726f75 float r = u_rou │ │ │ │ - 0x00983e80 74655061 72616d73 2e78202a 20615f6e teParams.x * a_n │ │ │ │ - 0x00983e90 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ - 0x00983ea0 6332206e 6f726d61 6c203d20 76656332 c2 normal = vec2 │ │ │ │ - 0x00983eb0 28615f6e 6f726d61 6c2e7820 2a20755f (a_normal.x * u_ │ │ │ │ - 0x00983ec0 616e676c 65436f73 53696e2e 78202d20 angleCosSin.x - │ │ │ │ - 0x00983ed0 615f6e6f 726d616c 2e79202a 20755f61 a_normal.y * u_a │ │ │ │ - 0x00983ee0 6e676c65 436f7353 696e2e79 2c200a20 ngleCosSin.y, . │ │ │ │ - 0x00983ef0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00983f00 20202020 2020615f 6e6f726d 616c2e78 a_normal.x │ │ │ │ - 0x00983f10 202a2075 5f616e67 6c65436f 7353696e * u_angleCosSin │ │ │ │ - 0x00983f20 2e79202b 20615f6e 6f726d61 6c2e7920 .y + a_normal.y │ │ │ │ - 0x00983f30 2a20755f 616e676c 65436f73 53696e2e * u_angleCosSin. │ │ │ │ - 0x00983f40 78293b20 0a202020 20766563 34207261 x); . vec4 ra │ │ │ │ - 0x00983f50 64697573 203d2076 65633428 6e6f726d dius = vec4(norm │ │ │ │ - 0x00983f60 616c2e78 79202a20 722c2072 2c20615f al.xy * r, r, a_ │ │ │ │ - 0x00983f70 706f7369 74696f6e 2e77293b 200a2020 position.w); . │ │ │ │ - 0x00983f80 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ - 0x00983f90 3428615f 706f7369 74696f6e 2e78792c 4(a_position.xy, │ │ │ │ - 0x00983fa0 20302c20 3129202a 20755f6d 6f64656c 0, 1) * u_model │ │ │ │ - 0x00983fb0 56696577 3b200a20 20202076 65633220 View; . vec2 │ │ │ │ - 0x00983fc0 73686966 74656450 6f73203d 20726164 shiftedPos = rad │ │ │ │ - 0x00983fd0 6975732e 7879202b 20706f73 2e78793b ius.xy + pos.xy; │ │ │ │ - 0x00983fe0 200a2020 2020706f 73203d20 76656334 . pos = vec4 │ │ │ │ - 0x00983ff0 28736869 66746564 506f732c 20615f70 (shiftedPos, a_p │ │ │ │ - 0x00984000 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ - 0x00984010 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ - 0x00984020 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x00984030 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ - 0x00984040 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ - 0x00984050 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x00984060 30293b20 0a202020 20765f72 61646975 0); . v_radiu │ │ │ │ - 0x00984070 73203d20 72616469 75733b20 0a202020 s = radius; . │ │ │ │ - 0x00984080 20765f63 6f6c6f72 203d2061 5f636f6c v_color = a_col │ │ │ │ - 0x00984090 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ - 0x009840a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009840b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009840c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009840d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009840e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009840f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00984100 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00984110 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00984120 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00984130 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00984140 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00984150 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00984160 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00984170 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00984180 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00984190 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009841a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009841b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009841c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009841d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009841e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009841f0 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ - 0x00984200 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00984210 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00984220 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00984230 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00984240 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00984250 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00984260 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00984270 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00984280 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00984290 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ - 0x009842a0 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ - 0x009842b0 69666f72 6d207665 63322075 5f706f73 iform vec2 u_pos │ │ │ │ - 0x009842c0 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ - 0x009842d0 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x009842e0 696e6550 6173733b 200a2020 756e6966 inePass; . unif │ │ │ │ - 0x009842f0 6f726d20 666c6f61 7420755f 6f706163 orm float u_opac │ │ │ │ - 0x00984300 6974793b 200a2020 756e6966 6f726d20 ity; . uniform │ │ │ │ - 0x00984310 666c6f61 7420755f 6c656e67 74683b20 float u_length; │ │ │ │ - 0x00984320 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x00984330 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x00984340 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x00984350 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x00984360 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00984370 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00984380 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00984390 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x009843a0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x009843b0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x009843c0 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x009843d0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x009843e0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x009843f0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x00984400 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x00984410 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x00984420 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x00984430 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x00984440 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x00984450 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x00984460 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00984470 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00984480 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00984490 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x009844a0 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x009844b0 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x009844c0 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x009844d0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x009844e0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x009844f0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00984500 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00984510 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x00984520 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x00984530 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x00984540 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00984550 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00984560 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00984570 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00984580 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00984590 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x009845a0 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x009845b0 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x009845c0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x009845d0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x009845e0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x009845f0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00984600 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00984610 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x00984620 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x00984630 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x00984640 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x00984650 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00984660 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00984670 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00984680 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00984690 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x009846a0 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x009846b0 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x009846c0 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x009846d0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x009846e0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x009846f0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00984700 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00984710 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x00984720 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x00984730 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00984740 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x00984750 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00984760 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00984770 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00984780 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00984790 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x009847a0 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x009847b0 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x009847c0 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x009847d0 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x009847e0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x009847f0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00984800 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00984810 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x00984820 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x00984830 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x00984840 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x00984850 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00984860 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00984870 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00984880 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00984890 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x009848a0 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x009848b0 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x009848c0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x009848d0 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ - 0x009848e0 202b2061 5f706f73 6974696f 6e202b20 + a_position + │ │ │ │ - 0x009848f0 755f6c65 6e677468 202a2061 5f6e6f72 u_length * a_nor │ │ │ │ - 0x00984900 6d616c2c 20302c20 3129202a 20755f70 mal, 0, 1) * u_p │ │ │ │ - 0x00984910 726f6a65 6374696f 6e3b200a 20202369 rojection; . #i │ │ │ │ - 0x00984920 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00984930 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ - 0x00984940 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ - 0x00984950 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00984960 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ - 0x00984970 6f6e2e7a 20202b20 676c5f50 6f736974 on.z + gl_Posit │ │ │ │ - 0x00984980 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ - 0x00984990 2023656e 64696620 0a202020 20765f63 #endif . v_c │ │ │ │ - 0x009849a0 6f6c6f72 54657843 6f6f7264 73203d20 olorTexCoords = │ │ │ │ - 0x009849b0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x009849c0 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x009849d0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009849e0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009849f0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00984a00 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00984a10 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00984a20 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00984a30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00984a40 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00984a50 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00984a60 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00984a70 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00984a80 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00984a90 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00984aa0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00984ab0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00984ac0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00984ad0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00984ae0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00984af0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00984b00 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00984b10 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00984b20 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00984b30 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00984b40 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00984b50 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00984b60 200a2020 696e2076 65633320 615f6c65 . in vec3 a_le │ │ │ │ - 0x00984b70 6e677468 3b200a20 20236966 64656620 ngth; . #ifdef │ │ │ │ - 0x00984b80 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ - 0x00984b90 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ - 0x00984ba0 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ - 0x00984bb0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x00984bc0 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ - 0x00984bd0 656e6469 66200a20 206f7574 20666c6f endif . out flo │ │ │ │ - 0x00984be0 61742076 5f6c656e 67746859 3b200a20 at v_lengthY; . │ │ │ │ - 0x00984bf0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00984c00 6d6f6465 6c566965 773b200a 2020756e modelView; . un │ │ │ │ - 0x00984c10 69666f72 6d206d61 74342075 5f70726f iform mat4 u_pro │ │ │ │ - 0x00984c20 6a656374 696f6e3b 200a2020 756e6966 jection; . unif │ │ │ │ - 0x00984c30 6f726d20 6d617434 20755f70 69766f74 orm mat4 u_pivot │ │ │ │ - 0x00984c40 5472616e 73666f72 6d3b200a 2020756e Transform; . un │ │ │ │ - 0x00984c50 69666f72 6d207665 63342075 5f706f73 iform vec4 u_pos │ │ │ │ - 0x00984c60 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ - 0x00984c70 6d207665 63322075 5f6c696e 65506172 m vec2 u_linePar │ │ │ │ - 0x00984c80 616d733b 200a2020 756e6966 6f726d20 ams; . uniform │ │ │ │ - 0x00984c90 666c6f61 7420755f 61636375 72616379 float u_accuracy │ │ │ │ - 0x00984ca0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00984cb0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00984cc0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00984cd0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00984ce0 6f726d20 666c6f61 7420755f 617a696d orm float u_azim │ │ │ │ - 0x00984cf0 75743b20 0a202023 69666465 6620454e ut; . #ifdef EN │ │ │ │ - 0x00984d00 41424c45 5f565446 200a2020 756e6966 ABLE_VTF . unif │ │ │ │ - 0x00984d10 6f726d20 73616d70 6c657232 4420755f orm sampler2D u_ │ │ │ │ - 0x00984d20 636f6c6f 72546578 3b200a20 2023656e colorTex; . #en │ │ │ │ - 0x00984d30 64696620 0a202063 6f6e7374 20666c6f dif . const flo │ │ │ │ - 0x00984d40 6174206b 416e7469 616c6961 73696e67 at kAntialiasing │ │ │ │ - 0x00984d50 54687265 73686f6c 64203d20 302e3932 Threshold = 0.92 │ │ │ │ - 0x00984d60 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00984d70 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00984d80 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00984d90 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00984da0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00984db0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00984dc0 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00984dd0 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00984de0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00984df0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00984e00 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x00984e10 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x00984e20 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x00984e30 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00984e40 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x00984e50 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00984e60 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00984e70 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00984e80 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00984e90 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00984ea0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00984eb0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00984ec0 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00984ed0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00984ee0 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x00984ef0 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x00984f00 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00984f10 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x00984f20 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x00984f30 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x00984f40 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00984f50 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x00984f60 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x00984f70 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x00984f80 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00984f90 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00984fa0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00984fb0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00984fc0 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00984fd0 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00984fe0 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x00984ff0 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x00985000 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x00985010 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00985020 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00985030 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x00985040 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x00985050 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x00985060 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x00985070 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x00985080 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x00985090 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x009850a0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x009850b0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x009850c0 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x009850d0 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x009850e0 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x009850f0 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x00985100 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x00985110 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x00985120 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x00985130 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x00985140 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x00985150 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x00985160 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x00985170 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x00985180 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x00985190 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x009851a0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x009851b0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x009851c0 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x009851d0 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x009851e0 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x009851f0 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x00985200 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x00985210 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x00985220 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x00985230 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x00985240 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x00985250 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x00985260 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x00985270 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x00985280 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x00985290 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x009852a0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x009852b0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x009852c0 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x009852d0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x009852e0 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x009852f0 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x00985300 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x00985310 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x00985320 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x00985330 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x00985340 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x00985350 200a2020 20207665 6332206c 656e203d . vec2 len = │ │ │ │ - 0x00985360 20766563 3228615f 6c656e67 74682e78 vec2(a_length.x │ │ │ │ - 0x00985370 2c20615f 6c656e67 74682e7a 293b200a , a_length.z); . │ │ │ │ - 0x00985380 20202020 69662028 646f7428 615f6e6f if (dot(a_no │ │ │ │ - 0x00985390 726d616c 2c20615f 6e6f726d 616c2920 rmal, a_normal) │ │ │ │ - 0x009853a0 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ - 0x009853b0 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ - 0x009853c0 3d20615f 6e6f726d 616c202a 20755f6c = a_normal * u_l │ │ │ │ - 0x009853d0 696e6550 6172616d 732e783b 200a2020 ineParams.x; . │ │ │ │ - 0x009853e0 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ - 0x009853f0 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ - 0x00985400 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00985410 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ - 0x00985420 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x00985430 6f6e2e78 79202b20 6e6f726d 2c200a20 on.xy + norm, . │ │ │ │ - 0x00985440 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00985450 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00985460 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00985470 20202020 20755f6d 6f64656c 56696577 u_modelView │ │ │ │ - 0x00985480 2c206c65 6e677468 286e6f72 6d29293b , length(norm)); │ │ │ │ - 0x00985490 200a2020 20202020 69662028 755f6c69 . if (u_li │ │ │ │ - 0x009854a0 6e655061 72616d73 2e792021 3d20302e neParams.y != 0. │ │ │ │ - 0x009854b0 3029200a 20202020 20202020 6c656e20 0) . len │ │ │ │ - 0x009854c0 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ - 0x009854d0 78202b20 615f6c65 6e677468 2e79202a x + a_length.y * │ │ │ │ - 0x009854e0 20755f6c 696e6550 6172616d 732e792c u_lineParams.y, │ │ │ │ - 0x009854f0 20615f6c 656e6774 682e7a29 3b200a20 a_length.z); . │ │ │ │ - 0x00985500 2020207d 200a2020 23696664 65662045 } . #ifdef E │ │ │ │ - 0x00985510 4e41424c 455f5654 46200a20 20202076 NABLE_VTF . v │ │ │ │ - 0x00985520 5f636f6c 6f72203d 20746578 74757265 _color = texture │ │ │ │ - 0x00985530 28755f63 6f6c6f72 5465782c 20615f63 (u_colorTex, a_c │ │ │ │ - 0x00985540 6f6c6f72 54657843 6f6f7264 73293b20 olorTexCoords); │ │ │ │ - 0x00985550 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ - 0x00985560 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ - 0x00985570 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x00985580 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00985590 20765f6c 656e6774 6859203d 206c656e v_lengthY = len │ │ │ │ - 0x009855a0 2e793b20 0a202020 20766563 3420706f .y; . vec4 po │ │ │ │ - 0x009855b0 73203d20 76656334 28747261 6e73666f s = vec4(transfo │ │ │ │ - 0x009855c0 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ - 0x009855d0 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ - 0x009855e0 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ - 0x009855f0 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x00985600 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ - 0x00985610 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ - 0x00985620 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x00985630 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ - 0x00985640 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00985650 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00985660 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00985670 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00985680 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00985690 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009856a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009856b0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009856c0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009856d0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009856e0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x009856f0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00985700 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00985710 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00985720 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00985730 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00985740 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00985750 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00985760 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00985770 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00985780 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00985790 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ - 0x009857a0 696e2076 65633420 765f6f66 66736574 in vec4 v_offset │ │ │ │ - 0x009857b0 303b200a 2020696e 20766563 3420765f 0; . in vec4 v_ │ │ │ │ - 0x009857c0 6f666673 6574313b 200a2020 696e2076 offset1; . in v │ │ │ │ - 0x009857d0 65633420 765f6f66 66736574 323b200a ec4 v_offset2; . │ │ │ │ - 0x009857e0 20206f75 74207665 63342076 5f467261 out vec4 v_Fra │ │ │ │ - 0x009857f0 67436f6c 6f723b20 0a202075 6e69666f gColor; . unifo │ │ │ │ - 0x00985800 726d2076 65633420 755f6672 616d6562 rm vec4 u_frameb │ │ │ │ - 0x00985810 75666665 724d6574 72696373 3b200a20 ufferMetrics; . │ │ │ │ - 0x00985820 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x00985830 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x00985840 2020756e 69666f72 6d207361 6d706c65 uniform sample │ │ │ │ - 0x00985850 72324420 755f736d 61614172 65613b20 r2D u_smaaArea; │ │ │ │ - 0x00985860 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x00985870 65723244 20755f73 6d616153 65617263 er2D u_smaaSearc │ │ │ │ - 0x00985880 683b200a 20202364 6566696e 6520534d h; . #define SM │ │ │ │ - 0x00985890 41415f53 45415243 48544558 5f53495a AA_SEARCHTEX_SIZ │ │ │ │ - 0x009858a0 45207665 63322836 362e302c 2033332e E vec2(66.0, 33. │ │ │ │ - 0x009858b0 3029200a 20202364 6566696e 6520534d 0) . #define SM │ │ │ │ - 0x009858c0 41415f53 45415243 48544558 5f504143 AA_SEARCHTEX_PAC │ │ │ │ - 0x009858d0 4b45445f 53495a45 20766563 32283634 KED_SIZE vec2(64 │ │ │ │ - 0x009858e0 2e302c20 31362e30 29200a20 20236465 .0, 16.0) . #de │ │ │ │ - 0x009858f0 66696e65 20534d41 415f4152 45415445 fine SMAA_AREATE │ │ │ │ - 0x00985900 585f4d41 585f4449 5354414e 43452031 X_MAX_DISTANCE 1 │ │ │ │ - 0x00985910 362e3020 0a202023 64656669 6e652053 6.0 . #define S │ │ │ │ - 0x00985920 4d41415f 41524541 5445585f 50495845 MAA_AREATEX_PIXE │ │ │ │ - 0x00985930 4c5f5349 5a452028 76656332 28312e30 L_SIZE (vec2(1.0 │ │ │ │ - 0x00985940 202f2032 35362e30 2c20312e 30202f20 / 256.0, 1.0 / │ │ │ │ - 0x00985950 31303234 2e302929 200a2020 23646566 1024.0)) . #def │ │ │ │ - 0x00985960 696e6520 534d4141 4c6f6f70 42656769 ine SMAALoopBegi │ │ │ │ - 0x00985970 6e28636f 6e646974 696f6e29 20776869 n(condition) whi │ │ │ │ - 0x00985980 6c652028 636f6e64 6974696f 6e29207b le (condition) { │ │ │ │ - 0x00985990 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ - 0x009859a0 4c6f6f70 456e6420 7d200a20 20236465 LoopEnd } . #de │ │ │ │ - 0x009859b0 66696e65 20534d41 4153616d 706c654c fine SMAASampleL │ │ │ │ - 0x009859c0 6576656c 5a65726f 28746578 2c20636f evelZero(tex, co │ │ │ │ - 0x009859d0 6f726429 20746578 74757265 4c6f6428 ord) textureLod( │ │ │ │ - 0x009859e0 7465782c 20636f6f 72642c20 302e3029 tex, coord, 0.0) │ │ │ │ - 0x009859f0 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ - 0x00985a00 53616d70 6c654c65 76656c5a 65726f4f SampleLevelZeroO │ │ │ │ - 0x00985a10 66667365 74287465 782c2063 6f6f7264 ffset(tex, coord │ │ │ │ - 0x00985a20 2c206f66 66736574 29207465 78747572 , offset) textur │ │ │ │ - 0x00985a30 654c6f64 4f666673 65742874 65782c20 eLodOffset(tex, │ │ │ │ - 0x00985a40 636f6f72 642c2030 2e302c20 6f666673 coord, 0.0, offs │ │ │ │ - 0x00985a50 65742920 0a202023 64656669 6e652053 et) . #define S │ │ │ │ - 0x00985a60 4d414152 6f756e64 28762920 726f756e MAARound(v) roun │ │ │ │ - 0x00985a70 64282876 2929200a 20202364 6566696e d((v)) . #defin │ │ │ │ - 0x00985a80 6520534d 41414f66 66736574 28782c79 e SMAAOffset(x,y │ │ │ │ - 0x00985a90 29206976 65633228 782c7929 200a2020 ) ivec2(x,y) . │ │ │ │ - 0x00985aa0 636f6e73 74207665 6332206b 41726561 const vec2 kArea │ │ │ │ - 0x00985ab0 5465784d 61784469 7374616e 6365203d TexMaxDistance = │ │ │ │ - 0x00985ac0 20766563 3228534d 41415f41 52454154 vec2(SMAA_AREAT │ │ │ │ - 0x00985ad0 45585f4d 41585f44 49535441 4e43452c EX_MAX_DISTANCE, │ │ │ │ - 0x00985ae0 20534d41 415f4152 45415445 585f4d41 SMAA_AREATEX_MA │ │ │ │ - 0x00985af0 585f4449 5354414e 4345293b 200a2020 X_DISTANCE); . │ │ │ │ - 0x00985b00 636f6e73 7420666c 6f617420 6b416374 const float kAct │ │ │ │ - 0x00985b10 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x00985b20 203d2030 2e383238 313b200a 2020666c = 0.8281; . fl │ │ │ │ - 0x00985b30 6f617420 534d4141 53656172 63684c65 oat SMAASearchLe │ │ │ │ - 0x00985b40 6e677468 28766563 3220652c 20666c6f ngth(vec2 e, flo │ │ │ │ - 0x00985b50 6174206f 66667365 7429200a 20207b20 at offset) . { │ │ │ │ - 0x00985b60 0a202020 20766563 32207363 616c6520 . vec2 scale │ │ │ │ - 0x00985b70 3d20534d 41415f53 45415243 48544558 = SMAA_SEARCHTEX │ │ │ │ - 0x00985b80 5f53495a 45202a20 76656332 28302e35 _SIZE * vec2(0.5 │ │ │ │ - 0x00985b90 2c202d31 2e30293b 200a2020 20207665 , -1.0); . ve │ │ │ │ - 0x00985ba0 63322062 69617320 3d20534d 41415f53 c2 bias = SMAA_S │ │ │ │ - 0x00985bb0 45415243 48544558 5f53495a 45202a20 EARCHTEX_SIZE * │ │ │ │ - 0x00985bc0 76656332 286f6666 7365742c 20312e30 vec2(offset, 1.0 │ │ │ │ - 0x00985bd0 293b200a 20202020 7363616c 65202b3d ); . scale += │ │ │ │ - 0x00985be0 20766563 32282d31 2e302c20 20312e30 vec2(-1.0, 1.0 │ │ │ │ - 0x00985bf0 293b200a 20202020 62696173 202b3d20 ); . bias += │ │ │ │ - 0x00985c00 76656332 2820302e 352c202d 302e3529 vec2( 0.5, -0.5) │ │ │ │ - 0x00985c10 3b200a20 20202073 63616c65 202a3d20 ; . scale *= │ │ │ │ - 0x00985c20 312e3020 2f20534d 41415f53 45415243 1.0 / SMAA_SEARC │ │ │ │ - 0x00985c30 48544558 5f504143 4b45445f 53495a45 HTEX_PACKED_SIZE │ │ │ │ - 0x00985c40 3b200a20 20202062 69617320 2a3d2031 ; . bias *= 1 │ │ │ │ - 0x00985c50 2e30202f 20534d41 415f5345 41524348 .0 / SMAA_SEARCH │ │ │ │ - 0x00985c60 5445585f 5041434b 45445f53 495a453b TEX_PACKED_SIZE; │ │ │ │ - 0x00985c70 200a2020 20207265 7475726e 20534d41 . return SMA │ │ │ │ - 0x00985c80 4153616d 706c654c 6576656c 5a65726f ASampleLevelZero │ │ │ │ - 0x00985c90 28755f73 6d616153 65617263 682c2073 (u_smaaSearch, s │ │ │ │ - 0x00985ca0 63616c65 202a2065 202b2062 69617329 cale * e + bias) │ │ │ │ - 0x00985cb0 2e723b20 0a20207d 200a2020 666c6f61 .r; . } . floa │ │ │ │ - 0x00985cc0 7420534d 41415365 61726368 584c6566 t SMAASearchXLef │ │ │ │ - 0x00985cd0 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ - 0x00985ce0 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ - 0x00985cf0 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ - 0x00985d00 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ - 0x00985d10 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ - 0x00985d20 6e287465 78636f6f 72642e78 203e2065 n(texcoord.x > e │ │ │ │ - 0x00985d30 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ - 0x00985d40 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x00985d50 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ - 0x00985d60 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ - 0x00985d70 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ - 0x00985d80 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ - 0x00985d90 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ - 0x00985da0 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ - 0x00985db0 2d322e30 2c20302e 3029202a 20755f66 -2.0, 0.0) * u_f │ │ │ │ - 0x00985dc0 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ - 0x00985dd0 732e7879 202b2074 6578636f 6f72643b s.xy + texcoord; │ │ │ │ - 0x00985de0 200a2020 2020534d 41414c6f 6f70456e . SMAALoopEn │ │ │ │ - 0x00985df0 64200a20 20202066 6c6f6174 206f6666 d . float off │ │ │ │ - 0x00985e00 73657420 3d20332e 3235202d 20283235 set = 3.25 - (25 │ │ │ │ - 0x00985e10 352e3020 2f203132 372e3029 202a2053 5.0 / 127.0) * S │ │ │ │ - 0x00985e20 4d414153 65617263 684c656e 67746828 MAASearchLength( │ │ │ │ - 0x00985e30 652c2030 2e30293b 200a2020 20207265 e, 0.0); . re │ │ │ │ - 0x00985e40 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ - 0x00985e50 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ - 0x00985e60 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x00985e70 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ - 0x00985e80 20534d41 41536561 72636858 52696768 SMAASearchXRigh │ │ │ │ - 0x00985e90 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ - 0x00985ea0 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ - 0x00985eb0 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ - 0x00985ec0 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ - 0x00985ed0 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ - 0x00985ee0 6e287465 78636f6f 72642e78 203c2065 n(texcoord.x < e │ │ │ │ - 0x00985ef0 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ - 0x00985f00 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ - 0x00985f10 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ - 0x00985f20 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ - 0x00985f30 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ - 0x00985f40 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ - 0x00985f50 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ - 0x00985f60 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ - 0x00985f70 322e302c 20302e30 29202a20 755f6672 2.0, 0.0) * u_fr │ │ │ │ - 0x00985f80 616d6562 75666665 724d6574 72696373 amebufferMetrics │ │ │ │ - 0x00985f90 2e787920 2b207465 78636f6f 72643b20 .xy + texcoord; │ │ │ │ - 0x00985fa0 0a202020 20534d41 414c6f6f 70456e64 . SMAALoopEnd │ │ │ │ - 0x00985fb0 200a2020 2020666c 6f617420 6f666673 . float offs │ │ │ │ - 0x00985fc0 6574203d 20332e32 35202d20 28323535 et = 3.25 - (255 │ │ │ │ - 0x00985fd0 2e30202f 20313237 2e302920 2a20534d .0 / 127.0) * SM │ │ │ │ - 0x00985fe0 41415365 61726368 4c656e67 74682865 AASearchLength(e │ │ │ │ - 0x00985ff0 2c20302e 35293b20 0a202020 20726574 , 0.5); . ret │ │ │ │ - 0x00986000 75726e20 2d755f66 72616d65 62756666 urn -u_framebuff │ │ │ │ - 0x00986010 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ - 0x00986020 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x00986030 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ - 0x00986040 20534d41 41536561 72636859 55702876 SMAASearchYUp(v │ │ │ │ - 0x00986050 65633220 74657863 6f6f7264 2c20666c ec2 texcoord, fl │ │ │ │ - 0x00986060 6f617420 656e6429 200a2020 7b200a20 oat end) . { . │ │ │ │ - 0x00986070 20202076 65633220 65203d20 76656332 vec2 e = vec2 │ │ │ │ - 0x00986080 28312e30 2c20302e 30293b20 0a202020 (1.0, 0.0); . │ │ │ │ - 0x00986090 20534d41 414c6f6f 70426567 696e2874 SMAALoopBegin(t │ │ │ │ - 0x009860a0 6578636f 6f72642e 79203e20 656e6420 excoord.y > end │ │ │ │ - 0x009860b0 26262065 2e72203e 206b4163 74697661 && e.r > kActiva │ │ │ │ - 0x009860c0 74696f6e 54687265 73686f6c 64202626 tionThreshold && │ │ │ │ - 0x009860d0 20652e67 203d3d20 302e3029 200a2020 e.g == 0.0) . │ │ │ │ - 0x009860e0 20202020 65203d20 534d4141 53616d70 e = SMAASamp │ │ │ │ - 0x009860f0 6c654c65 76656c5a 65726f28 755f636f leLevelZero(u_co │ │ │ │ - 0x00986100 6c6f7254 65782c20 74657863 6f6f7264 lorTex, texcoord │ │ │ │ - 0x00986110 292e7267 3b200a20 20202020 20746578 ).rg; . tex │ │ │ │ - 0x00986120 636f6f72 64203d20 76656332 28302e30 coord = vec2(0.0 │ │ │ │ - 0x00986130 2c202d32 2e302920 2a20755f 6672616d , -2.0) * u_fram │ │ │ │ - 0x00986140 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00986150 79202b20 74657863 6f6f7264 3b200a20 y + texcoord; . │ │ │ │ - 0x00986160 20202053 4d41414c 6f6f7045 6e64200a SMAALoopEnd . │ │ │ │ - 0x00986170 20202020 666c6f61 74206f66 66736574 float offset │ │ │ │ - 0x00986180 203d2033 2e323520 2d202832 35352e30 = 3.25 - (255.0 │ │ │ │ - 0x00986190 202f2031 32372e30 29202a20 534d4141 / 127.0) * SMAA │ │ │ │ - 0x009861a0 53656172 63684c65 6e677468 28652e67 SearchLength(e.g │ │ │ │ - 0x009861b0 722c2030 2e30293b 200a2020 20207265 r, 0.0); . re │ │ │ │ - 0x009861c0 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ - 0x009861d0 65724d65 74726963 732e7920 2a206f66 erMetrics.y * of │ │ │ │ - 0x009861e0 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ - 0x009861f0 793b200a 20207d20 0a202066 6c6f6174 y; . } . float │ │ │ │ - 0x00986200 20534d41 41536561 72636859 446f776e SMAASearchYDown │ │ │ │ - 0x00986210 28766563 32207465 78636f6f 72642c20 (vec2 texcoord, │ │ │ │ - 0x00986220 666c6f61 7420656e 6429200a 20207b20 float end) . { │ │ │ │ - 0x00986230 0a202020 20766563 32206520 3d207665 . vec2 e = ve │ │ │ │ - 0x00986240 63322831 2e302c20 302e3029 3b200a20 c2(1.0, 0.0); . │ │ │ │ - 0x00986250 20202053 4d41414c 6f6f7042 6567696e SMAALoopBegin │ │ │ │ - 0x00986260 28746578 636f6f72 642e7920 3c20656e (texcoord.y < en │ │ │ │ - 0x00986270 64202626 20652e72 203e206b 41637469 d && e.r > kActi │ │ │ │ - 0x00986280 76617469 6f6e5468 72657368 6f6c6420 vationThreshold │ │ │ │ - 0x00986290 26262065 2e67203d 3d20302e 3029200a && e.g == 0.0) . │ │ │ │ - 0x009862a0 20202020 20206520 3d20534d 41415361 e = SMAASa │ │ │ │ - 0x009862b0 6d706c65 4c657665 6c5a6572 6f28755f mpleLevelZero(u_ │ │ │ │ - 0x009862c0 636f6c6f 72546578 2c207465 78636f6f colorTex, texcoo │ │ │ │ - 0x009862d0 7264292e 72673b20 0a202020 20202074 rd).rg; . t │ │ │ │ - 0x009862e0 6578636f 6f726420 3d207665 63322830 excoord = vec2(0 │ │ │ │ - 0x009862f0 2e302c20 322e3029 202a2075 5f667261 .0, 2.0) * u_fra │ │ │ │ - 0x00986300 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ - 0x00986310 7879202b 20746578 636f6f72 643b200a xy + texcoord; . │ │ │ │ - 0x00986320 20202020 534d4141 4c6f6f70 456e6420 SMAALoopEnd │ │ │ │ - 0x00986330 0a202020 20666c6f 6174206f 66667365 . float offse │ │ │ │ - 0x00986340 74203d20 332e3235 202d2028 3235352e t = 3.25 - (255. │ │ │ │ - 0x00986350 30202f20 3132372e 3029202a 20534d41 0 / 127.0) * SMA │ │ │ │ - 0x00986360 41536561 7263684c 656e6774 6828652e ASearchLength(e. │ │ │ │ - 0x00986370 67722c20 302e3529 3b200a20 20202072 gr, 0.5); . r │ │ │ │ - 0x00986380 65747572 6e202d75 5f667261 6d656275 eturn -u_framebu │ │ │ │ - 0x00986390 66666572 4d657472 6963732e 79202a20 fferMetrics.y * │ │ │ │ - 0x009863a0 6f666673 6574202b 20746578 636f6f72 offset + texcoor │ │ │ │ - 0x009863b0 642e793b 200a2020 7d200a20 20766563 d.y; . } . vec │ │ │ │ - 0x009863c0 3220534d 41414172 65612876 65633220 2 SMAAArea(vec2 │ │ │ │ - 0x009863d0 64697374 2c20666c 6f617420 65312c20 dist, float e1, │ │ │ │ - 0x009863e0 666c6f61 74206532 29200a20 207b200a float e2) . { . │ │ │ │ - 0x009863f0 20202020 76656332 20746578 636f6f72 vec2 texcoor │ │ │ │ - 0x00986400 64203d20 6b417265 61546578 4d617844 d = kAreaTexMaxD │ │ │ │ - 0x00986410 69737461 6e636520 2a20534d 4141526f istance * SMAARo │ │ │ │ - 0x00986420 756e6428 342e3020 2a207665 63322865 und(4.0 * vec2(e │ │ │ │ - 0x00986430 312c2065 32292920 2b206469 73743b20 1, e2)) + dist; │ │ │ │ - 0x00986440 0a202020 20746578 636f6f72 64203d20 . texcoord = │ │ │ │ - 0x00986450 534d4141 5f415245 41544558 5f504958 SMAA_AREATEX_PIX │ │ │ │ - 0x00986460 454c5f53 495a4520 2a202874 6578636f EL_SIZE * (texco │ │ │ │ - 0x00986470 6f726420 2b20302e 35293b20 0a202020 ord + 0.5); . │ │ │ │ - 0x00986480 20726574 75726e20 534d4141 53616d70 return SMAASamp │ │ │ │ - 0x00986490 6c654c65 76656c5a 65726f28 755f736d leLevelZero(u_sm │ │ │ │ - 0x009864a0 61614172 65612c20 74657863 6f6f7264 aaArea, texcoord │ │ │ │ - 0x009864b0 292e7267 3b200a20 207d200a 2020636f ).rg; . } . co │ │ │ │ - 0x009864c0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x009864d0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x009864e0 30302e30 3b200a20 20766f69 64206d61 00.0; . void ma │ │ │ │ - 0x009864f0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ - 0x00986500 65633420 77656967 68747320 3d207665 ec4 weights = ve │ │ │ │ - 0x00986510 63342830 2e302c20 302e302c 20302e30 c4(0.0, 0.0, 0.0 │ │ │ │ - 0x00986520 2c20302e 30293b20 0a202020 20766563 , 0.0); . vec │ │ │ │ - 0x00986530 32206520 3d207465 78747572 6528755f 2 e = texture(u_ │ │ │ │ - 0x00986540 636f6c6f 72546578 2c20765f 636f6f72 colorTex, v_coor │ │ │ │ - 0x00986550 64732e78 79292e72 673b200a 20202020 ds.xy).rg; . │ │ │ │ - 0x00986560 69662028 652e6720 3e20302e 3029202f if (e.g > 0.0) / │ │ │ │ - 0x00986570 2f204564 67652061 74206e6f 72746820 / Edge at north │ │ │ │ - 0x00986580 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ - 0x00986590 63322064 3b200a20 20202020 20766563 c2 d; . vec │ │ │ │ - 0x009865a0 3320636f 6f726473 3b200a20 20202020 3 coords; . │ │ │ │ - 0x009865b0 20636f6f 7264732e 78203d20 534d4141 coords.x = SMAA │ │ │ │ - 0x009865c0 53656172 6368584c 65667428 765f6f66 SearchXLeft(v_of │ │ │ │ - 0x009865d0 66736574 302e7879 2c20765f 6f666673 fset0.xy, v_offs │ │ │ │ - 0x009865e0 6574322e 78293b20 0a202020 20202063 et2.x); . c │ │ │ │ - 0x009865f0 6f6f7264 732e7920 3d20765f 6f666673 oords.y = v_offs │ │ │ │ - 0x00986600 6574312e 793b200a 20202020 2020642e et1.y; . d. │ │ │ │ - 0x00986610 78203d20 636f6f72 64732e78 3b200a20 x = coords.x; . │ │ │ │ - 0x00986620 20202020 20666c6f 61742065 31203d20 float e1 = │ │ │ │ - 0x00986630 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ - 0x00986640 65726f28 755f636f 6c6f7254 65782c20 ero(u_colorTex, │ │ │ │ - 0x00986650 636f6f72 64732e78 79292e72 3b200a20 coords.xy).r; . │ │ │ │ - 0x00986660 20202020 20636f6f 7264732e 7a203d20 coords.z = │ │ │ │ - 0x00986670 534d4141 53656172 63685852 69676874 SMAASearchXRight │ │ │ │ - 0x00986680 28765f6f 66667365 74302e7a 772c2076 (v_offset0.zw, v │ │ │ │ - 0x00986690 5f6f6666 73657432 2e79293b 200a2020 _offset2.y); . │ │ │ │ - 0x009866a0 20202020 642e7920 3d20636f 6f726473 d.y = coords │ │ │ │ - 0x009866b0 2e7a3b20 0a202020 20202076 65633220 .z; . vec2 │ │ │ │ - 0x009866c0 7a7a203d 20755f66 72616d65 62756666 zz = u_framebuff │ │ │ │ - 0x009866d0 65724d65 74726963 732e7a7a 3b200a20 erMetrics.zz; . │ │ │ │ - 0x009866e0 20202020 2064203d 20616273 28534d41 d = abs(SMA │ │ │ │ - 0x009866f0 41526f75 6e64287a 7a202a20 64202d20 ARound(zz * d - │ │ │ │ - 0x00986700 765f636f 6f726473 2e7a7a29 293b200a v_coords.zz)); . │ │ │ │ - 0x00986710 20202020 20207665 63322073 7172745f vec2 sqrt_ │ │ │ │ - 0x00986720 64203d20 73717274 2864293b 200a2020 d = sqrt(d); . │ │ │ │ - 0x00986730 20202020 666c6f61 74206532 203d2053 float e2 = S │ │ │ │ - 0x00986740 4d414153 616d706c 654c6576 656c5a65 MAASampleLevelZe │ │ │ │ - 0x00986750 726f4f66 66736574 28755f63 6f6c6f72 roOffset(u_color │ │ │ │ - 0x00986760 5465782c 20636f6f 7264732e 7a792c20 Tex, coords.zy, │ │ │ │ - 0x00986770 534d4141 4f666673 65742831 2c203029 SMAAOffset(1, 0) │ │ │ │ - 0x00986780 292e723b 200a2020 20202020 77656967 ).r; . weig │ │ │ │ - 0x00986790 6874732e 7267203d 20534d41 41417265 hts.rg = SMAAAre │ │ │ │ - 0x009867a0 61287371 72745f64 2c206531 2c206532 a(sqrt_d, e1, e2 │ │ │ │ - 0x009867b0 293b200a 20202020 7d200a20 20202069 ); . } . i │ │ │ │ - 0x009867c0 66202865 2e72203e 20302e30 29202f2f f (e.r > 0.0) // │ │ │ │ - 0x009867d0 20456467 65206174 20776573 74200a20 Edge at west . │ │ │ │ - 0x009867e0 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ - 0x009867f0 20643b20 0a202020 20202076 65633320 d; . vec3 │ │ │ │ - 0x00986800 636f6f72 64733b20 0a202020 20202063 coords; . c │ │ │ │ - 0x00986810 6f6f7264 732e7920 3d20534d 41415365 oords.y = SMAASe │ │ │ │ - 0x00986820 61726368 59557028 765f6f66 66736574 archYUp(v_offset │ │ │ │ - 0x00986830 312e7879 2c20765f 6f666673 6574322e 1.xy, v_offset2. │ │ │ │ - 0x00986840 7a293b20 0a202020 20202063 6f6f7264 z); . coord │ │ │ │ - 0x00986850 732e7820 3d20765f 6f666673 6574302e s.x = v_offset0. │ │ │ │ - 0x00986860 783b200a 20202020 2020642e 78203d20 x; . d.x = │ │ │ │ - 0x00986870 636f6f72 64732e79 3b200a20 20202020 coords.y; . │ │ │ │ - 0x00986880 20666c6f 61742065 31203d20 534d4141 float e1 = SMAA │ │ │ │ - 0x00986890 53616d70 6c654c65 76656c5a 65726f28 SampleLevelZero( │ │ │ │ - 0x009868a0 755f636f 6c6f7254 65782c20 636f6f72 u_colorTex, coor │ │ │ │ - 0x009868b0 64732e78 79292e67 3b200a20 20202020 ds.xy).g; . │ │ │ │ - 0x009868c0 20636f6f 7264732e 7a203d20 534d4141 coords.z = SMAA │ │ │ │ - 0x009868d0 53656172 63685944 6f776e28 765f6f66 SearchYDown(v_of │ │ │ │ - 0x009868e0 66736574 312e7a77 2c20765f 6f666673 fset1.zw, v_offs │ │ │ │ - 0x009868f0 6574322e 77293b20 0a202020 20202064 et2.w); . d │ │ │ │ - 0x00986900 2e79203d 20636f6f 7264732e 7a3b200a .y = coords.z; . │ │ │ │ - 0x00986910 20202020 20207665 63322077 77203d20 vec2 ww = │ │ │ │ - 0x00986920 755f6672 616d6562 75666665 724d6574 u_framebufferMet │ │ │ │ - 0x00986930 72696373 2e77773b 200a2020 20202020 rics.ww; . │ │ │ │ - 0x00986940 64203d20 61627328 534d4141 526f756e d = abs(SMAARoun │ │ │ │ - 0x00986950 64287777 202a2064 202d2076 5f636f6f d(ww * d - v_coo │ │ │ │ - 0x00986960 7264732e 77772929 3b200a20 20202020 rds.ww)); . │ │ │ │ - 0x00986970 20766563 32207371 72745f64 203d2073 vec2 sqrt_d = s │ │ │ │ - 0x00986980 71727428 64293b20 0a202020 20202066 qrt(d); . f │ │ │ │ - 0x00986990 6c6f6174 20653220 3d20534d 41415361 loat e2 = SMAASa │ │ │ │ - 0x009869a0 6d706c65 4c657665 6c5a6572 6f4f6666 mpleLevelZeroOff │ │ │ │ - 0x009869b0 73657428 755f636f 6c6f7254 65782c20 set(u_colorTex, │ │ │ │ - 0x009869c0 636f6f72 64732e78 7a2c2053 4d41414f coords.xz, SMAAO │ │ │ │ - 0x009869d0 66667365 7428302c 20312929 2e673b20 ffset(0, 1)).g; │ │ │ │ - 0x009869e0 0a202020 20202077 65696768 74732e62 . weights.b │ │ │ │ - 0x009869f0 61203d20 534d4141 41726561 28737172 a = SMAAArea(sqr │ │ │ │ - 0x00986a00 745f642c 2065312c 20653229 3b200a20 t_d, e1, e2); . │ │ │ │ - 0x00986a10 2020207d 200a2020 2020765f 46726167 } . v_Frag │ │ │ │ - 0x00986a20 436f6c6f 72203d20 77656967 6874733b Color = weights; │ │ │ │ - 0x00986a30 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x00986a40 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00986a50 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00986a60 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00986a70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00986a80 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00986a90 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00986aa0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00986ab0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00986ac0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00986ad0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00986ae0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00986af0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00986b00 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00986b10 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00986b20 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00986b30 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00986b40 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00986b50 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00986b60 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00986b70 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00986b80 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x00986b90 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ - 0x00986ba0 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ - 0x00986bb0 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ - 0x00986bc0 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ - 0x00986bd0 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ - 0x00986be0 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ - 0x00986bf0 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ - 0x00986c00 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00986c10 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ - 0x00986c20 65747269 63733b20 0a202023 64656669 etrics; . #defi │ │ │ │ - 0x00986c30 6e652053 4d41415f 4d41585f 53454152 ne SMAA_MAX_SEAR │ │ │ │ - 0x00986c40 43485f53 54455053 20382e30 200a2020 CH_STEPS 8.0 . │ │ │ │ - 0x00986c50 636f6e73 74207665 6334206b 4d617853 const vec4 kMaxS │ │ │ │ - 0x00986c60 65617263 68537465 7073203d 20766563 earchSteps = vec │ │ │ │ - 0x00986c70 34282d32 2e30202a 20534d41 415f4d41 4(-2.0 * SMAA_MA │ │ │ │ - 0x00986c80 585f5345 41524348 5f535445 50532c20 X_SEARCH_STEPS, │ │ │ │ - 0x00986c90 322e3020 2a20534d 41415f4d 41585f53 2.0 * SMAA_MAX_S │ │ │ │ - 0x00986ca0 45415243 485f5354 4550532c 200a2020 EARCH_STEPS, . │ │ │ │ - 0x00986cb0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00986cc0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00986cd0 20202d32 2e30202a 20534d41 415f4d41 -2.0 * SMAA_MA │ │ │ │ - 0x00986ce0 585f5345 41524348 5f535445 50532c20 X_SEARCH_STEPS, │ │ │ │ - 0x00986cf0 322e3020 202a2053 4d41415f 4d41585f 2.0 * SMAA_MAX_ │ │ │ │ - 0x00986d00 53454152 43485f53 54455053 293b200a SEARCH_STEPS); . │ │ │ │ - 0x00986d10 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ - 0x00986d20 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ - 0x00986d30 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ - 0x00986d40 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ - 0x00986d50 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00986d60 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00986d70 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00986d80 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ - 0x00986d90 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00986da0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00986db0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ - 0x00986dc0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00986dd0 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ - 0x00986de0 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ - 0x00986df0 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ - 0x00986e00 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ - 0x00986e10 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ - 0x00986e20 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ - 0x00986e30 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00986e40 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ - 0x00986e50 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ - 0x00986e60 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ - 0x00986e70 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ - 0x00986e80 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ - 0x00986e90 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ - 0x00986ea0 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ - 0x00986eb0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ - 0x00986ec0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00986ed0 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ - 0x00986ee0 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ - 0x00986ef0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00986f00 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ - 0x00986f10 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ - 0x00986f20 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ - 0x00986f30 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ - 0x00986f40 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x00986f50 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x00986f60 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x00986f70 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ - 0x00986f80 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ - 0x00986f90 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ - 0x00986fa0 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ - 0x00986fb0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00986fc0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00986fd0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00986fe0 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ - 0x00986ff0 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ - 0x00987000 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ - 0x00987010 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ - 0x00987020 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ - 0x00987030 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ - 0x00987040 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x00987050 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ - 0x00987060 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ - 0x00987070 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00987080 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ - 0x00987090 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ - 0x009870a0 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ - 0x009870b0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ - 0x009870c0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x009870d0 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ - 0x009870e0 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ - 0x009870f0 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ - 0x00987100 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ - 0x00987110 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ - 0x00987120 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00987130 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ - 0x00987140 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ - 0x00987150 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x00987160 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ - 0x00987170 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ - 0x00987180 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ - 0x00987190 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ - 0x009871a0 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ - 0x009871b0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ - 0x009871c0 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ - 0x009871d0 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ - 0x009871e0 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ - 0x009871f0 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ - 0x00987200 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ - 0x00987210 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ - 0x00987220 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ - 0x00987230 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00987240 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ - 0x00987250 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ - 0x00987260 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ - 0x00987270 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ - 0x00987280 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00987290 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ - 0x009872a0 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ - 0x009872b0 2020765f 636f6f72 6473203d 20766563 v_coords = vec │ │ │ │ - 0x009872c0 3428615f 74636f6f 72642c20 615f7463 4(a_tcoord, a_tc │ │ │ │ - 0x009872d0 6f6f7264 202a2075 5f667261 6d656275 oord * u_framebu │ │ │ │ - 0x009872e0 66666572 4d657472 6963732e 7a77293b fferMetrics.zw); │ │ │ │ - 0x009872f0 200a2020 2020765f 6f666673 65743020 . v_offset0 │ │ │ │ - 0x00987300 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ - 0x00987310 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ - 0x00987320 6334282d 302e3235 2c202d30 2e313235 c4(-0.25, -0.125 │ │ │ │ - 0x00987330 2c20312e 32352c20 2d302e31 32352920 , 1.25, -0.125) │ │ │ │ - 0x00987340 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ - 0x00987350 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ - 0x00987360 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ - 0x00987370 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ - 0x00987380 6334282d 302e3132 352c202d 302e3235 c4(-0.125, -0.25 │ │ │ │ - 0x00987390 2c202d30 2e313235 2c20312e 32352920 , -0.125, 1.25) │ │ │ │ - 0x009873a0 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ - 0x009873b0 200a2020 2020765f 6f666673 65743220 . v_offset2 │ │ │ │ - 0x009873c0 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ - 0x009873d0 65747269 63732e78 78797920 2a206b4d etrics.xxyy * kM │ │ │ │ - 0x009873e0 61785365 61726368 53746570 73202b20 axSearchSteps + │ │ │ │ - 0x009873f0 76656334 28765f6f 66667365 74302e78 vec4(v_offset0.x │ │ │ │ - 0x00987400 7a2c2076 5f6f6666 73657431 2e797729 z, v_offset1.yw) │ │ │ │ - 0x00987410 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x00987420 6f6e203d 20766563 3428615f 706f732c on = vec4(a_pos, │ │ │ │ - 0x00987430 20302e30 2c20312e 30293b20 0a20207d 0.0, 1.0); . } │ │ │ │ - 0x00987440 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x00987450 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00987460 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00987470 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00987480 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00987490 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x009874a0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x009874b0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x009874c0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x009874d0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009874e0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009874f0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00987500 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00987510 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00987520 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00987530 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00987540 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00987550 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00987560 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00987570 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00987580 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00987590 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x009875a0 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ - 0x009875b0 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ - 0x009875c0 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x009875d0 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ - 0x009875e0 20765f6f 66667365 74303b20 0a20206f v_offset0; . o │ │ │ │ - 0x009875f0 75742076 65633420 765f6f66 66736574 ut vec4 v_offset │ │ │ │ - 0x00987600 313b200a 20206f75 74207665 63342076 1; . out vec4 v │ │ │ │ - 0x00987610 5f6f6666 73657432 3b200a20 20756e69 _offset2; . uni │ │ │ │ - 0x00987620 666f726d 20766563 3420755f 6672616d form vec4 u_fram │ │ │ │ - 0x00987630 65627566 6665724d 65747269 63733b20 ebufferMetrics; │ │ │ │ - 0x00987640 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x00987650 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x00987660 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x00987670 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x00987680 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00987690 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x009876a0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x009876b0 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x009876c0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x009876d0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x009876e0 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x009876f0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00987700 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x00987710 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x00987720 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x00987730 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x00987740 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x00987750 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x00987760 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x00987770 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x00987780 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00987790 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x009877a0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x009877b0 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x009877c0 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x009877d0 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x009877e0 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x009877f0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00987800 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00987810 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00987820 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00987830 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x00987840 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x00987850 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x00987860 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00987870 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00987880 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00987890 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x009878a0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x009878b0 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x009878c0 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x009878d0 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x009878e0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x009878f0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00987900 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00987910 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00987920 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00987930 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x00987940 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x00987950 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x00987960 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x00987970 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00987980 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00987990 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x009879a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009879b0 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x009879c0 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x009879d0 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x009879e0 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x009879f0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00987a00 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00987a10 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00987a20 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00987a30 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x00987a40 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x00987a50 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00987a60 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x00987a70 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00987a80 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00987a90 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00987aa0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00987ab0 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00987ac0 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00987ad0 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00987ae0 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00987af0 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00987b00 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00987b10 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00987b20 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00987b30 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x00987b40 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x00987b50 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x00987b60 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x00987b70 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00987b80 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00987b90 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00987ba0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00987bb0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00987bc0 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00987bd0 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00987be0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00987bf0 72647320 3d20615f 74636f6f 72643b20 rds = a_tcoord; │ │ │ │ - 0x00987c00 0a202020 20765f6f 66667365 7430203d . v_offset0 = │ │ │ │ - 0x00987c10 20755f66 72616d65 62756666 65724d65 u_framebufferMe │ │ │ │ - 0x00987c20 74726963 732e7879 7879202a 20766563 trics.xyxy * vec │ │ │ │ - 0x00987c30 34282d31 2e302c20 302e302c 20302e30 4(-1.0, 0.0, 0.0 │ │ │ │ - 0x00987c40 2c202d31 2e302920 2b20615f 74636f6f , -1.0) + a_tcoo │ │ │ │ - 0x00987c50 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ - 0x00987c60 6f666673 65743120 3d20755f 6672616d offset1 = u_fram │ │ │ │ - 0x00987c70 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00987c80 79787920 2a207665 63342820 312e302c yxy * vec4( 1.0, │ │ │ │ - 0x00987c90 20302e30 2c20302e 302c2020 312e3029 0.0, 0.0, 1.0) │ │ │ │ - 0x00987ca0 202b2061 5f74636f 6f72642e 78797879 + a_tcoord.xyxy │ │ │ │ - 0x00987cb0 3b200a20 20202076 5f6f6666 73657432 ; . v_offset2 │ │ │ │ - 0x00987cc0 203d2075 5f667261 6d656275 66666572 = u_framebuffer │ │ │ │ - 0x00987cd0 4d657472 6963732e 78797879 202a2076 Metrics.xyxy * v │ │ │ │ - 0x00987ce0 65633428 2d322e30 2c20302e 302c2030 ec4(-2.0, 0.0, 0 │ │ │ │ - 0x00987cf0 2e302c20 2d322e30 29202b20 615f7463 .0, -2.0) + a_tc │ │ │ │ - 0x00987d00 6f6f7264 2e787978 793b200a 20202020 oord.xyxy; . │ │ │ │ - 0x00987d10 676c5f50 6f736974 696f6e20 3d207665 gl_Position = ve │ │ │ │ - 0x00987d20 63342861 5f706f73 2c20302e 302c2031 c4(a_pos, 0.0, 1 │ │ │ │ - 0x00987d30 2e30293b 200a2020 7d200a00 00000000 .0); . } ...... │ │ │ │ - 0x00987d40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00987d50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00987d60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00987d70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00987d80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00987d90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00987da0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00987db0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00987dc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00987dd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00987de0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00987df0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00987e00 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00987e10 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00987e20 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00987e30 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00987e40 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00987e50 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00987e60 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00987e70 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00987e80 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00987e90 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ - 0x00987ea0 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ - 0x00987eb0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x00987ec0 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00987ed0 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ - 0x00987ee0 743b200a 2020756e 69666f72 6d207665 t; . uniform ve │ │ │ │ - 0x00987ef0 63342075 5f667261 6d656275 66666572 c4 u_framebuffer │ │ │ │ - 0x00987f00 4d657472 6963733b 200a2020 636f6e73 Metrics; . cons │ │ │ │ - 0x00987f10 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00987f20 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00987f30 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00987f40 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00987f50 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00987f60 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00987f70 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00987f80 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00987f90 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00987fa0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x00987fb0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x00987fc0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x00987fd0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00987fe0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x00987ff0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00988000 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00988010 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00988020 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00988030 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00988040 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00988050 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00988060 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00988070 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00988080 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00988090 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x009880a0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x009880b0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x009880c0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x009880d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009880e0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x009880f0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00988100 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00988110 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00988120 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00988130 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00988140 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00988150 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00988160 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00988170 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00988180 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00988190 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x009881a0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x009881b0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x009881c0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x009881d0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x009881e0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x009881f0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00988200 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00988210 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00988220 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00988230 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00988240 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00988250 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00988260 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00988270 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00988280 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00988290 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x009882a0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x009882b0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x009882c0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x009882d0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x009882e0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x009882f0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00988300 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00988310 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00988320 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00988330 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00988340 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00988350 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00988360 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00988370 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00988380 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00988390 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x009883a0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x009883b0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x009883c0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x009883d0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x009883e0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x009883f0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00988400 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00988410 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00988420 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00988430 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00988440 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00988450 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00988460 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00988470 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00988480 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00988490 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x009884a0 29200a20 207b200a 20202020 765f636f ) . { . v_co │ │ │ │ - 0x009884b0 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x009884c0 5f74636f 6f72643b 200a2020 2020765f _tcoord; . v_ │ │ │ │ - 0x009884d0 6f666673 6574203d 20755f66 72616d65 offset = u_frame │ │ │ │ - 0x009884e0 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ - 0x009884f0 7879202a 20766563 3428312e 302c2030 xy * vec4(1.0, 0 │ │ │ │ - 0x00988500 2e302c20 302e302c 20312e30 29202b20 .0, 0.0, 1.0) + │ │ │ │ - 0x00988510 615f7463 6f6f7264 2e787978 793b200a a_tcoord.xyxy; . │ │ │ │ - 0x00988520 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00988530 3d207665 63342861 5f706f73 2c20302e = vec4(a_pos, 0. │ │ │ │ - 0x00988540 302c2031 2e30293b 200a2020 7d200a00 0, 1.0); . } .. │ │ │ │ - 0x00988550 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00988560 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00988570 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00988580 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00988590 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009885a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009885b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009885c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009885d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009885e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009885f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00988600 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00988610 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00988620 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00988630 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00988640 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00988650 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00988660 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00988670 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00988680 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00988690 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009886a0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x009886b0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x009886c0 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ - 0x009886d0 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ - 0x009886e0 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ - 0x009886f0 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ - 0x00988700 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x00988710 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ - 0x00988720 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ - 0x00988730 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ - 0x00988740 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ - 0x00988750 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ - 0x00988760 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x00988770 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ - 0x00988780 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x00988790 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x009887a0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x009887b0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x009887c0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x009887d0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x009887e0 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x009887f0 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x00988800 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00988810 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00988820 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00988830 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x00988840 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x00988850 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00988860 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x00988870 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x00988880 5f565446 200a2020 756e6966 6f726d20 _VTF . uniform │ │ │ │ - 0x00988890 73616d70 6c657232 4420755f 636f6c6f sampler2D u_colo │ │ │ │ - 0x009888a0 72546578 3b200a20 2023656e 64696620 rTex; . #endif │ │ │ │ - 0x009888b0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x009888c0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x009888d0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x009888e0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x009888f0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00988900 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00988910 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00988920 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00988930 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00988940 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00988950 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00988960 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00988970 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x00988980 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x00988990 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x009889a0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x009889b0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x009889c0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x009889d0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x009889e0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x009889f0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00988a00 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00988a10 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00988a20 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00988a30 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00988a40 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00988a50 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00988a60 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00988a70 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00988a80 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00988a90 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00988aa0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x00988ab0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x00988ac0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x00988ad0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00988ae0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00988af0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00988b00 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00988b10 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00988b20 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00988b30 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00988b40 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00988b50 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00988b60 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00988b70 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00988b80 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00988b90 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00988ba0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x00988bb0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x00988bc0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x00988bd0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x00988be0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00988bf0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00988c00 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00988c10 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00988c20 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00988c30 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00988c40 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00988c50 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00988c60 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00988c70 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00988c80 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00988c90 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00988ca0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x00988cb0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x00988cc0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00988cd0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x00988ce0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00988cf0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00988d00 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00988d10 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00988d20 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00988d30 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00988d40 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00988d50 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00988d60 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00988d70 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00988d80 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00988d90 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00988da0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x00988db0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x00988dc0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x00988dd0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x00988de0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00988df0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00988e00 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00988e10 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00988e20 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00988e30 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00988e40 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00988e50 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x00988e60 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x00988e70 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ - 0x00988e80 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ - 0x00988e90 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ - 0x00988ea0 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ - 0x00988eb0 302e3029 202b2070 6f733b20 0a202020 0.0) + pos; . │ │ │ │ - 0x00988ec0 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ - 0x00988ed0 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00988ee0 726d2873 68696674 6564506f 73202a20 rm(shiftedPos * │ │ │ │ - 0x00988ef0 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ - 0x00988f00 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00988f10 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00988f20 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ - 0x00988f30 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ - 0x00988f40 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ - 0x00988f50 636f6c6f 72546578 436f6f72 64293b20 colorTexCoord); │ │ │ │ - 0x00988f60 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ - 0x00988f70 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ - 0x00988f80 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ - 0x00988f90 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x00988fa0 765f6d61 736b5465 78436f6f 7264203d v_maskTexCoord = │ │ │ │ - 0x00988fb0 20615f6d 61736b54 6578436f 6f72643b a_maskTexCoord; │ │ │ │ - 0x00988fc0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x00988fd0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00988fe0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00988ff0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00989000 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00989010 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00989020 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00989030 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00989040 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00989050 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00989060 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00989070 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00989080 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00989090 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009890a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009890b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009890c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009890d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009890e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009890f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00989100 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00989110 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ - 0x00989120 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ - 0x00989130 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ - 0x00989140 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x00989150 3420615f 706f7369 74696f6e 3b200a20 4 a_position; . │ │ │ │ - 0x00989160 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ - 0x00989170 6c3b200a 20202369 66646566 20454e41 l; . #ifdef ENA │ │ │ │ - 0x00989180 424c455f 56544620 0a20206f 7574204c BLE_VTF . out L │ │ │ │ - 0x00989190 4f575f50 20766563 3420765f 636f6c6f OW_P vec4 v_colo │ │ │ │ - 0x009891a0 723b200a 20202365 6c736520 0a20206f r; . #else . o │ │ │ │ - 0x009891b0 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ - 0x009891c0 6578436f 6f72643b 200a2020 23656e64 exCoord; . #end │ │ │ │ - 0x009891d0 6966200a 20206f75 74207665 63322076 if . out vec2 v │ │ │ │ - 0x009891e0 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ - 0x009891f0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00989200 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00989210 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00989220 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00989230 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00989240 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00989250 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00989260 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x00989270 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00989280 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x00989290 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x009892a0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x009892b0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x009892c0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x009892d0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x009892e0 6e655061 73733b20 0a202075 6e69666f nePass; . unifo │ │ │ │ - 0x009892f0 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ - 0x00989300 6f6c6f72 5465783b 200a2020 636f6e73 olorTex; . cons │ │ │ │ - 0x00989310 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x00989320 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x00989330 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x00989340 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00989350 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00989360 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x00989370 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x00989380 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x00989390 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x009893a0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x009893b0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x009893c0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x009893d0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x009893e0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x009893f0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00989400 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00989410 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00989420 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x00989430 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00989440 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x00989450 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x00989460 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x00989470 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00989480 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x00989490 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x009894a0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x009894b0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x009894c0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x009894d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009894e0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x009894f0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00989500 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00989510 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x00989520 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x00989530 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00989540 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00989550 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00989560 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x00989570 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x00989580 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x00989590 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x009895a0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x009895b0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x009895c0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x009895d0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x009895e0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x009895f0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x00989600 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x00989610 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00989620 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x00989630 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x00989640 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x00989650 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00989660 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x00989670 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x00989680 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x00989690 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x009896a0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x009896b0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x009896c0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x009896d0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x009896e0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x009896f0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x00989700 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x00989710 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x00989720 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00989730 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x00989740 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x00989750 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x00989760 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x00989770 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x00989780 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x00989790 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x009897a0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x009897b0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x009897c0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x009897d0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x009897e0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x009897f0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x00989800 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00989810 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x00989820 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x00989830 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x00989840 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x00989850 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x00989860 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x00989870 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x00989880 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00989890 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x009898a0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x009898b0 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ - 0x009898c0 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ - 0x009898d0 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ - 0x009898e0 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ - 0x009898f0 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ - 0x00989900 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ - 0x00989910 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00989920 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00989930 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00989940 69766f74 5472616e 73666f72 6d287069 ivotTransform(pi │ │ │ │ - 0x00989950 766f7420 2a20755f 70726f6a 65637469 vot * u_projecti │ │ │ │ - 0x00989960 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ - 0x00989970 666f726d 2c200a20 20202020 20202020 form, . │ │ │ │ - 0x00989980 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00989990 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009899a0 20202020 2020615f 706f7369 74696f6e a_position │ │ │ │ - 0x009899b0 2e77202a 20755f7a 5363616c 652c206f .w * u_zScale, o │ │ │ │ - 0x009899c0 66667365 742e7879 293b200a 20202369 ffset.xy); . #i │ │ │ │ - 0x009899d0 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x009899e0 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ - 0x009899f0 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ - 0x00989a00 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ - 0x00989a10 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ - 0x00989a20 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00989a30 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ - 0x00989a40 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x00989a50 0a202020 20765f6d 61736b54 6578436f . v_maskTexCo │ │ │ │ - 0x00989a60 6f726420 3d20615f 6d61736b 54657843 ord = a_maskTexC │ │ │ │ - 0x00989a70 6f6f7264 3b200a20 207d200a 00000000 oord; . } ..... │ │ │ │ - 0x00989a80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00989a90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00989aa0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00989ab0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00989ac0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00989ad0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00989ae0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00989af0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00989b00 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00989b10 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00989b20 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00989b30 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00989b40 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00989b50 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00989b60 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00989b70 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00989b80 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00989b90 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00989ba0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00989bb0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00989bc0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00989bd0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x00989be0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x00989bf0 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ - 0x00989c00 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x00989c10 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ - 0x00989c20 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ - 0x00989c30 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ - 0x00989c40 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ - 0x00989c50 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00989c60 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x00989c70 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x00989c80 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x00989c90 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00989ca0 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x00989cb0 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x00989cc0 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x00989cd0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x00989ce0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x00989cf0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x00989d00 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x00989d10 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ - 0x00989d20 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ - 0x00989d30 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ - 0x00989d40 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ - 0x00989d50 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ - 0x00989d60 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ - 0x00989d70 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x00989d80 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00989d90 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ - 0x00989da0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00989db0 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ - 0x00989dc0 733b200a 20202369 66646566 20454e41 s; . #ifdef ENA │ │ │ │ - 0x00989dd0 424c455f 56544620 0a202075 6e69666f BLE_VTF . unifo │ │ │ │ - 0x00989de0 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ - 0x00989df0 6f6c6f72 5465783b 200a2020 23656e64 olorTex; . #end │ │ │ │ - 0x00989e00 6966200a 2020636f 6e737420 666c6f61 if . const floa │ │ │ │ - 0x00989e10 74204261 73654465 70746853 68696674 t BaseDepthShift │ │ │ │ - 0x00989e20 203d202d 31302e30 3b200a20 20636f6e = -10.0; . con │ │ │ │ - 0x00989e30 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00989e40 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00989e50 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00989e60 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00989e70 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00989e80 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00989e90 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00989ea0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x00989eb0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00989ec0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x00989ed0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x00989ee0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x00989ef0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00989f00 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00989f10 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00989f20 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00989f30 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00989f40 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00989f50 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00989f60 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00989f70 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00989f80 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00989f90 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00989fa0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x00989fb0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x00989fc0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00989fd0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x00989fe0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x00989ff0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0098a000 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x0098a010 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x0098a020 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x0098a030 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x0098a040 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x0098a050 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x0098a060 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x0098a070 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x0098a080 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x0098a090 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x0098a0a0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x0098a0b0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x0098a0c0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x0098a0d0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x0098a0e0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x0098a0f0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x0098a100 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0098a110 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x0098a120 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x0098a130 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0098a140 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x0098a150 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x0098a160 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x0098a170 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x0098a180 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x0098a190 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x0098a1a0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x0098a1b0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x0098a1c0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x0098a1d0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x0098a1e0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x0098a1f0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x0098a200 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x0098a210 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x0098a220 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x0098a230 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x0098a240 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x0098a250 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x0098a260 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x0098a270 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x0098a280 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x0098a290 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x0098a2a0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x0098a2b0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x0098a2c0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x0098a2d0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x0098a2e0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x0098a2f0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x0098a300 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x0098a310 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x0098a320 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x0098a330 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x0098a340 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x0098a350 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x0098a360 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x0098a370 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x0098a380 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x0098a390 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x0098a3a0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x0098a3b0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x0098a3c0 2829200a 20207b20 0a202020 20666c6f () . { . flo │ │ │ │ - 0x0098a3d0 61742069 734f7574 6c696e65 203d2073 at isOutline = s │ │ │ │ - 0x0098a3e0 74657028 302e352c 20755f69 734f7574 tep(0.5, u_isOut │ │ │ │ - 0x0098a3f0 6c696e65 50617373 293b200a 20202020 linePass); . │ │ │ │ - 0x0098a400 666c6f61 74206e6f 744f7574 6c696e65 float notOutline │ │ │ │ - 0x0098a410 203d2031 2e30202d 2069734f 75746c69 = 1.0 - isOutli │ │ │ │ - 0x0098a420 6e653b20 0a202020 20666c6f 61742064 ne; . float d │ │ │ │ - 0x0098a430 65707468 53686966 74203d20 42617365 epthShift = Base │ │ │ │ - 0x0098a440 44657074 68536869 6674202a 2069734f DepthShift * isO │ │ │ │ - 0x0098a450 75746c69 6e653b20 0a202020 20766563 utline; . vec │ │ │ │ - 0x0098a460 3420706f 73203d20 28766563 3428615f 4 pos = (vec4(a_ │ │ │ │ - 0x0098a470 706f7369 74696f6e 2e78797a 2c203129 position.xyz, 1) │ │ │ │ - 0x0098a480 202b2076 65633428 302e302c 20302e30 + vec4(0.0, 0.0 │ │ │ │ - 0x0098a490 2c206465 70746853 68696674 2c20302e , depthShift, 0. │ │ │ │ - 0x0098a4a0 30292920 2a20755f 6d6f6465 6c566965 0)) * u_modelVie │ │ │ │ - 0x0098a4b0 773b200a 20202020 76656334 20736869 w; . vec4 shi │ │ │ │ - 0x0098a4c0 66746564 506f7320 3d207665 63342861 ftedPos = vec4(a │ │ │ │ - 0x0098a4d0 5f6e6f72 6d616c2c 20302e30 2c20302e _normal, 0.0, 0. │ │ │ │ - 0x0098a4e0 3029202b 20706f73 3b200a20 20202067 0) + pos; . g │ │ │ │ - 0x0098a4f0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x0098a500 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x0098a510 28736869 66746564 506f7320 2a20755f (shiftedPos * u_ │ │ │ │ - 0x0098a520 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x0098a530 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x0098a540 30293b20 0a202020 20766563 3220636f 0); . vec2 co │ │ │ │ - 0x0098a550 6c6f7254 6578436f 6f726420 3d20615f lorTexCoord = a_ │ │ │ │ - 0x0098a560 636f6c6f 72546578 436f6f72 64202a20 colorTexCoord * │ │ │ │ - 0x0098a570 6e6f744f 75746c69 6e65202b 20615f6f notOutline + a_o │ │ │ │ - 0x0098a580 75746c69 6e65436f 6c6f7254 6578436f utlineColorTexCo │ │ │ │ - 0x0098a590 6f726420 2a206973 4f75746c 696e653b ord * isOutline; │ │ │ │ - 0x0098a5a0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x0098a5b0 455f5654 46200a20 20202076 5f636f6c E_VTF . v_col │ │ │ │ - 0x0098a5c0 6f72203d 20746578 74757265 28755f63 or = texture(u_c │ │ │ │ - 0x0098a5d0 6f6c6f72 5465782c 20636f6c 6f725465 olorTex, colorTe │ │ │ │ - 0x0098a5e0 78436f6f 7264293b 200a2020 23656c73 xCoord); . #els │ │ │ │ - 0x0098a5f0 65200a20 20202076 5f636f6c 6f725465 e . v_colorTe │ │ │ │ - 0x0098a600 78436f6f 7264203d 20636f6c 6f725465 xCoord = colorTe │ │ │ │ - 0x0098a610 78436f6f 72643b20 0a202023 656e6469 xCoord; . #endi │ │ │ │ - 0x0098a620 66200a20 20202076 5f6d6173 6b546578 f . v_maskTex │ │ │ │ - 0x0098a630 436f6f72 64203d20 615f6d61 736b5465 Coord = a_maskTe │ │ │ │ - 0x0098a640 78436f6f 72643b20 0a20207d 200a0000 xCoord; . } ... │ │ │ │ - 0x0098a650 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0098a660 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0098a670 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0098a680 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0098a690 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0098a6a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0098a6b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098a6c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0098a6d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0098a6e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0098a6f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0098a700 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0098a710 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0098a720 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0098a730 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0098a740 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0098a750 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0098a760 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0098a770 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0098a780 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0098a790 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0098a7a0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x0098a7b0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x0098a7c0 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ - 0x0098a7d0 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x0098a7e0 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ - 0x0098a7f0 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ - 0x0098a800 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ - 0x0098a810 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ - 0x0098a820 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x0098a830 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x0098a840 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x0098a850 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x0098a860 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x0098a870 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x0098a880 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x0098a890 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x0098a8a0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x0098a8b0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x0098a8c0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x0098a8d0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x0098a8e0 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ - 0x0098a8f0 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ - 0x0098a900 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ - 0x0098a910 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ - 0x0098a920 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ - 0x0098a930 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ - 0x0098a940 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x0098a950 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x0098a960 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ - 0x0098a970 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x0098a980 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ - 0x0098a990 733b200a 2020756e 69666f72 6d207361 s; . uniform sa │ │ │ │ - 0x0098a9a0 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ - 0x0098a9b0 65783b20 0a202063 6f6e7374 20666c6f ex; . const flo │ │ │ │ - 0x0098a9c0 6174206b 42617365 44657074 68536869 at kBaseDepthShi │ │ │ │ - 0x0098a9d0 6674203d 202d3130 2e303b20 0a202063 ft = -10.0; . c │ │ │ │ - 0x0098a9e0 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ - 0x0098a9f0 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ - 0x0098aa00 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ - 0x0098aa10 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x0098aa20 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x0098aa30 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x0098aa40 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x0098aa50 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ - 0x0098aa60 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x0098aa70 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ - 0x0098aa80 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ - 0x0098aa90 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0098aaa0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x0098aab0 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ - 0x0098aac0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0098aad0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x0098aae0 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ - 0x0098aaf0 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ - 0x0098ab00 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0098ab10 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ - 0x0098ab20 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ - 0x0098ab30 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x0098ab40 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ - 0x0098ab50 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ - 0x0098ab60 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x0098ab70 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x0098ab80 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ - 0x0098ab90 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x0098aba0 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ - 0x0098abb0 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ - 0x0098abc0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x0098abd0 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ - 0x0098abe0 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ - 0x0098abf0 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ - 0x0098ac00 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ - 0x0098ac10 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0098ac20 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0098ac30 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0098ac40 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ - 0x0098ac50 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ - 0x0098ac60 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ - 0x0098ac70 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ - 0x0098ac80 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x0098ac90 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ - 0x0098aca0 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ - 0x0098acb0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x0098acc0 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ - 0x0098acd0 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ - 0x0098ace0 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x0098acf0 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ - 0x0098ad00 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x0098ad10 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ - 0x0098ad20 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x0098ad30 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ - 0x0098ad40 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ - 0x0098ad50 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ - 0x0098ad60 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ - 0x0098ad70 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ - 0x0098ad80 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ - 0x0098ad90 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x0098ada0 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ - 0x0098adb0 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ - 0x0098adc0 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ - 0x0098add0 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ - 0x0098ade0 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ - 0x0098adf0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x0098ae00 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ - 0x0098ae10 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ - 0x0098ae20 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x0098ae30 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ - 0x0098ae40 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ - 0x0098ae50 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ - 0x0098ae60 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ - 0x0098ae70 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ - 0x0098ae80 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ - 0x0098ae90 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ - 0x0098aea0 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ - 0x0098aeb0 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ - 0x0098aec0 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ - 0x0098aed0 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ - 0x0098aee0 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ - 0x0098aef0 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ - 0x0098af00 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x0098af10 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ - 0x0098af20 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ - 0x0098af30 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ - 0x0098af40 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ - 0x0098af50 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x0098af60 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ - 0x0098af70 696e2829 200a2020 7b200a20 20202066 in() . { . f │ │ │ │ - 0x0098af80 6c6f6174 2069734f 75746c69 6e65203d loat isOutline = │ │ │ │ - 0x0098af90 20737465 7028302e 352c2075 5f69734f step(0.5, u_isO │ │ │ │ - 0x0098afa0 75746c69 6e655061 7373293b 200a2020 utlinePass); . │ │ │ │ - 0x0098afb0 2020666c 6f617420 64657074 68536869 float depthShi │ │ │ │ - 0x0098afc0 6674203d 206b4261 73654465 70746853 ft = kBaseDepthS │ │ │ │ - 0x0098afd0 68696674 202a2069 734f7574 6c696e65 hift * isOutline │ │ │ │ - 0x0098afe0 3b200a20 20202076 65633420 7069766f ; . vec4 pivo │ │ │ │ - 0x0098aff0 74203d20 28766563 3428615f 706f7369 t = (vec4(a_posi │ │ │ │ - 0x0098b000 74696f6e 2e78797a 2c20312e 3029202b tion.xyz, 1.0) + │ │ │ │ - 0x0098b010 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ - 0x0098b020 64657074 68536869 66742c20 302e3029 depthShift, 0.0) │ │ │ │ - 0x0098b030 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ - 0x0098b040 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ - 0x0098b050 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ - 0x0098b060 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ - 0x0098b070 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x0098b080 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x0098b090 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0098b0a0 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ - 0x0098b0b0 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ - 0x0098b0c0 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x0098b0d0 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ - 0x0098b0e0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0098b0f0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0098b100 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ - 0x0098b110 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ - 0x0098b120 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ - 0x0098b130 65633220 636f6c6f 72546578 436f6f72 ec2 colorTexCoor │ │ │ │ - 0x0098b140 64203d20 6d697828 615f636f 6c6f7254 d = mix(a_colorT │ │ │ │ - 0x0098b150 6578436f 6f72642c 20615f6f 75746c69 exCoord, a_outli │ │ │ │ - 0x0098b160 6e65436f 6c6f7254 6578436f 6f72642c neColorTexCoord, │ │ │ │ - 0x0098b170 2069734f 75746c69 6e65293b 200a2020 isOutline); . │ │ │ │ - 0x0098b180 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ - 0x0098b190 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ - 0x0098b1a0 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ - 0x0098b1b0 5465782c 20636f6c 6f725465 78436f6f Tex, colorTexCoo │ │ │ │ - 0x0098b1c0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ - 0x0098b1d0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x0098b1e0 7264203d 20636f6c 6f725465 78436f6f rd = colorTexCoo │ │ │ │ - 0x0098b1f0 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x0098b200 20202076 5f6d6173 6b546578 436f6f72 v_maskTexCoor │ │ │ │ - 0x0098b210 64203d20 615f6d61 736b5465 78436f6f d = a_maskTexCoo │ │ │ │ - 0x0098b220 72643b20 0a20207d 200a0000 00000000 rd; . } ....... │ │ │ │ - 0x0098b230 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0098b240 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0098b250 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0098b260 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0098b270 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0098b280 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0098b290 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098b2a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0098b2b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0098b2c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0098b2d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0098b2e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0098b2f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0098b300 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0098b310 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0098b320 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0098b330 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0098b340 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0098b350 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0098b360 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0098b370 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0098b380 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0098b390 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x0098b3a0 72546578 436f6f72 643b200a 2020696e rTexCoord; . in │ │ │ │ - 0x0098b3b0 20766563 3220615f 6f75746c 696e6543 vec2 a_outlineC │ │ │ │ - 0x0098b3c0 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x0098b3d0 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ - 0x0098b3e0 6c3b200a 2020696e 20766563 3220615f l; . in vec2 a_ │ │ │ │ - 0x0098b3f0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ - 0x0098b400 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x0098b410 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x0098b420 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x0098b430 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x0098b440 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x0098b450 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x0098b460 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ - 0x0098b470 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ - 0x0098b480 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x0098b490 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x0098b4a0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x0098b4b0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x0098b4c0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x0098b4d0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x0098b4e0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ - 0x0098b4f0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0098b500 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ - 0x0098b510 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ - 0x0098b520 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ - 0x0098b530 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x0098b540 20755f6c 656e6774 683b200a 20202369 u_length; . #i │ │ │ │ - 0x0098b550 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x0098b560 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x0098b570 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ - 0x0098b580 200a2020 23656e64 6966200a 2020636f . #endif . co │ │ │ │ - 0x0098b590 6e737420 666c6f61 74206b42 61736544 nst float kBaseD │ │ │ │ - 0x0098b5a0 65707468 53686966 74203d20 2d31302e epthShift = -10. │ │ │ │ - 0x0098b5b0 303b200a 2020636f 6e737420 666c6f61 0; . const floa │ │ │ │ - 0x0098b5c0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x0098b5d0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x0098b5e0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x0098b5f0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x0098b600 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x0098b610 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x0098b620 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x0098b630 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x0098b640 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x0098b650 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x0098b660 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x0098b670 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x0098b680 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x0098b690 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x0098b6a0 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x0098b6b0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x0098b6c0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x0098b6d0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x0098b6e0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x0098b6f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0098b700 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x0098b710 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x0098b720 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0098b730 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x0098b740 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x0098b750 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x0098b760 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x0098b770 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x0098b780 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x0098b790 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x0098b7a0 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x0098b7b0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x0098b7c0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x0098b7d0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x0098b7e0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x0098b7f0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x0098b800 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x0098b810 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x0098b820 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x0098b830 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x0098b840 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x0098b850 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x0098b860 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x0098b870 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x0098b880 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x0098b890 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x0098b8a0 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x0098b8b0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x0098b8c0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x0098b8d0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x0098b8e0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x0098b8f0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x0098b900 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x0098b910 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x0098b920 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x0098b930 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x0098b940 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x0098b950 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x0098b960 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x0098b970 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x0098b980 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x0098b990 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x0098b9a0 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x0098b9b0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x0098b9c0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x0098b9d0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x0098b9e0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x0098b9f0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x0098ba00 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x0098ba10 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x0098ba20 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x0098ba30 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x0098ba40 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x0098ba50 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x0098ba60 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x0098ba70 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x0098ba80 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x0098ba90 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x0098baa0 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x0098bab0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x0098bac0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x0098bad0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x0098bae0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x0098baf0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x0098bb00 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x0098bb10 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x0098bb20 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x0098bb30 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x0098bb40 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x0098bb50 200a2020 2020666c 6f617420 69734f75 . float isOu │ │ │ │ - 0x0098bb60 746c696e 65203d20 73746570 28302e35 tline = step(0.5 │ │ │ │ - 0x0098bb70 2c20755f 69734f75 746c696e 65506173 , u_isOutlinePas │ │ │ │ - 0x0098bb80 73293b20 0a202020 20666c6f 61742064 s); . float d │ │ │ │ - 0x0098bb90 65707468 53686966 74203d20 6b426173 epthShift = kBas │ │ │ │ - 0x0098bba0 65446570 74685368 69667420 2a206973 eDepthShift * is │ │ │ │ - 0x0098bbb0 4f75746c 696e653b 200a2020 20207665 Outline; . ve │ │ │ │ - 0x0098bbc0 63342070 6f73203d 20287665 63342861 c4 pos = (vec4(a │ │ │ │ - 0x0098bbd0 5f706f73 6974696f 6e2c2031 2e302920 _position, 1.0) │ │ │ │ - 0x0098bbe0 2b207665 63342830 2e302c20 302e302c + vec4(0.0, 0.0, │ │ │ │ - 0x0098bbf0 20646570 74685368 6966742c 20302e30 depthShift, 0.0 │ │ │ │ - 0x0098bc00 2929202a 20755f6d 6f64656c 56696577 )) * u_modelView │ │ │ │ - 0x0098bc10 3b200a20 20202076 65633420 73686966 ; . vec4 shif │ │ │ │ - 0x0098bc20 74656450 6f73203d 20766563 3428615f tedPos = vec4(a_ │ │ │ │ - 0x0098bc30 6e6f726d 616c2c20 302e302c 20302e30 normal, 0.0, 0.0 │ │ │ │ - 0x0098bc40 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ - 0x0098bc50 5f506f73 6974696f 6e203d20 73686966 _Position = shif │ │ │ │ - 0x0098bc60 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ - 0x0098bc70 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ - 0x0098bc80 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ - 0x0098bc90 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ - 0x0098bca0 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ - 0x0098bcb0 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x0098bcc0 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ - 0x0098bcd0 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ - 0x0098bce0 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ - 0x0098bcf0 64696620 0a202020 20766563 3220636f dif . vec2 co │ │ │ │ - 0x0098bd00 6c6f7254 6578436f 6f726420 3d206d69 lorTexCoord = mi │ │ │ │ - 0x0098bd10 7828615f 636f6c6f 72546578 436f6f72 x(a_colorTexCoor │ │ │ │ - 0x0098bd20 642c2061 5f6f7574 6c696e65 436f6c6f d, a_outlineColo │ │ │ │ - 0x0098bd30 72546578 436f6f72 642c2069 734f7574 rTexCoord, isOut │ │ │ │ - 0x0098bd40 6c696e65 293b200a 20202369 66646566 line); . #ifdef │ │ │ │ - 0x0098bd50 20454e41 424c455f 56544620 0a202020 ENABLE_VTF . │ │ │ │ - 0x0098bd60 20765f63 6f6c6f72 203d2074 65787475 v_color = textu │ │ │ │ - 0x0098bd70 72652875 5f636f6c 6f725465 782c2063 re(u_colorTex, c │ │ │ │ - 0x0098bd80 6f6c6f72 54657843 6f6f7264 293b200a olorTexCoord); . │ │ │ │ - 0x0098bd90 20202365 6c736520 0a202020 20765f63 #else . v_c │ │ │ │ - 0x0098bda0 6f6c6f72 54657843 6f6f7264 203d2063 olorTexCoord = c │ │ │ │ - 0x0098bdb0 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x0098bdc0 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ - 0x0098bdd0 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ - 0x0098bde0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ - 0x0098bdf0 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ - 0x0098be00 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0098be10 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0098be20 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0098be30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098be40 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0098be50 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0098be60 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0098be70 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0098be80 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0098be90 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0098bea0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0098beb0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0098bec0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0098bed0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0098bee0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0098bef0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0098bf00 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0098bf10 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0098bf20 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0098bf30 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0098bf40 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x0098bf50 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0098bf60 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x0098bf70 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0098bf80 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x0098bf90 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x0098bfa0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ - 0x0098bfb0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x0098bfc0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x0098bfd0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x0098bfe0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0098bff0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x0098c000 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x0098c010 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x0098c020 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x0098c030 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x0098c040 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x0098c050 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x0098c060 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x0098c070 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x0098c080 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0098c090 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x0098c0a0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x0098c0b0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x0098c0c0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x0098c0d0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x0098c0e0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x0098c0f0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x0098c100 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x0098c110 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x0098c120 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x0098c130 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x0098c140 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x0098c150 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x0098c160 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x0098c170 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x0098c180 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x0098c190 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x0098c1a0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x0098c1b0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x0098c1c0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x0098c1d0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x0098c1e0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0098c1f0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x0098c200 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x0098c210 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x0098c220 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x0098c230 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x0098c240 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x0098c250 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0098c260 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x0098c270 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x0098c280 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0098c290 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x0098c2a0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x0098c2b0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x0098c2c0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x0098c2d0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x0098c2e0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x0098c2f0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x0098c300 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x0098c310 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x0098c320 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x0098c330 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x0098c340 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x0098c350 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x0098c360 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0098c370 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x0098c380 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x0098c390 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x0098c3a0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x0098c3b0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x0098c3c0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x0098c3d0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x0098c3e0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x0098c3f0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x0098c400 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0098c410 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x0098c420 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x0098c430 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x0098c440 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x0098c450 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x0098c460 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x0098c470 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x0098c480 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x0098c490 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x0098c4a0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x0098c4b0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0098c4c0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x0098c4d0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x0098c4e0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x0098c4f0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x0098c500 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0098c510 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x0098c520 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x0098c530 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x0098c540 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x0098c550 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x0098c560 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x0098c570 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x0098c580 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x0098c590 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x0098c5a0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x0098c5b0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x0098c5c0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x0098c5d0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x0098c5e0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x0098c5f0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x0098c600 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x0098c610 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x0098c620 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x0098c630 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x0098c640 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x0098c650 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x0098c660 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ - 0x0098c670 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ - 0x0098c680 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ - 0x0098c690 28615f6e 6f726d61 6c2c2030 2c203029 (a_normal, 0, 0) │ │ │ │ - 0x0098c6a0 202b2070 6f733b20 0a202020 20676c5f + pos; . gl_ │ │ │ │ - 0x0098c6b0 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ - 0x0098c6c0 5069766f 74547261 6e73666f 726d2873 PivotTransform(s │ │ │ │ - 0x0098c6d0 68696674 6564506f 73202a20 755f7072 hiftedPos * u_pr │ │ │ │ - 0x0098c6e0 6f6a6563 74696f6e 2c20755f 7069766f ojection, u_pivo │ │ │ │ - 0x0098c6f0 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ - 0x0098c700 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ - 0x0098c710 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ - 0x0098c720 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ - 0x0098c730 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x0098c740 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0098c750 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0098c760 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0098c770 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098c780 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0098c790 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0098c7a0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0098c7b0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0098c7c0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0098c7d0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0098c7e0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0098c7f0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0098c800 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0098c810 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0098c820 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0098c830 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0098c840 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0098c850 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0098c860 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0098c870 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0098c880 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x0098c890 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0098c8a0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x0098c8b0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0098c8c0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x0098c8d0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x0098c8e0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ - 0x0098c8f0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x0098c900 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x0098c910 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x0098c920 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0098c930 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x0098c940 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x0098c950 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x0098c960 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x0098c970 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x0098c980 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x0098c990 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x0098c9a0 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x0098c9b0 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x0098c9c0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0098c9d0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x0098c9e0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x0098c9f0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x0098ca00 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x0098ca10 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x0098ca20 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x0098ca30 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x0098ca40 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x0098ca50 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x0098ca60 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x0098ca70 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x0098ca80 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x0098ca90 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x0098caa0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x0098cab0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x0098cac0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x0098cad0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x0098cae0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x0098caf0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x0098cb00 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x0098cb10 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x0098cb20 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0098cb30 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x0098cb40 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x0098cb50 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x0098cb60 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x0098cb70 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x0098cb80 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x0098cb90 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0098cba0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x0098cbb0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x0098cbc0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0098cbd0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x0098cbe0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x0098cbf0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x0098cc00 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x0098cc10 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x0098cc20 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x0098cc30 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x0098cc40 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x0098cc50 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x0098cc60 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x0098cc70 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x0098cc80 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x0098cc90 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x0098cca0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0098ccb0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x0098ccc0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x0098ccd0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x0098cce0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x0098ccf0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x0098cd00 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x0098cd10 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x0098cd20 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x0098cd30 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x0098cd40 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0098cd50 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x0098cd60 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x0098cd70 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x0098cd80 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x0098cd90 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x0098cda0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x0098cdb0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x0098cdc0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x0098cdd0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x0098cde0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x0098cdf0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0098ce00 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x0098ce10 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x0098ce20 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x0098ce30 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x0098ce40 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0098ce50 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x0098ce60 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x0098ce70 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x0098ce80 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x0098ce90 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x0098cea0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x0098ceb0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x0098cec0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x0098ced0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x0098cee0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x0098cef0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x0098cf00 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x0098cf10 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x0098cf20 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x0098cf30 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x0098cf40 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x0098cf50 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x0098cf60 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x0098cf70 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x0098cf80 20202076 65633420 7069766f 74203d20 vec4 pivot = │ │ │ │ - 0x0098cf90 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x0098cfa0 78797a2c 20312e30 29202a20 755f6d6f xyz, 1.0) * u_mo │ │ │ │ - 0x0098cfb0 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ - 0x0098cfc0 6334206f 66667365 74203d20 76656334 c4 offset = vec4 │ │ │ │ - 0x0098cfd0 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ - 0x0098cfe0 302e3029 202a2075 5f70726f 6a656374 0.0) * u_project │ │ │ │ - 0x0098cff0 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ - 0x0098d000 6974696f 6e203d20 6170706c 7942696c ition = applyBil │ │ │ │ - 0x0098d010 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x0098d020 666f726d 28706976 6f74202a 20755f70 form(pivot * u_p │ │ │ │ - 0x0098d030 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ - 0x0098d040 6f745472 616e7366 6f726d2c 200a2020 otTransform, . │ │ │ │ - 0x0098d050 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0098d060 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0098d070 20202020 20202020 20202020 20615f70 a_p │ │ │ │ - 0x0098d080 6f736974 696f6e2e 77202a20 755f7a53 osition.w * u_zS │ │ │ │ - 0x0098d090 63616c65 2c206f66 66736574 2e787929 cale, offset.xy) │ │ │ │ - 0x0098d0a0 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ - 0x0098d0b0 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ - 0x0098d0c0 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ - 0x0098d0d0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x0098d0e0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0098d0f0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0098d100 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0098d110 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098d120 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0098d130 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0098d140 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0098d150 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0098d160 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0098d170 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0098d180 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0098d190 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0098d1a0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0098d1b0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0098d1c0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0098d1d0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0098d1e0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0098d1f0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0098d200 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0098d210 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0098d220 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x0098d230 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0098d240 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x0098d250 64733b20 0a20206f 75742076 65633220 ds; . out vec2 │ │ │ │ - 0x0098d260 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ - 0x0098d270 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0098d280 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ - 0x0098d290 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0098d2a0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x0098d2b0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x0098d2c0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x0098d2d0 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x0098d2e0 706f7369 74696f6e 3b200a20 20756e69 position; . uni │ │ │ │ - 0x0098d2f0 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ - 0x0098d300 75746c69 6e655061 73733b20 0a202075 utlinePass; . u │ │ │ │ - 0x0098d310 6e69666f 726d2066 6c6f6174 20755f6f niform float u_o │ │ │ │ - 0x0098d320 70616369 74793b20 0a202075 6e69666f pacity; . unifo │ │ │ │ - 0x0098d330 726d2066 6c6f6174 20755f6c 656e6774 rm float u_lengt │ │ │ │ - 0x0098d340 683b200a 2020636f 6e737420 666c6f61 h; . const floa │ │ │ │ - 0x0098d350 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x0098d360 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x0098d370 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x0098d380 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x0098d390 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x0098d3a0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x0098d3b0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x0098d3c0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x0098d3d0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x0098d3e0 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x0098d3f0 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x0098d400 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x0098d410 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x0098d420 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x0098d430 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x0098d440 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x0098d450 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x0098d460 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x0098d470 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x0098d480 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0098d490 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x0098d4a0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x0098d4b0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0098d4c0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x0098d4d0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x0098d4e0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x0098d4f0 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x0098d500 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x0098d510 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x0098d520 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x0098d530 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x0098d540 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x0098d550 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x0098d560 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x0098d570 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x0098d580 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x0098d590 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x0098d5a0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x0098d5b0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x0098d5c0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x0098d5d0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x0098d5e0 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x0098d5f0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x0098d600 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x0098d610 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x0098d620 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x0098d630 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x0098d640 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x0098d650 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x0098d660 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x0098d670 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x0098d680 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x0098d690 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x0098d6a0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x0098d6b0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x0098d6c0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x0098d6d0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x0098d6e0 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x0098d6f0 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x0098d700 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x0098d710 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x0098d720 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x0098d730 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x0098d740 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x0098d750 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x0098d760 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x0098d770 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x0098d780 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x0098d790 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x0098d7a0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x0098d7b0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x0098d7c0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x0098d7d0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x0098d7e0 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x0098d7f0 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x0098d800 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x0098d810 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x0098d820 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x0098d830 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x0098d840 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x0098d850 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x0098d860 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x0098d870 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x0098d880 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x0098d890 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x0098d8a0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x0098d8b0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x0098d8c0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x0098d8d0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x0098d8e0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x0098d8f0 6e203d20 76656334 28615f70 6f736974 n = vec4(a_posit │ │ │ │ - 0x0098d900 696f6e2c 20302c20 3129202a 20755f6d ion, 0, 1) * u_m │ │ │ │ - 0x0098d910 6f64656c 56696577 202a2075 5f70726f odelView * u_pro │ │ │ │ - 0x0098d920 6a656374 696f6e3b 200a2020 23696664 jection; . #ifd │ │ │ │ - 0x0098d930 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ - 0x0098d940 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ - 0x0098d950 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ - 0x0098d960 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ - 0x0098d970 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ - 0x0098d980 2e7a2020 2b20676c 5f506f73 6974696f .z + gl_Positio │ │ │ │ - 0x0098d990 6e2e7729 202a2030 2e353b20 0a202023 n.w) * 0.5; . # │ │ │ │ - 0x0098d9a0 656e6469 66200a20 20202076 5f636f6c endif . v_col │ │ │ │ - 0x0098d9b0 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ - 0x0098d9c0 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ - 0x0098d9d0 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x0098d9e0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0098d9f0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0098da00 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0098da10 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098da20 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0098da30 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0098da40 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0098da50 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0098da60 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0098da70 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0098da80 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0098da90 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0098daa0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0098dab0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0098dac0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0098dad0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0098dae0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0098daf0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0098db00 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0098db10 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0098db20 0a202023 64656669 6e652054 494c455f . #define TILE_ │ │ │ │ - 0x0098db30 4241434b 47524f55 4e445f4d 41585f43 BACKGROUND_MAX_C │ │ │ │ - 0x0098db40 4f554e54 20363420 0a20206f 75742076 OUNT 64 . out v │ │ │ │ - 0x0098db50 65633320 765f7465 78436f6f 7264733b ec3 v_texCoords; │ │ │ │ - 0x0098db60 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x0098db70 20755f74 696c6543 6f6f7264 734d696e u_tileCoordsMin │ │ │ │ - 0x0098db80 4d61785b 54494c45 5f424143 4b47524f Max[TILE_BACKGRO │ │ │ │ - 0x0098db90 554e445f 4d41585f 434f554e 545d3b20 UND_MAX_COUNT]; │ │ │ │ - 0x0098dba0 0a202075 6e69666f 726d2069 6e742075 . uniform int u │ │ │ │ - 0x0098dbb0 5f746578 74757265 496e6465 785b5449 _textureIndex[TI │ │ │ │ - 0x0098dbc0 4c455f42 41434b47 524f554e 445f4d41 LE_BACKGROUND_MA │ │ │ │ - 0x0098dbd0 585f434f 554e545d 3b200a20 20756e69 X_COUNT]; . uni │ │ │ │ - 0x0098dbe0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x0098dbf0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x0098dc00 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x0098dc10 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x0098dc20 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ - 0x0098dc30 73666f72 6d3b200a 2020636f 6e737420 sform; . const │ │ │ │ - 0x0098dc40 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ - 0x0098dc50 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ - 0x0098dc60 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ - 0x0098dc70 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x0098dc80 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x0098dc90 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x0098dca0 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ - 0x0098dcb0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x0098dcc0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0098dcd0 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ - 0x0098dce0 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ - 0x0098dcf0 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ - 0x0098dd00 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x0098dd10 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ - 0x0098dd20 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x0098dd30 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0098dd40 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x0098dd50 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ - 0x0098dd60 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0098dd70 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ - 0x0098dd80 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ - 0x0098dd90 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x0098dda0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0098ddb0 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ - 0x0098ddc0 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ - 0x0098ddd0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x0098dde0 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ - 0x0098ddf0 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ - 0x0098de00 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0098de10 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x0098de20 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ - 0x0098de30 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ - 0x0098de40 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ - 0x0098de50 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ - 0x0098de60 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x0098de70 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x0098de80 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x0098de90 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ - 0x0098dea0 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ - 0x0098deb0 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ - 0x0098dec0 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ - 0x0098ded0 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ - 0x0098dee0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0098def0 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ - 0x0098df00 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ - 0x0098df10 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x0098df20 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ - 0x0098df30 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ - 0x0098df40 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0098df50 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ - 0x0098df60 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ - 0x0098df70 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ - 0x0098df80 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0098df90 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ - 0x0098dfa0 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ - 0x0098dfb0 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ - 0x0098dfc0 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ - 0x0098dfd0 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ - 0x0098dfe0 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ - 0x0098dff0 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ - 0x0098e000 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ - 0x0098e010 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ - 0x0098e020 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ - 0x0098e030 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ - 0x0098e040 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0098e050 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0098e060 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ - 0x0098e070 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ - 0x0098e080 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x0098e090 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ - 0x0098e0a0 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ - 0x0098e0b0 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ - 0x0098e0c0 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ - 0x0098e0d0 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ - 0x0098e0e0 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ - 0x0098e0f0 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ - 0x0098e100 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ - 0x0098e110 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x0098e120 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ - 0x0098e130 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0098e140 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ - 0x0098e150 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ - 0x0098e160 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x0098e170 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ - 0x0098e180 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ - 0x0098e190 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ - 0x0098e1a0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x0098e1b0 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ - 0x0098e1c0 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ - 0x0098e1d0 0a20207b 200a2020 20207665 63322071 . { . vec2 q │ │ │ │ - 0x0098e1e0 75616456 65727465 78203d20 76656332 uadVertex = vec2 │ │ │ │ - 0x0098e1f0 28676c5f 56657274 65784944 20262031 (gl_VertexID & 1 │ │ │ │ - 0x0098e200 2c202867 6c5f5665 72746578 4944203e , (gl_VertexID > │ │ │ │ - 0x0098e210 3e203129 20262031 293b200a 2020200a > 1) & 1); . . │ │ │ │ - 0x0098e220 20202020 76656334 2074696c 65436f6f vec4 tileCoo │ │ │ │ - 0x0098e230 7264734d 696e4d61 78203d20 755f7469 rdsMinMax = u_ti │ │ │ │ - 0x0098e240 6c65436f 6f726473 4d696e4d 61785b67 leCoordsMinMax[g │ │ │ │ - 0x0098e250 6c5f496e 7374616e 63654944 5d3b200a l_InstanceID]; . │ │ │ │ - 0x0098e260 20202020 76656332 20776f72 6c64506f vec2 worldPo │ │ │ │ - 0x0098e270 73203d20 6d697828 74696c65 436f6f72 s = mix(tileCoor │ │ │ │ - 0x0098e280 64734d69 6e4d6178 2e78792c 2074696c dsMinMax.xy, til │ │ │ │ - 0x0098e290 65436f6f 7264734d 696e4d61 782e7a77 eCoordsMinMax.zw │ │ │ │ - 0x0098e2a0 2c207175 61645665 72746578 293b200a , quadVertex); . │ │ │ │ - 0x0098e2b0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x0098e2c0 65633428 776f726c 64506f73 2c20302e ec4(worldPos, 0. │ │ │ │ - 0x0098e2d0 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ - 0x0098e2e0 6c566965 77202a20 755f7072 6f6a6563 lView * u_projec │ │ │ │ - 0x0098e2f0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ - 0x0098e300 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ - 0x0098e310 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ - 0x0098e320 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ - 0x0098e330 726d2c20 302e3029 3b200a20 20200a20 rm, 0.0); . . │ │ │ │ - 0x0098e340 20202076 5f746578 436f6f72 6473203d v_texCoords = │ │ │ │ - 0x0098e350 20766563 33287175 61645665 72746578 vec3(quadVertex │ │ │ │ - 0x0098e360 2c20666c 6f617428 755f7465 78747572 , float(u_textur │ │ │ │ - 0x0098e370 65496e64 65785b67 6c5f496e 7374616e eIndex[gl_Instan │ │ │ │ - 0x0098e380 63654944 5d29293b 200a2020 7d200a00 ceID])); . } .. │ │ │ │ - 0x0098e390 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0098e3a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0098e3b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0098e3c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0098e3d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0098e3e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0098e3f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098e400 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0098e410 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0098e420 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0098e430 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0098e440 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0098e450 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0098e460 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0098e470 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0098e480 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0098e490 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0098e4a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0098e4b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0098e4c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0098e4d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0098e4e0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0098e4f0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x0098e500 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x0098e510 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x0098e520 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x0098e530 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ - 0x0098e540 6f757420 76656332 20765f6d 61736b54 out vec2 v_maskT │ │ │ │ - 0x0098e550 6578436f 6f72643b 200a2020 6f757420 exCoord; . out │ │ │ │ - 0x0098e560 666c6f61 7420765f 68616c66 4c656e67 float v_halfLeng │ │ │ │ - 0x0098e570 74683b20 0a202075 6e69666f 726d206d th; . uniform m │ │ │ │ - 0x0098e580 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ - 0x0098e590 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x0098e5a0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x0098e5b0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0098e5c0 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ - 0x0098e5d0 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x0098e5e0 20755f74 72616666 69635061 72616d73 u_trafficParams │ │ │ │ - 0x0098e5f0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x0098e600 3420755f 6f75746c 696e6543 6f6c6f72 4 u_outlineColor │ │ │ │ - 0x0098e610 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x0098e620 3420755f 6c696768 74417272 6f77436f 4 u_lightArrowCo │ │ │ │ - 0x0098e630 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x0098e640 76656334 20755f64 61726b41 72726f77 vec4 u_darkArrow │ │ │ │ - 0x0098e650 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ - 0x0098e660 6d20666c 6f617420 755f6f75 746c696e m float u_outlin │ │ │ │ - 0x0098e670 653b200a 2020756e 69666f72 6d20666c e; . uniform fl │ │ │ │ - 0x0098e680 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ - 0x0098e690 2020636f 6e737420 666c6f61 74206b41 const float kA │ │ │ │ - 0x0098e6a0 72726f77 5653697a 65203d20 302e3235 rrowVSize = 0.25 │ │ │ │ - 0x0098e6b0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x0098e6c0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x0098e6d0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x0098e6e0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x0098e6f0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x0098e700 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x0098e710 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x0098e720 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x0098e730 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0098e740 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0098e750 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x0098e760 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x0098e770 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x0098e780 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0098e790 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x0098e7a0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x0098e7b0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x0098e7c0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x0098e7d0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x0098e7e0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x0098e7f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0098e800 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x0098e810 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x0098e820 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x0098e830 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x0098e840 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x0098e850 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x0098e860 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x0098e870 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x0098e880 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x0098e890 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0098e8a0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x0098e8b0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x0098e8c0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x0098e8d0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x0098e8e0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0098e8f0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0098e900 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0098e910 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x0098e920 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x0098e930 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x0098e940 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x0098e950 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x0098e960 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x0098e970 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0098e980 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x0098e990 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x0098e9a0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x0098e9b0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x0098e9c0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x0098e9d0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x0098e9e0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x0098e9f0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x0098ea00 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0098ea10 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x0098ea20 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x0098ea30 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x0098ea40 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x0098ea50 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x0098ea60 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x0098ea70 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x0098ea80 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x0098ea90 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x0098eaa0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x0098eab0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x0098eac0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x0098ead0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x0098eae0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x0098eaf0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x0098eb00 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x0098eb10 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x0098eb20 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x0098eb30 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x0098eb40 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x0098eb50 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x0098eb60 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x0098eb70 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x0098eb80 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x0098eb90 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x0098eba0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x0098ebb0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x0098ebc0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x0098ebd0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x0098ebe0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0098ebf0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x0098ec00 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x0098ec10 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x0098ec20 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x0098ec30 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x0098ec40 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x0098ec50 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ - 0x0098ec60 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ - 0x0098ec70 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x0098ec80 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x0098ec90 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x0098eca0 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x0098ecb0 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x0098ecc0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x0098ecd0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ - 0x0098ece0 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x0098ecf0 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ - 0x0098ed00 6e6f726d 616c202a 20755f74 72616666 normal * u_traff │ │ │ │ - 0x0098ed10 69635061 72616d73 2e783b20 0a202020 icParams.x; . │ │ │ │ - 0x0098ed20 20202069 66202861 5f6e6f72 6d616c2e if (a_normal. │ │ │ │ - 0x0098ed30 7a203c20 302e3029 200a2020 20202020 z < 0.0) . │ │ │ │ - 0x0098ed40 20206e6f 726d203d 206e6f72 6d616c20 norm = normal │ │ │ │ - 0x0098ed50 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ - 0x0098ed60 732e793b 200a2020 20202020 7472616e s.y; . tran │ │ │ │ - 0x0098ed70 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x0098ed80 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x0098ed90 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ - 0x0098eda0 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x0098edb0 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ - 0x0098edc0 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ - 0x0098edd0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0098ede0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0098edf0 20202020 20202020 20202020 20755f6d u_m │ │ │ │ - 0x0098ee00 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ - 0x0098ee10 286e6f72 6d29293b 200a2020 20207d20 (norm)); . } │ │ │ │ - 0x0098ee20 0a202020 20666c6f 61742075 4f666673 . float uOffs │ │ │ │ - 0x0098ee30 6574203d 206c656e 67746828 76656334 et = length(vec4 │ │ │ │ - 0x0098ee40 286b5368 61706543 6f6f7264 5363616c (kShapeCoordScal │ │ │ │ - 0x0098ee50 61722c20 302c2030 2c203029 202a2075 ar, 0, 0, 0) * u │ │ │ │ - 0x0098ee60 5f6d6f64 656c5669 65772920 2a20615f _modelView) * a_ │ │ │ │ - 0x0098ee70 6e6f726d 616c2e77 3b200a20 20202076 normal.w; . v │ │ │ │ - 0x0098ee80 5f636f6c 6f725465 78436f6f 7264203d _colorTexCoord = │ │ │ │ - 0x0098ee90 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ - 0x0098eea0 2e78793b 200a2020 2020666c 6f617420 .xy; . float │ │ │ │ - 0x0098eeb0 76203d20 6d697828 615f636f 6c6f7254 v = mix(a_colorT │ │ │ │ - 0x0098eec0 6578436f 6f72642e 7a2c2061 5f636f6c exCoord.z, a_col │ │ │ │ - 0x0098eed0 6f725465 78436f6f 72642e7a 202b206b orTexCoord.z + k │ │ │ │ - 0x0098eee0 4172726f 77565369 7a652c20 302e3520 ArrowVSize, 0.5 │ │ │ │ - 0x0098eef0 2a20615f 6e6f726d 616c2e7a 202b2030 * a_normal.z + 0 │ │ │ │ - 0x0098ef00 2e35293b 200a2020 2020765f 6d61736b .5); . v_mask │ │ │ │ - 0x0098ef10 54657843 6f6f7264 203d2076 65633228 TexCoord = vec2( │ │ │ │ - 0x0098ef20 754f6666 73657420 2a20755f 74726166 uOffset * u_traf │ │ │ │ - 0x0098ef30 66696350 6172616d 732e7a2c 20762920 ficParams.z, v) │ │ │ │ - 0x0098ef40 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ - 0x0098ef50 732e773b 200a2020 2020765f 6d61736b s.w; . v_mask │ │ │ │ - 0x0098ef60 54657843 6f6f7264 2e78202a 3d207374 TexCoord.x *= st │ │ │ │ - 0x0098ef70 65702861 5f636f6c 6f725465 78436f6f ep(a_colorTexCoo │ │ │ │ - 0x0098ef80 72642e77 2c20765f 6d61736b 54657843 rd.w, v_maskTexC │ │ │ │ - 0x0098ef90 6f6f7264 2e78293b 200a2020 2020765f oord.x); . v_ │ │ │ │ - 0x0098efa0 68616c66 4c656e67 7468203d 20615f6e halfLength = a_n │ │ │ │ - 0x0098efb0 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ - 0x0098efc0 63342070 6f73203d 20766563 34287472 c4 pos = vec4(tr │ │ │ │ - 0x0098efd0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x0098efe0 2c20615f 706f7369 74696f6e 2e7a2c20 , a_position.z, │ │ │ │ - 0x0098eff0 312e3029 202a2075 5f70726f 6a656374 1.0) * u_project │ │ │ │ - 0x0098f000 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ - 0x0098f010 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ - 0x0098f020 6f745472 616e7366 6f726d28 706f732c otTransform(pos, │ │ │ │ - 0x0098f030 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ - 0x0098f040 6d2c2030 2e30293b 200a2020 7d200a00 m, 0.0); . } .. │ │ │ │ - 0x0098f050 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0098f060 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0098f070 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0098f080 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0098f090 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0098f0a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0098f0b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098f0c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0098f0d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0098f0e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0098f0f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0098f100 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0098f110 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0098f120 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0098f130 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0098f140 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0098f150 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0098f160 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0098f170 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0098f180 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0098f190 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0098f1a0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x0098f1b0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x0098f1c0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x0098f1d0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x0098f1e0 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x0098f1f0 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ - 0x0098f200 6f757420 76656333 20765f72 61646975 out vec3 v_radiu │ │ │ │ - 0x0098f210 733b200a 2020756e 69666f72 6d206d61 s; . uniform ma │ │ │ │ - 0x0098f220 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x0098f230 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0098f240 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x0098f250 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x0098f260 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x0098f270 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x0098f280 755f7472 61666669 63506172 616d733b u_trafficParams; │ │ │ │ - 0x0098f290 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x0098f2a0 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ - 0x0098f2b0 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x0098f2c0 20755f6c 69676874 4172726f 77436f6c u_lightArrowCol │ │ │ │ - 0x0098f2d0 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ - 0x0098f2e0 65633420 755f6461 726b4172 726f7743 ec4 u_darkArrowC │ │ │ │ - 0x0098f2f0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x0098f300 20666c6f 61742075 5f6f7574 6c696e65 float u_outline │ │ │ │ - 0x0098f310 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0098f320 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ - 0x0098f330 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x0098f340 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x0098f350 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x0098f360 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x0098f370 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0098f380 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0098f390 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0098f3a0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x0098f3b0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x0098f3c0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x0098f3d0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x0098f3e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0098f3f0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x0098f400 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x0098f410 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x0098f420 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x0098f430 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x0098f440 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x0098f450 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0098f460 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x0098f470 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x0098f480 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x0098f490 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x0098f4a0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x0098f4b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0098f4c0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x0098f4d0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x0098f4e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0098f4f0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x0098f500 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x0098f510 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x0098f520 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x0098f530 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x0098f540 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x0098f550 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x0098f560 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x0098f570 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x0098f580 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x0098f590 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x0098f5a0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x0098f5b0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x0098f5c0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x0098f5d0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x0098f5e0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x0098f5f0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0098f600 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x0098f610 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x0098f620 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x0098f630 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x0098f640 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x0098f650 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x0098f660 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x0098f670 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x0098f680 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x0098f690 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0098f6a0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x0098f6b0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x0098f6c0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x0098f6d0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x0098f6e0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0098f6f0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x0098f700 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x0098f710 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x0098f720 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x0098f730 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x0098f740 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0098f750 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x0098f760 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x0098f770 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x0098f780 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x0098f790 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x0098f7a0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x0098f7b0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x0098f7c0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x0098f7d0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x0098f7e0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x0098f7f0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x0098f800 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x0098f810 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x0098f820 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x0098f830 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x0098f840 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x0098f850 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x0098f860 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x0098f870 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x0098f880 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x0098f890 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x0098f8a0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0098f8b0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x0098f8c0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x0098f8d0 20766563 32206e6f 726d616c 203d2061 vec2 normal = a │ │ │ │ - 0x0098f8e0 5f6e6f72 6d616c2e 78793b20 0a202020 _normal.xy; . │ │ │ │ - 0x0098f8f0 20766563 32207472 616e7366 6f726d65 vec2 transforme │ │ │ │ - 0x0098f900 64417869 73506f73 203d2028 76656334 dAxisPos = (vec4 │ │ │ │ - 0x0098f910 28615f70 6f736974 696f6e2e 78792c20 (a_position.xy, │ │ │ │ - 0x0098f920 302e302c 20312e30 29202a20 755f6d6f 0.0, 1.0) * u_mo │ │ │ │ - 0x0098f930 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x0098f940 2020696e 7420696e 64657820 3d20696e int index = in │ │ │ │ - 0x0098f950 7428615f 706f7369 74696f6e 2e77293b t(a_position.w); │ │ │ │ - 0x0098f960 200a2020 2020666c 6f617420 6c656674 . float left │ │ │ │ - 0x0098f970 53697a65 203d2075 5f6c6967 68744172 Size = u_lightAr │ │ │ │ - 0x0098f980 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ - 0x0098f990 200a2020 2020666c 6f617420 72696768 . float righ │ │ │ │ - 0x0098f9a0 7453697a 65203d20 755f6461 726b4172 tSize = u_darkAr │ │ │ │ - 0x0098f9b0 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ - 0x0098f9c0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x0098f9d0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ - 0x0098f9e0 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x0098f9f0 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ - 0x0098fa00 6e6f726d 616c202a 20302e35 202a2028 normal * 0.5 * ( │ │ │ │ - 0x0098fa10 72696768 7453697a 65202d20 6c656674 rightSize - left │ │ │ │ - 0x0098fa20 53697a65 293b200a 20202020 20207472 Size); . tr │ │ │ │ - 0x0098fa30 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x0098fa40 203d2063 616c634c 696e6554 72616e73 = calcLineTrans │ │ │ │ - 0x0098fa50 666f726d 65644178 6973506f 73287472 formedAxisPos(tr │ │ │ │ - 0x0098fa60 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x0098fa70 2c20615f 706f7369 74696f6e 2e787920 , a_position.xy │ │ │ │ - 0x0098fa80 2b206e6f 726d2c20 0a202020 20202020 + norm, . │ │ │ │ - 0x0098fa90 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0098faa0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0098fab0 20202020 20202020 20202020 20202075 u │ │ │ │ - 0x0098fac0 5f6d6f64 656c5669 65772c20 6c656e67 _modelView, leng │ │ │ │ - 0x0098fad0 7468286e 6f726d29 293b200a 20202020 th(norm)); . │ │ │ │ - 0x0098fae0 7d200a20 20202076 5f726164 69757320 } . v_radius │ │ │ │ - 0x0098faf0 3d207665 63332861 5f6e6f72 6d616c2e = vec3(a_normal. │ │ │ │ - 0x0098fb00 7a772c20 312e3029 202a2030 2e35202a zw, 1.0) * 0.5 * │ │ │ │ - 0x0098fb10 20286c65 66745369 7a65202b 20726967 (leftSize + rig │ │ │ │ - 0x0098fb20 68745369 7a65293b 200a2020 20207665 htSize); . ve │ │ │ │ - 0x0098fb30 63322066 696e616c 506f7320 3d207472 c2 finalPos = tr │ │ │ │ - 0x0098fb40 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x0098fb50 202b2076 5f726164 6975732e 78793b20 + v_radius.xy; │ │ │ │ - 0x0098fb60 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ - 0x0098fb70 6f6f7264 203d2061 5f636f6c 6f725465 oord = a_colorTe │ │ │ │ - 0x0098fb80 78436f6f 72643b20 0a202020 20766563 xCoord; . vec │ │ │ │ - 0x0098fb90 3420706f 73203d20 76656334 2866696e 4 pos = vec4(fin │ │ │ │ - 0x0098fba0 616c506f 732c2061 5f706f73 6974696f alPos, a_positio │ │ │ │ - 0x0098fbb0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ - 0x0098fbc0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ - 0x0098fbd0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x0098fbe0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x0098fbf0 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ - 0x0098fc00 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x0098fc10 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ - 0x0098fc20 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0098fc30 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0098fc40 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0098fc50 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0098fc60 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0098fc70 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0098fc80 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0098fc90 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0098fca0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0098fcb0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0098fcc0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0098fcd0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0098fce0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0098fcf0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0098fd00 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0098fd10 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0098fd20 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0098fd30 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0098fd40 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0098fd50 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0098fd60 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0098fd70 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0098fd80 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x0098fd90 643b200a 20206f75 74207665 63322076 d; . out vec2 v │ │ │ │ - 0x0098fda0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x0098fdb0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0098fdc0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0098fdd0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0098fde0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x0098fdf0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x0098fe00 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x0098fe10 756e6966 6f726d20 76656334 20755f74 uniform vec4 u_t │ │ │ │ - 0x0098fe20 72616666 69635061 72616d73 3b200a20 rafficParams; . │ │ │ │ - 0x0098fe30 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ - 0x0098fe40 6f75746c 696e6543 6f6c6f72 3b200a20 outlineColor; . │ │ │ │ - 0x0098fe50 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ - 0x0098fe60 6c696768 74417272 6f77436f 6c6f723b lightArrowColor; │ │ │ │ - 0x0098fe70 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x0098fe80 20755f64 61726b41 72726f77 436f6c6f u_darkArrowColo │ │ │ │ - 0x0098fe90 723b200a 2020756e 69666f72 6d20666c r; . uniform fl │ │ │ │ - 0x0098fea0 6f617420 755f6f75 746c696e 653b200a oat u_outline; . │ │ │ │ - 0x0098feb0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x0098fec0 755f6f70 61636974 793b200a 2020636f u_opacity; . co │ │ │ │ - 0x0098fed0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x0098fee0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x0098fef0 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x0098ff00 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x0098ff10 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x0098ff20 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x0098ff30 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x0098ff40 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x0098ff50 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x0098ff60 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x0098ff70 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x0098ff80 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x0098ff90 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0098ffa0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x0098ffb0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0098ffc0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0098ffd0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x0098ffe0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x0098fff0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00990000 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x00990010 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x00990020 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00990030 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x00990040 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x00990050 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x00990060 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00990070 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x00990080 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x00990090 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x009900a0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x009900b0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x009900c0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x009900d0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x009900e0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x009900f0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00990100 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00990110 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00990120 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00990130 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x00990140 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x00990150 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x00990160 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x00990170 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00990180 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x00990190 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x009901a0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x009901b0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x009901c0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x009901d0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x009901e0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x009901f0 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x00990200 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00990210 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00990220 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x00990230 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x00990240 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x00990250 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x00990260 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x00990270 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x00990280 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00990290 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x009902a0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x009902b0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x009902c0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x009902d0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x009902e0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x009902f0 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x00990300 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x00990310 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x00990320 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x00990330 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x00990340 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x00990350 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x00990360 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x00990370 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x00990380 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x00990390 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x009903a0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x009903b0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x009903c0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x009903d0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x009903e0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x009903f0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00990400 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x00990410 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x00990420 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x00990430 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00990440 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00990450 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x00990460 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ - 0x00990470 63322074 72616e73 666f726d 65644178 c2 transformedAx │ │ │ │ - 0x00990480 6973506f 73203d20 28766563 3428615f isPos = (vec4(a_ │ │ │ │ - 0x00990490 706f7369 74696f6e 2e78792c 20302e30 position.xy, 0.0 │ │ │ │ - 0x009904a0 2c20312e 3029202a 20755f6d 6f64656c , 1.0) * u_model │ │ │ │ - 0x009904b0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x009904c0 65633420 706f7320 3d207665 63342874 ec4 pos = vec4(t │ │ │ │ - 0x009904d0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x009904e0 732c2061 5f706f73 6974696f 6e2e7a2c s, a_position.z, │ │ │ │ - 0x009904f0 20312e30 29202a20 755f7072 6f6a6563 1.0) * u_projec │ │ │ │ - 0x00990500 74696f6e 3b200a20 20202076 5f636f6c tion; . v_col │ │ │ │ - 0x00990510 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ - 0x00990520 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x00990530 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x00990540 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00990550 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ - 0x00990560 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ - 0x00990570 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x00990580 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00990590 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009905a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009905b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009905c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009905d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009905e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009905f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00990600 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00990610 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00990620 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00990630 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00990640 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00990650 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00990660 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00990670 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00990680 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00990690 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009906a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009906b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009906c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009906d0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x009906e0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x009906f0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00990700 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00990710 65633420 765f636f 6c6f723b 200a2020 ec4 v_color; . │ │ │ │ - 0x00990720 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ - 0x00990730 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ - 0x00990740 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ - 0x00990750 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ - 0x00990760 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ - 0x00990770 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x00990780 666f726d 20766563 3420755f 70617261 form vec4 u_para │ │ │ │ - 0x00990790 6d733b20 0a202075 6e69666f 726d2066 ms; . uniform f │ │ │ │ - 0x009907a0 6c6f6174 20755f6c 696e6548 616c6657 loat u_lineHalfW │ │ │ │ - 0x009907b0 69647468 3b200a20 20756e69 666f726d idth; . uniform │ │ │ │ - 0x009907c0 20666c6f 61742075 5f6d6178 52616469 float u_maxRadi │ │ │ │ - 0x009907d0 75733b20 0a202063 6f6e7374 20666c6f us; . const flo │ │ │ │ - 0x009907e0 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ - 0x009907f0 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ - 0x00990800 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ - 0x00990810 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x00990820 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x00990830 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x00990840 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ - 0x00990850 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ - 0x00990860 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00990870 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ - 0x00990880 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ - 0x00990890 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ - 0x009908a0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009908b0 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ - 0x009908c0 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ - 0x009908d0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x009908e0 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ - 0x009908f0 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ - 0x00990900 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ - 0x00990910 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00990920 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ - 0x00990930 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00990940 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00990950 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ - 0x00990960 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ - 0x00990970 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00990980 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ - 0x00990990 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ - 0x009909a0 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ - 0x009909b0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x009909c0 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ - 0x009909d0 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ - 0x009909e0 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ - 0x009909f0 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ - 0x00990a00 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00990a10 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00990a20 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00990a30 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ - 0x00990a40 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ - 0x00990a50 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ - 0x00990a60 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ - 0x00990a70 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ - 0x00990a80 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ - 0x00990a90 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x00990aa0 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ - 0x00990ab0 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ - 0x00990ac0 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ - 0x00990ad0 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ - 0x00990ae0 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ - 0x00990af0 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ - 0x00990b00 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ - 0x00990b10 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ - 0x00990b20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00990b30 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ - 0x00990b40 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ - 0x00990b50 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ - 0x00990b60 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ - 0x00990b70 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ - 0x00990b80 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ - 0x00990b90 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ - 0x00990ba0 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ - 0x00990bb0 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ - 0x00990bc0 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ - 0x00990bd0 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ - 0x00990be0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00990bf0 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ - 0x00990c00 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ - 0x00990c10 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ - 0x00990c20 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ - 0x00990c30 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ - 0x00990c40 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ - 0x00990c50 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ - 0x00990c60 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ - 0x00990c70 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ - 0x00990c80 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ - 0x00990c90 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ - 0x00990ca0 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ - 0x00990cb0 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ - 0x00990cc0 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ - 0x00990cd0 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ - 0x00990ce0 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ - 0x00990cf0 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ - 0x00990d00 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00990d10 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ - 0x00990d20 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ - 0x00990d30 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ - 0x00990d40 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00990d50 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ - 0x00990d60 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ - 0x00990d70 7b200a20 20202076 65633220 6e6f726d { . vec2 norm │ │ │ │ - 0x00990d80 616c203d 20615f6e 6f726d61 6c2e7879 al = a_normal.xy │ │ │ │ - 0x00990d90 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ - 0x00990da0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x00990db0 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ - 0x00990dc0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ - 0x00990dd0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ - 0x00990de0 793b200a 20202020 69662028 646f7428 y; . if (dot( │ │ │ │ - 0x00990df0 6e6f726d 616c2c20 6e6f726d 616c2920 normal, normal) │ │ │ │ - 0x00990e00 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ - 0x00990e10 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ - 0x00990e20 3d206e6f 726d616c 202a2075 5f6c696e = normal * u_lin │ │ │ │ - 0x00990e30 6548616c 66576964 74683b20 0a202020 eHalfWidth; . │ │ │ │ - 0x00990e40 20202074 72616e73 666f726d 65644178 transformedAx │ │ │ │ - 0x00990e50 6973506f 73203d20 63616c63 4c696e65 isPos = calcLine │ │ │ │ - 0x00990e60 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x00990e70 6f732874 72616e73 666f726d 65644178 os(transformedAx │ │ │ │ - 0x00990e80 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ - 0x00990e90 6e2e7879 202b206e 6f726d2c 200a2020 n.xy + norm, . │ │ │ │ - 0x00990ea0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00990eb0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00990ec0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00990ed0 20202020 755f6d6f 64656c56 6965772c u_modelView, │ │ │ │ - 0x00990ee0 206c656e 67746828 6e6f726d 29293b20 length(norm)); │ │ │ │ - 0x00990ef0 0a202020 207d200a 20202020 765f636f . } . v_co │ │ │ │ - 0x00990f00 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ - 0x00990f10 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x00990f20 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ - 0x00990f30 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x00990f40 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ - 0x00990f50 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ - 0x00990f60 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ - 0x00990f70 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00990f80 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ - 0x00990f90 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ - 0x00990fa0 20207d20 0a000000 20202023 69666465 } .... #ifde │ │ │ │ - 0x00990fb0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00990fc0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00990fd0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00990fe0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00990ff0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00991000 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00991010 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00991020 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00991030 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00991040 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00991050 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00991060 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00991070 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00991080 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00991090 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009910a0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009910b0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009910c0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009910d0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x009910e0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x009910f0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00991100 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00991110 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x00991120 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ - 0x00991130 0a20206f 75742076 65633320 765f7261 . out vec3 v_ra │ │ │ │ - 0x00991140 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ - 0x00991150 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ - 0x00991160 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ - 0x00991170 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ - 0x00991180 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ - 0x00991190 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x009911a0 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ - 0x009911b0 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ - 0x009911c0 726d2076 65633420 755f7061 72616d73 rm vec4 u_params │ │ │ │ - 0x009911d0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x009911e0 61742075 5f6c696e 6548616c 66576964 at u_lineHalfWid │ │ │ │ - 0x009911f0 74683b20 0a202075 6e69666f 726d2066 th; . uniform f │ │ │ │ - 0x00991200 6c6f6174 20755f6d 61785261 64697573 loat u_maxRadius │ │ │ │ - 0x00991210 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x00991220 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x00991230 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x00991240 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x00991250 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x00991260 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x00991270 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x00991280 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x00991290 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x009912a0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x009912b0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x009912c0 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x009912d0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x009912e0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x009912f0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x00991300 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x00991310 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x00991320 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x00991330 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x00991340 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x00991350 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00991360 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x00991370 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x00991380 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x00991390 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x009913a0 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x009913b0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x009913c0 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x009913d0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x009913e0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x009913f0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00991400 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x00991410 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x00991420 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x00991430 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00991440 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x00991450 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x00991460 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x00991470 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x00991480 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x00991490 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x009914a0 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x009914b0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x009914c0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x009914d0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x009914e0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x009914f0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x00991500 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x00991510 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x00991520 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x00991530 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x00991540 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x00991550 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x00991560 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x00991570 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x00991580 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x00991590 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x009915a0 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x009915b0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x009915c0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x009915d0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x009915e0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x009915f0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x00991600 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x00991610 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x00991620 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x00991630 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x00991640 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x00991650 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x00991660 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x00991670 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x00991680 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x00991690 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x009916a0 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x009916b0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x009916c0 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x009916d0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x009916e0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x009916f0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x00991700 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x00991710 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x00991720 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x00991730 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x00991740 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x00991750 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x00991760 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x00991770 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x00991780 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00991790 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x009917a0 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x009917b0 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ - 0x009917c0 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ - 0x009917d0 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ - 0x009917e0 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ - 0x009917f0 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ - 0x00991800 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ - 0x00991810 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ - 0x00991820 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x00991830 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ - 0x00991840 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ - 0x00991850 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ - 0x00991860 6e6f726d 616c202a 20755f6c 696e6548 normal * u_lineH │ │ │ │ - 0x00991870 616c6657 69647468 3b200a20 20202020 alfWidth; . │ │ │ │ - 0x00991880 20747261 6e73666f 726d6564 41786973 transformedAxis │ │ │ │ - 0x00991890 506f7320 3d206361 6c634c69 6e655472 Pos = calcLineTr │ │ │ │ - 0x009918a0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x009918b0 28747261 6e73666f 726d6564 41786973 (transformedAxis │ │ │ │ - 0x009918c0 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ - 0x009918d0 7879202b 206e6f72 6d2c200a 20202020 xy + norm, . │ │ │ │ - 0x009918e0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009918f0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00991900 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00991910 2020755f 6d6f6465 6c566965 772c206c u_modelView, l │ │ │ │ - 0x00991920 656e6774 68286e6f 726d2929 3b200a20 ength(norm)); . │ │ │ │ - 0x00991930 2020207d 200a2020 20207472 616e7366 } . transf │ │ │ │ - 0x00991940 6f726d65 64417869 73506f73 202b3d20 ormedAxisPos += │ │ │ │ - 0x00991950 615f6e6f 726d616c 2e7a7720 2a20755f a_normal.zw * u_ │ │ │ │ - 0x00991960 6c696e65 48616c66 57696474 683b200a lineHalfWidth; . │ │ │ │ - 0x00991970 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x00991980 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ - 0x00991990 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x009919a0 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ - 0x009919b0 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ - 0x009919c0 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ - 0x009919d0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x009919e0 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ - 0x009919f0 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ - 0x00991a00 20202020 765f636f 6c6f7220 3d20615f v_color = a_ │ │ │ │ - 0x00991a10 636f6c6f 723b200a 20202020 765f7261 color; . v_ra │ │ │ │ - 0x00991a20 64697573 203d2076 65633328 615f6e6f dius = vec3(a_no │ │ │ │ - 0x00991a30 726d616c 2e7a772c 20755f6d 61785261 rmal.zw, u_maxRa │ │ │ │ - 0x00991a40 64697573 29202a20 755f6c69 6e654861 dius) * u_lineHa │ │ │ │ - 0x00991a50 6c665769 6474683b 200a2020 7d200a00 lfWidth; . } .. │ │ │ │ - 0x00991a60 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00991a70 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00991a80 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00991a90 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00991aa0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00991ab0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00991ac0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00991ad0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00991ae0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00991af0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00991b00 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00991b10 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00991b20 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00991b30 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00991b40 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00991b50 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00991b60 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00991b70 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00991b80 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00991b90 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00991ba0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00991bb0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00991bc0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00991bd0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00991be0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00991bf0 65633420 765f6f66 66736574 733b200a ec4 v_offsets; . │ │ │ │ - 0x00991c00 20206f75 74207665 63342076 5f636f6c out vec4 v_col │ │ │ │ - 0x00991c10 6f723b20 0a202075 6e69666f 726d206d or; . uniform m │ │ │ │ - 0x00991c20 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ - 0x00991c30 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x00991c40 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00991c50 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00991c60 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ - 0x00991c70 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00991c80 20755f70 6172616d 733b200a 2020756e u_params; . un │ │ │ │ - 0x00991c90 69666f72 6d20666c 6f617420 755f6c69 iform float u_li │ │ │ │ - 0x00991ca0 6e654861 6c665769 6474683b 200a2020 neHalfWidth; . │ │ │ │ - 0x00991cb0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00991cc0 6d617852 61646975 733b200a 2020636f maxRadius; . co │ │ │ │ - 0x00991cd0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x00991ce0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x00991cf0 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x00991d00 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00991d10 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00991d20 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00991d30 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00991d40 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x00991d50 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00991d60 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x00991d70 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x00991d80 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x00991d90 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00991da0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x00991db0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00991dc0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00991dd0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x00991de0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x00991df0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00991e00 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x00991e10 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x00991e20 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00991e30 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x00991e40 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x00991e50 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x00991e60 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00991e70 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x00991e80 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x00991e90 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x00991ea0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x00991eb0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00991ec0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x00991ed0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x00991ee0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x00991ef0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00991f00 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00991f10 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00991f20 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00991f30 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x00991f40 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x00991f50 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x00991f60 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x00991f70 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00991f80 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x00991f90 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x00991fa0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00991fb0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x00991fc0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x00991fd0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00991fe0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x00991ff0 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x00992000 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00992010 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00992020 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x00992030 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x00992040 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x00992050 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x00992060 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x00992070 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x00992080 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00992090 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x009920a0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x009920b0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x009920c0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x009920d0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x009920e0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x009920f0 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x00992100 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x00992110 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x00992120 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x00992130 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x00992140 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x00992150 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x00992160 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x00992170 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x00992180 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x00992190 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x009921a0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x009921b0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x009921c0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x009921d0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x009921e0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x009921f0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00992200 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x00992210 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x00992220 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x00992230 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x00992240 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x00992250 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x00992260 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ - 0x00992270 63342070 6f73203d 20766563 3428615f c4 pos = vec4(a_ │ │ │ │ - 0x00992280 706f7369 74696f6e 2e78792c 20302c20 position.xy, 0, │ │ │ │ - 0x00992290 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ - 0x009922a0 3b200a20 20202076 65633220 6e6f726d ; . vec2 norm │ │ │ │ - 0x009922b0 616c203d 20766563 3228615f 6e6f726d al = vec2(a_norm │ │ │ │ - 0x009922c0 616c2e78 202a2075 5f706172 616d732e al.x * u_params. │ │ │ │ - 0x009922d0 78202d20 615f6e6f 726d616c 2e79202a x - a_normal.y * │ │ │ │ - 0x009922e0 20755f70 6172616d 732e792c 200a2020 u_params.y, . │ │ │ │ - 0x009922f0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00992300 20202020 20615f6e 6f726d61 6c2e7820 a_normal.x │ │ │ │ - 0x00992310 2a20755f 70617261 6d732e79 202b2061 * u_params.y + a │ │ │ │ - 0x00992320 5f6e6f72 6d616c2e 79202a20 755f7061 _normal.y * u_pa │ │ │ │ - 0x00992330 72616d73 2e78293b 200a2020 20207665 rams.x); . ve │ │ │ │ - 0x00992340 63322073 68696674 6564506f 73203d20 c2 shiftedPos = │ │ │ │ - 0x00992350 6e6f726d 616c202a 20755f70 6172616d normal * u_param │ │ │ │ - 0x00992360 732e7a20 2b20706f 732e7879 3b200a20 s.z + pos.xy; . │ │ │ │ - 0x00992370 20202070 6f73203d 20766563 34287368 pos = vec4(sh │ │ │ │ - 0x00992380 69667465 64506f73 2c20615f 706f7369 iftedPos, a_posi │ │ │ │ - 0x00992390 74696f6e 2e7a2c20 312e3029 202a2075 tion.z, 1.0) * u │ │ │ │ - 0x009923a0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x009923b0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x009923c0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x009923d0 6f726d28 706f732c 20755f70 69766f74 orm(pos, u_pivot │ │ │ │ - 0x009923e0 5472616e 73666f72 6d2c2030 2e30293b Transform, 0.0); │ │ │ │ - 0x009923f0 200a2020 20207665 6332206f 66667365 . vec2 offse │ │ │ │ - 0x00992400 7473203d 20616273 28615f6e 6f726d61 ts = abs(a_norma │ │ │ │ - 0x00992410 6c2e7a77 293b200a 20202020 765f6f66 l.zw); . v_of │ │ │ │ - 0x00992420 66736574 73203d20 76656334 28615f6e fsets = vec4(a_n │ │ │ │ - 0x00992430 6f726d61 6c2e7a77 2c206f66 66736574 ormal.zw, offset │ │ │ │ - 0x00992440 73202d20 312e3029 3b200a20 20202076 s - 1.0); . v │ │ │ │ - 0x00992450 5f636f6c 6f72203d 20615f63 6f6c6f72 _color = a_color │ │ │ │ - 0x00992460 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ - 0x00992470 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00992480 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00992490 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009924a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009924b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009924c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009924d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x009924e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009924f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00992500 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00992510 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00992520 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00992530 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00992540 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00992550 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00992560 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00992570 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00992580 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00992590 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009925a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009925b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009925c0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x009925d0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x009925e0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ - 0x009925f0 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ - 0x00992600 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x00992610 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x00992620 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ - 0x00992630 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ - 0x00992640 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ - 0x00992650 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00992660 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00992670 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00992680 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00992690 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x009926a0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x009926b0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x009926c0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x009926d0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x009926e0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x009926f0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x00992700 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x00992710 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x00992720 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00992730 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00992740 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00992750 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00992760 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00992770 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00992780 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00992790 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x009927a0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x009927b0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x009927c0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x009927d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009927e0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x009927f0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00992800 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00992810 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00992820 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00992830 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00992840 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00992850 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00992860 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00992870 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00992880 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00992890 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x009928a0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x009928b0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x009928c0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x009928d0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x009928e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x009928f0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00992900 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00992910 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00992920 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00992930 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00992940 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00992950 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00992960 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00992970 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00992980 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00992990 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x009929a0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x009929b0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x009929c0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x009929d0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x009929e0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x009929f0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00992a00 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00992a10 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00992a20 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00992a30 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00992a40 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00992a50 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00992a60 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00992a70 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00992a80 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00992a90 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00992aa0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00992ab0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00992ac0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00992ad0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00992ae0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00992af0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00992b00 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00992b10 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00992b20 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00992b30 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00992b40 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00992b50 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00992b60 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00992b70 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00992b80 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00992b90 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00992ba0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00992bb0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00992bc0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00992bd0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00992be0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00992bf0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00992c00 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00992c10 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00992c20 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00992c30 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00992c40 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00992c50 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00992c60 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00992c70 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00992c80 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00992c90 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00992ca0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00992cb0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00992cc0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00992cd0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00992ce0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x00992cf0 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ - 0x00992d00 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ - 0x00992d10 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ - 0x00992d20 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ - 0x00992d30 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ - 0x00992d40 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ - 0x00992d50 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ - 0x00992d60 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ - 0x00992d70 203d2076 65633428 615f706f 73697469 = vec4(a_positi │ │ │ │ - 0x00992d80 6f6e2c20 312e3029 202a2075 5f6d6f64 on, 1.0) * u_mod │ │ │ │ - 0x00992d90 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ - 0x00992da0 3420706f 73203d20 76656334 286e6f72 4 pos = vec4(nor │ │ │ │ - 0x00992db0 6d616c2c 20302e30 2c20302e 3029202b mal, 0.0, 0.0) + │ │ │ │ - 0x00992dc0 20703b20 0a202020 20766563 34207072 p; . vec4 pr │ │ │ │ - 0x00992dd0 6f6a6563 74656450 69766f74 203d2070 ojectedPivot = p │ │ │ │ - 0x00992de0 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ - 0x00992df0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00992e00 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x00992e10 616e7366 6f726d28 706f7320 2a20755f ansform(pos * u_ │ │ │ │ - 0x00992e20 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x00992e30 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ - 0x00992e40 30293b20 0a202020 20666c6f 6174206e 0); . float n │ │ │ │ - 0x00992e50 65775a20 3d207072 6f6a6563 74656450 ewZ = projectedP │ │ │ │ - 0x00992e60 69766f74 2e79202f 2070726f 6a656374 ivot.y / project │ │ │ │ - 0x00992e70 65645069 766f742e 77202a20 302e3520 edPivot.w * 0.5 │ │ │ │ - 0x00992e80 2b20302e 353b200a 20202020 676c5f50 + 0.5; . gl_P │ │ │ │ - 0x00992e90 6f736974 696f6e2e 7a203d20 61627328 osition.z = abs( │ │ │ │ - 0x00992ea0 615f6e6f 726d616c 416e6441 6e696d61 a_normalAndAnima │ │ │ │ - 0x00992eb0 74654f72 5a2e7a29 202a206e 65775a20 teOrZ.z) * newZ │ │ │ │ - 0x00992ec0 2b202831 2e30202d 20616273 28615f6e + (1.0 - abs(a_n │ │ │ │ - 0x00992ed0 6f726d61 6c416e64 416e696d 6174654f ormalAndAnimateO │ │ │ │ - 0x00992ee0 725a2e7a 2929202a 20676c5f 506f7369 rZ.z)) * gl_Posi │ │ │ │ - 0x00992ef0 74696f6e 2e7a3b20 0a202020 20765f74 tion.z; . v_t │ │ │ │ - 0x00992f00 6578436f 6f726473 203d2061 5f746578 exCoords = a_tex │ │ │ │ - 0x00992f10 436f6f72 64733b20 0a202020 20765f6d Coords; . v_m │ │ │ │ - 0x00992f20 61736b43 6f6c6f72 203d2061 5f636f6c askColor = a_col │ │ │ │ - 0x00992f30 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ - 0x00992f40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00992f50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00992f60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00992f70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00992f80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00992f90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00992fa0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00992fb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00992fc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00992fd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00992fe0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00992ff0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00993000 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00993010 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00993020 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00993030 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00993040 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00993050 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00993060 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00993070 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00993080 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00993090 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x009930a0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x009930b0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ - 0x009930c0 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ - 0x009930d0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x009930e0 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ - 0x009930f0 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ - 0x00993100 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ - 0x00993110 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ - 0x00993120 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00993130 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00993140 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x00993150 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x00993160 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x00993170 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x00993180 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x00993190 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x009931a0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x009931b0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x009931c0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x009931d0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x009931e0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x009931f0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00993200 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x00993210 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x00993220 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00993230 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00993240 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00993250 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00993260 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00993270 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00993280 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00993290 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x009932a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009932b0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x009932c0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x009932d0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x009932e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x009932f0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00993300 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00993310 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00993320 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00993330 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00993340 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00993350 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00993360 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00993370 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00993380 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00993390 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x009933a0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x009933b0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x009933c0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x009933d0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x009933e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009933f0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00993400 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00993410 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00993420 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x00993430 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x00993440 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x00993450 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00993460 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00993470 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00993480 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00993490 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x009934a0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x009934b0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x009934c0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x009934d0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x009934e0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x009934f0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00993500 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00993510 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x00993520 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00993530 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x00993540 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x00993550 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00993560 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00993570 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00993580 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00993590 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x009935a0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x009935b0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x009935c0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x009935d0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x009935e0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x009935f0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00993600 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00993610 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x00993620 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x00993630 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00993640 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x00993650 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00993660 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00993670 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00993680 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00993690 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x009936a0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x009936b0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x009936c0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x009936d0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x009936e0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x009936f0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00993700 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00993710 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00993720 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x00993730 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x00993740 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x00993750 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00993760 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00993770 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00993780 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00993790 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x009937a0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x009937b0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x009937c0 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ - 0x009937d0 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ - 0x009937e0 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ - 0x009937f0 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ - 0x00993800 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ - 0x00993810 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ - 0x00993820 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ - 0x00993830 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ - 0x00993840 69766f74 203d2076 65633428 615f706f ivot = vec4(a_po │ │ │ │ - 0x00993850 73697469 6f6e2c20 312e3029 202a2075 sition, 1.0) * u │ │ │ │ - 0x00993860 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ - 0x00993870 20766563 34206f66 66736574 203d2076 vec4 offset = v │ │ │ │ - 0x00993880 65633428 6e6f726d 616c2c20 302e302c ec4(normal, 0.0, │ │ │ │ - 0x00993890 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ - 0x009938a0 74696f6e 3b200a20 20202076 65633420 tion; . vec4 │ │ │ │ - 0x009938b0 70726f6a 65637465 64506976 6f74203d projectedPivot = │ │ │ │ - 0x009938c0 20706976 6f74202a 20755f70 726f6a65 pivot * u_proje │ │ │ │ - 0x009938d0 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ - 0x009938e0 6f736974 696f6e20 3d206170 706c7942 osition = applyB │ │ │ │ - 0x009938f0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00993900 6e73666f 726d2870 726f6a65 63746564 nsform(projected │ │ │ │ - 0x00993910 5069766f 742c2075 5f706976 6f745472 Pivot, u_pivotTr │ │ │ │ - 0x00993920 616e7366 6f726d2c 20302e30 2c206f66 ansform, 0.0, of │ │ │ │ - 0x00993930 66736574 2e787929 3b200a20 20202066 fset.xy); . f │ │ │ │ - 0x00993940 6c6f6174 206e6577 5a203d20 70726f6a loat newZ = proj │ │ │ │ - 0x00993950 65637465 64506976 6f742e79 202f2070 ectedPivot.y / p │ │ │ │ - 0x00993960 726f6a65 63746564 5069766f 742e7720 rojectedPivot.w │ │ │ │ - 0x00993970 2a20302e 35202b20 302e353b 200a2020 * 0.5 + 0.5; . │ │ │ │ - 0x00993980 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ - 0x00993990 3d206162 7328615f 6e6f726d 616c416e = abs(a_normalAn │ │ │ │ - 0x009939a0 64416e69 6d617465 4f725a2e 7a29202a dAnimateOrZ.z) * │ │ │ │ - 0x009939b0 206e6577 5a20202b 2028312e 30202d20 newZ + (1.0 - │ │ │ │ - 0x009939c0 61627328 615f6e6f 726d616c 416e6441 abs(a_normalAndA │ │ │ │ - 0x009939d0 6e696d61 74654f72 5a2e7a29 29202a20 nimateOrZ.z)) * │ │ │ │ - 0x009939e0 676c5f50 6f736974 696f6e2e 7a3b200a gl_Position.z; . │ │ │ │ - 0x009939f0 20202020 765f7465 78436f6f 72647320 v_texCoords │ │ │ │ - 0x00993a00 3d20615f 74657843 6f6f7264 733b200a = a_texCoords; . │ │ │ │ - 0x00993a10 20202020 765f6d61 736b436f 6c6f7220 v_maskColor │ │ │ │ - 0x00993a20 3d20615f 636f6c6f 723b200a 20207d20 = a_color; . } │ │ │ │ - 0x00993a30 0a000000 00000000 14f5d6ff 22f5d6ff ............"... │ │ │ │ + 0x00977050 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x00977060 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x00977070 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x00977080 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x00977090 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x009770a0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x009770b0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x009770c0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x009770d0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x009770e0 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x009770f0 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x00977100 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x00977110 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x00977120 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x00977130 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00977140 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x00977150 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x00977160 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x00977170 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x00977180 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x00977190 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x009771a0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x009771b0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x009771c0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x009771d0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x009771e0 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x009771f0 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x00977200 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x00977210 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x00977220 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x00977230 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x00977240 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x00977250 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x00977260 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x00977270 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x00977280 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00977290 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x009772a0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x009772b0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x009772c0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x009772d0 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x009772e0 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x009772f0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00977300 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x00977310 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x00977320 20207b20 0a202020 20766563 32206e6f { . vec2 no │ │ │ │ + 0x00977330 726d616c 203d2061 5f6e6f72 6d616c2e rmal = a_normal. │ │ │ │ + 0x00977340 78793b20 0a202020 20766563 32207472 xy; . vec2 tr │ │ │ │ + 0x00977350 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00977360 203d2028 76656334 28615f70 6f736974 = (vec4(a_posit │ │ │ │ + 0x00977370 696f6e2e 78792c20 302e302c 20312e30 ion.xy, 0.0, 1.0 │ │ │ │ + 0x00977380 29202a20 755f6d6f 64656c56 69657729 ) * u_modelView) │ │ │ │ + 0x00977390 2e78793b 200a2020 2020696e 7420696e .xy; . int in │ │ │ │ + 0x009773a0 64657820 3d20696e 7428615f 706f7369 dex = int(a_posi │ │ │ │ + 0x009773b0 74696f6e 2e77293b 200a2020 2020666c tion.w); . fl │ │ │ │ + 0x009773c0 6f617420 6c656674 53697a65 203d2075 oat leftSize = u │ │ │ │ + 0x009773d0 5f6c6967 68744172 726f7743 6f6c6f72 _lightArrowColor │ │ │ │ + 0x009773e0 5b696e64 65785d3b 200a2020 2020666c [index]; . fl │ │ │ │ + 0x009773f0 6f617420 72696768 7453697a 65203d20 oat rightSize = │ │ │ │ + 0x00977400 755f6461 726b4172 726f7743 6f6c6f72 u_darkArrowColor │ │ │ │ + 0x00977410 5b696e64 65785d3b 200a2020 20206966 [index]; . if │ │ │ │ + 0x00977420 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ + 0x00977430 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ + 0x00977440 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ + 0x00977450 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ + 0x00977460 20302e35 202a2028 72696768 7453697a 0.5 * (rightSiz │ │ │ │ + 0x00977470 65202d20 6c656674 53697a65 293b200a e - leftSize); . │ │ │ │ + 0x00977480 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ + 0x00977490 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ + 0x009774a0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x009774b0 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ + 0x009774c0 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ + 0x009774d0 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ + 0x009774e0 0a202020 20202020 20202020 20202020 . │ │ │ │ + 0x009774f0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00977500 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00977510 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ + 0x00977520 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ + 0x00977530 293b200a 20202020 7d200a20 20202076 ); . } . v │ │ │ │ + 0x00977540 5f726164 69757320 3d207665 63332861 _radius = vec3(a │ │ │ │ + 0x00977550 5f6e6f72 6d616c2e 7a772c20 312e3029 _normal.zw, 1.0) │ │ │ │ + 0x00977560 202a2030 2e35202a 20286c65 66745369 * 0.5 * (leftSi │ │ │ │ + 0x00977570 7a65202b 20726967 68745369 7a65293b ze + rightSize); │ │ │ │ + 0x00977580 200a2020 20207665 63322066 696e616c . vec2 final │ │ │ │ + 0x00977590 506f7320 3d207472 616e7366 6f726d65 Pos = transforme │ │ │ │ + 0x009775a0 64417869 73506f73 202b2076 5f726164 dAxisPos + v_rad │ │ │ │ + 0x009775b0 6975732e 78793b20 0a202020 20765f63 ius.xy; . v_c │ │ │ │ + 0x009775c0 6f6c6f72 54657843 6f6f7264 203d2061 olorTexCoord = a │ │ │ │ + 0x009775d0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x009775e0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x009775f0 76656334 2866696e 616c506f 732c2061 vec4(finalPos, a │ │ │ │ + 0x00977600 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ + 0x00977610 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ + 0x00977620 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x00977630 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ + 0x00977640 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ + 0x00977650 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00977660 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ + 0x00977670 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00977680 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00977690 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009776a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009776b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009776c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x009776d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009776e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009776f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00977700 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00977710 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00977720 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00977730 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00977740 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00977750 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00977760 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00977770 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00977780 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00977790 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009777a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009777b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009777c0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x009777d0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x009777e0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x009777f0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00977800 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00977810 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00977820 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00977830 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00977840 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00977850 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00977860 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00977870 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00977880 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00977890 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x009778a0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x009778b0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x009778c0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x009778d0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x009778e0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x009778f0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00977900 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00977910 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00977920 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00977930 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00977940 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00977950 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00977960 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00977970 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00977980 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00977990 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x009779a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009779b0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x009779c0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x009779d0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x009779e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x009779f0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00977a00 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00977a10 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00977a20 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00977a30 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00977a40 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00977a50 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00977a60 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00977a70 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00977a80 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00977a90 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00977aa0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00977ab0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00977ac0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00977ad0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00977ae0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00977af0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00977b00 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00977b10 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00977b20 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00977b30 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00977b40 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00977b50 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00977b60 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00977b70 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00977b80 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00977b90 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00977ba0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00977bb0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00977bc0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00977bd0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00977be0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00977bf0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00977c00 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00977c10 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00977c20 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00977c30 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00977c40 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00977c50 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00977c60 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00977c70 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00977c80 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00977c90 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00977ca0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00977cb0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00977cc0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00977cd0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00977ce0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00977cf0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00977d00 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00977d10 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00977d20 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00977d30 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00977d40 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00977d50 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00977d60 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00977d70 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00977d80 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00977d90 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00977da0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00977db0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00977dc0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00977dd0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00977de0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00977df0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00977e00 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00977e10 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00977e20 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00977e30 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00977e40 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00977e50 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00977e60 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00977e70 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00977e80 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00977e90 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00977ea0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00977eb0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00977ec0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ + 0x00977ed0 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ + 0x00977ee0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00977ef0 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ + 0x00977f00 73203d20 76656334 28615f6e 6f726d61 s = vec4(a_norma │ │ │ │ + 0x00977f10 6c2c2030 2c203029 202b2070 6f733b20 l, 0, 0) + pos; │ │ │ │ + 0x00977f20 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x00977f30 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ + 0x00977f40 6e73666f 726d2873 68696674 6564506f nsform(shiftedPo │ │ │ │ + 0x00977f50 73202a20 755f7072 6f6a6563 74696f6e s * u_projection │ │ │ │ + 0x00977f60 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x00977f70 726d2c20 302e3029 3b200a20 20202076 rm, 0.0); . v │ │ │ │ + 0x00977f80 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ + 0x00977f90 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ + 0x00977fa0 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ + 0x00977fb0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00977fc0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00977fd0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00977fe0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00977ff0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00978000 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00978010 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00978020 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00978030 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00978040 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00978050 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00978060 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00978070 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00978080 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00978090 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009780a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009780b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009780c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009780d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009780e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009780f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00978100 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ + 0x00978110 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00978120 72546578 436f6f72 64733b20 0a20206f rTexCoords; . o │ │ │ │ + 0x00978130 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ + 0x00978140 6578436f 6f726473 3b200a20 20756e69 exCoords; . uni │ │ │ │ + 0x00978150 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00978160 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00978170 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00978180 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00978190 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x009781a0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x009781b0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ + 0x009781c0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x009781d0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ + 0x009781e0 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ + 0x009781f0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x00978200 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00978210 20755f6c 656e6774 683b200a 2020636f u_length; . co │ │ │ │ + 0x00978220 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x00978230 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x00978240 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x00978250 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x00978260 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00978270 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00978280 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00978290 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x009782a0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x009782b0 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x009782c0 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x009782d0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x009782e0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x009782f0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x00978300 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00978310 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00978320 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00978330 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x00978340 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00978350 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x00978360 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x00978370 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00978380 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x00978390 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x009783a0 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x009783b0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x009783c0 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x009783d0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x009783e0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x009783f0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x00978400 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00978410 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x00978420 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x00978430 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x00978440 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00978450 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00978460 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00978470 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00978480 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x00978490 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x009784a0 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x009784b0 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x009784c0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x009784d0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x009784e0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x009784f0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00978500 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x00978510 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x00978520 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00978530 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x00978540 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x00978550 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x00978560 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x00978570 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x00978580 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x00978590 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x009785a0 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x009785b0 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x009785c0 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x009785d0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x009785e0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x009785f0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x00978600 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x00978610 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x00978620 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x00978630 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x00978640 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x00978650 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x00978660 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x00978670 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x00978680 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x00978690 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x009786a0 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x009786b0 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x009786c0 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x009786d0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x009786e0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x009786f0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x00978700 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x00978710 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00978720 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x00978730 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x00978740 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00978750 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x00978760 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x00978770 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x00978780 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x00978790 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x009787a0 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x009787b0 6e282920 0a20207b 200a2020 2020676c n() . { . gl │ │ │ │ + 0x009787c0 5f506f73 6974696f 6e203d20 76656334 _Position = vec4 │ │ │ │ + 0x009787d0 28615f70 6f736974 696f6e2c 20302c20 (a_position, 0, │ │ │ │ + 0x009787e0 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ + 0x009787f0 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ + 0x00978800 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00978810 4e200a20 20202067 6c5f506f 73697469 N . gl_Positi │ │ │ │ + 0x00978820 6f6e2e79 203d202d 676c5f50 6f736974 on.y = -gl_Posit │ │ │ │ + 0x00978830 696f6e2e 793b200a 20202020 676c5f50 ion.y; . gl_P │ │ │ │ + 0x00978840 6f736974 696f6e2e 7a203d20 28676c5f osition.z = (gl_ │ │ │ │ + 0x00978850 506f7369 74696f6e 2e7a2020 2b20676c Position.z + gl │ │ │ │ + 0x00978860 5f506f73 6974696f 6e2e7729 202a2030 _Position.w) * 0 │ │ │ │ + 0x00978870 2e353b20 0a202023 656e6469 66200a20 .5; . #endif . │ │ │ │ + 0x00978880 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00978890 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ + 0x009788a0 436f6f72 64733b20 0a20207d 200a0000 Coords; . } ... │ │ │ │ + 0x009788b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009788c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009788d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009788e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009788f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00978900 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00978910 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00978920 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00978930 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00978940 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00978950 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00978960 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00978970 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00978980 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00978990 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009789a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009789b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009789c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009789d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009789e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009789f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00978a00 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00978a10 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00978a20 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00978a30 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x00978a40 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x00978a50 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ + 0x00978a60 6f757420 76656332 20765f6d 61736b54 out vec2 v_maskT │ │ │ │ + 0x00978a70 6578436f 6f72643b 200a2020 6f757420 exCoord; . out │ │ │ │ + 0x00978a80 666c6f61 7420765f 68616c66 4c656e67 float v_halfLeng │ │ │ │ + 0x00978a90 74683b20 0a202075 6e69666f 726d206d th; . uniform m │ │ │ │ + 0x00978aa0 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x00978ab0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00978ac0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00978ad0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00978ae0 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x00978af0 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00978b00 20755f74 72616666 69635061 72616d73 u_trafficParams │ │ │ │ + 0x00978b10 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00978b20 3420755f 6f75746c 696e6543 6f6c6f72 4 u_outlineColor │ │ │ │ + 0x00978b30 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00978b40 3420755f 6c696768 74417272 6f77436f 4 u_lightArrowCo │ │ │ │ + 0x00978b50 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x00978b60 76656334 20755f64 61726b41 72726f77 vec4 u_darkArrow │ │ │ │ + 0x00978b70 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x00978b80 6d20666c 6f617420 755f6f75 746c696e m float u_outlin │ │ │ │ + 0x00978b90 653b200a 2020756e 69666f72 6d20666c e; . uniform fl │ │ │ │ + 0x00978ba0 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ + 0x00978bb0 2020636f 6e737420 666c6f61 74206b41 const float kA │ │ │ │ + 0x00978bc0 72726f77 5653697a 65203d20 302e3235 rrowVSize = 0.25 │ │ │ │ + 0x00978bd0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x00978be0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x00978bf0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x00978c00 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00978c10 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00978c20 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00978c30 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00978c40 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x00978c50 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00978c60 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00978c70 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x00978c80 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x00978c90 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x00978ca0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00978cb0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x00978cc0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x00978cd0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x00978ce0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x00978cf0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x00978d00 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x00978d10 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00978d20 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x00978d30 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x00978d40 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00978d50 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x00978d60 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x00978d70 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00978d80 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x00978d90 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x00978da0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x00978db0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00978dc0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x00978dd0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x00978de0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x00978df0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00978e00 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00978e10 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00978e20 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00978e30 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x00978e40 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x00978e50 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x00978e60 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x00978e70 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x00978e80 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00978e90 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00978ea0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x00978eb0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x00978ec0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x00978ed0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x00978ee0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x00978ef0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x00978f00 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00978f10 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x00978f20 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00978f30 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x00978f40 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x00978f50 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x00978f60 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x00978f70 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x00978f80 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00978f90 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x00978fa0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x00978fb0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x00978fc0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x00978fd0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x00978fe0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00978ff0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x00979000 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x00979010 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x00979020 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x00979030 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x00979040 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x00979050 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x00979060 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x00979070 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x00979080 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x00979090 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x009790a0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x009790b0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x009790c0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x009790d0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x009790e0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x009790f0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x00979100 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00979110 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x00979120 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x00979130 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x00979140 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00979150 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x00979160 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x00979170 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ + 0x00979180 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ + 0x00979190 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ + 0x009791a0 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ + 0x009791b0 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x009791c0 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ + 0x009791d0 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ + 0x009791e0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ + 0x009791f0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ + 0x00979200 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ + 0x00979210 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ + 0x00979220 6e6f726d 616c202a 20755f74 72616666 normal * u_traff │ │ │ │ + 0x00979230 69635061 72616d73 2e783b20 0a202020 icParams.x; . │ │ │ │ + 0x00979240 20202069 66202861 5f6e6f72 6d616c2e if (a_normal. │ │ │ │ + 0x00979250 7a203c20 302e3029 200a2020 20202020 z < 0.0) . │ │ │ │ + 0x00979260 20206e6f 726d203d 206e6f72 6d616c20 norm = normal │ │ │ │ + 0x00979270 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ + 0x00979280 732e793b 200a2020 20202020 7472616e s.y; . tran │ │ │ │ + 0x00979290 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x009792a0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x009792b0 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ + 0x009792c0 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x009792d0 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ + 0x009792e0 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ + 0x009792f0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00979300 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00979310 20202020 20202020 20202020 20755f6d u_m │ │ │ │ + 0x00979320 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ + 0x00979330 286e6f72 6d29293b 200a2020 20207d20 (norm)); . } │ │ │ │ + 0x00979340 0a202020 20666c6f 61742075 4f666673 . float uOffs │ │ │ │ + 0x00979350 6574203d 206c656e 67746828 76656334 et = length(vec4 │ │ │ │ + 0x00979360 286b5368 61706543 6f6f7264 5363616c (kShapeCoordScal │ │ │ │ + 0x00979370 61722c20 302c2030 2c203029 202a2075 ar, 0, 0, 0) * u │ │ │ │ + 0x00979380 5f6d6f64 656c5669 65772920 2a20615f _modelView) * a_ │ │ │ │ + 0x00979390 6e6f726d 616c2e77 3b200a20 20202076 normal.w; . v │ │ │ │ + 0x009793a0 5f636f6c 6f725465 78436f6f 7264203d _colorTexCoord = │ │ │ │ + 0x009793b0 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ + 0x009793c0 2e78793b 200a2020 2020666c 6f617420 .xy; . float │ │ │ │ + 0x009793d0 76203d20 6d697828 615f636f 6c6f7254 v = mix(a_colorT │ │ │ │ + 0x009793e0 6578436f 6f72642e 7a2c2061 5f636f6c exCoord.z, a_col │ │ │ │ + 0x009793f0 6f725465 78436f6f 72642e7a 202b206b orTexCoord.z + k │ │ │ │ + 0x00979400 4172726f 77565369 7a652c20 302e3520 ArrowVSize, 0.5 │ │ │ │ + 0x00979410 2a20615f 6e6f726d 616c2e7a 202b2030 * a_normal.z + 0 │ │ │ │ + 0x00979420 2e35293b 200a2020 2020765f 6d61736b .5); . v_mask │ │ │ │ + 0x00979430 54657843 6f6f7264 203d2076 65633228 TexCoord = vec2( │ │ │ │ + 0x00979440 754f6666 73657420 2a20755f 74726166 uOffset * u_traf │ │ │ │ + 0x00979450 66696350 6172616d 732e7a2c 20762920 ficParams.z, v) │ │ │ │ + 0x00979460 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ + 0x00979470 732e773b 200a2020 2020765f 6d61736b s.w; . v_mask │ │ │ │ + 0x00979480 54657843 6f6f7264 2e78202a 3d207374 TexCoord.x *= st │ │ │ │ + 0x00979490 65702861 5f636f6c 6f725465 78436f6f ep(a_colorTexCoo │ │ │ │ + 0x009794a0 72642e77 2c20765f 6d61736b 54657843 rd.w, v_maskTexC │ │ │ │ + 0x009794b0 6f6f7264 2e78293b 200a2020 2020765f oord.x); . v_ │ │ │ │ + 0x009794c0 68616c66 4c656e67 7468203d 20615f6e halfLength = a_n │ │ │ │ + 0x009794d0 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ + 0x009794e0 63342070 6f73203d 20766563 34287472 c4 pos = vec4(tr │ │ │ │ + 0x009794f0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00979500 2c20615f 706f7369 74696f6e 2e7a2c20 , a_position.z, │ │ │ │ + 0x00979510 312e3029 202a2075 5f70726f 6a656374 1.0) * u_project │ │ │ │ + 0x00979520 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ + 0x00979530 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ + 0x00979540 6f745472 616e7366 6f726d28 706f732c otTransform(pos, │ │ │ │ + 0x00979550 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x00979560 6d2c2030 2e30293b 200a2020 7d200a00 m, 0.0); . } .. │ │ │ │ + 0x00979570 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00979580 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00979590 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009795a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009795b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009795c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x009795d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009795e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009795f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00979600 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00979610 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00979620 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00979630 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00979640 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00979650 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00979660 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00979670 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00979680 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00979690 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009796a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009796b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009796c0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x009796d0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x009796e0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ + 0x009796f0 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ + 0x00979700 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x00979710 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ + 0x00979720 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ + 0x00979730 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ + 0x00979740 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ + 0x00979750 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00979760 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00979770 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00979780 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00979790 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x009797a0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x009797b0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x009797c0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x009797d0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x009797e0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x009797f0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00979800 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00979810 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00979820 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00979830 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00979840 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00979850 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00979860 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00979870 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00979880 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00979890 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x009798a0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x009798b0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x009798c0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x009798d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009798e0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x009798f0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00979900 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00979910 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00979920 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00979930 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00979940 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00979950 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00979960 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00979970 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00979980 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00979990 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x009799a0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x009799b0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x009799c0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x009799d0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x009799e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x009799f0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00979a00 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00979a10 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00979a20 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00979a30 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00979a40 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00979a50 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00979a60 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00979a70 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00979a80 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00979a90 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00979aa0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00979ab0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00979ac0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00979ad0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00979ae0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00979af0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00979b00 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00979b10 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00979b20 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00979b30 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00979b40 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00979b50 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00979b60 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00979b70 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00979b80 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00979b90 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00979ba0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00979bb0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00979bc0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00979bd0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00979be0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00979bf0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00979c00 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00979c10 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00979c20 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00979c30 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00979c40 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00979c50 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00979c60 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00979c70 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00979c80 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00979c90 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00979ca0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00979cb0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00979cc0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00979cd0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00979ce0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00979cf0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00979d00 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00979d10 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00979d20 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00979d30 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00979d40 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00979d50 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00979d60 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00979d70 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00979d80 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00979d90 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00979da0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00979db0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00979dc0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00979dd0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00979de0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x00979df0 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ + 0x00979e00 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ + 0x00979e10 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ + 0x00979e20 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ + 0x00979e30 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ + 0x00979e40 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ + 0x00979e50 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ + 0x00979e60 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ + 0x00979e70 203d2076 65633428 615f706f 73697469 = vec4(a_positi │ │ │ │ + 0x00979e80 6f6e2c20 312e3029 202a2075 5f6d6f64 on, 1.0) * u_mod │ │ │ │ + 0x00979e90 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ + 0x00979ea0 3420706f 73203d20 76656334 286e6f72 4 pos = vec4(nor │ │ │ │ + 0x00979eb0 6d616c2c 20302e30 2c20302e 3029202b mal, 0.0, 0.0) + │ │ │ │ + 0x00979ec0 20703b20 0a202020 20766563 34207072 p; . vec4 pr │ │ │ │ + 0x00979ed0 6f6a6563 74656450 69766f74 203d2070 ojectedPivot = p │ │ │ │ + 0x00979ee0 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ + 0x00979ef0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x00979f00 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ + 0x00979f10 616e7366 6f726d28 706f7320 2a20755f ansform(pos * u_ │ │ │ │ + 0x00979f20 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00979f30 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x00979f40 30293b20 0a202020 20666c6f 6174206e 0); . float n │ │ │ │ + 0x00979f50 65775a20 3d207072 6f6a6563 74656450 ewZ = projectedP │ │ │ │ + 0x00979f60 69766f74 2e79202f 2070726f 6a656374 ivot.y / project │ │ │ │ + 0x00979f70 65645069 766f742e 77202a20 302e3520 edPivot.w * 0.5 │ │ │ │ + 0x00979f80 2b20302e 353b200a 20202020 676c5f50 + 0.5; . gl_P │ │ │ │ + 0x00979f90 6f736974 696f6e2e 7a203d20 61627328 osition.z = abs( │ │ │ │ + 0x00979fa0 615f6e6f 726d616c 416e6441 6e696d61 a_normalAndAnima │ │ │ │ + 0x00979fb0 74654f72 5a2e7a29 202a206e 65775a20 teOrZ.z) * newZ │ │ │ │ + 0x00979fc0 2b202831 2e30202d 20616273 28615f6e + (1.0 - abs(a_n │ │ │ │ + 0x00979fd0 6f726d61 6c416e64 416e696d 6174654f ormalAndAnimateO │ │ │ │ + 0x00979fe0 725a2e7a 2929202a 20676c5f 506f7369 rZ.z)) * gl_Posi │ │ │ │ + 0x00979ff0 74696f6e 2e7a3b20 0a202020 20765f74 tion.z; . v_t │ │ │ │ + 0x0097a000 6578436f 6f726473 203d2061 5f746578 exCoords = a_tex │ │ │ │ + 0x0097a010 436f6f72 64733b20 0a202020 20765f6d Coords; . v_m │ │ │ │ + 0x0097a020 61736b43 6f6c6f72 203d2061 5f636f6c askColor = a_col │ │ │ │ + 0x0097a030 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ + 0x0097a040 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0097a050 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0097a060 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0097a070 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0097a080 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0097a090 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0097a0a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097a0b0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0097a0c0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0097a0d0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0097a0e0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0097a0f0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0097a100 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0097a110 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0097a120 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0097a130 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0097a140 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0097a150 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0097a160 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0097a170 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0097a180 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0097a190 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x0097a1a0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x0097a1b0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x0097a1c0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x0097a1d0 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ + 0x0097a1e0 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ + 0x0097a1f0 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x0097a200 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ + 0x0097a210 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x0097a220 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x0097a230 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x0097a240 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x0097a250 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x0097a260 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x0097a270 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x0097a280 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x0097a290 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x0097a2a0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x0097a2b0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x0097a2c0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0097a2d0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x0097a2e0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0097a2f0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x0097a300 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0097a310 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x0097a320 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x0097a330 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x0097a340 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x0097a350 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x0097a360 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x0097a370 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x0097a380 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x0097a390 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x0097a3a0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0097a3b0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0097a3c0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x0097a3d0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x0097a3e0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x0097a3f0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x0097a400 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x0097a410 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x0097a420 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x0097a430 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x0097a440 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x0097a450 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x0097a460 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0097a470 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x0097a480 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x0097a490 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x0097a4a0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x0097a4b0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x0097a4c0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x0097a4d0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x0097a4e0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x0097a4f0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x0097a500 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x0097a510 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x0097a520 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x0097a530 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x0097a540 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x0097a550 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x0097a560 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x0097a570 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x0097a580 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x0097a590 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x0097a5a0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x0097a5b0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x0097a5c0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x0097a5d0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x0097a5e0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0097a5f0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x0097a600 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x0097a610 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x0097a620 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x0097a630 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x0097a640 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x0097a650 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x0097a660 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x0097a670 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x0097a680 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x0097a690 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x0097a6a0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x0097a6b0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x0097a6c0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x0097a6d0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0097a6e0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x0097a6f0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x0097a700 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x0097a710 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x0097a720 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x0097a730 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x0097a740 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x0097a750 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x0097a760 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x0097a770 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x0097a780 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x0097a790 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x0097a7a0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x0097a7b0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x0097a7c0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x0097a7d0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x0097a7e0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x0097a7f0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x0097a800 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x0097a810 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x0097a820 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x0097a830 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x0097a840 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x0097a850 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0097a860 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x0097a870 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x0097a880 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x0097a890 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x0097a8a0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x0097a8b0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x0097a8c0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x0097a8d0 65633428 615f706f 73697469 6f6e2e78 ec4(a_position.x │ │ │ │ + 0x0097a8e0 797a2c20 3129202a 20755f6d 6f64656c yz, 1) * u_model │ │ │ │ + 0x0097a8f0 56696577 3b200a20 20202076 65633420 View; . vec4 │ │ │ │ + 0x0097a900 73686966 74656450 6f73203d 20766563 shiftedPos = vec │ │ │ │ + 0x0097a910 3428615f 6e6f726d 616c2c20 302c2030 4(a_normal, 0, 0 │ │ │ │ + 0x0097a920 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ + 0x0097a930 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x0097a940 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0097a950 73686966 74656450 6f73202a 20755f70 shiftedPos * u_p │ │ │ │ + 0x0097a960 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ + 0x0097a970 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ + 0x0097a980 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ + 0x0097a990 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ + 0x0097a9a0 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x0097a9b0 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ + 0x0097a9c0 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ + 0x0097a9d0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ + 0x0097a9e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0097a9f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0097aa00 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0097aa10 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0097aa20 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0097aa30 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0097aa40 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097aa50 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0097aa60 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0097aa70 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0097aa80 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0097aa90 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0097aaa0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0097aab0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0097aac0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0097aad0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0097aae0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0097aaf0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0097ab00 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0097ab10 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0097ab20 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0097ab30 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0097ab40 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x0097ab50 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x0097ab60 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x0097ab70 0a202069 6e207665 63342061 5f6d6173 . in vec4 a_mas │ │ │ │ + 0x0097ab80 6b546578 436f6f72 643b200a 20206f75 kTexCoord; . ou │ │ │ │ + 0x0097ab90 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ + 0x0097aba0 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ + 0x0097abb0 65633220 765f6d61 736b5465 78436f6f ec2 v_maskTexCoo │ │ │ │ + 0x0097abc0 72643b20 0a202075 6e69666f 726d206d rd; . uniform m │ │ │ │ + 0x0097abd0 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x0097abe0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x0097abf0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x0097ac00 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x0097ac10 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x0097ac20 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x0097ac30 20755f63 6f6e7472 61737447 616d6d61 u_contrastGamma │ │ │ │ + 0x0097ac40 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0097ac50 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ + 0x0097ac60 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0097ac70 5f7a5363 616c653b 200a2020 756e6966 _zScale; . unif │ │ │ │ + 0x0097ac80 6f726d20 666c6f61 7420755f 696e7465 orm float u_inte │ │ │ │ + 0x0097ac90 72706f6c 6174696f 6e3b200a 2020756e rpolation; . un │ │ │ │ + 0x0097aca0 69666f72 6d20666c 6f617420 755f6973 iform float u_is │ │ │ │ + 0x0097acb0 4f75746c 696e6550 6173733b 200a2020 OutlinePass; . │ │ │ │ + 0x0097acc0 636f6e73 7420666c 6f617420 6b536861 const float kSha │ │ │ │ + 0x0097acd0 7065436f 6f726453 63616c61 72203d20 peCoordScalar = │ │ │ │ + 0x0097ace0 31303030 2e303b20 0a202076 65633420 1000.0; . vec4 │ │ │ │ + 0x0097acf0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x0097ad00 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x0097ad10 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x0097ad20 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x0097ad30 5265616c 5a29200a 20207b20 0a202020 RealZ) . { . │ │ │ │ + 0x0097ad40 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x0097ad50 64506976 6f74203d 20706976 6f743b20 dPivot = pivot; │ │ │ │ + 0x0097ad60 0a202020 20666c6f 61742077 203d2074 . float w = t │ │ │ │ + 0x0097ad70 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0097ad80 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x0097ad90 6d656450 69766f74 2e787977 203d2028 medPivot.xyw = ( │ │ │ │ + 0x0097ada0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0097adb0 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x0097adc0 64506976 6f742e78 792c2070 69766f74 dPivot.xy, pivot │ │ │ │ + 0x0097add0 5265616c 5a2c2077 29292e78 79773b20 RealZ, w)).xyw; │ │ │ │ + 0x0097ade0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0097adf0 5069766f 742e7a20 2a3d2074 72616e73 Pivot.z *= trans │ │ │ │ + 0x0097ae00 666f726d 65645069 766f742e 77202f20 formedPivot.w / │ │ │ │ + 0x0097ae10 773b200a 20202369 66646566 2056554c w; . #ifdef VUL │ │ │ │ + 0x0097ae20 4b414e20 0a202020 20747261 6e73666f KAN . transfo │ │ │ │ + 0x0097ae30 726d6564 5069766f 742e7920 3d202d74 rmedPivot.y = -t │ │ │ │ + 0x0097ae40 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0097ae50 793b200a 20202020 7472616e 73666f72 y; . transfor │ │ │ │ + 0x0097ae60 6d656450 69766f74 2e7a203d 20287472 medPivot.z = (tr │ │ │ │ + 0x0097ae70 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x0097ae80 20202b20 7472616e 73666f72 6d656450 + transformedP │ │ │ │ + 0x0097ae90 69766f74 2e772920 2f20322e 303b200a ivot.w) / 2.0; . │ │ │ │ + 0x0097aea0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x0097aeb0 7475726e 20747261 6e73666f 726d6564 turn transformed │ │ │ │ + 0x0097aec0 5069766f 743b200a 20207d20 0a202076 Pivot; . } . v │ │ │ │ + 0x0097aed0 65633420 6170706c 7942696c 6c626f61 ec4 applyBillboa │ │ │ │ + 0x0097aee0 72645069 766f7454 72616e73 666f726d rdPivotTransform │ │ │ │ + 0x0097aef0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x0097af00 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x0097af10 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x0097af20 6c5a2c20 76656332 206f6666 73657429 lZ, vec2 offset) │ │ │ │ + 0x0097af30 200a2020 7b200a20 20202066 6c6f6174 . { . float │ │ │ │ + 0x0097af40 206c6f67 69635a20 3d207069 766f742e logicZ = pivot. │ │ │ │ + 0x0097af50 7a202f20 7069766f 742e773b 200a2020 z / pivot.w; . │ │ │ │ + 0x0097af60 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x0097af70 65645069 766f7420 3d207069 766f7454 edPivot = pivotT │ │ │ │ + 0x0097af80 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x0097af90 7069766f 742e7879 2c207069 766f7452 pivot.xy, pivotR │ │ │ │ + 0x0097afa0 65616c5a 2c207069 766f742e 77293b20 ealZ, pivot.w); │ │ │ │ + 0x0097afb0 0a202020 20766563 34207363 616c6520 . vec4 scale │ │ │ │ + 0x0097afc0 3d207069 766f7454 72616e73 666f726d = pivotTransform │ │ │ │ + 0x0097afd0 202a2076 65633428 312e302c 202d312e * vec4(1.0, -1. │ │ │ │ + 0x0097afe0 302c2030 2e302c20 312e3029 3b200a20 0, 0.0, 1.0); . │ │ │ │ + 0x0097aff0 20202076 65633420 706f7369 74696f6e vec4 position │ │ │ │ + 0x0097b000 203d2076 65633428 7472616e 73666f72 = vec4(transfor │ │ │ │ + 0x0097b010 6d656450 69766f74 2e787920 2f207472 medPivot.xy / tr │ │ │ │ + 0x0097b020 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0097b030 2c206c6f 6769635a 2c20312e 3029202b , logicZ, 1.0) + │ │ │ │ + 0x0097b040 20766563 34286f66 66736574 202f2073 vec4(offset / s │ │ │ │ + 0x0097b050 63616c65 2e77202a 20736361 6c652e78 cale.w * scale.x │ │ │ │ + 0x0097b060 2c20302e 302c2030 2e30293b 200a2020 , 0.0, 0.0); . │ │ │ │ + 0x0097b070 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x0097b080 20202070 6f736974 696f6e2e 79203d20 position.y = │ │ │ │ + 0x0097b090 2d706f73 6974696f 6e2e793b 200a2020 -position.y; . │ │ │ │ + 0x0097b0a0 2020706f 73697469 6f6e2e7a 203d2028 position.z = ( │ │ │ │ + 0x0097b0b0 706f7369 74696f6e 2e7a2020 2b20706f position.z + po │ │ │ │ + 0x0097b0c0 73697469 6f6e2e77 29202f20 322e303b sition.w) / 2.0; │ │ │ │ + 0x0097b0d0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x0097b0e0 72657475 726e2070 6f736974 696f6e3b return position; │ │ │ │ + 0x0097b0f0 200a2020 7d200a20 20766563 32206361 . } . vec2 ca │ │ │ │ + 0x0097b100 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ + 0x0097b110 64417869 73506f73 28766563 32206f72 dAxisPos(vec2 or │ │ │ │ + 0x0097b120 6967696e 616c4178 6973506f 732c2076 iginalAxisPos, v │ │ │ │ + 0x0097b130 65633220 73686966 74656450 6f732c20 ec2 shiftedPos, │ │ │ │ + 0x0097b140 6d617434 206d6f64 656c5669 65772c20 mat4 modelView, │ │ │ │ + 0x0097b150 666c6f61 74206861 6c665769 64746829 float halfWidth) │ │ │ │ + 0x0097b160 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x0097b170 70203d20 28766563 34287368 69667465 p = (vec4(shifte │ │ │ │ + 0x0097b180 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ + 0x0097b190 2a206d6f 64656c56 69657729 2e78793b * modelView).xy; │ │ │ │ + 0x0097b1a0 200a2020 20207665 63322064 203d2070 . vec2 d = p │ │ │ │ + 0x0097b1b0 202d206f 72696769 6e616c41 78697350 - originalAxisP │ │ │ │ + 0x0097b1c0 6f733b20 0a202020 20696620 28646f74 os; . if (dot │ │ │ │ + 0x0097b1d0 28642c20 64292021 3d20302e 3029200a (d, d) != 0.0) . │ │ │ │ + 0x0097b1e0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x0097b1f0 67696e61 6c417869 73506f73 202b206e ginalAxisPos + n │ │ │ │ + 0x0097b200 6f726d61 6c697a65 28642920 2a206861 ormalize(d) * ha │ │ │ │ + 0x0097b210 6c665769 6474683b 200a2020 2020656c lfWidth; . el │ │ │ │ + 0x0097b220 7365200a 20202020 20207265 7475726e se . return │ │ │ │ + 0x0097b230 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0097b240 3b200a20 207d200a 2020766f 6964206d ; . } . void m │ │ │ │ + 0x0097b250 61696e28 29200a20 207b200a 20202020 ain() . { . │ │ │ │ + 0x0097b260 76656332 206e6f72 6d616c20 3d20615f vec2 normal = a_ │ │ │ │ + 0x0097b270 6e6f726d 616c2e78 793b200a 20202020 normal.xy; . │ │ │ │ + 0x0097b280 666c6f61 74206861 6c665769 64746820 float halfWidth │ │ │ │ + 0x0097b290 3d206c65 6e677468 286e6f72 6d616c29 = length(normal) │ │ │ │ + 0x0097b2a0 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ + 0x0097b2b0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x0097b2c0 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ + 0x0097b2d0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ + 0x0097b2e0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ + 0x0097b2f0 793b200a 20202020 69662028 68616c66 y; . if (half │ │ │ │ + 0x0097b300 57696474 6820213d 20302e30 29200a20 Width != 0.0) . │ │ │ │ + 0x0097b310 2020207b 200a2020 20202020 7472616e { . tran │ │ │ │ + 0x0097b320 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x0097b330 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x0097b340 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ + 0x0097b350 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x0097b360 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ + 0x0097b370 6e6f726d 616c2c20 0a202020 20202020 normal, . │ │ │ │ + 0x0097b380 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097b390 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097b3a0 20202020 20202020 20202020 20202075 u │ │ │ │ + 0x0097b3b0 5f6d6f64 656c5669 65772c20 68616c66 _modelView, half │ │ │ │ + 0x0097b3c0 57696474 68293b20 0a202020 207d200a Width); . } . │ │ │ │ + 0x0097b3d0 20202020 666c6f61 7420754f 66667365 float uOffse │ │ │ │ + 0x0097b3e0 74203d20 6d696e28 6c656e67 74682876 t = min(length(v │ │ │ │ + 0x0097b3f0 65633428 6b536861 7065436f 6f726453 ec4(kShapeCoordS │ │ │ │ + 0x0097b400 63616c61 722c2030 2c20302c 20302920 calar, 0, 0, 0) │ │ │ │ + 0x0097b410 2a20755f 6d6f6465 6c566965 7729202a * u_modelView) * │ │ │ │ + 0x0097b420 20615f6d 61736b54 6578436f 6f72642e a_maskTexCoord. │ │ │ │ + 0x0097b430 782c2031 2e30293b 200a2020 2020765f x, 1.0); . v_ │ │ │ │ + 0x0097b440 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ + 0x0097b450 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ + 0x0097b460 200a2020 2020765f 6d61736b 54657843 . v_maskTexC │ │ │ │ + 0x0097b470 6f6f7264 203d2076 65633228 615f6d61 oord = vec2(a_ma │ │ │ │ + 0x0097b480 736b5465 78436f6f 72642e79 202b2075 skTexCoord.y + u │ │ │ │ + 0x0097b490 4f666673 6574202a 20615f6d 61736b54 Offset * a_maskT │ │ │ │ + 0x0097b4a0 6578436f 6f72642e 7a2c2061 5f6d6173 exCoord.z, a_mas │ │ │ │ + 0x0097b4b0 6b546578 436f6f72 642e7729 3b200a20 kTexCoord.w); . │ │ │ │ + 0x0097b4c0 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x0097b4d0 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ + 0x0097b4e0 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ + 0x0097b4f0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ + 0x0097b500 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ + 0x0097b510 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x0097b520 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x0097b530 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ + 0x0097b540 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x0097b550 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ + 0x0097b560 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0097b570 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0097b580 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0097b590 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097b5a0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0097b5b0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0097b5c0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0097b5d0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0097b5e0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0097b5f0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0097b600 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0097b610 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0097b620 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0097b630 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0097b640 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0097b650 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0097b660 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0097b670 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0097b680 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0097b690 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0097b6a0 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ + 0x0097b6b0 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ + 0x0097b6c0 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ + 0x0097b6d0 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x0097b6e0 3420615f 706f7369 74696f6e 3b200a20 4 a_position; . │ │ │ │ + 0x0097b6f0 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ + 0x0097b700 6c3b200a 20202369 66646566 20454e41 l; . #ifdef ENA │ │ │ │ + 0x0097b710 424c455f 56544620 0a20206f 7574204c BLE_VTF . out L │ │ │ │ + 0x0097b720 4f575f50 20766563 3420765f 636f6c6f OW_P vec4 v_colo │ │ │ │ + 0x0097b730 723b200a 20202365 6c736520 0a20206f r; . #else . o │ │ │ │ + 0x0097b740 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ + 0x0097b750 6578436f 6f72643b 200a2020 23656e64 exCoord; . #end │ │ │ │ + 0x0097b760 6966200a 20206f75 74207665 63322076 if . out vec2 v │ │ │ │ + 0x0097b770 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ + 0x0097b780 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x0097b790 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x0097b7a0 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x0097b7b0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x0097b7c0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x0097b7d0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x0097b7e0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x0097b7f0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x0097b800 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0097b810 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x0097b820 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x0097b830 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x0097b840 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x0097b850 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x0097b860 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x0097b870 6e655061 73733b20 0a202075 6e69666f nePass; . unifo │ │ │ │ + 0x0097b880 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ + 0x0097b890 6f6c6f72 5465783b 200a2020 636f6e73 olorTex; . cons │ │ │ │ + 0x0097b8a0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x0097b8b0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x0097b8c0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x0097b8d0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0097b8e0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0097b8f0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0097b900 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0097b910 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x0097b920 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0097b930 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x0097b940 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x0097b950 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x0097b960 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0097b970 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x0097b980 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0097b990 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0097b9a0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0097b9b0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x0097b9c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0097b9d0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x0097b9e0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x0097b9f0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0097ba00 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0097ba10 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x0097ba20 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x0097ba30 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0097ba40 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x0097ba50 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x0097ba60 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0097ba70 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0097ba80 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0097ba90 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0097baa0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x0097bab0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0097bac0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0097bad0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0097bae0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0097baf0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x0097bb00 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x0097bb10 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x0097bb20 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x0097bb30 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x0097bb40 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0097bb50 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x0097bb60 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x0097bb70 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x0097bb80 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x0097bb90 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x0097bba0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0097bbb0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x0097bbc0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x0097bbd0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x0097bbe0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0097bbf0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x0097bc00 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x0097bc10 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x0097bc20 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x0097bc30 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x0097bc40 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x0097bc50 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x0097bc60 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x0097bc70 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x0097bc80 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x0097bc90 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x0097bca0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x0097bcb0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0097bcc0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x0097bcd0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x0097bce0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x0097bcf0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x0097bd00 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x0097bd10 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x0097bd20 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x0097bd30 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x0097bd40 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x0097bd50 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x0097bd60 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x0097bd70 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x0097bd80 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x0097bd90 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0097bda0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x0097bdb0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x0097bdc0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x0097bdd0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x0097bde0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x0097bdf0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x0097be00 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x0097be10 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0097be20 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x0097be30 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x0097be40 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ + 0x0097be50 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ + 0x0097be60 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ + 0x0097be70 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ + 0x0097be80 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ + 0x0097be90 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ + 0x0097bea0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x0097beb0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x0097bec0 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x0097bed0 69766f74 5472616e 73666f72 6d287069 ivotTransform(pi │ │ │ │ + 0x0097bee0 766f7420 2a20755f 70726f6a 65637469 vot * u_projecti │ │ │ │ + 0x0097bef0 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ + 0x0097bf00 666f726d 2c200a20 20202020 20202020 form, . │ │ │ │ + 0x0097bf10 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097bf20 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097bf30 20202020 2020615f 706f7369 74696f6e a_position │ │ │ │ + 0x0097bf40 2e77202a 20755f7a 5363616c 652c206f .w * u_zScale, o │ │ │ │ + 0x0097bf50 66667365 742e7879 293b200a 20202369 ffset.xy); . #i │ │ │ │ + 0x0097bf60 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x0097bf70 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ + 0x0097bf80 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ + 0x0097bf90 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ + 0x0097bfa0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ + 0x0097bfb0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x0097bfc0 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ + 0x0097bfd0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x0097bfe0 0a202020 20765f6d 61736b54 6578436f . v_maskTexCo │ │ │ │ + 0x0097bff0 6f726420 3d20615f 6d61736b 54657843 ord = a_maskTexC │ │ │ │ + 0x0097c000 6f6f7264 3b200a20 207d200a 00000000 oord; . } ..... │ │ │ │ + 0x0097c010 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0097c020 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0097c030 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0097c040 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0097c050 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0097c060 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0097c070 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097c080 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0097c090 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0097c0a0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0097c0b0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0097c0c0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0097c0d0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0097c0e0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0097c0f0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0097c100 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0097c110 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0097c120 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0097c130 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0097c140 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0097c150 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0097c160 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ + 0x0097c170 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ + 0x0097c180 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ + 0x0097c190 6f6f7264 733b200a 20206f75 74207665 oords; . out ve │ │ │ │ + 0x0097c1a0 63332076 5f6e6f72 6d616c3b 200a2020 c3 v_normal; . │ │ │ │ + 0x0097c1b0 6f757420 76656332 20765f74 6578436f out vec2 v_texCo │ │ │ │ + 0x0097c1c0 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ + 0x0097c1d0 206d6174 3420755f 7472616e 73666f72 mat4 u_transfor │ │ │ │ + 0x0097c1e0 6d3b200a 2020756e 69666f72 6d206d61 m; . uniform ma │ │ │ │ + 0x0097c1f0 74342075 5f6e6f72 6d616c54 72616e73 t4 u_normalTrans │ │ │ │ + 0x0097c200 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ + 0x0097c210 20766563 3420755f 636f6c6f 723b200a vec4 u_color; . │ │ │ │ + 0x0097c220 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ + 0x0097c230 5f746578 436f6f72 64466c69 7070696e _texCoordFlippin │ │ │ │ + 0x0097c240 673b200a 2020636f 6e737420 666c6f61 g; . const floa │ │ │ │ + 0x0097c250 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x0097c260 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x0097c270 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x0097c280 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x0097c290 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x0097c2a0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x0097c2b0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x0097c2c0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x0097c2d0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x0097c2e0 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x0097c2f0 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x0097c300 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x0097c310 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x0097c320 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x0097c330 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x0097c340 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x0097c350 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x0097c360 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x0097c370 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x0097c380 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0097c390 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x0097c3a0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x0097c3b0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0097c3c0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x0097c3d0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x0097c3e0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x0097c3f0 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x0097c400 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x0097c410 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x0097c420 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x0097c430 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x0097c440 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x0097c450 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x0097c460 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x0097c470 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x0097c480 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x0097c490 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x0097c4a0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x0097c4b0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x0097c4c0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x0097c4d0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x0097c4e0 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x0097c4f0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x0097c500 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0097c510 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x0097c520 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x0097c530 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x0097c540 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x0097c550 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x0097c560 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x0097c570 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x0097c580 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x0097c590 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x0097c5a0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x0097c5b0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x0097c5c0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x0097c5d0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x0097c5e0 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x0097c5f0 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x0097c600 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x0097c610 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x0097c620 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x0097c630 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x0097c640 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x0097c650 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x0097c660 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x0097c670 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x0097c680 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x0097c690 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x0097c6a0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x0097c6b0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x0097c6c0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x0097c6d0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x0097c6e0 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x0097c6f0 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x0097c700 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x0097c710 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x0097c720 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x0097c730 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x0097c740 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x0097c750 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x0097c760 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x0097c770 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x0097c780 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x0097c790 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x0097c7a0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x0097c7b0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x0097c7c0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x0097c7d0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x0097c7e0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x0097c7f0 696f6e20 3d20755f 7472616e 73666f72 ion = u_transfor │ │ │ │ + 0x0097c800 6d202a20 76656334 28615f70 6f732c20 m * vec4(a_pos, │ │ │ │ + 0x0097c810 312e3029 3b200a20 20202076 5f6e6f72 1.0); . v_nor │ │ │ │ + 0x0097c820 6d616c20 3d206e6f 726d616c 697a6528 mal = normalize( │ │ │ │ + 0x0097c830 28755f6e 6f726d61 6c547261 6e73666f (u_normalTransfo │ │ │ │ + 0x0097c840 726d202a 20766563 3428615f 6e6f726d rm * vec4(a_norm │ │ │ │ + 0x0097c850 616c2c20 302e3029 292e7879 7a293b20 al, 0.0)).xyz); │ │ │ │ + 0x0097c860 0a202020 20765f74 6578436f 6f726473 . v_texCoords │ │ │ │ + 0x0097c870 203d206d 69782861 5f746578 436f6f72 = mix(a_texCoor │ │ │ │ + 0x0097c880 64732c20 312e3020 2d20615f 74657843 ds, 1.0 - a_texC │ │ │ │ + 0x0097c890 6f6f7264 732c2075 5f746578 436f6f72 oords, u_texCoor │ │ │ │ + 0x0097c8a0 64466c69 7070696e 67293b20 0a202020 dFlipping); . │ │ │ │ + 0x0097c8b0 20676c5f 506f7369 74696f6e 203d2070 gl_Position = p │ │ │ │ + 0x0097c8c0 6f736974 696f6e3b 200a2020 23696664 osition; . #ifd │ │ │ │ + 0x0097c8d0 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ + 0x0097c8e0 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ + 0x0097c8f0 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ + 0x0097c900 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ + 0x0097c910 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ + 0x0097c920 2e7a202b 20676c5f 506f7369 74696f6e .z + gl_Position │ │ │ │ + 0x0097c930 2e772920 2a20302e 353b200a 20202365 .w) * 0.5; . #e │ │ │ │ + 0x0097c940 6e646966 200a2020 7d200a00 00000000 ndif . } ...... │ │ │ │ + 0x0097c950 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0097c960 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0097c970 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0097c980 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0097c990 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0097c9a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0097c9b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097c9c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0097c9d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0097c9e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0097c9f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0097ca00 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0097ca10 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0097ca20 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0097ca30 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0097ca40 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0097ca50 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0097ca60 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0097ca70 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0097ca80 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0097ca90 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0097caa0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0097cab0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x0097cac0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x0097cad0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x0097cae0 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ + 0x0097caf0 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ + 0x0097cb00 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ + 0x0097cb10 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ + 0x0097cb20 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ + 0x0097cb30 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x0097cb40 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x0097cb50 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ + 0x0097cb60 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x0097cb70 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x0097cb80 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x0097cb90 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x0097cba0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x0097cbb0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x0097cbc0 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x0097cbd0 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x0097cbe0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x0097cbf0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0097cc00 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x0097cc10 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0097cc20 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x0097cc30 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0097cc40 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x0097cc50 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x0097cc60 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ + 0x0097cc70 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x0097cc80 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ + 0x0097cc90 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x0097cca0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x0097ccb0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x0097ccc0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x0097ccd0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x0097cce0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x0097ccf0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x0097cd00 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x0097cd10 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0097cd20 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0097cd30 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x0097cd40 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x0097cd50 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x0097cd60 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x0097cd70 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x0097cd80 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x0097cd90 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x0097cda0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x0097cdb0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x0097cdc0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x0097cdd0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0097cde0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x0097cdf0 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x0097ce00 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x0097ce10 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x0097ce20 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x0097ce30 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x0097ce40 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x0097ce50 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x0097ce60 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x0097ce70 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x0097ce80 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x0097ce90 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x0097cea0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x0097ceb0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x0097cec0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x0097ced0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x0097cee0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x0097cef0 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x0097cf00 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x0097cf10 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x0097cf20 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x0097cf30 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x0097cf40 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x0097cf50 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0097cf60 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x0097cf70 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x0097cf80 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x0097cf90 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x0097cfa0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x0097cfb0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x0097cfc0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x0097cfd0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x0097cfe0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x0097cff0 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x0097d000 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x0097d010 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x0097d020 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x0097d030 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x0097d040 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0097d050 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x0097d060 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x0097d070 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x0097d080 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x0097d090 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x0097d0a0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x0097d0b0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x0097d0c0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x0097d0d0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x0097d0e0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x0097d0f0 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x0097d100 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x0097d110 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x0097d120 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x0097d130 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x0097d140 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x0097d150 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x0097d160 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x0097d170 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x0097d180 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x0097d190 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x0097d1a0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x0097d1b0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x0097d1c0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0097d1d0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x0097d1e0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x0097d1f0 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x0097d200 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x0097d210 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x0097d220 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x0097d230 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ + 0x0097d240 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ + 0x0097d250 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ + 0x0097d260 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x0097d270 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ + 0x0097d280 202b2061 5f636f6c 6f725465 78436f6f + a_colorTexCoo │ │ │ │ + 0x0097d290 7264732e 7a772c20 302c2030 29202b20 rds.zw, 0, 0) + │ │ │ │ + 0x0097d2a0 703b200a 20202020 676c5f50 6f736974 p; . gl_Posit │ │ │ │ + 0x0097d2b0 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x0097d2c0 5472616e 73666f72 6d28706f 73202a20 Transform(pos * │ │ │ │ + 0x0097d2d0 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ + 0x0097d2e0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0097d2f0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x0097d300 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ + 0x0097d310 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ + 0x0097d320 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ + 0x0097d330 636f6c6f 72546578 436f6f72 64732e78 colorTexCoords.x │ │ │ │ + 0x0097d340 79293b20 0a202023 656c7365 200a2020 y); . #else . │ │ │ │ + 0x0097d350 2020765f 636f6c6f 72546578 436f6f72 v_colorTexCoor │ │ │ │ + 0x0097d360 6473203d 20615f63 6f6c6f72 54657843 ds = a_colorTexC │ │ │ │ + 0x0097d370 6f6f7264 732e7879 3b200a20 2023656e oords.xy; . #en │ │ │ │ + 0x0097d380 64696620 0a202020 20765f6e 6f726d61 dif . v_norma │ │ │ │ + 0x0097d390 6c203d20 615f6e6f 726d616c 3b200a20 l = a_normal; . │ │ │ │ + 0x0097d3a0 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ + 0x0097d3b0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0097d3c0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0097d3d0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0097d3e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097d3f0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0097d400 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0097d410 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0097d420 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0097d430 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0097d440 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0097d450 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0097d460 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0097d470 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0097d480 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0097d490 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0097d4a0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0097d4b0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0097d4c0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0097d4d0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0097d4e0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0097d4f0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0097d500 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ + 0x0097d510 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ + 0x0097d520 20666c6f 61742076 5f696e74 656e7369 float v_intensi │ │ │ │ + 0x0097d530 74793b20 0a202075 6e69666f 726d206d ty; . uniform m │ │ │ │ + 0x0097d540 61743420 755f7472 616e7366 6f726d3b at4 u_transform; │ │ │ │ + 0x0097d550 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x0097d560 20755f6e 6f726d61 6c547261 6e73666f u_normalTransfo │ │ │ │ + 0x0097d570 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x0097d580 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ + 0x0097d590 756e6966 6f726d20 76656332 20755f74 uniform vec2 u_t │ │ │ │ + 0x0097d5a0 6578436f 6f726446 6c697070 696e673b exCoordFlipping; │ │ │ │ + 0x0097d5b0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x0097d5c0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x0097d5d0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x0097d5e0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x0097d5f0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x0097d600 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x0097d610 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x0097d620 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x0097d630 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0097d640 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0097d650 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x0097d660 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x0097d670 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x0097d680 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x0097d690 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x0097d6a0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x0097d6b0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x0097d6c0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x0097d6d0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x0097d6e0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x0097d6f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0097d700 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x0097d710 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x0097d720 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x0097d730 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x0097d740 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x0097d750 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x0097d760 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x0097d770 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x0097d780 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x0097d790 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x0097d7a0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x0097d7b0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x0097d7c0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x0097d7d0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x0097d7e0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x0097d7f0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x0097d800 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x0097d810 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x0097d820 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x0097d830 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x0097d840 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x0097d850 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x0097d860 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x0097d870 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0097d880 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x0097d890 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x0097d8a0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x0097d8b0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x0097d8c0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x0097d8d0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x0097d8e0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x0097d8f0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x0097d900 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x0097d910 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x0097d920 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x0097d930 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x0097d940 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x0097d950 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x0097d960 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0097d970 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x0097d980 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x0097d990 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x0097d9a0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x0097d9b0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x0097d9c0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x0097d9d0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x0097d9e0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x0097d9f0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x0097da00 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x0097da10 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x0097da20 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x0097da30 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x0097da40 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x0097da50 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x0097da60 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x0097da70 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x0097da80 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x0097da90 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x0097daa0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x0097dab0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x0097dac0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x0097dad0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x0097dae0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0097daf0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x0097db00 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x0097db10 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x0097db20 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x0097db30 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x0097db40 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x0097db50 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x0097db60 6e203d20 755f7472 616e7366 6f726d20 n = u_transform │ │ │ │ + 0x0097db70 2a207665 63342861 5f706f73 2c20312e * vec4(a_pos, 1. │ │ │ │ + 0x0097db80 30293b20 0a202020 20765f69 6e74656e 0); . v_inten │ │ │ │ + 0x0097db90 73697479 203d2061 5f746578 436f6f72 sity = a_texCoor │ │ │ │ + 0x0097dba0 64732e78 3b200a20 20202067 6c5f506f ds.x; . gl_Po │ │ │ │ + 0x0097dbb0 73697469 6f6e203d 20706f73 6974696f sition = positio │ │ │ │ + 0x0097dbc0 6e3b200a 20202369 66646566 2056554c n; . #ifdef VUL │ │ │ │ + 0x0097dbd0 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ + 0x0097dbe0 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ + 0x0097dbf0 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ + 0x0097dc00 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ + 0x0097dc10 6c5f506f 73697469 6f6e2e7a 202b2067 l_Position.z + g │ │ │ │ + 0x0097dc20 6c5f506f 73697469 6f6e2e77 29202a20 l_Position.w) * │ │ │ │ + 0x0097dc30 302e353b 200a2020 23656e64 6966200a 0.5; . #endif . │ │ │ │ + 0x0097dc40 20207d20 0a000000 20202023 69666465 } .... #ifde │ │ │ │ + 0x0097dc50 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0097dc60 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0097dc70 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0097dc80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097dc90 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0097dca0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0097dcb0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0097dcc0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0097dcd0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0097dce0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0097dcf0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0097dd00 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0097dd10 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0097dd20 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0097dd30 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0097dd40 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0097dd50 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0097dd60 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0097dd70 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0097dd80 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0097dd90 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x0097dda0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0097ddb0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x0097ddc0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x0097ddd0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x0097dde0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x0097ddf0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ + 0x0097de00 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x0097de10 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x0097de20 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x0097de30 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0097de40 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x0097de50 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x0097de60 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x0097de70 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x0097de80 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x0097de90 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0097dea0 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x0097deb0 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x0097dec0 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x0097ded0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0097dee0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x0097def0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x0097df00 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x0097df10 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x0097df20 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x0097df30 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x0097df40 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x0097df50 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x0097df60 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x0097df70 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x0097df80 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x0097df90 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x0097dfa0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x0097dfb0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x0097dfc0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x0097dfd0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x0097dfe0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x0097dff0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x0097e000 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x0097e010 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x0097e020 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x0097e030 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0097e040 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x0097e050 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x0097e060 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x0097e070 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x0097e080 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x0097e090 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x0097e0a0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0097e0b0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x0097e0c0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x0097e0d0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0097e0e0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x0097e0f0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x0097e100 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x0097e110 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x0097e120 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x0097e130 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x0097e140 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x0097e150 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x0097e160 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x0097e170 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x0097e180 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x0097e190 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0097e1a0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0097e1b0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0097e1c0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x0097e1d0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x0097e1e0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x0097e1f0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x0097e200 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x0097e210 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x0097e220 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x0097e230 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x0097e240 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x0097e250 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0097e260 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x0097e270 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x0097e280 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x0097e290 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x0097e2a0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x0097e2b0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x0097e2c0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x0097e2d0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x0097e2e0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x0097e2f0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x0097e300 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x0097e310 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x0097e320 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x0097e330 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x0097e340 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x0097e350 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0097e360 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x0097e370 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x0097e380 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x0097e390 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x0097e3a0 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x0097e3b0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x0097e3c0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x0097e3d0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x0097e3e0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x0097e3f0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x0097e400 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x0097e410 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x0097e420 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x0097e430 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x0097e440 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x0097e450 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x0097e460 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x0097e470 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x0097e480 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x0097e490 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x0097e4a0 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x0097e4b0 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ + 0x0097e4c0 6965773b 200a2020 2020666c 6f617420 iew; . float │ │ │ │ + 0x0097e4d0 6e6f726d 616c4c65 6e203d20 6c656e67 normalLen = leng │ │ │ │ + 0x0097e4e0 74682861 5f6e6f72 6d616c29 3b200a20 th(a_normal); . │ │ │ │ + 0x0097e4f0 20202076 65633420 6e203d20 76656334 vec4 n = vec4 │ │ │ │ + 0x0097e500 28615f70 6f736974 696f6e2e 7879202b (a_position.xy + │ │ │ │ + 0x0097e510 20615f6e 6f726d61 6c202a20 6b536861 a_normal * kSha │ │ │ │ + 0x0097e520 7065436f 6f726453 63616c61 722c2030 peCoordScalar, 0 │ │ │ │ + 0x0097e530 2e302c20 302e3029 202a2075 5f6d6f64 .0, 0.0) * u_mod │ │ │ │ + 0x0097e540 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ + 0x0097e550 34206e6f 726d203d 20766563 3428302e 4 norm = vec4(0. │ │ │ │ + 0x0097e560 302c2030 2e302c20 302e302c 20302e30 0, 0.0, 0.0, 0.0 │ │ │ │ + 0x0097e570 293b200a 20202020 69662028 646f7428 ); . if (dot( │ │ │ │ + 0x0097e580 6e2c206e 2920213d 20302e30 29200a20 n, n) != 0.0) . │ │ │ │ + 0x0097e590 20202020 206e6f72 6d203d20 6e6f726d norm = norm │ │ │ │ + 0x0097e5a0 616c697a 65286e29 202a206e 6f726d61 alize(n) * norma │ │ │ │ + 0x0097e5b0 6c4c656e 3b200a20 20202076 65633420 lLen; . vec4 │ │ │ │ + 0x0097e5c0 73686966 74656450 6f73203d 206e6f72 shiftedPos = nor │ │ │ │ + 0x0097e5d0 6d202b20 706f733b 200a2020 2020676c m + pos; . gl │ │ │ │ + 0x0097e5e0 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x0097e5f0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0097e600 73686966 74656450 6f73202a 20755f70 shiftedPos * u_p │ │ │ │ + 0x0097e610 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ + 0x0097e620 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ + 0x0097e630 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ + 0x0097e640 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ + 0x0097e650 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x0097e660 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x0097e670 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0097e680 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0097e690 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0097e6a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097e6b0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0097e6c0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0097e6d0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0097e6e0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0097e6f0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0097e700 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0097e710 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0097e720 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0097e730 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0097e740 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0097e750 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0097e760 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0097e770 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0097e780 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0097e790 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0097e7a0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0097e7b0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0097e7c0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0097e7d0 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x0097e7e0 64733b20 0a202023 69666465 6620454e ds; . #ifdef EN │ │ │ │ + 0x0097e7f0 41424c45 5f565446 200a2020 6f757420 ABLE_VTF . out │ │ │ │ + 0x0097e800 4c4f575f 50207665 63342076 5f636f6c LOW_P vec4 v_col │ │ │ │ + 0x0097e810 6f723b20 0a202023 656c7365 200a2020 or; . #else . │ │ │ │ + 0x0097e820 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x0097e830 54657843 6f6f7264 733b200a 20202365 TexCoords; . #e │ │ │ │ + 0x0097e840 6e646966 200a2020 756e6966 6f726d20 ndif . uniform │ │ │ │ + 0x0097e850 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ + 0x0097e860 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0097e870 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ + 0x0097e880 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0097e890 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x0097e8a0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x0097e8b0 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ + 0x0097e8c0 613b200a 2020756e 69666f72 6d20666c a; . uniform fl │ │ │ │ + 0x0097e8d0 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ + 0x0097e8e0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0097e8f0 755f7a53 63616c65 3b200a20 20756e69 u_zScale; . uni │ │ │ │ + 0x0097e900 666f726d 20666c6f 61742075 5f696e74 form float u_int │ │ │ │ + 0x0097e910 6572706f 6c617469 6f6e3b20 0a202075 erpolation; . u │ │ │ │ + 0x0097e920 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x0097e930 734f7574 6c696e65 50617373 3b200a20 sOutlinePass; . │ │ │ │ + 0x0097e940 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x0097e950 5446200a 2020756e 69666f72 6d207361 TF . uniform sa │ │ │ │ + 0x0097e960 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ + 0x0097e970 65783b20 0a202023 656e6469 66200a20 ex; . #endif . │ │ │ │ + 0x0097e980 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x0097e990 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x0097e9a0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x0097e9b0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x0097e9c0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x0097e9d0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x0097e9e0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x0097e9f0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x0097ea00 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x0097ea10 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x0097ea20 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x0097ea30 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0097ea40 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x0097ea50 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x0097ea60 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x0097ea70 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x0097ea80 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x0097ea90 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x0097eaa0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0097eab0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x0097eac0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x0097ead0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x0097eae0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x0097eaf0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x0097eb00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0097eb10 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x0097eb20 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x0097eb30 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0097eb40 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x0097eb50 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x0097eb60 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x0097eb70 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x0097eb80 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x0097eb90 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x0097eba0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x0097ebb0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0097ebc0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0097ebd0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0097ebe0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x0097ebf0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x0097ec00 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x0097ec10 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x0097ec20 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x0097ec30 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x0097ec40 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0097ec50 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x0097ec60 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x0097ec70 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x0097ec80 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x0097ec90 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x0097eca0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x0097ecb0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x0097ecc0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x0097ecd0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x0097ece0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0097ecf0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x0097ed00 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x0097ed10 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x0097ed20 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x0097ed30 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x0097ed40 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x0097ed50 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x0097ed60 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x0097ed70 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x0097ed80 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x0097ed90 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0097eda0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x0097edb0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x0097edc0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x0097edd0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x0097ede0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x0097edf0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x0097ee00 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x0097ee10 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x0097ee20 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x0097ee30 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x0097ee40 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x0097ee50 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x0097ee60 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x0097ee70 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x0097ee80 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x0097ee90 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x0097eea0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x0097eeb0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x0097eec0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x0097eed0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x0097eee0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x0097eef0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x0097ef00 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x0097ef10 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x0097ef20 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ + 0x0097ef30 28615f70 6f736974 696f6e2c 20312e30 (a_position, 1.0 │ │ │ │ + 0x0097ef40 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x0097ef50 200a2020 2020706f 732e7879 77203d20 . pos.xyw = │ │ │ │ + 0x0097ef60 28706f73 202a2075 5f70726f 6a656374 (pos * u_project │ │ │ │ + 0x0097ef70 696f6e29 2e787977 3b200a20 20202070 ion).xyw; . p │ │ │ │ + 0x0097ef80 6f732e7a 203d2061 5f706f73 6974696f os.z = a_positio │ │ │ │ + 0x0097ef90 6e2e7a20 2a20755f 7a536361 6c653b20 n.z * u_zScale; │ │ │ │ + 0x0097efa0 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x0097efb0 203d2075 5f706976 6f745472 616e7366 = u_pivotTransf │ │ │ │ + 0x0097efc0 6f726d20 2a20706f 733b200a 20202369 orm * pos; . #i │ │ │ │ + 0x0097efd0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0097efe0 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ + 0x0097eff0 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ + 0x0097f000 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x0097f010 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ + 0x0097f020 6f6e2e7a 20202b20 676c5f50 6f736974 on.z + gl_Posit │ │ │ │ + 0x0097f030 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ + 0x0097f040 2023656e 64696620 0a202023 69666465 #endif . #ifde │ │ │ │ + 0x0097f050 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x0097f060 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ + 0x0097f070 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ + 0x0097f080 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x0097f090 293b200a 20202365 6c736520 0a202020 ); . #else . │ │ │ │ + 0x0097f0a0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x0097f0b0 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ + 0x0097f0c0 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ + 0x0097f0d0 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ + 0x0097f0e0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0097f0f0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0097f100 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0097f110 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097f120 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0097f130 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0097f140 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0097f150 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0097f160 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0097f170 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0097f180 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0097f190 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0097f1a0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0097f1b0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0097f1c0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0097f1d0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0097f1e0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0097f1f0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0097f200 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0097f210 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0097f220 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x0097f230 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0097f240 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x0097f250 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x0097f260 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x0097f270 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x0097f280 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ + 0x0097f290 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x0097f2a0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x0097f2b0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x0097f2c0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0097f2d0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x0097f2e0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x0097f2f0 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x0097f300 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x0097f310 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x0097f320 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0097f330 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x0097f340 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x0097f350 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x0097f360 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0097f370 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x0097f380 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x0097f390 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x0097f3a0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x0097f3b0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x0097f3c0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x0097f3d0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x0097f3e0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x0097f3f0 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x0097f400 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x0097f410 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x0097f420 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x0097f430 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x0097f440 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x0097f450 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x0097f460 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x0097f470 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x0097f480 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x0097f490 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x0097f4a0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x0097f4b0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x0097f4c0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0097f4d0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x0097f4e0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x0097f4f0 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x0097f500 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x0097f510 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x0097f520 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x0097f530 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0097f540 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x0097f550 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x0097f560 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0097f570 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x0097f580 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x0097f590 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x0097f5a0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x0097f5b0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x0097f5c0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x0097f5d0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x0097f5e0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x0097f5f0 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x0097f600 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x0097f610 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x0097f620 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0097f630 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0097f640 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0097f650 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x0097f660 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x0097f670 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x0097f680 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x0097f690 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x0097f6a0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x0097f6b0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x0097f6c0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x0097f6d0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x0097f6e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0097f6f0 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x0097f700 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x0097f710 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x0097f720 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x0097f730 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x0097f740 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x0097f750 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x0097f760 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x0097f770 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x0097f780 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x0097f790 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x0097f7a0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x0097f7b0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x0097f7c0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x0097f7d0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x0097f7e0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0097f7f0 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x0097f800 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x0097f810 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x0097f820 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x0097f830 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x0097f840 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x0097f850 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x0097f860 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x0097f870 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x0097f880 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x0097f890 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x0097f8a0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x0097f8b0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x0097f8c0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x0097f8d0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x0097f8e0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x0097f8f0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x0097f900 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x0097f910 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x0097f920 20202076 65633420 7069766f 74203d20 vec4 pivot = │ │ │ │ + 0x0097f930 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x0097f940 78797a2c 20312e30 29202a20 755f6d6f xyz, 1.0) * u_mo │ │ │ │ + 0x0097f950 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ + 0x0097f960 6334206f 66667365 74203d20 76656334 c4 offset = vec4 │ │ │ │ + 0x0097f970 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ + 0x0097f980 302e3029 202a2075 5f70726f 6a656374 0.0) * u_project │ │ │ │ + 0x0097f990 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ + 0x0097f9a0 6974696f 6e203d20 6170706c 7942696c ition = applyBil │ │ │ │ + 0x0097f9b0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x0097f9c0 666f726d 28706976 6f74202a 20755f70 form(pivot * u_p │ │ │ │ + 0x0097f9d0 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ + 0x0097f9e0 6f745472 616e7366 6f726d2c 200a2020 otTransform, . │ │ │ │ + 0x0097f9f0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097fa00 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0097fa10 20202020 20202020 20202020 20615f70 a_p │ │ │ │ + 0x0097fa20 6f736974 696f6e2e 77202a20 755f7a53 osition.w * u_zS │ │ │ │ + 0x0097fa30 63616c65 2c206f66 66736574 2e787929 cale, offset.xy) │ │ │ │ + 0x0097fa40 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ + 0x0097fa50 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ + 0x0097fa60 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ + 0x0097fa70 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x0097fa80 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0097fa90 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0097faa0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0097fab0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0097fac0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0097fad0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0097fae0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0097faf0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0097fb00 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0097fb10 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0097fb20 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0097fb30 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0097fb40 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0097fb50 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0097fb60 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0097fb70 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0097fb80 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0097fb90 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0097fba0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0097fbb0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0097fbc0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0097fbd0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0097fbe0 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x0097fbf0 6e207665 63342061 5f636f6c 6f725465 n vec4 a_colorTe │ │ │ │ + 0x0097fc00 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x0097fc10 76656334 20765f6e 6f726d61 6c3b200a vec4 v_normal; . │ │ │ │ + 0x0097fc20 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ + 0x0097fc30 56544620 0a20206f 7574204c 4f575f50 VTF . out LOW_P │ │ │ │ + 0x0097fc40 20766563 3420765f 636f6c6f 723b200a vec4 v_color; . │ │ │ │ + 0x0097fc50 20202365 6c736520 0a20206f 75742076 #else . out v │ │ │ │ + 0x0097fc60 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ + 0x0097fc70 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ + 0x0097fc80 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0097fc90 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0097fca0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0097fcb0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x0097fcc0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x0097fcd0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x0097fce0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x0097fcf0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x0097fd00 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0097fd10 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x0097fd20 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x0097fd30 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x0097fd40 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x0097fd50 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x0097fd60 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x0097fd70 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ + 0x0097fd80 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x0097fd90 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x0097fda0 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x0097fdb0 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ + 0x0097fdc0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x0097fdd0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x0097fde0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x0097fdf0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0097fe00 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0097fe10 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0097fe20 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0097fe30 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x0097fe40 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0097fe50 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x0097fe60 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x0097fe70 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x0097fe80 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0097fe90 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x0097fea0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0097feb0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0097fec0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0097fed0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x0097fee0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0097fef0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x0097ff00 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x0097ff10 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0097ff20 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0097ff30 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x0097ff40 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x0097ff50 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0097ff60 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x0097ff70 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x0097ff80 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0097ff90 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0097ffa0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0097ffb0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0097ffc0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x0097ffd0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0097ffe0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0097fff0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00980000 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00980010 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x00980020 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x00980030 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x00980040 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00980050 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00980060 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00980070 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00980080 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00980090 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x009800a0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x009800b0 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x009800c0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x009800d0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x009800e0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x009800f0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x00980100 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00980110 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x00980120 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x00980130 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x00980140 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x00980150 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00980160 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00980170 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00980180 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00980190 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x009801a0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x009801b0 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x009801c0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x009801d0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x009801e0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x009801f0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x00980200 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x00980210 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x00980220 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x00980230 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x00980240 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x00980250 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00980260 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00980270 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00980280 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00980290 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x009802a0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x009802b0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x009802c0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x009802d0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x009802e0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x009802f0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x00980300 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x00980310 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x00980320 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x00980330 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00980340 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00980350 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00980360 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ + 0x00980370 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ + 0x00980380 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ + 0x00980390 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ + 0x009803a0 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ + 0x009803b0 616c2e78 79202b20 615f636f 6c6f7254 al.xy + a_colorT │ │ │ │ + 0x009803c0 6578436f 6f726473 2e7a772c 20302e30 exCoords.zw, 0.0 │ │ │ │ + 0x009803d0 2c20302e 3029202a 20755f70 726f6a65 , 0.0) * u_proje │ │ │ │ + 0x009803e0 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ + 0x009803f0 6f736974 696f6e20 3d206170 706c7942 osition = applyB │ │ │ │ + 0x00980400 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00980410 6e73666f 726d2870 69766f74 202a2075 nsform(pivot * u │ │ │ │ + 0x00980420 5f70726f 6a656374 696f6e2c 20755f70 _projection, u_p │ │ │ │ + 0x00980430 69766f74 5472616e 73666f72 6d2c2030 ivotTransform, 0 │ │ │ │ + 0x00980440 2e302c20 6f666673 65742e78 79293b20 .0, offset.xy); │ │ │ │ + 0x00980450 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00980460 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ + 0x00980470 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ + 0x00980480 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ + 0x00980490 6578436f 6f726473 2e787929 3b200a20 exCoords.xy); . │ │ │ │ + 0x009804a0 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ + 0x009804b0 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x009804c0 5f636f6c 6f725465 78436f6f 7264732e _colorTexCoords. │ │ │ │ + 0x009804d0 78793b20 0a202023 656e6469 66200a20 xy; . #endif . │ │ │ │ + 0x009804e0 20202076 5f6e6f72 6d616c20 3d20615f v_normal = a_ │ │ │ │ + 0x009804f0 6e6f726d 616c3b20 0a20207d 200a0000 normal; . } ... │ │ │ │ + 0x00980500 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00980510 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00980520 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00980530 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00980540 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00980550 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00980560 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00980570 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00980580 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00980590 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x009805a0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009805b0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009805c0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009805d0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009805e0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009805f0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00980600 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00980610 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00980620 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00980630 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00980640 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00980650 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x00980660 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x00980670 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ + 0x00980680 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x00980690 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ + 0x009806a0 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ + 0x009806b0 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ + 0x009806c0 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ + 0x009806d0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x009806e0 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x009806f0 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x00980700 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x00980710 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00980720 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00980730 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x00980740 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x00980750 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00980760 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00980770 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00980780 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00980790 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ + 0x009807a0 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ + 0x009807b0 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ + 0x009807c0 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ + 0x009807d0 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ + 0x009807e0 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ + 0x009807f0 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ + 0x00980800 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00980810 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ + 0x00980820 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00980830 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ + 0x00980840 733b200a 20202369 66646566 20454e41 s; . #ifdef ENA │ │ │ │ + 0x00980850 424c455f 56544620 0a202075 6e69666f BLE_VTF . unifo │ │ │ │ + 0x00980860 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ + 0x00980870 6f6c6f72 5465783b 200a2020 23656e64 olorTex; . #end │ │ │ │ + 0x00980880 6966200a 2020636f 6e737420 666c6f61 if . const floa │ │ │ │ + 0x00980890 74204261 73654465 70746853 68696674 t BaseDepthShift │ │ │ │ + 0x009808a0 203d202d 31302e30 3b200a20 20636f6e = -10.0; . con │ │ │ │ + 0x009808b0 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x009808c0 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x009808d0 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x009808e0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x009808f0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x00980900 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00980910 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00980920 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x00980930 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00980940 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00980950 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00980960 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00980970 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00980980 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00980990 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x009809a0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x009809b0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x009809c0 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x009809d0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x009809e0 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x009809f0 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x00980a00 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00980a10 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00980a20 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x00980a30 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00980a40 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00980a50 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x00980a60 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x00980a70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00980a80 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x00980a90 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00980aa0 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x00980ab0 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x00980ac0 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00980ad0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00980ae0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00980af0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00980b00 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x00980b10 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x00980b20 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x00980b30 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00980b40 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x00980b50 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00980b60 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x00980b70 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x00980b80 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00980b90 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x00980ba0 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x00980bb0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00980bc0 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x00980bd0 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00980be0 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x00980bf0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00980c00 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x00980c10 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x00980c20 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x00980c30 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00980c40 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x00980c50 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x00980c60 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00980c70 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x00980c80 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x00980c90 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x00980ca0 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x00980cb0 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x00980cc0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00980cd0 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x00980ce0 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x00980cf0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00980d00 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x00980d10 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x00980d20 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x00980d30 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x00980d40 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x00980d50 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x00980d60 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x00980d70 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x00980d80 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x00980d90 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x00980da0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00980db0 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x00980dc0 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x00980dd0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00980de0 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x00980df0 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x00980e00 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x00980e10 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00980e20 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00980e30 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x00980e40 2829200a 20207b20 0a202020 20666c6f () . { . flo │ │ │ │ + 0x00980e50 61742069 734f7574 6c696e65 203d2073 at isOutline = s │ │ │ │ + 0x00980e60 74657028 302e352c 20755f69 734f7574 tep(0.5, u_isOut │ │ │ │ + 0x00980e70 6c696e65 50617373 293b200a 20202020 linePass); . │ │ │ │ + 0x00980e80 666c6f61 74206e6f 744f7574 6c696e65 float notOutline │ │ │ │ + 0x00980e90 203d2031 2e30202d 2069734f 75746c69 = 1.0 - isOutli │ │ │ │ + 0x00980ea0 6e653b20 0a202020 20666c6f 61742064 ne; . float d │ │ │ │ + 0x00980eb0 65707468 53686966 74203d20 42617365 epthShift = Base │ │ │ │ + 0x00980ec0 44657074 68536869 6674202a 2069734f DepthShift * isO │ │ │ │ + 0x00980ed0 75746c69 6e653b20 0a202020 20766563 utline; . vec │ │ │ │ + 0x00980ee0 3420706f 73203d20 28766563 3428615f 4 pos = (vec4(a_ │ │ │ │ + 0x00980ef0 706f7369 74696f6e 2e78797a 2c203129 position.xyz, 1) │ │ │ │ + 0x00980f00 202b2076 65633428 302e302c 20302e30 + vec4(0.0, 0.0 │ │ │ │ + 0x00980f10 2c206465 70746853 68696674 2c20302e , depthShift, 0. │ │ │ │ + 0x00980f20 30292920 2a20755f 6d6f6465 6c566965 0)) * u_modelVie │ │ │ │ + 0x00980f30 773b200a 20202020 76656334 20736869 w; . vec4 shi │ │ │ │ + 0x00980f40 66746564 506f7320 3d207665 63342861 ftedPos = vec4(a │ │ │ │ + 0x00980f50 5f6e6f72 6d616c2c 20302e30 2c20302e _normal, 0.0, 0. │ │ │ │ + 0x00980f60 3029202b 20706f73 3b200a20 20202067 0) + pos; . g │ │ │ │ + 0x00980f70 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x00980f80 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00980f90 28736869 66746564 506f7320 2a20755f (shiftedPos * u_ │ │ │ │ + 0x00980fa0 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00980fb0 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x00980fc0 30293b20 0a202020 20766563 3220636f 0); . vec2 co │ │ │ │ + 0x00980fd0 6c6f7254 6578436f 6f726420 3d20615f lorTexCoord = a_ │ │ │ │ + 0x00980fe0 636f6c6f 72546578 436f6f72 64202a20 colorTexCoord * │ │ │ │ + 0x00980ff0 6e6f744f 75746c69 6e65202b 20615f6f notOutline + a_o │ │ │ │ + 0x00981000 75746c69 6e65436f 6c6f7254 6578436f utlineColorTexCo │ │ │ │ + 0x00981010 6f726420 2a206973 4f75746c 696e653b ord * isOutline; │ │ │ │ + 0x00981020 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00981030 455f5654 46200a20 20202076 5f636f6c E_VTF . v_col │ │ │ │ + 0x00981040 6f72203d 20746578 74757265 28755f63 or = texture(u_c │ │ │ │ + 0x00981050 6f6c6f72 5465782c 20636f6c 6f725465 olorTex, colorTe │ │ │ │ + 0x00981060 78436f6f 7264293b 200a2020 23656c73 xCoord); . #els │ │ │ │ + 0x00981070 65200a20 20202076 5f636f6c 6f725465 e . v_colorTe │ │ │ │ + 0x00981080 78436f6f 7264203d 20636f6c 6f725465 xCoord = colorTe │ │ │ │ + 0x00981090 78436f6f 72643b20 0a202023 656e6469 xCoord; . #endi │ │ │ │ + 0x009810a0 66200a20 20202076 5f6d6173 6b546578 f . v_maskTex │ │ │ │ + 0x009810b0 436f6f72 64203d20 615f6d61 736b5465 Coord = a_maskTe │ │ │ │ + 0x009810c0 78436f6f 72643b20 0a20207d 200a0000 xCoord; . } ... │ │ │ │ + 0x009810d0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009810e0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009810f0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00981100 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00981110 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00981120 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00981130 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00981140 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00981150 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00981160 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00981170 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00981180 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00981190 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009811a0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009811b0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009811c0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009811d0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009811e0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009811f0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00981200 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00981210 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00981220 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00981230 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00981240 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00981250 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00981260 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ + 0x00981270 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ + 0x00981280 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x00981290 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ + 0x009812a0 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x009812b0 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x009812c0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x009812d0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x009812e0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x009812f0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00981300 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00981310 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00981320 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00981330 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00981340 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00981350 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00981360 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00981370 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00981380 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00981390 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009813a0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x009813b0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x009813c0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x009813d0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x009813e0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x009813f0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00981400 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00981410 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00981420 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00981430 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00981440 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00981450 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00981460 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00981470 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00981480 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00981490 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x009814a0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x009814b0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x009814c0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x009814d0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x009814e0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x009814f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00981500 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00981510 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00981520 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00981530 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00981540 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00981550 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00981560 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00981570 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00981580 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00981590 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x009815a0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x009815b0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x009815c0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x009815d0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x009815e0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x009815f0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00981600 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00981610 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00981620 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00981630 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00981640 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00981650 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00981660 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00981670 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00981680 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00981690 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x009816a0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x009816b0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x009816c0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x009816d0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x009816e0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x009816f0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00981700 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00981710 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00981720 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00981730 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00981740 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00981750 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00981760 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00981770 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00981780 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00981790 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x009817a0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x009817b0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x009817c0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x009817d0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x009817e0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x009817f0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00981800 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00981810 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00981820 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00981830 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00981840 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00981850 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00981860 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00981870 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00981880 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00981890 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x009818a0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x009818b0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x009818c0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x009818d0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x009818e0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x009818f0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00981900 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00981910 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00981920 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00981930 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00981940 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00981950 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ + 0x00981960 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ + 0x00981970 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ + 0x00981980 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x00981990 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ + 0x009819a0 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ + 0x009819b0 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ + 0x009819c0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x009819d0 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ + 0x009819e0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x009819f0 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ + 0x00981a00 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x00981a10 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ + 0x00981a20 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00981a30 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00981a40 20202020 20202020 20202020 2020615f a_ │ │ │ │ + 0x00981a50 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ + 0x00981a60 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ + 0x00981a70 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ + 0x00981a80 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ + 0x00981a90 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00981aa0 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ + 0x00981ab0 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ + 0x00981ac0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ + 0x00981ad0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00981ae0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00981af0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00981b00 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00981b10 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00981b20 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00981b30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00981b40 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00981b50 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00981b60 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00981b70 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00981b80 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00981b90 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00981ba0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00981bb0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00981bc0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00981bd0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00981be0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00981bf0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00981c00 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00981c10 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00981c20 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ + 0x00981c30 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ + 0x00981c40 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x00981c50 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00981c60 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ + 0x00981c70 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ + 0x00981c80 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ + 0x00981c90 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ + 0x00981ca0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00981cb0 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ + 0x00981cc0 65747269 63733b20 0a202063 6f6e7374 etrics; . const │ │ │ │ + 0x00981cd0 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00981ce0 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00981cf0 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00981d00 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00981d10 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00981d20 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00981d30 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00981d40 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00981d50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00981d60 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00981d70 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00981d80 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00981d90 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00981da0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00981db0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00981dc0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00981dd0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00981de0 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00981df0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00981e00 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00981e10 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00981e20 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00981e30 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00981e40 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00981e50 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00981e60 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00981e70 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00981e80 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00981e90 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00981ea0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00981eb0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00981ec0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00981ed0 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00981ee0 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00981ef0 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00981f00 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00981f10 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00981f20 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00981f30 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00981f40 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00981f50 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00981f60 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00981f70 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00981f80 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00981f90 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00981fa0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00981fb0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00981fc0 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00981fd0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00981fe0 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00981ff0 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00982000 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00982010 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00982020 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00982030 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00982040 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00982050 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00982060 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00982070 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00982080 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00982090 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x009820a0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x009820b0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x009820c0 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x009820d0 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x009820e0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x009820f0 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00982100 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00982110 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00982120 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00982130 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00982140 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00982150 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00982160 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00982170 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00982180 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00982190 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x009821a0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x009821b0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x009821c0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x009821d0 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x009821e0 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x009821f0 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00982200 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00982210 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00982220 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00982230 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00982240 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00982250 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00982260 200a2020 7b200a20 20202076 5f636f6c . { . v_col │ │ │ │ + 0x00982270 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ + 0x00982280 74636f6f 72643b20 0a202020 20765f6f tcoord; . v_o │ │ │ │ + 0x00982290 66667365 7430203d 20755f66 72616d65 ffset0 = u_frame │ │ │ │ + 0x009822a0 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ + 0x009822b0 7879202a 20766563 34282d31 2e302c20 xy * vec4(-1.0, │ │ │ │ + 0x009822c0 302e302c 20302e30 2c202d31 2e302920 0.0, 0.0, -1.0) │ │ │ │ + 0x009822d0 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ + 0x009822e0 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ + 0x009822f0 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x00982300 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ + 0x00982310 63342820 312e302c 20302e30 2c20302e c4( 1.0, 0.0, 0. │ │ │ │ + 0x00982320 302c2020 312e3029 202b2061 5f74636f 0, 1.0) + a_tco │ │ │ │ + 0x00982330 6f72642e 78797879 3b200a20 20202076 ord.xyxy; . v │ │ │ │ + 0x00982340 5f6f6666 73657432 203d2075 5f667261 _offset2 = u_fra │ │ │ │ + 0x00982350 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ + 0x00982360 78797879 202a2076 65633428 2d322e30 xyxy * vec4(-2.0 │ │ │ │ + 0x00982370 2c20302e 302c2030 2e302c20 2d322e30 , 0.0, 0.0, -2.0 │ │ │ │ + 0x00982380 29202b20 615f7463 6f6f7264 2e787978 ) + a_tcoord.xyx │ │ │ │ + 0x00982390 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ + 0x009823a0 696f6e20 3d207665 63342861 5f706f73 ion = vec4(a_pos │ │ │ │ + 0x009823b0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x009823c0 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x009823d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x009823e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009823f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00982400 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00982410 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00982420 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00982430 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00982440 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00982450 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00982460 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00982470 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00982480 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00982490 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009824a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009824b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x009824c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x009824d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x009824e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009824f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00982500 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00982510 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ + 0x00982520 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00982530 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x00982540 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00982550 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x00982560 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00982570 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ + 0x00982580 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00982590 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x009825a0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x009825b0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x009825c0 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ + 0x009825d0 613b200a 2020756e 69666f72 6d207665 a; . uniform ve │ │ │ │ + 0x009825e0 63322075 5f706f73 6974696f 6e3b200a c2 u_position; . │ │ │ │ + 0x009825f0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00982600 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00982610 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00982620 7420755f 6f706163 6974793b 200a2020 t u_opacity; . │ │ │ │ + 0x00982630 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00982640 6c656e67 74683b20 0a202063 6f6e7374 length; . const │ │ │ │ + 0x00982650 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00982660 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00982670 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00982680 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00982690 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x009826a0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x009826b0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x009826c0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x009826d0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009826e0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x009826f0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00982700 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00982710 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00982720 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00982730 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00982740 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00982750 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00982760 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00982770 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00982780 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00982790 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x009827a0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x009827b0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x009827c0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x009827d0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x009827e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x009827f0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00982800 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00982810 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00982820 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00982830 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00982840 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00982850 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00982860 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00982870 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00982880 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00982890 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x009828a0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x009828b0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x009828c0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x009828d0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x009828e0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x009828f0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00982900 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00982910 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00982920 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00982930 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00982940 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00982950 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00982960 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00982970 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00982980 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00982990 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x009829a0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x009829b0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x009829c0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x009829d0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x009829e0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x009829f0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00982a00 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00982a10 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00982a20 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00982a30 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00982a40 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00982a50 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00982a60 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00982a70 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00982a80 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00982a90 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00982aa0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00982ab0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00982ac0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00982ad0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00982ae0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00982af0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00982b00 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00982b10 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00982b20 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00982b30 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00982b40 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00982b50 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00982b60 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00982b70 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00982b80 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00982b90 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00982ba0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00982bb0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00982bc0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00982bd0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00982be0 200a2020 7b200a20 20202067 6c5f506f . { . gl_Po │ │ │ │ + 0x00982bf0 73697469 6f6e203d 20766563 3428755f sition = vec4(u_ │ │ │ │ + 0x00982c00 706f7369 74696f6e 202b2061 5f706f73 position + a_pos │ │ │ │ + 0x00982c10 6974696f 6e202b20 755f6c65 6e677468 ition + u_length │ │ │ │ + 0x00982c20 202a2061 5f6e6f72 6d616c2c 20302c20 * a_normal, 0, │ │ │ │ + 0x00982c30 3129202a 20755f70 726f6a65 6374696f 1) * u_projectio │ │ │ │ + 0x00982c40 6e3b200a 20202369 66646566 2056554c n; . #ifdef VUL │ │ │ │ + 0x00982c50 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ + 0x00982c60 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ + 0x00982c70 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ + 0x00982c80 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ + 0x00982c90 6c5f506f 73697469 6f6e2e7a 20202b20 l_Position.z + │ │ │ │ + 0x00982ca0 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ + 0x00982cb0 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ + 0x00982cc0 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ + 0x00982cd0 6f6f7264 73203d20 615f636f 6c6f7254 oords = a_colorT │ │ │ │ + 0x00982ce0 6578436f 6f726473 3b200a20 207d200a exCoords; . } . │ │ │ │ + 0x00982cf0 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x00982d00 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00982d10 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00982d20 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00982d30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00982d40 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00982d50 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00982d60 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00982d70 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00982d80 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00982d90 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00982da0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00982db0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00982dc0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00982dd0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00982de0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00982df0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00982e00 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00982e10 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00982e20 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00982e30 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00982e40 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00982e50 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00982e60 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x00982e70 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x00982e80 0a20206f 75742076 65633320 765f7261 . out vec3 v_ra │ │ │ │ + 0x00982e90 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ + 0x00982ea0 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ + 0x00982eb0 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ + 0x00982ec0 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ + 0x00982ed0 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ + 0x00982ee0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00982ef0 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ + 0x00982f00 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ + 0x00982f10 726d2076 65633420 755f7061 72616d73 rm vec4 u_params │ │ │ │ + 0x00982f20 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00982f30 61742075 5f6c696e 6548616c 66576964 at u_lineHalfWid │ │ │ │ + 0x00982f40 74683b20 0a202075 6e69666f 726d2066 th; . uniform f │ │ │ │ + 0x00982f50 6c6f6174 20755f6d 61785261 64697573 loat u_maxRadius │ │ │ │ + 0x00982f60 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x00982f70 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x00982f80 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x00982f90 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00982fa0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00982fb0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00982fc0 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00982fd0 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x00982fe0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00982ff0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00983000 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x00983010 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x00983020 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x00983030 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00983040 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x00983050 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x00983060 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x00983070 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x00983080 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x00983090 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x009830a0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009830b0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x009830c0 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x009830d0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x009830e0 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x009830f0 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x00983100 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00983110 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x00983120 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x00983130 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x00983140 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00983150 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x00983160 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x00983170 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x00983180 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00983190 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x009831a0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x009831b0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x009831c0 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x009831d0 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x009831e0 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x009831f0 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x00983200 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x00983210 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00983220 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00983230 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x00983240 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x00983250 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x00983260 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x00983270 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x00983280 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x00983290 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x009832a0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x009832b0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x009832c0 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x009832d0 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x009832e0 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x009832f0 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x00983300 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x00983310 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00983320 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x00983330 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x00983340 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x00983350 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x00983360 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x00983370 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00983380 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x00983390 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x009833a0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x009833b0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x009833c0 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x009833d0 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x009833e0 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x009833f0 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x00983400 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x00983410 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x00983420 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x00983430 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x00983440 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x00983450 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x00983460 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x00983470 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x00983480 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x00983490 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x009834a0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x009834b0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x009834c0 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x009834d0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x009834e0 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x009834f0 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x00983500 0a202020 20766563 32206e6f 726d616c . vec2 normal │ │ │ │ + 0x00983510 203d2061 5f6e6f72 6d616c2e 78793b20 = a_normal.xy; │ │ │ │ + 0x00983520 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ + 0x00983530 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ + 0x00983540 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x00983550 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ + 0x00983560 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ + 0x00983570 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ + 0x00983580 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ + 0x00983590 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ + 0x009835a0 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ + 0x009835b0 6e6f726d 616c202a 20755f6c 696e6548 normal * u_lineH │ │ │ │ + 0x009835c0 616c6657 69647468 3b200a20 20202020 alfWidth; . │ │ │ │ + 0x009835d0 20747261 6e73666f 726d6564 41786973 transformedAxis │ │ │ │ + 0x009835e0 506f7320 3d206361 6c634c69 6e655472 Pos = calcLineTr │ │ │ │ + 0x009835f0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00983600 28747261 6e73666f 726d6564 41786973 (transformedAxis │ │ │ │ + 0x00983610 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ + 0x00983620 7879202b 206e6f72 6d2c200a 20202020 xy + norm, . │ │ │ │ + 0x00983630 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00983640 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00983650 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00983660 2020755f 6d6f6465 6c566965 772c206c u_modelView, l │ │ │ │ + 0x00983670 656e6774 68286e6f 726d2929 3b200a20 ength(norm)); . │ │ │ │ + 0x00983680 2020207d 200a2020 20207472 616e7366 } . transf │ │ │ │ + 0x00983690 6f726d65 64417869 73506f73 202b3d20 ormedAxisPos += │ │ │ │ + 0x009836a0 615f6e6f 726d616c 2e7a7720 2a20755f a_normal.zw * u_ │ │ │ │ + 0x009836b0 6c696e65 48616c66 57696474 683b200a lineHalfWidth; . │ │ │ │ + 0x009836c0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x009836d0 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ + 0x009836e0 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ + 0x009836f0 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ + 0x00983700 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ + 0x00983710 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ + 0x00983720 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x00983730 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ + 0x00983740 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ + 0x00983750 20202020 765f636f 6c6f7220 3d20615f v_color = a_ │ │ │ │ + 0x00983760 636f6c6f 723b200a 20202020 765f7261 color; . v_ra │ │ │ │ + 0x00983770 64697573 203d2076 65633328 615f6e6f dius = vec3(a_no │ │ │ │ + 0x00983780 726d616c 2e7a772c 20755f6d 61785261 rmal.zw, u_maxRa │ │ │ │ + 0x00983790 64697573 29202a20 755f6c69 6e654861 dius) * u_lineHa │ │ │ │ + 0x009837a0 6c665769 6474683b 200a2020 7d200a00 lfWidth; . } .. │ │ │ │ + 0x009837b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009837c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009837d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009837e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009837f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00983800 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00983810 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00983820 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00983830 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00983840 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00983850 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00983860 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00983870 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00983880 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00983890 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009838a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009838b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009838c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009838d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009838e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009838f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00983900 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ + 0x00983910 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ + 0x00983920 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ + 0x00983930 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ + 0x00983940 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00983950 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00983960 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00983970 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00983980 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00983990 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x009839a0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x009839b0 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ + 0x009839c0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x009839d0 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ + 0x009839e0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009839f0 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ + 0x00983a00 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ + 0x00983a10 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ + 0x00983a20 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x00983a30 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ + 0x00983a40 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ + 0x00983a50 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00983a60 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00983a70 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x00983a80 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00983a90 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00983aa0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00983ab0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00983ac0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00983ad0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00983ae0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00983af0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00983b00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00983b10 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00983b20 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00983b30 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00983b40 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00983b50 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00983b60 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00983b70 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00983b80 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00983b90 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00983ba0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00983bb0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00983bc0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00983bd0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00983be0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00983bf0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00983c00 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00983c10 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00983c20 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00983c30 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00983c40 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00983c50 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00983c60 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00983c70 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00983c80 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00983c90 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00983ca0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00983cb0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00983cc0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00983cd0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00983ce0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00983cf0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00983d00 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00983d10 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00983d20 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00983d30 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00983d40 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00983d50 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00983d60 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00983d70 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00983d80 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00983d90 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00983da0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00983db0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00983dc0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00983dd0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00983de0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00983df0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00983e00 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00983e10 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00983e20 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00983e30 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00983e40 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00983e50 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00983e60 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00983e70 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00983e80 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00983e90 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00983ea0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00983eb0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00983ec0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00983ed0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00983ee0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00983ef0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00983f00 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00983f10 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00983f20 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00983f30 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00983f40 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00983f50 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00983f60 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00983f70 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00983f80 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00983f90 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00983fa0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00983fb0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00983fc0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00983fd0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00983fe0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00983ff0 20666c6f 61742073 696e5620 3d207369 float sinV = si │ │ │ │ + 0x00984000 6e28755f 617a696d 7574293b 200a2020 n(u_azimut); . │ │ │ │ + 0x00984010 2020666c 6f617420 636f7356 203d2063 float cosV = c │ │ │ │ + 0x00984020 6f732875 5f617a69 6d757429 3b200a20 os(u_azimut); . │ │ │ │ + 0x00984030 2020206d 61743420 726f7461 74696f6e mat4 rotation │ │ │ │ + 0x00984040 3b200a20 20202072 6f746174 696f6e5b ; . rotation[ │ │ │ │ + 0x00984050 305d203d 20766563 3428636f 73562c20 0] = vec4(cosV, │ │ │ │ + 0x00984060 73696e56 2c20302e 302c2030 2e30293b sinV, 0.0, 0.0); │ │ │ │ + 0x00984070 200a2020 2020726f 74617469 6f6e5b31 . rotation[1 │ │ │ │ + 0x00984080 5d203d20 76656334 282d7369 6e562c20 ] = vec4(-sinV, │ │ │ │ + 0x00984090 636f7356 2c20302e 302c2030 2e30293b cosV, 0.0, 0.0); │ │ │ │ + 0x009840a0 200a2020 2020726f 74617469 6f6e5b32 . rotation[2 │ │ │ │ + 0x009840b0 5d203d20 76656334 28302e30 2c20302e ] = vec4(0.0, 0. │ │ │ │ + 0x009840c0 302c2031 2e302c20 302e3029 3b200a20 0, 1.0, 0.0); . │ │ │ │ + 0x009840d0 20202072 6f746174 696f6e5b 335d203d rotation[3] = │ │ │ │ + 0x009840e0 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ + 0x009840f0 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00984100 76656334 20706f73 203d2076 65633428 vec4 pos = vec4( │ │ │ │ + 0x00984110 755f706f 73697469 6f6e2e78 797a2c20 u_position.xyz, │ │ │ │ + 0x00984120 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ + 0x00984130 65773b20 0a202020 20766563 34206e6f ew; . vec4 no │ │ │ │ + 0x00984140 726d616c 203d2076 65633428 615f6e6f rmal = vec4(a_no │ │ │ │ + 0x00984150 726d616c 2c20302c 2030293b 200a2020 rmal, 0, 0); . │ │ │ │ + 0x00984160 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ + 0x00984170 73203d20 6e6f726d 616c202a 20726f74 s = normal * rot │ │ │ │ + 0x00984180 6174696f 6e202b20 706f733b 200a2020 ation + pos; . │ │ │ │ + 0x00984190 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x009841a0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x009841b0 6f726d28 73686966 74656450 6f73202a orm(shiftedPos * │ │ │ │ + 0x009841c0 20755f70 726f6a65 6374696f 6e2c2075 u_projection, u │ │ │ │ + 0x009841d0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x009841e0 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ + 0x009841f0 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x00984200 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00984210 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x00984220 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00984230 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00984240 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00984250 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00984260 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00984270 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00984280 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00984290 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x009842a0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x009842b0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x009842c0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009842d0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x009842e0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009842f0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00984300 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00984310 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00984320 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00984330 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00984340 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00984350 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00984360 0a202069 6e207665 63332061 5f6e6f72 . in vec3 a_nor │ │ │ │ + 0x00984370 6d616c3b 200a2020 696e2076 65633320 mal; . in vec3 │ │ │ │ + 0x00984380 615f706f 73697469 6f6e3b20 0a202069 a_position; . i │ │ │ │ + 0x00984390 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x009843a0 0a20206f 75742076 65633320 765f7261 . out vec3 v_ra │ │ │ │ + 0x009843b0 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ + 0x009843c0 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ + 0x009843d0 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ + 0x009843e0 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ + 0x009843f0 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ + 0x00984400 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00984410 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ + 0x00984420 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ + 0x00984430 726d2076 65633220 755f636f 6e747261 rm vec2 u_contra │ │ │ │ + 0x00984440 73744761 6d6d613b 200a2020 756e6966 stGamma; . unif │ │ │ │ + 0x00984450 6f726d20 666c6f61 7420755f 6f706163 orm float u_opac │ │ │ │ + 0x00984460 6974793b 200a2020 756e6966 6f726d20 ity; . uniform │ │ │ │ + 0x00984470 666c6f61 7420755f 7a536361 6c653b20 float u_zScale; │ │ │ │ + 0x00984480 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00984490 20755f69 6e746572 706f6c61 74696f6e u_interpolation │ │ │ │ + 0x009844a0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x009844b0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ + 0x009844c0 73733b20 0a202063 6f6e7374 20666c6f ss; . const flo │ │ │ │ + 0x009844d0 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ + 0x009844e0 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ + 0x009844f0 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ + 0x00984500 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x00984510 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00984520 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00984530 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ + 0x00984540 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ + 0x00984550 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00984560 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ + 0x00984570 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ + 0x00984580 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ + 0x00984590 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x009845a0 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ + 0x009845b0 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ + 0x009845c0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x009845d0 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ + 0x009845e0 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ + 0x009845f0 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ + 0x00984600 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00984610 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ + 0x00984620 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00984630 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00984640 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ + 0x00984650 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ + 0x00984660 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00984670 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ + 0x00984680 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ + 0x00984690 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ + 0x009846a0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x009846b0 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ + 0x009846c0 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ + 0x009846d0 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ + 0x009846e0 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ + 0x009846f0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00984700 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00984710 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00984720 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ + 0x00984730 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ + 0x00984740 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ + 0x00984750 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ + 0x00984760 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ + 0x00984770 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ + 0x00984780 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00984790 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ + 0x009847a0 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ + 0x009847b0 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ + 0x009847c0 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ + 0x009847d0 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ + 0x009847e0 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ + 0x009847f0 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ + 0x00984800 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ + 0x00984810 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00984820 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ + 0x00984830 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ + 0x00984840 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ + 0x00984850 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ + 0x00984860 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ + 0x00984870 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ + 0x00984880 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ + 0x00984890 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ + 0x009848a0 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ + 0x009848b0 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ + 0x009848c0 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ + 0x009848d0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x009848e0 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ + 0x009848f0 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ + 0x00984900 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ + 0x00984910 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x00984920 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ + 0x00984930 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ + 0x00984940 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ + 0x00984950 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ + 0x00984960 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ + 0x00984970 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ + 0x00984980 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ + 0x00984990 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ + 0x009849a0 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ + 0x009849b0 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ + 0x009849c0 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ + 0x009849d0 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ + 0x009849e0 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ + 0x009849f0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00984a00 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ + 0x00984a10 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ + 0x00984a20 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ + 0x00984a30 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00984a40 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ + 0x00984a50 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ + 0x00984a60 7b200a20 20202076 65633320 72616469 { . vec3 radi │ │ │ │ + 0x00984a70 7573203d 20615f6e 6f726d61 6c202a20 us = a_normal * │ │ │ │ + 0x00984a80 615f706f 73697469 6f6e2e7a 3b200a20 a_position.z; . │ │ │ │ + 0x00984a90 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x00984aa0 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x00984ab0 2c20302c 20312920 2a20755f 6d6f6465 , 0, 1) * u_mode │ │ │ │ + 0x00984ac0 6c566965 773b200a 20202020 76656334 lView; . vec4 │ │ │ │ + 0x00984ad0 20736869 66746564 506f7320 3d207665 shiftedPos = ve │ │ │ │ + 0x00984ae0 63342872 61646975 732e7879 2c20302c c4(radius.xy, 0, │ │ │ │ + 0x00984af0 20302920 2b20706f 733b200a 20202020 0) + pos; . │ │ │ │ + 0x00984b00 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ + 0x00984b10 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x00984b20 6d287368 69667465 64506f73 202a2075 m(shiftedPos * u │ │ │ │ + 0x00984b30 5f70726f 6a656374 696f6e2c 20755f70 _projection, u_p │ │ │ │ + 0x00984b40 69766f74 5472616e 73666f72 6d2c2030 ivotTransform, 0 │ │ │ │ + 0x00984b50 2e30293b 200a2020 2020765f 72616469 .0); . v_radi │ │ │ │ + 0x00984b60 7573203d 20726164 6975733b 200a2020 us = radius; . │ │ │ │ + 0x00984b70 2020765f 636f6c6f 72203d20 615f636f v_color = a_co │ │ │ │ + 0x00984b80 6c6f723b 200a2020 7d200a00 00000000 lor; . } ...... │ │ │ │ + 0x00984b90 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00984ba0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00984bb0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00984bc0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00984bd0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00984be0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00984bf0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00984c00 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00984c10 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00984c20 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00984c30 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00984c40 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00984c50 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00984c60 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00984c70 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00984c80 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00984c90 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00984ca0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00984cb0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00984cc0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00984cd0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00984ce0 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ + 0x00984cf0 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ + 0x00984d00 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x00984d10 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ + 0x00984d20 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ + 0x00984d30 743b200a 2020756e 69666f72 6d207665 t; . uniform ve │ │ │ │ + 0x00984d40 63342075 5f667261 6d656275 66666572 c4 u_framebuffer │ │ │ │ + 0x00984d50 4d657472 6963733b 200a2020 636f6e73 Metrics; . cons │ │ │ │ + 0x00984d60 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x00984d70 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x00984d80 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x00984d90 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00984da0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00984db0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00984dc0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00984dd0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x00984de0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00984df0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00984e00 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00984e10 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00984e20 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00984e30 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00984e40 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00984e50 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00984e60 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00984e70 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x00984e80 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00984e90 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x00984ea0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x00984eb0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00984ec0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00984ed0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x00984ee0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x00984ef0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00984f00 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x00984f10 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x00984f20 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00984f30 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00984f40 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00984f50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00984f60 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x00984f70 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00984f80 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00984f90 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00984fa0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00984fb0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x00984fc0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x00984fd0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x00984fe0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00984ff0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00985000 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00985010 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00985020 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00985030 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00985040 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x00985050 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x00985060 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00985070 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x00985080 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x00985090 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x009850a0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x009850b0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x009850c0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x009850d0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x009850e0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x009850f0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00985100 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00985110 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00985120 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00985130 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00985140 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x00985150 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x00985160 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x00985170 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00985180 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x00985190 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x009851a0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x009851b0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x009851c0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x009851d0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x009851e0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x009851f0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00985200 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00985210 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00985220 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00985230 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00985240 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00985250 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00985260 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x00985270 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x00985280 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x00985290 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x009852a0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x009852b0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x009852c0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x009852d0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x009852e0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x009852f0 29200a20 207b200a 20202020 765f636f ) . { . v_co │ │ │ │ + 0x00985300 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x00985310 5f74636f 6f72643b 200a2020 2020765f _tcoord; . v_ │ │ │ │ + 0x00985320 6f666673 6574203d 20755f66 72616d65 offset = u_frame │ │ │ │ + 0x00985330 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ + 0x00985340 7879202a 20766563 3428312e 302c2030 xy * vec4(1.0, 0 │ │ │ │ + 0x00985350 2e302c20 302e302c 20312e30 29202b20 .0, 0.0, 1.0) + │ │ │ │ + 0x00985360 615f7463 6f6f7264 2e787978 793b200a a_tcoord.xyxy; . │ │ │ │ + 0x00985370 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x00985380 3d207665 63342861 5f706f73 2c20302e = vec4(a_pos, 0. │ │ │ │ + 0x00985390 302c2031 2e30293b 200a2020 7d200a00 0, 1.0); . } .. │ │ │ │ + 0x009853a0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009853b0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009853c0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009853d0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009853e0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009853f0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00985400 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00985410 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00985420 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00985430 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00985440 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00985450 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00985460 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00985470 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00985480 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00985490 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009854a0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009854b0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009854c0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009854d0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009854e0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009854f0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x00985500 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x00985510 5f6f7574 6c696e65 436f6c6f 72546578 _outlineColorTex │ │ │ │ + 0x00985520 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x00985530 3220615f 6d61736b 54657843 6f6f7264 2 a_maskTexCoord │ │ │ │ + 0x00985540 3b200a20 20696e20 76656334 20615f70 ; . in vec4 a_p │ │ │ │ + 0x00985550 6f736974 696f6e3b 200a2020 696e2076 osition; . in v │ │ │ │ + 0x00985560 65633220 615f6e6f 726d616c 3b200a20 ec2 a_normal; . │ │ │ │ + 0x00985570 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00985580 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x00985590 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x009855a0 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x009855b0 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x009855c0 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x009855d0 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x009855e0 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x009855f0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00985600 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00985610 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00985620 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00985630 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ + 0x00985640 73666f72 6d3b200a 2020756e 69666f72 sform; . unifor │ │ │ │ + 0x00985650 6d207665 63322075 5f636f6e 74726173 m vec2 u_contras │ │ │ │ + 0x00985660 7447616d 6d613b20 0a202075 6e69666f tGamma; . unifo │ │ │ │ + 0x00985670 726d2066 6c6f6174 20755f6f 70616369 rm float u_opaci │ │ │ │ + 0x00985680 74793b20 0a202075 6e69666f 726d2066 ty; . uniform f │ │ │ │ + 0x00985690 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ + 0x009856a0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009856b0 755f696e 74657270 6f6c6174 696f6e3b u_interpolation; │ │ │ │ + 0x009856c0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x009856d0 7420755f 69734f75 746c696e 65506173 t u_isOutlinePas │ │ │ │ + 0x009856e0 733b200a 2020756e 69666f72 6d207361 s; . uniform sa │ │ │ │ + 0x009856f0 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ + 0x00985700 65783b20 0a202063 6f6e7374 20666c6f ex; . const flo │ │ │ │ + 0x00985710 6174206b 42617365 44657074 68536869 at kBaseDepthShi │ │ │ │ + 0x00985720 6674203d 202d3130 2e303b20 0a202063 ft = -10.0; . c │ │ │ │ + 0x00985730 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ + 0x00985740 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ + 0x00985750 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ + 0x00985760 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00985770 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00985780 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x00985790 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x009857a0 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ + 0x009857b0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x009857c0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ + 0x009857d0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ + 0x009857e0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x009857f0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00985800 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ + 0x00985810 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00985820 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00985830 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ + 0x00985840 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ + 0x00985850 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00985860 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ + 0x00985870 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ + 0x00985880 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x00985890 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ + 0x009858a0 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ + 0x009858b0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x009858c0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x009858d0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ + 0x009858e0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x009858f0 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ + 0x00985900 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ + 0x00985910 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00985920 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ + 0x00985930 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ + 0x00985940 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ + 0x00985950 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ + 0x00985960 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00985970 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00985980 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00985990 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ + 0x009859a0 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ + 0x009859b0 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ + 0x009859c0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ + 0x009859d0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x009859e0 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ + 0x009859f0 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ + 0x00985a00 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00985a10 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ + 0x00985a20 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ + 0x00985a30 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00985a40 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ + 0x00985a50 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x00985a60 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ + 0x00985a70 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x00985a80 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ + 0x00985a90 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ + 0x00985aa0 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ + 0x00985ab0 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ + 0x00985ac0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ + 0x00985ad0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ + 0x00985ae0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00985af0 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ + 0x00985b00 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ + 0x00985b10 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ + 0x00985b20 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ + 0x00985b30 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ + 0x00985b40 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00985b50 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ + 0x00985b60 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ + 0x00985b70 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x00985b80 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ + 0x00985b90 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ + 0x00985ba0 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ + 0x00985bb0 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ + 0x00985bc0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ + 0x00985bd0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ + 0x00985be0 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ + 0x00985bf0 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ + 0x00985c00 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ + 0x00985c10 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ + 0x00985c20 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ + 0x00985c30 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ + 0x00985c40 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ + 0x00985c50 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00985c60 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ + 0x00985c70 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ + 0x00985c80 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ + 0x00985c90 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ + 0x00985ca0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00985cb0 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ + 0x00985cc0 696e2829 200a2020 7b200a20 20202066 in() . { . f │ │ │ │ + 0x00985cd0 6c6f6174 2069734f 75746c69 6e65203d loat isOutline = │ │ │ │ + 0x00985ce0 20737465 7028302e 352c2075 5f69734f step(0.5, u_isO │ │ │ │ + 0x00985cf0 75746c69 6e655061 7373293b 200a2020 utlinePass); . │ │ │ │ + 0x00985d00 2020666c 6f617420 64657074 68536869 float depthShi │ │ │ │ + 0x00985d10 6674203d 206b4261 73654465 70746853 ft = kBaseDepthS │ │ │ │ + 0x00985d20 68696674 202a2069 734f7574 6c696e65 hift * isOutline │ │ │ │ + 0x00985d30 3b200a20 20202076 65633420 7069766f ; . vec4 pivo │ │ │ │ + 0x00985d40 74203d20 28766563 3428615f 706f7369 t = (vec4(a_posi │ │ │ │ + 0x00985d50 74696f6e 2e78797a 2c20312e 3029202b tion.xyz, 1.0) + │ │ │ │ + 0x00985d60 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ + 0x00985d70 64657074 68536869 66742c20 302e3029 depthShift, 0.0) │ │ │ │ + 0x00985d80 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x00985d90 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ + 0x00985da0 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ + 0x00985db0 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ + 0x00985dc0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x00985dd0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00985de0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00985df0 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ + 0x00985e00 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ + 0x00985e10 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ + 0x00985e20 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ + 0x00985e30 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00985e40 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00985e50 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ + 0x00985e60 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ + 0x00985e70 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ + 0x00985e80 65633220 636f6c6f 72546578 436f6f72 ec2 colorTexCoor │ │ │ │ + 0x00985e90 64203d20 6d697828 615f636f 6c6f7254 d = mix(a_colorT │ │ │ │ + 0x00985ea0 6578436f 6f72642c 20615f6f 75746c69 exCoord, a_outli │ │ │ │ + 0x00985eb0 6e65436f 6c6f7254 6578436f 6f72642c neColorTexCoord, │ │ │ │ + 0x00985ec0 2069734f 75746c69 6e65293b 200a2020 isOutline); . │ │ │ │ + 0x00985ed0 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ + 0x00985ee0 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ + 0x00985ef0 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ + 0x00985f00 5465782c 20636f6c 6f725465 78436f6f Tex, colorTexCoo │ │ │ │ + 0x00985f10 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ + 0x00985f20 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00985f30 7264203d 20636f6c 6f725465 78436f6f rd = colorTexCoo │ │ │ │ + 0x00985f40 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00985f50 20202076 5f6d6173 6b546578 436f6f72 v_maskTexCoor │ │ │ │ + 0x00985f60 64203d20 615f6d61 736b5465 78436f6f d = a_maskTexCoo │ │ │ │ + 0x00985f70 72643b20 0a20207d 200a0000 00000000 rd; . } ....... │ │ │ │ + 0x00985f80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00985f90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00985fa0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00985fb0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00985fc0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00985fd0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00985fe0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00985ff0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00986000 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00986010 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00986020 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00986030 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00986040 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00986050 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00986060 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00986070 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00986080 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00986090 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009860a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009860b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009860c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009860d0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x009860e0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x009860f0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00986100 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x00986110 65633420 765f6f66 66736574 733b200a ec4 v_offsets; . │ │ │ │ + 0x00986120 20206f75 74207665 63342076 5f636f6c out vec4 v_col │ │ │ │ + 0x00986130 6f723b20 0a202075 6e69666f 726d206d or; . uniform m │ │ │ │ + 0x00986140 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ + 0x00986150 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00986160 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00986170 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00986180 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ + 0x00986190 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x009861a0 20755f70 6172616d 733b200a 2020756e u_params; . un │ │ │ │ + 0x009861b0 69666f72 6d20666c 6f617420 755f6c69 iform float u_li │ │ │ │ + 0x009861c0 6e654861 6c665769 6474683b 200a2020 neHalfWidth; . │ │ │ │ + 0x009861d0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x009861e0 6d617852 61646975 733b200a 2020636f maxRadius; . co │ │ │ │ + 0x009861f0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x00986200 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x00986210 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x00986220 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x00986230 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00986240 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00986250 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00986260 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x00986270 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00986280 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x00986290 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x009862a0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x009862b0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x009862c0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x009862d0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x009862e0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x009862f0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00986300 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x00986310 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00986320 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x00986330 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x00986340 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00986350 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x00986360 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x00986370 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x00986380 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00986390 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x009863a0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x009863b0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x009863c0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x009863d0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x009863e0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x009863f0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x00986400 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x00986410 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00986420 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00986430 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00986440 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00986450 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x00986460 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x00986470 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x00986480 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x00986490 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x009864a0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x009864b0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x009864c0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x009864d0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x009864e0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x009864f0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00986500 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x00986510 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x00986520 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x00986530 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x00986540 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x00986550 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x00986560 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x00986570 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x00986580 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x00986590 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x009865a0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x009865b0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x009865c0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x009865d0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x009865e0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x009865f0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x00986600 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x00986610 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x00986620 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x00986630 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x00986640 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x00986650 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x00986660 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x00986670 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x00986680 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x00986690 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x009866a0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x009866b0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x009866c0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x009866d0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x009866e0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x009866f0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x00986700 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x00986710 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00986720 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x00986730 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x00986740 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x00986750 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x00986760 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00986770 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x00986780 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ + 0x00986790 63342070 6f73203d 20766563 3428615f c4 pos = vec4(a_ │ │ │ │ + 0x009867a0 706f7369 74696f6e 2e78792c 20302c20 position.xy, 0, │ │ │ │ + 0x009867b0 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ + 0x009867c0 3b200a20 20202076 65633220 6e6f726d ; . vec2 norm │ │ │ │ + 0x009867d0 616c203d 20766563 3228615f 6e6f726d al = vec2(a_norm │ │ │ │ + 0x009867e0 616c2e78 202a2075 5f706172 616d732e al.x * u_params. │ │ │ │ + 0x009867f0 78202d20 615f6e6f 726d616c 2e79202a x - a_normal.y * │ │ │ │ + 0x00986800 20755f70 6172616d 732e792c 200a2020 u_params.y, . │ │ │ │ + 0x00986810 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00986820 20202020 20615f6e 6f726d61 6c2e7820 a_normal.x │ │ │ │ + 0x00986830 2a20755f 70617261 6d732e79 202b2061 * u_params.y + a │ │ │ │ + 0x00986840 5f6e6f72 6d616c2e 79202a20 755f7061 _normal.y * u_pa │ │ │ │ + 0x00986850 72616d73 2e78293b 200a2020 20207665 rams.x); . ve │ │ │ │ + 0x00986860 63322073 68696674 6564506f 73203d20 c2 shiftedPos = │ │ │ │ + 0x00986870 6e6f726d 616c202a 20755f70 6172616d normal * u_param │ │ │ │ + 0x00986880 732e7a20 2b20706f 732e7879 3b200a20 s.z + pos.xy; . │ │ │ │ + 0x00986890 20202070 6f73203d 20766563 34287368 pos = vec4(sh │ │ │ │ + 0x009868a0 69667465 64506f73 2c20615f 706f7369 iftedPos, a_posi │ │ │ │ + 0x009868b0 74696f6e 2e7a2c20 312e3029 202a2075 tion.z, 1.0) * u │ │ │ │ + 0x009868c0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x009868d0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x009868e0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x009868f0 6f726d28 706f732c 20755f70 69766f74 orm(pos, u_pivot │ │ │ │ + 0x00986900 5472616e 73666f72 6d2c2030 2e30293b Transform, 0.0); │ │ │ │ + 0x00986910 200a2020 20207665 6332206f 66667365 . vec2 offse │ │ │ │ + 0x00986920 7473203d 20616273 28615f6e 6f726d61 ts = abs(a_norma │ │ │ │ + 0x00986930 6c2e7a77 293b200a 20202020 765f6f66 l.zw); . v_of │ │ │ │ + 0x00986940 66736574 73203d20 76656334 28615f6e fsets = vec4(a_n │ │ │ │ + 0x00986950 6f726d61 6c2e7a77 2c206f66 66736574 ormal.zw, offset │ │ │ │ + 0x00986960 73202d20 312e3029 3b200a20 20202076 s - 1.0); . v │ │ │ │ + 0x00986970 5f636f6c 6f72203d 20615f63 6f6c6f72 _color = a_color │ │ │ │ + 0x00986980 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x00986990 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009869a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x009869b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009869c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009869d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009869e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x009869f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00986a00 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00986a10 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00986a20 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00986a30 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00986a40 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00986a50 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00986a60 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00986a70 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00986a80 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00986a90 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00986aa0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00986ab0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00986ac0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00986ad0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00986ae0 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x00986af0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x00986b00 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ + 0x00986b10 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ + 0x00986b20 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ + 0x00986b30 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ + 0x00986b40 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00986b50 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ + 0x00986b60 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ + 0x00986b70 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ + 0x00986b80 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ + 0x00986b90 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ + 0x00986ba0 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x00986bb0 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ + 0x00986bc0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00986bd0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x00986be0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x00986bf0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00986c00 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x00986c10 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00986c20 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x00986c30 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x00986c40 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x00986c50 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00986c60 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x00986c70 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x00986c80 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x00986c90 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00986ca0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x00986cb0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00986cc0 5f565446 200a2020 756e6966 6f726d20 _VTF . uniform │ │ │ │ + 0x00986cd0 73616d70 6c657232 4420755f 636f6c6f sampler2D u_colo │ │ │ │ + 0x00986ce0 72546578 3b200a20 2023656e 64696620 rTex; . #endif │ │ │ │ + 0x00986cf0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x00986d00 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x00986d10 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x00986d20 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x00986d30 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00986d40 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00986d50 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00986d60 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x00986d70 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00986d80 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00986d90 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x00986da0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00986db0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x00986dc0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x00986dd0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x00986de0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x00986df0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x00986e00 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x00986e10 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00986e20 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x00986e30 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00986e40 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x00986e50 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x00986e60 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x00986e70 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x00986e80 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x00986e90 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x00986ea0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00986eb0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x00986ec0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x00986ed0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00986ee0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x00986ef0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x00986f00 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x00986f10 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x00986f20 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00986f30 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00986f40 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00986f50 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00986f60 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00986f70 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00986f80 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00986f90 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00986fa0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00986fb0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00986fc0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x00986fd0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x00986fe0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x00986ff0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x00987000 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x00987010 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x00987020 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00987030 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x00987040 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x00987050 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00987060 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00987070 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00987080 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00987090 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x009870a0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x009870b0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x009870c0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x009870d0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x009870e0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x009870f0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x00987100 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00987110 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x00987120 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x00987130 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00987140 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x00987150 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00987160 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00987170 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00987180 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00987190 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x009871a0 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x009871b0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x009871c0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x009871d0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x009871e0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x009871f0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x00987200 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x00987210 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x00987220 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x00987230 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x00987240 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x00987250 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x00987260 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00987270 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00987280 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00987290 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x009872a0 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x009872b0 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ + 0x009872c0 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ + 0x009872d0 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ + 0x009872e0 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ + 0x009872f0 302e3029 202b2070 6f733b20 0a202020 0.0) + pos; . │ │ │ │ + 0x00987300 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x00987310 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00987320 726d2873 68696674 6564506f 73202a20 rm(shiftedPos * │ │ │ │ + 0x00987330 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ + 0x00987340 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00987350 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00987360 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ + 0x00987370 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ + 0x00987380 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ + 0x00987390 636f6c6f 72546578 436f6f72 64293b20 colorTexCoord); │ │ │ │ + 0x009873a0 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ + 0x009873b0 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ + 0x009873c0 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ + 0x009873d0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x009873e0 765f6d61 736b5465 78436f6f 7264203d v_maskTexCoord = │ │ │ │ + 0x009873f0 20615f6d 61736b54 6578436f 6f72643b a_maskTexCoord; │ │ │ │ + 0x00987400 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x00987410 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00987420 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00987430 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00987440 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00987450 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00987460 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00987470 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00987480 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00987490 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x009874a0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x009874b0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009874c0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x009874d0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009874e0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009874f0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00987500 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00987510 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00987520 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00987530 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00987540 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00987550 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00987560 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00987570 3320615f 6e6f726d 616c416e 64416e69 3 a_normalAndAni │ │ │ │ + 0x00987580 6d617465 4f725a3b 200a2020 696e2076 mateOrZ; . in v │ │ │ │ + 0x00987590 65633420 615f7465 78436f6f 7264733b ec4 a_texCoords; │ │ │ │ + 0x009875a0 200a2020 696e2076 65633420 615f636f . in vec4 a_co │ │ │ │ + 0x009875b0 6c6f723b 200a2020 6f757420 76656334 lor; . out vec4 │ │ │ │ + 0x009875c0 20765f74 6578436f 6f726473 3b200a20 v_texCoords; . │ │ │ │ + 0x009875d0 206f7574 20766563 3420765f 6d61736b out vec4 v_mask │ │ │ │ + 0x009875e0 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x009875f0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00987600 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x00987610 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x00987620 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00987630 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x00987640 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00987650 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x00987660 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x00987670 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x00987680 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00987690 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x009876a0 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x009876b0 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x009876c0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x009876d0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x009876e0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x009876f0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x00987700 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x00987710 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x00987720 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00987730 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00987740 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00987750 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x00987760 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00987770 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00987780 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x00987790 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x009877a0 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x009877b0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x009877c0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x009877d0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x009877e0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x009877f0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x00987800 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00987810 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x00987820 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00987830 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x00987840 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x00987850 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x00987860 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x00987870 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x00987880 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x00987890 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x009878a0 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x009878b0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x009878c0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x009878d0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x009878e0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x009878f0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x00987900 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x00987910 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00987920 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00987930 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00987940 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00987950 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00987960 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00987970 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00987980 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00987990 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x009879a0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x009879b0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x009879c0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x009879d0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x009879e0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x009879f0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x00987a00 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x00987a10 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00987a20 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x00987a30 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x00987a40 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00987a50 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00987a60 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00987a70 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00987a80 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x00987a90 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00987aa0 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x00987ab0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x00987ac0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x00987ad0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x00987ae0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x00987af0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00987b00 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x00987b10 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x00987b20 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00987b30 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x00987b40 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00987b50 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00987b60 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00987b70 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00987b80 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x00987b90 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x00987ba0 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x00987bb0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x00987bc0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x00987bd0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x00987be0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x00987bf0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x00987c00 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x00987c10 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x00987c20 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x00987c30 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x00987c40 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x00987c50 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00987c60 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00987c70 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00987c80 20202076 65633220 6e6f726d 616c203d vec2 normal = │ │ │ │ + 0x00987c90 20615f6e 6f726d61 6c416e64 416e696d a_normalAndAnim │ │ │ │ + 0x00987ca0 6174654f 725a2e78 793b200a 20202020 ateOrZ.xy; . │ │ │ │ + 0x00987cb0 69662028 615f6e6f 726d616c 416e6441 if (a_normalAndA │ │ │ │ + 0x00987cc0 6e696d61 74654f72 5a2e7a20 3e20302e nimateOrZ.z > 0. │ │ │ │ + 0x00987cd0 3029200a 20202020 20206e6f 726d616c 0) . normal │ │ │ │ + 0x00987ce0 203d2075 5f696e74 6572706f 6c617469 = u_interpolati │ │ │ │ + 0x00987cf0 6f6e202a 206e6f72 6d616c3b 200a2020 on * normal; . │ │ │ │ + 0x00987d00 20207665 63342070 69766f74 203d2076 vec4 pivot = v │ │ │ │ + 0x00987d10 65633428 615f706f 73697469 6f6e2c20 ec4(a_position, │ │ │ │ + 0x00987d20 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ + 0x00987d30 65773b20 0a202020 20766563 34206f66 ew; . vec4 of │ │ │ │ + 0x00987d40 66736574 203d2076 65633428 6e6f726d fset = vec4(norm │ │ │ │ + 0x00987d50 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ + 0x00987d60 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00987d70 20202076 65633420 70726f6a 65637465 vec4 projecte │ │ │ │ + 0x00987d80 64506976 6f74203d 20706976 6f74202a dPivot = pivot * │ │ │ │ + 0x00987d90 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00987da0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x00987db0 3d206170 706c7942 696c6c62 6f617264 = applyBillboard │ │ │ │ + 0x00987dc0 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ + 0x00987dd0 726f6a65 63746564 5069766f 742c2075 rojectedPivot, u │ │ │ │ + 0x00987de0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x00987df0 20302e30 2c206f66 66736574 2e787929 0.0, offset.xy) │ │ │ │ + 0x00987e00 3b200a20 20202066 6c6f6174 206e6577 ; . float new │ │ │ │ + 0x00987e10 5a203d20 70726f6a 65637465 64506976 Z = projectedPiv │ │ │ │ + 0x00987e20 6f742e79 202f2070 726f6a65 63746564 ot.y / projected │ │ │ │ + 0x00987e30 5069766f 742e7720 2a20302e 35202b20 Pivot.w * 0.5 + │ │ │ │ + 0x00987e40 302e353b 200a2020 2020676c 5f506f73 0.5; . gl_Pos │ │ │ │ + 0x00987e50 6974696f 6e2e7a20 3d206162 7328615f ition.z = abs(a_ │ │ │ │ + 0x00987e60 6e6f726d 616c416e 64416e69 6d617465 normalAndAnimate │ │ │ │ + 0x00987e70 4f725a2e 7a29202a 206e6577 5a20202b OrZ.z) * newZ + │ │ │ │ + 0x00987e80 2028312e 30202d20 61627328 615f6e6f (1.0 - abs(a_no │ │ │ │ + 0x00987e90 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ + 0x00987ea0 5a2e7a29 29202a20 676c5f50 6f736974 Z.z)) * gl_Posit │ │ │ │ + 0x00987eb0 696f6e2e 7a3b200a 20202020 765f7465 ion.z; . v_te │ │ │ │ + 0x00987ec0 78436f6f 72647320 3d20615f 74657843 xCoords = a_texC │ │ │ │ + 0x00987ed0 6f6f7264 733b200a 20202020 765f6d61 oords; . v_ma │ │ │ │ + 0x00987ee0 736b436f 6c6f7220 3d20615f 636f6c6f skColor = a_colo │ │ │ │ + 0x00987ef0 723b200a 20207d20 0a000000 00000000 r; . } ........ │ │ │ │ + 0x00987f00 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00987f10 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00987f20 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00987f30 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00987f40 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00987f50 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00987f60 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00987f70 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00987f80 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00987f90 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00987fa0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00987fb0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00987fc0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00987fd0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00987fe0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00987ff0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00988000 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00988010 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00988020 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00988030 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00988040 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00988050 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ + 0x00988060 2020696e 20766563 3220615f 74657843 in vec2 a_texC │ │ │ │ + 0x00988070 6f6f7264 733b200a 2020696e 20766563 oords; . in vec │ │ │ │ + 0x00988080 3420615f 636f6c6f 723b200a 20206f75 4 a_color; . ou │ │ │ │ + 0x00988090 74207665 63322076 5f746578 436f6f72 t vec2 v_texCoor │ │ │ │ + 0x009880a0 64733b20 0a20206f 75742076 65633420 ds; . out vec4 │ │ │ │ + 0x009880b0 765f636f 6c6f723b 200a2020 756e6966 v_color; . unif │ │ │ │ + 0x009880c0 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ + 0x009880d0 6374696f 6e3b200a 2020636f 6e737420 ction; . const │ │ │ │ + 0x009880e0 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ + 0x009880f0 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ + 0x00988100 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ + 0x00988110 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00988120 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00988130 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00988140 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ + 0x00988150 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00988160 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00988170 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ + 0x00988180 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ + 0x00988190 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ + 0x009881a0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x009881b0 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ + 0x009881c0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x009881d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009881e0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x009881f0 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ + 0x00988200 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00988210 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ + 0x00988220 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ + 0x00988230 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00988240 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00988250 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ + 0x00988260 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ + 0x00988270 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00988280 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ + 0x00988290 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ + 0x009882a0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x009882b0 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x009882c0 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ + 0x009882d0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ + 0x009882e0 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ + 0x009882f0 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ + 0x00988300 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x00988310 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00988320 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00988330 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ + 0x00988340 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ + 0x00988350 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ + 0x00988360 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ + 0x00988370 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ + 0x00988380 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00988390 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ + 0x009883a0 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ + 0x009883b0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x009883c0 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ + 0x009883d0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ + 0x009883e0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x009883f0 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ + 0x00988400 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ + 0x00988410 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ + 0x00988420 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00988430 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ + 0x00988440 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ + 0x00988450 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ + 0x00988460 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ + 0x00988470 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ + 0x00988480 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ + 0x00988490 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ + 0x009884a0 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ + 0x009884b0 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ + 0x009884c0 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ + 0x009884d0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ + 0x009884e0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x009884f0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00988500 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ + 0x00988510 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ + 0x00988520 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x00988530 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ + 0x00988540 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ + 0x00988550 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ + 0x00988560 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ + 0x00988570 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ + 0x00988580 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ + 0x00988590 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ + 0x009885a0 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ + 0x009885b0 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x009885c0 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ + 0x009885d0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x009885e0 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ + 0x009885f0 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ + 0x00988600 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00988610 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ + 0x00988620 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ + 0x00988630 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ + 0x00988640 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00988650 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ + 0x00988660 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ + 0x00988670 0a20207b 200a2020 2020765f 74657843 . { . v_texC │ │ │ │ + 0x00988680 6f6f7264 73203d20 615f7465 78436f6f oords = a_texCoo │ │ │ │ + 0x00988690 7264733b 200a2020 2020765f 636f6c6f rds; . v_colo │ │ │ │ + 0x009886a0 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ + 0x009886b0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x009886c0 76656334 28615f70 6f736974 696f6e2c vec4(a_position, │ │ │ │ + 0x009886d0 20302c20 3129202a 20755f70 726f6a65 0, 1) * u_proje │ │ │ │ + 0x009886e0 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ + 0x009886f0 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ + 0x00988700 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ + 0x00988710 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ + 0x00988720 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ + 0x00988730 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ + 0x00988740 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ + 0x00988750 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ + 0x00988760 64696620 0a20207d 200a0000 00000000 dif . } ....... │ │ │ │ + 0x00988770 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00988780 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00988790 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009887a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009887b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009887c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x009887d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009887e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009887f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00988800 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00988810 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00988820 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00988830 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00988840 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00988850 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00988860 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00988870 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00988880 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00988890 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009888a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009888b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009888c0 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ + 0x009888d0 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ + 0x009888e0 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ + 0x009888f0 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ + 0x00988900 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ + 0x00988910 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00988920 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00988930 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00988940 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00988950 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00988960 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00988970 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ + 0x00988980 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x00988990 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ + 0x009889a0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009889b0 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ + 0x009889c0 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ + 0x009889d0 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ + 0x009889e0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x009889f0 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ + 0x00988a00 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ + 0x00988a10 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00988a20 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00988a30 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x00988a40 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00988a50 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00988a60 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00988a70 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00988a80 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00988a90 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00988aa0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00988ab0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00988ac0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00988ad0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00988ae0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00988af0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00988b00 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00988b10 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00988b20 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00988b30 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00988b40 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00988b50 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00988b60 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00988b70 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00988b80 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00988b90 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00988ba0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00988bb0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00988bc0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00988bd0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00988be0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00988bf0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00988c00 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00988c10 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00988c20 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00988c30 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00988c40 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00988c50 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00988c60 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00988c70 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00988c80 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00988c90 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00988ca0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00988cb0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00988cc0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00988cd0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00988ce0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00988cf0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00988d00 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00988d10 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00988d20 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00988d30 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00988d40 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00988d50 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00988d60 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00988d70 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00988d80 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00988d90 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00988da0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00988db0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00988dc0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00988dd0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00988de0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00988df0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00988e00 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00988e10 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00988e20 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00988e30 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00988e40 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00988e50 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00988e60 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00988e70 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00988e80 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00988e90 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00988ea0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00988eb0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00988ec0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00988ed0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00988ee0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00988ef0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00988f00 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00988f10 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00988f20 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00988f30 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00988f40 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00988f50 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00988f60 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00988f70 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00988f80 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00988f90 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00988fa0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00988fb0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x00988fc0 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ + 0x00988fd0 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ + 0x00988fe0 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ + 0x00988ff0 20202076 65633420 6e6f726d 616c203d vec4 normal = │ │ │ │ + 0x00989000 20766563 3428615f 6e6f726d 616c202a vec4(a_normal * │ │ │ │ + 0x00989010 20755f61 63637572 6163792c 20302e30 u_accuracy, 0.0 │ │ │ │ + 0x00989020 2c20302e 30293b20 0a202020 20706f73 , 0.0); . pos │ │ │ │ + 0x00989030 6974696f 6e203d20 28706f73 6974696f ition = (positio │ │ │ │ + 0x00989040 6e202b20 6e6f726d 616c2920 2a20755f n + normal) * u_ │ │ │ │ + 0x00989050 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ + 0x00989060 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x00989070 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00989080 726d2870 6f736974 696f6e2c 20755f70 rm(position, u_p │ │ │ │ + 0x00989090 69766f74 5472616e 73666f72 6d2c2075 ivotTransform, u │ │ │ │ + 0x009890a0 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ + 0x009890b0 7a536361 6c65293b 200a2020 2020765f zScale); . v_ │ │ │ │ + 0x009890c0 636f6c6f 72546578 436f6f72 6473203d colorTexCoords = │ │ │ │ + 0x009890d0 20615f63 6f6c6f72 54657843 6f6f7264 a_colorTexCoord │ │ │ │ + 0x009890e0 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ + 0x009890f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00989100 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00989110 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00989120 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00989130 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00989140 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00989150 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00989160 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00989170 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00989180 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00989190 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009891a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009891b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009891c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009891d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009891e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009891f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00989200 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00989210 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00989220 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00989230 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00989240 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00989250 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00989260 72546578 436f6f72 643b200a 2020696e rTexCoord; . in │ │ │ │ + 0x00989270 20766563 3220615f 6f75746c 696e6543 vec2 a_outlineC │ │ │ │ + 0x00989280 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00989290 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ + 0x009892a0 6c3b200a 2020696e 20766563 3220615f l; . in vec2 a_ │ │ │ │ + 0x009892b0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ + 0x009892c0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x009892d0 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x009892e0 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x009892f0 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x00989300 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00989310 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x00989320 206f7574 20766563 3220765f 6d61736b out vec2 v_mask │ │ │ │ + 0x00989330 54657843 6f6f7264 3b200a20 20756e69 TexCoord; . uni │ │ │ │ + 0x00989340 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x00989350 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x00989360 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x00989370 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x00989380 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00989390 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x009893a0 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ + 0x009893b0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x009893c0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ + 0x009893d0 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ + 0x009893e0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x009893f0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00989400 20755f6c 656e6774 683b200a 20202369 u_length; . #i │ │ │ │ + 0x00989410 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00989420 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x00989430 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ + 0x00989440 200a2020 23656e64 6966200a 2020636f . #endif . co │ │ │ │ + 0x00989450 6e737420 666c6f61 74206b42 61736544 nst float kBaseD │ │ │ │ + 0x00989460 65707468 53686966 74203d20 2d31302e epthShift = -10. │ │ │ │ + 0x00989470 303b200a 2020636f 6e737420 666c6f61 0; . const floa │ │ │ │ + 0x00989480 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00989490 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x009894a0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x009894b0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x009894c0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x009894d0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x009894e0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x009894f0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00989500 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00989510 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00989520 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00989530 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00989540 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00989550 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00989560 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00989570 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00989580 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00989590 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x009895a0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x009895b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009895c0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x009895d0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x009895e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x009895f0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00989600 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00989610 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00989620 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00989630 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00989640 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00989650 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00989660 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00989670 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00989680 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00989690 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x009896a0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x009896b0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x009896c0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x009896d0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x009896e0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x009896f0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00989700 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00989710 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00989720 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00989730 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00989740 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x00989750 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x00989760 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x00989770 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x00989780 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x00989790 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x009897a0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x009897b0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x009897c0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x009897d0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x009897e0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x009897f0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x00989800 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00989810 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00989820 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00989830 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x00989840 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x00989850 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x00989860 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x00989870 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x00989880 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x00989890 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x009898a0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x009898b0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x009898c0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x009898d0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x009898e0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x009898f0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x00989900 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00989910 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00989920 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00989930 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x00989940 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x00989950 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x00989960 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x00989970 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x00989980 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x00989990 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x009899a0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x009899b0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x009899c0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x009899d0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x009899e0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x009899f0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x00989a00 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00989a10 200a2020 2020666c 6f617420 69734f75 . float isOu │ │ │ │ + 0x00989a20 746c696e 65203d20 73746570 28302e35 tline = step(0.5 │ │ │ │ + 0x00989a30 2c20755f 69734f75 746c696e 65506173 , u_isOutlinePas │ │ │ │ + 0x00989a40 73293b20 0a202020 20666c6f 61742064 s); . float d │ │ │ │ + 0x00989a50 65707468 53686966 74203d20 6b426173 epthShift = kBas │ │ │ │ + 0x00989a60 65446570 74685368 69667420 2a206973 eDepthShift * is │ │ │ │ + 0x00989a70 4f75746c 696e653b 200a2020 20207665 Outline; . ve │ │ │ │ + 0x00989a80 63342070 6f73203d 20287665 63342861 c4 pos = (vec4(a │ │ │ │ + 0x00989a90 5f706f73 6974696f 6e2c2031 2e302920 _position, 1.0) │ │ │ │ + 0x00989aa0 2b207665 63342830 2e302c20 302e302c + vec4(0.0, 0.0, │ │ │ │ + 0x00989ab0 20646570 74685368 6966742c 20302e30 depthShift, 0.0 │ │ │ │ + 0x00989ac0 2929202a 20755f6d 6f64656c 56696577 )) * u_modelView │ │ │ │ + 0x00989ad0 3b200a20 20202076 65633420 73686966 ; . vec4 shif │ │ │ │ + 0x00989ae0 74656450 6f73203d 20766563 3428615f tedPos = vec4(a_ │ │ │ │ + 0x00989af0 6e6f726d 616c2c20 302e302c 20302e30 normal, 0.0, 0.0 │ │ │ │ + 0x00989b00 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ + 0x00989b10 5f506f73 6974696f 6e203d20 73686966 _Position = shif │ │ │ │ + 0x00989b20 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ + 0x00989b30 6374696f 6e3b200a 20202369 66646566 ction; . #ifdef │ │ │ │ + 0x00989b40 2056554c 4b414e20 0a202020 20676c5f VULKAN . gl_ │ │ │ │ + 0x00989b50 506f7369 74696f6e 2e79203d 202d676c Position.y = -gl │ │ │ │ + 0x00989b60 5f506f73 6974696f 6e2e793b 200a2020 _Position.y; . │ │ │ │ + 0x00989b70 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ + 0x00989b80 3d202867 6c5f506f 73697469 6f6e2e7a = (gl_Position.z │ │ │ │ + 0x00989b90 20202b20 676c5f50 6f736974 696f6e2e + gl_Position. │ │ │ │ + 0x00989ba0 7729202a 20302e35 3b200a20 2023656e w) * 0.5; . #en │ │ │ │ + 0x00989bb0 64696620 0a202020 20766563 3220636f dif . vec2 co │ │ │ │ + 0x00989bc0 6c6f7254 6578436f 6f726420 3d206d69 lorTexCoord = mi │ │ │ │ + 0x00989bd0 7828615f 636f6c6f 72546578 436f6f72 x(a_colorTexCoor │ │ │ │ + 0x00989be0 642c2061 5f6f7574 6c696e65 436f6c6f d, a_outlineColo │ │ │ │ + 0x00989bf0 72546578 436f6f72 642c2069 734f7574 rTexCoord, isOut │ │ │ │ + 0x00989c00 6c696e65 293b200a 20202369 66646566 line); . #ifdef │ │ │ │ + 0x00989c10 20454e41 424c455f 56544620 0a202020 ENABLE_VTF . │ │ │ │ + 0x00989c20 20765f63 6f6c6f72 203d2074 65787475 v_color = textu │ │ │ │ + 0x00989c30 72652875 5f636f6c 6f725465 782c2063 re(u_colorTex, c │ │ │ │ + 0x00989c40 6f6c6f72 54657843 6f6f7264 293b200a olorTexCoord); . │ │ │ │ + 0x00989c50 20202365 6c736520 0a202020 20765f63 #else . v_c │ │ │ │ + 0x00989c60 6f6c6f72 54657843 6f6f7264 203d2063 olorTexCoord = c │ │ │ │ + 0x00989c70 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00989c80 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ + 0x00989c90 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ + 0x00989ca0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ + 0x00989cb0 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ + 0x00989cc0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00989cd0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00989ce0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00989cf0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00989d00 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00989d10 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00989d20 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00989d30 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00989d40 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00989d50 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00989d60 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00989d70 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00989d80 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00989d90 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00989da0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00989db0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00989dc0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00989dd0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00989de0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00989df0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00989e00 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00989e10 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00989e20 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x00989e30 64733b20 0a202023 69666465 6620454e ds; . #ifdef EN │ │ │ │ + 0x00989e40 41424c45 5f565446 200a2020 6f757420 ABLE_VTF . out │ │ │ │ + 0x00989e50 4c4f575f 50207665 63342076 5f636f6c LOW_P vec4 v_col │ │ │ │ + 0x00989e60 6f723b20 0a202023 656c7365 200a2020 or; . #else . │ │ │ │ + 0x00989e70 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ + 0x00989e80 54657843 6f6f7264 733b200a 20202365 TexCoords; . #e │ │ │ │ + 0x00989e90 6e646966 200a2020 756e6966 6f726d20 ndif . uniform │ │ │ │ + 0x00989ea0 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ + 0x00989eb0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00989ec0 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ + 0x00989ed0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00989ee0 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x00989ef0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x00989f00 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ + 0x00989f10 613b200a 2020756e 69666f72 6d20666c a; . uniform fl │ │ │ │ + 0x00989f20 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ + 0x00989f30 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00989f40 755f7a53 63616c65 3b200a20 20756e69 u_zScale; . uni │ │ │ │ + 0x00989f50 666f726d 20666c6f 61742075 5f696e74 form float u_int │ │ │ │ + 0x00989f60 6572706f 6c617469 6f6e3b20 0a202075 erpolation; . u │ │ │ │ + 0x00989f70 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x00989f80 734f7574 6c696e65 50617373 3b200a20 sOutlinePass; . │ │ │ │ + 0x00989f90 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00989fa0 5446200a 2020756e 69666f72 6d207361 TF . uniform sa │ │ │ │ + 0x00989fb0 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ + 0x00989fc0 65783b20 0a202023 656e6469 66200a20 ex; . #endif . │ │ │ │ + 0x00989fd0 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00989fe0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00989ff0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x0098a000 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x0098a010 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x0098a020 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x0098a030 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x0098a040 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x0098a050 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x0098a060 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x0098a070 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x0098a080 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098a090 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x0098a0a0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x0098a0b0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x0098a0c0 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x0098a0d0 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x0098a0e0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x0098a0f0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0098a100 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x0098a110 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x0098a120 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x0098a130 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x0098a140 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x0098a150 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098a160 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x0098a170 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x0098a180 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0098a190 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x0098a1a0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x0098a1b0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x0098a1c0 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x0098a1d0 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x0098a1e0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x0098a1f0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x0098a200 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0098a210 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0098a220 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0098a230 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x0098a240 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x0098a250 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x0098a260 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x0098a270 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x0098a280 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x0098a290 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0098a2a0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x0098a2b0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x0098a2c0 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x0098a2d0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x0098a2e0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x0098a2f0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x0098a300 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x0098a310 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x0098a320 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x0098a330 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0098a340 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x0098a350 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x0098a360 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x0098a370 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x0098a380 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x0098a390 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x0098a3a0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x0098a3b0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x0098a3c0 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x0098a3d0 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x0098a3e0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0098a3f0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x0098a400 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x0098a410 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x0098a420 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x0098a430 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x0098a440 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x0098a450 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x0098a460 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x0098a470 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x0098a480 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x0098a490 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x0098a4a0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x0098a4b0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x0098a4c0 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x0098a4d0 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x0098a4e0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x0098a4f0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x0098a500 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x0098a510 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x0098a520 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x0098a530 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x0098a540 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x0098a550 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x0098a560 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x0098a570 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ + 0x0098a580 28615f70 6f736974 696f6e2c 20312920 (a_position, 1) │ │ │ │ + 0x0098a590 2a20755f 6d6f6465 6c566965 77202a20 * u_modelView * │ │ │ │ + 0x0098a5a0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x0098a5b0 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x0098a5c0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x0098a5d0 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ + 0x0098a5e0 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ + 0x0098a5f0 3b200a20 20236966 64656620 454e4142 ; . #ifdef ENAB │ │ │ │ + 0x0098a600 4c455f56 5446200a 20202020 765f636f LE_VTF . v_co │ │ │ │ + 0x0098a610 6c6f7220 3d207465 78747572 6528755f lor = texture(u_ │ │ │ │ + 0x0098a620 636f6c6f 72546578 2c20615f 636f6c6f colorTex, a_colo │ │ │ │ + 0x0098a630 72546578 436f6f72 6473293b 200a2020 rTexCoords); . │ │ │ │ + 0x0098a640 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ + 0x0098a650 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ + 0x0098a660 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ + 0x0098a670 0a202023 656e6469 66200a20 207d200a . #endif . } . │ │ │ │ + 0x0098a680 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x0098a690 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0098a6a0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0098a6b0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0098a6c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098a6d0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0098a6e0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0098a6f0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0098a700 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0098a710 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0098a720 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0098a730 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0098a740 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0098a750 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0098a760 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0098a770 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0098a780 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0098a790 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0098a7a0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0098a7b0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0098a7c0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0098a7d0 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ + 0x0098a7e0 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ + 0x0098a7f0 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ + 0x0098a800 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ + 0x0098a810 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ + 0x0098a820 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ + 0x0098a830 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ + 0x0098a840 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ + 0x0098a850 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x0098a860 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ + 0x0098a870 65747269 63733b20 0a202023 64656669 etrics; . #defi │ │ │ │ + 0x0098a880 6e652053 4d41415f 4d41585f 53454152 ne SMAA_MAX_SEAR │ │ │ │ + 0x0098a890 43485f53 54455053 20382e30 200a2020 CH_STEPS 8.0 . │ │ │ │ + 0x0098a8a0 636f6e73 74207665 6334206b 4d617853 const vec4 kMaxS │ │ │ │ + 0x0098a8b0 65617263 68537465 7073203d 20766563 earchSteps = vec │ │ │ │ + 0x0098a8c0 34282d32 2e30202a 20534d41 415f4d41 4(-2.0 * SMAA_MA │ │ │ │ + 0x0098a8d0 585f5345 41524348 5f535445 50532c20 X_SEARCH_STEPS, │ │ │ │ + 0x0098a8e0 322e3020 2a20534d 41415f4d 41585f53 2.0 * SMAA_MAX_S │ │ │ │ + 0x0098a8f0 45415243 485f5354 4550532c 200a2020 EARCH_STEPS, . │ │ │ │ + 0x0098a900 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0098a910 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0098a920 20202d32 2e30202a 20534d41 415f4d41 -2.0 * SMAA_MA │ │ │ │ + 0x0098a930 585f5345 41524348 5f535445 50532c20 X_SEARCH_STEPS, │ │ │ │ + 0x0098a940 322e3020 202a2053 4d41415f 4d41585f 2.0 * SMAA_MAX_ │ │ │ │ + 0x0098a950 53454152 43485f53 54455053 293b200a SEARCH_STEPS); . │ │ │ │ + 0x0098a960 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ + 0x0098a970 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ + 0x0098a980 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ + 0x0098a990 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ + 0x0098a9a0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x0098a9b0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x0098a9c0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x0098a9d0 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ + 0x0098a9e0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x0098a9f0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x0098aa00 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ + 0x0098aa10 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098aa20 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ + 0x0098aa30 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ + 0x0098aa40 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ + 0x0098aa50 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ + 0x0098aa60 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ + 0x0098aa70 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ + 0x0098aa80 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x0098aa90 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ + 0x0098aaa0 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ + 0x0098aab0 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ + 0x0098aac0 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ + 0x0098aad0 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ + 0x0098aae0 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ + 0x0098aaf0 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ + 0x0098ab00 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ + 0x0098ab10 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098ab20 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ + 0x0098ab30 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ + 0x0098ab40 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x0098ab50 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ + 0x0098ab60 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ + 0x0098ab70 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ + 0x0098ab80 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ + 0x0098ab90 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x0098aba0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x0098abb0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x0098abc0 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ + 0x0098abd0 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ + 0x0098abe0 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ + 0x0098abf0 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ + 0x0098ac00 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x0098ac10 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x0098ac20 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0098ac30 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ + 0x0098ac40 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ + 0x0098ac50 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ + 0x0098ac60 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ + 0x0098ac70 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ + 0x0098ac80 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ + 0x0098ac90 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x0098aca0 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ + 0x0098acb0 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ + 0x0098acc0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098acd0 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ + 0x0098ace0 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ + 0x0098acf0 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ + 0x0098ad00 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ + 0x0098ad10 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0098ad20 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ + 0x0098ad30 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ + 0x0098ad40 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ + 0x0098ad50 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ + 0x0098ad60 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ + 0x0098ad70 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x0098ad80 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ + 0x0098ad90 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ + 0x0098ada0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x0098adb0 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ + 0x0098adc0 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ + 0x0098add0 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ + 0x0098ade0 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ + 0x0098adf0 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ + 0x0098ae00 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ + 0x0098ae10 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ + 0x0098ae20 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ + 0x0098ae30 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ + 0x0098ae40 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ + 0x0098ae50 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ + 0x0098ae60 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ + 0x0098ae70 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ + 0x0098ae80 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0098ae90 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ + 0x0098aea0 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ + 0x0098aeb0 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ + 0x0098aec0 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ + 0x0098aed0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x0098aee0 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ + 0x0098aef0 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ + 0x0098af00 2020765f 636f6f72 6473203d 20766563 v_coords = vec │ │ │ │ + 0x0098af10 3428615f 74636f6f 72642c20 615f7463 4(a_tcoord, a_tc │ │ │ │ + 0x0098af20 6f6f7264 202a2075 5f667261 6d656275 oord * u_framebu │ │ │ │ + 0x0098af30 66666572 4d657472 6963732e 7a77293b fferMetrics.zw); │ │ │ │ + 0x0098af40 200a2020 2020765f 6f666673 65743020 . v_offset0 │ │ │ │ + 0x0098af50 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x0098af60 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ + 0x0098af70 6334282d 302e3235 2c202d30 2e313235 c4(-0.25, -0.125 │ │ │ │ + 0x0098af80 2c20312e 32352c20 2d302e31 32352920 , 1.25, -0.125) │ │ │ │ + 0x0098af90 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ + 0x0098afa0 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ + 0x0098afb0 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x0098afc0 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ + 0x0098afd0 6334282d 302e3132 352c202d 302e3235 c4(-0.125, -0.25 │ │ │ │ + 0x0098afe0 2c202d30 2e313235 2c20312e 32352920 , -0.125, 1.25) │ │ │ │ + 0x0098aff0 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ + 0x0098b000 200a2020 2020765f 6f666673 65743220 . v_offset2 │ │ │ │ + 0x0098b010 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ + 0x0098b020 65747269 63732e78 78797920 2a206b4d etrics.xxyy * kM │ │ │ │ + 0x0098b030 61785365 61726368 53746570 73202b20 axSearchSteps + │ │ │ │ + 0x0098b040 76656334 28765f6f 66667365 74302e78 vec4(v_offset0.x │ │ │ │ + 0x0098b050 7a2c2076 5f6f6666 73657431 2e797729 z, v_offset1.yw) │ │ │ │ + 0x0098b060 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x0098b070 6f6e203d 20766563 3428615f 706f732c on = vec4(a_pos, │ │ │ │ + 0x0098b080 20302e30 2c20312e 30293b20 0a20207d 0.0, 1.0); . } │ │ │ │ + 0x0098b090 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x0098b0a0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0098b0b0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0098b0c0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0098b0d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098b0e0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0098b0f0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0098b100 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0098b110 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0098b120 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0098b130 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0098b140 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0098b150 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0098b160 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0098b170 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0098b180 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0098b190 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0098b1a0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0098b1b0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0098b1c0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0098b1d0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0098b1e0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0098b1f0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0098b200 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x0098b210 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x0098b220 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x0098b230 65633320 615f6c65 6e677468 3b200a20 ec3 a_length; . │ │ │ │ + 0x0098b240 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x0098b250 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ + 0x0098b260 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ + 0x0098b270 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ + 0x0098b280 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x0098b290 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ + 0x0098b2a0 206f7574 20666c6f 61742076 5f6c656e out float v_len │ │ │ │ + 0x0098b2b0 67746859 3b200a20 20756e69 666f726d gthY; . uniform │ │ │ │ + 0x0098b2c0 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ + 0x0098b2d0 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ + 0x0098b2e0 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ + 0x0098b2f0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x0098b300 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x0098b310 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ + 0x0098b320 63342075 5f706f73 6974696f 6e3b200a c4 u_position; . │ │ │ │ + 0x0098b330 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ + 0x0098b340 5f6c696e 65506172 616d733b 200a2020 _lineParams; . │ │ │ │ + 0x0098b350 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0098b360 61636375 72616379 3b200a20 20756e69 accuracy; . uni │ │ │ │ + 0x0098b370 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x0098b380 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x0098b390 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x0098b3a0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0098b3b0 7420755f 617a696d 75743b20 0a202023 t u_azimut; . # │ │ │ │ + 0x0098b3c0 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ + 0x0098b3d0 200a2020 756e6966 6f726d20 73616d70 . uniform samp │ │ │ │ + 0x0098b3e0 6c657232 4420755f 636f6c6f 72546578 ler2D u_colorTex │ │ │ │ + 0x0098b3f0 3b200a20 2023656e 64696620 0a202063 ; . #endif . c │ │ │ │ + 0x0098b400 6f6e7374 20666c6f 6174206b 416e7469 onst float kAnti │ │ │ │ + 0x0098b410 616c6961 73696e67 54687265 73686f6c aliasingThreshol │ │ │ │ + 0x0098b420 64203d20 302e3932 3b200a20 20636f6e d = 0.92; . con │ │ │ │ + 0x0098b430 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x0098b440 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x0098b450 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x0098b460 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x0098b470 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x0098b480 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x0098b490 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x0098b4a0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x0098b4b0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0098b4c0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x0098b4d0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x0098b4e0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x0098b4f0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0098b500 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x0098b510 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0098b520 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x0098b530 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0098b540 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x0098b550 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0098b560 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x0098b570 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x0098b580 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x0098b590 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0098b5a0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x0098b5b0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x0098b5c0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0098b5d0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x0098b5e0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x0098b5f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098b600 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x0098b610 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x0098b620 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x0098b630 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x0098b640 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x0098b650 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x0098b660 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x0098b670 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x0098b680 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x0098b690 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x0098b6a0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x0098b6b0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x0098b6c0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x0098b6d0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0098b6e0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x0098b6f0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x0098b700 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0098b710 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x0098b720 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x0098b730 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x0098b740 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x0098b750 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x0098b760 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x0098b770 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x0098b780 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x0098b790 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x0098b7a0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x0098b7b0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x0098b7c0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x0098b7d0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x0098b7e0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x0098b7f0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x0098b800 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x0098b810 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x0098b820 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x0098b830 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x0098b840 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x0098b850 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x0098b860 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x0098b870 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x0098b880 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x0098b890 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x0098b8a0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x0098b8b0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x0098b8c0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x0098b8d0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x0098b8e0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x0098b8f0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x0098b900 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x0098b910 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x0098b920 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x0098b930 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x0098b940 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x0098b950 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x0098b960 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x0098b970 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x0098b980 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x0098b990 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x0098b9a0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x0098b9b0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x0098b9c0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x0098b9d0 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ + 0x0098b9e0 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ + 0x0098b9f0 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ + 0x0098ba00 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ + 0x0098ba10 69657729 2e78793b 200a2020 20207665 iew).xy; . ve │ │ │ │ + 0x0098ba20 6332206c 656e203d 20766563 3228615f c2 len = vec2(a_ │ │ │ │ + 0x0098ba30 6c656e67 74682e78 2c20615f 6c656e67 length.x, a_leng │ │ │ │ + 0x0098ba40 74682e7a 293b200a 20202020 69662028 th.z); . if ( │ │ │ │ + 0x0098ba50 646f7428 615f6e6f 726d616c 2c20615f dot(a_normal, a_ │ │ │ │ + 0x0098ba60 6e6f726d 616c2920 213d2030 2e302920 normal) != 0.0) │ │ │ │ + 0x0098ba70 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ + 0x0098ba80 6332206e 6f726d20 3d20615f 6e6f726d c2 norm = a_norm │ │ │ │ + 0x0098ba90 616c202a 20755f6c 696e6550 6172616d al * u_lineParam │ │ │ │ + 0x0098baa0 732e783b 200a2020 20202020 7472616e s.x; . tran │ │ │ │ + 0x0098bab0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x0098bac0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x0098bad0 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ + 0x0098bae0 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x0098baf0 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ + 0x0098bb00 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ + 0x0098bb10 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0098bb20 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0098bb30 20202020 20202020 20202020 20755f6d u_m │ │ │ │ + 0x0098bb40 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ + 0x0098bb50 286e6f72 6d29293b 200a2020 20202020 (norm)); . │ │ │ │ + 0x0098bb60 69662028 755f6c69 6e655061 72616d73 if (u_lineParams │ │ │ │ + 0x0098bb70 2e792021 3d20302e 3029200a 20202020 .y != 0.0) . │ │ │ │ + 0x0098bb80 20202020 6c656e20 3d207665 63322861 len = vec2(a │ │ │ │ + 0x0098bb90 5f6c656e 6774682e 78202b20 615f6c65 _length.x + a_le │ │ │ │ + 0x0098bba0 6e677468 2e79202a 20755f6c 696e6550 ngth.y * u_lineP │ │ │ │ + 0x0098bbb0 6172616d 732e792c 20615f6c 656e6774 arams.y, a_lengt │ │ │ │ + 0x0098bbc0 682e7a29 3b200a20 2020207d 200a2020 h.z); . } . │ │ │ │ + 0x0098bbd0 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ + 0x0098bbe0 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ + 0x0098bbf0 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ + 0x0098bc00 5465782c 20615f63 6f6c6f72 54657843 Tex, a_colorTexC │ │ │ │ + 0x0098bc10 6f6f7264 73293b20 0a202023 656c7365 oords); . #else │ │ │ │ + 0x0098bc20 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ + 0x0098bc30 436f6f72 64203d20 615f636f 6c6f7254 Coord = a_colorT │ │ │ │ + 0x0098bc40 6578436f 6f726473 3b200a20 2023656e exCoords; . #en │ │ │ │ + 0x0098bc50 64696620 0a202020 20765f6c 656e6774 dif . v_lengt │ │ │ │ + 0x0098bc60 6859203d 206c656e 2e793b20 0a202020 hY = len.y; . │ │ │ │ + 0x0098bc70 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ + 0x0098bc80 28747261 6e73666f 726d6564 41786973 (transformedAxis │ │ │ │ + 0x0098bc90 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ + 0x0098bca0 7a2c2031 2e302920 2a20755f 70726f6a z, 1.0) * u_proj │ │ │ │ + 0x0098bcb0 65637469 6f6e3b20 0a202020 20676c5f ection; . gl_ │ │ │ │ + 0x0098bcc0 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ + 0x0098bcd0 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ + 0x0098bce0 6f732c20 755f7069 766f7454 72616e73 os, u_pivotTrans │ │ │ │ + 0x0098bcf0 666f726d 2c20302e 30293b20 0a20207d form, 0.0); . } │ │ │ │ + 0x0098bd00 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x0098bd10 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0098bd20 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0098bd30 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0098bd40 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098bd50 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0098bd60 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0098bd70 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0098bd80 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0098bd90 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0098bda0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0098bdb0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0098bdc0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0098bdd0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0098bde0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0098bdf0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0098be00 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0098be10 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0098be20 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0098be30 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0098be40 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0098be50 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0098be60 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0098be70 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x0098be80 643b200a 20206f75 74207665 63322076 d; . out vec2 v │ │ │ │ + 0x0098be90 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x0098bea0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0098beb0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0098bec0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0098bed0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x0098bee0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x0098bef0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x0098bf00 756e6966 6f726d20 76656334 20755f74 uniform vec4 u_t │ │ │ │ + 0x0098bf10 72616666 69635061 72616d73 3b200a20 rafficParams; . │ │ │ │ + 0x0098bf20 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ + 0x0098bf30 6f75746c 696e6543 6f6c6f72 3b200a20 outlineColor; . │ │ │ │ + 0x0098bf40 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ + 0x0098bf50 6c696768 74417272 6f77436f 6c6f723b lightArrowColor; │ │ │ │ + 0x0098bf60 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x0098bf70 20755f64 61726b41 72726f77 436f6c6f u_darkArrowColo │ │ │ │ + 0x0098bf80 723b200a 2020756e 69666f72 6d20666c r; . uniform fl │ │ │ │ + 0x0098bf90 6f617420 755f6f75 746c696e 653b200a oat u_outline; . │ │ │ │ + 0x0098bfa0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0098bfb0 755f6f70 61636974 793b200a 2020636f u_opacity; . co │ │ │ │ + 0x0098bfc0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x0098bfd0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x0098bfe0 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x0098bff0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0098c000 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0098c010 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0098c020 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0098c030 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x0098c040 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0098c050 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x0098c060 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x0098c070 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x0098c080 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0098c090 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x0098c0a0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0098c0b0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0098c0c0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x0098c0d0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x0098c0e0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0098c0f0 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x0098c100 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x0098c110 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0098c120 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x0098c130 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x0098c140 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x0098c150 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0098c160 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x0098c170 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x0098c180 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x0098c190 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x0098c1a0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0098c1b0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x0098c1c0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x0098c1d0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x0098c1e0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x0098c1f0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x0098c200 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0098c210 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x0098c220 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x0098c230 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x0098c240 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x0098c250 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x0098c260 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x0098c270 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x0098c280 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x0098c290 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0098c2a0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x0098c2b0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x0098c2c0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0098c2d0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x0098c2e0 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x0098c2f0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x0098c300 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x0098c310 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x0098c320 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x0098c330 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x0098c340 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x0098c350 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x0098c360 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x0098c370 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0098c380 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x0098c390 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x0098c3a0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x0098c3b0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x0098c3c0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x0098c3d0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x0098c3e0 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x0098c3f0 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x0098c400 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x0098c410 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x0098c420 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x0098c430 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x0098c440 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x0098c450 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x0098c460 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x0098c470 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x0098c480 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x0098c490 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x0098c4a0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x0098c4b0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0098c4c0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x0098c4d0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x0098c4e0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0098c4f0 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x0098c500 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x0098c510 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x0098c520 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0098c530 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0098c540 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x0098c550 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ + 0x0098c560 63322074 72616e73 666f726d 65644178 c2 transformedAx │ │ │ │ + 0x0098c570 6973506f 73203d20 28766563 3428615f isPos = (vec4(a_ │ │ │ │ + 0x0098c580 706f7369 74696f6e 2e78792c 20302e30 position.xy, 0.0 │ │ │ │ + 0x0098c590 2c20312e 3029202a 20755f6d 6f64656c , 1.0) * u_model │ │ │ │ + 0x0098c5a0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x0098c5b0 65633420 706f7320 3d207665 63342874 ec4 pos = vec4(t │ │ │ │ + 0x0098c5c0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x0098c5d0 732c2061 5f706f73 6974696f 6e2e7a2c s, a_position.z, │ │ │ │ + 0x0098c5e0 20312e30 29202a20 755f7072 6f6a6563 1.0) * u_projec │ │ │ │ + 0x0098c5f0 74696f6e 3b200a20 20202076 5f636f6c tion; . v_col │ │ │ │ + 0x0098c600 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ + 0x0098c610 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x0098c620 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x0098c630 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x0098c640 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ + 0x0098c650 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ + 0x0098c660 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x0098c670 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0098c680 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0098c690 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0098c6a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0098c6b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0098c6c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0098c6d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098c6e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0098c6f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0098c700 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0098c710 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0098c720 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0098c730 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0098c740 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0098c750 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0098c760 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0098c770 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0098c780 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0098c790 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0098c7a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0098c7b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0098c7c0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0098c7d0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x0098c7e0 616c3b20 0a202069 6e207665 63332061 al; . in vec3 a │ │ │ │ + 0x0098c7f0 5f6c656e 6774683b 200a2020 696e2076 _length; . in v │ │ │ │ + 0x0098c800 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ + 0x0098c810 6f757420 76656333 20765f6c 656e6774 out vec3 v_lengt │ │ │ │ + 0x0098c820 683b200a 20206f75 74207665 63342076 h; . out vec4 v │ │ │ │ + 0x0098c830 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ + 0x0098c840 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x0098c850 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x0098c860 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x0098c870 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x0098c880 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x0098c890 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x0098c8a0 76656334 20755f72 6f757465 50617261 vec4 u_routePara │ │ │ │ + 0x0098c8b0 6d733b20 0a202075 6e69666f 726d2076 ms; . uniform v │ │ │ │ + 0x0098c8c0 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ + 0x0098c8d0 756e6966 6f726d20 76656334 20755f6d uniform vec4 u_m │ │ │ │ + 0x0098c8e0 61736b43 6f6c6f72 3b200a20 20756e69 askColor; . uni │ │ │ │ + 0x0098c8f0 666f726d 20766563 3420755f 6f75746c form vec4 u_outl │ │ │ │ + 0x0098c900 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ + 0x0098c910 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ + 0x0098c920 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x0098c930 6d207665 63342075 5f66616b 654f7574 m vec4 u_fakeOut │ │ │ │ + 0x0098c940 6c696e65 436f6c6f 723b200a 2020756e lineColor; . un │ │ │ │ + 0x0098c950 69666f72 6d207665 63322075 5f66616b iform vec2 u_fak │ │ │ │ + 0x0098c960 65426f72 64657273 3b200a20 20756e69 eBorders; . uni │ │ │ │ + 0x0098c970 666f726d 20766563 3220755f 70617474 form vec2 u_patt │ │ │ │ + 0x0098c980 65726e3b 200a2020 756e6966 6f726d20 ern; . uniform │ │ │ │ + 0x0098c990 76656332 20755f61 6e676c65 436f7353 vec2 u_angleCosS │ │ │ │ + 0x0098c9a0 696e3b20 0a202075 6e69666f 726d2066 in; . uniform f │ │ │ │ + 0x0098c9b0 6c6f6174 20755f61 72726f77 48616c66 loat u_arrowHalf │ │ │ │ + 0x0098c9c0 57696474 683b200a 2020756e 69666f72 Width; . unifor │ │ │ │ + 0x0098c9d0 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x0098c9e0 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ + 0x0098c9f0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x0098ca00 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x0098ca10 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x0098ca20 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x0098ca30 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x0098ca40 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x0098ca50 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x0098ca60 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x0098ca70 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x0098ca80 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x0098ca90 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x0098caa0 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x0098cab0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x0098cac0 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x0098cad0 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x0098cae0 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x0098caf0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x0098cb00 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x0098cb10 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x0098cb20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098cb30 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x0098cb40 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x0098cb50 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0098cb60 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x0098cb70 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x0098cb80 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x0098cb90 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x0098cba0 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x0098cbb0 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x0098cbc0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x0098cbd0 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x0098cbe0 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x0098cbf0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x0098cc00 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x0098cc10 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x0098cc20 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x0098cc30 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x0098cc40 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x0098cc50 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x0098cc60 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x0098cc70 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x0098cc80 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x0098cc90 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x0098cca0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0098ccb0 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x0098ccc0 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x0098ccd0 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x0098cce0 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x0098ccf0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x0098cd00 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x0098cd10 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x0098cd20 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x0098cd30 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x0098cd40 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x0098cd50 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x0098cd60 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x0098cd70 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x0098cd80 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x0098cd90 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x0098cda0 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x0098cdb0 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x0098cdc0 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x0098cdd0 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x0098cde0 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x0098cdf0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x0098ce00 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x0098ce10 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x0098ce20 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x0098ce30 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x0098ce40 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x0098ce50 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x0098ce60 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x0098ce70 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x0098ce80 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x0098ce90 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x0098cea0 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x0098ceb0 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x0098cec0 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x0098ced0 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x0098cee0 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x0098cef0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x0098cf00 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x0098cf10 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x0098cf20 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x0098cf30 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x0098cf40 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x0098cf50 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x0098cf60 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x0098cf70 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x0098cf80 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ + 0x0098cf90 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ + 0x0098cfa0 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ + 0x0098cfb0 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ + 0x0098cfc0 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ + 0x0098cfd0 3b200a20 20202076 65633220 6c656e20 ; . vec2 len │ │ │ │ + 0x0098cfe0 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ + 0x0098cff0 782c2061 5f6c656e 6774682e 7a293b20 x, a_length.z); │ │ │ │ + 0x0098d000 0a202020 20696620 28646f74 28615f6e . if (dot(a_n │ │ │ │ + 0x0098d010 6f726d61 6c2c2061 5f6e6f72 6d616c29 ormal, a_normal) │ │ │ │ + 0x0098d020 20213d20 302e3029 200a2020 20207b20 != 0.0) . { │ │ │ │ + 0x0098d030 0a202020 20202076 65633220 6e6f726d . vec2 norm │ │ │ │ + 0x0098d040 203d2061 5f6e6f72 6d616c20 2a20755f = a_normal * u_ │ │ │ │ + 0x0098d050 726f7574 65506172 616d732e 783b200a routeParams.x; . │ │ │ │ + 0x0098d060 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ + 0x0098d070 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ + 0x0098d080 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x0098d090 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ + 0x0098d0a0 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ + 0x0098d0b0 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ + 0x0098d0c0 0a202020 20202020 20202020 20202020 . │ │ │ │ + 0x0098d0d0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0098d0e0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0098d0f0 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ + 0x0098d100 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ + 0x0098d110 293b200a 20202020 20206966 2028755f ); . if (u_ │ │ │ │ + 0x0098d120 726f7574 65506172 616d732e 7920213d routeParams.y != │ │ │ │ + 0x0098d130 20302e30 29200a20 20202020 2020206c 0.0) . l │ │ │ │ + 0x0098d140 656e203d 20766563 3228615f 6c656e67 en = vec2(a_leng │ │ │ │ + 0x0098d150 74682e78 202b2061 5f6c656e 6774682e th.x + a_length. │ │ │ │ + 0x0098d160 79202a20 755f726f 75746550 6172616d y * u_routeParam │ │ │ │ + 0x0098d170 732e792c 20615f6c 656e6774 682e7a29 s.y, a_length.z) │ │ │ │ + 0x0098d180 3b200a20 2020207d 200a2020 2020765f ; . } . v_ │ │ │ │ + 0x0098d190 6c656e67 7468203d 20766563 33286c65 length = vec3(le │ │ │ │ + 0x0098d1a0 6e2c2075 5f726f75 74655061 72616d73 n, u_routeParams │ │ │ │ + 0x0098d1b0 2e7a293b 200a2020 2020765f 636f6c6f .z); . v_colo │ │ │ │ + 0x0098d1c0 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ + 0x0098d1d0 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ + 0x0098d1e0 34287472 616e7366 6f726d65 64417869 4(transformedAxi │ │ │ │ + 0x0098d1f0 73506f73 2c20615f 706f7369 74696f6e sPos, a_position │ │ │ │ + 0x0098d200 2e7a2c20 312e3029 202a2075 5f70726f .z, 1.0) * u_pro │ │ │ │ + 0x0098d210 6a656374 696f6e3b 200a2020 2020676c jection; . gl │ │ │ │ + 0x0098d220 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x0098d230 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0098d240 706f732c 20755f70 69766f74 5472616e pos, u_pivotTran │ │ │ │ + 0x0098d250 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ + 0x0098d260 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x0098d270 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0098d280 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0098d290 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0098d2a0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098d2b0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0098d2c0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0098d2d0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0098d2e0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0098d2f0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0098d300 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0098d310 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0098d320 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0098d330 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0098d340 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0098d350 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0098d360 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0098d370 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0098d380 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0098d390 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0098d3a0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0098d3b0 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x0098d3c0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0098d3d0 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ + 0x0098d3e0 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x0098d3f0 0a20206f 75742076 65633420 765f7261 . out vec4 v_ra │ │ │ │ + 0x0098d400 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ + 0x0098d410 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ + 0x0098d420 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ + 0x0098d430 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ + 0x0098d440 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ + 0x0098d450 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x0098d460 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ + 0x0098d470 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ + 0x0098d480 726d2076 65633420 755f726f 75746550 rm vec4 u_routeP │ │ │ │ + 0x0098d490 6172616d 733b200a 2020756e 69666f72 arams; . unifor │ │ │ │ + 0x0098d4a0 6d207665 63342075 5f636f6c 6f723b20 m vec4 u_color; │ │ │ │ + 0x0098d4b0 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x0098d4c0 755f6d61 736b436f 6c6f723b 200a2020 u_maskColor; . │ │ │ │ + 0x0098d4d0 756e6966 6f726d20 76656334 20755f6f uniform vec4 u_o │ │ │ │ + 0x0098d4e0 75746c69 6e65436f 6c6f723b 200a2020 utlineColor; . │ │ │ │ + 0x0098d4f0 756e6966 6f726d20 76656334 20755f66 uniform vec4 u_f │ │ │ │ + 0x0098d500 616b6543 6f6c6f72 3b200a20 20756e69 akeColor; . uni │ │ │ │ + 0x0098d510 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ + 0x0098d520 4f75746c 696e6543 6f6c6f72 3b200a20 OutlineColor; . │ │ │ │ + 0x0098d530 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x0098d540 66616b65 426f7264 6572733b 200a2020 fakeBorders; . │ │ │ │ + 0x0098d550 756e6966 6f726d20 76656332 20755f70 uniform vec2 u_p │ │ │ │ + 0x0098d560 61747465 726e3b20 0a202075 6e69666f attern; . unifo │ │ │ │ + 0x0098d570 726d2076 65633220 755f616e 676c6543 rm vec2 u_angleC │ │ │ │ + 0x0098d580 6f735369 6e3b200a 2020756e 69666f72 osSin; . unifor │ │ │ │ + 0x0098d590 6d20666c 6f617420 755f6172 726f7748 m float u_arrowH │ │ │ │ + 0x0098d5a0 616c6657 69647468 3b200a20 20756e69 alfWidth; . uni │ │ │ │ + 0x0098d5b0 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ + 0x0098d5c0 63697479 3b200a20 20636f6e 73742066 city; . const f │ │ │ │ + 0x0098d5d0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x0098d5e0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x0098d5f0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x0098d600 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0098d610 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0098d620 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0098d630 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x0098d640 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x0098d650 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x0098d660 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x0098d670 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x0098d680 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x0098d690 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098d6a0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x0098d6b0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x0098d6c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0098d6d0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x0098d6e0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x0098d6f0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x0098d700 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x0098d710 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x0098d720 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x0098d730 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0098d740 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x0098d750 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x0098d760 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098d770 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x0098d780 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x0098d790 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x0098d7a0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x0098d7b0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x0098d7c0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x0098d7d0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x0098d7e0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x0098d7f0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x0098d800 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x0098d810 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x0098d820 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x0098d830 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x0098d840 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x0098d850 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x0098d860 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x0098d870 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098d880 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x0098d890 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x0098d8a0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x0098d8b0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x0098d8c0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x0098d8d0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0098d8e0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x0098d8f0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x0098d900 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x0098d910 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0098d920 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x0098d930 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x0098d940 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x0098d950 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x0098d960 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x0098d970 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x0098d980 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x0098d990 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x0098d9a0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x0098d9b0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x0098d9c0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x0098d9d0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x0098d9e0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x0098d9f0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x0098da00 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x0098da10 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x0098da20 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x0098da30 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x0098da40 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x0098da50 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x0098da60 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x0098da70 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x0098da80 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x0098da90 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x0098daa0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x0098dab0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x0098dac0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x0098dad0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x0098dae0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x0098daf0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x0098db00 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x0098db10 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x0098db20 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x0098db30 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x0098db40 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x0098db50 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x0098db60 20207b20 0a202020 20666c6f 61742072 { . float r │ │ │ │ + 0x0098db70 203d2075 5f726f75 74655061 72616d73 = u_routeParams │ │ │ │ + 0x0098db80 2e78202a 20615f6e 6f726d61 6c2e7a3b .x * a_normal.z; │ │ │ │ + 0x0098db90 200a2020 20207665 6332206e 6f726d61 . vec2 norma │ │ │ │ + 0x0098dba0 6c203d20 76656332 28615f6e 6f726d61 l = vec2(a_norma │ │ │ │ + 0x0098dbb0 6c2e7820 2a20755f 616e676c 65436f73 l.x * u_angleCos │ │ │ │ + 0x0098dbc0 53696e2e 78202d20 615f6e6f 726d616c Sin.x - a_normal │ │ │ │ + 0x0098dbd0 2e79202a 20755f61 6e676c65 436f7353 .y * u_angleCosS │ │ │ │ + 0x0098dbe0 696e2e79 2c200a20 20202020 20202020 in.y, . │ │ │ │ + 0x0098dbf0 20202020 20202020 20202020 2020615f a_ │ │ │ │ + 0x0098dc00 6e6f726d 616c2e78 202a2075 5f616e67 normal.x * u_ang │ │ │ │ + 0x0098dc10 6c65436f 7353696e 2e79202b 20615f6e leCosSin.y + a_n │ │ │ │ + 0x0098dc20 6f726d61 6c2e7920 2a20755f 616e676c ormal.y * u_angl │ │ │ │ + 0x0098dc30 65436f73 53696e2e 78293b20 0a202020 eCosSin.x); . │ │ │ │ + 0x0098dc40 20766563 34207261 64697573 203d2076 vec4 radius = v │ │ │ │ + 0x0098dc50 65633428 6e6f726d 616c2e78 79202a20 ec4(normal.xy * │ │ │ │ + 0x0098dc60 722c2072 2c20615f 706f7369 74696f6e r, r, a_position │ │ │ │ + 0x0098dc70 2e77293b 200a2020 20207665 63342070 .w); . vec4 p │ │ │ │ + 0x0098dc80 6f73203d 20766563 3428615f 706f7369 os = vec4(a_posi │ │ │ │ + 0x0098dc90 74696f6e 2e78792c 20302c20 3129202a tion.xy, 0, 1) * │ │ │ │ + 0x0098dca0 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ + 0x0098dcb0 20202076 65633220 73686966 74656450 vec2 shiftedP │ │ │ │ + 0x0098dcc0 6f73203d 20726164 6975732e 7879202b os = radius.xy + │ │ │ │ + 0x0098dcd0 20706f73 2e78793b 200a2020 2020706f pos.xy; . po │ │ │ │ + 0x0098dce0 73203d20 76656334 28736869 66746564 s = vec4(shifted │ │ │ │ + 0x0098dcf0 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ + 0x0098dd00 7a2c2031 2e302920 2a20755f 70726f6a z, 1.0) * u_proj │ │ │ │ + 0x0098dd10 65637469 6f6e3b20 0a202020 20676c5f ection; . gl_ │ │ │ │ + 0x0098dd20 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ + 0x0098dd30 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ + 0x0098dd40 6f732c20 755f7069 766f7454 72616e73 os, u_pivotTrans │ │ │ │ + 0x0098dd50 666f726d 2c20302e 30293b20 0a202020 form, 0.0); . │ │ │ │ + 0x0098dd60 20765f72 61646975 73203d20 72616469 v_radius = radi │ │ │ │ + 0x0098dd70 75733b20 0a202020 20765f63 6f6c6f72 us; . v_color │ │ │ │ + 0x0098dd80 203d2061 5f636f6c 6f723b20 0a20207d = a_color; . } │ │ │ │ + 0x0098dd90 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x0098dda0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0098ddb0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0098ddc0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0098ddd0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098dde0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0098ddf0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0098de00 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0098de10 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0098de20 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0098de30 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0098de40 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0098de50 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0098de60 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0098de70 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0098de80 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0098de90 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0098dea0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0098deb0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0098dec0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0098ded0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0098dee0 0a202023 64656669 6e652054 494c455f . #define TILE_ │ │ │ │ + 0x0098def0 4241434b 47524f55 4e445f4d 41585f43 BACKGROUND_MAX_C │ │ │ │ + 0x0098df00 4f554e54 20363420 0a20206f 75742076 OUNT 64 . out v │ │ │ │ + 0x0098df10 65633320 765f7465 78436f6f 7264733b ec3 v_texCoords; │ │ │ │ + 0x0098df20 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x0098df30 20755f74 696c6543 6f6f7264 734d696e u_tileCoordsMin │ │ │ │ + 0x0098df40 4d61785b 54494c45 5f424143 4b47524f Max[TILE_BACKGRO │ │ │ │ + 0x0098df50 554e445f 4d41585f 434f554e 545d3b20 UND_MAX_COUNT]; │ │ │ │ + 0x0098df60 0a202075 6e69666f 726d2069 6e742075 . uniform int u │ │ │ │ + 0x0098df70 5f746578 74757265 496e6465 785b5449 _textureIndex[TI │ │ │ │ + 0x0098df80 4c455f42 41434b47 524f554e 445f4d41 LE_BACKGROUND_MA │ │ │ │ + 0x0098df90 585f434f 554e545d 3b200a20 20756e69 X_COUNT]; . uni │ │ │ │ + 0x0098dfa0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ + 0x0098dfb0 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ + 0x0098dfc0 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ + 0x0098dfd0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x0098dfe0 6d617434 20755f70 69766f74 5472616e mat4 u_pivotTran │ │ │ │ + 0x0098dff0 73666f72 6d3b200a 2020636f 6e737420 sform; . const │ │ │ │ + 0x0098e000 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ + 0x0098e010 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ + 0x0098e020 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ + 0x0098e030 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x0098e040 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x0098e050 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x0098e060 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ + 0x0098e070 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x0098e080 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098e090 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ + 0x0098e0a0 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ + 0x0098e0b0 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ + 0x0098e0c0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0098e0d0 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ + 0x0098e0e0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x0098e0f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098e100 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x0098e110 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ + 0x0098e120 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0098e130 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ + 0x0098e140 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ + 0x0098e150 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x0098e160 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0098e170 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ + 0x0098e180 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ + 0x0098e190 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0098e1a0 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ + 0x0098e1b0 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ + 0x0098e1c0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0098e1d0 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x0098e1e0 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ + 0x0098e1f0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ + 0x0098e200 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ + 0x0098e210 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ + 0x0098e220 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x0098e230 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x0098e240 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x0098e250 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ + 0x0098e260 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ + 0x0098e270 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ + 0x0098e280 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ + 0x0098e290 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ + 0x0098e2a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098e2b0 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ + 0x0098e2c0 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ + 0x0098e2d0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x0098e2e0 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ + 0x0098e2f0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ + 0x0098e300 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0098e310 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ + 0x0098e320 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ + 0x0098e330 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ + 0x0098e340 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0098e350 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ + 0x0098e360 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ + 0x0098e370 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ + 0x0098e380 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ + 0x0098e390 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ + 0x0098e3a0 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ + 0x0098e3b0 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ + 0x0098e3c0 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ + 0x0098e3d0 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ + 0x0098e3e0 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ + 0x0098e3f0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ + 0x0098e400 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0098e410 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0098e420 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ + 0x0098e430 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ + 0x0098e440 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x0098e450 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ + 0x0098e460 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ + 0x0098e470 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ + 0x0098e480 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ + 0x0098e490 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ + 0x0098e4a0 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ + 0x0098e4b0 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ + 0x0098e4c0 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ + 0x0098e4d0 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x0098e4e0 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ + 0x0098e4f0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0098e500 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ + 0x0098e510 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ + 0x0098e520 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x0098e530 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ + 0x0098e540 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ + 0x0098e550 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ + 0x0098e560 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0098e570 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ + 0x0098e580 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ + 0x0098e590 0a20207b 200a2020 20207665 63322071 . { . vec2 q │ │ │ │ + 0x0098e5a0 75616456 65727465 78203d20 76656332 uadVertex = vec2 │ │ │ │ + 0x0098e5b0 28676c5f 56657274 65784944 20262031 (gl_VertexID & 1 │ │ │ │ + 0x0098e5c0 2c202867 6c5f5665 72746578 4944203e , (gl_VertexID > │ │ │ │ + 0x0098e5d0 3e203129 20262031 293b200a 2020200a > 1) & 1); . . │ │ │ │ + 0x0098e5e0 20202020 76656334 2074696c 65436f6f vec4 tileCoo │ │ │ │ + 0x0098e5f0 7264734d 696e4d61 78203d20 755f7469 rdsMinMax = u_ti │ │ │ │ + 0x0098e600 6c65436f 6f726473 4d696e4d 61785b67 leCoordsMinMax[g │ │ │ │ + 0x0098e610 6c5f496e 7374616e 63654944 5d3b200a l_InstanceID]; . │ │ │ │ + 0x0098e620 20202020 76656332 20776f72 6c64506f vec2 worldPo │ │ │ │ + 0x0098e630 73203d20 6d697828 74696c65 436f6f72 s = mix(tileCoor │ │ │ │ + 0x0098e640 64734d69 6e4d6178 2e78792c 2074696c dsMinMax.xy, til │ │ │ │ + 0x0098e650 65436f6f 7264734d 696e4d61 782e7a77 eCoordsMinMax.zw │ │ │ │ + 0x0098e660 2c207175 61645665 72746578 293b200a , quadVertex); . │ │ │ │ + 0x0098e670 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x0098e680 65633428 776f726c 64506f73 2c20302e ec4(worldPos, 0. │ │ │ │ + 0x0098e690 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ + 0x0098e6a0 6c566965 77202a20 755f7072 6f6a6563 lView * u_projec │ │ │ │ + 0x0098e6b0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x0098e6c0 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ + 0x0098e6d0 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ + 0x0098e6e0 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x0098e6f0 726d2c20 302e3029 3b200a20 20200a20 rm, 0.0); . . │ │ │ │ + 0x0098e700 20202076 5f746578 436f6f72 6473203d v_texCoords = │ │ │ │ + 0x0098e710 20766563 33287175 61645665 72746578 vec3(quadVertex │ │ │ │ + 0x0098e720 2c20666c 6f617428 755f7465 78747572 , float(u_textur │ │ │ │ + 0x0098e730 65496e64 65785b67 6c5f496e 7374616e eIndex[gl_Instan │ │ │ │ + 0x0098e740 63654944 5d29293b 200a2020 7d200a00 ceID])); . } .. │ │ │ │ + 0x0098e750 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0098e760 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0098e770 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0098e780 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0098e790 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0098e7a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0098e7b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098e7c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0098e7d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0098e7e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0098e7f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0098e800 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0098e810 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0098e820 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0098e830 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0098e840 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0098e850 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0098e860 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0098e870 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0098e880 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0098e890 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0098e8a0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0098e8b0 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x0098e8c0 72546578 436f6f72 64733b20 0a202069 rTexCoords; . i │ │ │ │ + 0x0098e8d0 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ + 0x0098e8e0 436f6f72 64733b20 0a202023 69666465 Coords; . #ifde │ │ │ │ + 0x0098e8f0 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x0098e900 6f757420 4c4f575f 50207665 63342076 out LOW_P vec4 v │ │ │ │ + 0x0098e910 5f636f6c 6f723b20 0a202023 656c7365 _color; . #else │ │ │ │ + 0x0098e920 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x0098e930 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x0098e940 20202365 6e646966 200a2020 6f757420 #endif . out │ │ │ │ + 0x0098e950 76656332 20765f6d 61736b54 6578436f vec2 v_maskTexCo │ │ │ │ + 0x0098e960 6f726473 3b200a20 20756e69 666f726d ords; . uniform │ │ │ │ + 0x0098e970 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ + 0x0098e980 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ + 0x0098e990 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ + 0x0098e9a0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x0098e9b0 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x0098e9c0 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ + 0x0098e9d0 63322075 5f636f6e 74726173 7447616d c2 u_contrastGam │ │ │ │ + 0x0098e9e0 6d613b20 0a202075 6e69666f 726d2066 ma; . uniform f │ │ │ │ + 0x0098e9f0 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ + 0x0098ea00 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x0098ea10 20755f7a 5363616c 653b200a 2020756e u_zScale; . un │ │ │ │ + 0x0098ea20 69666f72 6d20666c 6f617420 755f696e iform float u_in │ │ │ │ + 0x0098ea30 74657270 6f6c6174 696f6e3b 200a2020 terpolation; . │ │ │ │ + 0x0098ea40 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0098ea50 69734f75 746c696e 65506173 733b200a isOutlinePass; . │ │ │ │ + 0x0098ea60 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ + 0x0098ea70 56544620 0a202075 6e69666f 726d2073 VTF . uniform s │ │ │ │ + 0x0098ea80 616d706c 65723244 20755f63 6f6c6f72 ampler2D u_color │ │ │ │ + 0x0098ea90 5465783b 200a2020 23656e64 6966200a Tex; . #endif . │ │ │ │ + 0x0098eaa0 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ + 0x0098eab0 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ + 0x0098eac0 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ + 0x0098ead0 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ + 0x0098eae0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x0098eaf0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x0098eb00 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x0098eb10 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ + 0x0098eb20 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x0098eb30 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x0098eb40 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ + 0x0098eb50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098eb60 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ + 0x0098eb70 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ + 0x0098eb80 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ + 0x0098eb90 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ + 0x0098eba0 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ + 0x0098ebb0 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ + 0x0098ebc0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x0098ebd0 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ + 0x0098ebe0 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ + 0x0098ebf0 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ + 0x0098ec00 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ + 0x0098ec10 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ + 0x0098ec20 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ + 0x0098ec30 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ + 0x0098ec40 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ + 0x0098ec50 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098ec60 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ + 0x0098ec70 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ + 0x0098ec80 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x0098ec90 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ + 0x0098eca0 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ + 0x0098ecb0 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ + 0x0098ecc0 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ + 0x0098ecd0 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x0098ece0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x0098ecf0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x0098ed00 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ + 0x0098ed10 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ + 0x0098ed20 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ + 0x0098ed30 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ + 0x0098ed40 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x0098ed50 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x0098ed60 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0098ed70 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ + 0x0098ed80 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ + 0x0098ed90 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ + 0x0098eda0 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ + 0x0098edb0 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ + 0x0098edc0 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ + 0x0098edd0 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x0098ede0 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ + 0x0098edf0 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ + 0x0098ee00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098ee10 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ + 0x0098ee20 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ + 0x0098ee30 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ + 0x0098ee40 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ + 0x0098ee50 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0098ee60 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ + 0x0098ee70 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ + 0x0098ee80 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ + 0x0098ee90 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ + 0x0098eea0 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ + 0x0098eeb0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x0098eec0 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ + 0x0098eed0 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ + 0x0098eee0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x0098eef0 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ + 0x0098ef00 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ + 0x0098ef10 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ + 0x0098ef20 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ + 0x0098ef30 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ + 0x0098ef40 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ + 0x0098ef50 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ + 0x0098ef60 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ + 0x0098ef70 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ + 0x0098ef80 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ + 0x0098ef90 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ + 0x0098efa0 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ + 0x0098efb0 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ + 0x0098efc0 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0098efd0 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ + 0x0098efe0 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ + 0x0098eff0 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ + 0x0098f000 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ + 0x0098f010 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x0098f020 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ + 0x0098f030 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ + 0x0098f040 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ + 0x0098f050 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ + 0x0098f060 202a2075 5f6d6f64 656c5669 6577202a * u_modelView * │ │ │ │ + 0x0098f070 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x0098f080 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x0098f090 3d206170 706c7950 69766f74 5472616e = applyPivotTran │ │ │ │ + 0x0098f0a0 73666f72 6d28706f 732c2075 5f706976 sform(pos, u_piv │ │ │ │ + 0x0098f0b0 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ + 0x0098f0c0 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ + 0x0098f0d0 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ + 0x0098f0e0 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ + 0x0098f0f0 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ + 0x0098f100 6f725465 78436f6f 72647329 3b200a20 orTexCoords); . │ │ │ │ + 0x0098f110 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ + 0x0098f120 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ + 0x0098f130 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x0098f140 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x0098f150 765f6d61 736b5465 78436f6f 72647320 v_maskTexCoords │ │ │ │ + 0x0098f160 3d20615f 6d61736b 54657843 6f6f7264 = a_maskTexCoord │ │ │ │ + 0x0098f170 733b200a 20207d20 0a000000 00000000 s; . } ........ │ │ │ │ + 0x0098f180 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0098f190 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0098f1a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0098f1b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0098f1c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0098f1d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0098f1e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098f1f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0098f200 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0098f210 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0098f220 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0098f230 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0098f240 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0098f250 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0098f260 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0098f270 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0098f280 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0098f290 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0098f2a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0098f2b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0098f2c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0098f2d0 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ + 0x0098f2e0 76656333 20615f6e 6f726d61 6c3b200a vec3 a_normal; . │ │ │ │ + 0x0098f2f0 20206f75 74207665 63332076 5f6e6f72 out vec3 v_nor │ │ │ │ + 0x0098f300 6d616c3b 200a2020 756e6966 6f726d20 mal; . uniform │ │ │ │ + 0x0098f310 6d617434 20755f74 72616e73 666f726d mat4 u_transform │ │ │ │ + 0x0098f320 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0098f330 3420755f 6e6f726d 616c5472 616e7366 4 u_normalTransf │ │ │ │ + 0x0098f340 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x0098f350 76656334 20755f63 6f6c6f72 3b200a20 vec4 u_color; . │ │ │ │ + 0x0098f360 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x0098f370 74657843 6f6f7264 466c6970 70696e67 texCoordFlipping │ │ │ │ + 0x0098f380 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x0098f390 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x0098f3a0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x0098f3b0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x0098f3c0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x0098f3d0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x0098f3e0 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x0098f3f0 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x0098f400 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x0098f410 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x0098f420 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x0098f430 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x0098f440 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x0098f450 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x0098f460 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x0098f470 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x0098f480 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x0098f490 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x0098f4a0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x0098f4b0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x0098f4c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098f4d0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x0098f4e0 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x0098f4f0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x0098f500 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x0098f510 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x0098f520 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x0098f530 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x0098f540 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x0098f550 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x0098f560 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x0098f570 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x0098f580 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x0098f590 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x0098f5a0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x0098f5b0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x0098f5c0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x0098f5d0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x0098f5e0 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x0098f5f0 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x0098f600 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x0098f610 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x0098f620 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x0098f630 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x0098f640 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x0098f650 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x0098f660 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x0098f670 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x0098f680 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x0098f690 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x0098f6a0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x0098f6b0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x0098f6c0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x0098f6d0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x0098f6e0 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x0098f6f0 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x0098f700 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x0098f710 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x0098f720 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x0098f730 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x0098f740 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x0098f750 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x0098f760 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x0098f770 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x0098f780 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x0098f790 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x0098f7a0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x0098f7b0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x0098f7c0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x0098f7d0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x0098f7e0 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x0098f7f0 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x0098f800 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x0098f810 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x0098f820 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x0098f830 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x0098f840 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x0098f850 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x0098f860 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x0098f870 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x0098f880 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x0098f890 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x0098f8a0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x0098f8b0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x0098f8c0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x0098f8d0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x0098f8e0 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x0098f8f0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x0098f900 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x0098f910 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x0098f920 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x0098f930 6f6e203d 20755f74 72616e73 666f726d on = u_transform │ │ │ │ + 0x0098f940 202a2076 65633428 615f706f 732c2031 * vec4(a_pos, 1 │ │ │ │ + 0x0098f950 2e30293b 200a2020 2020765f 6e6f726d .0); . v_norm │ │ │ │ + 0x0098f960 616c203d 206e6f72 6d616c69 7a652828 al = normalize(( │ │ │ │ + 0x0098f970 755f6e6f 726d616c 5472616e 73666f72 u_normalTransfor │ │ │ │ + 0x0098f980 6d202a20 76656334 28615f6e 6f726d61 m * vec4(a_norma │ │ │ │ + 0x0098f990 6c2c2030 2e302929 2e78797a 293b200a l, 0.0)).xyz); . │ │ │ │ + 0x0098f9a0 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x0098f9b0 3d20706f 73697469 6f6e3b20 0a202023 = position; . # │ │ │ │ + 0x0098f9c0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x0098f9d0 2020676c 5f506f73 6974696f 6e2e7920 gl_Position.y │ │ │ │ + 0x0098f9e0 3d202d67 6c5f506f 73697469 6f6e2e79 = -gl_Position.y │ │ │ │ + 0x0098f9f0 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x0098fa00 6f6e2e7a 203d2028 676c5f50 6f736974 on.z = (gl_Posit │ │ │ │ + 0x0098fa10 696f6e2e 7a202b20 676c5f50 6f736974 ion.z + gl_Posit │ │ │ │ + 0x0098fa20 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ + 0x0098fa30 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ + 0x0098fa40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0098fa50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0098fa60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0098fa70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0098fa80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0098fa90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0098faa0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0098fab0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0098fac0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0098fad0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0098fae0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0098faf0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0098fb00 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0098fb10 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0098fb20 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0098fb30 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0098fb40 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0098fb50 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0098fb60 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0098fb70 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0098fb80 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0098fb90 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0098fba0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x0098fbb0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x0098fbc0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x0098fbd0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x0098fbe0 5f565446 200a2020 6f757420 4c4f575f _VTF . out LOW_ │ │ │ │ + 0x0098fbf0 50207665 63342076 5f636f6c 6f723b20 P vec4 v_color; │ │ │ │ + 0x0098fc00 0a202023 656c7365 200a2020 6f757420 . #else . out │ │ │ │ + 0x0098fc10 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x0098fc20 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x0098fc30 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0098fc40 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0098fc50 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0098fc60 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x0098fc70 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x0098fc80 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x0098fc90 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x0098fca0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x0098fcb0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0098fcc0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x0098fcd0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x0098fce0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x0098fcf0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x0098fd00 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x0098fd10 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x0098fd20 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ + 0x0098fd30 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x0098fd40 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x0098fd50 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x0098fd60 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ + 0x0098fd70 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x0098fd80 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x0098fd90 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x0098fda0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0098fdb0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0098fdc0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0098fdd0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0098fde0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x0098fdf0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0098fe00 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x0098fe10 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x0098fe20 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x0098fe30 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0098fe40 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x0098fe50 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0098fe60 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0098fe70 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0098fe80 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x0098fe90 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098fea0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x0098feb0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x0098fec0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0098fed0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0098fee0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x0098fef0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x0098ff00 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0098ff10 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x0098ff20 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x0098ff30 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0098ff40 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0098ff50 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0098ff60 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0098ff70 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x0098ff80 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0098ff90 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0098ffa0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0098ffb0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0098ffc0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x0098ffd0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x0098ffe0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x0098fff0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x00990000 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x00990010 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00990020 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x00990030 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00990040 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00990050 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x00990060 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x00990070 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00990080 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x00990090 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x009900a0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x009900b0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x009900c0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x009900d0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x009900e0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x009900f0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x00990100 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x00990110 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x00990120 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x00990130 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00990140 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00990150 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x00990160 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x00990170 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x00990180 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00990190 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x009901a0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x009901b0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x009901c0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x009901d0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x009901e0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x009901f0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x00990200 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x00990210 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x00990220 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x00990230 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00990240 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00990250 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00990260 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00990270 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x00990280 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x00990290 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x009902a0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x009902b0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x009902c0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x009902d0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x009902e0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x009902f0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x00990300 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00990310 206e6f72 6d616c20 3d20615f 6e6f726d normal = a_norm │ │ │ │ + 0x00990320 616c2e78 793b200a 20202020 666c6f61 al.xy; . floa │ │ │ │ + 0x00990330 74206861 6c665769 64746820 3d206c65 t halfWidth = le │ │ │ │ + 0x00990340 6e677468 286e6f72 6d616c29 3b200a20 ngth(normal); . │ │ │ │ + 0x00990350 20202076 65633220 7472616e 73666f72 vec2 transfor │ │ │ │ + 0x00990360 6d656441 78697350 6f73203d 20287665 medAxisPos = (ve │ │ │ │ + 0x00990370 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x00990380 2c20302e 302c2031 2e302920 2a20755f , 0.0, 1.0) * u_ │ │ │ │ + 0x00990390 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x009903a0 20202020 69662028 68616c66 57696474 if (halfWidt │ │ │ │ + 0x009903b0 6820213d 20302e30 29200a20 2020207b h != 0.0) . { │ │ │ │ + 0x009903c0 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ + 0x009903d0 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ + 0x009903e0 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x009903f0 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ + 0x00990400 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ + 0x00990410 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ + 0x00990420 616c2c20 0a202020 20202020 20202020 al, . │ │ │ │ + 0x00990430 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00990440 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00990450 20202020 20202020 20202075 5f6d6f64 u_mod │ │ │ │ + 0x00990460 656c5669 65772c20 68616c66 57696474 elView, halfWidt │ │ │ │ + 0x00990470 68293b20 0a202020 207d200a 20202369 h); . } . #i │ │ │ │ + 0x00990480 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00990490 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ + 0x009904a0 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ + 0x009904b0 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ + 0x009904c0 7264293b 200a2020 23656c73 65200a20 rd); . #else . │ │ │ │ + 0x009904d0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x009904e0 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ + 0x009904f0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x00990500 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x00990510 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00990520 41786973 506f732c 20615f70 6f736974 AxisPos, a_posit │ │ │ │ + 0x00990530 696f6e2e 7a2c2031 2e302920 2a20755f ion.z, 1.0) * u_ │ │ │ │ + 0x00990540 70726f6a 65637469 6f6e3b20 0a202020 projection; . │ │ │ │ + 0x00990550 20676c5f 506f7369 74696f6e 203d2061 gl_Position = a │ │ │ │ + 0x00990560 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00990570 726d2870 6f732c20 755f7069 766f7454 rm(pos, u_pivotT │ │ │ │ + 0x00990580 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ + 0x00990590 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ + 0x009905a0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x009905b0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009905c0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x009905d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009905e0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x009905f0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00990600 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00990610 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00990620 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00990630 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00990640 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00990650 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00990660 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00990670 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00990680 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00990690 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x009906a0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x009906b0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009906c0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x009906d0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x009906e0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x009906f0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00990700 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ + 0x00990710 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00990720 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x00990730 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00990740 6f6f7264 733b200a 20206f75 7420666c oords; . out fl │ │ │ │ + 0x00990750 6f617420 765f696e 74656e73 6974793b oat v_intensity; │ │ │ │ + 0x00990760 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00990770 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ + 0x00990780 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00990790 70726f6a 65637469 6f6e3b20 0a202075 projection; . u │ │ │ │ + 0x009907a0 6e69666f 726d206d 61743420 755f7069 niform mat4 u_pi │ │ │ │ + 0x009907b0 766f7454 72616e73 666f726d 3b200a20 votTransform; . │ │ │ │ + 0x009907c0 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x009907d0 636f6e74 72617374 47616d6d 613b200a contrastGamma; . │ │ │ │ + 0x009907e0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009907f0 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ + 0x00990800 69666f72 6d20666c 6f617420 755f7a53 iform float u_zS │ │ │ │ + 0x00990810 63616c65 3b200a20 20756e69 666f726d cale; . uniform │ │ │ │ + 0x00990820 20666c6f 61742075 5f696e74 6572706f float u_interpo │ │ │ │ + 0x00990830 6c617469 6f6e3b20 0a202075 6e69666f lation; . unifo │ │ │ │ + 0x00990840 726d2066 6c6f6174 20755f69 734f7574 rm float u_isOut │ │ │ │ + 0x00990850 6c696e65 50617373 3b200a20 20636f6e linePass; . con │ │ │ │ + 0x00990860 73742076 65633420 6b4e6f72 6d616c69 st vec4 kNormali │ │ │ │ + 0x00990870 7a65644c 69676874 44697220 3d207665 zedLightDir = ve │ │ │ │ + 0x00990880 63342830 2e333136 322c2030 2e302c20 c4(0.3162, 0.0, │ │ │ │ + 0x00990890 302e3934 38362c20 302e3029 3b200a20 0.9486, 0.0); . │ │ │ │ + 0x009908a0 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x009908b0 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x009908c0 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x009908d0 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x009908e0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x009908f0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00990900 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00990910 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00990920 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00990930 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x00990940 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x00990950 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00990960 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x00990970 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x00990980 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x00990990 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x009909a0 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x009909b0 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x009909c0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x009909d0 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x009909e0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x009909f0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00990a00 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00990a10 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00990a20 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00990a30 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00990a40 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00990a50 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00990a60 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00990a70 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00990a80 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00990a90 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00990aa0 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00990ab0 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00990ac0 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00990ad0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00990ae0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00990af0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00990b00 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00990b10 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00990b20 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00990b30 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00990b40 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00990b50 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00990b60 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00990b70 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00990b80 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00990b90 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00990ba0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00990bb0 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00990bc0 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00990bd0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00990be0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00990bf0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00990c00 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00990c10 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00990c20 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00990c30 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00990c40 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00990c50 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00990c60 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00990c70 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00990c80 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00990c90 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00990ca0 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00990cb0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00990cc0 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00990cd0 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00990ce0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00990cf0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00990d00 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00990d10 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00990d20 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00990d30 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00990d40 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00990d50 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00990d60 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00990d70 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00990d80 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00990d90 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00990da0 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00990db0 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00990dc0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00990dd0 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00990de0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00990df0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00990e00 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00990e10 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00990e20 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00990e30 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00990e40 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ + 0x00990e50 28615f70 6f736974 696f6e2c 20312e30 (a_position, 1.0 │ │ │ │ + 0x00990e60 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x00990e70 200a2020 20207665 6334206e 6f726d61 . vec4 norma │ │ │ │ + 0x00990e80 6c203d20 76656334 28615f70 6f736974 l = vec4(a_posit │ │ │ │ + 0x00990e90 696f6e20 2b20615f 6e6f726d 616c2c20 ion + a_normal, │ │ │ │ + 0x00990ea0 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ + 0x00990eb0 65773b20 0a202020 206e6f72 6d616c2e ew; . normal. │ │ │ │ + 0x00990ec0 78797720 3d20286e 6f726d61 6c202a20 xyw = (normal * │ │ │ │ + 0x00990ed0 755f7072 6f6a6563 74696f6e 292e7879 u_projection).xy │ │ │ │ + 0x00990ee0 773b200a 20202020 6e6f726d 616c2e7a w; . normal.z │ │ │ │ + 0x00990ef0 203d206e 6f726d61 6c2e7a20 2a20755f = normal.z * u_ │ │ │ │ + 0x00990f00 7a536361 6c653b20 0a202020 20706f73 zScale; . pos │ │ │ │ + 0x00990f10 2e787977 203d2028 706f7320 2a20755f .xyw = (pos * u_ │ │ │ │ + 0x00990f20 70726f6a 65637469 6f6e292e 7879773b projection).xyw; │ │ │ │ + 0x00990f30 200a2020 2020706f 732e7a20 3d20615f . pos.z = a_ │ │ │ │ + 0x00990f40 706f7369 74696f6e 2e7a202a 20755f7a position.z * u_z │ │ │ │ + 0x00990f50 5363616c 653b200a 20202020 76656334 Scale; . vec4 │ │ │ │ + 0x00990f60 206e6f72 6d446972 203d206e 6f726d61 normDir = norma │ │ │ │ + 0x00990f70 6c202d20 706f733b 200a2020 20206966 l - pos; . if │ │ │ │ + 0x00990f80 2028646f 74286e6f 726d4469 722c206e (dot(normDir, n │ │ │ │ + 0x00990f90 6f726d44 69722920 213d2030 2e302920 ormDir) != 0.0) │ │ │ │ + 0x00990fa0 0a202020 20202076 5f696e74 656e7369 . v_intensi │ │ │ │ + 0x00990fb0 7479203d 206d6178 28302e30 2c202d64 ty = max(0.0, -d │ │ │ │ + 0x00990fc0 6f74286b 4e6f726d 616c697a 65644c69 ot(kNormalizedLi │ │ │ │ + 0x00990fd0 67687444 69722c20 6e6f726d 616c697a ghtDir, normaliz │ │ │ │ + 0x00990fe0 65286e6f 726d4469 72292929 3b200a20 e(normDir))); . │ │ │ │ + 0x00990ff0 20202065 6c736520 0a202020 20202076 else . v │ │ │ │ + 0x00991000 5f696e74 656e7369 7479203d 20302e30 _intensity = 0.0 │ │ │ │ + 0x00991010 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x00991020 6f6e203d 20755f70 69766f74 5472616e on = u_pivotTran │ │ │ │ + 0x00991030 73666f72 6d202a20 706f733b 200a2020 sform * pos; . │ │ │ │ + 0x00991040 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00991050 20202067 6c5f506f 73697469 6f6e2e79 gl_Position.y │ │ │ │ + 0x00991060 203d202d 676c5f50 6f736974 696f6e2e = -gl_Position. │ │ │ │ + 0x00991070 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ + 0x00991080 696f6e2e 7a203d20 28676c5f 506f7369 ion.z = (gl_Posi │ │ │ │ + 0x00991090 74696f6e 2e7a2020 2b20676c 5f506f73 tion.z + gl_Pos │ │ │ │ + 0x009910a0 6974696f 6e2e7729 202a2030 2e353b20 ition.w) * 0.5; │ │ │ │ + 0x009910b0 0a202023 656e6469 66200a20 20202076 . #endif . v │ │ │ │ + 0x009910c0 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ + 0x009910d0 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ + 0x009910e0 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ + 0x009910f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00991100 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00991110 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00991120 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00991130 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00991140 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00991150 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00991160 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00991170 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00991180 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00991190 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009911a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009911b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009911c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009911d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009911e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009911f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00991200 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00991210 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00991220 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00991230 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00991240 63342076 5f636f6f 7264733b 200a2020 c4 v_coords; . │ │ │ │ + 0x00991250 696e2076 65633420 765f6f66 66736574 in vec4 v_offset │ │ │ │ + 0x00991260 303b200a 2020696e 20766563 3420765f 0; . in vec4 v_ │ │ │ │ + 0x00991270 6f666673 6574313b 200a2020 696e2076 offset1; . in v │ │ │ │ + 0x00991280 65633420 765f6f66 66736574 323b200a ec4 v_offset2; . │ │ │ │ + 0x00991290 20206f75 74207665 63342076 5f467261 out vec4 v_Fra │ │ │ │ + 0x009912a0 67436f6c 6f723b20 0a202075 6e69666f gColor; . unifo │ │ │ │ + 0x009912b0 726d2076 65633420 755f6672 616d6562 rm vec4 u_frameb │ │ │ │ + 0x009912c0 75666665 724d6574 72696373 3b200a20 ufferMetrics; . │ │ │ │ + 0x009912d0 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x009912e0 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x009912f0 2020756e 69666f72 6d207361 6d706c65 uniform sample │ │ │ │ + 0x00991300 72324420 755f736d 61614172 65613b20 r2D u_smaaArea; │ │ │ │ + 0x00991310 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x00991320 65723244 20755f73 6d616153 65617263 er2D u_smaaSearc │ │ │ │ + 0x00991330 683b200a 20202364 6566696e 6520534d h; . #define SM │ │ │ │ + 0x00991340 41415f53 45415243 48544558 5f53495a AA_SEARCHTEX_SIZ │ │ │ │ + 0x00991350 45207665 63322836 362e302c 2033332e E vec2(66.0, 33. │ │ │ │ + 0x00991360 3029200a 20202364 6566696e 6520534d 0) . #define SM │ │ │ │ + 0x00991370 41415f53 45415243 48544558 5f504143 AA_SEARCHTEX_PAC │ │ │ │ + 0x00991380 4b45445f 53495a45 20766563 32283634 KED_SIZE vec2(64 │ │ │ │ + 0x00991390 2e302c20 31362e30 29200a20 20236465 .0, 16.0) . #de │ │ │ │ + 0x009913a0 66696e65 20534d41 415f4152 45415445 fine SMAA_AREATE │ │ │ │ + 0x009913b0 585f4d41 585f4449 5354414e 43452031 X_MAX_DISTANCE 1 │ │ │ │ + 0x009913c0 362e3020 0a202023 64656669 6e652053 6.0 . #define S │ │ │ │ + 0x009913d0 4d41415f 41524541 5445585f 50495845 MAA_AREATEX_PIXE │ │ │ │ + 0x009913e0 4c5f5349 5a452028 76656332 28312e30 L_SIZE (vec2(1.0 │ │ │ │ + 0x009913f0 202f2032 35362e30 2c20312e 30202f20 / 256.0, 1.0 / │ │ │ │ + 0x00991400 31303234 2e302929 200a2020 23646566 1024.0)) . #def │ │ │ │ + 0x00991410 696e6520 534d4141 4c6f6f70 42656769 ine SMAALoopBegi │ │ │ │ + 0x00991420 6e28636f 6e646974 696f6e29 20776869 n(condition) whi │ │ │ │ + 0x00991430 6c652028 636f6e64 6974696f 6e29207b le (condition) { │ │ │ │ + 0x00991440 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ + 0x00991450 4c6f6f70 456e6420 7d200a20 20236465 LoopEnd } . #de │ │ │ │ + 0x00991460 66696e65 20534d41 4153616d 706c654c fine SMAASampleL │ │ │ │ + 0x00991470 6576656c 5a65726f 28746578 2c20636f evelZero(tex, co │ │ │ │ + 0x00991480 6f726429 20746578 74757265 4c6f6428 ord) textureLod( │ │ │ │ + 0x00991490 7465782c 20636f6f 72642c20 302e3029 tex, coord, 0.0) │ │ │ │ + 0x009914a0 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ + 0x009914b0 53616d70 6c654c65 76656c5a 65726f4f SampleLevelZeroO │ │ │ │ + 0x009914c0 66667365 74287465 782c2063 6f6f7264 ffset(tex, coord │ │ │ │ + 0x009914d0 2c206f66 66736574 29207465 78747572 , offset) textur │ │ │ │ + 0x009914e0 654c6f64 4f666673 65742874 65782c20 eLodOffset(tex, │ │ │ │ + 0x009914f0 636f6f72 642c2030 2e302c20 6f666673 coord, 0.0, offs │ │ │ │ + 0x00991500 65742920 0a202023 64656669 6e652053 et) . #define S │ │ │ │ + 0x00991510 4d414152 6f756e64 28762920 726f756e MAARound(v) roun │ │ │ │ + 0x00991520 64282876 2929200a 20202364 6566696e d((v)) . #defin │ │ │ │ + 0x00991530 6520534d 41414f66 66736574 28782c79 e SMAAOffset(x,y │ │ │ │ + 0x00991540 29206976 65633228 782c7929 200a2020 ) ivec2(x,y) . │ │ │ │ + 0x00991550 636f6e73 74207665 6332206b 41726561 const vec2 kArea │ │ │ │ + 0x00991560 5465784d 61784469 7374616e 6365203d TexMaxDistance = │ │ │ │ + 0x00991570 20766563 3228534d 41415f41 52454154 vec2(SMAA_AREAT │ │ │ │ + 0x00991580 45585f4d 41585f44 49535441 4e43452c EX_MAX_DISTANCE, │ │ │ │ + 0x00991590 20534d41 415f4152 45415445 585f4d41 SMAA_AREATEX_MA │ │ │ │ + 0x009915a0 585f4449 5354414e 4345293b 200a2020 X_DISTANCE); . │ │ │ │ + 0x009915b0 636f6e73 7420666c 6f617420 6b416374 const float kAct │ │ │ │ + 0x009915c0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x009915d0 203d2030 2e383238 313b200a 2020666c = 0.8281; . fl │ │ │ │ + 0x009915e0 6f617420 534d4141 53656172 63684c65 oat SMAASearchLe │ │ │ │ + 0x009915f0 6e677468 28766563 3220652c 20666c6f ngth(vec2 e, flo │ │ │ │ + 0x00991600 6174206f 66667365 7429200a 20207b20 at offset) . { │ │ │ │ + 0x00991610 0a202020 20766563 32207363 616c6520 . vec2 scale │ │ │ │ + 0x00991620 3d20534d 41415f53 45415243 48544558 = SMAA_SEARCHTEX │ │ │ │ + 0x00991630 5f53495a 45202a20 76656332 28302e35 _SIZE * vec2(0.5 │ │ │ │ + 0x00991640 2c202d31 2e30293b 200a2020 20207665 , -1.0); . ve │ │ │ │ + 0x00991650 63322062 69617320 3d20534d 41415f53 c2 bias = SMAA_S │ │ │ │ + 0x00991660 45415243 48544558 5f53495a 45202a20 EARCHTEX_SIZE * │ │ │ │ + 0x00991670 76656332 286f6666 7365742c 20312e30 vec2(offset, 1.0 │ │ │ │ + 0x00991680 293b200a 20202020 7363616c 65202b3d ); . scale += │ │ │ │ + 0x00991690 20766563 32282d31 2e302c20 20312e30 vec2(-1.0, 1.0 │ │ │ │ + 0x009916a0 293b200a 20202020 62696173 202b3d20 ); . bias += │ │ │ │ + 0x009916b0 76656332 2820302e 352c202d 302e3529 vec2( 0.5, -0.5) │ │ │ │ + 0x009916c0 3b200a20 20202073 63616c65 202a3d20 ; . scale *= │ │ │ │ + 0x009916d0 312e3020 2f20534d 41415f53 45415243 1.0 / SMAA_SEARC │ │ │ │ + 0x009916e0 48544558 5f504143 4b45445f 53495a45 HTEX_PACKED_SIZE │ │ │ │ + 0x009916f0 3b200a20 20202062 69617320 2a3d2031 ; . bias *= 1 │ │ │ │ + 0x00991700 2e30202f 20534d41 415f5345 41524348 .0 / SMAA_SEARCH │ │ │ │ + 0x00991710 5445585f 5041434b 45445f53 495a453b TEX_PACKED_SIZE; │ │ │ │ + 0x00991720 200a2020 20207265 7475726e 20534d41 . return SMA │ │ │ │ + 0x00991730 4153616d 706c654c 6576656c 5a65726f ASampleLevelZero │ │ │ │ + 0x00991740 28755f73 6d616153 65617263 682c2073 (u_smaaSearch, s │ │ │ │ + 0x00991750 63616c65 202a2065 202b2062 69617329 cale * e + bias) │ │ │ │ + 0x00991760 2e723b20 0a20207d 200a2020 666c6f61 .r; . } . floa │ │ │ │ + 0x00991770 7420534d 41415365 61726368 584c6566 t SMAASearchXLef │ │ │ │ + 0x00991780 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ + 0x00991790 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ + 0x009917a0 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ + 0x009917b0 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ + 0x009917c0 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ + 0x009917d0 6e287465 78636f6f 72642e78 203e2065 n(texcoord.x > e │ │ │ │ + 0x009917e0 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ + 0x009917f0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x00991800 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ + 0x00991810 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ + 0x00991820 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ + 0x00991830 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ + 0x00991840 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ + 0x00991850 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ + 0x00991860 2d322e30 2c20302e 3029202a 20755f66 -2.0, 0.0) * u_f │ │ │ │ + 0x00991870 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ + 0x00991880 732e7879 202b2074 6578636f 6f72643b s.xy + texcoord; │ │ │ │ + 0x00991890 200a2020 2020534d 41414c6f 6f70456e . SMAALoopEn │ │ │ │ + 0x009918a0 64200a20 20202066 6c6f6174 206f6666 d . float off │ │ │ │ + 0x009918b0 73657420 3d20332e 3235202d 20283235 set = 3.25 - (25 │ │ │ │ + 0x009918c0 352e3020 2f203132 372e3029 202a2053 5.0 / 127.0) * S │ │ │ │ + 0x009918d0 4d414153 65617263 684c656e 67746828 MAASearchLength( │ │ │ │ + 0x009918e0 652c2030 2e30293b 200a2020 20207265 e, 0.0); . re │ │ │ │ + 0x009918f0 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ + 0x00991900 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ + 0x00991910 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x00991920 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ + 0x00991930 20534d41 41536561 72636858 52696768 SMAASearchXRigh │ │ │ │ + 0x00991940 74287665 63322074 6578636f 6f72642c t(vec2 texcoord, │ │ │ │ + 0x00991950 20666c6f 61742065 6e642920 0a20207b float end) . { │ │ │ │ + 0x00991960 200a2020 20207665 63322065 203d2076 . vec2 e = v │ │ │ │ + 0x00991970 65633228 302e302c 20312e30 293b200a ec2(0.0, 1.0); . │ │ │ │ + 0x00991980 20202020 534d4141 4c6f6f70 42656769 SMAALoopBegi │ │ │ │ + 0x00991990 6e287465 78636f6f 72642e78 203c2065 n(texcoord.x < e │ │ │ │ + 0x009919a0 6e642026 2620652e 67203e20 6b416374 nd && e.g > kAct │ │ │ │ + 0x009919b0 69766174 696f6e54 68726573 686f6c64 ivationThreshold │ │ │ │ + 0x009919c0 20262620 652e7220 3d3d2030 2e302920 && e.r == 0.0) │ │ │ │ + 0x009919d0 0a202020 20202065 203d2053 4d414153 . e = SMAAS │ │ │ │ + 0x009919e0 616d706c 654c6576 656c5a65 726f2875 ampleLevelZero(u │ │ │ │ + 0x009919f0 5f636f6c 6f725465 782c2074 6578636f _colorTex, texco │ │ │ │ + 0x00991a00 6f726429 2e72673b 200a2020 20202020 ord).rg; . │ │ │ │ + 0x00991a10 74657863 6f6f7264 203d2076 65633228 texcoord = vec2( │ │ │ │ + 0x00991a20 322e302c 20302e30 29202a20 755f6672 2.0, 0.0) * u_fr │ │ │ │ + 0x00991a30 616d6562 75666665 724d6574 72696373 amebufferMetrics │ │ │ │ + 0x00991a40 2e787920 2b207465 78636f6f 72643b20 .xy + texcoord; │ │ │ │ + 0x00991a50 0a202020 20534d41 414c6f6f 70456e64 . SMAALoopEnd │ │ │ │ + 0x00991a60 200a2020 2020666c 6f617420 6f666673 . float offs │ │ │ │ + 0x00991a70 6574203d 20332e32 35202d20 28323535 et = 3.25 - (255 │ │ │ │ + 0x00991a80 2e30202f 20313237 2e302920 2a20534d .0 / 127.0) * SM │ │ │ │ + 0x00991a90 41415365 61726368 4c656e67 74682865 AASearchLength(e │ │ │ │ + 0x00991aa0 2c20302e 35293b20 0a202020 20726574 , 0.5); . ret │ │ │ │ + 0x00991ab0 75726e20 2d755f66 72616d65 62756666 urn -u_framebuff │ │ │ │ + 0x00991ac0 65724d65 74726963 732e7820 2a206f66 erMetrics.x * of │ │ │ │ + 0x00991ad0 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x00991ae0 783b200a 20207d20 0a202066 6c6f6174 x; . } . float │ │ │ │ + 0x00991af0 20534d41 41536561 72636859 55702876 SMAASearchYUp(v │ │ │ │ + 0x00991b00 65633220 74657863 6f6f7264 2c20666c ec2 texcoord, fl │ │ │ │ + 0x00991b10 6f617420 656e6429 200a2020 7b200a20 oat end) . { . │ │ │ │ + 0x00991b20 20202076 65633220 65203d20 76656332 vec2 e = vec2 │ │ │ │ + 0x00991b30 28312e30 2c20302e 30293b20 0a202020 (1.0, 0.0); . │ │ │ │ + 0x00991b40 20534d41 414c6f6f 70426567 696e2874 SMAALoopBegin(t │ │ │ │ + 0x00991b50 6578636f 6f72642e 79203e20 656e6420 excoord.y > end │ │ │ │ + 0x00991b60 26262065 2e72203e 206b4163 74697661 && e.r > kActiva │ │ │ │ + 0x00991b70 74696f6e 54687265 73686f6c 64202626 tionThreshold && │ │ │ │ + 0x00991b80 20652e67 203d3d20 302e3029 200a2020 e.g == 0.0) . │ │ │ │ + 0x00991b90 20202020 65203d20 534d4141 53616d70 e = SMAASamp │ │ │ │ + 0x00991ba0 6c654c65 76656c5a 65726f28 755f636f leLevelZero(u_co │ │ │ │ + 0x00991bb0 6c6f7254 65782c20 74657863 6f6f7264 lorTex, texcoord │ │ │ │ + 0x00991bc0 292e7267 3b200a20 20202020 20746578 ).rg; . tex │ │ │ │ + 0x00991bd0 636f6f72 64203d20 76656332 28302e30 coord = vec2(0.0 │ │ │ │ + 0x00991be0 2c202d32 2e302920 2a20755f 6672616d , -2.0) * u_fram │ │ │ │ + 0x00991bf0 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x00991c00 79202b20 74657863 6f6f7264 3b200a20 y + texcoord; . │ │ │ │ + 0x00991c10 20202053 4d41414c 6f6f7045 6e64200a SMAALoopEnd . │ │ │ │ + 0x00991c20 20202020 666c6f61 74206f66 66736574 float offset │ │ │ │ + 0x00991c30 203d2033 2e323520 2d202832 35352e30 = 3.25 - (255.0 │ │ │ │ + 0x00991c40 202f2031 32372e30 29202a20 534d4141 / 127.0) * SMAA │ │ │ │ + 0x00991c50 53656172 63684c65 6e677468 28652e67 SearchLength(e.g │ │ │ │ + 0x00991c60 722c2030 2e30293b 200a2020 20207265 r, 0.0); . re │ │ │ │ + 0x00991c70 7475726e 20755f66 72616d65 62756666 turn u_framebuff │ │ │ │ + 0x00991c80 65724d65 74726963 732e7920 2a206f66 erMetrics.y * of │ │ │ │ + 0x00991c90 66736574 202b2074 6578636f 6f72642e fset + texcoord. │ │ │ │ + 0x00991ca0 793b200a 20207d20 0a202066 6c6f6174 y; . } . float │ │ │ │ + 0x00991cb0 20534d41 41536561 72636859 446f776e SMAASearchYDown │ │ │ │ + 0x00991cc0 28766563 32207465 78636f6f 72642c20 (vec2 texcoord, │ │ │ │ + 0x00991cd0 666c6f61 7420656e 6429200a 20207b20 float end) . { │ │ │ │ + 0x00991ce0 0a202020 20766563 32206520 3d207665 . vec2 e = ve │ │ │ │ + 0x00991cf0 63322831 2e302c20 302e3029 3b200a20 c2(1.0, 0.0); . │ │ │ │ + 0x00991d00 20202053 4d41414c 6f6f7042 6567696e SMAALoopBegin │ │ │ │ + 0x00991d10 28746578 636f6f72 642e7920 3c20656e (texcoord.y < en │ │ │ │ + 0x00991d20 64202626 20652e72 203e206b 41637469 d && e.r > kActi │ │ │ │ + 0x00991d30 76617469 6f6e5468 72657368 6f6c6420 vationThreshold │ │ │ │ + 0x00991d40 26262065 2e67203d 3d20302e 3029200a && e.g == 0.0) . │ │ │ │ + 0x00991d50 20202020 20206520 3d20534d 41415361 e = SMAASa │ │ │ │ + 0x00991d60 6d706c65 4c657665 6c5a6572 6f28755f mpleLevelZero(u_ │ │ │ │ + 0x00991d70 636f6c6f 72546578 2c207465 78636f6f colorTex, texcoo │ │ │ │ + 0x00991d80 7264292e 72673b20 0a202020 20202074 rd).rg; . t │ │ │ │ + 0x00991d90 6578636f 6f726420 3d207665 63322830 excoord = vec2(0 │ │ │ │ + 0x00991da0 2e302c20 322e3029 202a2075 5f667261 .0, 2.0) * u_fra │ │ │ │ + 0x00991db0 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ + 0x00991dc0 7879202b 20746578 636f6f72 643b200a xy + texcoord; . │ │ │ │ + 0x00991dd0 20202020 534d4141 4c6f6f70 456e6420 SMAALoopEnd │ │ │ │ + 0x00991de0 0a202020 20666c6f 6174206f 66667365 . float offse │ │ │ │ + 0x00991df0 74203d20 332e3235 202d2028 3235352e t = 3.25 - (255. │ │ │ │ + 0x00991e00 30202f20 3132372e 3029202a 20534d41 0 / 127.0) * SMA │ │ │ │ + 0x00991e10 41536561 7263684c 656e6774 6828652e ASearchLength(e. │ │ │ │ + 0x00991e20 67722c20 302e3529 3b200a20 20202072 gr, 0.5); . r │ │ │ │ + 0x00991e30 65747572 6e202d75 5f667261 6d656275 eturn -u_framebu │ │ │ │ + 0x00991e40 66666572 4d657472 6963732e 79202a20 fferMetrics.y * │ │ │ │ + 0x00991e50 6f666673 6574202b 20746578 636f6f72 offset + texcoor │ │ │ │ + 0x00991e60 642e793b 200a2020 7d200a20 20766563 d.y; . } . vec │ │ │ │ + 0x00991e70 3220534d 41414172 65612876 65633220 2 SMAAArea(vec2 │ │ │ │ + 0x00991e80 64697374 2c20666c 6f617420 65312c20 dist, float e1, │ │ │ │ + 0x00991e90 666c6f61 74206532 29200a20 207b200a float e2) . { . │ │ │ │ + 0x00991ea0 20202020 76656332 20746578 636f6f72 vec2 texcoor │ │ │ │ + 0x00991eb0 64203d20 6b417265 61546578 4d617844 d = kAreaTexMaxD │ │ │ │ + 0x00991ec0 69737461 6e636520 2a20534d 4141526f istance * SMAARo │ │ │ │ + 0x00991ed0 756e6428 342e3020 2a207665 63322865 und(4.0 * vec2(e │ │ │ │ + 0x00991ee0 312c2065 32292920 2b206469 73743b20 1, e2)) + dist; │ │ │ │ + 0x00991ef0 0a202020 20746578 636f6f72 64203d20 . texcoord = │ │ │ │ + 0x00991f00 534d4141 5f415245 41544558 5f504958 SMAA_AREATEX_PIX │ │ │ │ + 0x00991f10 454c5f53 495a4520 2a202874 6578636f EL_SIZE * (texco │ │ │ │ + 0x00991f20 6f726420 2b20302e 35293b20 0a202020 ord + 0.5); . │ │ │ │ + 0x00991f30 20726574 75726e20 534d4141 53616d70 return SMAASamp │ │ │ │ + 0x00991f40 6c654c65 76656c5a 65726f28 755f736d leLevelZero(u_sm │ │ │ │ + 0x00991f50 61614172 65612c20 74657863 6f6f7264 aaArea, texcoord │ │ │ │ + 0x00991f60 292e7267 3b200a20 207d200a 2020636f ).rg; . } . co │ │ │ │ + 0x00991f70 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x00991f80 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x00991f90 30302e30 3b200a20 20766f69 64206d61 00.0; . void ma │ │ │ │ + 0x00991fa0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ + 0x00991fb0 65633420 77656967 68747320 3d207665 ec4 weights = ve │ │ │ │ + 0x00991fc0 63342830 2e302c20 302e302c 20302e30 c4(0.0, 0.0, 0.0 │ │ │ │ + 0x00991fd0 2c20302e 30293b20 0a202020 20766563 , 0.0); . vec │ │ │ │ + 0x00991fe0 32206520 3d207465 78747572 6528755f 2 e = texture(u_ │ │ │ │ + 0x00991ff0 636f6c6f 72546578 2c20765f 636f6f72 colorTex, v_coor │ │ │ │ + 0x00992000 64732e78 79292e72 673b200a 20202020 ds.xy).rg; . │ │ │ │ + 0x00992010 69662028 652e6720 3e20302e 3029202f if (e.g > 0.0) / │ │ │ │ + 0x00992020 2f204564 67652061 74206e6f 72746820 / Edge at north │ │ │ │ + 0x00992030 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ + 0x00992040 63322064 3b200a20 20202020 20766563 c2 d; . vec │ │ │ │ + 0x00992050 3320636f 6f726473 3b200a20 20202020 3 coords; . │ │ │ │ + 0x00992060 20636f6f 7264732e 78203d20 534d4141 coords.x = SMAA │ │ │ │ + 0x00992070 53656172 6368584c 65667428 765f6f66 SearchXLeft(v_of │ │ │ │ + 0x00992080 66736574 302e7879 2c20765f 6f666673 fset0.xy, v_offs │ │ │ │ + 0x00992090 6574322e 78293b20 0a202020 20202063 et2.x); . c │ │ │ │ + 0x009920a0 6f6f7264 732e7920 3d20765f 6f666673 oords.y = v_offs │ │ │ │ + 0x009920b0 6574312e 793b200a 20202020 2020642e et1.y; . d. │ │ │ │ + 0x009920c0 78203d20 636f6f72 64732e78 3b200a20 x = coords.x; . │ │ │ │ + 0x009920d0 20202020 20666c6f 61742065 31203d20 float e1 = │ │ │ │ + 0x009920e0 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ + 0x009920f0 65726f28 755f636f 6c6f7254 65782c20 ero(u_colorTex, │ │ │ │ + 0x00992100 636f6f72 64732e78 79292e72 3b200a20 coords.xy).r; . │ │ │ │ + 0x00992110 20202020 20636f6f 7264732e 7a203d20 coords.z = │ │ │ │ + 0x00992120 534d4141 53656172 63685852 69676874 SMAASearchXRight │ │ │ │ + 0x00992130 28765f6f 66667365 74302e7a 772c2076 (v_offset0.zw, v │ │ │ │ + 0x00992140 5f6f6666 73657432 2e79293b 200a2020 _offset2.y); . │ │ │ │ + 0x00992150 20202020 642e7920 3d20636f 6f726473 d.y = coords │ │ │ │ + 0x00992160 2e7a3b20 0a202020 20202076 65633220 .z; . vec2 │ │ │ │ + 0x00992170 7a7a203d 20755f66 72616d65 62756666 zz = u_framebuff │ │ │ │ + 0x00992180 65724d65 74726963 732e7a7a 3b200a20 erMetrics.zz; . │ │ │ │ + 0x00992190 20202020 2064203d 20616273 28534d41 d = abs(SMA │ │ │ │ + 0x009921a0 41526f75 6e64287a 7a202a20 64202d20 ARound(zz * d - │ │ │ │ + 0x009921b0 765f636f 6f726473 2e7a7a29 293b200a v_coords.zz)); . │ │ │ │ + 0x009921c0 20202020 20207665 63322073 7172745f vec2 sqrt_ │ │ │ │ + 0x009921d0 64203d20 73717274 2864293b 200a2020 d = sqrt(d); . │ │ │ │ + 0x009921e0 20202020 666c6f61 74206532 203d2053 float e2 = S │ │ │ │ + 0x009921f0 4d414153 616d706c 654c6576 656c5a65 MAASampleLevelZe │ │ │ │ + 0x00992200 726f4f66 66736574 28755f63 6f6c6f72 roOffset(u_color │ │ │ │ + 0x00992210 5465782c 20636f6f 7264732e 7a792c20 Tex, coords.zy, │ │ │ │ + 0x00992220 534d4141 4f666673 65742831 2c203029 SMAAOffset(1, 0) │ │ │ │ + 0x00992230 292e723b 200a2020 20202020 77656967 ).r; . weig │ │ │ │ + 0x00992240 6874732e 7267203d 20534d41 41417265 hts.rg = SMAAAre │ │ │ │ + 0x00992250 61287371 72745f64 2c206531 2c206532 a(sqrt_d, e1, e2 │ │ │ │ + 0x00992260 293b200a 20202020 7d200a20 20202069 ); . } . i │ │ │ │ + 0x00992270 66202865 2e72203e 20302e30 29202f2f f (e.r > 0.0) // │ │ │ │ + 0x00992280 20456467 65206174 20776573 74200a20 Edge at west . │ │ │ │ + 0x00992290 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ + 0x009922a0 20643b20 0a202020 20202076 65633320 d; . vec3 │ │ │ │ + 0x009922b0 636f6f72 64733b20 0a202020 20202063 coords; . c │ │ │ │ + 0x009922c0 6f6f7264 732e7920 3d20534d 41415365 oords.y = SMAASe │ │ │ │ + 0x009922d0 61726368 59557028 765f6f66 66736574 archYUp(v_offset │ │ │ │ + 0x009922e0 312e7879 2c20765f 6f666673 6574322e 1.xy, v_offset2. │ │ │ │ + 0x009922f0 7a293b20 0a202020 20202063 6f6f7264 z); . coord │ │ │ │ + 0x00992300 732e7820 3d20765f 6f666673 6574302e s.x = v_offset0. │ │ │ │ + 0x00992310 783b200a 20202020 2020642e 78203d20 x; . d.x = │ │ │ │ + 0x00992320 636f6f72 64732e79 3b200a20 20202020 coords.y; . │ │ │ │ + 0x00992330 20666c6f 61742065 31203d20 534d4141 float e1 = SMAA │ │ │ │ + 0x00992340 53616d70 6c654c65 76656c5a 65726f28 SampleLevelZero( │ │ │ │ + 0x00992350 755f636f 6c6f7254 65782c20 636f6f72 u_colorTex, coor │ │ │ │ + 0x00992360 64732e78 79292e67 3b200a20 20202020 ds.xy).g; . │ │ │ │ + 0x00992370 20636f6f 7264732e 7a203d20 534d4141 coords.z = SMAA │ │ │ │ + 0x00992380 53656172 63685944 6f776e28 765f6f66 SearchYDown(v_of │ │ │ │ + 0x00992390 66736574 312e7a77 2c20765f 6f666673 fset1.zw, v_offs │ │ │ │ + 0x009923a0 6574322e 77293b20 0a202020 20202064 et2.w); . d │ │ │ │ + 0x009923b0 2e79203d 20636f6f 7264732e 7a3b200a .y = coords.z; . │ │ │ │ + 0x009923c0 20202020 20207665 63322077 77203d20 vec2 ww = │ │ │ │ + 0x009923d0 755f6672 616d6562 75666665 724d6574 u_framebufferMet │ │ │ │ + 0x009923e0 72696373 2e77773b 200a2020 20202020 rics.ww; . │ │ │ │ + 0x009923f0 64203d20 61627328 534d4141 526f756e d = abs(SMAARoun │ │ │ │ + 0x00992400 64287777 202a2064 202d2076 5f636f6f d(ww * d - v_coo │ │ │ │ + 0x00992410 7264732e 77772929 3b200a20 20202020 rds.ww)); . │ │ │ │ + 0x00992420 20766563 32207371 72745f64 203d2073 vec2 sqrt_d = s │ │ │ │ + 0x00992430 71727428 64293b20 0a202020 20202066 qrt(d); . f │ │ │ │ + 0x00992440 6c6f6174 20653220 3d20534d 41415361 loat e2 = SMAASa │ │ │ │ + 0x00992450 6d706c65 4c657665 6c5a6572 6f4f6666 mpleLevelZeroOff │ │ │ │ + 0x00992460 73657428 755f636f 6c6f7254 65782c20 set(u_colorTex, │ │ │ │ + 0x00992470 636f6f72 64732e78 7a2c2053 4d41414f coords.xz, SMAAO │ │ │ │ + 0x00992480 66667365 7428302c 20312929 2e673b20 ffset(0, 1)).g; │ │ │ │ + 0x00992490 0a202020 20202077 65696768 74732e62 . weights.b │ │ │ │ + 0x009924a0 61203d20 534d4141 41726561 28737172 a = SMAAArea(sqr │ │ │ │ + 0x009924b0 745f642c 2065312c 20653229 3b200a20 t_d, e1, e2); . │ │ │ │ + 0x009924c0 2020207d 200a2020 2020765f 46726167 } . v_Frag │ │ │ │ + 0x009924d0 436f6c6f 72203d20 77656967 6874733b Color = weights; │ │ │ │ + 0x009924e0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x009924f0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00992500 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00992510 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00992520 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00992530 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00992540 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00992550 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00992560 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00992570 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00992580 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00992590 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009925a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x009925b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009925c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009925d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x009925e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x009925f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00992600 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00992610 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00992620 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00992630 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00992640 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00992650 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x00992660 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x00992670 0a20206f 75742076 65633420 765f636f . out vec4 v_co │ │ │ │ + 0x00992680 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x00992690 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ + 0x009926a0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x009926b0 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ + 0x009926c0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x009926d0 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x009926e0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x009926f0 3420755f 70617261 6d733b20 0a202075 4 u_params; . u │ │ │ │ + 0x00992700 6e69666f 726d2066 6c6f6174 20755f6c niform float u_l │ │ │ │ + 0x00992710 696e6548 616c6657 69647468 3b200a20 ineHalfWidth; . │ │ │ │ + 0x00992720 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00992730 5f6d6178 52616469 75733b20 0a202063 _maxRadius; . c │ │ │ │ + 0x00992740 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ + 0x00992750 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ + 0x00992760 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ + 0x00992770 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00992780 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00992790 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x009927a0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x009927b0 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ + 0x009927c0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x009927d0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ + 0x009927e0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ + 0x009927f0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00992800 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00992810 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ + 0x00992820 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00992830 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00992840 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ + 0x00992850 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ + 0x00992860 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00992870 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ + 0x00992880 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ + 0x00992890 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x009928a0 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ + 0x009928b0 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ + 0x009928c0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x009928d0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x009928e0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ + 0x009928f0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00992900 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ + 0x00992910 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ + 0x00992920 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00992930 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ + 0x00992940 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ + 0x00992950 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ + 0x00992960 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ + 0x00992970 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00992980 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00992990 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x009929a0 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ + 0x009929b0 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ + 0x009929c0 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ + 0x009929d0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ + 0x009929e0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x009929f0 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ + 0x00992a00 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ + 0x00992a10 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00992a20 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ + 0x00992a30 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ + 0x00992a40 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00992a50 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ + 0x00992a60 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x00992a70 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ + 0x00992a80 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x00992a90 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ + 0x00992aa0 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ + 0x00992ab0 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ + 0x00992ac0 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ + 0x00992ad0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ + 0x00992ae0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ + 0x00992af0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00992b00 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ + 0x00992b10 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ + 0x00992b20 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ + 0x00992b30 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ + 0x00992b40 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ + 0x00992b50 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00992b60 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ + 0x00992b70 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ + 0x00992b80 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x00992b90 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ + 0x00992ba0 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ + 0x00992bb0 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ + 0x00992bc0 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ + 0x00992bd0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ + 0x00992be0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ + 0x00992bf0 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ + 0x00992c00 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ + 0x00992c10 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ + 0x00992c20 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ + 0x00992c30 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ + 0x00992c40 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ + 0x00992c50 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ + 0x00992c60 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00992c70 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ + 0x00992c80 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ + 0x00992c90 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ + 0x00992ca0 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ + 0x00992cb0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00992cc0 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ + 0x00992cd0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ + 0x00992ce0 65633220 6e6f726d 616c203d 20615f6e ec2 normal = a_n │ │ │ │ + 0x00992cf0 6f726d61 6c2e7879 3b200a20 20202076 ormal.xy; . v │ │ │ │ + 0x00992d00 65633220 7472616e 73666f72 6d656441 ec2 transformedA │ │ │ │ + 0x00992d10 78697350 6f73203d 20287665 63342861 xisPos = (vec4(a │ │ │ │ + 0x00992d20 5f706f73 6974696f 6e2e7879 2c20302e _position.xy, 0. │ │ │ │ + 0x00992d30 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ + 0x00992d40 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x00992d50 69662028 646f7428 6e6f726d 616c2c20 if (dot(normal, │ │ │ │ + 0x00992d60 6e6f726d 616c2920 213d2030 2e302920 normal) != 0.0) │ │ │ │ + 0x00992d70 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ + 0x00992d80 6332206e 6f726d20 3d206e6f 726d616c c2 norm = normal │ │ │ │ + 0x00992d90 202a2075 5f6c696e 6548616c 66576964 * u_lineHalfWid │ │ │ │ + 0x00992da0 74683b20 0a202020 20202074 72616e73 th; . trans │ │ │ │ + 0x00992db0 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ + 0x00992dc0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x00992dd0 6d656441 78697350 6f732874 72616e73 medAxisPos(trans │ │ │ │ + 0x00992de0 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ + 0x00992df0 5f706f73 6974696f 6e2e7879 202b206e _position.xy + n │ │ │ │ + 0x00992e00 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ + 0x00992e10 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00992e20 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00992e30 20202020 20202020 20202020 755f6d6f u_mo │ │ │ │ + 0x00992e40 64656c56 6965772c 206c656e 67746828 delView, length( │ │ │ │ + 0x00992e50 6e6f726d 29293b20 0a202020 207d200a norm)); . } . │ │ │ │ + 0x00992e60 20202020 765f636f 6c6f7220 3d20615f v_color = a_ │ │ │ │ + 0x00992e70 636f6c6f 723b200a 20202020 76656334 color; . vec4 │ │ │ │ + 0x00992e80 20706f73 203d2076 65633428 7472616e pos = vec4(tran │ │ │ │ + 0x00992e90 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x00992ea0 615f706f 73697469 6f6e2e7a 2c20312e a_position.z, 1. │ │ │ │ + 0x00992eb0 3029202a 20755f70 726f6a65 6374696f 0) * u_projectio │ │ │ │ + 0x00992ec0 6e3b200a 20202020 676c5f50 6f736974 n; . gl_Posit │ │ │ │ + 0x00992ed0 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x00992ee0 5472616e 73666f72 6d28706f 732c2075 Transform(pos, u │ │ │ │ + 0x00992ef0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x00992f00 20302e30 293b200a 20207d20 0a000000 0.0); . } .... │ │ │ │ + 0x00992f10 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00992f20 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00992f30 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00992f40 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00992f50 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00992f60 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00992f70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00992f80 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00992f90 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00992fa0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00992fb0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00992fc0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00992fd0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00992fe0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00992ff0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00993000 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00993010 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00993020 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00993030 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00993040 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00993050 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00993060 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00993070 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00993080 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00993090 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x009930a0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x009930b0 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x009930c0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x009930d0 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x009930e0 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x009930f0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00993100 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00993110 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00993120 6e69666f 726d2076 65633420 755f726f niform vec4 u_ro │ │ │ │ + 0x00993130 75746550 6172616d 733b200a 2020756e uteParams; . un │ │ │ │ + 0x00993140 69666f72 6d207665 63342075 5f636f6c iform vec4 u_col │ │ │ │ + 0x00993150 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ + 0x00993160 65633420 755f6d61 736b436f 6c6f723b ec4 u_maskColor; │ │ │ │ + 0x00993170 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00993180 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ + 0x00993190 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x009931a0 20755f66 616b6543 6f6c6f72 3b200a20 u_fakeColor; . │ │ │ │ + 0x009931b0 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ + 0x009931c0 66616b65 4f75746c 696e6543 6f6c6f72 fakeOutlineColor │ │ │ │ + 0x009931d0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x009931e0 3220755f 66616b65 426f7264 6572733b 2 u_fakeBorders; │ │ │ │ + 0x009931f0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ + 0x00993200 20755f70 61747465 726e3b20 0a202075 u_pattern; . u │ │ │ │ + 0x00993210 6e69666f 726d2076 65633220 755f616e niform vec2 u_an │ │ │ │ + 0x00993220 676c6543 6f735369 6e3b200a 2020756e gleCosSin; . un │ │ │ │ + 0x00993230 69666f72 6d20666c 6f617420 755f6172 iform float u_ar │ │ │ │ + 0x00993240 726f7748 616c6657 69647468 3b200a20 rowHalfWidth; . │ │ │ │ + 0x00993250 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00993260 5f6f7061 63697479 3b200a20 20636f6e _opacity; . con │ │ │ │ + 0x00993270 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x00993280 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x00993290 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x009932a0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x009932b0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x009932c0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x009932d0 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x009932e0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x009932f0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00993300 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00993310 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00993320 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00993330 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00993340 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00993350 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00993360 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00993370 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00993380 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x00993390 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x009933a0 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x009933b0 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x009933c0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x009933d0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x009933e0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x009933f0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00993400 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00993410 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x00993420 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x00993430 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00993440 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x00993450 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00993460 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x00993470 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x00993480 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00993490 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x009934a0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x009934b0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x009934c0 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x009934d0 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x009934e0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x009934f0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00993500 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x00993510 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00993520 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x00993530 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x00993540 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00993550 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x00993560 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x00993570 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00993580 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x00993590 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x009935a0 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x009935b0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x009935c0 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x009935d0 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x009935e0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x009935f0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00993600 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x00993610 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x00993620 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00993630 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x00993640 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x00993650 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x00993660 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x00993670 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x00993680 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00993690 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x009936a0 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x009936b0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x009936c0 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x009936d0 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x009936e0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x009936f0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x00993700 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x00993710 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x00993720 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x00993730 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x00993740 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x00993750 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x00993760 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00993770 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x00993780 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x00993790 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x009937a0 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x009937b0 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x009937c0 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x009937d0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x009937e0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x009937f0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x00993800 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x00993810 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ + 0x00993820 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ + 0x00993830 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ + 0x00993840 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ + 0x00993850 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ + 0x00993860 2028646f 7428615f 6e6f726d 616c2c20 (dot(a_normal, │ │ │ │ + 0x00993870 615f6e6f 726d616c 2920213d 20302e30 a_normal) != 0.0 │ │ │ │ + 0x00993880 29200a20 2020207b 200a2020 20202020 ) . { . │ │ │ │ + 0x00993890 76656332 206e6f72 6d203d20 615f6e6f vec2 norm = a_no │ │ │ │ + 0x009938a0 726d616c 202a2075 5f617272 6f774861 rmal * u_arrowHa │ │ │ │ + 0x009938b0 6c665769 6474683b 200a2020 20202020 lfWidth; . │ │ │ │ + 0x009938c0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x009938d0 6f73203d 2063616c 634c696e 65547261 os = calcLineTra │ │ │ │ + 0x009938e0 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x009938f0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x00993900 6f732c20 615f706f 73697469 6f6e2e78 os, a_position.x │ │ │ │ + 0x00993910 79202b20 6e6f726d 2c200a20 20202020 y + norm, . │ │ │ │ + 0x00993920 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00993930 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00993940 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00993950 20755f6d 6f64656c 56696577 2c206c65 u_modelView, le │ │ │ │ + 0x00993960 6e677468 286e6f72 6d29293b 200a2020 ngth(norm)); . │ │ │ │ + 0x00993970 20207d20 0a202020 20765f63 6f6c6f72 } . v_color │ │ │ │ + 0x00993980 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ + 0x00993990 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x009939a0 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x009939b0 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ + 0x009939c0 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ + 0x009939d0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ + 0x009939e0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ + 0x009939f0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x00993a00 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00993a10 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ + 0x00993a20 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x00993a30 207d200a 00000000 14f5d6ff 22f5d6ff } ........."... │ │ │ │ 0x00993a40 30f5d6ff 3ef5d6ff 4cf5d6ff 5af5d6ff 0...>...L...Z... │ │ │ │ 0x00993a50 68f5d6ff 76f5d6ff 5ef4d6ff 6cf4d6ff h...v...^...l... │ │ │ │ 0x00993a60 7af4d6ff 88f4d6ff a4f4d6ff b2f4d6ff z............... │ │ │ │ 0x00993a70 96f4d6ff c0f4d6ff 06f5d6ff f8f4d6ff ................ │ │ │ │ 0x00993a80 ecf3d6ff def3d6ff 86f4d6ff faf3d6ff ................ │ │ │ │ 0x00993a90 08f4d6ff 30f7d6ff 2cf7d6ff 16f7d6ff ....0...,....... │ │ │ │ 0x00993aa0 36f7d6ff 44f7d6ff 4ef7d6ff 00000000 6...D...N....... │ │ │ ├── readelf --wide --decompress --hex-dump=.gnu_debuglink {} │ │ │ │ @@ -1,7 +1,7 @@ │ │ │ │ │ │ │ │ Hex dump of section '.gnu_debuglink': │ │ │ │ - 0x00000000 65303338 31643738 30313136 34633764 e0381d7801164c7d │ │ │ │ - 0x00000010 65306431 64653437 37393238 33376632 e0d1de47792837f2 │ │ │ │ - 0x00000020 32386365 37612e64 65627567 00000000 28ce7a.debug.... │ │ │ │ - 0x00000030 e8cbebcd .... │ │ │ │ + 0x00000000 66366666 37643566 32333262 36643633 f6ff7d5f232b6d63 │ │ │ │ + 0x00000010 37386266 65663236 31323932 39626233 78bfef2612929bb3 │ │ │ │ + 0x00000020 30613139 66382e64 65627567 00000000 0a19f8.debug.... │ │ │ │ + 0x00000030 71b3bbd6 q...