--- /srv/rebuilderd/tmp/rebuilderd9c6lCf/inputs/organicmaps_2026.03.12-05+ds-1_riscv64.deb +++ /srv/rebuilderd/tmp/rebuilderd9c6lCf/out/organicmaps_2026.03.12-05+ds-1_riscv64.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2026-04-02 06:35:55.000000 debian-binary │ --rw-r--r-- 0 0 0 1208 2026-04-02 06:35:55.000000 control.tar.xz │ --rw-r--r-- 0 0 0 5043748 2026-04-02 06:35:55.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 1212 2026-04-02 06:35:55.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 5043320 2026-04-02 06:35:55.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── ./usr/bin/OMaps │ │ │┄ File has been modified after NT_GNU_BUILD_ID has been applied. │ │ │ ├── readelf --wide --notes {} │ │ │ │ @@ -1,8 +1,8 @@ │ │ │ │ │ │ │ │ Displaying notes found in: .note.gnu.build-id │ │ │ │ Owner Data size Description │ │ │ │ - GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) Build ID: 9574ba8086a988d006a9861a85e8c234266a803e │ │ │ │ + GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) Build ID: 5c55bb4656abd7f9af6ae7c46f6bad10cde6128c │ │ │ │ │ │ │ │ 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 @@ │ │ │ │ ->/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 │ │ │ │ @@ -11596,15 +11596,15 @@ │ │ │ │ 2finished() │ │ │ │ https://meta.omaps.app/maps │ │ │ │ {"servers":["https://cdn-nl1.organicmaps.app/","https://cdn-uk1.organicmaps.app/","https://cdn.organicmaps.app/"]} │ │ │ │ PendingPosition │ │ │ │ NotFollow │ │ │ │ NotFollowNoPosition │ │ │ │ FollowAndRotate │ │ │ │ -2026.04.02-0-00000000-Linux │ │ │ │ +2026.04.04-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 │ │ │ │ @@ -15695,20 +15695,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; │ │ │ │ @@ -15741,21 +15743,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; │ │ │ │ @@ -15763,28 +15767,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 │ │ │ │ @@ -15806,31 +15810,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; │ │ │ │ @@ -15838,32 +15839,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 │ │ │ │ @@ -15885,27 +15880,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; │ │ │ │ @@ -15913,79 +15899,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 │ │ │ │ @@ -16007,21 +15938,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; │ │ │ │ @@ -16029,23 +15959,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 │ │ │ │ @@ -16067,22 +16004,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; │ │ │ │ @@ -16091,33 +16036,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 │ │ │ │ @@ -16139,23 +16078,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; │ │ │ │ @@ -16163,19 +16104,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; │ │ │ │ @@ -16205,20 +16147,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; │ │ │ │ @@ -16227,33 +16168,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 │ │ │ │ @@ -16275,23 +16210,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; │ │ │ │ @@ -16299,34 +16236,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 │ │ │ │ @@ -16349,22 +16285,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; │ │ │ │ @@ -16372,28 +16309,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 │ │ │ │ @@ -16415,25 +16347,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; │ │ │ │ @@ -16442,22 +16371,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; │ │ │ │ @@ -16490,22 +16419,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; │ │ │ │ @@ -16513,20 +16443,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 │ │ │ │ @@ -16548,20 +16479,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 │ │ │ │ @@ -16570,33 +16501,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 │ │ │ │ @@ -16618,27 +16542,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; │ │ │ │ @@ -16646,28 +16566,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 │ │ │ │ @@ -16689,19 +16613,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; │ │ │ │ @@ -16712,17 +16644,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; │ │ │ │ @@ -16757,15 +16687,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; │ │ │ │ @@ -16773,26 +16702,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 │ │ │ │ @@ -16814,26 +16751,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; │ │ │ │ @@ -16841,26 +16775,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 │ │ │ │ @@ -16882,23 +16827,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; │ │ │ │ @@ -16906,26 +16855,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 │ │ │ │ @@ -16947,19 +16898,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; │ │ │ │ @@ -16967,34 +16919,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 │ │ │ │ @@ -17016,26 +16955,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; │ │ │ │ @@ -17043,32 +16975,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 │ │ │ │ @@ -17090,22 +17015,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; │ │ │ │ @@ -17113,33 +17036,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 │ │ │ │ @@ -17161,24 +17076,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; │ │ │ │ @@ -17186,25 +17102,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 │ │ │ │ @@ -17226,19 +17143,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 │ │ │ │ @@ -17247,37 +17170,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 │ │ │ │ @@ -17299,143 +17212,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; │ │ │ │ @@ -17445,22 +17235,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 │ │ │ │ @@ -17482,18 +17267,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 │ │ │ │ @@ -17502,21 +17285,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 │ │ │ │ @@ -17538,19 +17335,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; │ │ │ │ @@ -17558,19 +17363,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 │ │ │ │ @@ -17592,17 +17403,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; │ │ │ │ @@ -17684,33 +17501,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 │ │ │ │ @@ -17732,24 +17544,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; │ │ │ │ @@ -17757,37 +17570,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 │ │ │ │ @@ -17809,27 +17605,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; │ │ │ │ @@ -17837,35 +17627,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 │ │ │ │ @@ -17887,27 +17668,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; │ │ │ │ @@ -17997,26 +17770,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 │ │ │ │ @@ -18038,18 +17817,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; │ │ │ │ @@ -18057,26 +17839,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 │ │ │ │ @@ -18098,19 +17878,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; │ │ │ │ @@ -18118,24 +17898,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 │ │ │ │ @@ -18157,20 +17950,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; │ │ │ │ @@ -18178,21 +17981,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 │ │ │ │ @@ -18214,20 +18022,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; │ │ │ │ @@ -18236,29 +18042,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 │ │ │ │ @@ -18280,28 +18090,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 │ │ │ │ @@ -18312,26 +18118,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; │ │ │ │ @@ -18354,28 +18165,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; │ │ │ │ @@ -18383,26 +18190,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 │ │ │ │ @@ -18424,18 +18226,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; │ │ │ │ @@ -18444,23 +18248,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 │ │ │ │ @@ -18482,23 +18296,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; │ │ │ │ @@ -18507,24 +18378,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 │ │ │ │ @@ -18547,24 +18426,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; │ │ │ │ @@ -18573,24 +18454,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 │ │ │ │ @@ -18612,23 +18496,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; │ │ │ │ @@ -18637,27 +18642,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 │ │ │ │ @@ -18679,25 +18680,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; │ │ │ │ @@ -18705,28 +18704,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 │ │ │ │ @@ -18748,25 +18751,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 {} │ │ │ │ @@ -2324710,16 +2324710,16 @@ │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1108 │ │ │ │ sd a5,264(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,264(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,388 │ │ │ │ - auipc a3,0x270 │ │ │ │ - addi a3,a3,-1276 │ │ │ │ + auipc a3,0x271 │ │ │ │ + addi a3,a3,1532 │ │ │ │ addi a1,sp,888 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1614 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,952 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ @@ -2324732,16 +2324732,16 @@ │ │ │ │ addi a1,a1,-1136 │ │ │ │ sd a5,312(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,312(sp) │ │ │ │ ld a1,288(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,1750 │ │ │ │ - auipc a3,0x281 │ │ │ │ - addi a3,a3,-1442 │ │ │ │ + auipc a3,0x26c │ │ │ │ + addi a3,a3,726 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1602 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1016 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1170 │ │ │ │ @@ -2324753,16 +2324753,16 @@ │ │ │ │ addi a1,a1,-1166 │ │ │ │ sd a5,360(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,360(sp) │ │ │ │ ld a1,336(sp) │ │ │ │ auipc a4,0x261 │ │ │ │ addi a4,a4,-1552 │ │ │ │ - auipc a3,0x274 │ │ │ │ - addi a3,a3,-1848 │ │ │ │ + auipc a3,0x26f │ │ │ │ + addi a3,a3,-928 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1592 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1080 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1194 │ │ │ │ @@ -2324774,16 +2324774,16 @@ │ │ │ │ addi a1,a1,-1198 │ │ │ │ sd a5,408(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,408(sp) │ │ │ │ ld a1,384(sp) │ │ │ │ auipc a4,0x261 │ │ │ │ addi a4,a4,-664 │ │ │ │ - auipc a3,0x287 │ │ │ │ - addi a3,a3,72 │ │ │ │ + auipc a3,0x26e │ │ │ │ + addi a3,a3,328 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1584 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1144 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1266 │ │ │ │ @@ -2324795,16 +2324795,16 @@ │ │ │ │ addi a1,a1,-1270 │ │ │ │ sd a5,456(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,456(sp) │ │ │ │ ld a1,432(sp) │ │ │ │ auipc a4,0x261 │ │ │ │ addi a4,a4,-736 │ │ │ │ - auipc a3,0x287 │ │ │ │ - mv a3,a3 │ │ │ │ + auipc a3,0x26e │ │ │ │ + addi a3,a3,256 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1576 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1208 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1306 │ │ │ │ @@ -2324816,16 +2324816,16 @@ │ │ │ │ addi a1,a1,-1302 │ │ │ │ sd a5,504(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,504(sp) │ │ │ │ ld a1,480(sp) │ │ │ │ auipc a4,0x261 │ │ │ │ addi a4,a4,328 │ │ │ │ - auipc a3,0x27e │ │ │ │ - addi a3,a3,1480 │ │ │ │ + auipc a3,0x275 │ │ │ │ + addi a3,a3,72 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1568 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1272 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1338 │ │ │ │ @@ -2324837,16 +2324837,16 @@ │ │ │ │ addi a1,a1,-1376 │ │ │ │ sd a5,552(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,552(sp) │ │ │ │ ld a1,528(sp) │ │ │ │ auipc a4,0x261 │ │ │ │ addi a4,a4,248 │ │ │ │ - auipc a3,0x27d │ │ │ │ - addi a3,a3,72 │ │ │ │ + auipc a3,0x27b │ │ │ │ + addi a3,a3,1160 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1568 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1336 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1402 │ │ │ │ @@ -2324858,16 +2324858,16 @@ │ │ │ │ addi a1,a1,-1400 │ │ │ │ sd a5,600(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,600(sp) │ │ │ │ ld a1,576(sp) │ │ │ │ auipc a4,0x261 │ │ │ │ addi a4,a4,1416 │ │ │ │ - auipc a3,0x280 │ │ │ │ - addi a3,a3,-808 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,-1128 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1568 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1400 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1482 │ │ │ │ @@ -2324879,16 +2324879,16 @@ │ │ │ │ addi a1,a1,-1480 │ │ │ │ sd a5,648(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,648(sp) │ │ │ │ ld a1,624(sp) │ │ │ │ auipc a4,0x261 │ │ │ │ addi a4,a4,1336 │ │ │ │ - auipc a3,0x280 │ │ │ │ - addi a3,a3,-888 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,-1208 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1568 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1464 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1514 │ │ │ │ @@ -2324900,16 +2324900,16 @@ │ │ │ │ addi a1,a1,-1520 │ │ │ │ sd a5,696(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,696(sp) │ │ │ │ ld a1,672(sp) │ │ │ │ auipc a4,0x262 │ │ │ │ addi a4,a4,-1632 │ │ │ │ - auipc a3,0x26b │ │ │ │ - addi a3,a3,-1424 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,1728 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1568 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1528 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1594 │ │ │ │ @@ -2324921,16 +2324921,16 @@ │ │ │ │ addi a1,a1,-1600 │ │ │ │ sd a5,744(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,744(sp) │ │ │ │ ld a1,720(sp) │ │ │ │ auipc a4,0x262 │ │ │ │ addi a4,a4,-1712 │ │ │ │ - auipc a3,0x26b │ │ │ │ - addi a3,a3,-1504 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,1648 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1568 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1592 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1642 │ │ │ │ @@ -2324942,16 +2324942,16 @@ │ │ │ │ addi a1,a1,-1648 │ │ │ │ sd a5,792(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,792(sp) │ │ │ │ ld a1,768(sp) │ │ │ │ auipc a4,0x262 │ │ │ │ addi a4,a4,-776 │ │ │ │ - auipc a3,0x26b │ │ │ │ - addi a3,a3,928 │ │ │ │ + auipc a3,0x285 │ │ │ │ + addi a3,a3,-256 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1568 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1656 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1690 │ │ │ │ @@ -2324963,31 +2324963,31 @@ │ │ │ │ addi a1,a1,-1760 │ │ │ │ sd a5,832(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,832(sp) │ │ │ │ ld a1,816(sp) │ │ │ │ auipc a4,0x262 │ │ │ │ addi a4,a4,-1872 │ │ │ │ - auipc a3,0x26c │ │ │ │ - addi a3,a3,-344 │ │ │ │ + auipc a3,0x273 │ │ │ │ + addi a3,a3,-128 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1568 │ │ │ │ jal 6f58ac │ │ │ │ addi a0,sp,1720 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-728 │ │ │ │ jal 6ea2f0 │ │ │ │ addi a0,sp,1752 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-720 │ │ │ │ jal 6ea2f0 │ │ │ │ auipc a4,0x262 │ │ │ │ addi a4,a4,12 │ │ │ │ - auipc a3,0x273 │ │ │ │ - addi a3,a3,-1492 │ │ │ │ + auipc a3,0x284 │ │ │ │ + addi a3,a3,796 │ │ │ │ addi a2,sp,1752 │ │ │ │ addi a1,sp,1720 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1556 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1784 │ │ │ │ mv a0,a5 │ │ │ │ @@ -2325001,16 +2325001,16 @@ │ │ │ │ addi a1,a1,-1810 │ │ │ │ sd a5,24(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,24(sp) │ │ │ │ ld a1,8(sp) │ │ │ │ auipc a4,0x262 │ │ │ │ addi a4,a4,924 │ │ │ │ - auipc a3,0x286 │ │ │ │ - addi a3,a3,-1996 │ │ │ │ + auipc a3,0x277 │ │ │ │ + addi a3,a3,1412 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1548 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1848 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1838 │ │ │ │ @@ -2325022,16 +2325022,16 @@ │ │ │ │ addi a1,a1,-1842 │ │ │ │ sd a5,56(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,56(sp) │ │ │ │ ld a1,40(sp) │ │ │ │ auipc a4,0x262 │ │ │ │ addi a4,a4,1724 │ │ │ │ - auipc a3,0x271 │ │ │ │ - addi a3,a3,-1156 │ │ │ │ + auipc a3,0x26f │ │ │ │ + addi a3,a3,548 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1540 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1912 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1878 │ │ │ │ @@ -2325043,16 +2325043,16 @@ │ │ │ │ addi a1,a1,1830 │ │ │ │ sd a5,88(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,88(sp) │ │ │ │ ld a1,72(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,620 │ │ │ │ - auipc a3,0x275 │ │ │ │ - addi a3,a3,684 │ │ │ │ + auipc a3,0x272 │ │ │ │ + addi a3,a3,1092 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1532 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,1976 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ addi a1,a1,1978 │ │ │ │ @@ -2325064,16 +2325064,16 @@ │ │ │ │ addi a1,a1,1974 │ │ │ │ sd a5,120(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,120(sp) │ │ │ │ ld a1,104(sp) │ │ │ │ auipc a4,0x261 │ │ │ │ addi a4,a4,1868 │ │ │ │ - auipc a3,0x26b │ │ │ │ - addi a3,a3,-2020 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,1132 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1524 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2040 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d3 │ │ │ │ addi a1,a1,-1038 │ │ │ │ @@ -2325086,16 +2325086,16 @@ │ │ │ │ addi a1,a1,-1036 │ │ │ │ sd a5,152(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,152(sp) │ │ │ │ ld a1,136(sp) │ │ │ │ auipc a4,0x263 │ │ │ │ addi a4,a4,-1614 │ │ │ │ - auipc a3,0x26e │ │ │ │ - addi a3,a3,522 │ │ │ │ + auipc a3,0x26a │ │ │ │ + addi a3,a3,2002 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,57 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325109,16 +2325109,16 @@ │ │ │ │ addi a1,a1,2012 │ │ │ │ sd a5,184(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,184(sp) │ │ │ │ ld a1,168(sp) │ │ │ │ auipc a4,0x263 │ │ │ │ addi a4,a4,-366 │ │ │ │ - auipc a3,0x271 │ │ │ │ - addi a3,a3,1482 │ │ │ │ + auipc a3,0x283 │ │ │ │ + addi a3,a3,-406 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,121 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325132,16 +2325132,16 @@ │ │ │ │ addi a1,a1,1980 │ │ │ │ sd a5,216(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,216(sp) │ │ │ │ ld a1,200(sp) │ │ │ │ auipc a4,0x263 │ │ │ │ addi a4,a4,658 │ │ │ │ - auipc a3,0x281 │ │ │ │ - addi a3,a3,1954 │ │ │ │ + auipc a3,0x26c │ │ │ │ + addi a3,a3,1658 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,185 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325155,16 +2325155,16 @@ │ │ │ │ addi a1,a1,1940 │ │ │ │ sd a5,248(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,248(sp) │ │ │ │ ld a1,232(sp) │ │ │ │ auipc a4,0x263 │ │ │ │ addi a4,a4,1402 │ │ │ │ - auipc a3,0x278 │ │ │ │ - addi a3,a3,1818 │ │ │ │ + auipc a3,0x277 │ │ │ │ + addi a3,a3,-1470 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,249 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325178,16 +2325178,16 @@ │ │ │ │ addi a1,a1,1900 │ │ │ │ sd a5,296(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,296(sp) │ │ │ │ ld a1,272(sp) │ │ │ │ auipc a4,0x264 │ │ │ │ addi a4,a4,-1950 │ │ │ │ - auipc a3,0x276 │ │ │ │ - addi a3,a3,-1286 │ │ │ │ + auipc a3,0x27d │ │ │ │ + addi a3,a3,-614 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,313 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325201,16 +2325201,16 @@ │ │ │ │ addi a1,a1,1820 │ │ │ │ sd a5,344(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,344(sp) │ │ │ │ ld a1,320(sp) │ │ │ │ auipc a4,0x264 │ │ │ │ addi a4,a4,-2030 │ │ │ │ - auipc a3,0x274 │ │ │ │ - addi a3,a3,1570 │ │ │ │ + auipc a3,0x278 │ │ │ │ + addi a3,a3,-630 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,377 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325224,16 +2325224,16 @@ │ │ │ │ addi a1,a1,1804 │ │ │ │ sd a5,392(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,392(sp) │ │ │ │ ld a1,368(sp) │ │ │ │ auipc a4,0x264 │ │ │ │ addi a4,a4,-1238 │ │ │ │ - auipc a3,0x279 │ │ │ │ - addi a3,a3,-166 │ │ │ │ + auipc a3,0x27f │ │ │ │ + addi a3,a3,1570 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,441 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325247,16 +2325247,16 @@ │ │ │ │ addi a1,a1,1764 │ │ │ │ sd a5,440(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,440(sp) │ │ │ │ ld a1,416(sp) │ │ │ │ auipc a4,0x264 │ │ │ │ addi a4,a4,-166 │ │ │ │ - auipc a3,0x285 │ │ │ │ - addi a3,a3,-1350 │ │ │ │ + auipc a3,0x287 │ │ │ │ + addi a3,a3,-1502 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,505 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325270,16 +2325270,16 @@ │ │ │ │ addi a1,a1,1724 │ │ │ │ sd a5,488(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,488(sp) │ │ │ │ ld a1,464(sp) │ │ │ │ auipc a4,0x264 │ │ │ │ addi a4,a4,226 │ │ │ │ - auipc a3,0x286 │ │ │ │ - addi a3,a3,-182 │ │ │ │ + auipc a3,0x27a │ │ │ │ + addi a3,a3,1130 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1518 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,569 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325293,16 +2325293,16 @@ │ │ │ │ addi a1,a1,1682 │ │ │ │ sd a5,536(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,536(sp) │ │ │ │ ld a1,512(sp) │ │ │ │ auipc a4,0x264 │ │ │ │ addi a4,a4,1018 │ │ │ │ - auipc a3,0x276 │ │ │ │ - addi a3,a3,738 │ │ │ │ + auipc a3,0x281 │ │ │ │ + addi a3,a3,-1278 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1526 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,633 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325316,16 +2325316,16 @@ │ │ │ │ addi a1,a1,1610 │ │ │ │ sd a5,584(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,584(sp) │ │ │ │ ld a1,560(sp) │ │ │ │ auipc a4,0x265 │ │ │ │ addi a4,a4,-1246 │ │ │ │ - auipc a3,0x276 │ │ │ │ - addi a3,a3,650 │ │ │ │ + auipc a3,0x281 │ │ │ │ + addi a3,a3,-1366 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1534 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,697 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325339,16 +2325339,16 @@ │ │ │ │ addi a1,a1,1554 │ │ │ │ sd a5,632(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,632(sp) │ │ │ │ ld a1,608(sp) │ │ │ │ auipc a4,0x265 │ │ │ │ addi a4,a4,346 │ │ │ │ - auipc a3,0x277 │ │ │ │ - addi a3,a3,-470 │ │ │ │ + auipc a3,0x287 │ │ │ │ + addi a3,a3,754 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1542 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,761 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325362,16 +2325362,16 @@ │ │ │ │ addi a1,a1,1506 │ │ │ │ sd a5,680(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,680(sp) │ │ │ │ ld a1,656(sp) │ │ │ │ auipc a4,0x265 │ │ │ │ addi a4,a4,1434 │ │ │ │ - auipc a3,0x278 │ │ │ │ - addi a3,a3,-1798 │ │ │ │ + auipc a3,0x281 │ │ │ │ + addi a3,a3,1522 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1550 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,825 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325385,16 +2325385,16 @@ │ │ │ │ addi a1,a1,1466 │ │ │ │ sd a5,728(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,728(sp) │ │ │ │ ld a1,704(sp) │ │ │ │ auipc a4,0x266 │ │ │ │ addi a4,a4,-1294 │ │ │ │ - auipc a3,0x26f │ │ │ │ - addi a3,a3,-2030 │ │ │ │ + auipc a3,0x278 │ │ │ │ + addi a3,a3,1354 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1558 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,889 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325408,16 +2325408,16 @@ │ │ │ │ addi a1,a1,602 │ │ │ │ sd a5,776(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,776(sp) │ │ │ │ ld a1,752(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,1130 │ │ │ │ - auipc a3,0x286 │ │ │ │ - addi a3,a3,1866 │ │ │ │ + auipc a3,0x26e │ │ │ │ + addi a3,a3,-1974 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1566 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,953 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325431,16 +2325431,16 @@ │ │ │ │ addi a1,a1,514 │ │ │ │ sd a5,824(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,824(sp) │ │ │ │ ld a1,800(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,1042 │ │ │ │ - auipc a3,0x286 │ │ │ │ - addi a3,a3,1778 │ │ │ │ + auipc a3,0x26d │ │ │ │ + addi a3,a3,2034 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1574 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1017 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325500,16 +2325500,16 @@ │ │ │ │ addi a1,a1,1140 │ │ │ │ sd a5,48(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,48(sp) │ │ │ │ ld a1,32(sp) │ │ │ │ auipc a4,0x267 │ │ │ │ addi a4,a4,266 │ │ │ │ - auipc a3,0x26c │ │ │ │ - addi a3,a3,394 │ │ │ │ + auipc a3,0x283 │ │ │ │ + addi a3,a3,778 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1209 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325523,16 +2325523,16 @@ │ │ │ │ addi a1,a1,1100 │ │ │ │ sd a5,80(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,80(sp) │ │ │ │ ld a1,64(sp) │ │ │ │ auipc a4,0x267 │ │ │ │ addi a4,a4,946 │ │ │ │ - auipc a3,0x26d │ │ │ │ - addi a3,a3,666 │ │ │ │ + auipc a3,0x270 │ │ │ │ + addi a3,a3,330 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1273 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325546,16 +2325546,16 @@ │ │ │ │ addi a1,a1,1068 │ │ │ │ sd a5,112(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,112(sp) │ │ │ │ ld a1,96(sp) │ │ │ │ auipc a4,0x267 │ │ │ │ addi a4,a4,1746 │ │ │ │ - auipc a3,0x26d │ │ │ │ - addi a3,a3,-1622 │ │ │ │ + auipc a3,0x271 │ │ │ │ + addi a3,a3,1170 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1337 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325569,16 +2325569,16 @@ │ │ │ │ addi a1,a1,1012 │ │ │ │ sd a5,144(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,144(sp) │ │ │ │ ld a1,128(sp) │ │ │ │ auipc a4,0x268 │ │ │ │ addi a4,a4,-1790 │ │ │ │ - auipc a3,0x26d │ │ │ │ - addi a3,a3,-1702 │ │ │ │ + auipc a3,0x271 │ │ │ │ + addi a3,a3,1090 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1401 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325592,16 +2325592,16 @@ │ │ │ │ addi a1,a1,-180 │ │ │ │ sd a5,176(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,176(sp) │ │ │ │ ld a1,160(sp) │ │ │ │ auipc a4,0x25f │ │ │ │ addi a4,a4,1314 │ │ │ │ - auipc a3,0x270 │ │ │ │ - addi a3,a3,-1798 │ │ │ │ + auipc a3,0x274 │ │ │ │ + addi a3,a3,-1342 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1465 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325615,16 +2325615,16 @@ │ │ │ │ addi a1,a1,-220 │ │ │ │ sd a5,208(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,208(sp) │ │ │ │ ld a1,192(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,-1430 │ │ │ │ - auipc a3,0x280 │ │ │ │ - addi a3,a3,1842 │ │ │ │ + auipc a3,0x273 │ │ │ │ + addi a3,a3,210 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1529 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325638,16 +2325638,16 @@ │ │ │ │ addi a1,a1,-260 │ │ │ │ sd a5,240(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,240(sp) │ │ │ │ ld a1,224(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,-646 │ │ │ │ - auipc a3,0x273 │ │ │ │ - addi a3,a3,1522 │ │ │ │ + auipc a3,0x275 │ │ │ │ + addi a3,a3,122 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1593 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325661,16 +2325661,16 @@ │ │ │ │ addi a1,a1,-300 │ │ │ │ sd a5,280(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,280(sp) │ │ │ │ ld a1,256(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,234 │ │ │ │ - auipc a3,0x287 │ │ │ │ - addi a3,a3,-358 │ │ │ │ + auipc a3,0x27b │ │ │ │ + addi a3,a3,866 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1657 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325684,16 +2325684,16 @@ │ │ │ │ addi a1,a1,-380 │ │ │ │ sd a5,328(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,328(sp) │ │ │ │ ld a1,304(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,154 │ │ │ │ - auipc a3,0x287 │ │ │ │ - addi a3,a3,-438 │ │ │ │ + auipc a3,0x27b │ │ │ │ + addi a3,a3,786 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1721 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325707,16 +2325707,16 @@ │ │ │ │ addi a1,a1,-460 │ │ │ │ sd a5,376(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,376(sp) │ │ │ │ ld a1,352(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,74 │ │ │ │ - auipc a3,0x287 │ │ │ │ - addi a3,a3,-518 │ │ │ │ + auipc a3,0x27b │ │ │ │ + addi a3,a3,706 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1785 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325730,16 +2325730,16 @@ │ │ │ │ addi a1,a1,-540 │ │ │ │ sd a5,424(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,424(sp) │ │ │ │ ld a1,400(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,-6 │ │ │ │ - auipc a3,0x287 │ │ │ │ - addi a3,a3,-598 │ │ │ │ + auipc a3,0x27b │ │ │ │ + addi a3,a3,626 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1849 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325753,16 +2325753,16 @@ │ │ │ │ addi a1,a1,-580 │ │ │ │ sd a5,472(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,472(sp) │ │ │ │ ld a1,448(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,1050 │ │ │ │ - auipc a3,0x27e │ │ │ │ - addi a3,a3,1130 │ │ │ │ + auipc a3,0x279 │ │ │ │ + addi a3,a3,442 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1582 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1913 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325776,16 +2325776,16 @@ │ │ │ │ addi a1,a1,-660 │ │ │ │ sd a5,520(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,520(sp) │ │ │ │ ld a1,496(sp) │ │ │ │ auipc a4,0x260 │ │ │ │ addi a4,a4,966 │ │ │ │ - auipc a3,0x27d │ │ │ │ - addi a3,a3,-626 │ │ │ │ + auipc a3,0x26f │ │ │ │ + addi a3,a3,798 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1586 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,1977 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325799,16 +2325799,16 @@ │ │ │ │ addi a1,a1,414 │ │ │ │ sd a5,568(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,568(sp) │ │ │ │ ld a1,544(sp) │ │ │ │ auipc a4,0x268 │ │ │ │ addi a4,a4,-1938 │ │ │ │ - auipc a3,0x282 │ │ │ │ - addi a3,a3,254 │ │ │ │ + auipc a3,0x26c │ │ │ │ + addi a3,a3,1566 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1594 │ │ │ │ jal 6f58ac │ │ │ │ addi a5,sp,2047 │ │ │ │ addi a5,a5,2041 │ │ │ │ mv a0,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325823,16 +2325823,16 @@ │ │ │ │ addi a1,a1,368 │ │ │ │ sd a5,616(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,616(sp) │ │ │ │ ld a1,592(sp) │ │ │ │ auipc a4,0x268 │ │ │ │ addi a4,a4,-336 │ │ │ │ - auipc a3,0x284 │ │ │ │ - addi a3,a3,-1744 │ │ │ │ + auipc a3,0x280 │ │ │ │ + addi a3,a3,-1504 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1600 │ │ │ │ jal 6f58ac │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,56 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2325848,16 +2325848,16 @@ │ │ │ │ addi a1,a1,328 │ │ │ │ sd a5,664(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,664(sp) │ │ │ │ ld a1,640(sp) │ │ │ │ auipc a4,0x268 │ │ │ │ addi a4,a4,448 │ │ │ │ - auipc a3,0x283 │ │ │ │ - addi a3,a3,-752 │ │ │ │ + auipc a3,0x26a │ │ │ │ + addi a3,a3,1896 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1608 │ │ │ │ jal 6f58ac │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,120 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2325873,16 +2325873,16 @@ │ │ │ │ addi a1,a1,288 │ │ │ │ sd a5,712(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,712(sp) │ │ │ │ ld a1,688(sp) │ │ │ │ auipc a4,0x268 │ │ │ │ addi a4,a4,1600 │ │ │ │ - auipc a3,0x281 │ │ │ │ - addi a3,a3,1600 │ │ │ │ + auipc a3,0x282 │ │ │ │ + addi a3,a3,-1536 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1616 │ │ │ │ jal 6f58ac │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,184 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2325898,16 +2325898,16 @@ │ │ │ │ addi a1,a1,224 │ │ │ │ sd a5,760(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,760(sp) │ │ │ │ ld a1,736(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-2048 │ │ │ │ - auipc a3,0x281 │ │ │ │ - addi a3,a3,1512 │ │ │ │ + auipc a3,0x282 │ │ │ │ + addi a3,a3,-1624 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1624 │ │ │ │ jal 6f58ac │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,248 │ │ │ │ add a5,a5,sp │ │ │ │ mv a0,a5 │ │ │ │ @@ -2325923,16 +2325923,16 @@ │ │ │ │ addi a1,a1,184 │ │ │ │ sd a5,808(sp) │ │ │ │ jal 6ea2f0 │ │ │ │ ld a2,808(sp) │ │ │ │ ld a1,784(sp) │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,-1584 │ │ │ │ - auipc a3,0x27b │ │ │ │ - mv a3,a3 │ │ │ │ + auipc a3,0x275 │ │ │ │ + addi a3,a3,1672 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1632 │ │ │ │ jal 6f58ac │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,312 │ │ │ │ add a0,sp,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ @@ -2325942,18 +2325942,18 @@ │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,344 │ │ │ │ add a0,sp,a5 │ │ │ │ auipc a1,0x1d2 │ │ │ │ addi a1,a1,144 │ │ │ │ add s7,sp,a5 │ │ │ │ jal 6ea2f0 │ │ │ │ - auipc a4,0x279 │ │ │ │ - addi a4,a4,432 │ │ │ │ - auipc a3,0x27a │ │ │ │ - addi a3,a3,1440 │ │ │ │ + auipc a4,0x285 │ │ │ │ + addi a4,a4,-928 │ │ │ │ + auipc a3,0x27e │ │ │ │ + addi a3,a3,496 │ │ │ │ mv a2,s7 │ │ │ │ mv a1,s8 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1636 │ │ │ │ jal 6f58ac │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,376 │ │ │ │ @@ -2325967,16 +2325967,16 @@ │ │ │ │ add s0,sp,a5 │ │ │ │ mv a0,s0 │ │ │ │ auipc a1,0x1d2 │ │ │ │ addi a1,a1,106 │ │ │ │ jal 6ea2f0 │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,86 │ │ │ │ - auipc a3,0x27c │ │ │ │ - addi a3,a3,-1962 │ │ │ │ + auipc a3,0x278 │ │ │ │ + addi a3,a3,1702 │ │ │ │ mv a2,s0 │ │ │ │ mv a1,s6 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1638 │ │ │ │ jal 6f58ac │ │ │ │ lui a5,0x1 │ │ │ │ addi a5,a5,440 │ │ │ │ @@ -2325990,16 +2325990,16 @@ │ │ │ │ add s1,sp,a5 │ │ │ │ mv a0,s1 │ │ │ │ auipc a1,0x1d2 │ │ │ │ addi a1,a1,58 │ │ │ │ jal 6ea2f0 │ │ │ │ auipc a4,0x269 │ │ │ │ addi a4,a4,1638 │ │ │ │ - auipc a3,0x271 │ │ │ │ - addi a3,a3,934 │ │ │ │ + auipc a3,0x27c │ │ │ │ + addi a3,a3,-1594 │ │ │ │ mv a2,s1 │ │ │ │ mv a1,s2 │ │ │ │ auipc a0,0x4be │ │ │ │ addi a0,a0,-1638 │ │ │ │ jal 6f58ac │ │ │ │ auipc a2,0x4b1 │ │ │ │ addi a2,a2,-18 │ │ │ │ @@ -2681998,15 +2681998,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,-1742 │ │ │ │ + addi a0,a0,-1740 │ │ │ │ ret │ │ │ │ beqz a0,7e5d2c │ │ │ │ ld a4,0(a0) │ │ │ │ auipc a3,0xffffd │ │ │ │ addi a3,a3,-316 │ │ │ │ ld a4,32(a4) │ │ │ │ bne a4,a3,7e5d2e │ │ │ ├── readelf --wide --decompress --hex-dump=.rodata {} │ │ │ │ @@ -20157,15 +20157,15 @@ │ │ │ │ 0x008ca960 6f736974 696f6e00 4e6f7446 6f6c6c6f osition.NotFollo │ │ │ │ 0x008ca970 77000000 00000000 4e6f7446 6f6c6c6f w.......NotFollo │ │ │ │ 0x008ca980 774e6f50 6f736974 696f6e00 00000000 wNoPosition..... │ │ │ │ 0x008ca990 466f6c6c 6f770000 466f6c6c 6f77416e Follow..FollowAn │ │ │ │ 0x008ca9a0 64526f74 61746500 50656e64 696e6700 dRotate.Pending. │ │ │ │ 0x008ca9b0 53414a53 414a0000 46414641 46410000 SAJSAJ..FAFAFA.. │ │ │ │ 0x008ca9c0 25456300 00000000 32303236 2e30342e %Ec.....2026.04. │ │ │ │ - 0x008ca9d0 30322d30 2d303030 30303030 302d4c69 02-0-00000000-Li │ │ │ │ + 0x008ca9d0 30342d30 2d303030 30303030 302d4c69 04-0-00000000-Li │ │ │ │ 0x008ca9e0 6e757800 00000000 3136322e 35352e31 nux.....162.55.1 │ │ │ │ 0x008ca9f0 30302e31 36390000 436f7272 75707465 00.169..Corrupte │ │ │ │ 0x008caa00 644d776d 46696c65 202e2f6c 6962732f dMwmFile ./libs/ │ │ │ │ 0x008caa10 706c6174 666f726d 2f6d776d 5f766572 platform/mwm_ver │ │ │ │ 0x008caa20 73696f6e 2e637070 3a333200 00000000 sion.cpp:32..... │ │ │ │ 0x008caa30 494f2065 78636570 74696f6e 00000000 IO exception.... │ │ │ │ 0x008caa40 57726974 65206578 63657074 696f6e00 Write exception. │ │ │ │ @@ -56308,7573 +56308,7573 @@ │ │ │ │ 0x00957cd0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ 0x00957ce0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ 0x00957cf0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ 0x00957d00 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ 0x00957d10 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ 0x00957d20 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ 0x00957d30 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00957d40 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00957d50 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ - 0x00957d60 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ - 0x00957d70 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ - 0x00957d80 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ - 0x00957d90 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ - 0x00957da0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x00957db0 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ - 0x00957dc0 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ - 0x00957dd0 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ - 0x00957de0 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ - 0x00957df0 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ - 0x00957e00 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ - 0x00957e10 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x00957e20 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ - 0x00957e30 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ - 0x00957e40 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ - 0x00957e50 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ - 0x00957e60 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ - 0x00957e70 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00957e80 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ - 0x00957e90 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ - 0x00957ea0 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ - 0x00957eb0 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ - 0x00957ec0 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ - 0x00957ed0 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ - 0x00957ee0 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ - 0x00957ef0 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ - 0x00957f00 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00957f10 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00957f20 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00957f30 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00957f40 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00957f50 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00957f60 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00957f70 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00957f80 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00957f90 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00957fa0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00957fb0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00957fc0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00957fd0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x00957fe0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x00957ff0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00958000 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00958010 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00958020 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00958030 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00958040 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00958050 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00958060 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00958070 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00958080 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00958090 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009580a0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x009580b0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x009580c0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x009580d0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x009580e0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x009580f0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x00958100 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00958110 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00958120 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00958130 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00958140 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00958150 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00958160 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00958170 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00958180 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00958190 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x009581a0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009581b0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x009581c0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x009581d0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x009581e0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x009581f0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x00958200 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00958210 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00958220 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00958230 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00958240 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00958250 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00958260 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00958270 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00958280 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00958290 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x009582a0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x009582b0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x009582c0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x009582d0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x009582e0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x009582f0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x00958300 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00958310 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00958320 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00958330 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00958340 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00958350 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00958360 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00958370 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00958380 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00958390 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x009583a0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x009583b0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x009583c0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x009583d0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x009583e0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x009583f0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00958400 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00958410 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00958420 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00958430 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00958440 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00958450 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00958460 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00958470 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00958480 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00958490 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ - 0x009584a0 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ - 0x009584b0 696f6e2c 20312920 2a20755f 6d6f6465 ion, 1) * u_mode │ │ │ │ - 0x009584c0 6c566965 77202a20 755f7072 6f6a6563 lView * u_projec │ │ │ │ - 0x009584d0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ - 0x009584e0 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ - 0x009584f0 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ - 0x00958500 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ - 0x00958510 726d2c20 302e3029 3b200a20 20236966 rm, 0.0); . #if │ │ │ │ - 0x00958520 64656620 454e4142 4c455f56 5446200a def ENABLE_VTF . │ │ │ │ - 0x00958530 20202020 765f636f 6c6f7220 3d207465 v_color = te │ │ │ │ - 0x00958540 78747572 6528755f 636f6c6f 72546578 xture(u_colorTex │ │ │ │ - 0x00958550 2c20615f 636f6c6f 72546578 436f6f72 , a_colorTexCoor │ │ │ │ - 0x00958560 6473293b 200a2020 23656c73 65200a20 ds); . #else . │ │ │ │ - 0x00958570 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00958580 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ - 0x00958590 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ - 0x009585a0 66200a20 207d200a 00000000 00000000 f . } ......... │ │ │ │ - 0x009585b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009585c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009585d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009585e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009585f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00958600 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00958610 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00958620 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00958630 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00958640 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00958650 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00958660 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00958670 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00958680 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00958690 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009586a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009586b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009586c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009586d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009586e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009586f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00958700 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00958710 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x00958720 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00958730 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00958740 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00958750 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00958760 20206f75 7420666c 6f617420 765f696e out float v_in │ │ │ │ - 0x00958770 74656e73 6974793b 200a2020 756e6966 tensity; . unif │ │ │ │ - 0x00958780 6f726d20 6d617434 20755f6d 6f64656c orm mat4 u_model │ │ │ │ - 0x00958790 56696577 3b200a20 20756e69 666f726d View; . uniform │ │ │ │ - 0x009587a0 206d6174 3420755f 70726f6a 65637469 mat4 u_projecti │ │ │ │ - 0x009587b0 6f6e3b20 0a202075 6e69666f 726d206d on; . uniform m │ │ │ │ - 0x009587c0 61743420 755f7069 766f7454 72616e73 at4 u_pivotTrans │ │ │ │ - 0x009587d0 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ - 0x009587e0 20766563 3220755f 636f6e74 72617374 vec2 u_contrast │ │ │ │ - 0x009587f0 47616d6d 613b200a 2020756e 69666f72 Gamma; . unifor │ │ │ │ - 0x00958800 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00958810 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ - 0x00958820 6f617420 755f7a53 63616c65 3b200a20 oat u_zScale; . │ │ │ │ - 0x00958830 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00958840 5f696e74 6572706f 6c617469 6f6e3b20 _interpolation; │ │ │ │ - 0x00958850 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x00958860 20755f69 734f7574 6c696e65 50617373 u_isOutlinePass │ │ │ │ - 0x00958870 3b200a20 20636f6e 73742076 65633420 ; . const vec4 │ │ │ │ - 0x00958880 6b4e6f72 6d616c69 7a65644c 69676874 kNormalizedLight │ │ │ │ - 0x00958890 44697220 3d207665 63342830 2e333136 Dir = vec4(0.316 │ │ │ │ - 0x009588a0 322c2030 2e302c20 302e3934 38362c20 2, 0.0, 0.9486, │ │ │ │ - 0x009588b0 302e3029 3b200a20 20636f6e 73742066 0.0); . const f │ │ │ │ - 0x009588c0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x009588d0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x009588e0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x009588f0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00958900 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00958910 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00958920 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00958930 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00958940 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00958950 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00958960 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00958970 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00958980 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00958990 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x009589a0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x009589b0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009589c0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x009589d0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x009589e0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x009589f0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00958a00 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00958a10 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00958a20 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00958a30 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00958a40 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00958a50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00958a60 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x00958a70 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x00958a80 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x00958a90 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00958aa0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x00958ab0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x00958ac0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00958ad0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00958ae0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00958af0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00958b00 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00958b10 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00958b20 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00958b30 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00958b40 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00958b50 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00958b60 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00958b70 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00958b80 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x00958b90 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x00958ba0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x00958bb0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x00957d40 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00957d50 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00957d60 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00957d70 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00957d80 455f5654 46200a20 206f7574 204c4f57 E_VTF . out LOW │ │ │ │ + 0x00957d90 5f502076 65633420 765f636f 6c6f723b _P vec4 v_color; │ │ │ │ + 0x00957da0 200a2020 23656c73 65200a20 206f7574 . #else . out │ │ │ │ + 0x00957db0 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ + 0x00957dc0 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ + 0x00957dd0 66200a20 206f7574 20766563 3320765f f . out vec3 v_ │ │ │ │ + 0x00957de0 72616469 75733b20 0a202075 6e69666f radius; . unifo │ │ │ │ + 0x00957df0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00957e00 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00957e10 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00957e20 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00957e30 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00957e40 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00957e50 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00957e60 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00957e70 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00957e80 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00957e90 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00957ea0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00957eb0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00957ec0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00957ed0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x00957ee0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00957ef0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ + 0x00957f00 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x00957f10 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ + 0x00957f20 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00957f30 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00957f40 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00957f50 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00957f60 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00957f70 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00957f80 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00957f90 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00957fa0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00957fb0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00957fc0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00957fd0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00957fe0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00957ff0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00958000 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00958010 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00958020 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00958030 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00958040 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00958050 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00958060 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00958070 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00958080 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00958090 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x009580a0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x009580b0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x009580c0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x009580d0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x009580e0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x009580f0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00958100 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00958110 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00958120 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00958130 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00958140 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00958150 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00958160 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00958170 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00958180 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00958190 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x009581a0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x009581b0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x009581c0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x009581d0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x009581e0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x009581f0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00958200 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00958210 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00958220 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00958230 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00958240 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00958250 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00958260 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00958270 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00958280 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00958290 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x009582a0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x009582b0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x009582c0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x009582d0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x009582e0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x009582f0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00958300 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00958310 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00958320 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00958330 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00958340 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00958350 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00958360 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00958370 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00958380 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00958390 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x009583a0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x009583b0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x009583c0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x009583d0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x009583e0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x009583f0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00958400 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00958410 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00958420 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00958430 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00958440 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00958450 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00958460 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00958470 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00958480 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00958490 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x009584a0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x009584b0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x009584c0 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ + 0x009584d0 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ + 0x009584e0 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ + 0x009584f0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x00958500 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ + 0x00958510 2c20302c 20302920 2b20703b 200a2020 , 0, 0) + p; . │ │ │ │ + 0x00958520 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00958530 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x00958540 6f726d28 706f7320 2a20755f 70726f6a orm(pos * u_proj │ │ │ │ + 0x00958550 65637469 6f6e2c20 755f7069 766f7454 ection, u_pivotT │ │ │ │ + 0x00958560 72616e73 666f726d 2c20302e 30293b20 ransform, 0.0); │ │ │ │ + 0x00958570 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00958580 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ + 0x00958590 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ + 0x009585a0 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ + 0x009585b0 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ + 0x009585c0 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ + 0x009585d0 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ + 0x009585e0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x009585f0 2023656e 64696620 0a202020 20765f72 #endif . v_r │ │ │ │ + 0x00958600 61646975 73203d20 615f6e6f 726d616c adius = a_normal │ │ │ │ + 0x00958610 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x00958620 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00958630 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00958640 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00958650 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00958660 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00958670 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00958680 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00958690 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009586a0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x009586b0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x009586c0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009586d0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009586e0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009586f0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00958700 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00958710 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00958720 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00958730 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00958740 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00958750 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00958760 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00958770 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00958780 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00958790 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x009587a0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x009587b0 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x009587c0 6c6f7254 6578436f 6f72643b 200a2020 lorTexCoord; . │ │ │ │ + 0x009587d0 6f757420 76656333 20765f72 61646975 out vec3 v_radiu │ │ │ │ + 0x009587e0 733b200a 2020756e 69666f72 6d206d61 s; . uniform ma │ │ │ │ + 0x009587f0 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ + 0x00958800 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00958810 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00958820 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00958830 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ + 0x00958840 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x00958850 755f7472 61666669 63506172 616d733b u_trafficParams; │ │ │ │ + 0x00958860 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00958870 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ + 0x00958880 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ + 0x00958890 20755f6c 69676874 4172726f 77436f6c u_lightArrowCol │ │ │ │ + 0x009588a0 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ + 0x009588b0 65633420 755f6461 726b4172 726f7743 ec4 u_darkArrowC │ │ │ │ + 0x009588c0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ + 0x009588d0 20666c6f 61742075 5f6f7574 6c696e65 float u_outline │ │ │ │ + 0x009588e0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x009588f0 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ + 0x00958900 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x00958910 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x00958920 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x00958930 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00958940 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00958950 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00958960 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00958970 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x00958980 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x00958990 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x009589a0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x009589b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009589c0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x009589d0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x009589e0 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x009589f0 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x00958a00 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x00958a10 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x00958a20 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00958a30 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x00958a40 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x00958a50 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x00958a60 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x00958a70 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x00958a80 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00958a90 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x00958aa0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x00958ab0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00958ac0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x00958ad0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x00958ae0 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00958af0 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x00958b00 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x00958b10 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x00958b20 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x00958b30 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x00958b40 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x00958b50 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x00958b60 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x00958b70 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x00958b80 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x00958b90 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x00958ba0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00958bb0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ 0x00958bc0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00958bd0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00958be0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00958bf0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00958c00 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00958c10 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00958c20 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00958c30 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00958c40 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00958c50 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00958c60 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00958c70 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x00958c80 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x00958c90 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x00958ca0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x00958cb0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x00958cc0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00958cd0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00958ce0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00958cf0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00958d00 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00958d10 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00958d20 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00958d30 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00958d40 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00958d50 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00958d60 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x00958d70 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x00958d80 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x00958d90 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00958da0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x00958db0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00958dc0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00958dd0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00958de0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00958df0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00958e00 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00958e10 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00958e20 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00958e30 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00958e40 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00958e50 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ - 0x00958e60 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ - 0x00958e70 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ - 0x00958e80 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ - 0x00958e90 6334206e 6f726d61 6c203d20 76656334 c4 normal = vec4 │ │ │ │ - 0x00958ea0 28615f70 6f736974 696f6e20 2b20615f (a_position + a_ │ │ │ │ - 0x00958eb0 6e6f726d 616c2c20 312e3029 202a2075 normal, 1.0) * u │ │ │ │ - 0x00958ec0 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ - 0x00958ed0 206e6f72 6d616c2e 78797720 3d20286e normal.xyw = (n │ │ │ │ - 0x00958ee0 6f726d61 6c202a20 755f7072 6f6a6563 ormal * u_projec │ │ │ │ - 0x00958ef0 74696f6e 292e7879 773b200a 20202020 tion).xyw; . │ │ │ │ - 0x00958f00 6e6f726d 616c2e7a 203d206e 6f726d61 normal.z = norma │ │ │ │ - 0x00958f10 6c2e7a20 2a20755f 7a536361 6c653b20 l.z * u_zScale; │ │ │ │ - 0x00958f20 0a202020 20706f73 2e787977 203d2028 . pos.xyw = ( │ │ │ │ - 0x00958f30 706f7320 2a20755f 70726f6a 65637469 pos * u_projecti │ │ │ │ - 0x00958f40 6f6e292e 7879773b 200a2020 2020706f on).xyw; . po │ │ │ │ - 0x00958f50 732e7a20 3d20615f 706f7369 74696f6e s.z = a_position │ │ │ │ - 0x00958f60 2e7a202a 20755f7a 5363616c 653b200a .z * u_zScale; . │ │ │ │ - 0x00958f70 20202020 76656334 206e6f72 6d446972 vec4 normDir │ │ │ │ - 0x00958f80 203d206e 6f726d61 6c202d20 706f733b = normal - pos; │ │ │ │ + 0x00958bd0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x00958be0 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x00958bf0 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x00958c00 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00958c10 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x00958c20 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x00958c30 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x00958c40 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x00958c50 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x00958c60 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00958c70 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x00958c80 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x00958c90 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x00958ca0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x00958cb0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00958cc0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x00958cd0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x00958ce0 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x00958cf0 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x00958d00 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x00958d10 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00958d20 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x00958d30 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x00958d40 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x00958d50 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x00958d60 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x00958d70 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x00958d80 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x00958d90 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x00958da0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00958db0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x00958dc0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x00958dd0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x00958de0 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x00958df0 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x00958e00 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x00958e10 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x00958e20 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00958e30 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x00958e40 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x00958e50 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x00958e60 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x00958e70 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00958e80 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x00958e90 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x00958ea0 20766563 32206e6f 726d616c 203d2061 vec2 normal = a │ │ │ │ + 0x00958eb0 5f6e6f72 6d616c2e 78793b20 0a202020 _normal.xy; . │ │ │ │ + 0x00958ec0 20766563 32207472 616e7366 6f726d65 vec2 transforme │ │ │ │ + 0x00958ed0 64417869 73506f73 203d2028 76656334 dAxisPos = (vec4 │ │ │ │ + 0x00958ee0 28615f70 6f736974 696f6e2e 78792c20 (a_position.xy, │ │ │ │ + 0x00958ef0 302e302c 20312e30 29202a20 755f6d6f 0.0, 1.0) * u_mo │ │ │ │ + 0x00958f00 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00958f10 2020696e 7420696e 64657820 3d20696e int index = in │ │ │ │ + 0x00958f20 7428615f 706f7369 74696f6e 2e77293b t(a_position.w); │ │ │ │ + 0x00958f30 200a2020 2020666c 6f617420 6c656674 . float left │ │ │ │ + 0x00958f40 53697a65 203d2075 5f6c6967 68744172 Size = u_lightAr │ │ │ │ + 0x00958f50 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ + 0x00958f60 200a2020 2020666c 6f617420 72696768 . float righ │ │ │ │ + 0x00958f70 7453697a 65203d20 755f6461 726b4172 tSize = u_darkAr │ │ │ │ + 0x00958f80 726f7743 6f6c6f72 5b696e64 65785d3b rowColor[index]; │ │ │ │ 0x00958f90 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ - 0x00958fa0 726d4469 722c206e 6f726d44 69722920 rmDir, normDir) │ │ │ │ - 0x00958fb0 213d2030 2e302920 0a202020 20202076 != 0.0) . v │ │ │ │ - 0x00958fc0 5f696e74 656e7369 7479203d 206d6178 _intensity = max │ │ │ │ - 0x00958fd0 28302e30 2c202d64 6f74286b 4e6f726d (0.0, -dot(kNorm │ │ │ │ - 0x00958fe0 616c697a 65644c69 67687444 69722c20 alizedLightDir, │ │ │ │ - 0x00958ff0 6e6f726d 616c697a 65286e6f 726d4469 normalize(normDi │ │ │ │ - 0x00959000 72292929 3b200a20 20202065 6c736520 r))); . else │ │ │ │ - 0x00959010 0a202020 20202076 5f696e74 656e7369 . v_intensi │ │ │ │ - 0x00959020 7479203d 20302e30 3b200a20 20202067 ty = 0.0; . g │ │ │ │ - 0x00959030 6c5f506f 73697469 6f6e203d 20755f70 l_Position = u_p │ │ │ │ - 0x00959040 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00959050 706f733b 200a2020 23696664 65662056 pos; . #ifdef V │ │ │ │ - 0x00959060 554c4b41 4e200a20 20202067 6c5f506f ULKAN . gl_Po │ │ │ │ - 0x00959070 73697469 6f6e2e79 203d202d 676c5f50 sition.y = -gl_P │ │ │ │ - 0x00959080 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x00959090 676c5f50 6f736974 696f6e2e 7a203d20 gl_Position.z = │ │ │ │ - 0x009590a0 28676c5f 506f7369 74696f6e 2e7a2020 (gl_Position.z │ │ │ │ - 0x009590b0 2b20676c 5f506f73 6974696f 6e2e7729 + gl_Position.w) │ │ │ │ - 0x009590c0 202a2030 2e353b20 0a202023 656e6469 * 0.5; . #endi │ │ │ │ - 0x009590d0 66200a20 20202076 5f636f6c 6f725465 f . v_colorTe │ │ │ │ - 0x009590e0 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ - 0x009590f0 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ - 0x00959100 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x00959110 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00959120 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00959130 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00959140 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00959150 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00959160 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00959170 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00959180 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00959190 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009591a0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009591b0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x009591c0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x009591d0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009591e0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009591f0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00959200 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00959210 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00959220 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00959230 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00959240 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00959250 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00959260 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00959270 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x00959280 64733b20 0a202023 69666465 6620454e ds; . #ifdef EN │ │ │ │ - 0x00959290 41424c45 5f565446 200a2020 6f757420 ABLE_VTF . out │ │ │ │ - 0x009592a0 4c4f575f 50207665 63342076 5f636f6c LOW_P vec4 v_col │ │ │ │ - 0x009592b0 6f723b20 0a202023 656c7365 200a2020 or; . #else . │ │ │ │ - 0x009592c0 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ - 0x009592d0 54657843 6f6f7264 733b200a 20202365 TexCoords; . #e │ │ │ │ - 0x009592e0 6e646966 200a2020 756e6966 6f726d20 ndif . uniform │ │ │ │ - 0x009592f0 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ - 0x00959300 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00959310 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ - 0x00959320 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00959330 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ - 0x00959340 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00959350 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ - 0x00959360 613b200a 2020756e 69666f72 6d20666c a; . uniform fl │ │ │ │ - 0x00959370 6f617420 755f6f70 61636974 793b200a oat u_opacity; . │ │ │ │ - 0x00959380 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00959390 755f7a53 63616c65 3b200a20 20756e69 u_zScale; . uni │ │ │ │ - 0x009593a0 666f726d 20666c6f 61742075 5f696e74 form float u_int │ │ │ │ - 0x009593b0 6572706f 6c617469 6f6e3b20 0a202075 erpolation; . u │ │ │ │ - 0x009593c0 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x009593d0 734f7574 6c696e65 50617373 3b200a20 sOutlinePass; . │ │ │ │ - 0x009593e0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x009593f0 5446200a 2020756e 69666f72 6d207361 TF . uniform sa │ │ │ │ - 0x00959400 6d706c65 72324420 755f636f 6c6f7254 mpler2D u_colorT │ │ │ │ - 0x00959410 65783b20 0a202023 656e6469 66200a20 ex; . #endif . │ │ │ │ - 0x00959420 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00959430 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00959440 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00959450 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00959460 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00959470 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00959480 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00959490 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x009594a0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x009594b0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x009594c0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x009594d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009594e0 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x009594f0 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00959500 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00959510 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00959520 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00959530 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00959540 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00959550 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00959560 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00959570 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00959580 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00959590 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x009595a0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009595b0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x009595c0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x009595d0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009595e0 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x009595f0 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00959600 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00959610 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00959620 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00959630 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00959640 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00959650 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00959660 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00959670 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00959680 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x00959690 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x009596a0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x009596b0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x009596c0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x009596d0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x009596e0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x009596f0 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00959700 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00959710 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00959720 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00959730 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00959740 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00959750 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x00959760 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x00959770 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x00959780 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00959790 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x009597a0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x009597b0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x009597c0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x009597d0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x009597e0 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x009597f0 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00959800 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00959810 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00959820 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00959830 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00959840 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00959850 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x00959860 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x00959870 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x00959880 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x00959890 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x009598a0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x009598b0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x009598c0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x009598d0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x009598e0 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x009598f0 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00959900 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00959910 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00959920 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00959930 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00959940 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00959950 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x00959960 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x00959970 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x00959980 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x00959990 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x009599a0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x009599b0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x009599c0 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ - 0x009599d0 28615f70 6f736974 696f6e2c 20312e30 (a_position, 1.0 │ │ │ │ - 0x009599e0 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ - 0x009599f0 200a2020 2020706f 732e7879 77203d20 . pos.xyw = │ │ │ │ - 0x00959a00 28706f73 202a2075 5f70726f 6a656374 (pos * u_project │ │ │ │ - 0x00959a10 696f6e29 2e787977 3b200a20 20202070 ion).xyw; . p │ │ │ │ - 0x00959a20 6f732e7a 203d2061 5f706f73 6974696f os.z = a_positio │ │ │ │ - 0x00959a30 6e2e7a20 2a20755f 7a536361 6c653b20 n.z * u_zScale; │ │ │ │ - 0x00959a40 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x00959a50 203d2075 5f706976 6f745472 616e7366 = u_pivotTransf │ │ │ │ - 0x00959a60 6f726d20 2a20706f 733b200a 20202369 orm * pos; . #i │ │ │ │ - 0x00959a70 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00959a80 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ - 0x00959a90 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ - 0x00959aa0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00959ab0 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ - 0x00959ac0 6f6e2e7a 20202b20 676c5f50 6f736974 on.z + gl_Posit │ │ │ │ - 0x00959ad0 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ - 0x00959ae0 2023656e 64696620 0a202023 69666465 #endif . #ifde │ │ │ │ - 0x00959af0 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x00959b00 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ - 0x00959b10 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ - 0x00959b20 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x00959b30 293b200a 20202365 6c736520 0a202020 ); . #else . │ │ │ │ - 0x00959b40 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x00959b50 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ - 0x00959b60 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ - 0x00959b70 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x00959b80 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00959b90 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00959ba0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00959bb0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00959bc0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00959bd0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00959be0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00959bf0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00959c00 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00959c10 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00959c20 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00959c30 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00959c40 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00959c50 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00959c60 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00959c70 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00959c80 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00959c90 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00959ca0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00959cb0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00959cc0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00959cd0 3b200a20 20696e20 76656333 20615f6e ; . in vec3 a_n │ │ │ │ - 0x00959ce0 6f726d61 6c3b200a 20206f75 74207665 ormal; . out ve │ │ │ │ - 0x00959cf0 63332076 5f6e6f72 6d616c3b 200a2020 c3 v_normal; . │ │ │ │ - 0x00959d00 756e6966 6f726d20 6d617434 20755f74 uniform mat4 u_t │ │ │ │ - 0x00959d10 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ - 0x00959d20 666f726d 206d6174 3420755f 6e6f726d form mat4 u_norm │ │ │ │ - 0x00959d30 616c5472 616e7366 6f726d3b 200a2020 alTransform; . │ │ │ │ - 0x00959d40 756e6966 6f726d20 76656334 20755f63 uniform vec4 u_c │ │ │ │ - 0x00959d50 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x00959d60 20766563 3220755f 74657843 6f6f7264 vec2 u_texCoord │ │ │ │ - 0x00959d70 466c6970 70696e67 3b200a20 20636f6e Flipping; . con │ │ │ │ - 0x00959d80 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00959d90 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00959da0 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00959db0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00959dc0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00959dd0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00959de0 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00959df0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x00959e00 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00959e10 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x00959e20 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x00959e30 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x00959e40 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00959e50 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00959e60 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00959e70 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00959e80 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00959e90 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00959ea0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00959eb0 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00959ec0 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00959ed0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00959ee0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00959ef0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x00959f00 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x00959f10 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00959f20 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x00959f30 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x00959f40 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00959f50 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00959f60 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00959f70 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00959f80 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00959f90 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00959fa0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00959fb0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00959fc0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00959fd0 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00959fe0 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x00959ff0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x0095a000 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x0095a010 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x0095a020 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x0095a030 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x0095a040 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x0095a050 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0095a060 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x0095a070 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x0095a080 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0095a090 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x0095a0a0 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x0095a0b0 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x0095a0c0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x0095a0d0 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x0095a0e0 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x0095a0f0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x0095a100 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x0095a110 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x0095a120 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x0095a130 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x0095a140 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x0095a150 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x0095a160 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x0095a170 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x0095a180 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x0095a190 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x0095a1a0 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x0095a1b0 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x0095a1c0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x0095a1d0 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x0095a1e0 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x0095a1f0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x0095a200 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x0095a210 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x0095a220 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x0095a230 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x0095a240 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x0095a250 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x0095a260 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x0095a270 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x0095a280 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x0095a290 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x0095a2a0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x0095a2b0 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x0095a2c0 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x0095a2d0 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x0095a2e0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x0095a2f0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x0095a300 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x0095a310 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ - 0x0095a320 3420706f 73697469 6f6e203d 20755f74 4 position = u_t │ │ │ │ - 0x0095a330 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x0095a340 615f706f 732c2031 2e30293b 200a2020 a_pos, 1.0); . │ │ │ │ - 0x0095a350 2020765f 6e6f726d 616c203d 206e6f72 v_normal = nor │ │ │ │ - 0x0095a360 6d616c69 7a652828 755f6e6f 726d616c malize((u_normal │ │ │ │ - 0x0095a370 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0095a380 28615f6e 6f726d61 6c2c2030 2e302929 (a_normal, 0.0)) │ │ │ │ - 0x0095a390 2e78797a 293b200a 20202020 676c5f50 .xyz); . gl_P │ │ │ │ - 0x0095a3a0 6f736974 696f6e20 3d20706f 73697469 osition = positi │ │ │ │ - 0x0095a3b0 6f6e3b20 0a202023 69666465 66205655 on; . #ifdef VU │ │ │ │ - 0x0095a3c0 4c4b414e 200a2020 2020676c 5f506f73 LKAN . gl_Pos │ │ │ │ - 0x0095a3d0 6974696f 6e2e7920 3d202d67 6c5f506f ition.y = -gl_Po │ │ │ │ - 0x0095a3e0 73697469 6f6e2e79 3b200a20 20202067 sition.y; . g │ │ │ │ - 0x0095a3f0 6c5f506f 73697469 6f6e2e7a 203d2028 l_Position.z = ( │ │ │ │ - 0x0095a400 676c5f50 6f736974 696f6e2e 7a202b20 gl_Position.z + │ │ │ │ - 0x0095a410 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ - 0x0095a420 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ - 0x0095a430 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x0095a440 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095a450 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095a460 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095a470 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095a480 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095a490 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095a4a0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095a4b0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095a4c0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095a4d0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095a4e0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095a4f0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095a500 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095a510 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095a520 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095a530 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095a540 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095a550 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095a560 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095a570 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095a580 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0095a590 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ - 0x0095a5a0 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ - 0x0095a5b0 20666c6f 61742076 5f696e74 656e7369 float v_intensi │ │ │ │ - 0x0095a5c0 74793b20 0a202075 6e69666f 726d206d ty; . uniform m │ │ │ │ - 0x0095a5d0 61743420 755f7472 616e7366 6f726d3b at4 u_transform; │ │ │ │ - 0x0095a5e0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x0095a5f0 20755f6e 6f726d61 6c547261 6e73666f u_normalTransfo │ │ │ │ - 0x0095a600 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x0095a610 65633420 755f636f 6c6f723b 200a2020 ec4 u_color; . │ │ │ │ - 0x0095a620 756e6966 6f726d20 76656332 20755f74 uniform vec2 u_t │ │ │ │ - 0x0095a630 6578436f 6f726446 6c697070 696e673b exCoordFlipping; │ │ │ │ - 0x0095a640 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x0095a650 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x0095a660 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x0095a670 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x0095a680 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x0095a690 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x0095a6a0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x0095a6b0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x0095a6c0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x0095a6d0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x0095a6e0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x0095a6f0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x0095a700 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x0095a710 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x0095a720 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x0095a730 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x0095a740 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x0095a750 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x0095a760 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x0095a770 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x0095a780 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095a790 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x0095a7a0 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x0095a7b0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x0095a7c0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x0095a7d0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x0095a7e0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x0095a7f0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x0095a800 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x0095a810 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x0095a820 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x0095a830 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x0095a840 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x0095a850 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x0095a860 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x0095a870 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0095a880 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0095a890 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0095a8a0 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x0095a8b0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x0095a8c0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x0095a8d0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x0095a8e0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0095a8f0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0095a900 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0095a910 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x0095a920 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x0095a930 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x0095a940 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x0095a950 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x0095a960 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x0095a970 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x0095a980 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x0095a990 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x0095a9a0 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x0095a9b0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x0095a9c0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x0095a9d0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x0095a9e0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x0095a9f0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0095aa00 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x0095aa10 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x0095aa20 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x0095aa30 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x0095aa40 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x0095aa50 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x0095aa60 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x0095aa70 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x0095aa80 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x0095aa90 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x0095aaa0 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x0095aab0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x0095aac0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x0095aad0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x0095aae0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x0095aaf0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x0095ab00 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x0095ab10 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x0095ab20 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x0095ab30 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x0095ab40 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x0095ab50 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x0095ab60 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x0095ab70 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0095ab80 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x0095ab90 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x0095aba0 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x0095abb0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x0095abc0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x0095abd0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x0095abe0 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x0095abf0 6e203d20 755f7472 616e7366 6f726d20 n = u_transform │ │ │ │ - 0x0095ac00 2a207665 63342861 5f706f73 2c20312e * vec4(a_pos, 1. │ │ │ │ - 0x0095ac10 30293b20 0a202020 20765f69 6e74656e 0); . v_inten │ │ │ │ - 0x0095ac20 73697479 203d2061 5f746578 436f6f72 sity = a_texCoor │ │ │ │ - 0x0095ac30 64732e78 3b200a20 20202067 6c5f506f ds.x; . gl_Po │ │ │ │ - 0x0095ac40 73697469 6f6e203d 20706f73 6974696f sition = positio │ │ │ │ - 0x0095ac50 6e3b200a 20202369 66646566 2056554c n; . #ifdef VUL │ │ │ │ - 0x0095ac60 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ - 0x0095ac70 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ - 0x0095ac80 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ - 0x0095ac90 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ - 0x0095aca0 6c5f506f 73697469 6f6e2e7a 202b2067 l_Position.z + g │ │ │ │ - 0x0095acb0 6c5f506f 73697469 6f6e2e77 29202a20 l_Position.w) * │ │ │ │ - 0x0095acc0 302e353b 200a2020 23656e64 6966200a 0.5; . #endif . │ │ │ │ - 0x0095acd0 20207d20 0a000000 20202023 69666465 } .... #ifde │ │ │ │ - 0x0095ace0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095acf0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095ad00 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095ad10 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095ad20 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095ad30 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095ad40 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095ad50 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095ad60 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095ad70 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095ad80 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095ad90 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095ada0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095adb0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095adc0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095add0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095ade0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095adf0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095ae00 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095ae10 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095ae20 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0095ae30 3b200a20 20696e20 76656333 20615f6e ; . in vec3 a_n │ │ │ │ - 0x0095ae40 6f726d61 6c3b200a 2020696e 20766563 ormal; . in vec │ │ │ │ - 0x0095ae50 3220615f 74657843 6f6f7264 733b200a 2 a_texCoords; . │ │ │ │ - 0x0095ae60 20206f75 74207665 63332076 5f6e6f72 out vec3 v_nor │ │ │ │ - 0x0095ae70 6d616c3b 200a2020 6f757420 76656332 mal; . out vec2 │ │ │ │ - 0x0095ae80 20765f74 6578436f 6f726473 3b200a20 v_texCoords; . │ │ │ │ - 0x0095ae90 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x0095aea0 7472616e 73666f72 6d3b200a 2020756e transform; . un │ │ │ │ - 0x0095aeb0 69666f72 6d206d61 74342075 5f6e6f72 iform mat4 u_nor │ │ │ │ - 0x0095aec0 6d616c54 72616e73 666f726d 3b200a20 malTransform; . │ │ │ │ - 0x0095aed0 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ - 0x0095aee0 636f6c6f 723b200a 2020756e 69666f72 color; . unifor │ │ │ │ - 0x0095aef0 6d207665 63322075 5f746578 436f6f72 m vec2 u_texCoor │ │ │ │ - 0x0095af00 64466c69 7070696e 673b200a 2020636f dFlipping; . co │ │ │ │ - 0x0095af10 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x0095af20 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x0095af30 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x0095af40 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x0095af50 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x0095af60 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x0095af70 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x0095af80 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x0095af90 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x0095afa0 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x0095afb0 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x0095afc0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x0095afd0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0095afe0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x0095aff0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0095b000 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0095b010 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x0095b020 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x0095b030 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0095b040 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x0095b050 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x0095b060 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0095b070 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x0095b080 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x0095b090 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x0095b0a0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0095b0b0 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x0095b0c0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x0095b0d0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x0095b0e0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x0095b0f0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0095b100 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x0095b110 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x0095b120 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x0095b130 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x0095b140 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x0095b150 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0095b160 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x0095b170 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x0095b180 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x0095b190 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x0095b1a0 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x0095b1b0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x0095b1c0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x0095b1d0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x0095b1e0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x0095b1f0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x0095b200 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x0095b210 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x0095b220 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x0095b230 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x0095b240 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x0095b250 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x0095b260 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x0095b270 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x0095b280 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x0095b290 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x0095b2a0 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x0095b2b0 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x0095b2c0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x0095b2d0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x0095b2e0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x0095b2f0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x0095b300 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x0095b310 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x0095b320 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x0095b330 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x0095b340 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x0095b350 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x0095b360 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x0095b370 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x0095b380 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x0095b390 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x0095b3a0 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x0095b3b0 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x0095b3c0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x0095b3d0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x0095b3e0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x0095b3f0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x0095b400 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0095b410 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x0095b420 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x0095b430 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x0095b440 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x0095b450 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x0095b460 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x0095b470 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x0095b480 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0095b490 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x0095b4a0 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ - 0x0095b4b0 63342070 6f736974 696f6e20 3d20755f c4 position = u_ │ │ │ │ - 0x0095b4c0 7472616e 73666f72 6d202a20 76656334 transform * vec4 │ │ │ │ - 0x0095b4d0 28615f70 6f732c20 312e3029 3b200a20 (a_pos, 1.0); . │ │ │ │ - 0x0095b4e0 20202076 5f6e6f72 6d616c20 3d206e6f v_normal = no │ │ │ │ - 0x0095b4f0 726d616c 697a6528 28755f6e 6f726d61 rmalize((u_norma │ │ │ │ - 0x0095b500 6c547261 6e73666f 726d202a 20766563 lTransform * vec │ │ │ │ - 0x0095b510 3428615f 6e6f726d 616c2c20 302e3029 4(a_normal, 0.0) │ │ │ │ - 0x0095b520 292e7879 7a293b20 0a202020 20765f74 ).xyz); . v_t │ │ │ │ - 0x0095b530 6578436f 6f726473 203d206d 69782861 exCoords = mix(a │ │ │ │ - 0x0095b540 5f746578 436f6f72 64732c20 312e3020 _texCoords, 1.0 │ │ │ │ - 0x0095b550 2d20615f 74657843 6f6f7264 732c2075 - a_texCoords, u │ │ │ │ - 0x0095b560 5f746578 436f6f72 64466c69 7070696e _texCoordFlippin │ │ │ │ - 0x0095b570 67293b20 0a202020 20676c5f 506f7369 g); . gl_Posi │ │ │ │ - 0x0095b580 74696f6e 203d2070 6f736974 696f6e3b tion = position; │ │ │ │ - 0x0095b590 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0095b5a0 4e200a20 20202067 6c5f506f 73697469 N . gl_Positi │ │ │ │ - 0x0095b5b0 6f6e2e79 203d202d 676c5f50 6f736974 on.y = -gl_Posit │ │ │ │ - 0x0095b5c0 696f6e2e 793b200a 20202020 676c5f50 ion.y; . gl_P │ │ │ │ - 0x0095b5d0 6f736974 696f6e2e 7a203d20 28676c5f osition.z = (gl_ │ │ │ │ - 0x0095b5e0 506f7369 74696f6e 2e7a202b 20676c5f Position.z + gl_ │ │ │ │ - 0x0095b5f0 506f7369 74696f6e 2e772920 2a20302e Position.w) * 0. │ │ │ │ - 0x0095b600 353b200a 20202365 6e646966 200a2020 5; . #endif . │ │ │ │ - 0x0095b610 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x0095b620 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095b630 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095b640 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095b650 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095b660 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095b670 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095b680 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095b690 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095b6a0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095b6b0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095b6c0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095b6d0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095b6e0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095b6f0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095b700 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095b710 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095b720 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095b730 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095b740 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095b750 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095b760 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0095b770 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0095b780 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ - 0x0095b790 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0095b7a0 78436f6f 7264733b 200a2020 23696664 xCoords; . #ifd │ │ │ │ - 0x0095b7b0 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x0095b7c0 206f7574 204c4f57 5f502076 65633420 out LOW_P vec4 │ │ │ │ - 0x0095b7d0 765f636f 6c6f723b 200a2020 23656c73 v_color; . #els │ │ │ │ - 0x0095b7e0 65200a20 206f7574 20766563 3220765f e . out vec2 v_ │ │ │ │ - 0x0095b7f0 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ - 0x0095b800 0a202023 656e6469 66200a20 206f7574 . #endif . out │ │ │ │ - 0x0095b810 20766563 3320765f 72616469 75733b20 vec3 v_radius; │ │ │ │ - 0x0095b820 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0095b830 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0095b840 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0095b850 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x0095b860 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x0095b870 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x0095b880 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x0095b890 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x0095b8a0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0095b8b0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x0095b8c0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x0095b8d0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x0095b8e0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x0095b8f0 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x0095b900 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x0095b910 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ - 0x0095b920 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x0095b930 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x0095b940 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x0095b950 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ - 0x0095b960 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x0095b970 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x0095b980 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x0095b990 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x0095b9a0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0095b9b0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0095b9c0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0095b9d0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x0095b9e0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0095b9f0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x0095ba00 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x0095ba10 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x0095ba20 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0095ba30 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x0095ba40 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0095ba50 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0095ba60 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0095ba70 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x0095ba80 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0095ba90 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x0095baa0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x0095bab0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0095bac0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x0095bad0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x0095bae0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x0095baf0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0095bb00 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x0095bb10 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x0095bb20 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095bb30 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0095bb40 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0095bb50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0095bb60 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x0095bb70 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0095bb80 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x0095bb90 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x0095bba0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x0095bbb0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x0095bbc0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x0095bbd0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x0095bbe0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x0095bbf0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x0095bc00 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x0095bc10 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x0095bc20 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x0095bc30 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0095bc40 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x0095bc50 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x0095bc60 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0095bc70 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x0095bc80 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x0095bc90 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x0095bca0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0095bcb0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x0095bcc0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x0095bcd0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x0095bce0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x0095bcf0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x0095bd00 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x0095bd10 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x0095bd20 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x0095bd30 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x0095bd40 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x0095bd50 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x0095bd60 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x0095bd70 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0095bd80 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x0095bd90 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x0095bda0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x0095bdb0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x0095bdc0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x0095bdd0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x0095bde0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x0095bdf0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x0095be00 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x0095be10 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x0095be20 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x0095be30 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x0095be40 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x0095be50 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0095be60 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x0095be70 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x0095be80 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x0095be90 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x0095bea0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x0095beb0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x0095bec0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x0095bed0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0095bee0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x0095bef0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0095bf00 2070203d 20766563 3428615f 706f7369 p = vec4(a_posi │ │ │ │ - 0x0095bf10 74696f6e 2c203129 202a2075 5f6d6f64 tion, 1) * u_mod │ │ │ │ - 0x0095bf20 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ - 0x0095bf30 3420706f 73203d20 76656334 28615f6e 4 pos = vec4(a_n │ │ │ │ - 0x0095bf40 6f726d61 6c2e7879 2c20302c 20302920 ormal.xy, 0, 0) │ │ │ │ - 0x0095bf50 2b20703b 200a2020 2020676c 5f506f73 + p; . gl_Pos │ │ │ │ - 0x0095bf60 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ - 0x0095bf70 6f745472 616e7366 6f726d28 706f7320 otTransform(pos │ │ │ │ - 0x0095bf80 2a20755f 70726f6a 65637469 6f6e2c20 * u_projection, │ │ │ │ - 0x0095bf90 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ - 0x0095bfa0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x0095bfb0 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x0095bfc0 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ - 0x0095bfd0 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ - 0x0095bfe0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x0095bff0 293b200a 20202365 6c736520 0a202020 ); . #else . │ │ │ │ - 0x0095c000 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ - 0x0095c010 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ - 0x0095c020 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ - 0x0095c030 0a202020 20765f72 61646975 73203d20 . v_radius = │ │ │ │ - 0x0095c040 615f6e6f 726d616c 3b200a20 207d200a a_normal; . } . │ │ │ │ - 0x0095c050 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ - 0x0095c060 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095c070 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095c080 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095c090 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095c0a0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095c0b0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095c0c0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095c0d0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095c0e0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095c0f0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095c100 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095c110 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095c120 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095c130 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095c140 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095c150 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095c160 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095c170 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095c180 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095c190 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095c1a0 0a202069 6e207665 63332061 5f6e6f72 . in vec3 a_nor │ │ │ │ - 0x0095c1b0 6d616c3b 200a2020 696e2076 65633320 mal; . in vec3 │ │ │ │ - 0x0095c1c0 615f706f 73697469 6f6e3b20 0a202069 a_position; . i │ │ │ │ - 0x0095c1d0 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ - 0x0095c1e0 0a20206f 75742076 65633320 765f7261 . out vec3 v_ra │ │ │ │ - 0x0095c1f0 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ - 0x0095c200 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ - 0x0095c210 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ - 0x0095c220 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ - 0x0095c230 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ - 0x0095c240 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x0095c250 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ - 0x0095c260 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ - 0x0095c270 726d2076 65633220 755f636f 6e747261 rm vec2 u_contra │ │ │ │ - 0x0095c280 73744761 6d6d613b 200a2020 756e6966 stGamma; . unif │ │ │ │ - 0x0095c290 6f726d20 666c6f61 7420755f 6f706163 orm float u_opac │ │ │ │ - 0x0095c2a0 6974793b 200a2020 756e6966 6f726d20 ity; . uniform │ │ │ │ - 0x0095c2b0 666c6f61 7420755f 7a536361 6c653b20 float u_zScale; │ │ │ │ - 0x0095c2c0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x0095c2d0 20755f69 6e746572 706f6c61 74696f6e u_interpolation │ │ │ │ - 0x0095c2e0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0095c2f0 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ - 0x0095c300 73733b20 0a202063 6f6e7374 20666c6f ss; . const flo │ │ │ │ - 0x0095c310 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ - 0x0095c320 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ - 0x0095c330 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ - 0x0095c340 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x0095c350 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x0095c360 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x0095c370 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ - 0x0095c380 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ - 0x0095c390 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x0095c3a0 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ - 0x0095c3b0 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ - 0x0095c3c0 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ - 0x0095c3d0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095c3e0 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ - 0x0095c3f0 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ - 0x0095c400 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0095c410 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ - 0x0095c420 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ - 0x0095c430 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ - 0x0095c440 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x0095c450 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ - 0x0095c460 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x0095c470 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095c480 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ - 0x0095c490 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ - 0x0095c4a0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095c4b0 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ - 0x0095c4c0 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ - 0x0095c4d0 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ - 0x0095c4e0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x0095c4f0 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ - 0x0095c500 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ - 0x0095c510 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ - 0x0095c520 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ - 0x0095c530 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x0095c540 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x0095c550 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x0095c560 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ - 0x0095c570 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ - 0x0095c580 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ - 0x0095c590 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ - 0x0095c5a0 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ - 0x0095c5b0 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ - 0x0095c5c0 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x0095c5d0 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ - 0x0095c5e0 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ - 0x0095c5f0 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ - 0x0095c600 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ - 0x0095c610 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ - 0x0095c620 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ - 0x0095c630 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ - 0x0095c640 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ - 0x0095c650 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095c660 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ - 0x0095c670 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ - 0x0095c680 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ - 0x0095c690 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ - 0x0095c6a0 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ - 0x0095c6b0 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ - 0x0095c6c0 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ - 0x0095c6d0 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ - 0x0095c6e0 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ - 0x0095c6f0 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ - 0x0095c700 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ - 0x0095c710 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x0095c720 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ - 0x0095c730 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ - 0x0095c740 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ - 0x0095c750 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ - 0x0095c760 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ - 0x0095c770 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ - 0x0095c780 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ - 0x0095c790 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ - 0x0095c7a0 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ - 0x0095c7b0 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ - 0x0095c7c0 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ - 0x0095c7d0 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ - 0x0095c7e0 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ - 0x0095c7f0 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ - 0x0095c800 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ - 0x0095c810 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ - 0x0095c820 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ - 0x0095c830 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x0095c840 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ - 0x0095c850 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ - 0x0095c860 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ - 0x0095c870 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x0095c880 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ - 0x0095c890 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ - 0x0095c8a0 7b200a20 20202076 65633320 72616469 { . vec3 radi │ │ │ │ - 0x0095c8b0 7573203d 20615f6e 6f726d61 6c202a20 us = a_normal * │ │ │ │ - 0x0095c8c0 615f706f 73697469 6f6e2e7a 3b200a20 a_position.z; . │ │ │ │ - 0x0095c8d0 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x0095c8e0 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x0095c8f0 2c20302c 20312920 2a20755f 6d6f6465 , 0, 1) * u_mode │ │ │ │ - 0x0095c900 6c566965 773b200a 20202020 76656334 lView; . vec4 │ │ │ │ - 0x0095c910 20736869 66746564 506f7320 3d207665 shiftedPos = ve │ │ │ │ - 0x0095c920 63342872 61646975 732e7879 2c20302c c4(radius.xy, 0, │ │ │ │ - 0x0095c930 20302920 2b20706f 733b200a 20202020 0) + pos; . │ │ │ │ - 0x0095c940 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ - 0x0095c950 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x0095c960 6d287368 69667465 64506f73 202a2075 m(shiftedPos * u │ │ │ │ - 0x0095c970 5f70726f 6a656374 696f6e2c 20755f70 _projection, u_p │ │ │ │ - 0x0095c980 69766f74 5472616e 73666f72 6d2c2030 ivotTransform, 0 │ │ │ │ - 0x0095c990 2e30293b 200a2020 2020765f 72616469 .0); . v_radi │ │ │ │ - 0x0095c9a0 7573203d 20726164 6975733b 200a2020 us = radius; . │ │ │ │ - 0x0095c9b0 2020765f 636f6c6f 72203d20 615f636f v_color = a_co │ │ │ │ - 0x0095c9c0 6c6f723b 200a2020 7d200a00 00000000 lor; . } ...... │ │ │ │ - 0x0095c9d0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0095c9e0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0095c9f0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0095ca00 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0095ca10 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0095ca20 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0095ca30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095ca40 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0095ca50 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0095ca60 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0095ca70 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0095ca80 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0095ca90 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0095caa0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0095cab0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0095cac0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0095cad0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0095cae0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0095caf0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0095cb00 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0095cb10 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0095cb20 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0095cb30 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x0095cb40 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x0095cb50 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x0095cb60 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ - 0x0095cb70 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ - 0x0095cb80 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ - 0x0095cb90 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ - 0x0095cba0 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ - 0x0095cbb0 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ - 0x0095cbc0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x0095cbd0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ - 0x0095cbe0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x0095cbf0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x0095cc00 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x0095cc10 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x0095cc20 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x0095cc30 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x0095cc40 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x0095cc50 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x0095cc60 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x0095cc70 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0095cc80 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x0095cc90 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0095cca0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x0095ccb0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x0095ccc0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x0095ccd0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x0095cce0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x0095ccf0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x0095cd00 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x0095cd10 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x0095cd20 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x0095cd30 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x0095cd40 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x0095cd50 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x0095cd60 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x0095cd70 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x0095cd80 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x0095cd90 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x0095cda0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x0095cdb0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x0095cdc0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x0095cdd0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x0095cde0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x0095cdf0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x0095ce00 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x0095ce10 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x0095ce20 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x0095ce30 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x0095ce40 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x0095ce50 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095ce60 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x0095ce70 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x0095ce80 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x0095ce90 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x0095cea0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x0095ceb0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x0095cec0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x0095ced0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x0095cee0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x0095cef0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x0095cf00 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x0095cf10 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x0095cf20 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x0095cf30 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x0095cf40 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0095cf50 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0095cf60 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0095cf70 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x0095cf80 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x0095cf90 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x0095cfa0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x0095cfb0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0095cfc0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0095cfd0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0095cfe0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x0095cff0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x0095d000 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x0095d010 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x0095d020 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x0095d030 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x0095d040 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x0095d050 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x0095d060 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x0095d070 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x0095d080 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x0095d090 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x0095d0a0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x0095d0b0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x0095d0c0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0095d0d0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x0095d0e0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x0095d0f0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x0095d100 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x0095d110 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x0095d120 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x0095d130 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x0095d140 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x0095d150 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x0095d160 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x0095d170 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x0095d180 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x0095d190 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x0095d1a0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x0095d1b0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x0095d1c0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x0095d1d0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x0095d1e0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x0095d1f0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x0095d200 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x0095d210 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x0095d220 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x0095d230 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x0095d240 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0095d250 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x0095d260 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x0095d270 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x0095d280 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x0095d290 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x0095d2a0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x0095d2b0 20202020 76656334 2070203d 20766563 vec4 p = vec │ │ │ │ - 0x0095d2c0 3428615f 706f7369 74696f6e 2c203129 4(a_position, 1) │ │ │ │ - 0x0095d2d0 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x0095d2e0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x0095d2f0 76656334 28615f6e 6f726d61 6c2e7879 vec4(a_normal.xy │ │ │ │ - 0x0095d300 202b2061 5f636f6c 6f725465 78436f6f + a_colorTexCoo │ │ │ │ - 0x0095d310 7264732e 7a772c20 302c2030 29202b20 rds.zw, 0, 0) + │ │ │ │ - 0x0095d320 703b200a 20202020 676c5f50 6f736974 p; . gl_Posit │ │ │ │ - 0x0095d330 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ - 0x0095d340 5472616e 73666f72 6d28706f 73202a20 Transform(pos * │ │ │ │ - 0x0095d350 755f7072 6f6a6563 74696f6e 2c20755f u_projection, u_ │ │ │ │ - 0x0095d360 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0095d370 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x0095d380 454e4142 4c455f56 5446200a 20202020 ENABLE_VTF . │ │ │ │ - 0x0095d390 765f636f 6c6f7220 3d207465 78747572 v_color = textur │ │ │ │ - 0x0095d3a0 6528755f 636f6c6f 72546578 2c20615f e(u_colorTex, a_ │ │ │ │ - 0x0095d3b0 636f6c6f 72546578 436f6f72 64732e78 colorTexCoords.x │ │ │ │ - 0x0095d3c0 79293b20 0a202023 656c7365 200a2020 y); . #else . │ │ │ │ - 0x0095d3d0 2020765f 636f6c6f 72546578 436f6f72 v_colorTexCoor │ │ │ │ - 0x0095d3e0 6473203d 20615f63 6f6c6f72 54657843 ds = a_colorTexC │ │ │ │ - 0x0095d3f0 6f6f7264 732e7879 3b200a20 2023656e oords.xy; . #en │ │ │ │ - 0x0095d400 64696620 0a202020 20765f6e 6f726d61 dif . v_norma │ │ │ │ - 0x0095d410 6c203d20 615f6e6f 726d616c 3b200a20 l = a_normal; . │ │ │ │ - 0x0095d420 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ - 0x0095d430 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095d440 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095d450 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095d460 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095d470 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095d480 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095d490 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095d4a0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095d4b0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095d4c0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095d4d0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095d4e0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095d4f0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095d500 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095d510 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095d520 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095d530 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095d540 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095d550 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095d560 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095d570 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0095d580 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0095d590 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x0095d5a0 6e207665 63342061 5f636f6c 6f725465 n vec4 a_colorTe │ │ │ │ - 0x0095d5b0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x0095d5c0 76656334 20765f6e 6f726d61 6c3b200a vec4 v_normal; . │ │ │ │ - 0x0095d5d0 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ - 0x0095d5e0 56544620 0a20206f 7574204c 4f575f50 VTF . out LOW_P │ │ │ │ - 0x0095d5f0 20766563 3420765f 636f6c6f 723b200a vec4 v_color; . │ │ │ │ - 0x0095d600 20202365 6c736520 0a20206f 75742076 #else . out v │ │ │ │ - 0x0095d610 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ - 0x0095d620 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ - 0x0095d630 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x0095d640 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0095d650 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0095d660 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x0095d670 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x0095d680 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x0095d690 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x0095d6a0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x0095d6b0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0095d6c0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ - 0x0095d6d0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x0095d6e0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x0095d6f0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ - 0x0095d700 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ - 0x0095d710 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ - 0x0095d720 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ - 0x0095d730 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x0095d740 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ - 0x0095d750 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ - 0x0095d760 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ - 0x0095d770 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ - 0x0095d780 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ - 0x0095d790 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ - 0x0095d7a0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x0095d7b0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x0095d7c0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x0095d7d0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x0095d7e0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ - 0x0095d7f0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0095d800 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ - 0x0095d810 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ - 0x0095d820 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ - 0x0095d830 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0095d840 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ - 0x0095d850 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0095d860 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0095d870 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x0095d880 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ - 0x0095d890 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0095d8a0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ - 0x0095d8b0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ - 0x0095d8c0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0095d8d0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x0095d8e0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ - 0x0095d8f0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ - 0x0095d900 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0095d910 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ - 0x0095d920 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ - 0x0095d930 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095d940 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0095d950 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0095d960 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0095d970 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ - 0x0095d980 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0095d990 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x0095d9a0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x0095d9b0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x0095d9c0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ - 0x0095d9d0 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ - 0x0095d9e0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ - 0x0095d9f0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ - 0x0095da00 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ - 0x0095da10 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x0095da20 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ - 0x0095da30 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ - 0x0095da40 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0095da50 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ - 0x0095da60 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ - 0x0095da70 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0095da80 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ - 0x0095da90 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ - 0x0095daa0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ - 0x0095dab0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0095dac0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ - 0x0095dad0 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ - 0x0095dae0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ - 0x0095daf0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ - 0x0095db00 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ - 0x0095db10 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ - 0x0095db20 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ - 0x0095db30 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ - 0x0095db40 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ - 0x0095db50 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ - 0x0095db60 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ - 0x0095db70 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ - 0x0095db80 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0095db90 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ - 0x0095dba0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ - 0x0095dbb0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ - 0x0095dbc0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ - 0x0095dbd0 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ - 0x0095dbe0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ - 0x0095dbf0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ - 0x0095dc00 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ - 0x0095dc10 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ - 0x0095dc20 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ - 0x0095dc30 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ - 0x0095dc40 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ - 0x0095dc50 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ - 0x0095dc60 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0095dc70 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ - 0x0095dc80 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ - 0x0095dc90 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ - 0x0095dca0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ - 0x0095dcb0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ - 0x0095dcc0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ - 0x0095dcd0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x0095dce0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0095dcf0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ - 0x0095dd00 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0095dd10 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ - 0x0095dd20 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ - 0x0095dd30 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ - 0x0095dd40 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ - 0x0095dd50 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ - 0x0095dd60 616c2e78 79202b20 615f636f 6c6f7254 al.xy + a_colorT │ │ │ │ - 0x0095dd70 6578436f 6f726473 2e7a772c 20302e30 exCoords.zw, 0.0 │ │ │ │ - 0x0095dd80 2c20302e 3029202a 20755f70 726f6a65 , 0.0) * u_proje │ │ │ │ - 0x0095dd90 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ - 0x0095dda0 6f736974 696f6e20 3d206170 706c7942 osition = applyB │ │ │ │ - 0x0095ddb0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x0095ddc0 6e73666f 726d2870 69766f74 202a2075 nsform(pivot * u │ │ │ │ - 0x0095ddd0 5f70726f 6a656374 696f6e2c 20755f70 _projection, u_p │ │ │ │ - 0x0095dde0 69766f74 5472616e 73666f72 6d2c2030 ivotTransform, 0 │ │ │ │ - 0x0095ddf0 2e302c20 6f666673 65742e78 79293b20 .0, offset.xy); │ │ │ │ - 0x0095de00 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x0095de10 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ - 0x0095de20 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ - 0x0095de30 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ - 0x0095de40 6578436f 6f726473 2e787929 3b200a20 exCoords.xy); . │ │ │ │ - 0x0095de50 2023656c 7365200a 20202020 765f636f #else . v_co │ │ │ │ - 0x0095de60 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x0095de70 5f636f6c 6f725465 78436f6f 7264732e _colorTexCoords. │ │ │ │ - 0x0095de80 78793b20 0a202023 656e6469 66200a20 xy; . #endif . │ │ │ │ - 0x0095de90 20202076 5f6e6f72 6d616c20 3d20615f v_normal = a_ │ │ │ │ - 0x0095dea0 6e6f726d 616c3b20 0a20207d 200a0000 normal; . } ... │ │ │ │ - 0x0095deb0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0095dec0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0095ded0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0095dee0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0095def0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0095df00 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0095df10 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095df20 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0095df30 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0095df40 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0095df50 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0095df60 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0095df70 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0095df80 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0095df90 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0095dfa0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0095dfb0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0095dfc0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0095dfd0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0095dfe0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0095dff0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0095e000 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x0095e010 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ - 0x0095e020 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x0095e030 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x0095e040 0a202069 6e207665 63342061 5f6d6173 . in vec4 a_mas │ │ │ │ - 0x0095e050 6b546578 436f6f72 643b200a 20206f75 kTexCoord; . ou │ │ │ │ - 0x0095e060 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ - 0x0095e070 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ - 0x0095e080 65633220 765f6d61 736b5465 78436f6f ec2 v_maskTexCoo │ │ │ │ - 0x0095e090 72643b20 0a202075 6e69666f 726d206d rd; . uniform m │ │ │ │ - 0x0095e0a0 61743420 755f6d6f 64656c56 6965773b at4 u_modelView; │ │ │ │ - 0x0095e0b0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x0095e0c0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x0095e0d0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0095e0e0 5f706976 6f745472 616e7366 6f726d3b _pivotTransform; │ │ │ │ - 0x0095e0f0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x0095e100 20755f63 6f6e7472 61737447 616d6d61 u_contrastGamma │ │ │ │ - 0x0095e110 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0095e120 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ - 0x0095e130 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0095e140 5f7a5363 616c653b 200a2020 756e6966 _zScale; . unif │ │ │ │ - 0x0095e150 6f726d20 666c6f61 7420755f 696e7465 orm float u_inte │ │ │ │ - 0x0095e160 72706f6c 6174696f 6e3b200a 2020756e rpolation; . un │ │ │ │ - 0x0095e170 69666f72 6d20666c 6f617420 755f6973 iform float u_is │ │ │ │ - 0x0095e180 4f75746c 696e6550 6173733b 200a2020 OutlinePass; . │ │ │ │ - 0x0095e190 636f6e73 7420666c 6f617420 6b536861 const float kSha │ │ │ │ - 0x0095e1a0 7065436f 6f726453 63616c61 72203d20 peCoordScalar = │ │ │ │ - 0x0095e1b0 31303030 2e303b20 0a202076 65633420 1000.0; . vec4 │ │ │ │ - 0x0095e1c0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x0095e1d0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x0095e1e0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x0095e1f0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x0095e200 5265616c 5a29200a 20207b20 0a202020 RealZ) . { . │ │ │ │ - 0x0095e210 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x0095e220 64506976 6f74203d 20706976 6f743b20 dPivot = pivot; │ │ │ │ - 0x0095e230 0a202020 20666c6f 61742077 203d2074 . float w = t │ │ │ │ - 0x0095e240 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095e250 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x0095e260 6d656450 69766f74 2e787977 203d2028 medPivot.xyw = ( │ │ │ │ - 0x0095e270 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x0095e280 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x0095e290 64506976 6f742e78 792c2070 69766f74 dPivot.xy, pivot │ │ │ │ - 0x0095e2a0 5265616c 5a2c2077 29292e78 79773b20 RealZ, w)).xyw; │ │ │ │ - 0x0095e2b0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x0095e2c0 5069766f 742e7a20 2a3d2074 72616e73 Pivot.z *= trans │ │ │ │ - 0x0095e2d0 666f726d 65645069 766f742e 77202f20 formedPivot.w / │ │ │ │ - 0x0095e2e0 773b200a 20202369 66646566 2056554c w; . #ifdef VUL │ │ │ │ - 0x0095e2f0 4b414e20 0a202020 20747261 6e73666f KAN . transfo │ │ │ │ - 0x0095e300 726d6564 5069766f 742e7920 3d202d74 rmedPivot.y = -t │ │ │ │ - 0x0095e310 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095e320 793b200a 20202020 7472616e 73666f72 y; . transfor │ │ │ │ - 0x0095e330 6d656450 69766f74 2e7a203d 20287472 medPivot.z = (tr │ │ │ │ - 0x0095e340 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x0095e350 20202b20 7472616e 73666f72 6d656450 + transformedP │ │ │ │ - 0x0095e360 69766f74 2e772920 2f20322e 303b200a ivot.w) / 2.0; . │ │ │ │ - 0x0095e370 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x0095e380 7475726e 20747261 6e73666f 726d6564 turn transformed │ │ │ │ - 0x0095e390 5069766f 743b200a 20207d20 0a202076 Pivot; . } . v │ │ │ │ - 0x0095e3a0 65633420 6170706c 7942696c 6c626f61 ec4 applyBillboa │ │ │ │ - 0x0095e3b0 72645069 766f7454 72616e73 666f726d rdPivotTransform │ │ │ │ - 0x0095e3c0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x0095e3d0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x0095e3e0 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x0095e3f0 6c5a2c20 76656332 206f6666 73657429 lZ, vec2 offset) │ │ │ │ - 0x0095e400 200a2020 7b200a20 20202066 6c6f6174 . { . float │ │ │ │ - 0x0095e410 206c6f67 69635a20 3d207069 766f742e logicZ = pivot. │ │ │ │ - 0x0095e420 7a202f20 7069766f 742e773b 200a2020 z / pivot.w; . │ │ │ │ - 0x0095e430 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x0095e440 65645069 766f7420 3d207069 766f7454 edPivot = pivotT │ │ │ │ - 0x0095e450 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x0095e460 7069766f 742e7879 2c207069 766f7452 pivot.xy, pivotR │ │ │ │ - 0x0095e470 65616c5a 2c207069 766f742e 77293b20 ealZ, pivot.w); │ │ │ │ - 0x0095e480 0a202020 20766563 34207363 616c6520 . vec4 scale │ │ │ │ - 0x0095e490 3d207069 766f7454 72616e73 666f726d = pivotTransform │ │ │ │ - 0x0095e4a0 202a2076 65633428 312e302c 202d312e * vec4(1.0, -1. │ │ │ │ - 0x0095e4b0 302c2030 2e302c20 312e3029 3b200a20 0, 0.0, 1.0); . │ │ │ │ - 0x0095e4c0 20202076 65633420 706f7369 74696f6e vec4 position │ │ │ │ - 0x0095e4d0 203d2076 65633428 7472616e 73666f72 = vec4(transfor │ │ │ │ - 0x0095e4e0 6d656450 69766f74 2e787920 2f207472 medPivot.xy / tr │ │ │ │ - 0x0095e4f0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0095e500 2c206c6f 6769635a 2c20312e 3029202b , logicZ, 1.0) + │ │ │ │ - 0x0095e510 20766563 34286f66 66736574 202f2073 vec4(offset / s │ │ │ │ - 0x0095e520 63616c65 2e77202a 20736361 6c652e78 cale.w * scale.x │ │ │ │ - 0x0095e530 2c20302e 302c2030 2e30293b 200a2020 , 0.0, 0.0); . │ │ │ │ - 0x0095e540 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x0095e550 20202070 6f736974 696f6e2e 79203d20 position.y = │ │ │ │ - 0x0095e560 2d706f73 6974696f 6e2e793b 200a2020 -position.y; . │ │ │ │ - 0x0095e570 2020706f 73697469 6f6e2e7a 203d2028 position.z = ( │ │ │ │ - 0x0095e580 706f7369 74696f6e 2e7a2020 2b20706f position.z + po │ │ │ │ - 0x0095e590 73697469 6f6e2e77 29202f20 322e303b sition.w) / 2.0; │ │ │ │ - 0x0095e5a0 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x0095e5b0 72657475 726e2070 6f736974 696f6e3b return position; │ │ │ │ - 0x0095e5c0 200a2020 7d200a20 20766563 32206361 . } . vec2 ca │ │ │ │ - 0x0095e5d0 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ - 0x0095e5e0 64417869 73506f73 28766563 32206f72 dAxisPos(vec2 or │ │ │ │ - 0x0095e5f0 6967696e 616c4178 6973506f 732c2076 iginalAxisPos, v │ │ │ │ - 0x0095e600 65633220 73686966 74656450 6f732c20 ec2 shiftedPos, │ │ │ │ - 0x0095e610 6d617434 206d6f64 656c5669 65772c20 mat4 modelView, │ │ │ │ - 0x0095e620 666c6f61 74206861 6c665769 64746829 float halfWidth) │ │ │ │ - 0x0095e630 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x0095e640 70203d20 28766563 34287368 69667465 p = (vec4(shifte │ │ │ │ - 0x0095e650 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ - 0x0095e660 2a206d6f 64656c56 69657729 2e78793b * modelView).xy; │ │ │ │ - 0x0095e670 200a2020 20207665 63322064 203d2070 . vec2 d = p │ │ │ │ - 0x0095e680 202d206f 72696769 6e616c41 78697350 - originalAxisP │ │ │ │ - 0x0095e690 6f733b20 0a202020 20696620 28646f74 os; . if (dot │ │ │ │ - 0x0095e6a0 28642c20 64292021 3d20302e 3029200a (d, d) != 0.0) . │ │ │ │ - 0x0095e6b0 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ - 0x0095e6c0 67696e61 6c417869 73506f73 202b206e ginalAxisPos + n │ │ │ │ - 0x0095e6d0 6f726d61 6c697a65 28642920 2a206861 ormalize(d) * ha │ │ │ │ - 0x0095e6e0 6c665769 6474683b 200a2020 2020656c lfWidth; . el │ │ │ │ - 0x0095e6f0 7365200a 20202020 20207265 7475726e se . return │ │ │ │ - 0x0095e700 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0095e710 3b200a20 207d200a 2020766f 6964206d ; . } . void m │ │ │ │ - 0x0095e720 61696e28 29200a20 207b200a 20202020 ain() . { . │ │ │ │ - 0x0095e730 76656332 206e6f72 6d616c20 3d20615f vec2 normal = a_ │ │ │ │ - 0x0095e740 6e6f726d 616c2e78 793b200a 20202020 normal.xy; . │ │ │ │ - 0x0095e750 666c6f61 74206861 6c665769 64746820 float halfWidth │ │ │ │ - 0x0095e760 3d206c65 6e677468 286e6f72 6d616c29 = length(normal) │ │ │ │ - 0x0095e770 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ - 0x0095e780 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x0095e790 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ - 0x0095e7a0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ - 0x0095e7b0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ - 0x0095e7c0 793b200a 20202020 69662028 68616c66 y; . if (half │ │ │ │ - 0x0095e7d0 57696474 6820213d 20302e30 29200a20 Width != 0.0) . │ │ │ │ - 0x0095e7e0 2020207b 200a2020 20202020 7472616e { . tran │ │ │ │ - 0x0095e7f0 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x0095e800 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x0095e810 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ - 0x0095e820 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x0095e830 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ - 0x0095e840 6e6f726d 616c2c20 0a202020 20202020 normal, . │ │ │ │ - 0x0095e850 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0095e860 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0095e870 20202020 20202020 20202020 20202075 u │ │ │ │ - 0x0095e880 5f6d6f64 656c5669 65772c20 68616c66 _modelView, half │ │ │ │ - 0x0095e890 57696474 68293b20 0a202020 207d200a Width); . } . │ │ │ │ - 0x0095e8a0 20202020 666c6f61 7420754f 66667365 float uOffse │ │ │ │ - 0x0095e8b0 74203d20 6d696e28 6c656e67 74682876 t = min(length(v │ │ │ │ - 0x0095e8c0 65633428 6b536861 7065436f 6f726453 ec4(kShapeCoordS │ │ │ │ - 0x0095e8d0 63616c61 722c2030 2c20302c 20302920 calar, 0, 0, 0) │ │ │ │ - 0x0095e8e0 2a20755f 6d6f6465 6c566965 7729202a * u_modelView) * │ │ │ │ - 0x0095e8f0 20615f6d 61736b54 6578436f 6f72642e a_maskTexCoord. │ │ │ │ - 0x0095e900 782c2031 2e30293b 200a2020 2020765f x, 1.0); . v_ │ │ │ │ - 0x0095e910 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ - 0x0095e920 615f636f 6c6f7254 6578436f 6f72643b a_colorTexCoord; │ │ │ │ - 0x0095e930 200a2020 2020765f 6d61736b 54657843 . v_maskTexC │ │ │ │ - 0x0095e940 6f6f7264 203d2076 65633228 615f6d61 oord = vec2(a_ma │ │ │ │ - 0x0095e950 736b5465 78436f6f 72642e79 202b2075 skTexCoord.y + u │ │ │ │ - 0x0095e960 4f666673 6574202a 20615f6d 61736b54 Offset * a_maskT │ │ │ │ - 0x0095e970 6578436f 6f72642e 7a2c2061 5f6d6173 exCoord.z, a_mas │ │ │ │ - 0x0095e980 6b546578 436f6f72 642e7729 3b200a20 kTexCoord.w); . │ │ │ │ - 0x0095e990 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x0095e9a0 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ - 0x0095e9b0 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ - 0x0095e9c0 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ - 0x0095e9d0 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ - 0x0095e9e0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x0095e9f0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x0095ea00 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ - 0x0095ea10 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x0095ea20 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ - 0x0095ea30 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095ea40 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095ea50 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095ea60 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095ea70 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095ea80 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095ea90 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095eaa0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095eab0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095eac0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095ead0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095eae0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095eaf0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095eb00 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095eb10 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095eb20 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095eb30 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095eb40 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095eb50 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095eb60 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095eb70 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0095eb80 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0095eb90 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x0095eba0 64733b20 0a202069 6e207665 63322061 ds; . in vec2 a │ │ │ │ - 0x0095ebb0 5f6d6173 6b546578 436f6f72 64733b20 _maskTexCoords; │ │ │ │ - 0x0095ebc0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ - 0x0095ebd0 5f565446 200a2020 6f757420 4c4f575f _VTF . out LOW_ │ │ │ │ - 0x0095ebe0 50207665 63342076 5f636f6c 6f723b20 P vec4 v_color; │ │ │ │ - 0x0095ebf0 0a202023 656c7365 200a2020 6f757420 . #else . out │ │ │ │ - 0x0095ec00 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x0095ec10 6f6f7264 733b200a 20202365 6e646966 oords; . #endif │ │ │ │ - 0x0095ec20 200a2020 6f757420 76656332 20765f6d . out vec2 v_m │ │ │ │ - 0x0095ec30 61736b54 6578436f 6f726473 3b200a20 askTexCoords; . │ │ │ │ - 0x0095ec40 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x0095ec50 6d6f6465 6c566965 773b200a 2020756e modelView; . un │ │ │ │ - 0x0095ec60 69666f72 6d206d61 74342075 5f70726f iform mat4 u_pro │ │ │ │ - 0x0095ec70 6a656374 696f6e3b 200a2020 756e6966 jection; . unif │ │ │ │ - 0x0095ec80 6f726d20 6d617434 20755f70 69766f74 orm mat4 u_pivot │ │ │ │ - 0x0095ec90 5472616e 73666f72 6d3b200a 2020756e Transform; . un │ │ │ │ - 0x0095eca0 69666f72 6d207665 63322075 5f636f6e iform vec2 u_con │ │ │ │ - 0x0095ecb0 74726173 7447616d 6d613b20 0a202075 trastGamma; . u │ │ │ │ - 0x0095ecc0 6e69666f 726d2066 6c6f6174 20755f6f niform float u_o │ │ │ │ - 0x0095ecd0 70616369 74793b20 0a202075 6e69666f pacity; . unifo │ │ │ │ - 0x0095ece0 726d2066 6c6f6174 20755f7a 5363616c rm float u_zScal │ │ │ │ - 0x0095ecf0 653b200a 2020756e 69666f72 6d20666c e; . uniform fl │ │ │ │ - 0x0095ed00 6f617420 755f696e 74657270 6f6c6174 oat u_interpolat │ │ │ │ - 0x0095ed10 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x0095ed20 666c6f61 7420755f 69734f75 746c696e float u_isOutlin │ │ │ │ - 0x0095ed30 65506173 733b200a 20202369 66646566 ePass; . #ifdef │ │ │ │ - 0x0095ed40 20454e41 424c455f 56544620 0a202075 ENABLE_VTF . u │ │ │ │ - 0x0095ed50 6e69666f 726d2073 616d706c 65723244 niform sampler2D │ │ │ │ - 0x0095ed60 20755f63 6f6c6f72 5465783b 200a2020 u_colorTex; . │ │ │ │ - 0x0095ed70 23656e64 6966200a 2020636f 6e737420 #endif . const │ │ │ │ - 0x0095ed80 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ - 0x0095ed90 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ - 0x0095eda0 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ - 0x0095edb0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x0095edc0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x0095edd0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x0095ede0 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ - 0x0095edf0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x0095ee00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095ee10 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ - 0x0095ee20 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ - 0x0095ee30 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ - 0x0095ee40 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x0095ee50 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ - 0x0095ee60 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x0095ee70 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095ee80 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x0095ee90 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ - 0x0095eea0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0095eeb0 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ - 0x0095eec0 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ - 0x0095eed0 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x0095eee0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0095eef0 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ - 0x0095ef00 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ - 0x0095ef10 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x0095ef20 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ - 0x0095ef30 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ - 0x0095ef40 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x0095ef50 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x0095ef60 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ - 0x0095ef70 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ - 0x0095ef80 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ - 0x0095ef90 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ - 0x0095efa0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x0095efb0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x0095efc0 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x0095efd0 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ - 0x0095efe0 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ - 0x0095eff0 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ - 0x0095f000 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ - 0x0095f010 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ - 0x0095f020 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0095f030 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ - 0x0095f040 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ - 0x0095f050 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x0095f060 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ - 0x0095f070 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ - 0x0095f080 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0095f090 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ - 0x0095f0a0 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ - 0x0095f0b0 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ - 0x0095f0c0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x0095f0d0 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ - 0x0095f0e0 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ - 0x0095f0f0 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ - 0x0095f100 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ - 0x0095f110 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ - 0x0095f120 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ - 0x0095f130 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ - 0x0095f140 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ - 0x0095f150 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ - 0x0095f160 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ - 0x0095f170 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ - 0x0095f180 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x0095f190 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x0095f1a0 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ - 0x0095f1b0 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ - 0x0095f1c0 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x0095f1d0 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ - 0x0095f1e0 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ - 0x0095f1f0 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ - 0x0095f200 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ - 0x0095f210 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ - 0x0095f220 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ - 0x0095f230 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ - 0x0095f240 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ - 0x0095f250 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x0095f260 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ - 0x0095f270 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x0095f280 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ - 0x0095f290 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ - 0x0095f2a0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x0095f2b0 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ - 0x0095f2c0 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ - 0x0095f2d0 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ - 0x0095f2e0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x0095f2f0 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ - 0x0095f300 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ - 0x0095f310 0a20207b 200a2020 20207665 63342070 . { . vec4 p │ │ │ │ - 0x0095f320 6f73203d 20766563 3428615f 706f7369 os = vec4(a_posi │ │ │ │ - 0x0095f330 74696f6e 2c203129 202a2075 5f6d6f64 tion, 1) * u_mod │ │ │ │ - 0x0095f340 656c5669 6577202a 20755f70 726f6a65 elView * u_proje │ │ │ │ - 0x0095f350 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ - 0x0095f360 6f736974 696f6e20 3d206170 706c7950 osition = applyP │ │ │ │ - 0x0095f370 69766f74 5472616e 73666f72 6d28706f ivotTransform(po │ │ │ │ - 0x0095f380 732c2075 5f706976 6f745472 616e7366 s, u_pivotTransf │ │ │ │ - 0x0095f390 6f726d2c 20302e30 293b200a 20202369 orm, 0.0); . #i │ │ │ │ - 0x0095f3a0 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x0095f3b0 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ - 0x0095f3c0 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ - 0x0095f3d0 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ - 0x0095f3e0 72647329 3b200a20 2023656c 7365200a rds); . #else . │ │ │ │ - 0x0095f3f0 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ - 0x0095f400 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ - 0x0095f410 78436f6f 7264733b 200a2020 23656e64 xCoords; . #end │ │ │ │ - 0x0095f420 6966200a 20202020 765f6d61 736b5465 if . v_maskTe │ │ │ │ - 0x0095f430 78436f6f 72647320 3d20615f 6d61736b xCoords = a_mask │ │ │ │ - 0x0095f440 54657843 6f6f7264 733b200a 20207d20 TexCoords; . } │ │ │ │ - 0x0095f450 0a000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ - 0x0095f460 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095f470 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095f480 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095f490 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095f4a0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095f4b0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095f4c0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095f4d0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095f4e0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095f4f0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095f500 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095f510 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095f520 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095f530 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095f540 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095f550 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095f560 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095f570 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095f580 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095f590 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095f5a0 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x0095f5b0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0095f5c0 3220615f 74657843 6f6f7264 733b200a 2 a_texCoords; . │ │ │ │ - 0x0095f5d0 2020696e 20766563 3420615f 636f6c6f in vec4 a_colo │ │ │ │ - 0x0095f5e0 723b200a 20206f75 74207665 63322076 r; . out vec2 v │ │ │ │ - 0x0095f5f0 5f746578 436f6f72 64733b20 0a20206f _texCoords; . o │ │ │ │ - 0x0095f600 75742076 65633420 765f636f 6c6f723b ut vec4 v_color; │ │ │ │ - 0x0095f610 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x0095f620 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x0095f630 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ - 0x0095f640 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ - 0x0095f650 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ - 0x0095f660 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ - 0x0095f670 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0095f680 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0095f690 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0095f6a0 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ - 0x0095f6b0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x0095f6c0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x0095f6d0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ - 0x0095f6e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0095f6f0 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ - 0x0095f700 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ - 0x0095f710 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ - 0x0095f720 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ - 0x0095f730 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ - 0x0095f740 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ - 0x0095f750 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x0095f760 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ - 0x0095f770 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ - 0x0095f780 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ - 0x0095f790 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ - 0x0095f7a0 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ - 0x0095f7b0 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ - 0x0095f7c0 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ - 0x0095f7d0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ - 0x0095f7e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095f7f0 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ - 0x0095f800 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ - 0x0095f810 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x0095f820 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ - 0x0095f830 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ - 0x0095f840 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ - 0x0095f850 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ - 0x0095f860 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x0095f870 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x0095f880 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x0095f890 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ - 0x0095f8a0 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ - 0x0095f8b0 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ - 0x0095f8c0 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ - 0x0095f8d0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x0095f8e0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x0095f8f0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0095f900 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ - 0x0095f910 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ - 0x0095f920 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ - 0x0095f930 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ - 0x0095f940 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ - 0x0095f950 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ - 0x0095f960 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x0095f970 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ - 0x0095f980 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ - 0x0095f990 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0095f9a0 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ - 0x0095f9b0 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ - 0x0095f9c0 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ - 0x0095f9d0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ - 0x0095f9e0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0095f9f0 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ - 0x0095fa00 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ - 0x0095fa10 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ - 0x0095fa20 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ - 0x0095fa30 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ - 0x0095fa40 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x0095fa50 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ - 0x0095fa60 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ - 0x0095fa70 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x0095fa80 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ - 0x0095fa90 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ - 0x0095faa0 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ - 0x0095fab0 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ - 0x0095fac0 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ - 0x0095fad0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ - 0x0095fae0 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ - 0x0095faf0 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ - 0x0095fb00 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ - 0x0095fb10 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ - 0x0095fb20 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ - 0x0095fb30 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ - 0x0095fb40 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ - 0x0095fb50 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x0095fb60 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ - 0x0095fb70 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ - 0x0095fb80 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ - 0x0095fb90 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ - 0x0095fba0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x0095fbb0 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ - 0x0095fbc0 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ - 0x0095fbd0 2020765f 74657843 6f6f7264 73203d20 v_texCoords = │ │ │ │ - 0x0095fbe0 615f7465 78436f6f 7264733b 200a2020 a_texCoords; . │ │ │ │ - 0x0095fbf0 2020765f 636f6c6f 72203d20 615f636f v_color = a_co │ │ │ │ - 0x0095fc00 6c6f723b 200a2020 2020676c 5f506f73 lor; . gl_Pos │ │ │ │ - 0x0095fc10 6974696f 6e203d20 76656334 28615f70 ition = vec4(a_p │ │ │ │ - 0x0095fc20 6f736974 696f6e2c 20302c20 3129202a osition, 0, 1) * │ │ │ │ - 0x0095fc30 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x0095fc40 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0095fc50 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x0095fc60 2e79203d 202d676c 5f506f73 6974696f .y = -gl_Positio │ │ │ │ - 0x0095fc70 6e2e793b 200a2020 2020676c 5f506f73 n.y; . gl_Pos │ │ │ │ - 0x0095fc80 6974696f 6e2e7a20 3d202867 6c5f506f ition.z = (gl_Po │ │ │ │ - 0x0095fc90 73697469 6f6e2e7a 20202b20 676c5f50 sition.z + gl_P │ │ │ │ - 0x0095fca0 6f736974 696f6e2e 7729202a 20302e35 osition.w) * 0.5 │ │ │ │ - 0x0095fcb0 3b200a20 2023656e 64696620 0a20207d ; . #endif . } │ │ │ │ - 0x0095fcc0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x0095fcd0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0095fce0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0095fcf0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0095fd00 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0095fd10 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0095fd20 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0095fd30 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0095fd40 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0095fd50 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0095fd60 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0095fd70 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0095fd80 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0095fd90 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0095fda0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0095fdb0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0095fdc0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0095fdd0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0095fde0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0095fdf0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0095fe00 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0095fe10 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0095fe20 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0095fe30 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ - 0x0095fe40 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x0095fe50 78436f6f 72643b20 0a202023 69666465 xCoord; . #ifde │ │ │ │ - 0x0095fe60 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x0095fe70 6f757420 4c4f575f 50207665 63342076 out LOW_P vec4 v │ │ │ │ - 0x0095fe80 5f636f6c 6f723b20 0a202023 656c7365 _color; . #else │ │ │ │ - 0x0095fe90 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x0095fea0 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x0095feb0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ - 0x0095fec0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x0095fed0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x0095fee0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x0095fef0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x0095ff00 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x0095ff10 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x0095ff20 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x0095ff30 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x0095ff40 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x0095ff50 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0095ff60 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x0095ff70 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0095ff80 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x0095ff90 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x0095ffa0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x0095ffb0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ - 0x0095ffc0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ - 0x0095ffd0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x0095ffe0 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ - 0x0095fff0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00960000 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00960010 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00960020 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00960030 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00960040 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00960050 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00960060 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00960070 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00960080 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00960090 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x009600a0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x009600b0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x009600c0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x009600d0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x009600e0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x009600f0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00960100 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00960110 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00960120 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00960130 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00960140 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00960150 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00960160 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00960170 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00960180 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00960190 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x009601a0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x009601b0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x009601c0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x009601d0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x009601e0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x009601f0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00960200 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00960210 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00960220 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00960230 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00960240 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00960250 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00960260 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00960270 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00960280 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00960290 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x009602a0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x009602b0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x009602c0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x009602d0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x009602e0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x009602f0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00960300 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00960310 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00960320 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00960330 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00960340 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00960350 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00960360 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00960370 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00960380 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00960390 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x009603a0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x009603b0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x009603c0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x009603d0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x009603e0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x009603f0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00960400 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00960410 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00960420 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00960430 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00960440 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00960450 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00960460 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00960470 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00960480 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00960490 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x009604a0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x009604b0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x009604c0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x009604d0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x009604e0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x009604f0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00960500 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00960510 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00960520 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00960530 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00960540 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00960550 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00960560 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00960570 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00960580 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00960590 20202020 76656332 206e6f72 6d616c20 vec2 normal │ │ │ │ - 0x009605a0 3d20615f 6e6f726d 616c2e78 793b200a = a_normal.xy; . │ │ │ │ - 0x009605b0 20202020 666c6f61 74206861 6c665769 float halfWi │ │ │ │ - 0x009605c0 64746820 3d206c65 6e677468 286e6f72 dth = length(nor │ │ │ │ - 0x009605d0 6d616c29 3b200a20 20202076 65633220 mal); . vec2 │ │ │ │ - 0x009605e0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ - 0x009605f0 6f73203d 20287665 63342861 5f706f73 os = (vec4(a_pos │ │ │ │ - 0x00960600 6974696f 6e2e7879 2c20302e 302c2031 ition.xy, 0.0, 1 │ │ │ │ - 0x00960610 2e302920 2a20755f 6d6f6465 6c566965 .0) * u_modelVie │ │ │ │ - 0x00960620 77292e78 793b200a 20202020 69662028 w).xy; . if ( │ │ │ │ - 0x00960630 68616c66 57696474 6820213d 20302e30 halfWidth != 0.0 │ │ │ │ - 0x00960640 29200a20 2020207b 200a2020 20202020 ) . { . │ │ │ │ - 0x00960650 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ - 0x00960660 6f73203d 2063616c 634c696e 65547261 os = calcLineTra │ │ │ │ - 0x00960670 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ - 0x00960680 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ - 0x00960690 6f732c20 615f706f 73697469 6f6e2e78 os, a_position.x │ │ │ │ - 0x009606a0 79202b20 6e6f726d 616c2c20 0a202020 y + normal, . │ │ │ │ - 0x009606b0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009606c0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009606d0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x009606e0 20202075 5f6d6f64 656c5669 65772c20 u_modelView, │ │ │ │ - 0x009606f0 68616c66 57696474 68293b20 0a202020 halfWidth); . │ │ │ │ - 0x00960700 207d200a 20202369 66646566 20454e41 } . #ifdef ENA │ │ │ │ - 0x00960710 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ - 0x00960720 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ - 0x00960730 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ - 0x00960740 6f725465 78436f6f 7264293b 200a2020 orTexCoord); . │ │ │ │ - 0x00960750 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ - 0x00960760 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ - 0x00960770 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x00960780 2023656e 64696620 0a202020 20766563 #endif . vec │ │ │ │ - 0x00960790 3420706f 73203d20 76656334 28747261 4 pos = vec4(tra │ │ │ │ - 0x009607a0 6e73666f 726d6564 41786973 506f732c nsformedAxisPos, │ │ │ │ - 0x009607b0 20615f70 6f736974 696f6e2e 7a2c2031 a_position.z, 1 │ │ │ │ - 0x009607c0 2e302920 2a20755f 70726f6a 65637469 .0) * u_projecti │ │ │ │ - 0x009607d0 6f6e3b20 0a202020 20676c5f 506f7369 on; . gl_Posi │ │ │ │ - 0x009607e0 74696f6e 203d2061 70706c79 5069766f tion = applyPivo │ │ │ │ - 0x009607f0 74547261 6e73666f 726d2870 6f732c20 tTransform(pos, │ │ │ │ - 0x00960800 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ - 0x00960810 2c20302e 30293b20 0a20207d 200a0000 , 0.0); . } ... │ │ │ │ - 0x00960820 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00960830 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00960840 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00960850 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00960860 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00960870 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00960880 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00960890 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x009608a0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x009608b0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x009608c0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x009608d0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x009608e0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x009608f0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00960900 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00960910 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00960920 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00960930 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00960940 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00960950 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00960960 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00960970 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00960980 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00960990 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x009609a0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x009609b0 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ - 0x009609c0 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ - 0x009609d0 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ - 0x009609e0 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ - 0x009609f0 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x00960a00 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x00960a10 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00960a20 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00960a30 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00960a40 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00960a50 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00960a60 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00960a70 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00960a80 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00960a90 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00960aa0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00960ab0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00960ac0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00960ad0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00960ae0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00960af0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00960b00 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00960b10 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00960b20 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00960b30 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00960b40 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00960b50 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00960b60 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00960b70 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00960b80 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00960b90 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00960ba0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00960bb0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00960bc0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00960bd0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00960be0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00960bf0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00960c00 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00960c10 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00960c20 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00960c30 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00960c40 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00960c50 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00960c60 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00960c70 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00960c80 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00960c90 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00960ca0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00960cb0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00960cc0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00960cd0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00960ce0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00960cf0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00960d00 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00960d10 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00960d20 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00960d30 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00960d40 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00960d50 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00960d60 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00960d70 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00960d80 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00960d90 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00960da0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00960db0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00960dc0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00960dd0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00960de0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00960df0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x00960e00 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00960e10 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00960e20 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00960e30 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00960e40 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00960e50 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00960e60 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00960e70 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00960e80 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00960e90 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00960ea0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00960eb0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00960ec0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00960ed0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00960ee0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00960ef0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x00960f00 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00960f10 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00960f20 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00960f30 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00960f40 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00960f50 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00960f60 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00960f70 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00960f80 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00960f90 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00960fa0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00960fb0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00960fc0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00960fd0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00960fe0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00960ff0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00961000 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00961010 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00961020 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00961030 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00961040 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00961050 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00961060 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00961070 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00961080 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00961090 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x009610a0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ - 0x009610b0 65633428 615f706f 73697469 6f6e2e78 ec4(a_position.x │ │ │ │ - 0x009610c0 797a2c20 3129202a 20755f6d 6f64656c yz, 1) * u_model │ │ │ │ - 0x009610d0 56696577 3b200a20 20202076 65633420 View; . vec4 │ │ │ │ - 0x009610e0 73686966 74656450 6f73203d 20766563 shiftedPos = vec │ │ │ │ - 0x009610f0 3428615f 6e6f726d 616c2c20 302c2030 4(a_normal, 0, 0 │ │ │ │ - 0x00961100 29202b20 706f733b 200a2020 2020676c ) + pos; . gl │ │ │ │ - 0x00961110 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ - 0x00961120 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00961130 73686966 74656450 6f73202a 20755f70 shiftedPos * u_p │ │ │ │ - 0x00961140 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ - 0x00961150 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ - 0x00961160 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ - 0x00961170 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ - 0x00961180 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00961190 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ - 0x009611a0 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ - 0x009611b0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ - 0x009611c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009611d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009611e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009611f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00961200 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00961210 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00961220 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00961230 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00961240 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00961250 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00961260 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00961270 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00961280 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00961290 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x009612a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009612b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009612c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009612d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009612e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009612f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00961300 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00961310 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00961320 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00961330 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00961340 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00961350 200a2020 696e2076 65633220 615f6d61 . in vec2 a_ma │ │ │ │ - 0x00961360 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ - 0x00961370 6f757420 76656332 20765f63 6f6c6f72 out vec2 v_color │ │ │ │ - 0x00961380 54657843 6f6f7264 733b200a 20206f75 TexCoords; . ou │ │ │ │ - 0x00961390 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x009613a0 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x009613b0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x009613c0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x009613d0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x009613e0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x009613f0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00961400 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00961410 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x00961420 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x00961430 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ - 0x00961440 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x00961450 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ - 0x00961460 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00961470 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ - 0x00961480 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00961490 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x009614a0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x009614b0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x009614c0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x009614d0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x009614e0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x009614f0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00961500 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00961510 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00961520 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00961530 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00961540 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00961550 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00961560 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00961570 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00961580 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00961590 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x009615a0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x009615b0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x009615c0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x009615d0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x009615e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009615f0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00961600 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00961610 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00961620 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00961630 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00961640 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00961650 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00961660 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00961670 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00961680 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00961690 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x009616a0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x009616b0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x009616c0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x009616d0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x009616e0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x009616f0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00961700 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00961710 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00961720 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00961730 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00961740 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00961750 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00961760 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00961770 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00961780 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00961790 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x009617a0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x009617b0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x009617c0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x009617d0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x009617e0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x009617f0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00961800 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00961810 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00961820 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00961830 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00961840 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00961850 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00961860 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00961870 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00961880 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00961890 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x009618a0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x009618b0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x009618c0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x009618d0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x009618e0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x009618f0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00961900 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00961910 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00961920 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00961930 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00961940 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00961950 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00961960 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00961970 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00961980 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00961990 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x009619a0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x009619b0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x009619c0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x009619d0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x009619e0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x009619f0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00961a00 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00961a10 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x00961a20 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x00961a30 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x00961a40 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ - 0x00961a50 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ - 0x00961a60 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ - 0x00961a70 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x00961a80 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ - 0x00961a90 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ - 0x00961aa0 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ - 0x00961ab0 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ - 0x00961ac0 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ - 0x00961ad0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x00961ae0 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ - 0x00961af0 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x00961b00 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ - 0x00961b10 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00961b20 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00961b30 20202020 20202020 20202020 2020615f a_ │ │ │ │ - 0x00961b40 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ - 0x00961b50 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ - 0x00961b60 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ - 0x00961b70 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ - 0x00961b80 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00961b90 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ - 0x00961ba0 73203d20 615f6d61 736b5465 78436f6f s = a_maskTexCoo │ │ │ │ - 0x00961bb0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ - 0x00961bc0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00961bd0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00961be0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00961bf0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00961c00 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00961c10 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00961c20 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00961c30 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00961c40 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00961c50 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00961c60 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00961c70 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00961c80 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00961c90 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00961ca0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00961cb0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00961cc0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00961cd0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00961ce0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00961cf0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00961d00 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00961d10 63322061 5f6e6f72 6d616c3b 200a2020 c2 a_normal; . │ │ │ │ - 0x00961d20 696e2076 65633220 615f636f 6c6f7254 in vec2 a_colorT │ │ │ │ - 0x00961d30 6578436f 6f726473 3b200a20 206f7574 exCoords; . out │ │ │ │ - 0x00961d40 20766563 3220765f 636f6c6f 72546578 vec2 v_colorTex │ │ │ │ - 0x00961d50 436f6f72 64733b20 0a202075 6e69666f Coords; . unifo │ │ │ │ - 0x00961d60 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00961d70 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00961d80 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00961d90 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00961da0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00961db0 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00961dc0 76656334 20755f70 6f736974 696f6e3b vec4 u_position; │ │ │ │ - 0x00961dd0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x00961de0 20755f6c 696e6550 6172616d 733b200a u_lineParams; . │ │ │ │ - 0x00961df0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00961e00 755f6163 63757261 63793b20 0a202075 u_accuracy; . u │ │ │ │ - 0x00961e10 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ - 0x00961e20 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ - 0x00961e30 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00961e40 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ - 0x00961e50 6f617420 755f617a 696d7574 3b200a20 oat u_azimut; . │ │ │ │ - 0x00961e60 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ - 0x00961e70 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ - 0x00961e80 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ - 0x00961e90 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x00961ea0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00961eb0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00961ec0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00961ed0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ - 0x00961ee0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ - 0x00961ef0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ - 0x00961f00 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ - 0x00961f10 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00961f20 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ - 0x00961f30 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ - 0x00961f40 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ - 0x00961f50 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ - 0x00961f60 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ - 0x00961f70 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ - 0x00961f80 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00961f90 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ - 0x00961fa0 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ - 0x00961fb0 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ - 0x00961fc0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ - 0x00961fd0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ - 0x00961fe0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00961ff0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ - 0x00962000 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ - 0x00962010 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00962020 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ - 0x00962030 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ - 0x00962040 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00962050 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ - 0x00962060 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ - 0x00962070 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ - 0x00962080 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ - 0x00962090 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x009620a0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x009620b0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x009620c0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ - 0x009620d0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ - 0x009620e0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ - 0x009620f0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ - 0x00962100 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x00962110 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x00962120 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00962130 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ - 0x00962140 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ - 0x00962150 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ - 0x00962160 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00962170 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ - 0x00962180 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ - 0x00962190 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ - 0x009621a0 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ - 0x009621b0 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ - 0x009621c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009621d0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ - 0x009621e0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ - 0x009621f0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ - 0x00962200 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ - 0x00962210 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00962220 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ - 0x00962230 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ - 0x00962240 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ - 0x00962250 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ - 0x00962260 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ - 0x00962270 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00962280 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ - 0x00962290 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ - 0x009622a0 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ - 0x009622b0 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ - 0x009622c0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ - 0x009622d0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ - 0x009622e0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ - 0x009622f0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ - 0x00962300 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00962310 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ - 0x00962320 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ - 0x00962330 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ - 0x00962340 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ - 0x00962350 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ - 0x00962360 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ - 0x00962370 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ - 0x00962380 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00962390 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ - 0x009623a0 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ - 0x009623b0 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ - 0x009623c0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ - 0x009623d0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x009623e0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ - 0x009623f0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ - 0x00962400 20666c6f 61742073 696e5620 3d207369 float sinV = si │ │ │ │ - 0x00962410 6e28755f 617a696d 7574293b 200a2020 n(u_azimut); . │ │ │ │ - 0x00962420 2020666c 6f617420 636f7356 203d2063 float cosV = c │ │ │ │ - 0x00962430 6f732875 5f617a69 6d757429 3b200a20 os(u_azimut); . │ │ │ │ - 0x00962440 2020206d 61743420 726f7461 74696f6e mat4 rotation │ │ │ │ - 0x00962450 3b200a20 20202072 6f746174 696f6e5b ; . rotation[ │ │ │ │ - 0x00962460 305d203d 20766563 3428636f 73562c20 0] = vec4(cosV, │ │ │ │ - 0x00962470 73696e56 2c20302e 302c2030 2e30293b sinV, 0.0, 0.0); │ │ │ │ - 0x00962480 200a2020 2020726f 74617469 6f6e5b31 . rotation[1 │ │ │ │ - 0x00962490 5d203d20 76656334 282d7369 6e562c20 ] = vec4(-sinV, │ │ │ │ - 0x009624a0 636f7356 2c20302e 302c2030 2e30293b cosV, 0.0, 0.0); │ │ │ │ - 0x009624b0 200a2020 2020726f 74617469 6f6e5b32 . rotation[2 │ │ │ │ - 0x009624c0 5d203d20 76656334 28302e30 2c20302e ] = vec4(0.0, 0. │ │ │ │ - 0x009624d0 302c2031 2e302c20 302e3029 3b200a20 0, 1.0, 0.0); . │ │ │ │ - 0x009624e0 20202072 6f746174 696f6e5b 335d203d rotation[3] = │ │ │ │ - 0x009624f0 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ - 0x00962500 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00962510 76656334 20706f73 203d2076 65633428 vec4 pos = vec4( │ │ │ │ - 0x00962520 755f706f 73697469 6f6e2e78 797a2c20 u_position.xyz, │ │ │ │ - 0x00962530 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ - 0x00962540 65773b20 0a202020 20766563 34206e6f ew; . vec4 no │ │ │ │ - 0x00962550 726d616c 203d2076 65633428 615f6e6f rmal = vec4(a_no │ │ │ │ - 0x00962560 726d616c 2c20302c 2030293b 200a2020 rmal, 0, 0); . │ │ │ │ - 0x00962570 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ - 0x00962580 73203d20 6e6f726d 616c202a 20726f74 s = normal * rot │ │ │ │ - 0x00962590 6174696f 6e202b20 706f733b 200a2020 ation + pos; . │ │ │ │ - 0x009625a0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x009625b0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x009625c0 6f726d28 73686966 74656450 6f73202a orm(shiftedPos * │ │ │ │ - 0x009625d0 20755f70 726f6a65 6374696f 6e2c2075 u_projection, u │ │ │ │ - 0x009625e0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ - 0x009625f0 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ - 0x00962600 6c6f7254 6578436f 6f726473 203d2061 lorTexCoords = a │ │ │ │ - 0x00962610 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00962620 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x00962630 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00962640 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00962650 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00962660 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00962670 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00962680 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00962690 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x009626a0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x009626b0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009626c0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009626d0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x009626e0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x009626f0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00962700 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00962710 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00962720 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00962730 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00962740 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00962750 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00962760 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00962770 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x00962780 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00962790 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x009627a0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x009627b0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x009627c0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x009627d0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ - 0x009627e0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x009627f0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x00962800 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x00962810 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00962820 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x00962830 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x00962840 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x00962850 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x00962860 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00962870 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00962880 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00962890 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x009628a0 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x009628b0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x009628c0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x009628d0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x009628e0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x009628f0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x00962900 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x00962910 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00962920 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00962930 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00962940 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00962950 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00962960 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00962970 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00962980 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00962990 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x009629a0 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x009629b0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x009629c0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x009629d0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x009629e0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x009629f0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x00962a00 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x00962a10 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00962a20 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00962a30 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00962a40 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00962a50 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00962a60 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00962a70 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00962a80 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00962a90 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00962aa0 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00962ab0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00962ac0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x00962ad0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x00962ae0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x00962af0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00962b00 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00962b10 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00962b20 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00962b30 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00962b40 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00962b50 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00962b60 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00962b70 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00962b80 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00962b90 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00962ba0 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00962bb0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00962bc0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x00962bd0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x00962be0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x00962bf0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x00962c00 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00962c10 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00962c20 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00962c30 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00962c40 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00962c50 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00962c60 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00962c70 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00962c80 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00962c90 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00962ca0 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00962cb0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00962cc0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x00962cd0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x00962ce0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x00962cf0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x00962d00 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00962d10 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00962d20 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00962d30 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00962d40 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00962d50 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00962d60 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00962d70 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00962d80 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00962d90 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00962da0 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00962db0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00962dc0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x00962dd0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x00962de0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x00962df0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x00962e00 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00962e10 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00962e20 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00962e30 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00962e40 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00962e50 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00962e60 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00962e70 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x00962e80 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ - 0x00962e90 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ - 0x00962ea0 6965773b 200a2020 2020666c 6f617420 iew; . float │ │ │ │ - 0x00962eb0 6e6f726d 616c4c65 6e203d20 6c656e67 normalLen = leng │ │ │ │ - 0x00962ec0 74682861 5f6e6f72 6d616c29 3b200a20 th(a_normal); . │ │ │ │ - 0x00962ed0 20202076 65633420 6e203d20 76656334 vec4 n = vec4 │ │ │ │ - 0x00962ee0 28615f70 6f736974 696f6e2e 7879202b (a_position.xy + │ │ │ │ - 0x00962ef0 20615f6e 6f726d61 6c202a20 6b536861 a_normal * kSha │ │ │ │ - 0x00962f00 7065436f 6f726453 63616c61 722c2030 peCoordScalar, 0 │ │ │ │ - 0x00962f10 2e302c20 302e3029 202a2075 5f6d6f64 .0, 0.0) * u_mod │ │ │ │ - 0x00962f20 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ - 0x00962f30 34206e6f 726d203d 20766563 3428302e 4 norm = vec4(0. │ │ │ │ - 0x00962f40 302c2030 2e302c20 302e302c 20302e30 0, 0.0, 0.0, 0.0 │ │ │ │ - 0x00962f50 293b200a 20202020 69662028 646f7428 ); . if (dot( │ │ │ │ - 0x00962f60 6e2c206e 2920213d 20302e30 29200a20 n, n) != 0.0) . │ │ │ │ - 0x00962f70 20202020 206e6f72 6d203d20 6e6f726d norm = norm │ │ │ │ - 0x00962f80 616c697a 65286e29 202a206e 6f726d61 alize(n) * norma │ │ │ │ - 0x00962f90 6c4c656e 3b200a20 20202076 65633420 lLen; . vec4 │ │ │ │ - 0x00962fa0 73686966 74656450 6f73203d 206e6f72 shiftedPos = nor │ │ │ │ - 0x00962fb0 6d202b20 706f733b 200a2020 2020676c m + pos; . gl │ │ │ │ - 0x00962fc0 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ - 0x00962fd0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00962fe0 73686966 74656450 6f73202a 20755f70 shiftedPos * u_p │ │ │ │ - 0x00962ff0 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ - 0x00963000 6f745472 616e7366 6f726d2c 20302e30 otTransform, 0.0 │ │ │ │ - 0x00963010 293b200a 20202020 765f636f 6c6f7254 ); . v_colorT │ │ │ │ - 0x00963020 6578436f 6f726473 203d2061 5f636f6c exCoords = a_col │ │ │ │ - 0x00963030 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00963040 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x00963050 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00963060 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00963070 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00963080 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00963090 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x009630a0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x009630b0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x009630c0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x009630d0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009630e0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009630f0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00963100 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00963110 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00963120 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00963130 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00963140 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00963150 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00963160 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00963170 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00963180 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00963190 0a202069 6e207665 63322061 5f6e6f72 . in vec2 a_nor │ │ │ │ - 0x009631a0 6d616c3b 200a2020 696e2076 65633220 mal; . in vec2 │ │ │ │ - 0x009631b0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ - 0x009631c0 3b200a20 206f7574 20766563 3220765f ; . out vec2 v_ │ │ │ │ - 0x009631d0 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ - 0x009631e0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x009631f0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00963200 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00963210 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x00963220 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x00963230 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x00963240 756e6966 6f726d20 76656334 20755f70 uniform vec4 u_p │ │ │ │ - 0x00963250 6f736974 696f6e3b 200a2020 756e6966 osition; . unif │ │ │ │ - 0x00963260 6f726d20 76656332 20755f6c 696e6550 orm vec2 u_lineP │ │ │ │ - 0x00963270 6172616d 733b200a 2020756e 69666f72 arams; . unifor │ │ │ │ - 0x00963280 6d20666c 6f617420 755f6163 63757261 m float u_accura │ │ │ │ - 0x00963290 63793b20 0a202075 6e69666f 726d2066 cy; . uniform f │ │ │ │ - 0x009632a0 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ - 0x009632b0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x009632c0 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ - 0x009632d0 69666f72 6d20666c 6f617420 755f617a iform float u_az │ │ │ │ - 0x009632e0 696d7574 3b200a20 20636f6e 73742066 imut; . const f │ │ │ │ - 0x009632f0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00963300 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00963310 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00963320 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00963330 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00963340 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00963350 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00963360 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00963370 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00963380 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00963390 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x009633a0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x009633b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009633c0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x009633d0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x009633e0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009633f0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00963400 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00963410 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00963420 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00963430 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00963440 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00963450 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00963460 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00963470 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00963480 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00963490 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x009634a0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x009634b0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x009634c0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x009634d0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x009634e0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x009634f0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00963500 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00963510 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00963520 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00963530 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00963540 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00963550 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00963560 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00963570 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00963580 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00963590 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009635a0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x009635b0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x009635c0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x009635d0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x009635e0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x009635f0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00963600 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00963610 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00963620 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00963630 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00963640 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00963650 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00963660 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00963670 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00963680 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00963690 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x009636a0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x009636b0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x009636c0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x009636d0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x009636e0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x009636f0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00963700 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00963710 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00963720 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00963730 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00963740 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00963750 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00963760 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00963770 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00963780 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00963790 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x009637a0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x009637b0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x009637c0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x009637d0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x009637e0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x009637f0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00963800 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00963810 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00963820 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00963830 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00963840 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00963850 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00963860 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00963870 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00963880 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ - 0x00963890 73697469 6f6e203d 20766563 3428755f sition = vec4(u_ │ │ │ │ - 0x009638a0 706f7369 74696f6e 2e78792c 20302e30 position.xy, 0.0 │ │ │ │ - 0x009638b0 2c20312e 3029202a 20755f6d 6f64656c , 1.0) * u_model │ │ │ │ - 0x009638c0 56696577 3b200a20 20202076 65633420 View; . vec4 │ │ │ │ - 0x009638d0 6e6f726d 616c203d 20766563 3428615f normal = vec4(a_ │ │ │ │ - 0x009638e0 6e6f726d 616c202a 20755f61 63637572 normal * u_accur │ │ │ │ - 0x009638f0 6163792c 20302e30 2c20302e 30293b20 acy, 0.0, 0.0); │ │ │ │ - 0x00963900 0a202020 20706f73 6974696f 6e203d20 . position = │ │ │ │ - 0x00963910 28706f73 6974696f 6e202b20 6e6f726d (position + norm │ │ │ │ - 0x00963920 616c2920 2a20755f 70726f6a 65637469 al) * u_projecti │ │ │ │ - 0x00963930 6f6e3b20 0a202020 20676c5f 506f7369 on; . gl_Posi │ │ │ │ - 0x00963940 74696f6e 203d2061 70706c79 5069766f tion = applyPivo │ │ │ │ - 0x00963950 74547261 6e73666f 726d2870 6f736974 tTransform(posit │ │ │ │ - 0x00963960 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ - 0x00963970 73666f72 6d2c2075 5f706f73 6974696f sform, u_positio │ │ │ │ - 0x00963980 6e2e7a20 2a20755f 7a536361 6c65293b n.z * u_zScale); │ │ │ │ - 0x00963990 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ - 0x009639a0 436f6f72 6473203d 20615f63 6f6c6f72 Coords = a_color │ │ │ │ - 0x009639b0 54657843 6f6f7264 733b200a 20207d20 TexCoords; . } │ │ │ │ - 0x009639c0 0a000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ - 0x009639d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009639e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x009639f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00963a00 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00963a10 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00963a20 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00963a30 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00963a40 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00963a50 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00963a60 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00963a70 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00963a80 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00963a90 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00963aa0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00963ab0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00963ac0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00963ad0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00963ae0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00963af0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00963b00 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00963b10 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00963b20 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00963b30 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x00963b40 6e207665 63332061 5f6c656e 6774683b n vec3 a_length; │ │ │ │ - 0x00963b50 200a2020 696e2076 65633420 615f636f . in vec4 a_co │ │ │ │ - 0x00963b60 6c6f723b 200a2020 6f757420 76656333 lor; . out vec3 │ │ │ │ - 0x00963b70 20765f6c 656e6774 683b200a 20206f75 v_length; . ou │ │ │ │ - 0x00963b80 74207665 63342076 5f636f6c 6f723b20 t vec4 v_color; │ │ │ │ - 0x00963b90 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00963ba0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x00963bb0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x00963bc0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ - 0x00963bd0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ - 0x00963be0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ - 0x00963bf0 756e6966 6f726d20 76656334 20755f72 uniform vec4 u_r │ │ │ │ - 0x00963c00 6f757465 50617261 6d733b20 0a202075 outeParams; . u │ │ │ │ - 0x00963c10 6e69666f 726d2076 65633420 755f636f niform vec4 u_co │ │ │ │ - 0x00963c20 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x00963c30 76656334 20755f6d 61736b43 6f6c6f72 vec4 u_maskColor │ │ │ │ - 0x00963c40 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00963c50 3420755f 6f75746c 696e6543 6f6c6f72 4 u_outlineColor │ │ │ │ - 0x00963c60 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00963c70 3420755f 66616b65 436f6c6f 723b200a 4 u_fakeColor; . │ │ │ │ - 0x00963c80 2020756e 69666f72 6d207665 63342075 uniform vec4 u │ │ │ │ - 0x00963c90 5f66616b 654f7574 6c696e65 436f6c6f _fakeOutlineColo │ │ │ │ - 0x00963ca0 723b200a 2020756e 69666f72 6d207665 r; . uniform ve │ │ │ │ - 0x00963cb0 63322075 5f66616b 65426f72 64657273 c2 u_fakeBorders │ │ │ │ - 0x00963cc0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00963cd0 3220755f 70617474 65726e3b 200a2020 2 u_pattern; . │ │ │ │ - 0x00963ce0 756e6966 6f726d20 76656332 20755f61 uniform vec2 u_a │ │ │ │ - 0x00963cf0 6e676c65 436f7353 696e3b20 0a202075 ngleCosSin; . u │ │ │ │ - 0x00963d00 6e69666f 726d2066 6c6f6174 20755f61 niform float u_a │ │ │ │ - 0x00963d10 72726f77 48616c66 57696474 683b200a rrowHalfWidth; . │ │ │ │ - 0x00963d20 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00963d30 755f6f70 61636974 793b200a 2020636f u_opacity; . co │ │ │ │ - 0x00963d40 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x00963d50 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x00963d60 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x00963d70 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x00963d80 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x00963d90 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x00963da0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x00963db0 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x00963dc0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00963dd0 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x00963de0 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x00963df0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x00963e00 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00963e10 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x00963e20 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00963e30 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x00963e40 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x00963e50 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x00963e60 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00963e70 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x00963e80 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x00963e90 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00963ea0 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x00963eb0 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x00963ec0 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x00963ed0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00963ee0 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x00963ef0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x00963f00 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x00963f10 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x00963f20 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x00963f30 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x00963f40 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x00963f50 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x00963f60 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00963f70 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00963f80 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00963f90 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00963fa0 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x00963fb0 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x00963fc0 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x00963fd0 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x00963fe0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x00963ff0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x00964000 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x00964010 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00964020 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x00964030 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x00964040 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00964050 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x00964060 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x00964070 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x00964080 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00964090 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x009640a0 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x009640b0 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x009640c0 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x009640d0 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x009640e0 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x009640f0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x00964100 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x00964110 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x00964120 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x00964130 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x00964140 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x00964150 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x00964160 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x00964170 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x00964180 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x00964190 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x009641a0 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x009641b0 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x009641c0 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x009641d0 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x009641e0 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x009641f0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x00964200 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x00964210 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x00964220 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x00964230 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00964240 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x00964250 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x00964260 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00964270 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x00964280 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x00964290 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x009642a0 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x009642b0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x009642c0 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x009642d0 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ - 0x009642e0 63322074 72616e73 666f726d 65644178 c2 transformedAx │ │ │ │ - 0x009642f0 6973506f 73203d20 28766563 3428615f isPos = (vec4(a_ │ │ │ │ - 0x00964300 706f7369 74696f6e 2e78792c 20302e30 position.xy, 0.0 │ │ │ │ - 0x00964310 2c20312e 3029202a 20755f6d 6f64656c , 1.0) * u_model │ │ │ │ - 0x00964320 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00964330 65633220 6c656e20 3d207665 63322861 ec2 len = vec2(a │ │ │ │ - 0x00964340 5f6c656e 6774682e 782c2061 5f6c656e _length.x, a_len │ │ │ │ - 0x00964350 6774682e 7a293b20 0a202020 20696620 gth.z); . if │ │ │ │ - 0x00964360 28646f74 28615f6e 6f726d61 6c2c2061 (dot(a_normal, a │ │ │ │ - 0x00964370 5f6e6f72 6d616c29 20213d20 302e3029 _normal) != 0.0) │ │ │ │ - 0x00964380 200a2020 20207b20 0a202020 20202076 . { . v │ │ │ │ - 0x00964390 65633220 6e6f726d 203d2061 5f6e6f72 ec2 norm = a_nor │ │ │ │ - 0x009643a0 6d616c20 2a20755f 726f7574 65506172 mal * u_routePar │ │ │ │ - 0x009643b0 616d732e 783b200a 20202020 20207472 ams.x; . tr │ │ │ │ - 0x009643c0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x009643d0 203d2063 616c634c 696e6554 72616e73 = calcLineTrans │ │ │ │ - 0x009643e0 666f726d 65644178 6973506f 73287472 formedAxisPos(tr │ │ │ │ - 0x009643f0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00964400 2c20615f 706f7369 74696f6e 2e787920 , a_position.xy │ │ │ │ - 0x00964410 2b206e6f 726d2c20 0a202020 20202020 + norm, . │ │ │ │ - 0x00964420 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00964430 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00964440 20202020 20202020 20202020 20202075 u │ │ │ │ - 0x00964450 5f6d6f64 656c5669 65772c20 6c656e67 _modelView, leng │ │ │ │ - 0x00964460 7468286e 6f726d29 293b200a 20202020 th(norm)); . │ │ │ │ - 0x00964470 20206966 2028755f 726f7574 65506172 if (u_routePar │ │ │ │ - 0x00964480 616d732e 7920213d 20302e30 29200a20 ams.y != 0.0) . │ │ │ │ - 0x00964490 20202020 2020206c 656e203d 20766563 len = vec │ │ │ │ - 0x009644a0 3228615f 6c656e67 74682e78 202b2061 2(a_length.x + a │ │ │ │ - 0x009644b0 5f6c656e 6774682e 79202a20 755f726f _length.y * u_ro │ │ │ │ - 0x009644c0 75746550 6172616d 732e792c 20615f6c uteParams.y, a_l │ │ │ │ - 0x009644d0 656e6774 682e7a29 3b200a20 2020207d ength.z); . } │ │ │ │ - 0x009644e0 200a2020 2020765f 6c656e67 7468203d . v_length = │ │ │ │ - 0x009644f0 20766563 33286c65 6e2c2075 5f726f75 vec3(len, u_rou │ │ │ │ - 0x00964500 74655061 72616d73 2e7a293b 200a2020 teParams.z); . │ │ │ │ - 0x00964510 2020765f 636f6c6f 72203d20 615f636f v_color = a_co │ │ │ │ - 0x00964520 6c6f723b 200a2020 20207665 63342070 lor; . vec4 p │ │ │ │ - 0x00964530 6f73203d 20766563 34287472 616e7366 os = vec4(transf │ │ │ │ - 0x00964540 6f726d65 64417869 73506f73 2c20615f ormedAxisPos, a_ │ │ │ │ - 0x00964550 706f7369 74696f6e 2e7a2c20 312e3029 position.z, 1.0) │ │ │ │ - 0x00964560 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ - 0x00964570 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x00964580 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ - 0x00964590 616e7366 6f726d28 706f732c 20755f70 ansform(pos, u_p │ │ │ │ - 0x009645a0 69766f74 5472616e 73666f72 6d2c2030 ivotTransform, 0 │ │ │ │ - 0x009645b0 2e30293b 200a2020 7d200a00 00000000 .0); . } ...... │ │ │ │ - 0x009645c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009645d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009645e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009645f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00964600 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00964610 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00964620 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00964630 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00964640 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00964650 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00964660 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00964670 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00964680 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00964690 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x009646a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009646b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009646c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009646d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009646e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009646f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00964700 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00964710 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x00964720 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x00964730 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x00964740 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x00964750 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x00964760 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x00964770 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x00964780 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x00964790 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x009647a0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x009647b0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x009647c0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x009647d0 6e69666f 726d2076 65633420 755f726f niform vec4 u_ro │ │ │ │ - 0x009647e0 75746550 6172616d 733b200a 2020756e uteParams; . un │ │ │ │ - 0x009647f0 69666f72 6d207665 63342075 5f636f6c iform vec4 u_col │ │ │ │ - 0x00964800 6f723b20 0a202075 6e69666f 726d2076 or; . uniform v │ │ │ │ - 0x00964810 65633420 755f6d61 736b436f 6c6f723b ec4 u_maskColor; │ │ │ │ - 0x00964820 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00964830 20755f6f 75746c69 6e65436f 6c6f723b u_outlineColor; │ │ │ │ - 0x00964840 200a2020 756e6966 6f726d20 76656334 . uniform vec4 │ │ │ │ - 0x00964850 20755f66 616b6543 6f6c6f72 3b200a20 u_fakeColor; . │ │ │ │ - 0x00964860 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ - 0x00964870 66616b65 4f75746c 696e6543 6f6c6f72 fakeOutlineColor │ │ │ │ - 0x00964880 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00964890 3220755f 66616b65 426f7264 6572733b 2 u_fakeBorders; │ │ │ │ - 0x009648a0 200a2020 756e6966 6f726d20 76656332 . uniform vec2 │ │ │ │ - 0x009648b0 20755f70 61747465 726e3b20 0a202075 u_pattern; . u │ │ │ │ - 0x009648c0 6e69666f 726d2076 65633220 755f616e niform vec2 u_an │ │ │ │ - 0x009648d0 676c6543 6f735369 6e3b200a 2020756e gleCosSin; . un │ │ │ │ - 0x009648e0 69666f72 6d20666c 6f617420 755f6172 iform float u_ar │ │ │ │ - 0x009648f0 726f7748 616c6657 69647468 3b200a20 rowHalfWidth; . │ │ │ │ - 0x00964900 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00964910 5f6f7061 63697479 3b200a20 20636f6e _opacity; . con │ │ │ │ - 0x00964920 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00964930 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00964940 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00964950 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00964960 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00964970 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00964980 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00964990 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x009649a0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x009649b0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x009649c0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x009649d0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x009649e0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x009649f0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00964a00 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00964a10 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00964a20 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00964a30 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00964a40 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00964a50 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00964a60 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00964a70 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00964a80 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00964a90 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x00964aa0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x00964ab0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00964ac0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x00964ad0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x00964ae0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00964af0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00964b00 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00964b10 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00964b20 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00964b30 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00964b40 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00964b50 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00964b60 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00964b70 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00964b80 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x00964b90 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x00964ba0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x00964bb0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x00964bc0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00964bd0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x00964be0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x00964bf0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00964c00 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x00964c10 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x00964c20 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00964c30 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x00964c40 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00964c50 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x00964c60 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00964c70 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x00964c80 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x00964c90 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x00964ca0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x00964cb0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x00964cc0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x00964cd0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00964ce0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x00964cf0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x00964d00 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x00964d10 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x00964d20 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x00964d30 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00964d40 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x00964d50 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x00964d60 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00964d70 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x00964d80 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x00964d90 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x00964da0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x00964db0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x00964dc0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x00964dd0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x00964de0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x00964df0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x00964e00 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x00964e10 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00964e20 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x00964e30 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x00964e40 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00964e50 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x00964e60 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x00964e70 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x00964e80 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00964e90 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00964ea0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x00964eb0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ - 0x00964ec0 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ - 0x00964ed0 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ - 0x00964ee0 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ - 0x00964ef0 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ - 0x00964f00 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ - 0x00964f10 2028646f 7428615f 6e6f726d 616c2c20 (dot(a_normal, │ │ │ │ - 0x00964f20 615f6e6f 726d616c 2920213d 20302e30 a_normal) != 0.0 │ │ │ │ - 0x00964f30 29200a20 2020207b 200a2020 20202020 ) . { . │ │ │ │ - 0x00964f40 76656332 206e6f72 6d203d20 615f6e6f vec2 norm = a_no │ │ │ │ - 0x00964f50 726d616c 202a2075 5f617272 6f774861 rmal * u_arrowHa │ │ │ │ - 0x00964f60 6c665769 6474683b 200a2020 20202020 lfWidth; . │ │ │ │ - 0x00964f70 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ - 0x00964f80 6f73203d 2063616c 634c696e 65547261 os = calcLineTra │ │ │ │ - 0x00964f90 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ - 0x00964fa0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ - 0x00964fb0 6f732c20 615f706f 73697469 6f6e2e78 os, a_position.x │ │ │ │ - 0x00964fc0 79202b20 6e6f726d 2c200a20 20202020 y + norm, . │ │ │ │ - 0x00964fd0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00964fe0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00964ff0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00965000 20755f6d 6f64656c 56696577 2c206c65 u_modelView, le │ │ │ │ - 0x00965010 6e677468 286e6f72 6d29293b 200a2020 ngth(norm)); . │ │ │ │ - 0x00965020 20207d20 0a202020 20765f63 6f6c6f72 } . v_color │ │ │ │ - 0x00965030 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ - 0x00965040 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ - 0x00965050 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ - 0x00965060 63342874 72616e73 666f726d 65644178 c4(transformedAx │ │ │ │ - 0x00965070 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ - 0x00965080 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ - 0x00965090 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ - 0x009650a0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ - 0x009650b0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x009650c0 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ - 0x009650d0 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x009650e0 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ - 0x009650f0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00965100 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00965110 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00965120 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00965130 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00965140 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00965150 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00965160 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00965170 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00965180 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00965190 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x009651a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x009651b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009651c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009651d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009651e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009651f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00965200 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00965210 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00965220 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00965230 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x00965240 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00965250 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ - 0x00965260 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ - 0x00965270 0a20206f 75742076 65633420 765f7261 . out vec4 v_ra │ │ │ │ - 0x00965280 64697573 3b200a20 206f7574 20766563 dius; . out vec │ │ │ │ - 0x00965290 3420765f 636f6c6f 723b200a 2020756e 4 v_color; . un │ │ │ │ - 0x009652a0 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ - 0x009652b0 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ - 0x009652c0 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ - 0x009652d0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x009652e0 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ - 0x009652f0 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ - 0x00965300 726d2076 65633420 755f726f 75746550 rm vec4 u_routeP │ │ │ │ - 0x00965310 6172616d 733b200a 2020756e 69666f72 arams; . unifor │ │ │ │ - 0x00965320 6d207665 63342075 5f636f6c 6f723b20 m vec4 u_color; │ │ │ │ - 0x00965330 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x00965340 755f6d61 736b436f 6c6f723b 200a2020 u_maskColor; . │ │ │ │ - 0x00965350 756e6966 6f726d20 76656334 20755f6f uniform vec4 u_o │ │ │ │ - 0x00965360 75746c69 6e65436f 6c6f723b 200a2020 utlineColor; . │ │ │ │ - 0x00965370 756e6966 6f726d20 76656334 20755f66 uniform vec4 u_f │ │ │ │ - 0x00965380 616b6543 6f6c6f72 3b200a20 20756e69 akeColor; . uni │ │ │ │ - 0x00965390 666f726d 20766563 3420755f 66616b65 form vec4 u_fake │ │ │ │ - 0x009653a0 4f75746c 696e6543 6f6c6f72 3b200a20 OutlineColor; . │ │ │ │ - 0x009653b0 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x009653c0 66616b65 426f7264 6572733b 200a2020 fakeBorders; . │ │ │ │ - 0x009653d0 756e6966 6f726d20 76656332 20755f70 uniform vec2 u_p │ │ │ │ - 0x009653e0 61747465 726e3b20 0a202075 6e69666f attern; . unifo │ │ │ │ - 0x009653f0 726d2076 65633220 755f616e 676c6543 rm vec2 u_angleC │ │ │ │ - 0x00965400 6f735369 6e3b200a 2020756e 69666f72 osSin; . unifor │ │ │ │ - 0x00965410 6d20666c 6f617420 755f6172 726f7748 m float u_arrowH │ │ │ │ - 0x00965420 616c6657 69647468 3b200a20 20756e69 alfWidth; . uni │ │ │ │ - 0x00965430 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ - 0x00965440 63697479 3b200a20 20636f6e 73742066 city; . const f │ │ │ │ - 0x00965450 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00965460 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00965470 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00965480 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00965490 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x009654a0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x009654b0 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x009654c0 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x009654d0 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x009654e0 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x009654f0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00965500 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00965510 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00965520 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x00965530 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x00965540 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00965550 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00965560 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00965570 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00965580 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00965590 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x009655a0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x009655b0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x009655c0 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x009655d0 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x009655e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x009655f0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x00965600 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x00965610 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x00965620 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00965630 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x00965640 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x00965650 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x00965660 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x00965670 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00965680 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00965690 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x009656a0 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x009656b0 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x009656c0 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x009656d0 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x009656e0 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x009656f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00965700 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00965710 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x00965720 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x00965730 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x00965740 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x00965750 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00965760 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x00965770 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x00965780 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x00965790 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x009657a0 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x009657b0 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x009657c0 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x009657d0 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x009657e0 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x009657f0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00965800 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x00965810 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x00965820 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x00965830 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x00965840 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x00965850 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00965860 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00965870 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x00965880 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x00965890 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x009658a0 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x009658b0 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x009658c0 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x009658d0 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x009658e0 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x009658f0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x00965900 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x00965910 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x00965920 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00965930 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x00965940 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00965950 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x00965960 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x00965970 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x00965980 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x00965990 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x009659a0 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x009659b0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x009659c0 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x009659d0 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x009659e0 20207b20 0a202020 20666c6f 61742072 { . float r │ │ │ │ - 0x009659f0 203d2075 5f726f75 74655061 72616d73 = u_routeParams │ │ │ │ - 0x00965a00 2e78202a 20615f6e 6f726d61 6c2e7a3b .x * a_normal.z; │ │ │ │ - 0x00965a10 200a2020 20207665 6332206e 6f726d61 . vec2 norma │ │ │ │ - 0x00965a20 6c203d20 76656332 28615f6e 6f726d61 l = vec2(a_norma │ │ │ │ - 0x00965a30 6c2e7820 2a20755f 616e676c 65436f73 l.x * u_angleCos │ │ │ │ - 0x00965a40 53696e2e 78202d20 615f6e6f 726d616c Sin.x - a_normal │ │ │ │ - 0x00965a50 2e79202a 20755f61 6e676c65 436f7353 .y * u_angleCosS │ │ │ │ - 0x00965a60 696e2e79 2c200a20 20202020 20202020 in.y, . │ │ │ │ - 0x00965a70 20202020 20202020 20202020 2020615f a_ │ │ │ │ - 0x00965a80 6e6f726d 616c2e78 202a2075 5f616e67 normal.x * u_ang │ │ │ │ - 0x00965a90 6c65436f 7353696e 2e79202b 20615f6e leCosSin.y + a_n │ │ │ │ - 0x00965aa0 6f726d61 6c2e7920 2a20755f 616e676c ormal.y * u_angl │ │ │ │ - 0x00965ab0 65436f73 53696e2e 78293b20 0a202020 eCosSin.x); . │ │ │ │ - 0x00965ac0 20766563 34207261 64697573 203d2076 vec4 radius = v │ │ │ │ - 0x00965ad0 65633428 6e6f726d 616c2e78 79202a20 ec4(normal.xy * │ │ │ │ - 0x00965ae0 722c2072 2c20615f 706f7369 74696f6e r, r, a_position │ │ │ │ - 0x00965af0 2e77293b 200a2020 20207665 63342070 .w); . vec4 p │ │ │ │ - 0x00965b00 6f73203d 20766563 3428615f 706f7369 os = vec4(a_posi │ │ │ │ - 0x00965b10 74696f6e 2e78792c 20302c20 3129202a tion.xy, 0, 1) * │ │ │ │ - 0x00965b20 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ - 0x00965b30 20202076 65633220 73686966 74656450 vec2 shiftedP │ │ │ │ - 0x00965b40 6f73203d 20726164 6975732e 7879202b os = radius.xy + │ │ │ │ - 0x00965b50 20706f73 2e78793b 200a2020 2020706f pos.xy; . po │ │ │ │ - 0x00965b60 73203d20 76656334 28736869 66746564 s = vec4(shifted │ │ │ │ - 0x00965b70 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ - 0x00965b80 7a2c2031 2e302920 2a20755f 70726f6a z, 1.0) * u_proj │ │ │ │ - 0x00965b90 65637469 6f6e3b20 0a202020 20676c5f ection; . gl_ │ │ │ │ - 0x00965ba0 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ - 0x00965bb0 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ - 0x00965bc0 6f732c20 755f7069 766f7454 72616e73 os, u_pivotTrans │ │ │ │ - 0x00965bd0 666f726d 2c20302e 30293b20 0a202020 form, 0.0); . │ │ │ │ - 0x00965be0 20765f72 61646975 73203d20 72616469 v_radius = radi │ │ │ │ - 0x00965bf0 75733b20 0a202020 20765f63 6f6c6f72 us; . v_color │ │ │ │ - 0x00965c00 203d2061 5f636f6c 6f723b20 0a20207d = a_color; . } │ │ │ │ - 0x00965c10 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x00965c20 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00965c30 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00965c40 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00965c50 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00965c60 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00965c70 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00965c80 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00965c90 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00965ca0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00965cb0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00965cc0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00965cd0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00965ce0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00965cf0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00965d00 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00965d10 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00965d20 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00965d30 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00965d40 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00965d50 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00965d60 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x00965d70 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00965d80 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x00965d90 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x00965da0 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ - 0x00965db0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ - 0x00965dc0 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ - 0x00965dd0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x00965de0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x00965df0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x00965e00 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00965e10 3220755f 636f6e74 72617374 47616d6d 2 u_contrastGamm │ │ │ │ - 0x00965e20 613b200a 2020756e 69666f72 6d207665 a; . uniform ve │ │ │ │ - 0x00965e30 63322075 5f706f73 6974696f 6e3b200a c2 u_position; . │ │ │ │ - 0x00965e40 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x00965e50 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ - 0x00965e60 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00965e70 7420755f 6f706163 6974793b 200a2020 t u_opacity; . │ │ │ │ - 0x00965e80 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00965e90 6c656e67 74683b20 0a202063 6f6e7374 length; . const │ │ │ │ - 0x00965ea0 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x00965eb0 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x00965ec0 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x00965ed0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00965ee0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00965ef0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00965f00 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00965f10 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00965f20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00965f30 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00965f40 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00965f50 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00965f60 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00965f70 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x00965f80 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x00965f90 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00965fa0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x00965fb0 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x00965fc0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00965fd0 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00965fe0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00965ff0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00966000 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00966010 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00966020 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00966030 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00966040 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00966050 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00966060 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00966070 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x00966080 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x00966090 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009660a0 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x009660b0 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x009660c0 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x009660d0 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x009660e0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x009660f0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00966100 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00966110 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00966120 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00966130 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00966140 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00966150 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00966160 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00966170 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x00966180 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x00966190 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x009661a0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x009661b0 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x009661c0 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x009661d0 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x009661e0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x009661f0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00966200 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00966210 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00966220 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00966230 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00966240 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00966250 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00966260 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00966270 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x00966280 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x00966290 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x009662a0 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x009662b0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x009662c0 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x009662d0 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x009662e0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x009662f0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00966300 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00966310 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00966320 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00966330 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00966340 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00966350 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00966360 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00966370 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x00966380 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x00966390 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x009663a0 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x009663b0 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x009663c0 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x009663d0 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x009663e0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x009663f0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00966400 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00966410 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00966420 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00966430 200a2020 7b200a20 20202067 6c5f506f . { . gl_Po │ │ │ │ - 0x00966440 73697469 6f6e203d 20766563 3428755f sition = vec4(u_ │ │ │ │ - 0x00966450 706f7369 74696f6e 202b2061 5f706f73 position + a_pos │ │ │ │ - 0x00966460 6974696f 6e202b20 755f6c65 6e677468 ition + u_length │ │ │ │ - 0x00966470 202a2061 5f6e6f72 6d616c2c 20302c20 * a_normal, 0, │ │ │ │ - 0x00966480 3129202a 20755f70 726f6a65 6374696f 1) * u_projectio │ │ │ │ - 0x00966490 6e3b200a 20202369 66646566 2056554c n; . #ifdef VUL │ │ │ │ - 0x009664a0 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ - 0x009664b0 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ - 0x009664c0 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ - 0x009664d0 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ - 0x009664e0 6c5f506f 73697469 6f6e2e7a 20202b20 l_Position.z + │ │ │ │ - 0x009664f0 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ - 0x00966500 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ - 0x00966510 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ - 0x00966520 6f6f7264 73203d20 615f636f 6c6f7254 oords = a_colorT │ │ │ │ - 0x00966530 6578436f 6f726473 3b200a20 207d200a exCoords; . } . │ │ │ │ - 0x00966540 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ - 0x00966550 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00966560 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00966570 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00966580 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00966590 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x009665a0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x009665b0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x009665c0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x009665d0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x009665e0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009665f0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00966600 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00966610 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00966620 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00966630 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00966640 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00966650 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00966660 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00966670 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00966680 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00966690 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x009666a0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x009666b0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ - 0x009666c0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x009666d0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ - 0x009666e0 65633320 615f6c65 6e677468 3b200a20 ec3 a_length; . │ │ │ │ - 0x009666f0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x00966700 5446200a 20206f75 74204c4f 575f5020 TF . out LOW_P │ │ │ │ - 0x00966710 76656334 20765f63 6f6c6f72 3b200a20 vec4 v_color; . │ │ │ │ - 0x00966720 2023656c 7365200a 20206f75 74207665 #else . out ve │ │ │ │ - 0x00966730 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00966740 72643b20 0a202023 656e6469 66200a20 rd; . #endif . │ │ │ │ - 0x00966750 206f7574 20666c6f 61742076 5f6c656e out float v_len │ │ │ │ - 0x00966760 67746859 3b200a20 20756e69 666f726d gthY; . uniform │ │ │ │ - 0x00966770 206d6174 3420755f 6d6f6465 6c566965 mat4 u_modelVie │ │ │ │ - 0x00966780 773b200a 2020756e 69666f72 6d206d61 w; . uniform ma │ │ │ │ - 0x00966790 74342075 5f70726f 6a656374 696f6e3b t4 u_projection; │ │ │ │ - 0x009667a0 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ - 0x009667b0 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ - 0x009667c0 6d3b200a 2020756e 69666f72 6d207665 m; . uniform ve │ │ │ │ - 0x009667d0 63342075 5f706f73 6974696f 6e3b200a c4 u_position; . │ │ │ │ - 0x009667e0 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ - 0x009667f0 5f6c696e 65506172 616d733b 200a2020 _lineParams; . │ │ │ │ - 0x00966800 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x00966810 61636375 72616379 3b200a20 20756e69 accuracy; . uni │ │ │ │ - 0x00966820 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ - 0x00966830 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ - 0x00966840 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00966850 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00966860 7420755f 617a696d 75743b20 0a202023 t u_azimut; . # │ │ │ │ - 0x00966870 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ - 0x00966880 200a2020 756e6966 6f726d20 73616d70 . uniform samp │ │ │ │ - 0x00966890 6c657232 4420755f 636f6c6f 72546578 ler2D u_colorTex │ │ │ │ - 0x009668a0 3b200a20 2023656e 64696620 0a202063 ; . #endif . c │ │ │ │ - 0x009668b0 6f6e7374 20666c6f 6174206b 416e7469 onst float kAnti │ │ │ │ - 0x009668c0 616c6961 73696e67 54687265 73686f6c aliasingThreshol │ │ │ │ - 0x009668d0 64203d20 302e3932 3b200a20 20636f6e d = 0.92; . con │ │ │ │ - 0x009668e0 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x009668f0 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00966900 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00966910 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00966920 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00966930 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00966940 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00966950 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x00966960 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00966970 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x00966980 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x00966990 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x009669a0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x009669b0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x009669c0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x009669d0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x009669e0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x009669f0 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00966a00 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00966a10 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00966a20 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00966a30 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00966a40 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00966a50 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x00966a60 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x00966a70 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00966a80 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x00966a90 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x00966aa0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00966ab0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00966ac0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00966ad0 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00966ae0 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00966af0 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00966b00 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00966b10 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00966b20 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00966b30 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00966b40 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x00966b50 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x00966b60 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x00966b70 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x00966b80 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00966b90 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x00966ba0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x00966bb0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00966bc0 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x00966bd0 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x00966be0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00966bf0 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x00966c00 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00966c10 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x00966c20 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00966c30 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x00966c40 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x00966c50 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x00966c60 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x00966c70 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x00966c80 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x00966c90 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00966ca0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x00966cb0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x00966cc0 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x00966cd0 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x00966ce0 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x00966cf0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00966d00 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x00966d10 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x00966d20 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00966d30 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x00966d40 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x00966d50 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x00966d60 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x00966d70 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x00966d80 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x00966d90 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x00966da0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x00966db0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x00966dc0 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x00966dd0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00966de0 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x00966df0 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x00966e00 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00966e10 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x00966e20 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x00966e30 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x00966e40 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00966e50 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00966e60 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x00966e70 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ - 0x00966e80 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ - 0x00966e90 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ - 0x00966ea0 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ - 0x00966eb0 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ - 0x00966ec0 69657729 2e78793b 200a2020 20207665 iew).xy; . ve │ │ │ │ - 0x00966ed0 6332206c 656e203d 20766563 3228615f c2 len = vec2(a_ │ │ │ │ - 0x00966ee0 6c656e67 74682e78 2c20615f 6c656e67 length.x, a_leng │ │ │ │ - 0x00966ef0 74682e7a 293b200a 20202020 69662028 th.z); . if ( │ │ │ │ - 0x00966f00 646f7428 615f6e6f 726d616c 2c20615f dot(a_normal, a_ │ │ │ │ - 0x00966f10 6e6f726d 616c2920 213d2030 2e302920 normal) != 0.0) │ │ │ │ - 0x00966f20 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ - 0x00966f30 6332206e 6f726d20 3d20615f 6e6f726d c2 norm = a_norm │ │ │ │ - 0x00966f40 616c202a 20755f6c 696e6550 6172616d al * u_lineParam │ │ │ │ - 0x00966f50 732e783b 200a2020 20202020 7472616e s.x; . tran │ │ │ │ - 0x00966f60 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ - 0x00966f70 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00966f80 726d6564 41786973 506f7328 7472616e rmedAxisPos(tran │ │ │ │ - 0x00966f90 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x00966fa0 615f706f 73697469 6f6e2e78 79202b20 a_position.xy + │ │ │ │ - 0x00966fb0 6e6f726d 2c200a20 20202020 20202020 norm, . │ │ │ │ - 0x00966fc0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00966fd0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00966fe0 20202020 20202020 20202020 20755f6d u_m │ │ │ │ - 0x00966ff0 6f64656c 56696577 2c206c65 6e677468 odelView, length │ │ │ │ - 0x00967000 286e6f72 6d29293b 200a2020 20202020 (norm)); . │ │ │ │ - 0x00967010 69662028 755f6c69 6e655061 72616d73 if (u_lineParams │ │ │ │ - 0x00967020 2e792021 3d20302e 3029200a 20202020 .y != 0.0) . │ │ │ │ - 0x00967030 20202020 6c656e20 3d207665 63322861 len = vec2(a │ │ │ │ - 0x00967040 5f6c656e 6774682e 78202b20 615f6c65 _length.x + a_le │ │ │ │ - 0x00967050 6e677468 2e79202a 20755f6c 696e6550 ngth.y * u_lineP │ │ │ │ - 0x00967060 6172616d 732e792c 20615f6c 656e6774 arams.y, a_lengt │ │ │ │ - 0x00967070 682e7a29 3b200a20 2020207d 200a2020 h.z); . } . │ │ │ │ - 0x00967080 23696664 65662045 4e41424c 455f5654 #ifdef ENABLE_VT │ │ │ │ - 0x00967090 46200a20 20202076 5f636f6c 6f72203d F . v_color = │ │ │ │ - 0x009670a0 20746578 74757265 28755f63 6f6c6f72 texture(u_color │ │ │ │ - 0x009670b0 5465782c 20615f63 6f6c6f72 54657843 Tex, a_colorTexC │ │ │ │ - 0x009670c0 6f6f7264 73293b20 0a202023 656c7365 oords); . #else │ │ │ │ - 0x009670d0 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ - 0x009670e0 436f6f72 64203d20 615f636f 6c6f7254 Coord = a_colorT │ │ │ │ - 0x009670f0 6578436f 6f726473 3b200a20 2023656e exCoords; . #en │ │ │ │ - 0x00967100 64696620 0a202020 20765f6c 656e6774 dif . v_lengt │ │ │ │ - 0x00967110 6859203d 206c656e 2e793b20 0a202020 hY = len.y; . │ │ │ │ - 0x00967120 20766563 3420706f 73203d20 76656334 vec4 pos = vec4 │ │ │ │ - 0x00967130 28747261 6e73666f 726d6564 41786973 (transformedAxis │ │ │ │ - 0x00967140 506f732c 20615f70 6f736974 696f6e2e Pos, a_position. │ │ │ │ - 0x00967150 7a2c2031 2e302920 2a20755f 70726f6a z, 1.0) * u_proj │ │ │ │ - 0x00967160 65637469 6f6e3b20 0a202020 20676c5f ection; . gl_ │ │ │ │ - 0x00967170 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ - 0x00967180 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ - 0x00967190 6f732c20 755f7069 766f7454 72616e73 os, u_pivotTrans │ │ │ │ - 0x009671a0 666f726d 2c20302e 30293b20 0a20207d form, 0.0); . } │ │ │ │ - 0x009671b0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x009671c0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009671d0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x009671e0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x009671f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00967200 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00967210 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00967220 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00967230 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00967240 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00967250 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00967260 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00967270 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00967280 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00967290 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009672a0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009672b0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009672c0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009672d0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009672e0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x009672f0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00967300 0a202069 6e207665 63342076 5f636f6f . in vec4 v_coo │ │ │ │ - 0x00967310 7264733b 200a2020 696e2076 65633420 rds; . in vec4 │ │ │ │ - 0x00967320 765f6f66 66736574 303b200a 2020696e v_offset0; . in │ │ │ │ - 0x00967330 20766563 3420765f 6f666673 6574313b vec4 v_offset1; │ │ │ │ - 0x00967340 200a2020 696e2076 65633420 765f6f66 . in vec4 v_of │ │ │ │ - 0x00967350 66736574 323b200a 20206f75 74207665 fset2; . out ve │ │ │ │ - 0x00967360 63342076 5f467261 67436f6c 6f723b20 c4 v_FragColor; │ │ │ │ - 0x00967370 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x00967380 755f6672 616d6562 75666665 724d6574 u_framebufferMet │ │ │ │ - 0x00967390 72696373 3b200a20 20756e69 666f726d rics; . uniform │ │ │ │ - 0x009673a0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ - 0x009673b0 6f725465 783b200a 2020756e 69666f72 orTex; . unifor │ │ │ │ - 0x009673c0 6d207361 6d706c65 72324420 755f736d m sampler2D u_sm │ │ │ │ - 0x009673d0 61614172 65613b20 0a202075 6e69666f aaArea; . unifo │ │ │ │ - 0x009673e0 726d2073 616d706c 65723244 20755f73 rm sampler2D u_s │ │ │ │ - 0x009673f0 6d616153 65617263 683b200a 20202364 maaSearch; . #d │ │ │ │ - 0x00967400 6566696e 6520534d 41415f53 45415243 efine SMAA_SEARC │ │ │ │ - 0x00967410 48544558 5f53495a 45207665 63322836 HTEX_SIZE vec2(6 │ │ │ │ - 0x00967420 362e302c 2033332e 3029200a 20202364 6.0, 33.0) . #d │ │ │ │ - 0x00967430 6566696e 6520534d 41415f53 45415243 efine SMAA_SEARC │ │ │ │ - 0x00967440 48544558 5f504143 4b45445f 53495a45 HTEX_PACKED_SIZE │ │ │ │ - 0x00967450 20766563 32283634 2e302c20 31362e30 vec2(64.0, 16.0 │ │ │ │ - 0x00967460 29200a20 20236465 66696e65 20534d41 ) . #define SMA │ │ │ │ - 0x00967470 415f4152 45415445 585f4d41 585f4449 A_AREATEX_MAX_DI │ │ │ │ - 0x00967480 5354414e 43452031 362e3020 0a202023 STANCE 16.0 . # │ │ │ │ - 0x00967490 64656669 6e652053 4d41415f 41524541 define SMAA_AREA │ │ │ │ - 0x009674a0 5445585f 50495845 4c5f5349 5a452028 TEX_PIXEL_SIZE ( │ │ │ │ - 0x009674b0 76656332 28312e30 202f2032 35362e30 vec2(1.0 / 256.0 │ │ │ │ - 0x009674c0 2c20312e 30202f20 31303234 2e302929 , 1.0 / 1024.0)) │ │ │ │ - 0x009674d0 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ - 0x009674e0 4c6f6f70 42656769 6e28636f 6e646974 LoopBegin(condit │ │ │ │ - 0x009674f0 696f6e29 20776869 6c652028 636f6e64 ion) while (cond │ │ │ │ - 0x00967500 6974696f 6e29207b 200a2020 23646566 ition) { . #def │ │ │ │ - 0x00967510 696e6520 534d4141 4c6f6f70 456e6420 ine SMAALoopEnd │ │ │ │ - 0x00967520 7d200a20 20236465 66696e65 20534d41 } . #define SMA │ │ │ │ - 0x00967530 4153616d 706c654c 6576656c 5a65726f ASampleLevelZero │ │ │ │ - 0x00967540 28746578 2c20636f 6f726429 20746578 (tex, coord) tex │ │ │ │ - 0x00967550 74757265 4c6f6428 7465782c 20636f6f tureLod(tex, coo │ │ │ │ - 0x00967560 72642c20 302e3029 200a2020 23646566 rd, 0.0) . #def │ │ │ │ - 0x00967570 696e6520 534d4141 53616d70 6c654c65 ine SMAASampleLe │ │ │ │ - 0x00967580 76656c5a 65726f4f 66667365 74287465 velZeroOffset(te │ │ │ │ - 0x00967590 782c2063 6f6f7264 2c206f66 66736574 x, coord, offset │ │ │ │ - 0x009675a0 29207465 78747572 654c6f64 4f666673 ) textureLodOffs │ │ │ │ - 0x009675b0 65742874 65782c20 636f6f72 642c2030 et(tex, coord, 0 │ │ │ │ - 0x009675c0 2e302c20 6f666673 65742920 0a202023 .0, offset) . # │ │ │ │ - 0x009675d0 64656669 6e652053 4d414152 6f756e64 define SMAARound │ │ │ │ - 0x009675e0 28762920 726f756e 64282876 2929200a (v) round((v)) . │ │ │ │ - 0x009675f0 20202364 6566696e 6520534d 41414f66 #define SMAAOf │ │ │ │ - 0x00967600 66736574 28782c79 29206976 65633228 fset(x,y) ivec2( │ │ │ │ - 0x00967610 782c7929 200a2020 636f6e73 74207665 x,y) . const ve │ │ │ │ - 0x00967620 6332206b 41726561 5465784d 61784469 c2 kAreaTexMaxDi │ │ │ │ - 0x00967630 7374616e 6365203d 20766563 3228534d stance = vec2(SM │ │ │ │ - 0x00967640 41415f41 52454154 45585f4d 41585f44 AA_AREATEX_MAX_D │ │ │ │ - 0x00967650 49535441 4e43452c 20534d41 415f4152 ISTANCE, SMAA_AR │ │ │ │ - 0x00967660 45415445 585f4d41 585f4449 5354414e EATEX_MAX_DISTAN │ │ │ │ - 0x00967670 4345293b 200a2020 636f6e73 7420666c CE); . const fl │ │ │ │ - 0x00967680 6f617420 6b416374 69766174 696f6e54 oat kActivationT │ │ │ │ - 0x00967690 68726573 686f6c64 203d2030 2e383238 hreshold = 0.828 │ │ │ │ - 0x009676a0 313b200a 2020666c 6f617420 534d4141 1; . float SMAA │ │ │ │ - 0x009676b0 53656172 63684c65 6e677468 28766563 SearchLength(vec │ │ │ │ - 0x009676c0 3220652c 20666c6f 6174206f 66667365 2 e, float offse │ │ │ │ - 0x009676d0 7429200a 20207b20 0a202020 20766563 t) . { . vec │ │ │ │ - 0x009676e0 32207363 616c6520 3d20534d 41415f53 2 scale = SMAA_S │ │ │ │ - 0x009676f0 45415243 48544558 5f53495a 45202a20 EARCHTEX_SIZE * │ │ │ │ - 0x00967700 76656332 28302e35 2c202d31 2e30293b vec2(0.5, -1.0); │ │ │ │ - 0x00967710 200a2020 20207665 63322062 69617320 . vec2 bias │ │ │ │ - 0x00967720 3d20534d 41415f53 45415243 48544558 = SMAA_SEARCHTEX │ │ │ │ - 0x00967730 5f53495a 45202a20 76656332 286f6666 _SIZE * vec2(off │ │ │ │ - 0x00967740 7365742c 20312e30 293b200a 20202020 set, 1.0); . │ │ │ │ - 0x00967750 7363616c 65202b3d 20766563 32282d31 scale += vec2(-1 │ │ │ │ - 0x00967760 2e302c20 20312e30 293b200a 20202020 .0, 1.0); . │ │ │ │ - 0x00967770 62696173 202b3d20 76656332 2820302e bias += vec2( 0. │ │ │ │ - 0x00967780 352c202d 302e3529 3b200a20 20202073 5, -0.5); . s │ │ │ │ - 0x00967790 63616c65 202a3d20 312e3020 2f20534d cale *= 1.0 / SM │ │ │ │ - 0x009677a0 41415f53 45415243 48544558 5f504143 AA_SEARCHTEX_PAC │ │ │ │ - 0x009677b0 4b45445f 53495a45 3b200a20 20202062 KED_SIZE; . b │ │ │ │ - 0x009677c0 69617320 2a3d2031 2e30202f 20534d41 ias *= 1.0 / SMA │ │ │ │ - 0x009677d0 415f5345 41524348 5445585f 5041434b A_SEARCHTEX_PACK │ │ │ │ - 0x009677e0 45445f53 495a453b 200a2020 20207265 ED_SIZE; . re │ │ │ │ - 0x009677f0 7475726e 20534d41 4153616d 706c654c turn SMAASampleL │ │ │ │ - 0x00967800 6576656c 5a65726f 28755f73 6d616153 evelZero(u_smaaS │ │ │ │ - 0x00967810 65617263 682c2073 63616c65 202a2065 earch, scale * e │ │ │ │ - 0x00967820 202b2062 69617329 2e723b20 0a20207d + bias).r; . } │ │ │ │ - 0x00967830 200a2020 666c6f61 7420534d 41415365 . float SMAASe │ │ │ │ - 0x00967840 61726368 584c6566 74287665 63322074 archXLeft(vec2 t │ │ │ │ - 0x00967850 6578636f 6f72642c 20666c6f 61742065 excoord, float e │ │ │ │ - 0x00967860 6e642920 0a20207b 200a2020 20207665 nd) . { . ve │ │ │ │ - 0x00967870 63322065 203d2076 65633228 302e302c c2 e = vec2(0.0, │ │ │ │ - 0x00967880 20312e30 293b200a 20202020 534d4141 1.0); . SMAA │ │ │ │ - 0x00967890 4c6f6f70 42656769 6e287465 78636f6f LoopBegin(texcoo │ │ │ │ - 0x009678a0 72642e78 203e2065 6e642026 2620652e rd.x > end && e. │ │ │ │ - 0x009678b0 67203e20 6b416374 69766174 696f6e54 g > kActivationT │ │ │ │ - 0x009678c0 68726573 686f6c64 20262620 652e7220 hreshold && e.r │ │ │ │ - 0x009678d0 3d3d2030 2e302920 0a202020 20202065 == 0.0) . e │ │ │ │ - 0x009678e0 203d2053 4d414153 616d706c 654c6576 = SMAASampleLev │ │ │ │ - 0x009678f0 656c5a65 726f2875 5f636f6c 6f725465 elZero(u_colorTe │ │ │ │ - 0x00967900 782c2074 6578636f 6f726429 2e72673b x, texcoord).rg; │ │ │ │ - 0x00967910 200a2020 20202020 74657863 6f6f7264 . texcoord │ │ │ │ - 0x00967920 203d2076 65633228 2d322e30 2c20302e = vec2(-2.0, 0. │ │ │ │ - 0x00967930 3029202a 20755f66 72616d65 62756666 0) * u_framebuff │ │ │ │ - 0x00967940 65724d65 74726963 732e7879 202b2074 erMetrics.xy + t │ │ │ │ - 0x00967950 6578636f 6f72643b 200a2020 2020534d excoord; . SM │ │ │ │ - 0x00967960 41414c6f 6f70456e 64200a20 20202066 AALoopEnd . f │ │ │ │ - 0x00967970 6c6f6174 206f6666 73657420 3d20332e loat offset = 3. │ │ │ │ - 0x00967980 3235202d 20283235 352e3020 2f203132 25 - (255.0 / 12 │ │ │ │ - 0x00967990 372e3029 202a2053 4d414153 65617263 7.0) * SMAASearc │ │ │ │ - 0x009679a0 684c656e 67746828 652c2030 2e30293b hLength(e, 0.0); │ │ │ │ - 0x009679b0 200a2020 20207265 7475726e 20755f66 . return u_f │ │ │ │ - 0x009679c0 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ - 0x009679d0 732e7820 2a206f66 66736574 202b2074 s.x * offset + t │ │ │ │ - 0x009679e0 6578636f 6f72642e 783b200a 20207d20 excoord.x; . } │ │ │ │ - 0x009679f0 0a202066 6c6f6174 20534d41 41536561 . float SMAASea │ │ │ │ - 0x00967a00 72636858 52696768 74287665 63322074 rchXRight(vec2 t │ │ │ │ - 0x00967a10 6578636f 6f72642c 20666c6f 61742065 excoord, float e │ │ │ │ - 0x00967a20 6e642920 0a20207b 200a2020 20207665 nd) . { . ve │ │ │ │ - 0x00967a30 63322065 203d2076 65633228 302e302c c2 e = vec2(0.0, │ │ │ │ - 0x00967a40 20312e30 293b200a 20202020 534d4141 1.0); . SMAA │ │ │ │ - 0x00967a50 4c6f6f70 42656769 6e287465 78636f6f LoopBegin(texcoo │ │ │ │ - 0x00967a60 72642e78 203c2065 6e642026 2620652e rd.x < end && e. │ │ │ │ - 0x00967a70 67203e20 6b416374 69766174 696f6e54 g > kActivationT │ │ │ │ - 0x00967a80 68726573 686f6c64 20262620 652e7220 hreshold && e.r │ │ │ │ - 0x00967a90 3d3d2030 2e302920 0a202020 20202065 == 0.0) . e │ │ │ │ - 0x00967aa0 203d2053 4d414153 616d706c 654c6576 = SMAASampleLev │ │ │ │ - 0x00967ab0 656c5a65 726f2875 5f636f6c 6f725465 elZero(u_colorTe │ │ │ │ - 0x00967ac0 782c2074 6578636f 6f726429 2e72673b x, texcoord).rg; │ │ │ │ - 0x00967ad0 200a2020 20202020 74657863 6f6f7264 . texcoord │ │ │ │ - 0x00967ae0 203d2076 65633228 322e302c 20302e30 = vec2(2.0, 0.0 │ │ │ │ - 0x00967af0 29202a20 755f6672 616d6562 75666665 ) * u_framebuffe │ │ │ │ - 0x00967b00 724d6574 72696373 2e787920 2b207465 rMetrics.xy + te │ │ │ │ - 0x00967b10 78636f6f 72643b20 0a202020 20534d41 xcoord; . SMA │ │ │ │ - 0x00967b20 414c6f6f 70456e64 200a2020 2020666c ALoopEnd . fl │ │ │ │ - 0x00967b30 6f617420 6f666673 6574203d 20332e32 oat offset = 3.2 │ │ │ │ - 0x00967b40 35202d20 28323535 2e30202f 20313237 5 - (255.0 / 127 │ │ │ │ - 0x00967b50 2e302920 2a20534d 41415365 61726368 .0) * SMAASearch │ │ │ │ - 0x00967b60 4c656e67 74682865 2c20302e 35293b20 Length(e, 0.5); │ │ │ │ - 0x00967b70 0a202020 20726574 75726e20 2d755f66 . return -u_f │ │ │ │ - 0x00967b80 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ - 0x00967b90 732e7820 2a206f66 66736574 202b2074 s.x * offset + t │ │ │ │ - 0x00967ba0 6578636f 6f72642e 783b200a 20207d20 excoord.x; . } │ │ │ │ - 0x00967bb0 0a202066 6c6f6174 20534d41 41536561 . float SMAASea │ │ │ │ - 0x00967bc0 72636859 55702876 65633220 74657863 rchYUp(vec2 texc │ │ │ │ - 0x00967bd0 6f6f7264 2c20666c 6f617420 656e6429 oord, float end) │ │ │ │ - 0x00967be0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ - 0x00967bf0 65203d20 76656332 28312e30 2c20302e e = vec2(1.0, 0. │ │ │ │ - 0x00967c00 30293b20 0a202020 20534d41 414c6f6f 0); . SMAALoo │ │ │ │ - 0x00967c10 70426567 696e2874 6578636f 6f72642e pBegin(texcoord. │ │ │ │ - 0x00967c20 79203e20 656e6420 26262065 2e72203e y > end && e.r > │ │ │ │ - 0x00967c30 206b4163 74697661 74696f6e 54687265 kActivationThre │ │ │ │ - 0x00967c40 73686f6c 64202626 20652e67 203d3d20 shold && e.g == │ │ │ │ - 0x00967c50 302e3029 200a2020 20202020 65203d20 0.0) . e = │ │ │ │ - 0x00967c60 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ - 0x00967c70 65726f28 755f636f 6c6f7254 65782c20 ero(u_colorTex, │ │ │ │ - 0x00967c80 74657863 6f6f7264 292e7267 3b200a20 texcoord).rg; . │ │ │ │ - 0x00967c90 20202020 20746578 636f6f72 64203d20 texcoord = │ │ │ │ - 0x00967ca0 76656332 28302e30 2c202d32 2e302920 vec2(0.0, -2.0) │ │ │ │ - 0x00967cb0 2a20755f 6672616d 65627566 6665724d * u_framebufferM │ │ │ │ - 0x00967cc0 65747269 63732e78 79202b20 74657863 etrics.xy + texc │ │ │ │ - 0x00967cd0 6f6f7264 3b200a20 20202053 4d41414c oord; . SMAAL │ │ │ │ - 0x00967ce0 6f6f7045 6e64200a 20202020 666c6f61 oopEnd . floa │ │ │ │ - 0x00967cf0 74206f66 66736574 203d2033 2e323520 t offset = 3.25 │ │ │ │ - 0x00967d00 2d202832 35352e30 202f2031 32372e30 - (255.0 / 127.0 │ │ │ │ - 0x00967d10 29202a20 534d4141 53656172 63684c65 ) * SMAASearchLe │ │ │ │ - 0x00967d20 6e677468 28652e67 722c2030 2e30293b ngth(e.gr, 0.0); │ │ │ │ - 0x00967d30 200a2020 20207265 7475726e 20755f66 . return u_f │ │ │ │ - 0x00967d40 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ - 0x00967d50 732e7920 2a206f66 66736574 202b2074 s.y * offset + t │ │ │ │ - 0x00967d60 6578636f 6f72642e 793b200a 20207d20 excoord.y; . } │ │ │ │ - 0x00967d70 0a202066 6c6f6174 20534d41 41536561 . float SMAASea │ │ │ │ - 0x00967d80 72636859 446f776e 28766563 32207465 rchYDown(vec2 te │ │ │ │ - 0x00967d90 78636f6f 72642c20 666c6f61 7420656e xcoord, float en │ │ │ │ - 0x00967da0 6429200a 20207b20 0a202020 20766563 d) . { . vec │ │ │ │ - 0x00967db0 32206520 3d207665 63322831 2e302c20 2 e = vec2(1.0, │ │ │ │ - 0x00967dc0 302e3029 3b200a20 20202053 4d41414c 0.0); . SMAAL │ │ │ │ - 0x00967dd0 6f6f7042 6567696e 28746578 636f6f72 oopBegin(texcoor │ │ │ │ - 0x00967de0 642e7920 3c20656e 64202626 20652e72 d.y < end && e.r │ │ │ │ - 0x00967df0 203e206b 41637469 76617469 6f6e5468 > kActivationTh │ │ │ │ - 0x00967e00 72657368 6f6c6420 26262065 2e67203d reshold && e.g = │ │ │ │ - 0x00967e10 3d20302e 3029200a 20202020 20206520 = 0.0) . e │ │ │ │ - 0x00967e20 3d20534d 41415361 6d706c65 4c657665 = SMAASampleLeve │ │ │ │ - 0x00967e30 6c5a6572 6f28755f 636f6c6f 72546578 lZero(u_colorTex │ │ │ │ - 0x00967e40 2c207465 78636f6f 7264292e 72673b20 , texcoord).rg; │ │ │ │ - 0x00967e50 0a202020 20202074 6578636f 6f726420 . texcoord │ │ │ │ - 0x00967e60 3d207665 63322830 2e302c20 322e3029 = vec2(0.0, 2.0) │ │ │ │ - 0x00967e70 202a2075 5f667261 6d656275 66666572 * u_framebuffer │ │ │ │ - 0x00967e80 4d657472 6963732e 7879202b 20746578 Metrics.xy + tex │ │ │ │ - 0x00967e90 636f6f72 643b200a 20202020 534d4141 coord; . SMAA │ │ │ │ - 0x00967ea0 4c6f6f70 456e6420 0a202020 20666c6f LoopEnd . flo │ │ │ │ - 0x00967eb0 6174206f 66667365 74203d20 332e3235 at offset = 3.25 │ │ │ │ - 0x00967ec0 202d2028 3235352e 30202f20 3132372e - (255.0 / 127. │ │ │ │ - 0x00967ed0 3029202a 20534d41 41536561 7263684c 0) * SMAASearchL │ │ │ │ - 0x00967ee0 656e6774 6828652e 67722c20 302e3529 ength(e.gr, 0.5) │ │ │ │ - 0x00967ef0 3b200a20 20202072 65747572 6e202d75 ; . return -u │ │ │ │ - 0x00967f00 5f667261 6d656275 66666572 4d657472 _framebufferMetr │ │ │ │ - 0x00967f10 6963732e 79202a20 6f666673 6574202b ics.y * offset + │ │ │ │ - 0x00967f20 20746578 636f6f72 642e793b 200a2020 texcoord.y; . │ │ │ │ - 0x00967f30 7d200a20 20766563 3220534d 41414172 } . vec2 SMAAAr │ │ │ │ - 0x00967f40 65612876 65633220 64697374 2c20666c ea(vec2 dist, fl │ │ │ │ - 0x00967f50 6f617420 65312c20 666c6f61 74206532 oat e1, float e2 │ │ │ │ - 0x00967f60 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ - 0x00967f70 20746578 636f6f72 64203d20 6b417265 texcoord = kAre │ │ │ │ - 0x00967f80 61546578 4d617844 69737461 6e636520 aTexMaxDistance │ │ │ │ - 0x00967f90 2a20534d 4141526f 756e6428 342e3020 * SMAARound(4.0 │ │ │ │ - 0x00967fa0 2a207665 63322865 312c2065 32292920 * vec2(e1, e2)) │ │ │ │ - 0x00967fb0 2b206469 73743b20 0a202020 20746578 + dist; . tex │ │ │ │ - 0x00967fc0 636f6f72 64203d20 534d4141 5f415245 coord = SMAA_ARE │ │ │ │ - 0x00967fd0 41544558 5f504958 454c5f53 495a4520 ATEX_PIXEL_SIZE │ │ │ │ - 0x00967fe0 2a202874 6578636f 6f726420 2b20302e * (texcoord + 0. │ │ │ │ - 0x00967ff0 35293b20 0a202020 20726574 75726e20 5); . return │ │ │ │ - 0x00968000 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ - 0x00968010 65726f28 755f736d 61614172 65612c20 ero(u_smaaArea, │ │ │ │ - 0x00968020 74657863 6f6f7264 292e7267 3b200a20 texcoord).rg; . │ │ │ │ - 0x00968030 207d200a 2020636f 6e737420 666c6f61 } . const floa │ │ │ │ - 0x00968040 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00968050 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00968060 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ - 0x00968070 7b200a20 20202076 65633420 77656967 { . vec4 weig │ │ │ │ - 0x00968080 68747320 3d207665 63342830 2e302c20 hts = vec4(0.0, │ │ │ │ - 0x00968090 302e302c 20302e30 2c20302e 30293b20 0.0, 0.0, 0.0); │ │ │ │ - 0x009680a0 0a202020 20766563 32206520 3d207465 . vec2 e = te │ │ │ │ - 0x009680b0 78747572 6528755f 636f6c6f 72546578 xture(u_colorTex │ │ │ │ - 0x009680c0 2c20765f 636f6f72 64732e78 79292e72 , v_coords.xy).r │ │ │ │ - 0x009680d0 673b200a 20202020 69662028 652e6720 g; . if (e.g │ │ │ │ - 0x009680e0 3e20302e 3029202f 2f204564 67652061 > 0.0) // Edge a │ │ │ │ - 0x009680f0 74206e6f 72746820 0a202020 207b200a t north . { . │ │ │ │ - 0x00968100 20202020 20207665 63322064 3b200a20 vec2 d; . │ │ │ │ - 0x00968110 20202020 20766563 3320636f 6f726473 vec3 coords │ │ │ │ - 0x00968120 3b200a20 20202020 20636f6f 7264732e ; . coords. │ │ │ │ - 0x00968130 78203d20 534d4141 53656172 6368584c x = SMAASearchXL │ │ │ │ - 0x00968140 65667428 765f6f66 66736574 302e7879 eft(v_offset0.xy │ │ │ │ - 0x00968150 2c20765f 6f666673 6574322e 78293b20 , v_offset2.x); │ │ │ │ - 0x00968160 0a202020 20202063 6f6f7264 732e7920 . coords.y │ │ │ │ - 0x00968170 3d20765f 6f666673 6574312e 793b200a = v_offset1.y; . │ │ │ │ - 0x00968180 20202020 2020642e 78203d20 636f6f72 d.x = coor │ │ │ │ - 0x00968190 64732e78 3b200a20 20202020 20666c6f ds.x; . flo │ │ │ │ - 0x009681a0 61742065 31203d20 534d4141 53616d70 at e1 = SMAASamp │ │ │ │ - 0x009681b0 6c654c65 76656c5a 65726f28 755f636f leLevelZero(u_co │ │ │ │ - 0x009681c0 6c6f7254 65782c20 636f6f72 64732e78 lorTex, coords.x │ │ │ │ - 0x009681d0 79292e72 3b200a20 20202020 20636f6f y).r; . coo │ │ │ │ - 0x009681e0 7264732e 7a203d20 534d4141 53656172 rds.z = SMAASear │ │ │ │ - 0x009681f0 63685852 69676874 28765f6f 66667365 chXRight(v_offse │ │ │ │ - 0x00968200 74302e7a 772c2076 5f6f6666 73657432 t0.zw, v_offset2 │ │ │ │ - 0x00968210 2e79293b 200a2020 20202020 642e7920 .y); . d.y │ │ │ │ - 0x00968220 3d20636f 6f726473 2e7a3b20 0a202020 = coords.z; . │ │ │ │ - 0x00968230 20202076 65633220 7a7a203d 20755f66 vec2 zz = u_f │ │ │ │ - 0x00968240 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ - 0x00968250 732e7a7a 3b200a20 20202020 2064203d s.zz; . d = │ │ │ │ - 0x00968260 20616273 28534d41 41526f75 6e64287a abs(SMAARound(z │ │ │ │ - 0x00968270 7a202a20 64202d20 765f636f 6f726473 z * d - v_coords │ │ │ │ - 0x00968280 2e7a7a29 293b200a 20202020 20207665 .zz)); . ve │ │ │ │ - 0x00968290 63322073 7172745f 64203d20 73717274 c2 sqrt_d = sqrt │ │ │ │ - 0x009682a0 2864293b 200a2020 20202020 666c6f61 (d); . floa │ │ │ │ - 0x009682b0 74206532 203d2053 4d414153 616d706c t e2 = SMAASampl │ │ │ │ - 0x009682c0 654c6576 656c5a65 726f4f66 66736574 eLevelZeroOffset │ │ │ │ - 0x009682d0 28755f63 6f6c6f72 5465782c 20636f6f (u_colorTex, coo │ │ │ │ - 0x009682e0 7264732e 7a792c20 534d4141 4f666673 rds.zy, SMAAOffs │ │ │ │ - 0x009682f0 65742831 2c203029 292e723b 200a2020 et(1, 0)).r; . │ │ │ │ - 0x00968300 20202020 77656967 6874732e 7267203d weights.rg = │ │ │ │ - 0x00968310 20534d41 41417265 61287371 72745f64 SMAAArea(sqrt_d │ │ │ │ - 0x00968320 2c206531 2c206532 293b200a 20202020 , e1, e2); . │ │ │ │ - 0x00968330 7d200a20 20202069 66202865 2e72203e } . if (e.r > │ │ │ │ - 0x00968340 20302e30 29202f2f 20456467 65206174 0.0) // Edge at │ │ │ │ - 0x00968350 20776573 74200a20 2020207b 200a2020 west . { . │ │ │ │ - 0x00968360 20202020 76656332 20643b20 0a202020 vec2 d; . │ │ │ │ - 0x00968370 20202076 65633320 636f6f72 64733b20 vec3 coords; │ │ │ │ - 0x00968380 0a202020 20202063 6f6f7264 732e7920 . coords.y │ │ │ │ - 0x00968390 3d20534d 41415365 61726368 59557028 = SMAASearchYUp( │ │ │ │ - 0x009683a0 765f6f66 66736574 312e7879 2c20765f v_offset1.xy, v_ │ │ │ │ - 0x009683b0 6f666673 6574322e 7a293b20 0a202020 offset2.z); . │ │ │ │ - 0x009683c0 20202063 6f6f7264 732e7820 3d20765f coords.x = v_ │ │ │ │ - 0x009683d0 6f666673 6574302e 783b200a 20202020 offset0.x; . │ │ │ │ - 0x009683e0 2020642e 78203d20 636f6f72 64732e79 d.x = coords.y │ │ │ │ - 0x009683f0 3b200a20 20202020 20666c6f 61742065 ; . float e │ │ │ │ - 0x00968400 31203d20 534d4141 53616d70 6c654c65 1 = SMAASampleLe │ │ │ │ - 0x00968410 76656c5a 65726f28 755f636f 6c6f7254 velZero(u_colorT │ │ │ │ - 0x00968420 65782c20 636f6f72 64732e78 79292e67 ex, coords.xy).g │ │ │ │ - 0x00968430 3b200a20 20202020 20636f6f 7264732e ; . coords. │ │ │ │ - 0x00968440 7a203d20 534d4141 53656172 63685944 z = SMAASearchYD │ │ │ │ - 0x00968450 6f776e28 765f6f66 66736574 312e7a77 own(v_offset1.zw │ │ │ │ - 0x00968460 2c20765f 6f666673 6574322e 77293b20 , v_offset2.w); │ │ │ │ - 0x00968470 0a202020 20202064 2e79203d 20636f6f . d.y = coo │ │ │ │ - 0x00968480 7264732e 7a3b200a 20202020 20207665 rds.z; . ve │ │ │ │ - 0x00968490 63322077 77203d20 755f6672 616d6562 c2 ww = u_frameb │ │ │ │ - 0x009684a0 75666665 724d6574 72696373 2e77773b ufferMetrics.ww; │ │ │ │ - 0x009684b0 200a2020 20202020 64203d20 61627328 . d = abs( │ │ │ │ - 0x009684c0 534d4141 526f756e 64287777 202a2064 SMAARound(ww * d │ │ │ │ - 0x009684d0 202d2076 5f636f6f 7264732e 77772929 - v_coords.ww)) │ │ │ │ - 0x009684e0 3b200a20 20202020 20766563 32207371 ; . vec2 sq │ │ │ │ - 0x009684f0 72745f64 203d2073 71727428 64293b20 rt_d = sqrt(d); │ │ │ │ - 0x00968500 0a202020 20202066 6c6f6174 20653220 . float e2 │ │ │ │ - 0x00968510 3d20534d 41415361 6d706c65 4c657665 = SMAASampleLeve │ │ │ │ - 0x00968520 6c5a6572 6f4f6666 73657428 755f636f lZeroOffset(u_co │ │ │ │ - 0x00968530 6c6f7254 65782c20 636f6f72 64732e78 lorTex, coords.x │ │ │ │ - 0x00968540 7a2c2053 4d41414f 66667365 7428302c z, SMAAOffset(0, │ │ │ │ - 0x00968550 20312929 2e673b20 0a202020 20202077 1)).g; . w │ │ │ │ - 0x00968560 65696768 74732e62 61203d20 534d4141 eights.ba = SMAA │ │ │ │ - 0x00968570 41726561 28737172 745f642c 2065312c Area(sqrt_d, e1, │ │ │ │ - 0x00968580 20653229 3b200a20 2020207d 200a2020 e2); . } . │ │ │ │ - 0x00968590 2020765f 46726167 436f6c6f 72203d20 v_FragColor = │ │ │ │ - 0x009685a0 77656967 6874733b 200a2020 7d200a00 weights; . } .. │ │ │ │ - 0x009685b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009685c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009685d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009685e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009685f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00968600 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00968610 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00968620 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00968630 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00968640 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00968650 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00968660 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00968670 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00968680 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00968690 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009686a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009686b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009686c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009686d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009686e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009686f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00968700 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ - 0x00968710 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ - 0x00968720 20206f75 74207665 63342076 5f636f6f out vec4 v_coo │ │ │ │ - 0x00968730 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ - 0x00968740 20765f6f 66667365 74303b20 0a20206f v_offset0; . o │ │ │ │ - 0x00968750 75742076 65633420 765f6f66 66736574 ut vec4 v_offset │ │ │ │ - 0x00968760 313b200a 20206f75 74207665 63342076 1; . out vec4 v │ │ │ │ - 0x00968770 5f6f6666 73657432 3b200a20 20756e69 _offset2; . uni │ │ │ │ - 0x00968780 666f726d 20766563 3420755f 6672616d form vec4 u_fram │ │ │ │ - 0x00968790 65627566 6665724d 65747269 63733b20 ebufferMetrics; │ │ │ │ - 0x009687a0 0a202023 64656669 6e652053 4d41415f . #define SMAA_ │ │ │ │ - 0x009687b0 4d41585f 53454152 43485f53 54455053 MAX_SEARCH_STEPS │ │ │ │ - 0x009687c0 20382e30 200a2020 636f6e73 74207665 8.0 . const ve │ │ │ │ - 0x009687d0 6334206b 4d617853 65617263 68537465 c4 kMaxSearchSte │ │ │ │ - 0x009687e0 7073203d 20766563 34282d32 2e30202a ps = vec4(-2.0 * │ │ │ │ - 0x009687f0 20534d41 415f4d41 585f5345 41524348 SMAA_MAX_SEARCH │ │ │ │ - 0x00968800 5f535445 50532c20 322e3020 2a20534d _STEPS, 2.0 * SM │ │ │ │ - 0x00968810 41415f4d 41585f53 45415243 485f5354 AA_MAX_SEARCH_ST │ │ │ │ - 0x00968820 4550532c 200a2020 20202020 20202020 EPS, . │ │ │ │ - 0x00968830 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00968840 20202020 20202020 20202d32 2e30202a -2.0 * │ │ │ │ - 0x00968850 20534d41 415f4d41 585f5345 41524348 SMAA_MAX_SEARCH │ │ │ │ - 0x00968860 5f535445 50532c20 322e3020 202a2053 _STEPS, 2.0 * S │ │ │ │ - 0x00968870 4d41415f 4d41585f 53454152 43485f53 MAA_MAX_SEARCH_S │ │ │ │ - 0x00968880 54455053 293b200a 2020636f 6e737420 TEPS); . const │ │ │ │ - 0x00968890 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ - 0x009688a0 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ - 0x009688b0 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ - 0x009688c0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x009688d0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x009688e0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x009688f0 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ - 0x00968900 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x00968910 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00968920 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ - 0x00968930 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ - 0x00968940 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ - 0x00968950 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00968960 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ - 0x00968970 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ - 0x00968980 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00968990 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x009689a0 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ - 0x009689b0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009689c0 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ - 0x009689d0 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ - 0x009689e0 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ - 0x009689f0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00968a00 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ - 0x00968a10 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ - 0x00968a20 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00968a30 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ - 0x00968a40 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ - 0x00968a50 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00968a60 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ - 0x00968a70 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ - 0x00968a80 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ - 0x00968a90 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ - 0x00968aa0 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ - 0x00968ab0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x00968ac0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x00968ad0 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x00968ae0 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ - 0x00968af0 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ - 0x00968b00 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ - 0x00968b10 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ - 0x00968b20 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ - 0x00968b30 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00968b40 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ - 0x00968b50 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ - 0x00968b60 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00968b70 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ - 0x00968b80 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ - 0x00968b90 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x00968ba0 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ - 0x00968bb0 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ - 0x00968bc0 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ - 0x00968bd0 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ - 0x00968be0 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ - 0x00968bf0 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ - 0x00968c00 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ - 0x00968c10 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ - 0x00968c20 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ - 0x00968c30 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ - 0x00968c40 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ - 0x00968c50 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ - 0x00968c60 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ - 0x00968c70 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ - 0x00968c80 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ - 0x00968c90 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ - 0x00968ca0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ - 0x00968cb0 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ - 0x00968cc0 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ - 0x00968cd0 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ - 0x00968ce0 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ - 0x00968cf0 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ - 0x00968d00 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ - 0x00968d10 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ - 0x00968d20 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ - 0x00968d30 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ - 0x00968d40 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ - 0x00968d50 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ - 0x00968d60 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x00968d70 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ - 0x00968d80 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ - 0x00968d90 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ - 0x00968da0 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ - 0x00968db0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00968dc0 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ - 0x00968dd0 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ - 0x00968de0 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ - 0x00968df0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x00968e00 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ - 0x00968e10 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ - 0x00968e20 0a20207b 200a2020 2020765f 636f6f72 . { . v_coor │ │ │ │ - 0x00968e30 6473203d 20766563 3428615f 74636f6f ds = vec4(a_tcoo │ │ │ │ - 0x00968e40 72642c20 615f7463 6f6f7264 202a2075 rd, a_tcoord * u │ │ │ │ - 0x00968e50 5f667261 6d656275 66666572 4d657472 _framebufferMetr │ │ │ │ - 0x00968e60 6963732e 7a77293b 200a2020 2020765f ics.zw); . v_ │ │ │ │ - 0x00968e70 6f666673 65743020 3d20755f 6672616d offset0 = u_fram │ │ │ │ - 0x00968e80 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00968e90 79787920 2a207665 6334282d 302e3235 yxy * vec4(-0.25 │ │ │ │ - 0x00968ea0 2c202d30 2e313235 2c20312e 32352c20 , -0.125, 1.25, │ │ │ │ - 0x00968eb0 2d302e31 32352920 2b20615f 74636f6f -0.125) + a_tcoo │ │ │ │ - 0x00968ec0 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ - 0x00968ed0 6f666673 65743120 3d20755f 6672616d offset1 = u_fram │ │ │ │ - 0x00968ee0 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00968ef0 79787920 2a207665 6334282d 302e3132 yxy * vec4(-0.12 │ │ │ │ - 0x00968f00 352c202d 302e3235 2c202d30 2e313235 5, -0.25, -0.125 │ │ │ │ - 0x00968f10 2c20312e 32352920 2b20615f 74636f6f , 1.25) + a_tcoo │ │ │ │ - 0x00968f20 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ - 0x00968f30 6f666673 65743220 3d20755f 6672616d offset2 = u_fram │ │ │ │ - 0x00968f40 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ - 0x00968f50 78797920 2a206b4d 61785365 61726368 xyy * kMaxSearch │ │ │ │ - 0x00968f60 53746570 73202b20 76656334 28765f6f Steps + vec4(v_o │ │ │ │ - 0x00968f70 66667365 74302e78 7a2c2076 5f6f6666 ffset0.xz, v_off │ │ │ │ - 0x00968f80 73657431 2e797729 3b200a20 20202067 set1.yw); . g │ │ │ │ - 0x00968f90 6c5f506f 73697469 6f6e203d 20766563 l_Position = vec │ │ │ │ - 0x00968fa0 3428615f 706f732c 20302e30 2c20312e 4(a_pos, 0.0, 1. │ │ │ │ - 0x00968fb0 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ - 0x00968fc0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00968fd0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00968fe0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00968ff0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00969000 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00969010 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00969020 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00969030 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00969040 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00969050 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00969060 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00969070 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00969080 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00969090 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x009690a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x009690b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x009690c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009690d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009690e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009690f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00969100 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00969110 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ - 0x00969120 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ - 0x00969130 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x00969140 6f725465 78436f6f 7264733b 200a2020 orTexCoords; . │ │ │ │ - 0x00969150 6f757420 76656334 20765f6f 66667365 out vec4 v_offse │ │ │ │ - 0x00969160 74303b20 0a20206f 75742076 65633420 t0; . out vec4 │ │ │ │ - 0x00969170 765f6f66 66736574 313b200a 20206f75 v_offset1; . ou │ │ │ │ - 0x00969180 74207665 63342076 5f6f6666 73657432 t vec4 v_offset2 │ │ │ │ - 0x00969190 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x009691a0 3420755f 6672616d 65627566 6665724d 4 u_framebufferM │ │ │ │ - 0x009691b0 65747269 63733b20 0a202063 6f6e7374 etrics; . const │ │ │ │ - 0x009691c0 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x009691d0 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x009691e0 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x009691f0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x00969200 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x00969210 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00969220 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x00969230 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x00969240 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00969250 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x00969260 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x00969270 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x00969280 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00969290 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x009692a0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x009692b0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x009692c0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x009692d0 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x009692e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009692f0 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x00969300 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x00969310 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x00969320 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00969330 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x00969340 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x00969350 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x00969360 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x00969370 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x00969380 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00969390 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x009693a0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x009693b0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x009693c0 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x009693d0 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x009693e0 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x009693f0 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x00969400 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x00969410 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x00969420 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x00969430 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x00969440 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x00969450 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x00969460 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x00969470 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x00969480 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x00969490 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x009694a0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x009694b0 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x009694c0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x009694d0 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x009694e0 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x009694f0 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x00969500 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00969510 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x00969520 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x00969530 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x00969540 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x00969550 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x00969560 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x00969570 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x00969580 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x00969590 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x009695a0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x009695b0 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x009695c0 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x009695d0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x009695e0 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x009695f0 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x00969600 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00969610 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x00969620 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x00969630 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x00969640 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x00969650 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x00969660 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x00969670 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x00969680 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x00969690 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x009696a0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x009696b0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x009696c0 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x009696d0 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x009696e0 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x009696f0 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x00969700 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x00969710 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x00969720 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00969730 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x00969740 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x00969750 200a2020 7b200a20 20202076 5f636f6c . { . v_col │ │ │ │ - 0x00969760 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ - 0x00969770 74636f6f 72643b20 0a202020 20765f6f tcoord; . v_o │ │ │ │ - 0x00969780 66667365 7430203d 20755f66 72616d65 ffset0 = u_frame │ │ │ │ - 0x00969790 62756666 65724d65 74726963 732e7879 bufferMetrics.xy │ │ │ │ - 0x009697a0 7879202a 20766563 34282d31 2e302c20 xy * vec4(-1.0, │ │ │ │ - 0x009697b0 302e302c 20302e30 2c202d31 2e302920 0.0, 0.0, -1.0) │ │ │ │ - 0x009697c0 2b20615f 74636f6f 72642e78 7978793b + a_tcoord.xyxy; │ │ │ │ - 0x009697d0 200a2020 2020765f 6f666673 65743120 . v_offset1 │ │ │ │ - 0x009697e0 3d20755f 6672616d 65627566 6665724d = u_framebufferM │ │ │ │ - 0x009697f0 65747269 63732e78 79787920 2a207665 etrics.xyxy * ve │ │ │ │ - 0x00969800 63342820 312e302c 20302e30 2c20302e c4( 1.0, 0.0, 0. │ │ │ │ - 0x00969810 302c2020 312e3029 202b2061 5f74636f 0, 1.0) + a_tco │ │ │ │ - 0x00969820 6f72642e 78797879 3b200a20 20202076 ord.xyxy; . v │ │ │ │ - 0x00969830 5f6f6666 73657432 203d2075 5f667261 _offset2 = u_fra │ │ │ │ - 0x00969840 6d656275 66666572 4d657472 6963732e mebufferMetrics. │ │ │ │ - 0x00969850 78797879 202a2076 65633428 2d322e30 xyxy * vec4(-2.0 │ │ │ │ - 0x00969860 2c20302e 302c2030 2e302c20 2d322e30 , 0.0, 0.0, -2.0 │ │ │ │ - 0x00969870 29202b20 615f7463 6f6f7264 2e787978 ) + a_tcoord.xyx │ │ │ │ - 0x00969880 793b200a 20202020 676c5f50 6f736974 y; . gl_Posit │ │ │ │ - 0x00969890 696f6e20 3d207665 63342861 5f706f73 ion = vec4(a_pos │ │ │ │ - 0x009698a0 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x009698b0 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ - 0x009698c0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009698d0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x009698e0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x009698f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00969900 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00969910 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00969920 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00969930 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00969940 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00969950 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00969960 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00969970 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00969980 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00969990 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009699a0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009699b0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009699c0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009699d0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x009699e0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x009699f0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00969a00 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ - 0x00969a10 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ - 0x00969a20 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ - 0x00969a30 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ - 0x00969a40 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ - 0x00969a50 20765f6f 66667365 743b200a 2020756e v_offset; . un │ │ │ │ - 0x00969a60 69666f72 6d207665 63342075 5f667261 iform vec4 u_fra │ │ │ │ - 0x00969a70 6d656275 66666572 4d657472 6963733b mebufferMetrics; │ │ │ │ - 0x00969a80 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x00969a90 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x00969aa0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x00969ab0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x00969ac0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x00969ad0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x00969ae0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x00969af0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x00969b00 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00969b10 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00969b20 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x00969b30 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x00969b40 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x00969b50 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x00969b60 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x00969b70 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x00969b80 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x00969b90 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x00969ba0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x00969bb0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x00969bc0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00969bd0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x00969be0 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x00969bf0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x00969c00 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x00969c10 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x00969c20 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x00969c30 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x00969c40 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x00969c50 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x00969c60 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x00969c70 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x00969c80 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x00969c90 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x00969ca0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x00969cb0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x00969cc0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x00969cd0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x00969ce0 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x00969cf0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x00969d00 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x00969d10 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x00969d20 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x00969d30 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x00969d40 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x00969d50 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x00969d60 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x00969d70 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x00969d80 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x00969d90 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x00969da0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x00969db0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x00969dc0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x00969dd0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x00969de0 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x00969df0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x00969e00 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x00969e10 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x00969e20 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x00969e30 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x00969e40 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x00969e50 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x00969e60 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x00969e70 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x00969e80 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x00969e90 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00969ea0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x00969eb0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x00969ec0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x00969ed0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x00969ee0 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x00969ef0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x00969f00 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x00969f10 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x00969f20 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x00969f30 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x00969f40 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x00969f50 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x00969f60 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x00969f70 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x00969f80 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x00969f90 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x00969fa0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x00969fb0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00969fc0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x00969fd0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x00969fe0 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x00969ff0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x0096a000 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x0096a010 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x0096a020 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ - 0x0096a030 6f726473 203d2061 5f74636f 6f72643b ords = a_tcoord; │ │ │ │ - 0x0096a040 200a2020 2020765f 6f666673 6574203d . v_offset = │ │ │ │ - 0x0096a050 20755f66 72616d65 62756666 65724d65 u_framebufferMe │ │ │ │ - 0x0096a060 74726963 732e7879 7879202a 20766563 trics.xyxy * vec │ │ │ │ - 0x0096a070 3428312e 302c2030 2e302c20 302e302c 4(1.0, 0.0, 0.0, │ │ │ │ - 0x0096a080 20312e30 29202b20 615f7463 6f6f7264 1.0) + a_tcoord │ │ │ │ - 0x0096a090 2e787978 793b200a 20202020 676c5f50 .xyxy; . gl_P │ │ │ │ - 0x0096a0a0 6f736974 696f6e20 3d207665 63342861 osition = vec4(a │ │ │ │ - 0x0096a0b0 5f706f73 2c20302e 302c2031 2e30293b _pos, 0.0, 1.0); │ │ │ │ - 0x0096a0c0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x0096a0d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0096a0e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0096a0f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0096a100 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096a110 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0096a120 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0096a130 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0096a140 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0096a150 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0096a160 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0096a170 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0096a180 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0096a190 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0096a1a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0096a1b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0096a1c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0096a1d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0096a1e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0096a1f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0096a200 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0096a210 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ - 0x0096a220 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ - 0x0096a230 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ - 0x0096a240 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ - 0x0096a250 3420615f 706f7369 74696f6e 3b200a20 4 a_position; . │ │ │ │ - 0x0096a260 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ - 0x0096a270 6c3b200a 20202369 66646566 20454e41 l; . #ifdef ENA │ │ │ │ - 0x0096a280 424c455f 56544620 0a20206f 7574204c BLE_VTF . out L │ │ │ │ - 0x0096a290 4f575f50 20766563 3420765f 636f6c6f OW_P vec4 v_colo │ │ │ │ - 0x0096a2a0 723b200a 20202365 6c736520 0a20206f r; . #else . o │ │ │ │ - 0x0096a2b0 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ - 0x0096a2c0 6578436f 6f72643b 200a2020 23656e64 exCoord; . #end │ │ │ │ - 0x0096a2d0 6966200a 20206f75 74207665 63322076 if . out vec2 v │ │ │ │ - 0x0096a2e0 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ - 0x0096a2f0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0096a300 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x0096a310 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x0096a320 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x0096a330 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x0096a340 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x0096a350 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x0096a360 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x0096a370 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0096a380 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x0096a390 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x0096a3a0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x0096a3b0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x0096a3c0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x0096a3d0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x0096a3e0 6e655061 73733b20 0a202023 69666465 nePass; . #ifde │ │ │ │ - 0x0096a3f0 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ - 0x0096a400 756e6966 6f726d20 73616d70 6c657232 uniform sampler2 │ │ │ │ - 0x0096a410 4420755f 636f6c6f 72546578 3b200a20 D u_colorTex; . │ │ │ │ - 0x0096a420 2023656e 64696620 0a202063 6f6e7374 #endif . const │ │ │ │ - 0x0096a430 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x0096a440 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x0096a450 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x0096a460 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x0096a470 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x0096a480 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0096a490 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x0096a4a0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0096a4b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096a4c0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x0096a4d0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x0096a4e0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x0096a4f0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0096a500 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x0096a510 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0096a520 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0096a530 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0096a540 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x0096a550 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096a560 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x0096a570 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x0096a580 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0096a590 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0096a5a0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x0096a5b0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x0096a5c0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0096a5d0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x0096a5e0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x0096a5f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096a600 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x0096a610 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x0096a620 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096a630 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x0096a640 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x0096a650 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x0096a660 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x0096a670 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x0096a680 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x0096a690 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x0096a6a0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x0096a6b0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x0096a6c0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x0096a6d0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0096a6e0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x0096a6f0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x0096a700 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x0096a710 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x0096a720 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x0096a730 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0096a740 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x0096a750 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x0096a760 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x0096a770 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x0096a780 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x0096a790 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x0096a7a0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x0096a7b0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x0096a7c0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x0096a7d0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x0096a7e0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x0096a7f0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x0096a800 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x0096a810 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x0096a820 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x0096a830 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x0096a840 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x0096a850 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x0096a860 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x0096a870 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x0096a880 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x0096a890 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x0096a8a0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x0096a8b0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x0096a8c0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x0096a8d0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x0096a8e0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x0096a8f0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x0096a900 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x0096a910 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x0096a920 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x0096a930 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x0096a940 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x0096a950 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x0096a960 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x0096a970 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x0096a980 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x0096a990 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x0096a9a0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x0096a9b0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x0096a9c0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x0096a9d0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x0096a9e0 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ - 0x0096a9f0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0096aa00 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ - 0x0096aa10 73203d20 76656334 28615f6e 6f726d61 s = vec4(a_norma │ │ │ │ - 0x0096aa20 6c2c2030 2e302c20 302e3029 202b2070 l, 0.0, 0.0) + p │ │ │ │ - 0x0096aa30 6f733b20 0a202020 20676c5f 506f7369 os; . gl_Posi │ │ │ │ - 0x0096aa40 74696f6e 203d2061 70706c79 5069766f tion = applyPivo │ │ │ │ - 0x0096aa50 74547261 6e73666f 726d2873 68696674 tTransform(shift │ │ │ │ - 0x0096aa60 6564506f 73202a20 755f7072 6f6a6563 edPos * u_projec │ │ │ │ - 0x0096aa70 74696f6e 2c20755f 7069766f 74547261 tion, u_pivotTra │ │ │ │ - 0x0096aa80 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ - 0x0096aa90 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ - 0x0096aaa0 5446200a 20202020 765f636f 6c6f7220 TF . v_color │ │ │ │ - 0x0096aab0 3d207465 78747572 6528755f 636f6c6f = texture(u_colo │ │ │ │ - 0x0096aac0 72546578 2c20615f 636f6c6f 72546578 rTex, a_colorTex │ │ │ │ - 0x0096aad0 436f6f72 64293b20 0a202023 656c7365 Coord); . #else │ │ │ │ - 0x0096aae0 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ - 0x0096aaf0 436f6f72 64203d20 615f636f 6c6f7254 Coord = a_colorT │ │ │ │ - 0x0096ab00 6578436f 6f72643b 200a2020 23656e64 exCoord; . #end │ │ │ │ - 0x0096ab10 6966200a 20202020 765f6d61 736b5465 if . v_maskTe │ │ │ │ - 0x0096ab20 78436f6f 7264203d 20615f6d 61736b54 xCoord = a_maskT │ │ │ │ - 0x0096ab30 6578436f 6f72643b 200a2020 7d200a00 exCoord; . } .. │ │ │ │ - 0x0096ab40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096ab50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096ab60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096ab70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096ab80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096ab90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096aba0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096abb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096abc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096abd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096abe0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096abf0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096ac00 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096ac10 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096ac20 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096ac30 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096ac40 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096ac50 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096ac60 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096ac70 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096ac80 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096ac90 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ - 0x0096aca0 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ - 0x0096acb0 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ - 0x0096acc0 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ - 0x0096acd0 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ - 0x0096ace0 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ - 0x0096acf0 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x0096ad00 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ - 0x0096ad10 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ - 0x0096ad20 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ - 0x0096ad30 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ - 0x0096ad40 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ - 0x0096ad50 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ - 0x0096ad60 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ - 0x0096ad70 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x0096ad80 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x0096ad90 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x0096ada0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0096adb0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x0096adc0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x0096add0 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x0096ade0 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x0096adf0 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x0096ae00 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x0096ae10 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x0096ae20 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x0096ae30 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x0096ae40 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x0096ae50 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x0096ae60 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x0096ae70 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ - 0x0096ae80 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ - 0x0096ae90 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ - 0x0096aea0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ - 0x0096aeb0 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ - 0x0096aec0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x0096aed0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x0096aee0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x0096aef0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ - 0x0096af00 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x0096af10 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x0096af20 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ - 0x0096af30 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ - 0x0096af40 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ - 0x0096af50 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ - 0x0096af60 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ - 0x0096af70 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ - 0x0096af80 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ - 0x0096af90 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ - 0x0096afa0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ - 0x0096afb0 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ - 0x0096afc0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096afd0 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ - 0x0096afe0 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ - 0x0096aff0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ - 0x0096b000 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ - 0x0096b010 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ - 0x0096b020 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ - 0x0096b030 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ - 0x0096b040 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ - 0x0096b050 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ - 0x0096b060 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x0096b070 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ - 0x0096b080 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ - 0x0096b090 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ - 0x0096b0a0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x0096b0b0 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ - 0x0096b0c0 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ - 0x0096b0d0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ - 0x0096b0e0 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ - 0x0096b0f0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ - 0x0096b100 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ - 0x0096b110 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ - 0x0096b120 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0096b130 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0096b140 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0096b150 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ - 0x0096b160 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ - 0x0096b170 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ - 0x0096b180 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ - 0x0096b190 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ - 0x0096b1a0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ - 0x0096b1b0 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ - 0x0096b1c0 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ - 0x0096b1d0 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ - 0x0096b1e0 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ - 0x0096b1f0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ - 0x0096b200 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ - 0x0096b210 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ - 0x0096b220 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ - 0x0096b230 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0096b240 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ - 0x0096b250 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ - 0x0096b260 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ - 0x0096b270 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ - 0x0096b280 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ - 0x0096b290 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x0096b2a0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ - 0x0096b2b0 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ - 0x0096b2c0 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ - 0x0096b2d0 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ - 0x0096b2e0 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ - 0x0096b2f0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ - 0x0096b300 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ - 0x0096b310 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ - 0x0096b320 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ - 0x0096b330 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ - 0x0096b340 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ - 0x0096b350 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ - 0x0096b360 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ - 0x0096b370 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ - 0x0096b380 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ - 0x0096b390 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ - 0x0096b3a0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ - 0x0096b3b0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0096b3c0 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ - 0x0096b3d0 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ - 0x0096b3e0 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ - 0x0096b3f0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ - 0x0096b400 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ - 0x0096b410 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ - 0x0096b420 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ - 0x0096b430 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ - 0x0096b440 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ - 0x0096b450 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x0096b460 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ - 0x0096b470 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ - 0x0096b480 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ - 0x0096b490 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ - 0x0096b4a0 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ - 0x0096b4b0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x0096b4c0 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ - 0x0096b4d0 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ - 0x0096b4e0 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ - 0x0096b4f0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096b500 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096b510 20202020 20202020 20202020 2020615f a_ │ │ │ │ - 0x0096b520 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ - 0x0096b530 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ - 0x0096b540 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ - 0x0096b550 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ - 0x0096b560 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ - 0x0096b570 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ - 0x0096b580 6f725465 78436f6f 7264293b 200a2020 orTexCoord); . │ │ │ │ - 0x0096b590 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ - 0x0096b5a0 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ - 0x0096b5b0 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ - 0x0096b5c0 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ - 0x0096b5d0 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ - 0x0096b5e0 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ - 0x0096b5f0 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ - 0x0096b600 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0096b610 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0096b620 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0096b630 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096b640 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0096b650 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0096b660 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0096b670 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0096b680 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0096b690 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0096b6a0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0096b6b0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0096b6c0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0096b6d0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0096b6e0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0096b6f0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0096b700 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0096b710 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0096b720 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0096b730 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0096b740 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ - 0x0096b750 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ - 0x0096b760 6e207665 63322061 5f6f7574 6c696e65 n vec2 a_outline │ │ │ │ - 0x0096b770 436f6c6f 72546578 436f6f72 643b200a ColorTexCoord; . │ │ │ │ - 0x0096b780 2020696e 20766563 3220615f 6d61736b in vec2 a_mask │ │ │ │ - 0x0096b790 54657843 6f6f7264 3b200a20 20696e20 TexCoord; . in │ │ │ │ - 0x0096b7a0 76656334 20615f70 6f736974 696f6e3b vec4 a_position; │ │ │ │ - 0x0096b7b0 200a2020 696e2076 65633220 615f6e6f . in vec2 a_no │ │ │ │ - 0x0096b7c0 726d616c 3b200a20 20236966 64656620 rmal; . #ifdef │ │ │ │ - 0x0096b7d0 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ - 0x0096b7e0 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ - 0x0096b7f0 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ - 0x0096b800 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x0096b810 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ - 0x0096b820 656e6469 66200a20 206f7574 20766563 endif . out vec │ │ │ │ - 0x0096b830 3220765f 6d61736b 54657843 6f6f7264 2 v_maskTexCoord │ │ │ │ - 0x0096b840 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0096b850 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ - 0x0096b860 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0096b870 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x0096b880 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0096b890 69766f74 5472616e 73666f72 6d3b200a ivotTransform; . │ │ │ │ - 0x0096b8a0 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ - 0x0096b8b0 5f636f6e 74726173 7447616d 6d613b20 _contrastGamma; │ │ │ │ - 0x0096b8c0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x0096b8d0 20755f6f 70616369 74793b20 0a202075 u_opacity; . u │ │ │ │ - 0x0096b8e0 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ - 0x0096b8f0 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ - 0x0096b900 6d20666c 6f617420 755f696e 74657270 m float u_interp │ │ │ │ - 0x0096b910 6f6c6174 696f6e3b 200a2020 756e6966 olation; . unif │ │ │ │ - 0x0096b920 6f726d20 666c6f61 7420755f 69734f75 orm float u_isOu │ │ │ │ - 0x0096b930 746c696e 65506173 733b200a 20202369 tlinePass; . #i │ │ │ │ - 0x0096b940 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ - 0x0096b950 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ - 0x0096b960 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ - 0x0096b970 200a2020 23656e64 6966200a 2020636f . #endif . co │ │ │ │ - 0x0096b980 6e737420 666c6f61 74204261 73654465 nst float BaseDe │ │ │ │ - 0x0096b990 70746853 68696674 203d202d 31302e30 pthShift = -10.0 │ │ │ │ - 0x0096b9a0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ - 0x0096b9b0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ - 0x0096b9c0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ - 0x0096b9d0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ - 0x0096b9e0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ - 0x0096b9f0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ - 0x0096ba00 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ - 0x0096ba10 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ - 0x0096ba20 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ - 0x0096ba30 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ - 0x0096ba40 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ - 0x0096ba50 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ - 0x0096ba60 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ - 0x0096ba70 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0096ba80 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ - 0x0096ba90 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ - 0x0096baa0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ - 0x0096bab0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ - 0x0096bac0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ - 0x0096bad0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ - 0x0096bae0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096baf0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ - 0x0096bb00 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ - 0x0096bb10 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x0096bb20 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ - 0x0096bb30 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ - 0x0096bb40 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x0096bb50 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ - 0x0096bb60 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ - 0x0096bb70 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ - 0x0096bb80 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x0096bb90 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ - 0x0096bba0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ - 0x0096bbb0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ - 0x0096bbc0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ - 0x0096bbd0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0096bbe0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0096bbf0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0096bc00 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ - 0x0096bc10 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ - 0x0096bc20 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ - 0x0096bc30 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ - 0x0096bc40 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ - 0x0096bc50 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x0096bc60 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x0096bc70 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ - 0x0096bc80 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ - 0x0096bc90 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ - 0x0096bca0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ - 0x0096bcb0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ - 0x0096bcc0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ - 0x0096bcd0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ - 0x0096bce0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ - 0x0096bcf0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0096bd00 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ - 0x0096bd10 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ - 0x0096bd20 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ - 0x0096bd30 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ - 0x0096bd40 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ - 0x0096bd50 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x0096bd60 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ - 0x0096bd70 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ - 0x0096bd80 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ - 0x0096bd90 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ - 0x0096bda0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ - 0x0096bdb0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x0096bdc0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ - 0x0096bdd0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ - 0x0096bde0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ - 0x0096bdf0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ - 0x0096be00 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ - 0x0096be10 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ - 0x0096be20 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ - 0x0096be30 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ - 0x0096be40 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ - 0x0096be50 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ - 0x0096be60 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ - 0x0096be70 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ - 0x0096be80 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ - 0x0096be90 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ - 0x0096bea0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ - 0x0096beb0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ - 0x0096bec0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ - 0x0096bed0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ - 0x0096bee0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ - 0x0096bef0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ - 0x0096bf00 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ - 0x0096bf10 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x0096bf20 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ - 0x0096bf30 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ - 0x0096bf40 0a202020 20666c6f 61742069 734f7574 . float isOut │ │ │ │ - 0x0096bf50 6c696e65 203d2073 74657028 302e352c line = step(0.5, │ │ │ │ - 0x0096bf60 20755f69 734f7574 6c696e65 50617373 u_isOutlinePass │ │ │ │ - 0x0096bf70 293b200a 20202020 666c6f61 74206e6f ); . float no │ │ │ │ - 0x0096bf80 744f7574 6c696e65 203d2031 2e30202d tOutline = 1.0 - │ │ │ │ - 0x0096bf90 2069734f 75746c69 6e653b20 0a202020 isOutline; . │ │ │ │ - 0x0096bfa0 20666c6f 61742064 65707468 53686966 float depthShif │ │ │ │ - 0x0096bfb0 74203d20 42617365 44657074 68536869 t = BaseDepthShi │ │ │ │ - 0x0096bfc0 6674202a 2069734f 75746c69 6e653b20 ft * isOutline; │ │ │ │ - 0x0096bfd0 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x0096bfe0 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ - 0x0096bff0 2e78797a 2c203129 202b2076 65633428 .xyz, 1) + vec4( │ │ │ │ - 0x0096c000 302e302c 20302e30 2c206465 70746853 0.0, 0.0, depthS │ │ │ │ - 0x0096c010 68696674 2c20302e 30292920 2a20755f hift, 0.0)) * u_ │ │ │ │ - 0x0096c020 6d6f6465 6c566965 773b200a 20202020 modelView; . │ │ │ │ - 0x0096c030 76656334 20736869 66746564 506f7320 vec4 shiftedPos │ │ │ │ - 0x0096c040 3d207665 63342861 5f6e6f72 6d616c2c = vec4(a_normal, │ │ │ │ - 0x0096c050 20302e30 2c20302e 3029202b 20706f73 0.0, 0.0) + pos │ │ │ │ - 0x0096c060 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x0096c070 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ - 0x0096c080 72616e73 666f726d 28736869 66746564 ransform(shifted │ │ │ │ - 0x0096c090 506f7320 2a20755f 70726f6a 65637469 Pos * u_projecti │ │ │ │ - 0x0096c0a0 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ - 0x0096c0b0 666f726d 2c20302e 30293b20 0a202020 form, 0.0); . │ │ │ │ - 0x0096c0c0 20766563 3220636f 6c6f7254 6578436f vec2 colorTexCo │ │ │ │ - 0x0096c0d0 6f726420 3d20615f 636f6c6f 72546578 ord = a_colorTex │ │ │ │ - 0x0096c0e0 436f6f72 64202a20 6e6f744f 75746c69 Coord * notOutli │ │ │ │ - 0x0096c0f0 6e65202b 20615f6f 75746c69 6e65436f ne + a_outlineCo │ │ │ │ - 0x0096c100 6c6f7254 6578436f 6f726420 2a206973 lorTexCoord * is │ │ │ │ - 0x0096c110 4f75746c 696e653b 200a2020 23696664 Outline; . #ifd │ │ │ │ - 0x0096c120 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ - 0x0096c130 20202076 5f636f6c 6f72203d 20746578 v_color = tex │ │ │ │ - 0x0096c140 74757265 28755f63 6f6c6f72 5465782c ture(u_colorTex, │ │ │ │ - 0x0096c150 20636f6c 6f725465 78436f6f 7264293b colorTexCoord); │ │ │ │ - 0x0096c160 200a2020 23656c73 65200a20 20202076 . #else . v │ │ │ │ - 0x0096c170 5f636f6c 6f725465 78436f6f 7264203d _colorTexCoord = │ │ │ │ - 0x0096c180 20636f6c 6f725465 78436f6f 72643b20 colorTexCoord; │ │ │ │ - 0x0096c190 0a202023 656e6469 66200a20 20202076 . #endif . v │ │ │ │ - 0x0096c1a0 5f6d6173 6b546578 436f6f72 64203d20 _maskTexCoord = │ │ │ │ - 0x0096c1b0 615f6d61 736b5465 78436f6f 72643b20 a_maskTexCoord; │ │ │ │ - 0x0096c1c0 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ - 0x0096c1d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0096c1e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0096c1f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0096c200 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096c210 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0096c220 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0096c230 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0096c240 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0096c250 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0096c260 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0096c270 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0096c280 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0096c290 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0096c2a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0096c2b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0096c2c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0096c2d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0096c2e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0096c2f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0096c300 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0096c310 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ - 0x0096c320 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ - 0x0096c330 6e207665 63322061 5f6f7574 6c696e65 n vec2 a_outline │ │ │ │ - 0x0096c340 436f6c6f 72546578 436f6f72 643b200a ColorTexCoord; . │ │ │ │ - 0x0096c350 2020696e 20766563 3220615f 6d61736b in vec2 a_mask │ │ │ │ - 0x0096c360 54657843 6f6f7264 3b200a20 20696e20 TexCoord; . in │ │ │ │ - 0x0096c370 76656334 20615f70 6f736974 696f6e3b vec4 a_position; │ │ │ │ - 0x0096c380 200a2020 696e2076 65633220 615f6e6f . in vec2 a_no │ │ │ │ - 0x0096c390 726d616c 3b200a20 20236966 64656620 rmal; . #ifdef │ │ │ │ - 0x0096c3a0 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ - 0x0096c3b0 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ - 0x0096c3c0 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ - 0x0096c3d0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x0096c3e0 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ - 0x0096c3f0 656e6469 66200a20 206f7574 20766563 endif . out vec │ │ │ │ - 0x0096c400 3220765f 6d61736b 54657843 6f6f7264 2 v_maskTexCoord │ │ │ │ - 0x0096c410 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0096c420 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ - 0x0096c430 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0096c440 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x0096c450 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0096c460 69766f74 5472616e 73666f72 6d3b200a ivotTransform; . │ │ │ │ - 0x0096c470 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ - 0x0096c480 5f636f6e 74726173 7447616d 6d613b20 _contrastGamma; │ │ │ │ - 0x0096c490 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x0096c4a0 20755f6f 70616369 74793b20 0a202075 u_opacity; . u │ │ │ │ - 0x0096c4b0 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ - 0x0096c4c0 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ - 0x0096c4d0 6d20666c 6f617420 755f696e 74657270 m float u_interp │ │ │ │ - 0x0096c4e0 6f6c6174 696f6e3b 200a2020 756e6966 olation; . unif │ │ │ │ - 0x0096c4f0 6f726d20 666c6f61 7420755f 69734f75 orm float u_isOu │ │ │ │ - 0x0096c500 746c696e 65506173 733b200a 2020756e tlinePass; . un │ │ │ │ - 0x0096c510 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ - 0x0096c520 755f636f 6c6f7254 65783b20 0a202063 u_colorTex; . c │ │ │ │ - 0x0096c530 6f6e7374 20666c6f 6174206b 42617365 onst float kBase │ │ │ │ - 0x0096c540 44657074 68536869 6674203d 202d3130 DepthShift = -10 │ │ │ │ - 0x0096c550 2e303b20 0a202063 6f6e7374 20666c6f .0; . const flo │ │ │ │ - 0x0096c560 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ - 0x0096c570 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ - 0x0096c580 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ - 0x0096c590 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ - 0x0096c5a0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ - 0x0096c5b0 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ - 0x0096c5c0 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ - 0x0096c5d0 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ - 0x0096c5e0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x0096c5f0 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ - 0x0096c600 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ - 0x0096c610 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ - 0x0096c620 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096c630 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ - 0x0096c640 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ - 0x0096c650 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ - 0x0096c660 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ - 0x0096c670 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ - 0x0096c680 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ - 0x0096c690 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x0096c6a0 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ - 0x0096c6b0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x0096c6c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096c6d0 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ - 0x0096c6e0 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ - 0x0096c6f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096c700 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ - 0x0096c710 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ - 0x0096c720 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ - 0x0096c730 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ - 0x0096c740 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ - 0x0096c750 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ - 0x0096c760 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ - 0x0096c770 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ - 0x0096c780 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ - 0x0096c790 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ - 0x0096c7a0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ - 0x0096c7b0 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ - 0x0096c7c0 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ - 0x0096c7d0 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ - 0x0096c7e0 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ - 0x0096c7f0 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ - 0x0096c800 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ - 0x0096c810 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x0096c820 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ - 0x0096c830 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ - 0x0096c840 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ - 0x0096c850 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ - 0x0096c860 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ - 0x0096c870 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ - 0x0096c880 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ - 0x0096c890 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ - 0x0096c8a0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096c8b0 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ - 0x0096c8c0 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ - 0x0096c8d0 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ - 0x0096c8e0 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ - 0x0096c8f0 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ - 0x0096c900 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ - 0x0096c910 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ - 0x0096c920 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ - 0x0096c930 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ - 0x0096c940 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ - 0x0096c950 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ - 0x0096c960 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x0096c970 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ - 0x0096c980 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ - 0x0096c990 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ - 0x0096c9a0 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ - 0x0096c9b0 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ - 0x0096c9c0 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ - 0x0096c9d0 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ - 0x0096c9e0 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ - 0x0096c9f0 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ - 0x0096ca00 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ - 0x0096ca10 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ - 0x0096ca20 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ - 0x0096ca30 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ - 0x0096ca40 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ - 0x0096ca50 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ - 0x0096ca60 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ - 0x0096ca70 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ - 0x0096ca80 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x0096ca90 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ - 0x0096caa0 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ - 0x0096cab0 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ - 0x0096cac0 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x0096cad0 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ - 0x0096cae0 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ - 0x0096caf0 7b200a20 20202066 6c6f6174 2069734f { . float isO │ │ │ │ - 0x0096cb00 75746c69 6e65203d 20737465 7028302e utline = step(0. │ │ │ │ - 0x0096cb10 352c2075 5f69734f 75746c69 6e655061 5, u_isOutlinePa │ │ │ │ - 0x0096cb20 7373293b 200a2020 2020666c 6f617420 ss); . float │ │ │ │ - 0x0096cb30 64657074 68536869 6674203d 206b4261 depthShift = kBa │ │ │ │ - 0x0096cb40 73654465 70746853 68696674 202a2069 seDepthShift * i │ │ │ │ - 0x0096cb50 734f7574 6c696e65 3b200a20 20202076 sOutline; . v │ │ │ │ - 0x0096cb60 65633420 7069766f 74203d20 28766563 ec4 pivot = (vec │ │ │ │ - 0x0096cb70 3428615f 706f7369 74696f6e 2e78797a 4(a_position.xyz │ │ │ │ - 0x0096cb80 2c20312e 3029202b 20766563 3428302e , 1.0) + vec4(0. │ │ │ │ - 0x0096cb90 302c2030 2e302c20 64657074 68536869 0, 0.0, depthShi │ │ │ │ - 0x0096cba0 66742c20 302e3029 29202a20 755f6d6f ft, 0.0)) * u_mo │ │ │ │ - 0x0096cbb0 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ - 0x0096cbc0 6334206f 66667365 74203d20 76656334 c4 offset = vec4 │ │ │ │ - 0x0096cbd0 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ - 0x0096cbe0 302e3029 202a2075 5f70726f 6a656374 0.0) * u_project │ │ │ │ - 0x0096cbf0 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ - 0x0096cc00 6974696f 6e203d20 6170706c 7942696c ition = applyBil │ │ │ │ - 0x0096cc10 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ - 0x0096cc20 666f726d 28706976 6f74202a 20755f70 form(pivot * u_p │ │ │ │ - 0x0096cc30 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ - 0x0096cc40 6f745472 616e7366 6f726d2c 200a2020 otTransform, . │ │ │ │ - 0x0096cc50 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096cc60 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096cc70 20202020 20202020 20202020 20615f70 a_p │ │ │ │ - 0x0096cc80 6f736974 696f6e2e 77202a20 755f7a53 osition.w * u_zS │ │ │ │ - 0x0096cc90 63616c65 2c206f66 66736574 2e787929 cale, offset.xy) │ │ │ │ - 0x0096cca0 3b200a20 20202076 65633220 636f6c6f ; . vec2 colo │ │ │ │ - 0x0096ccb0 72546578 436f6f72 64203d20 6d697828 rTexCoord = mix( │ │ │ │ - 0x0096ccc0 615f636f 6c6f7254 6578436f 6f72642c a_colorTexCoord, │ │ │ │ - 0x0096ccd0 20615f6f 75746c69 6e65436f 6c6f7254 a_outlineColorT │ │ │ │ - 0x0096cce0 6578436f 6f72642c 2069734f 75746c69 exCoord, isOutli │ │ │ │ - 0x0096ccf0 6e65293b 200a2020 23696664 65662045 ne); . #ifdef E │ │ │ │ - 0x0096cd00 4e41424c 455f5654 46200a20 20202076 NABLE_VTF . v │ │ │ │ - 0x0096cd10 5f636f6c 6f72203d 20746578 74757265 _color = texture │ │ │ │ - 0x0096cd20 28755f63 6f6c6f72 5465782c 20636f6c (u_colorTex, col │ │ │ │ - 0x0096cd30 6f725465 78436f6f 7264293b 200a2020 orTexCoord); . │ │ │ │ - 0x0096cd40 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ - 0x0096cd50 6f725465 78436f6f 7264203d 20636f6c orTexCoord = col │ │ │ │ - 0x0096cd60 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ - 0x0096cd70 656e6469 66200a20 20202076 5f6d6173 endif . v_mas │ │ │ │ - 0x0096cd80 6b546578 436f6f72 64203d20 615f6d61 kTexCoord = a_ma │ │ │ │ - 0x0096cd90 736b5465 78436f6f 72643b20 0a20207d skTexCoord; . } │ │ │ │ - 0x0096cda0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x0096cdb0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0096cdc0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0096cdd0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0096cde0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096cdf0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0096ce00 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0096ce10 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0096ce20 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0096ce30 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0096ce40 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0096ce50 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0096ce60 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0096ce70 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0096ce80 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0096ce90 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x0096cea0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x0096ceb0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x0096cec0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x0096ced0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x0096cee0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x0096cef0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x0096cf00 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x0096cf10 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ - 0x0096cf20 643b200a 2020696e 20766563 3220615f d; . in vec2 a_ │ │ │ │ - 0x0096cf30 6f75746c 696e6543 6f6c6f72 54657843 outlineColorTexC │ │ │ │ - 0x0096cf40 6f6f7264 3b200a20 20696e20 76656332 oord; . in vec2 │ │ │ │ - 0x0096cf50 20615f6e 6f726d61 6c3b200a 2020696e a_normal; . in │ │ │ │ - 0x0096cf60 20766563 3220615f 6d61736b 54657843 vec2 a_maskTexC │ │ │ │ - 0x0096cf70 6f6f7264 3b200a20 20236966 64656620 oord; . #ifdef │ │ │ │ - 0x0096cf80 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ - 0x0096cf90 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ - 0x0096cfa0 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ - 0x0096cfb0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ - 0x0096cfc0 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ - 0x0096cfd0 656e6469 66200a20 206f7574 20766563 endif . out vec │ │ │ │ - 0x0096cfe0 3220765f 6d61736b 54657843 6f6f7264 2 v_maskTexCoord │ │ │ │ - 0x0096cff0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0096d000 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ - 0x0096d010 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0096d020 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x0096d030 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ - 0x0096d040 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ - 0x0096d050 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ - 0x0096d060 706f7369 74696f6e 3b200a20 20756e69 position; . uni │ │ │ │ - 0x0096d070 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ - 0x0096d080 75746c69 6e655061 73733b20 0a202075 utlinePass; . u │ │ │ │ - 0x0096d090 6e69666f 726d2066 6c6f6174 20755f6f niform float u_o │ │ │ │ - 0x0096d0a0 70616369 74793b20 0a202075 6e69666f pacity; . unifo │ │ │ │ - 0x0096d0b0 726d2066 6c6f6174 20755f6c 656e6774 rm float u_lengt │ │ │ │ - 0x0096d0c0 683b200a 20202369 66646566 20454e41 h; . #ifdef ENA │ │ │ │ - 0x0096d0d0 424c455f 56544620 0a202075 6e69666f BLE_VTF . unifo │ │ │ │ - 0x0096d0e0 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ - 0x0096d0f0 6f6c6f72 5465783b 200a2020 23656e64 olorTex; . #end │ │ │ │ - 0x0096d100 6966200a 2020636f 6e737420 666c6f61 if . const floa │ │ │ │ - 0x0096d110 74206b42 61736544 65707468 53686966 t kBaseDepthShif │ │ │ │ - 0x0096d120 74203d20 2d31302e 303b200a 2020636f t = -10.0; . co │ │ │ │ - 0x0096d130 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x0096d140 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x0096d150 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x0096d160 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x0096d170 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x0096d180 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x0096d190 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x0096d1a0 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x0096d1b0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x0096d1c0 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x0096d1d0 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x0096d1e0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x0096d1f0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0096d200 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x0096d210 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0096d220 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0096d230 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x0096d240 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x0096d250 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0096d260 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x0096d270 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x0096d280 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0096d290 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x0096d2a0 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x0096d2b0 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x0096d2c0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0096d2d0 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x0096d2e0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x0096d2f0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x0096d300 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x0096d310 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0096d320 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x0096d330 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x0096d340 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x0096d350 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x0096d360 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x0096d370 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0096d380 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x0096d390 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x0096d3a0 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x0096d3b0 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x0096d3c0 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x0096d3d0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x0096d3e0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x0096d3f0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x0096d400 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x0096d410 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x0096d420 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x0096d430 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x0096d440 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x0096d450 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x0096d460 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x0096d470 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x0096d480 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x0096d490 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x0096d4a0 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x0096d4b0 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x0096d4c0 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x0096d4d0 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x0096d4e0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x0096d4f0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x0096d500 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x0096d510 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x0096d520 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x0096d530 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x0096d540 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x0096d550 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x0096d560 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x0096d570 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x0096d580 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x0096d590 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x0096d5a0 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x0096d5b0 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x0096d5c0 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x0096d5d0 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x0096d5e0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x0096d5f0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x0096d600 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x0096d610 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x0096d620 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0096d630 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x0096d640 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x0096d650 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x0096d660 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x0096d670 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x0096d680 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x0096d690 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x0096d6a0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0096d6b0 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x0096d6c0 6e282920 0a20207b 200a2020 2020666c n() . { . fl │ │ │ │ - 0x0096d6d0 6f617420 69734f75 746c696e 65203d20 oat isOutline = │ │ │ │ - 0x0096d6e0 73746570 28302e35 2c20755f 69734f75 step(0.5, u_isOu │ │ │ │ - 0x0096d6f0 746c696e 65506173 73293b20 0a202020 tlinePass); . │ │ │ │ - 0x0096d700 20666c6f 61742064 65707468 53686966 float depthShif │ │ │ │ - 0x0096d710 74203d20 6b426173 65446570 74685368 t = kBaseDepthSh │ │ │ │ - 0x0096d720 69667420 2a206973 4f75746c 696e653b ift * isOutline; │ │ │ │ - 0x0096d730 200a2020 20207665 63342070 6f73203d . vec4 pos = │ │ │ │ - 0x0096d740 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ - 0x0096d750 6e2c2031 2e302920 2b207665 63342830 n, 1.0) + vec4(0 │ │ │ │ - 0x0096d760 2e302c20 302e302c 20646570 74685368 .0, 0.0, depthSh │ │ │ │ - 0x0096d770 6966742c 20302e30 2929202a 20755f6d ift, 0.0)) * u_m │ │ │ │ - 0x0096d780 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x0096d790 65633420 73686966 74656450 6f73203d ec4 shiftedPos = │ │ │ │ - 0x0096d7a0 20766563 3428615f 6e6f726d 616c2c20 vec4(a_normal, │ │ │ │ - 0x0096d7b0 302e302c 20302e30 29202b20 706f733b 0.0, 0.0) + pos; │ │ │ │ - 0x0096d7c0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ - 0x0096d7d0 6e203d20 73686966 74656450 6f73202a n = shiftedPos * │ │ │ │ - 0x0096d7e0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x0096d7f0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0096d800 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x0096d810 2e79203d 202d676c 5f506f73 6974696f .y = -gl_Positio │ │ │ │ - 0x0096d820 6e2e793b 200a2020 2020676c 5f506f73 n.y; . gl_Pos │ │ │ │ - 0x0096d830 6974696f 6e2e7a20 3d202867 6c5f506f ition.z = (gl_Po │ │ │ │ - 0x0096d840 73697469 6f6e2e7a 20202b20 676c5f50 sition.z + gl_P │ │ │ │ - 0x0096d850 6f736974 696f6e2e 7729202a 20302e35 osition.w) * 0.5 │ │ │ │ - 0x0096d860 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x0096d870 20766563 3220636f 6c6f7254 6578436f vec2 colorTexCo │ │ │ │ - 0x0096d880 6f726420 3d206d69 7828615f 636f6c6f ord = mix(a_colo │ │ │ │ - 0x0096d890 72546578 436f6f72 642c2061 5f6f7574 rTexCoord, a_out │ │ │ │ - 0x0096d8a0 6c696e65 436f6c6f 72546578 436f6f72 lineColorTexCoor │ │ │ │ - 0x0096d8b0 642c2069 734f7574 6c696e65 293b200a d, isOutline); . │ │ │ │ - 0x0096d8c0 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ - 0x0096d8d0 56544620 0a202020 20765f63 6f6c6f72 VTF . v_color │ │ │ │ - 0x0096d8e0 203d2074 65787475 72652875 5f636f6c = texture(u_col │ │ │ │ - 0x0096d8f0 6f725465 782c2063 6f6c6f72 54657843 orTex, colorTexC │ │ │ │ - 0x0096d900 6f6f7264 293b200a 20202365 6c736520 oord); . #else │ │ │ │ - 0x0096d910 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ - 0x0096d920 6f6f7264 203d2063 6f6c6f72 54657843 oord = colorTexC │ │ │ │ - 0x0096d930 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ - 0x0096d940 0a202020 20765f6d 61736b54 6578436f . v_maskTexCo │ │ │ │ - 0x0096d950 6f726420 3d20615f 6d61736b 54657843 ord = a_maskTexC │ │ │ │ - 0x0096d960 6f6f7264 3b200a20 207d200a 00000000 oord; . } ..... │ │ │ │ - 0x0096d970 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096d980 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096d990 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096d9a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096d9b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096d9c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096d9d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096d9e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096d9f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096da00 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096da10 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096da20 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096da30 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096da40 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096da50 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096da60 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096da70 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096da80 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096da90 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096daa0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096dab0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096dac0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x0096dad0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x0096dae0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x0096daf0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x0096db00 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x0096db10 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x0096db20 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0096db30 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x0096db40 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x0096db50 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x0096db60 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x0096db70 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x0096db80 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x0096db90 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x0096dba0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0096dbb0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x0096dbc0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x0096dbd0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x0096dbe0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x0096dbf0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x0096dc00 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x0096dc10 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x0096dc20 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x0096dc30 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x0096dc40 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x0096dc50 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x0096dc60 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x0096dc70 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0096dc80 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x0096dc90 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0096dca0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096dcb0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x0096dcc0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x0096dcd0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x0096dce0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0096dcf0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x0096dd00 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0096dd10 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0096dd20 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0096dd30 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x0096dd40 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096dd50 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x0096dd60 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x0096dd70 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0096dd80 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0096dd90 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x0096dda0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x0096ddb0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0096ddc0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x0096ddd0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x0096dde0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096ddf0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x0096de00 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x0096de10 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096de20 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x0096de30 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x0096de40 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x0096de50 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x0096de60 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x0096de70 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x0096de80 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x0096de90 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x0096dea0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x0096deb0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x0096dec0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0096ded0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x0096dee0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x0096def0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x0096df00 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x0096df10 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x0096df20 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0096df30 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x0096df40 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x0096df50 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x0096df60 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x0096df70 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x0096df80 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x0096df90 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x0096dfa0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x0096dfb0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x0096dfc0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x0096dfd0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x0096dfe0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x0096dff0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x0096e000 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x0096e010 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x0096e020 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x0096e030 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x0096e040 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x0096e050 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x0096e060 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x0096e070 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x0096e080 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x0096e090 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x0096e0a0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x0096e0b0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x0096e0c0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x0096e0d0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x0096e0e0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x0096e0f0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x0096e100 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x0096e110 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x0096e120 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x0096e130 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x0096e140 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x0096e150 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x0096e160 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x0096e170 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x0096e180 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x0096e190 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x0096e1a0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x0096e1b0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x0096e1c0 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ - 0x0096e1d0 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ - 0x0096e1e0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ - 0x0096e1f0 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ - 0x0096e200 73203d20 76656334 28615f6e 6f726d61 s = vec4(a_norma │ │ │ │ - 0x0096e210 6c2c2030 2c203029 202b2070 6f733b20 l, 0, 0) + pos; │ │ │ │ - 0x0096e220 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ - 0x0096e230 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ - 0x0096e240 6e73666f 726d2873 68696674 6564506f nsform(shiftedPo │ │ │ │ - 0x0096e250 73202a20 755f7072 6f6a6563 74696f6e s * u_projection │ │ │ │ - 0x0096e260 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ - 0x0096e270 726d2c20 302e3029 3b200a20 20202076 rm, 0.0); . v │ │ │ │ - 0x0096e280 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ - 0x0096e290 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ - 0x0096e2a0 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ - 0x0096e2b0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096e2c0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096e2d0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096e2e0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096e2f0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096e300 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096e310 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096e320 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096e330 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096e340 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096e350 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096e360 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096e370 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096e380 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096e390 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096e3a0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096e3b0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096e3c0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096e3d0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096e3e0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096e3f0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096e400 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ - 0x0096e410 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ - 0x0096e420 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ - 0x0096e430 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ - 0x0096e440 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ - 0x0096e450 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ - 0x0096e460 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0096e470 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ - 0x0096e480 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ - 0x0096e490 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ - 0x0096e4a0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ - 0x0096e4b0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ - 0x0096e4c0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ - 0x0096e4d0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ - 0x0096e4e0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ - 0x0096e4f0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ - 0x0096e500 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ - 0x0096e510 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ - 0x0096e520 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ - 0x0096e530 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x0096e540 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ - 0x0096e550 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ - 0x0096e560 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ - 0x0096e570 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ - 0x0096e580 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ - 0x0096e590 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x0096e5a0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x0096e5b0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0096e5c0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x0096e5d0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ - 0x0096e5e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096e5f0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ - 0x0096e600 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ - 0x0096e610 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ - 0x0096e620 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0096e630 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ - 0x0096e640 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x0096e650 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x0096e660 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ - 0x0096e670 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ - 0x0096e680 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096e690 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ - 0x0096e6a0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ - 0x0096e6b0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ - 0x0096e6c0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x0096e6d0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ - 0x0096e6e0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ - 0x0096e6f0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0096e700 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ - 0x0096e710 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ - 0x0096e720 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x0096e730 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x0096e740 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x0096e750 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096e760 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ - 0x0096e770 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ - 0x0096e780 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ - 0x0096e790 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ - 0x0096e7a0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ - 0x0096e7b0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ - 0x0096e7c0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ - 0x0096e7d0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ - 0x0096e7e0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ - 0x0096e7f0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ - 0x0096e800 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ - 0x0096e810 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ - 0x0096e820 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ - 0x0096e830 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ - 0x0096e840 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ - 0x0096e850 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ - 0x0096e860 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x0096e870 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ - 0x0096e880 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ - 0x0096e890 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ - 0x0096e8a0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x0096e8b0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ - 0x0096e8c0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ - 0x0096e8d0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ - 0x0096e8e0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ - 0x0096e8f0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ - 0x0096e900 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ - 0x0096e910 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ - 0x0096e920 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ - 0x0096e930 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ - 0x0096e940 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ - 0x0096e950 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ - 0x0096e960 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ - 0x0096e970 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x0096e980 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ - 0x0096e990 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ - 0x0096e9a0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x0096e9b0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ - 0x0096e9c0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ - 0x0096e9d0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ - 0x0096e9e0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ - 0x0096e9f0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ - 0x0096ea00 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ - 0x0096ea10 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ - 0x0096ea20 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ - 0x0096ea30 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ - 0x0096ea40 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ - 0x0096ea50 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x0096ea60 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ - 0x0096ea70 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ - 0x0096ea80 20726574 75726e20 6f726967 696e616c return original │ │ │ │ - 0x0096ea90 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ - 0x0096eaa0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ - 0x0096eab0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ - 0x0096eac0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x0096ead0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x0096eae0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ - 0x0096eaf0 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ - 0x0096eb00 7069766f 74203d20 76656334 28615f70 pivot = vec4(a_p │ │ │ │ - 0x0096eb10 6f736974 696f6e2e 78797a2c 20312e30 osition.xyz, 1.0 │ │ │ │ - 0x0096eb20 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ - 0x0096eb30 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ - 0x0096eb40 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ - 0x0096eb50 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ - 0x0096eb60 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x0096eb70 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x0096eb80 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ - 0x0096eb90 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ - 0x0096eba0 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ - 0x0096ebb0 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ - 0x0096ebc0 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ - 0x0096ebd0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096ebe0 20202020 20202020 20202020 20202020 │ │ │ │ - 0x0096ebf0 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ - 0x0096ec00 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ - 0x0096ec10 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ - 0x0096ec20 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ - 0x0096ec30 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ - 0x0096ec40 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ - 0x0096ec50 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096ec60 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096ec70 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096ec80 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096ec90 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096eca0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096ecb0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096ecc0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096ecd0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096ece0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096ecf0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096ed00 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096ed10 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096ed20 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096ed30 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096ed40 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096ed50 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096ed60 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096ed70 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096ed80 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096ed90 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x0096eda0 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ - 0x0096edb0 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x0096edc0 72546578 436f6f72 64733b20 0a20206f rTexCoords; . o │ │ │ │ - 0x0096edd0 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ - 0x0096ede0 6578436f 6f726473 3b200a20 20756e69 exCoords; . uni │ │ │ │ - 0x0096edf0 666f726d 206d6174 3420755f 6d6f6465 form mat4 u_mode │ │ │ │ - 0x0096ee00 6c566965 773b200a 2020756e 69666f72 lView; . unifor │ │ │ │ - 0x0096ee10 6d206d61 74342075 5f70726f 6a656374 m mat4 u_project │ │ │ │ - 0x0096ee20 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ - 0x0096ee30 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ - 0x0096ee40 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ - 0x0096ee50 20766563 3220755f 706f7369 74696f6e vec2 u_position │ │ │ │ - 0x0096ee60 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ - 0x0096ee70 61742075 5f69734f 75746c69 6e655061 at u_isOutlinePa │ │ │ │ - 0x0096ee80 73733b20 0a202075 6e69666f 726d2066 ss; . uniform f │ │ │ │ - 0x0096ee90 6c6f6174 20755f6f 70616369 74793b20 loat u_opacity; │ │ │ │ - 0x0096eea0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ - 0x0096eeb0 20755f6c 656e6774 683b200a 2020636f u_length; . co │ │ │ │ - 0x0096eec0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ - 0x0096eed0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ - 0x0096eee0 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ - 0x0096eef0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ - 0x0096ef00 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ - 0x0096ef10 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ - 0x0096ef20 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ - 0x0096ef30 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ - 0x0096ef40 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x0096ef50 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ - 0x0096ef60 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ - 0x0096ef70 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ - 0x0096ef80 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0096ef90 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ - 0x0096efa0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ - 0x0096efb0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ - 0x0096efc0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x0096efd0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ - 0x0096efe0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ - 0x0096eff0 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ - 0x0096f000 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ - 0x0096f010 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0096f020 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ - 0x0096f030 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ - 0x0096f040 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ - 0x0096f050 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x0096f060 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ - 0x0096f070 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ - 0x0096f080 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ - 0x0096f090 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ - 0x0096f0a0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ - 0x0096f0b0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ - 0x0096f0c0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ - 0x0096f0d0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ - 0x0096f0e0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ - 0x0096f0f0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ - 0x0096f100 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x0096f110 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ - 0x0096f120 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ - 0x0096f130 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ - 0x0096f140 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ - 0x0096f150 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ - 0x0096f160 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x0096f170 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ - 0x0096f180 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ - 0x0096f190 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x0096f1a0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ - 0x0096f1b0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ - 0x0096f1c0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x0096f1d0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ - 0x0096f1e0 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ - 0x0096f1f0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ - 0x0096f200 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x0096f210 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ - 0x0096f220 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ - 0x0096f230 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ - 0x0096f240 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ - 0x0096f250 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ - 0x0096f260 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ - 0x0096f270 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ - 0x0096f280 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ - 0x0096f290 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ - 0x0096f2a0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ - 0x0096f2b0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ - 0x0096f2c0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ - 0x0096f2d0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ - 0x0096f2e0 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ - 0x0096f2f0 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ - 0x0096f300 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ - 0x0096f310 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ - 0x0096f320 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ - 0x0096f330 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ - 0x0096f340 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ - 0x0096f350 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ - 0x0096f360 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ - 0x0096f370 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ - 0x0096f380 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ - 0x0096f390 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ - 0x0096f3a0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ - 0x0096f3b0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x0096f3c0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ - 0x0096f3d0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ - 0x0096f3e0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ - 0x0096f3f0 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ - 0x0096f400 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ - 0x0096f410 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ - 0x0096f420 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x0096f430 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ - 0x0096f440 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ - 0x0096f450 6e282920 0a20207b 200a2020 2020676c n() . { . gl │ │ │ │ - 0x0096f460 5f506f73 6974696f 6e203d20 76656334 _Position = vec4 │ │ │ │ - 0x0096f470 28615f70 6f736974 696f6e2c 20302c20 (a_position, 0, │ │ │ │ - 0x0096f480 3129202a 20755f6d 6f64656c 56696577 1) * u_modelView │ │ │ │ - 0x0096f490 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ - 0x0096f4a0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ - 0x0096f4b0 4e200a20 20202067 6c5f506f 73697469 N . gl_Positi │ │ │ │ - 0x0096f4c0 6f6e2e79 203d202d 676c5f50 6f736974 on.y = -gl_Posit │ │ │ │ - 0x0096f4d0 696f6e2e 793b200a 20202020 676c5f50 ion.y; . gl_P │ │ │ │ - 0x0096f4e0 6f736974 696f6e2e 7a203d20 28676c5f osition.z = (gl_ │ │ │ │ - 0x0096f4f0 506f7369 74696f6e 2e7a2020 2b20676c Position.z + gl │ │ │ │ - 0x0096f500 5f506f73 6974696f 6e2e7729 202a2030 _Position.w) * 0 │ │ │ │ - 0x0096f510 2e353b20 0a202023 656e6469 66200a20 .5; . #endif . │ │ │ │ - 0x0096f520 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x0096f530 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ - 0x0096f540 436f6f72 64733b20 0a20207d 200a0000 Coords; . } ... │ │ │ │ - 0x0096f550 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x0096f560 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x0096f570 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x0096f580 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x0096f590 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x0096f5a0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x0096f5b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096f5c0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x0096f5d0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x0096f5e0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x0096f5f0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x0096f600 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x0096f610 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x0096f620 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x0096f630 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x0096f640 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x0096f650 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x0096f660 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x0096f670 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x0096f680 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x0096f690 2023656e 64696620 0a202023 64656669 #endif . #defi │ │ │ │ - 0x0096f6a0 6e652054 494c455f 4241434b 47524f55 ne TILE_BACKGROU │ │ │ │ - 0x0096f6b0 4e445f4d 41585f43 4f554e54 20363420 ND_MAX_COUNT 64 │ │ │ │ - 0x0096f6c0 0a20206f 75742076 65633320 765f7465 . out vec3 v_te │ │ │ │ - 0x0096f6d0 78436f6f 7264733b 200a2020 756e6966 xCoords; . unif │ │ │ │ - 0x0096f6e0 6f726d20 76656334 20755f74 696c6543 orm vec4 u_tileC │ │ │ │ - 0x0096f6f0 6f6f7264 734d696e 4d61785b 54494c45 oordsMinMax[TILE │ │ │ │ - 0x0096f700 5f424143 4b47524f 554e445f 4d41585f _BACKGROUND_MAX_ │ │ │ │ - 0x0096f710 434f554e 545d3b20 0a202075 6e69666f COUNT]; . unifo │ │ │ │ - 0x0096f720 726d2069 6e742075 5f746578 74757265 rm int u_texture │ │ │ │ - 0x0096f730 496e6465 785b5449 4c455f42 41434b47 Index[TILE_BACKG │ │ │ │ - 0x0096f740 524f554e 445f4d41 585f434f 554e545d ROUND_MAX_COUNT] │ │ │ │ - 0x0096f750 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x0096f760 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ - 0x0096f770 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ - 0x0096f780 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x0096f790 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ - 0x0096f7a0 69766f74 5472616e 73666f72 6d3b200a ivotTransform; . │ │ │ │ - 0x0096f7b0 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ - 0x0096f7c0 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ - 0x0096f7d0 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ - 0x0096f7e0 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ - 0x0096f7f0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ - 0x0096f800 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ - 0x0096f810 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ - 0x0096f820 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ - 0x0096f830 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ - 0x0096f840 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ - 0x0096f850 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ - 0x0096f860 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x0096f870 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ - 0x0096f880 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ - 0x0096f890 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ - 0x0096f8a0 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ - 0x0096f8b0 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ - 0x0096f8c0 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ - 0x0096f8d0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x0096f8e0 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ - 0x0096f8f0 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ - 0x0096f900 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ - 0x0096f910 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ - 0x0096f920 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ - 0x0096f930 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ - 0x0096f940 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ - 0x0096f950 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ - 0x0096f960 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096f970 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ - 0x0096f980 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ - 0x0096f990 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ - 0x0096f9a0 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ - 0x0096f9b0 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ - 0x0096f9c0 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ - 0x0096f9d0 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ - 0x0096f9e0 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x0096f9f0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x0096fa00 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x0096fa10 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ - 0x0096fa20 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ - 0x0096fa30 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ - 0x0096fa40 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ - 0x0096fa50 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x0096fa60 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x0096fa70 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ - 0x0096fa80 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ - 0x0096fa90 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ - 0x0096faa0 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ - 0x0096fab0 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ - 0x0096fac0 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ - 0x0096fad0 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ - 0x0096fae0 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ - 0x0096faf0 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ - 0x0096fb00 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ - 0x0096fb10 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x0096fb20 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ - 0x0096fb30 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ - 0x0096fb40 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ - 0x0096fb50 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ - 0x0096fb60 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ - 0x0096fb70 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ - 0x0096fb80 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ - 0x0096fb90 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ - 0x0096fba0 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ - 0x0096fbb0 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ - 0x0096fbc0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ - 0x0096fbd0 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ - 0x0096fbe0 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ - 0x0096fbf0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x0096fc00 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ - 0x0096fc10 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ - 0x0096fc20 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ - 0x0096fc30 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ - 0x0096fc40 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ - 0x0096fc50 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ - 0x0096fc60 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ - 0x0096fc70 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ - 0x0096fc80 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ - 0x0096fc90 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ - 0x0096fca0 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ - 0x0096fcb0 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ - 0x0096fcc0 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ - 0x0096fcd0 200a2020 20202020 72657475 726e206f . return o │ │ │ │ - 0x0096fce0 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ - 0x0096fcf0 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ - 0x0096fd00 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ - 0x0096fd10 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ - 0x0096fd20 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x0096fd30 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ - 0x0096fd40 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ - 0x0096fd50 20207665 63322071 75616456 65727465 vec2 quadVerte │ │ │ │ - 0x0096fd60 78203d20 76656332 28676c5f 56657274 x = vec2(gl_Vert │ │ │ │ - 0x0096fd70 65784944 20262031 2c202867 6c5f5665 exID & 1, (gl_Ve │ │ │ │ - 0x0096fd80 72746578 4944203e 3e203129 20262031 rtexID >> 1) & 1 │ │ │ │ - 0x0096fd90 293b200a 2020200a 20202020 76656334 ); . . vec4 │ │ │ │ - 0x0096fda0 2074696c 65436f6f 7264734d 696e4d61 tileCoordsMinMa │ │ │ │ - 0x0096fdb0 78203d20 755f7469 6c65436f 6f726473 x = u_tileCoords │ │ │ │ - 0x0096fdc0 4d696e4d 61785b67 6c5f496e 7374616e MinMax[gl_Instan │ │ │ │ - 0x0096fdd0 63654944 5d3b200a 20202020 76656332 ceID]; . vec2 │ │ │ │ - 0x0096fde0 20776f72 6c64506f 73203d20 6d697828 worldPos = mix( │ │ │ │ - 0x0096fdf0 74696c65 436f6f72 64734d69 6e4d6178 tileCoordsMinMax │ │ │ │ - 0x0096fe00 2e78792c 2074696c 65436f6f 7264734d .xy, tileCoordsM │ │ │ │ - 0x0096fe10 696e4d61 782e7a77 2c207175 61645665 inMax.zw, quadVe │ │ │ │ - 0x0096fe20 72746578 293b200a 20202020 76656334 rtex); . vec4 │ │ │ │ - 0x0096fe30 20706f73 203d2076 65633428 776f726c pos = vec4(worl │ │ │ │ - 0x0096fe40 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ - 0x0096fe50 2a20755f 6d6f6465 6c566965 77202a20 * u_modelView * │ │ │ │ - 0x0096fe60 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x0096fe70 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ - 0x0096fe80 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ - 0x0096fe90 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ - 0x0096fea0 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ - 0x0096feb0 3b200a20 20200a20 20202076 5f746578 ; . . v_tex │ │ │ │ - 0x0096fec0 436f6f72 6473203d 20766563 33287175 Coords = vec3(qu │ │ │ │ - 0x0096fed0 61645665 72746578 2c20666c 6f617428 adVertex, float( │ │ │ │ - 0x0096fee0 755f7465 78747572 65496e64 65785b67 u_textureIndex[g │ │ │ │ - 0x0096fef0 6c5f496e 7374616e 63654944 5d29293b l_InstanceID])); │ │ │ │ - 0x0096ff00 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x0096ff10 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x0096ff20 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x0096ff30 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x0096ff40 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x0096ff50 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x0096ff60 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x0096ff70 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x0096ff80 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x0096ff90 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x0096ffa0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x0096ffb0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x0096ffc0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x0096ffd0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x0096ffe0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x0096fff0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00970000 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00970010 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00970020 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00970030 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00970040 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00970050 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00970060 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00970070 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x00970080 6e207665 63342061 5f636f6c 6f725465 n vec4 a_colorTe │ │ │ │ - 0x00970090 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ - 0x009700a0 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ - 0x009700b0 6f72643b 200a2020 6f757420 76656332 ord; . out vec2 │ │ │ │ - 0x009700c0 20765f6d 61736b54 6578436f 6f72643b v_maskTexCoord; │ │ │ │ - 0x009700d0 200a2020 6f757420 666c6f61 7420765f . out float v_ │ │ │ │ - 0x009700e0 68616c66 4c656e67 74683b20 0a202075 halfLength; . u │ │ │ │ - 0x009700f0 6e69666f 726d206d 61743420 755f6d6f niform mat4 u_mo │ │ │ │ - 0x00970100 64656c56 6965773b 200a2020 756e6966 delView; . unif │ │ │ │ - 0x00970110 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ - 0x00970120 6374696f 6e3b200a 2020756e 69666f72 ction; . unifor │ │ │ │ - 0x00970130 6d206d61 74342075 5f706976 6f745472 m mat4 u_pivotTr │ │ │ │ - 0x00970140 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ - 0x00970150 6f726d20 76656334 20755f74 72616666 orm vec4 u_traff │ │ │ │ - 0x00970160 69635061 72616d73 3b200a20 20756e69 icParams; . uni │ │ │ │ - 0x00970170 666f726d 20766563 3420755f 6f75746c form vec4 u_outl │ │ │ │ - 0x00970180 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ - 0x00970190 666f726d 20766563 3420755f 6c696768 form vec4 u_ligh │ │ │ │ - 0x009701a0 74417272 6f77436f 6c6f723b 200a2020 tArrowColor; . │ │ │ │ - 0x009701b0 756e6966 6f726d20 76656334 20755f64 uniform vec4 u_d │ │ │ │ - 0x009701c0 61726b41 72726f77 436f6c6f 723b200a arkArrowColor; . │ │ │ │ - 0x009701d0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ - 0x009701e0 755f6f75 746c696e 653b200a 2020756e u_outline; . un │ │ │ │ - 0x009701f0 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ - 0x00970200 61636974 793b200a 2020636f 6e737420 acity; . const │ │ │ │ - 0x00970210 666c6f61 74206b41 72726f77 5653697a float kArrowVSiz │ │ │ │ - 0x00970220 65203d20 302e3235 3b200a20 20636f6e e = 0.25; . con │ │ │ │ - 0x00970230 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00970240 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00970250 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00970260 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00970270 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00970280 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00970290 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x009702a0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x009702b0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x009702c0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x009702d0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x009702e0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x009702f0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00970300 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00970310 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00970320 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00970330 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00970340 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00970350 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00970360 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00970370 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00970380 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00970390 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x009703a0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x009703b0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x009703c0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x009703d0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x009703e0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x009703f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00970400 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00970410 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00970420 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00970430 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00970440 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00970450 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00970460 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00970470 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00970480 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00970490 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x009704a0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x009704b0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x009704c0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x009704d0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x009704e0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x009704f0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x00970500 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00970510 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x00970520 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x00970530 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00970540 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x00970550 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x00970560 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x00970570 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00970580 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x00970590 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x009705a0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x009705b0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x009705c0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x009705d0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x009705e0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x009705f0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x00970600 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x00970610 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x00970620 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x00970630 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x00970640 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00970650 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x00970660 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x00970670 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x00970680 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x00970690 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x009706a0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x009706b0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x009706c0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x009706d0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x009706e0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x009706f0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x00970700 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x00970710 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x00970720 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00970730 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x00970740 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x00970750 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00970760 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x00970770 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x00970780 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x00970790 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x009707a0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x009707b0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x009707c0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ - 0x009707d0 32206e6f 726d616c 203d2061 5f6e6f72 2 normal = a_nor │ │ │ │ - 0x009707e0 6d616c2e 78793b20 0a202020 20766563 mal.xy; . vec │ │ │ │ - 0x009707f0 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ - 0x00970800 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ - 0x00970810 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ - 0x00970820 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ - 0x00970830 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ - 0x00970840 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ - 0x00970850 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ - 0x00970860 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ - 0x00970870 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ - 0x00970880 20755f74 72616666 69635061 72616d73 u_trafficParams │ │ │ │ - 0x00970890 2e783b20 0a202020 20202069 66202861 .x; . if (a │ │ │ │ - 0x009708a0 5f6e6f72 6d616c2e 7a203c20 302e3029 _normal.z < 0.0) │ │ │ │ - 0x009708b0 200a2020 20202020 20206e6f 726d203d . norm = │ │ │ │ - 0x009708c0 206e6f72 6d616c20 2a20755f 74726166 normal * u_traf │ │ │ │ - 0x009708d0 66696350 6172616d 732e793b 200a2020 ficParams.y; . │ │ │ │ - 0x009708e0 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ - 0x009708f0 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ - 0x00970900 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ - 0x00970910 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ - 0x00970920 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ - 0x00970930 6f6e2e78 79202b20 6e6f726d 2c200a20 on.xy + norm, . │ │ │ │ - 0x00970940 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00970950 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00970960 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00970970 20202020 20755f6d 6f64656c 56696577 u_modelView │ │ │ │ - 0x00970980 2c206c65 6e677468 286e6f72 6d29293b , length(norm)); │ │ │ │ - 0x00970990 200a2020 20207d20 0a202020 20666c6f . } . flo │ │ │ │ - 0x009709a0 61742075 4f666673 6574203d 206c656e at uOffset = len │ │ │ │ - 0x009709b0 67746828 76656334 286b5368 61706543 gth(vec4(kShapeC │ │ │ │ - 0x009709c0 6f6f7264 5363616c 61722c20 302c2030 oordScalar, 0, 0 │ │ │ │ - 0x009709d0 2c203029 202a2075 5f6d6f64 656c5669 , 0) * u_modelVi │ │ │ │ - 0x009709e0 65772920 2a20615f 6e6f726d 616c2e77 ew) * a_normal.w │ │ │ │ - 0x009709f0 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ - 0x00970a00 78436f6f 7264203d 20615f63 6f6c6f72 xCoord = a_color │ │ │ │ - 0x00970a10 54657843 6f6f7264 2e78793b 200a2020 TexCoord.xy; . │ │ │ │ - 0x00970a20 2020666c 6f617420 76203d20 6d697828 float v = mix( │ │ │ │ - 0x00970a30 615f636f 6c6f7254 6578436f 6f72642e a_colorTexCoord. │ │ │ │ - 0x00970a40 7a2c2061 5f636f6c 6f725465 78436f6f z, a_colorTexCoo │ │ │ │ - 0x00970a50 72642e7a 202b206b 4172726f 77565369 rd.z + kArrowVSi │ │ │ │ - 0x00970a60 7a652c20 302e3520 2a20615f 6e6f726d ze, 0.5 * a_norm │ │ │ │ - 0x00970a70 616c2e7a 202b2030 2e35293b 200a2020 al.z + 0.5); . │ │ │ │ - 0x00970a80 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ - 0x00970a90 203d2076 65633228 754f6666 73657420 = vec2(uOffset │ │ │ │ - 0x00970aa0 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ - 0x00970ab0 732e7a2c 20762920 2a20755f 74726166 s.z, v) * u_traf │ │ │ │ - 0x00970ac0 66696350 6172616d 732e773b 200a2020 ficParams.w; . │ │ │ │ - 0x00970ad0 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ - 0x00970ae0 2e78202a 3d207374 65702861 5f636f6c .x *= step(a_col │ │ │ │ - 0x00970af0 6f725465 78436f6f 72642e77 2c20765f orTexCoord.w, v_ │ │ │ │ - 0x00970b00 6d61736b 54657843 6f6f7264 2e78293b maskTexCoord.x); │ │ │ │ - 0x00970b10 200a2020 2020765f 68616c66 4c656e67 . v_halfLeng │ │ │ │ - 0x00970b20 7468203d 20615f6e 6f726d61 6c2e7a3b th = a_normal.z; │ │ │ │ - 0x00970b30 200a2020 20207665 63342070 6f73203d . vec4 pos = │ │ │ │ - 0x00970b40 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ - 0x00970b50 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ - 0x00970b60 74696f6e 2e7a2c20 312e3029 202a2075 tion.z, 1.0) * u │ │ │ │ - 0x00970b70 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ - 0x00970b80 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ - 0x00970b90 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ - 0x00970ba0 6f726d28 706f732c 20755f70 69766f74 orm(pos, u_pivot │ │ │ │ - 0x00970bb0 5472616e 73666f72 6d2c2030 2e30293b Transform, 0.0); │ │ │ │ - 0x00970bc0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x00970bd0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00970be0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00970bf0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00970c00 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00970c10 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00970c20 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00970c30 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00970c40 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00970c50 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00970c60 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00970c70 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00970c80 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00970c90 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00970ca0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00970cb0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00970cc0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00970cd0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00970ce0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00970cf0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00970d00 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00970d10 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ - 0x00970d20 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00970d30 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x00970d40 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ - 0x00970d50 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ - 0x00970d60 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ - 0x00970d70 6f72643b 200a2020 6f757420 76656333 ord; . out vec3 │ │ │ │ - 0x00970d80 20765f72 61646975 733b200a 2020756e v_radius; . un │ │ │ │ - 0x00970d90 69666f72 6d206d61 74342075 5f6d6f64 iform mat4 u_mod │ │ │ │ - 0x00970da0 656c5669 65773b20 0a202075 6e69666f elView; . unifo │ │ │ │ - 0x00970db0 726d206d 61743420 755f7072 6f6a6563 rm mat4 u_projec │ │ │ │ - 0x00970dc0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ - 0x00970dd0 206d6174 3420755f 7069766f 74547261 mat4 u_pivotTra │ │ │ │ - 0x00970de0 6e73666f 726d3b20 0a202075 6e69666f nsform; . unifo │ │ │ │ - 0x00970df0 726d2076 65633420 755f7472 61666669 rm vec4 u_traffi │ │ │ │ - 0x00970e00 63506172 616d733b 200a2020 756e6966 cParams; . unif │ │ │ │ - 0x00970e10 6f726d20 76656334 20755f6f 75746c69 orm vec4 u_outli │ │ │ │ - 0x00970e20 6e65436f 6c6f723b 200a2020 756e6966 neColor; . unif │ │ │ │ - 0x00970e30 6f726d20 76656334 20755f6c 69676874 orm vec4 u_light │ │ │ │ - 0x00970e40 4172726f 77436f6c 6f723b20 0a202075 ArrowColor; . u │ │ │ │ - 0x00970e50 6e69666f 726d2076 65633420 755f6461 niform vec4 u_da │ │ │ │ - 0x00970e60 726b4172 726f7743 6f6c6f72 3b200a20 rkArrowColor; . │ │ │ │ - 0x00970e70 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00970e80 5f6f7574 6c696e65 3b200a20 20756e69 _outline; . uni │ │ │ │ - 0x00970e90 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ - 0x00970ea0 63697479 3b200a20 20636f6e 73742066 city; . const f │ │ │ │ - 0x00970eb0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ - 0x00970ec0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ - 0x00970ed0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ - 0x00970ee0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ - 0x00970ef0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ - 0x00970f00 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ - 0x00970f10 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ - 0x00970f20 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ - 0x00970f30 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ - 0x00970f40 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ - 0x00970f50 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ - 0x00970f60 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ - 0x00970f70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00970f80 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ - 0x00970f90 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ - 0x00970fa0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00970fb0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ - 0x00970fc0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ - 0x00970fd0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00970fe0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ - 0x00970ff0 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ - 0x00971000 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00971010 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00971020 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ - 0x00971030 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ - 0x00971040 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00971050 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ - 0x00971060 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ - 0x00971070 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ - 0x00971080 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ - 0x00971090 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ - 0x009710a0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ - 0x009710b0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ - 0x009710c0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ - 0x009710d0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x009710e0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x009710f0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00971100 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ - 0x00971110 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ - 0x00971120 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ - 0x00971130 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ - 0x00971140 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ - 0x00971150 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ - 0x00971160 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ - 0x00971170 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ - 0x00971180 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ - 0x00971190 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ - 0x009711a0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ - 0x009711b0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ - 0x009711c0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ - 0x009711d0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ - 0x009711e0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ - 0x009711f0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00971200 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ - 0x00971210 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ - 0x00971220 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ - 0x00971230 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ - 0x00971240 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ - 0x00971250 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ - 0x00971260 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ - 0x00971270 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ - 0x00971280 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ - 0x00971290 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ - 0x009712a0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ - 0x009712b0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ - 0x009712c0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ - 0x009712d0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ - 0x009712e0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ - 0x009712f0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ - 0x00971300 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ - 0x00971310 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ - 0x00971320 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ - 0x00971330 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ - 0x00971340 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ - 0x00971350 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ - 0x00971360 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ - 0x00971370 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ - 0x00971380 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ - 0x00971390 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ - 0x009713a0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ - 0x009713b0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ - 0x009713c0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ - 0x009713d0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ - 0x009713e0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ - 0x009713f0 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ - 0x00971400 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ - 0x00971410 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x00971420 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ - 0x00971430 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ - 0x00971440 20207b20 0a202020 20766563 32206e6f { . vec2 no │ │ │ │ - 0x00971450 726d616c 203d2061 5f6e6f72 6d616c2e rmal = a_normal. │ │ │ │ - 0x00971460 78793b20 0a202020 20766563 32207472 xy; . vec2 tr │ │ │ │ - 0x00971470 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ - 0x00971480 203d2028 76656334 28615f70 6f736974 = (vec4(a_posit │ │ │ │ - 0x00971490 696f6e2e 78792c20 302e302c 20312e30 ion.xy, 0.0, 1.0 │ │ │ │ - 0x009714a0 29202a20 755f6d6f 64656c56 69657729 ) * u_modelView) │ │ │ │ - 0x009714b0 2e78793b 200a2020 2020696e 7420696e .xy; . int in │ │ │ │ - 0x009714c0 64657820 3d20696e 7428615f 706f7369 dex = int(a_posi │ │ │ │ - 0x009714d0 74696f6e 2e77293b 200a2020 2020666c tion.w); . fl │ │ │ │ - 0x009714e0 6f617420 6c656674 53697a65 203d2075 oat leftSize = u │ │ │ │ - 0x009714f0 5f6c6967 68744172 726f7743 6f6c6f72 _lightArrowColor │ │ │ │ - 0x00971500 5b696e64 65785d3b 200a2020 2020666c [index]; . fl │ │ │ │ - 0x00971510 6f617420 72696768 7453697a 65203d20 oat rightSize = │ │ │ │ - 0x00971520 755f6461 726b4172 726f7743 6f6c6f72 u_darkArrowColor │ │ │ │ - 0x00971530 5b696e64 65785d3b 200a2020 20206966 [index]; . if │ │ │ │ - 0x00971540 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ - 0x00971550 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ - 0x00971560 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ - 0x00971570 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ - 0x00971580 20302e35 202a2028 72696768 7453697a 0.5 * (rightSiz │ │ │ │ - 0x00971590 65202d20 6c656674 53697a65 293b200a e - leftSize); . │ │ │ │ - 0x009715a0 20202020 20207472 616e7366 6f726d65 transforme │ │ │ │ - 0x009715b0 64417869 73506f73 203d2063 616c634c dAxisPos = calcL │ │ │ │ - 0x009715c0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x009715d0 6973506f 73287472 616e7366 6f726d65 isPos(transforme │ │ │ │ - 0x009715e0 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ - 0x009715f0 74696f6e 2e787920 2b206e6f 726d2c20 tion.xy + norm, │ │ │ │ - 0x00971600 0a202020 20202020 20202020 20202020 . │ │ │ │ - 0x00971610 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00971620 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00971630 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ - 0x00971640 65772c20 6c656e67 7468286e 6f726d29 ew, length(norm) │ │ │ │ - 0x00971650 293b200a 20202020 7d200a20 20202076 ); . } . v │ │ │ │ - 0x00971660 5f726164 69757320 3d207665 63332861 _radius = vec3(a │ │ │ │ - 0x00971670 5f6e6f72 6d616c2e 7a772c20 312e3029 _normal.zw, 1.0) │ │ │ │ - 0x00971680 202a2030 2e35202a 20286c65 66745369 * 0.5 * (leftSi │ │ │ │ - 0x00971690 7a65202b 20726967 68745369 7a65293b ze + rightSize); │ │ │ │ - 0x009716a0 200a2020 20207665 63322066 696e616c . vec2 final │ │ │ │ - 0x009716b0 506f7320 3d207472 616e7366 6f726d65 Pos = transforme │ │ │ │ - 0x009716c0 64417869 73506f73 202b2076 5f726164 dAxisPos + v_rad │ │ │ │ - 0x009716d0 6975732e 78793b20 0a202020 20765f63 ius.xy; . v_c │ │ │ │ - 0x009716e0 6f6c6f72 54657843 6f6f7264 203d2061 olorTexCoord = a │ │ │ │ - 0x009716f0 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ - 0x00971700 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x00971710 76656334 2866696e 616c506f 732c2061 vec4(finalPos, a │ │ │ │ - 0x00971720 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ - 0x00971730 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ - 0x00971740 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ - 0x00971750 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ - 0x00971760 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ - 0x00971770 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ - 0x00971780 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ - 0x00971790 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x009717a0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x009717b0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x009717c0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x009717d0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x009717e0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x009717f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00971800 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00971810 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00971820 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00971830 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00971840 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00971850 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00971860 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00971870 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00971880 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00971890 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x009718a0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x009718b0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x009718c0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x009718d0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x009718e0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x009718f0 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ - 0x00971900 72546578 436f6f72 643b200a 20206f75 rTexCoord; . ou │ │ │ │ - 0x00971910 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ - 0x00971920 78436f6f 72643b20 0a202075 6e69666f xCoord; . unifo │ │ │ │ - 0x00971930 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ - 0x00971940 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ - 0x00971950 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ - 0x00971960 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ - 0x00971970 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ - 0x00971980 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ - 0x00971990 76656334 20755f74 72616666 69635061 vec4 u_trafficPa │ │ │ │ - 0x009719a0 72616d73 3b200a20 20756e69 666f726d rams; . uniform │ │ │ │ - 0x009719b0 20766563 3420755f 6f75746c 696e6543 vec4 u_outlineC │ │ │ │ - 0x009719c0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ - 0x009719d0 20766563 3420755f 6c696768 74417272 vec4 u_lightArr │ │ │ │ - 0x009719e0 6f77436f 6c6f723b 200a2020 756e6966 owColor; . unif │ │ │ │ - 0x009719f0 6f726d20 76656334 20755f64 61726b41 orm vec4 u_darkA │ │ │ │ - 0x00971a00 72726f77 436f6c6f 723b200a 2020756e rrowColor; . un │ │ │ │ - 0x00971a10 69666f72 6d20666c 6f617420 755f6f75 iform float u_ou │ │ │ │ - 0x00971a20 746c696e 653b200a 2020756e 69666f72 tline; . unifor │ │ │ │ - 0x00971a30 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ - 0x00971a40 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ - 0x00971a50 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00971a60 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00971a70 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00971a80 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00971a90 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x00971aa0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x00971ab0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x00971ac0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x00971ad0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x00971ae0 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x00971af0 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00971b00 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00971b10 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00971b20 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00971b30 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00971b40 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00971b50 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00971b60 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00971b70 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00971b80 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00971b90 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x00971ba0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x00971bb0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x00971bc0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x00971bd0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x00971be0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x00971bf0 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00971c00 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00971c10 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00971c20 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00971c30 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00971c40 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00971c50 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00971c60 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00971c70 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00971c80 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00971c90 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00971ca0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00971cb0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00971cc0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00971cd0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00971ce0 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00971cf0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00971d00 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00971d10 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00971d20 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00971d30 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00971d40 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00971d50 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00971d60 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00971d70 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00971d80 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00971d90 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00971da0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00971db0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00971dc0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00971dd0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00971de0 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00971df0 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00971e00 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00971e10 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00971e20 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00971e30 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00971e40 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00971e50 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00971e60 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00971e70 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00971e80 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00971e90 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00971ea0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00971eb0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00971ec0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00971ed0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00971ee0 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00971ef0 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00971f00 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00971f10 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00971f20 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00971f30 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00971f40 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00971f50 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x00971f60 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x00971f70 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00971f80 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00971f90 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00971fa0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00971fb0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00971fc0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00971fd0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00971fe0 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ - 0x00971ff0 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ - 0x00972000 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ - 0x00972010 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ - 0x00972020 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ - 0x00972030 3b200a20 20202076 65633420 706f7320 ; . vec4 pos │ │ │ │ - 0x00972040 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x00972050 65644178 6973506f 732c2061 5f706f73 edAxisPos, a_pos │ │ │ │ - 0x00972060 6974696f 6e2e7a2c 20312e30 29202a20 ition.z, 1.0) * │ │ │ │ - 0x00972070 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00972080 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ - 0x00972090 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ - 0x009720a0 6f6f7264 3b200a20 20202067 6c5f506f oord; . gl_Po │ │ │ │ - 0x009720b0 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ - 0x009720c0 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ - 0x009720d0 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ - 0x009720e0 726d2c20 302e3029 3b200a20 207d200a rm, 0.0); . } . │ │ │ │ - 0x009720f0 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ - 0x00972100 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00972110 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00972120 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00972130 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00972140 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00972150 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00972160 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00972170 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00972180 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00972190 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x009721a0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x009721b0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x009721c0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009721d0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009721e0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009721f0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00972200 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00972210 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00972220 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00972230 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00972240 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00972250 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00972260 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x00972270 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ - 0x00972280 0a20206f 75742076 65633420 765f636f . out vec4 v_co │ │ │ │ - 0x00972290 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ - 0x009722a0 6d617434 20755f6d 6f64656c 56696577 mat4 u_modelView │ │ │ │ - 0x009722b0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x009722c0 3420755f 70726f6a 65637469 6f6e3b20 4 u_projection; │ │ │ │ - 0x009722d0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x009722e0 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ - 0x009722f0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ - 0x00972300 3420755f 70617261 6d733b20 0a202075 4 u_params; . u │ │ │ │ - 0x00972310 6e69666f 726d2066 6c6f6174 20755f6c niform float u_l │ │ │ │ - 0x00972320 696e6548 616c6657 69647468 3b200a20 ineHalfWidth; . │ │ │ │ - 0x00972330 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00972340 5f6d6178 52616469 75733b20 0a202063 _maxRadius; . c │ │ │ │ - 0x00972350 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ - 0x00972360 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ - 0x00972370 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ - 0x00972380 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ - 0x00972390 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ - 0x009723a0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ - 0x009723b0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ - 0x009723c0 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ - 0x009723d0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ - 0x009723e0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ - 0x009723f0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ - 0x00972400 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00972410 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x00972420 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ - 0x00972430 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x00972440 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x00972450 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ - 0x00972460 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ - 0x00972470 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ - 0x00972480 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ - 0x00972490 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ - 0x009724a0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ - 0x009724b0 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ - 0x009724c0 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ - 0x009724d0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ - 0x009724e0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ - 0x009724f0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ - 0x00972500 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ - 0x00972510 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ - 0x00972520 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ - 0x00972530 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x00972540 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ - 0x00972550 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ - 0x00972560 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ - 0x00972570 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ - 0x00972580 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ - 0x00972590 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ - 0x009725a0 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ - 0x009725b0 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ - 0x009725c0 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ - 0x009725d0 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ - 0x009725e0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ - 0x009725f0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ - 0x00972600 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ - 0x00972610 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ - 0x00972620 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ - 0x00972630 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ - 0x00972640 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ - 0x00972650 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ - 0x00972660 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ - 0x00972670 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ - 0x00972680 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ - 0x00972690 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ - 0x009726a0 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ - 0x009726b0 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ - 0x009726c0 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ - 0x009726d0 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ - 0x009726e0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ - 0x009726f0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ - 0x00972700 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ - 0x00972710 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ - 0x00972720 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ - 0x00972730 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ - 0x00972740 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ - 0x00972750 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ - 0x00972760 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ - 0x00972770 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ - 0x00972780 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ - 0x00972790 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ - 0x009727a0 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ - 0x009727b0 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ - 0x009727c0 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ - 0x009727d0 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ - 0x009727e0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ - 0x009727f0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ - 0x00972800 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ - 0x00972810 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ - 0x00972820 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ - 0x00972830 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ - 0x00972840 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ - 0x00972850 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ - 0x00972860 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ - 0x00972870 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ - 0x00972880 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ - 0x00972890 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ - 0x009728a0 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ - 0x009728b0 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ - 0x009728c0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x009728d0 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ - 0x009728e0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ - 0x009728f0 65633220 6e6f726d 616c203d 20615f6e ec2 normal = a_n │ │ │ │ - 0x00972900 6f726d61 6c2e7879 3b200a20 20202076 ormal.xy; . v │ │ │ │ - 0x00972910 65633220 7472616e 73666f72 6d656441 ec2 transformedA │ │ │ │ - 0x00972920 78697350 6f73203d 20287665 63342861 xisPos = (vec4(a │ │ │ │ - 0x00972930 5f706f73 6974696f 6e2e7879 2c20302e _position.xy, 0. │ │ │ │ - 0x00972940 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ - 0x00972950 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ - 0x00972960 69662028 646f7428 6e6f726d 616c2c20 if (dot(normal, │ │ │ │ - 0x00972970 6e6f726d 616c2920 213d2030 2e302920 normal) != 0.0) │ │ │ │ - 0x00972980 0a202020 207b200a 20202020 20207665 . { . ve │ │ │ │ - 0x00972990 6332206e 6f726d20 3d206e6f 726d616c c2 norm = normal │ │ │ │ - 0x009729a0 202a2075 5f6c696e 6548616c 66576964 * u_lineHalfWid │ │ │ │ - 0x009729b0 74683b20 0a202020 20202074 72616e73 th; . trans │ │ │ │ - 0x009729c0 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ - 0x009729d0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ - 0x009729e0 6d656441 78697350 6f732874 72616e73 medAxisPos(trans │ │ │ │ - 0x009729f0 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ - 0x00972a00 5f706f73 6974696f 6e2e7879 202b206e _position.xy + n │ │ │ │ - 0x00972a10 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ - 0x00972a20 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00972a30 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00972a40 20202020 20202020 20202020 755f6d6f u_mo │ │ │ │ - 0x00972a50 64656c56 6965772c 206c656e 67746828 delView, length( │ │ │ │ - 0x00972a60 6e6f726d 29293b20 0a202020 207d200a norm)); . } . │ │ │ │ - 0x00972a70 20202020 765f636f 6c6f7220 3d20615f v_color = a_ │ │ │ │ - 0x00972a80 636f6c6f 723b200a 20202020 76656334 color; . vec4 │ │ │ │ - 0x00972a90 20706f73 203d2076 65633428 7472616e pos = vec4(tran │ │ │ │ - 0x00972aa0 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x00972ab0 615f706f 73697469 6f6e2e7a 2c20312e a_position.z, 1. │ │ │ │ - 0x00972ac0 3029202a 20755f70 726f6a65 6374696f 0) * u_projectio │ │ │ │ - 0x00972ad0 6e3b200a 20202020 676c5f50 6f736974 n; . gl_Posit │ │ │ │ - 0x00972ae0 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ - 0x00972af0 5472616e 73666f72 6d28706f 732c2075 Transform(pos, u │ │ │ │ - 0x00972b00 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ - 0x00972b10 20302e30 293b200a 20207d20 0a000000 0.0); . } .... │ │ │ │ - 0x00972b20 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ - 0x00972b30 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ - 0x00972b40 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ - 0x00972b50 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ - 0x00972b60 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ - 0x00972b70 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ - 0x00972b80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00972b90 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ - 0x00972ba0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ - 0x00972bb0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ - 0x00972bc0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ - 0x00972bd0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ - 0x00972be0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ - 0x00972bf0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ - 0x00972c00 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ - 0x00972c10 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ - 0x00972c20 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ - 0x00972c30 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ - 0x00972c40 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ - 0x00972c50 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ - 0x00972c60 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ - 0x00972c70 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ - 0x00972c80 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ - 0x00972c90 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ - 0x00972ca0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ - 0x00972cb0 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ - 0x00972cc0 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ - 0x00972cd0 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ - 0x00972ce0 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ - 0x00972cf0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ - 0x00972d00 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00972d10 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ - 0x00972d20 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ - 0x00972d30 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ - 0x00972d40 755f7061 72616d73 3b200a20 20756e69 u_params; . uni │ │ │ │ - 0x00972d50 666f726d 20666c6f 61742075 5f6c696e form float u_lin │ │ │ │ - 0x00972d60 6548616c 66576964 74683b20 0a202075 eHalfWidth; . u │ │ │ │ - 0x00972d70 6e69666f 726d2066 6c6f6174 20755f6d niform float u_m │ │ │ │ - 0x00972d80 61785261 64697573 3b200a20 20636f6e axRadius; . con │ │ │ │ - 0x00972d90 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ - 0x00972da0 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ - 0x00972db0 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ - 0x00972dc0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ - 0x00972dd0 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ - 0x00972de0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ - 0x00972df0 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ - 0x00972e00 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ - 0x00972e10 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ - 0x00972e20 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ - 0x00972e30 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ - 0x00972e40 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ - 0x00972e50 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00972e60 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ - 0x00972e70 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00972e80 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ - 0x00972e90 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ - 0x00972ea0 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ - 0x00972eb0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ - 0x00972ec0 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ - 0x00972ed0 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ - 0x00972ee0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00972ef0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ - 0x00972f00 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ - 0x00972f10 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ - 0x00972f20 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ - 0x00972f30 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ - 0x00972f40 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ - 0x00972f50 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00972f60 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ - 0x00972f70 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ - 0x00972f80 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ - 0x00972f90 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ - 0x00972fa0 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ - 0x00972fb0 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ - 0x00972fc0 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ - 0x00972fd0 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ - 0x00972fe0 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ - 0x00972ff0 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ - 0x00973000 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ - 0x00973010 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ - 0x00973020 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ - 0x00973030 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ - 0x00973040 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ - 0x00973050 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ - 0x00973060 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ - 0x00973070 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ - 0x00973080 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ - 0x00973090 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ - 0x009730a0 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ - 0x009730b0 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ - 0x009730c0 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ - 0x009730d0 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ - 0x009730e0 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ - 0x009730f0 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ - 0x00973100 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ - 0x00973110 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ - 0x00973120 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ - 0x00973130 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ - 0x00973140 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ - 0x00973150 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ - 0x00973160 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ - 0x00973170 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ - 0x00973180 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ - 0x00973190 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ - 0x009731a0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ - 0x009731b0 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ - 0x009731c0 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ - 0x009731d0 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ - 0x009731e0 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ - 0x009731f0 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ - 0x00973200 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ - 0x00973210 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ - 0x00973220 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ - 0x00973230 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ - 0x00973240 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ - 0x00973250 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ - 0x00973260 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ - 0x00973270 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ - 0x00973280 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ - 0x00973290 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ - 0x009732a0 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ - 0x009732b0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ - 0x009732c0 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ - 0x009732d0 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ - 0x009732e0 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ - 0x009732f0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ - 0x00973300 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ - 0x00973310 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ - 0x00973320 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ - 0x00973330 32206e6f 726d616c 203d2061 5f6e6f72 2 normal = a_nor │ │ │ │ - 0x00973340 6d616c2e 78793b20 0a202020 20766563 mal.xy; . vec │ │ │ │ - 0x00973350 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ - 0x00973360 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ - 0x00973370 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ - 0x00973380 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ - 0x00973390 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ - 0x009733a0 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ - 0x009733b0 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ - 0x009733c0 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ - 0x009733d0 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ - 0x009733e0 20755f6c 696e6548 616c6657 69647468 u_lineHalfWidth │ │ │ │ - 0x009733f0 3b200a20 20202020 20747261 6e73666f ; . transfo │ │ │ │ - 0x00973400 726d6564 41786973 506f7320 3d206361 rmedAxisPos = ca │ │ │ │ - 0x00973410 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ - 0x00973420 64417869 73506f73 28747261 6e73666f dAxisPos(transfo │ │ │ │ - 0x00973430 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ - 0x00973440 6f736974 696f6e2e 7879202b 206e6f72 osition.xy + nor │ │ │ │ - 0x00973450 6d2c200a 20202020 20202020 20202020 m, . │ │ │ │ - 0x00973460 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00973470 20202020 20202020 20202020 20202020 │ │ │ │ - 0x00973480 20202020 20202020 2020755f 6d6f6465 u_mode │ │ │ │ - 0x00973490 6c566965 772c206c 656e6774 68286e6f lView, length(no │ │ │ │ - 0x009734a0 726d2929 3b200a20 2020207d 200a2020 rm)); . } . │ │ │ │ - 0x009734b0 20207472 616e7366 6f726d65 64417869 transformedAxi │ │ │ │ - 0x009734c0 73506f73 202b3d20 615f6e6f 726d616c sPos += a_normal │ │ │ │ - 0x009734d0 2e7a7720 2a20755f 6c696e65 48616c66 .zw * u_lineHalf │ │ │ │ - 0x009734e0 57696474 683b200a 20202020 76656334 Width; . vec4 │ │ │ │ - 0x009734f0 20706f73 203d2076 65633428 7472616e pos = vec4(tran │ │ │ │ - 0x00973500 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ - 0x00973510 615f706f 73697469 6f6e2e7a 2c20312e a_position.z, 1. │ │ │ │ - 0x00973520 3029202a 20755f70 726f6a65 6374696f 0) * u_projectio │ │ │ │ - 0x00973530 6e3b200a 20202020 676c5f50 6f736974 n; . gl_Posit │ │ │ │ - 0x00973540 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ - 0x00973550 5472616e 73666f72 6d28706f 732c2075 Transform(pos, u │ │ │ │ - 0x00973560 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ - 0x00973570 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ - 0x00973580 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ - 0x00973590 20202020 765f7261 64697573 203d2076 v_radius = v │ │ │ │ - 0x009735a0 65633328 615f6e6f 726d616c 2e7a772c ec3(a_normal.zw, │ │ │ │ - 0x009735b0 20755f6d 61785261 64697573 29202a20 u_maxRadius) * │ │ │ │ - 0x009735c0 755f6c69 6e654861 6c665769 6474683b u_lineHalfWidth; │ │ │ │ - 0x009735d0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ - 0x009735e0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x009735f0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00973600 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00973610 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00973620 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00973630 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00973640 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00973650 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00973660 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00973670 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00973680 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00973690 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x009736a0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009736b0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009736c0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009736d0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009736e0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x009736f0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00973700 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00973710 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00973720 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00973730 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00973740 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ - 0x00973750 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ - 0x00973760 0a20206f 75742076 65633420 765f6f66 . out vec4 v_of │ │ │ │ - 0x00973770 66736574 733b200a 20206f75 74207665 fsets; . out ve │ │ │ │ - 0x00973780 63342076 5f636f6c 6f723b20 0a202075 c4 v_color; . u │ │ │ │ - 0x00973790 6e69666f 726d206d 61743420 755f6d6f niform mat4 u_mo │ │ │ │ - 0x009737a0 64656c56 6965773b 200a2020 756e6966 delView; . unif │ │ │ │ - 0x009737b0 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ - 0x009737c0 6374696f 6e3b200a 2020756e 69666f72 ction; . unifor │ │ │ │ - 0x009737d0 6d206d61 74342075 5f706976 6f745472 m mat4 u_pivotTr │ │ │ │ - 0x009737e0 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ - 0x009737f0 6f726d20 76656334 20755f70 6172616d orm vec4 u_param │ │ │ │ - 0x00973800 733b200a 2020756e 69666f72 6d20666c s; . uniform fl │ │ │ │ - 0x00973810 6f617420 755f6c69 6e654861 6c665769 oat u_lineHalfWi │ │ │ │ - 0x00973820 6474683b 200a2020 756e6966 6f726d20 dth; . uniform │ │ │ │ - 0x00973830 666c6f61 7420755f 6d617852 61646975 float u_maxRadiu │ │ │ │ - 0x00973840 733b200a 2020636f 6e737420 666c6f61 s; . const floa │ │ │ │ - 0x00973850 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ - 0x00973860 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ - 0x00973870 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ - 0x00973880 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ - 0x00973890 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ - 0x009738a0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ - 0x009738b0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ - 0x009738c0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ - 0x009738d0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ - 0x009738e0 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ - 0x009738f0 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ - 0x00973900 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ - 0x00973910 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00973920 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ - 0x00973930 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ - 0x00973940 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ - 0x00973950 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ - 0x00973960 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ - 0x00973970 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ - 0x00973980 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00973990 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ - 0x009739a0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ - 0x009739b0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ - 0x009739c0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ - 0x009739d0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ - 0x009739e0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ - 0x009739f0 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ - 0x00973a00 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ - 0x00973a10 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ - 0x00973a20 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ - 0x00973a30 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ - 0x00973a40 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ - 0x00973a50 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ - 0x00973a60 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ - 0x00973a70 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00973a80 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00973a90 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00973aa0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ - 0x00973ab0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ - 0x00973ac0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ - 0x00973ad0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ - 0x00973ae0 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ - 0x00973af0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ - 0x00973b00 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ - 0x00973b10 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ - 0x00973b20 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ - 0x00973b30 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ - 0x00973b40 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ - 0x00973b50 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ - 0x00973b60 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ - 0x00973b70 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ - 0x00973b80 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ - 0x00973b90 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ - 0x00973ba0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ - 0x00973bb0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ - 0x00973bc0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ - 0x00973bd0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ - 0x00973be0 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ - 0x00973bf0 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ - 0x00973c00 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ - 0x00973c10 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ - 0x00973c20 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ - 0x00973c30 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ - 0x00973c40 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ - 0x00973c50 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ - 0x00973c60 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ - 0x00973c70 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ - 0x00973c80 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ - 0x00973c90 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ - 0x00973ca0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ - 0x00973cb0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ - 0x00973cc0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ - 0x00973cd0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ - 0x00973ce0 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ - 0x00973cf0 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ - 0x00973d00 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ - 0x00973d10 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ - 0x00973d20 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ - 0x00973d30 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ - 0x00973d40 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ - 0x00973d50 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ - 0x00973d60 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ - 0x00973d70 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ - 0x00973d80 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ - 0x00973d90 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ - 0x00973da0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ - 0x00973db0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ - 0x00973dc0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ - 0x00973dd0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ - 0x00973de0 200a2020 20207665 63342070 6f73203d . vec4 pos = │ │ │ │ - 0x00973df0 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ - 0x00973e00 2e78792c 20302c20 3129202a 20755f6d .xy, 0, 1) * u_m │ │ │ │ - 0x00973e10 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ - 0x00973e20 65633220 6e6f726d 616c203d 20766563 ec2 normal = vec │ │ │ │ - 0x00973e30 3228615f 6e6f726d 616c2e78 202a2075 2(a_normal.x * u │ │ │ │ - 0x00973e40 5f706172 616d732e 78202d20 615f6e6f _params.x - a_no │ │ │ │ - 0x00973e50 726d616c 2e79202a 20755f70 6172616d rmal.y * u_param │ │ │ │ - 0x00973e60 732e792c 200a2020 20202020 20202020 s.y, . │ │ │ │ - 0x00973e70 20202020 20202020 20202020 20615f6e a_n │ │ │ │ - 0x00973e80 6f726d61 6c2e7820 2a20755f 70617261 ormal.x * u_para │ │ │ │ - 0x00973e90 6d732e79 202b2061 5f6e6f72 6d616c2e ms.y + a_normal. │ │ │ │ - 0x00973ea0 79202a20 755f7061 72616d73 2e78293b y * u_params.x); │ │ │ │ - 0x00973eb0 200a2020 20207665 63322073 68696674 . vec2 shift │ │ │ │ - 0x00973ec0 6564506f 73203d20 6e6f726d 616c202a edPos = normal * │ │ │ │ - 0x00973ed0 20755f70 6172616d 732e7a20 2b20706f u_params.z + po │ │ │ │ - 0x00973ee0 732e7879 3b200a20 20202070 6f73203d s.xy; . pos = │ │ │ │ - 0x00973ef0 20766563 34287368 69667465 64506f73 vec4(shiftedPos │ │ │ │ - 0x00973f00 2c20615f 706f7369 74696f6e 2e7a2c20 , a_position.z, │ │ │ │ - 0x00973f10 312e3029 202a2075 5f70726f 6a656374 1.0) * u_project │ │ │ │ - 0x00973f20 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ - 0x00973f30 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ - 0x00973f40 6f745472 616e7366 6f726d28 706f732c otTransform(pos, │ │ │ │ - 0x00973f50 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ - 0x00973f60 6d2c2030 2e30293b 200a2020 20207665 m, 0.0); . ve │ │ │ │ - 0x00973f70 6332206f 66667365 7473203d 20616273 c2 offsets = abs │ │ │ │ - 0x00973f80 28615f6e 6f726d61 6c2e7a77 293b200a (a_normal.zw); . │ │ │ │ - 0x00973f90 20202020 765f6f66 66736574 73203d20 v_offsets = │ │ │ │ - 0x00973fa0 76656334 28615f6e 6f726d61 6c2e7a77 vec4(a_normal.zw │ │ │ │ - 0x00973fb0 2c206f66 66736574 73202d20 312e3029 , offsets - 1.0) │ │ │ │ - 0x00973fc0 3b200a20 20202076 5f636f6c 6f72203d ; . v_color = │ │ │ │ - 0x00973fd0 20615f63 6f6c6f72 3b200a20 207d200a a_color; . } . │ │ │ │ - 0x00973fe0 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ - 0x00973ff0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00974000 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00974010 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00974020 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00974030 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00974040 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00974050 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00974060 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00974070 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00974080 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00974090 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x009740a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x009740b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x009740c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x009740d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x009740e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x009740f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00974100 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00974110 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00974120 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00974130 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00974140 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00974150 3320615f 6e6f726d 616c416e 64416e69 3 a_normalAndAni │ │ │ │ - 0x00974160 6d617465 4f725a3b 200a2020 696e2076 mateOrZ; . in v │ │ │ │ - 0x00974170 65633420 615f7465 78436f6f 7264733b ec4 a_texCoords; │ │ │ │ - 0x00974180 200a2020 696e2076 65633420 615f636f . in vec4 a_co │ │ │ │ - 0x00974190 6c6f723b 200a2020 6f757420 76656334 lor; . out vec4 │ │ │ │ - 0x009741a0 20765f74 6578436f 6f726473 3b200a20 v_texCoords; . │ │ │ │ - 0x009741b0 206f7574 20766563 3420765f 6d61736b out vec4 v_mask │ │ │ │ - 0x009741c0 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ - 0x009741d0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x009741e0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x009741f0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x00974200 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00974210 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x00974220 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x00974230 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x00974240 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x00974250 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00974260 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00974270 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00974280 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x00974290 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x009742a0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x009742b0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x009742c0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x009742d0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x009742e0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x009742f0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x00974300 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00974310 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00974320 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00974330 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00974340 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00974350 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00974360 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00974370 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00974380 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x00974390 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x009743a0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x009743b0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x009743c0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x009743d0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x009743e0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x009743f0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x00974400 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00974410 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00974420 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00974430 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00974440 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00974450 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00974460 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00974470 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00974480 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00974490 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x009744a0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x009744b0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x009744c0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x009744d0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x009744e0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x009744f0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00974500 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00974510 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00974520 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00974530 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00974540 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00974550 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00974560 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00974570 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00974580 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00974590 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x009745a0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x009745b0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x009745c0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x009745d0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x009745e0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x009745f0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x00974600 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x00974610 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x00974620 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00974630 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00974640 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00974650 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00974660 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00974670 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00974680 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00974690 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x009746a0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x009746b0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x009746c0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x009746d0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x009746e0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x009746f0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x00974700 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x00974710 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x00974720 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00974730 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00974740 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00974750 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00974760 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00974770 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00974780 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00974790 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x009747a0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x009747b0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x009747c0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x009747d0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x009747e0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x009747f0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x00974800 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x00974810 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x00974820 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00974830 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00974840 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00974850 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00974860 20202076 65633220 6e6f726d 616c203d vec2 normal = │ │ │ │ - 0x00974870 20615f6e 6f726d61 6c416e64 416e696d a_normalAndAnim │ │ │ │ - 0x00974880 6174654f 725a2e78 793b200a 20202020 ateOrZ.xy; . │ │ │ │ - 0x00974890 69662028 615f6e6f 726d616c 416e6441 if (a_normalAndA │ │ │ │ - 0x009748a0 6e696d61 74654f72 5a2e7a20 3e20302e nimateOrZ.z > 0. │ │ │ │ - 0x009748b0 3029200a 20202020 20206e6f 726d616c 0) . normal │ │ │ │ - 0x009748c0 203d2075 5f696e74 6572706f 6c617469 = u_interpolati │ │ │ │ - 0x009748d0 6f6e202a 206e6f72 6d616c3b 200a2020 on * normal; . │ │ │ │ - 0x009748e0 20207665 63342070 203d2076 65633428 vec4 p = vec4( │ │ │ │ - 0x009748f0 615f706f 73697469 6f6e2c20 312e3029 a_position, 1.0) │ │ │ │ - 0x00974900 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ - 0x00974910 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ - 0x00974920 76656334 286e6f72 6d616c2c 20302e30 vec4(normal, 0.0 │ │ │ │ - 0x00974930 2c20302e 3029202b 20703b20 0a202020 , 0.0) + p; . │ │ │ │ - 0x00974940 20766563 34207072 6f6a6563 74656450 vec4 projectedP │ │ │ │ - 0x00974950 69766f74 203d2070 202a2075 5f70726f ivot = p * u_pro │ │ │ │ - 0x00974960 6a656374 696f6e3b 200a2020 2020676c jection; . gl │ │ │ │ - 0x00974970 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ - 0x00974980 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ - 0x00974990 706f7320 2a20755f 70726f6a 65637469 pos * u_projecti │ │ │ │ - 0x009749a0 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ - 0x009749b0 666f726d 2c20302e 30293b20 0a202020 form, 0.0); . │ │ │ │ - 0x009749c0 20666c6f 6174206e 65775a20 3d207072 float newZ = pr │ │ │ │ - 0x009749d0 6f6a6563 74656450 69766f74 2e79202f ojectedPivot.y / │ │ │ │ - 0x009749e0 2070726f 6a656374 65645069 766f742e projectedPivot. │ │ │ │ - 0x009749f0 77202a20 302e3520 2b20302e 353b200a w * 0.5 + 0.5; . │ │ │ │ - 0x00974a00 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ - 0x00974a10 7a203d20 61627328 615f6e6f 726d616c z = abs(a_normal │ │ │ │ - 0x00974a20 416e6441 6e696d61 74654f72 5a2e7a29 AndAnimateOrZ.z) │ │ │ │ - 0x00974a30 202a206e 65775a20 2b202831 2e30202d * newZ + (1.0 - │ │ │ │ - 0x00974a40 20616273 28615f6e 6f726d61 6c416e64 abs(a_normalAnd │ │ │ │ - 0x00974a50 416e696d 6174654f 725a2e7a 2929202a AnimateOrZ.z)) * │ │ │ │ - 0x00974a60 20676c5f 506f7369 74696f6e 2e7a3b20 gl_Position.z; │ │ │ │ - 0x00974a70 0a202020 20765f74 6578436f 6f726473 . v_texCoords │ │ │ │ - 0x00974a80 203d2061 5f746578 436f6f72 64733b20 = a_texCoords; │ │ │ │ - 0x00974a90 0a202020 20765f6d 61736b43 6f6c6f72 . v_maskColor │ │ │ │ - 0x00974aa0 203d2061 5f636f6c 6f723b20 0a20207d = a_color; . } │ │ │ │ - 0x00974ab0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ - 0x00974ac0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ - 0x00974ad0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ - 0x00974ae0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ - 0x00974af0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ - 0x00974b00 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ - 0x00974b10 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ - 0x00974b20 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ - 0x00974b30 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ - 0x00974b40 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ - 0x00974b50 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ - 0x00974b60 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ - 0x00974b70 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ - 0x00974b80 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ - 0x00974b90 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ - 0x00974ba0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ - 0x00974bb0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ - 0x00974bc0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ - 0x00974bd0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ - 0x00974be0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ - 0x00974bf0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ - 0x00974c00 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ - 0x00974c10 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ - 0x00974c20 3320615f 6e6f726d 616c416e 64416e69 3 a_normalAndAni │ │ │ │ - 0x00974c30 6d617465 4f725a3b 200a2020 696e2076 mateOrZ; . in v │ │ │ │ - 0x00974c40 65633420 615f7465 78436f6f 7264733b ec4 a_texCoords; │ │ │ │ - 0x00974c50 200a2020 696e2076 65633420 615f636f . in vec4 a_co │ │ │ │ - 0x00974c60 6c6f723b 200a2020 6f757420 76656334 lor; . out vec4 │ │ │ │ - 0x00974c70 20765f74 6578436f 6f726473 3b200a20 v_texCoords; . │ │ │ │ - 0x00974c80 206f7574 20766563 3420765f 6d61736b out vec4 v_mask │ │ │ │ - 0x00974c90 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ - 0x00974ca0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ - 0x00974cb0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ - 0x00974cc0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ - 0x00974cd0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ - 0x00974ce0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ - 0x00974cf0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ - 0x00974d00 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ - 0x00974d10 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ - 0x00974d20 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ - 0x00974d30 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ - 0x00974d40 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ - 0x00974d50 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ - 0x00974d60 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ - 0x00974d70 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ - 0x00974d80 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ - 0x00974d90 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ - 0x00974da0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ - 0x00974db0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ - 0x00974dc0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ - 0x00974dd0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ - 0x00974de0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ - 0x00974df0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ - 0x00974e00 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ - 0x00974e10 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ - 0x00974e20 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ - 0x00974e30 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ - 0x00974e40 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ - 0x00974e50 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ - 0x00974e60 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ - 0x00974e70 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ - 0x00974e80 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ - 0x00974e90 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ - 0x00974ea0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ - 0x00974eb0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ - 0x00974ec0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ - 0x00974ed0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ - 0x00974ee0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ - 0x00974ef0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ - 0x00974f00 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ - 0x00974f10 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ - 0x00974f20 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ - 0x00974f30 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ - 0x00974f40 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ - 0x00974f50 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ - 0x00974f60 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ - 0x00974f70 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ - 0x00974f80 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ - 0x00974f90 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ - 0x00974fa0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ - 0x00974fb0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ - 0x00974fc0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ - 0x00974fd0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ - 0x00974fe0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ - 0x00974ff0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ - 0x00975000 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ - 0x00975010 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ - 0x00975020 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ - 0x00975030 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ - 0x00975040 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ - 0x00975050 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ - 0x00975060 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ - 0x00975070 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ - 0x00975080 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ - 0x00975090 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ - 0x009750a0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ - 0x009750b0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ - 0x009750c0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ - 0x009750d0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ - 0x009750e0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ - 0x009750f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ - 0x00975100 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ - 0x00975110 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ - 0x00975120 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ - 0x00975130 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ - 0x00975140 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ - 0x00975150 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ - 0x00975160 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ - 0x00975170 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ - 0x00975180 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ - 0x00975190 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ - 0x009751a0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ - 0x009751b0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ - 0x009751c0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ - 0x009751d0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ - 0x009751e0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ - 0x009751f0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ - 0x00975200 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ - 0x00975210 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ - 0x00975220 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ - 0x00975230 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ - 0x00975240 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ - 0x00975250 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ - 0x00975260 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ - 0x00975270 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ - 0x00975280 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ - 0x00975290 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ - 0x009752a0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ - 0x009752b0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ - 0x009752c0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ - 0x009752d0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ - 0x009752e0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ - 0x009752f0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ - 0x00975300 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ - 0x00975310 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ - 0x00975320 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ - 0x00975330 20202076 65633220 6e6f726d 616c203d vec2 normal = │ │ │ │ - 0x00975340 20615f6e 6f726d61 6c416e64 416e696d a_normalAndAnim │ │ │ │ - 0x00975350 6174654f 725a2e78 793b200a 20202020 ateOrZ.xy; . │ │ │ │ - 0x00975360 69662028 615f6e6f 726d616c 416e6441 if (a_normalAndA │ │ │ │ - 0x00975370 6e696d61 74654f72 5a2e7a20 3e20302e nimateOrZ.z > 0. │ │ │ │ - 0x00975380 3029200a 20202020 20206e6f 726d616c 0) . normal │ │ │ │ - 0x00975390 203d2075 5f696e74 6572706f 6c617469 = u_interpolati │ │ │ │ - 0x009753a0 6f6e202a 206e6f72 6d616c3b 200a2020 on * normal; . │ │ │ │ - 0x009753b0 20207665 63342070 69766f74 203d2076 vec4 pivot = v │ │ │ │ - 0x009753c0 65633428 615f706f 73697469 6f6e2c20 ec4(a_position, │ │ │ │ - 0x009753d0 312e3029 202a2075 5f6d6f64 656c5669 1.0) * u_modelVi │ │ │ │ - 0x009753e0 65773b20 0a202020 20766563 34206f66 ew; . vec4 of │ │ │ │ - 0x009753f0 66736574 203d2076 65633428 6e6f726d fset = vec4(norm │ │ │ │ - 0x00975400 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ - 0x00975410 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ - 0x00975420 20202076 65633420 70726f6a 65637465 vec4 projecte │ │ │ │ - 0x00975430 64506976 6f74203d 20706976 6f74202a dPivot = pivot * │ │ │ │ - 0x00975440 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ - 0x00975450 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ - 0x00975460 3d206170 706c7942 696c6c62 6f617264 = applyBillboard │ │ │ │ - 0x00975470 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ - 0x00975480 726f6a65 63746564 5069766f 742c2075 rojectedPivot, u │ │ │ │ - 0x00975490 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ - 0x009754a0 20302e30 2c206f66 66736574 2e787929 0.0, offset.xy) │ │ │ │ - 0x009754b0 3b200a20 20202066 6c6f6174 206e6577 ; . float new │ │ │ │ - 0x009754c0 5a203d20 70726f6a 65637465 64506976 Z = projectedPiv │ │ │ │ - 0x009754d0 6f742e79 202f2070 726f6a65 63746564 ot.y / projected │ │ │ │ - 0x009754e0 5069766f 742e7720 2a20302e 35202b20 Pivot.w * 0.5 + │ │ │ │ - 0x009754f0 302e353b 200a2020 2020676c 5f506f73 0.5; . gl_Pos │ │ │ │ - 0x00975500 6974696f 6e2e7a20 3d206162 7328615f ition.z = abs(a_ │ │ │ │ - 0x00975510 6e6f726d 616c416e 64416e69 6d617465 normalAndAnimate │ │ │ │ - 0x00975520 4f725a2e 7a29202a 206e6577 5a20202b OrZ.z) * newZ + │ │ │ │ - 0x00975530 2028312e 30202d20 61627328 615f6e6f (1.0 - abs(a_no │ │ │ │ - 0x00975540 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ - 0x00975550 5a2e7a29 29202a20 676c5f50 6f736974 Z.z)) * gl_Posit │ │ │ │ - 0x00975560 696f6e2e 7a3b200a 20202020 765f7465 ion.z; . v_te │ │ │ │ - 0x00975570 78436f6f 72647320 3d20615f 74657843 xCoords = a_texC │ │ │ │ - 0x00975580 6f6f7264 733b200a 20202020 765f6d61 oords; . v_ma │ │ │ │ - 0x00975590 736b436f 6c6f7220 3d20615f 636f6c6f skColor = a_colo │ │ │ │ - 0x009755a0 723b200a 20207d20 0a000000 00000000 r; . } ........ │ │ │ │ + 0x00958fa0 726d616c 2c206e6f 726d616c 2920213d rmal, normal) != │ │ │ │ + 0x00958fb0 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ + 0x00958fc0 20202020 76656332 206e6f72 6d203d20 vec2 norm = │ │ │ │ + 0x00958fd0 6e6f726d 616c202a 20302e35 202a2028 normal * 0.5 * ( │ │ │ │ + 0x00958fe0 72696768 7453697a 65202d20 6c656674 rightSize - left │ │ │ │ + 0x00958ff0 53697a65 293b200a 20202020 20207472 Size); . tr │ │ │ │ + 0x00959000 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00959010 203d2063 616c634c 696e6554 72616e73 = calcLineTrans │ │ │ │ + 0x00959020 666f726d 65644178 6973506f 73287472 formedAxisPos(tr │ │ │ │ + 0x00959030 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00959040 2c20615f 706f7369 74696f6e 2e787920 , a_position.xy │ │ │ │ + 0x00959050 2b206e6f 726d2c20 0a202020 20202020 + norm, . │ │ │ │ + 0x00959060 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00959070 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00959080 20202020 20202020 20202020 20202075 u │ │ │ │ + 0x00959090 5f6d6f64 656c5669 65772c20 6c656e67 _modelView, leng │ │ │ │ + 0x009590a0 7468286e 6f726d29 293b200a 20202020 th(norm)); . │ │ │ │ + 0x009590b0 7d200a20 20202076 5f726164 69757320 } . v_radius │ │ │ │ + 0x009590c0 3d207665 63332861 5f6e6f72 6d616c2e = vec3(a_normal. │ │ │ │ + 0x009590d0 7a772c20 312e3029 202a2030 2e35202a zw, 1.0) * 0.5 * │ │ │ │ + 0x009590e0 20286c65 66745369 7a65202b 20726967 (leftSize + rig │ │ │ │ + 0x009590f0 68745369 7a65293b 200a2020 20207665 htSize); . ve │ │ │ │ + 0x00959100 63322066 696e616c 506f7320 3d207472 c2 finalPos = tr │ │ │ │ + 0x00959110 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x00959120 202b2076 5f726164 6975732e 78793b20 + v_radius.xy; │ │ │ │ + 0x00959130 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ + 0x00959140 6f6f7264 203d2061 5f636f6c 6f725465 oord = a_colorTe │ │ │ │ + 0x00959150 78436f6f 72643b20 0a202020 20766563 xCoord; . vec │ │ │ │ + 0x00959160 3420706f 73203d20 76656334 2866696e 4 pos = vec4(fin │ │ │ │ + 0x00959170 616c506f 732c2061 5f706f73 6974696f alPos, a_positio │ │ │ │ + 0x00959180 6e2e7a2c 20312e30 29202a20 755f7072 n.z, 1.0) * u_pr │ │ │ │ + 0x00959190 6f6a6563 74696f6e 3b200a20 20202067 ojection; . g │ │ │ │ + 0x009591a0 6c5f506f 73697469 6f6e203d 20617070 l_Position = app │ │ │ │ + 0x009591b0 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x009591c0 28706f73 2c20755f 7069766f 74547261 (pos, u_pivotTra │ │ │ │ + 0x009591d0 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x009591e0 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ + 0x009591f0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00959200 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00959210 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00959220 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00959230 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00959240 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00959250 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00959260 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00959270 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00959280 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00959290 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009592a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x009592b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009592c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009592d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x009592e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x009592f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00959300 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00959310 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00959320 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00959330 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x00959340 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00959350 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x00959360 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00959370 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x00959380 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00959390 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ + 0x009593a0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x009593b0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x009593c0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x009593d0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x009593e0 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x009593f0 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00959400 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x00959410 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x00959420 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x00959430 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00959440 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x00959450 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x00959460 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x00959470 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00959480 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x00959490 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x009594a0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x009594b0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x009594c0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x009594d0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x009594e0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x009594f0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00959500 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x00959510 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00959520 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00959530 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x00959540 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00959550 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x00959560 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x00959570 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x00959580 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x00959590 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x009595a0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x009595b0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x009595c0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x009595d0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x009595e0 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x009595f0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x00959600 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x00959610 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x00959620 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x00959630 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x00959640 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00959650 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x00959660 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x00959670 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00959680 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x00959690 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x009596a0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x009596b0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x009596c0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x009596d0 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x009596e0 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x009596f0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00959700 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00959710 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00959720 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00959730 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00959740 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00959750 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00959760 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x00959770 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x00959780 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x00959790 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x009597a0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x009597b0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x009597c0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x009597d0 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x009597e0 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x009597f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00959800 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00959810 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00959820 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00959830 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x00959840 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00959850 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x00959860 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x00959870 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x00959880 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x00959890 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x009598a0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x009598b0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x009598c0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x009598d0 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x009598e0 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x009598f0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00959900 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00959910 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00959920 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00959930 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x00959940 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x00959950 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x00959960 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x00959970 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x00959980 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x00959990 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x009599a0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x009599b0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x009599c0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x009599d0 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x009599e0 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x009599f0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x00959a00 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00959a10 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00959a20 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00959a30 20202076 65633420 706f7320 3d207665 vec4 pos = ve │ │ │ │ + 0x00959a40 63342861 5f706f73 6974696f 6e2e7879 c4(a_position.xy │ │ │ │ + 0x00959a50 7a2c2031 29202a20 755f6d6f 64656c56 z, 1) * u_modelV │ │ │ │ + 0x00959a60 6965773b 200a2020 20207665 63342073 iew; . vec4 s │ │ │ │ + 0x00959a70 68696674 6564506f 73203d20 76656334 hiftedPos = vec4 │ │ │ │ + 0x00959a80 28615f6e 6f726d61 6c2c2030 2c203029 (a_normal, 0, 0) │ │ │ │ + 0x00959a90 202b2070 6f733b20 0a202020 20676c5f + pos; . gl_ │ │ │ │ + 0x00959aa0 506f7369 74696f6e 203d2061 70706c79 Position = apply │ │ │ │ + 0x00959ab0 5069766f 74547261 6e73666f 726d2873 PivotTransform(s │ │ │ │ + 0x00959ac0 68696674 6564506f 73202a20 755f7072 hiftedPos * u_pr │ │ │ │ + 0x00959ad0 6f6a6563 74696f6e 2c20755f 7069766f ojection, u_pivo │ │ │ │ + 0x00959ae0 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ + 0x00959af0 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ + 0x00959b00 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ + 0x00959b10 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ + 0x00959b20 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x00959b30 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00959b40 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00959b50 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00959b60 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00959b70 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00959b80 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00959b90 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00959ba0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00959bb0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00959bc0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00959bd0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00959be0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00959bf0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00959c00 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00959c10 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00959c20 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00959c30 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00959c40 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00959c50 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00959c60 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00959c70 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ + 0x00959c80 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00959c90 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x00959ca0 64733b20 0a20206f 75742076 65633220 ds; . out vec2 │ │ │ │ + 0x00959cb0 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ + 0x00959cc0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00959cd0 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ + 0x00959ce0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00959cf0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x00959d00 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x00959d10 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x00959d20 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x00959d30 706f7369 74696f6e 3b200a20 20756e69 position; . uni │ │ │ │ + 0x00959d40 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ + 0x00959d50 75746c69 6e655061 73733b20 0a202075 utlinePass; . u │ │ │ │ + 0x00959d60 6e69666f 726d2066 6c6f6174 20755f6f niform float u_o │ │ │ │ + 0x00959d70 70616369 74793b20 0a202075 6e69666f pacity; . unifo │ │ │ │ + 0x00959d80 726d2066 6c6f6174 20755f6c 656e6774 rm float u_lengt │ │ │ │ + 0x00959d90 683b200a 2020636f 6e737420 666c6f61 h; . const floa │ │ │ │ + 0x00959da0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00959db0 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00959dc0 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00959dd0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00959de0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00959df0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00959e00 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00959e10 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00959e20 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00959e30 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00959e40 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00959e50 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00959e60 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00959e70 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00959e80 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00959e90 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00959ea0 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00959eb0 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00959ec0 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00959ed0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00959ee0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00959ef0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00959f00 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00959f10 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00959f20 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00959f30 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00959f40 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00959f50 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00959f60 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00959f70 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00959f80 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00959f90 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00959fa0 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00959fb0 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00959fc0 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00959fd0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00959fe0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00959ff0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x0095a000 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x0095a010 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x0095a020 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x0095a030 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x0095a040 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x0095a050 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0095a060 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x0095a070 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x0095a080 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x0095a090 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x0095a0a0 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x0095a0b0 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x0095a0c0 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x0095a0d0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x0095a0e0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x0095a0f0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x0095a100 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x0095a110 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x0095a120 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x0095a130 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x0095a140 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x0095a150 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x0095a160 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x0095a170 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x0095a180 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x0095a190 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x0095a1a0 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x0095a1b0 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x0095a1c0 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x0095a1d0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x0095a1e0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x0095a1f0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x0095a200 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x0095a210 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x0095a220 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x0095a230 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x0095a240 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x0095a250 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x0095a260 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x0095a270 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x0095a280 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x0095a290 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x0095a2a0 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x0095a2b0 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x0095a2c0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x0095a2d0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x0095a2e0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x0095a2f0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x0095a300 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x0095a310 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x0095a320 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x0095a330 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x0095a340 6e203d20 76656334 28615f70 6f736974 n = vec4(a_posit │ │ │ │ + 0x0095a350 696f6e2c 20302c20 3129202a 20755f6d ion, 0, 1) * u_m │ │ │ │ + 0x0095a360 6f64656c 56696577 202a2075 5f70726f odelView * u_pro │ │ │ │ + 0x0095a370 6a656374 696f6e3b 200a2020 23696664 jection; . #ifd │ │ │ │ + 0x0095a380 65662056 554c4b41 4e200a20 20202067 ef VULKAN . g │ │ │ │ + 0x0095a390 6c5f506f 73697469 6f6e2e79 203d202d l_Position.y = - │ │ │ │ + 0x0095a3a0 676c5f50 6f736974 696f6e2e 793b200a gl_Position.y; . │ │ │ │ + 0x0095a3b0 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ + 0x0095a3c0 7a203d20 28676c5f 506f7369 74696f6e z = (gl_Position │ │ │ │ + 0x0095a3d0 2e7a2020 2b20676c 5f506f73 6974696f .z + gl_Positio │ │ │ │ + 0x0095a3e0 6e2e7729 202a2030 2e353b20 0a202023 n.w) * 0.5; . # │ │ │ │ + 0x0095a3f0 656e6469 66200a20 20202076 5f636f6c endif . v_col │ │ │ │ + 0x0095a400 6f725465 78436f6f 72647320 3d20615f orTexCoords = a_ │ │ │ │ + 0x0095a410 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ + 0x0095a420 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ + 0x0095a430 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0095a440 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0095a450 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0095a460 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095a470 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0095a480 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0095a490 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0095a4a0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0095a4b0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0095a4c0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0095a4d0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0095a4e0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0095a4f0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0095a500 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0095a510 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0095a520 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0095a530 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0095a540 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0095a550 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0095a560 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0095a570 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0095a580 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0095a590 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x0095a5a0 6e207665 63342061 5f636f6c 6f725465 n vec4 a_colorTe │ │ │ │ + 0x0095a5b0 78436f6f 72643b20 0a20206f 75742076 xCoord; . out v │ │ │ │ + 0x0095a5c0 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ + 0x0095a5d0 6f72643b 200a2020 6f757420 76656332 ord; . out vec2 │ │ │ │ + 0x0095a5e0 20765f6d 61736b54 6578436f 6f72643b v_maskTexCoord; │ │ │ │ + 0x0095a5f0 200a2020 6f757420 666c6f61 7420765f . out float v_ │ │ │ │ + 0x0095a600 68616c66 4c656e67 74683b20 0a202075 halfLength; . u │ │ │ │ + 0x0095a610 6e69666f 726d206d 61743420 755f6d6f niform mat4 u_mo │ │ │ │ + 0x0095a620 64656c56 6965773b 200a2020 756e6966 delView; . unif │ │ │ │ + 0x0095a630 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ + 0x0095a640 6374696f 6e3b200a 2020756e 69666f72 ction; . unifor │ │ │ │ + 0x0095a650 6d206d61 74342075 5f706976 6f745472 m mat4 u_pivotTr │ │ │ │ + 0x0095a660 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ + 0x0095a670 6f726d20 76656334 20755f74 72616666 orm vec4 u_traff │ │ │ │ + 0x0095a680 69635061 72616d73 3b200a20 20756e69 icParams; . uni │ │ │ │ + 0x0095a690 666f726d 20766563 3420755f 6f75746c form vec4 u_outl │ │ │ │ + 0x0095a6a0 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ + 0x0095a6b0 666f726d 20766563 3420755f 6c696768 form vec4 u_ligh │ │ │ │ + 0x0095a6c0 74417272 6f77436f 6c6f723b 200a2020 tArrowColor; . │ │ │ │ + 0x0095a6d0 756e6966 6f726d20 76656334 20755f64 uniform vec4 u_d │ │ │ │ + 0x0095a6e0 61726b41 72726f77 436f6c6f 723b200a arkArrowColor; . │ │ │ │ + 0x0095a6f0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0095a700 755f6f75 746c696e 653b200a 2020756e u_outline; . un │ │ │ │ + 0x0095a710 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ + 0x0095a720 61636974 793b200a 2020636f 6e737420 acity; . const │ │ │ │ + 0x0095a730 666c6f61 74206b41 72726f77 5653697a float kArrowVSiz │ │ │ │ + 0x0095a740 65203d20 302e3235 3b200a20 20636f6e e = 0.25; . con │ │ │ │ + 0x0095a750 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x0095a760 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x0095a770 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x0095a780 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x0095a790 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x0095a7a0 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x0095a7b0 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x0095a7c0 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x0095a7d0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0095a7e0 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x0095a7f0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x0095a800 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x0095a810 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0095a820 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x0095a830 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0095a840 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x0095a850 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0095a860 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x0095a870 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0095a880 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x0095a890 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x0095a8a0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x0095a8b0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0095a8c0 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x0095a8d0 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x0095a8e0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0095a8f0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x0095a900 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x0095a910 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095a920 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x0095a930 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x0095a940 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x0095a950 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x0095a960 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x0095a970 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x0095a980 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x0095a990 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x0095a9a0 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x0095a9b0 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x0095a9c0 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x0095a9d0 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x0095a9e0 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x0095a9f0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0095aa00 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x0095aa10 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x0095aa20 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0095aa30 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x0095aa40 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x0095aa50 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x0095aa60 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x0095aa70 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x0095aa80 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x0095aa90 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x0095aaa0 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x0095aab0 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x0095aac0 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x0095aad0 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x0095aae0 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x0095aaf0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x0095ab00 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x0095ab10 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x0095ab20 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x0095ab30 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x0095ab40 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x0095ab50 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x0095ab60 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x0095ab70 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x0095ab80 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x0095ab90 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x0095aba0 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x0095abb0 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x0095abc0 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x0095abd0 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x0095abe0 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x0095abf0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x0095ac00 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x0095ac10 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x0095ac20 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x0095ac30 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x0095ac40 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x0095ac50 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x0095ac60 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x0095ac70 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x0095ac80 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x0095ac90 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x0095aca0 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x0095acb0 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x0095acc0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x0095acd0 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x0095ace0 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x0095acf0 32206e6f 726d616c 203d2061 5f6e6f72 2 normal = a_nor │ │ │ │ + 0x0095ad00 6d616c2e 78793b20 0a202020 20766563 mal.xy; . vec │ │ │ │ + 0x0095ad10 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ + 0x0095ad20 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ + 0x0095ad30 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ + 0x0095ad40 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ + 0x0095ad50 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ + 0x0095ad60 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ + 0x0095ad70 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ + 0x0095ad80 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ + 0x0095ad90 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ + 0x0095ada0 20755f74 72616666 69635061 72616d73 u_trafficParams │ │ │ │ + 0x0095adb0 2e783b20 0a202020 20202069 66202861 .x; . if (a │ │ │ │ + 0x0095adc0 5f6e6f72 6d616c2e 7a203c20 302e3029 _normal.z < 0.0) │ │ │ │ + 0x0095add0 200a2020 20202020 20206e6f 726d203d . norm = │ │ │ │ + 0x0095ade0 206e6f72 6d616c20 2a20755f 74726166 normal * u_traf │ │ │ │ + 0x0095adf0 66696350 6172616d 732e793b 200a2020 ficParams.y; . │ │ │ │ + 0x0095ae00 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ + 0x0095ae10 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ + 0x0095ae20 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x0095ae30 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ + 0x0095ae40 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ + 0x0095ae50 6f6e2e78 79202b20 6e6f726d 2c200a20 on.xy + norm, . │ │ │ │ + 0x0095ae60 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095ae70 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095ae80 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095ae90 20202020 20755f6d 6f64656c 56696577 u_modelView │ │ │ │ + 0x0095aea0 2c206c65 6e677468 286e6f72 6d29293b , length(norm)); │ │ │ │ + 0x0095aeb0 200a2020 20207d20 0a202020 20666c6f . } . flo │ │ │ │ + 0x0095aec0 61742075 4f666673 6574203d 206c656e at uOffset = len │ │ │ │ + 0x0095aed0 67746828 76656334 286b5368 61706543 gth(vec4(kShapeC │ │ │ │ + 0x0095aee0 6f6f7264 5363616c 61722c20 302c2030 oordScalar, 0, 0 │ │ │ │ + 0x0095aef0 2c203029 202a2075 5f6d6f64 656c5669 , 0) * u_modelVi │ │ │ │ + 0x0095af00 65772920 2a20615f 6e6f726d 616c2e77 ew) * a_normal.w │ │ │ │ + 0x0095af10 3b200a20 20202076 5f636f6c 6f725465 ; . v_colorTe │ │ │ │ + 0x0095af20 78436f6f 7264203d 20615f63 6f6c6f72 xCoord = a_color │ │ │ │ + 0x0095af30 54657843 6f6f7264 2e78793b 200a2020 TexCoord.xy; . │ │ │ │ + 0x0095af40 2020666c 6f617420 76203d20 6d697828 float v = mix( │ │ │ │ + 0x0095af50 615f636f 6c6f7254 6578436f 6f72642e a_colorTexCoord. │ │ │ │ + 0x0095af60 7a2c2061 5f636f6c 6f725465 78436f6f z, a_colorTexCoo │ │ │ │ + 0x0095af70 72642e7a 202b206b 4172726f 77565369 rd.z + kArrowVSi │ │ │ │ + 0x0095af80 7a652c20 302e3520 2a20615f 6e6f726d ze, 0.5 * a_norm │ │ │ │ + 0x0095af90 616c2e7a 202b2030 2e35293b 200a2020 al.z + 0.5); . │ │ │ │ + 0x0095afa0 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ + 0x0095afb0 203d2076 65633228 754f6666 73657420 = vec2(uOffset │ │ │ │ + 0x0095afc0 2a20755f 74726166 66696350 6172616d * u_trafficParam │ │ │ │ + 0x0095afd0 732e7a2c 20762920 2a20755f 74726166 s.z, v) * u_traf │ │ │ │ + 0x0095afe0 66696350 6172616d 732e773b 200a2020 ficParams.w; . │ │ │ │ + 0x0095aff0 2020765f 6d61736b 54657843 6f6f7264 v_maskTexCoord │ │ │ │ + 0x0095b000 2e78202a 3d207374 65702861 5f636f6c .x *= step(a_col │ │ │ │ + 0x0095b010 6f725465 78436f6f 72642e77 2c20765f orTexCoord.w, v_ │ │ │ │ + 0x0095b020 6d61736b 54657843 6f6f7264 2e78293b maskTexCoord.x); │ │ │ │ + 0x0095b030 200a2020 2020765f 68616c66 4c656e67 . v_halfLeng │ │ │ │ + 0x0095b040 7468203d 20615f6e 6f726d61 6c2e7a3b th = a_normal.z; │ │ │ │ + 0x0095b050 200a2020 20207665 63342070 6f73203d . vec4 pos = │ │ │ │ + 0x0095b060 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x0095b070 64417869 73506f73 2c20615f 706f7369 dAxisPos, a_posi │ │ │ │ + 0x0095b080 74696f6e 2e7a2c20 312e3029 202a2075 tion.z, 1.0) * u │ │ │ │ + 0x0095b090 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x0095b0a0 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x0095b0b0 6170706c 79506976 6f745472 616e7366 applyPivotTransf │ │ │ │ + 0x0095b0c0 6f726d28 706f732c 20755f70 69766f74 orm(pos, u_pivot │ │ │ │ + 0x0095b0d0 5472616e 73666f72 6d2c2030 2e30293b Transform, 0.0); │ │ │ │ + 0x0095b0e0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x0095b0f0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0095b100 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0095b110 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0095b120 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095b130 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0095b140 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0095b150 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0095b160 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0095b170 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0095b180 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0095b190 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0095b1a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0095b1b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0095b1c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0095b1d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0095b1e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0095b1f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0095b200 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0095b210 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0095b220 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0095b230 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0095b240 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0095b250 3320615f 6e6f726d 616c416e 64416e69 3 a_normalAndAni │ │ │ │ + 0x0095b260 6d617465 4f725a3b 200a2020 696e2076 mateOrZ; . in v │ │ │ │ + 0x0095b270 65633420 615f7465 78436f6f 7264733b ec4 a_texCoords; │ │ │ │ + 0x0095b280 200a2020 696e2076 65633420 615f636f . in vec4 a_co │ │ │ │ + 0x0095b290 6c6f723b 200a2020 6f757420 76656334 lor; . out vec4 │ │ │ │ + 0x0095b2a0 20765f74 6578436f 6f726473 3b200a20 v_texCoords; . │ │ │ │ + 0x0095b2b0 206f7574 20766563 3420765f 6d61736b out vec4 v_mask │ │ │ │ + 0x0095b2c0 436f6c6f 723b200a 2020756e 69666f72 Color; . unifor │ │ │ │ + 0x0095b2d0 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x0095b2e0 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x0095b2f0 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x0095b300 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0095b310 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x0095b320 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x0095b330 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x0095b340 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x0095b350 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x0095b360 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0095b370 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x0095b380 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x0095b390 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x0095b3a0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0095b3b0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x0095b3c0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x0095b3d0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x0095b3e0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x0095b3f0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x0095b400 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x0095b410 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x0095b420 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x0095b430 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x0095b440 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x0095b450 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x0095b460 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x0095b470 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x0095b480 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x0095b490 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x0095b4a0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x0095b4b0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x0095b4c0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x0095b4d0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x0095b4e0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x0095b4f0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x0095b500 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0095b510 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x0095b520 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x0095b530 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x0095b540 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x0095b550 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x0095b560 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x0095b570 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0095b580 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x0095b590 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x0095b5a0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0095b5b0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x0095b5c0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x0095b5d0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x0095b5e0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x0095b5f0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x0095b600 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x0095b610 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x0095b620 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x0095b630 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x0095b640 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x0095b650 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x0095b660 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0095b670 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0095b680 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0095b690 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x0095b6a0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x0095b6b0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x0095b6c0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x0095b6d0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x0095b6e0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x0095b6f0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x0095b700 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x0095b710 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x0095b720 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095b730 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x0095b740 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x0095b750 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x0095b760 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x0095b770 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x0095b780 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x0095b790 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x0095b7a0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x0095b7b0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x0095b7c0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x0095b7d0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x0095b7e0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x0095b7f0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x0095b800 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x0095b810 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x0095b820 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0095b830 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x0095b840 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x0095b850 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x0095b860 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x0095b870 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x0095b880 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x0095b890 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x0095b8a0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x0095b8b0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x0095b8c0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x0095b8d0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x0095b8e0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x0095b8f0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x0095b900 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x0095b910 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x0095b920 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x0095b930 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x0095b940 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x0095b950 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x0095b960 20202076 65633220 6e6f726d 616c203d vec2 normal = │ │ │ │ + 0x0095b970 20615f6e 6f726d61 6c416e64 416e696d a_normalAndAnim │ │ │ │ + 0x0095b980 6174654f 725a2e78 793b200a 20202020 ateOrZ.xy; . │ │ │ │ + 0x0095b990 69662028 615f6e6f 726d616c 416e6441 if (a_normalAndA │ │ │ │ + 0x0095b9a0 6e696d61 74654f72 5a2e7a20 3e20302e nimateOrZ.z > 0. │ │ │ │ + 0x0095b9b0 3029200a 20202020 20206e6f 726d616c 0) . normal │ │ │ │ + 0x0095b9c0 203d2075 5f696e74 6572706f 6c617469 = u_interpolati │ │ │ │ + 0x0095b9d0 6f6e202a 206e6f72 6d616c3b 200a2020 on * normal; . │ │ │ │ + 0x0095b9e0 20207665 63342070 203d2076 65633428 vec4 p = vec4( │ │ │ │ + 0x0095b9f0 615f706f 73697469 6f6e2c20 312e3029 a_position, 1.0) │ │ │ │ + 0x0095ba00 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ + 0x0095ba10 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x0095ba20 76656334 286e6f72 6d616c2c 20302e30 vec4(normal, 0.0 │ │ │ │ + 0x0095ba30 2c20302e 3029202b 20703b20 0a202020 , 0.0) + p; . │ │ │ │ + 0x0095ba40 20766563 34207072 6f6a6563 74656450 vec4 projectedP │ │ │ │ + 0x0095ba50 69766f74 203d2070 202a2075 5f70726f ivot = p * u_pro │ │ │ │ + 0x0095ba60 6a656374 696f6e3b 200a2020 2020676c jection; . gl │ │ │ │ + 0x0095ba70 5f506f73 6974696f 6e203d20 6170706c _Position = appl │ │ │ │ + 0x0095ba80 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0095ba90 706f7320 2a20755f 70726f6a 65637469 pos * u_projecti │ │ │ │ + 0x0095baa0 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ + 0x0095bab0 666f726d 2c20302e 30293b20 0a202020 form, 0.0); . │ │ │ │ + 0x0095bac0 20666c6f 6174206e 65775a20 3d207072 float newZ = pr │ │ │ │ + 0x0095bad0 6f6a6563 74656450 69766f74 2e79202f ojectedPivot.y / │ │ │ │ + 0x0095bae0 2070726f 6a656374 65645069 766f742e projectedPivot. │ │ │ │ + 0x0095baf0 77202a20 302e3520 2b20302e 353b200a w * 0.5 + 0.5; . │ │ │ │ + 0x0095bb00 20202020 676c5f50 6f736974 696f6e2e gl_Position. │ │ │ │ + 0x0095bb10 7a203d20 61627328 615f6e6f 726d616c z = abs(a_normal │ │ │ │ + 0x0095bb20 416e6441 6e696d61 74654f72 5a2e7a29 AndAnimateOrZ.z) │ │ │ │ + 0x0095bb30 202a206e 65775a20 2b202831 2e30202d * newZ + (1.0 - │ │ │ │ + 0x0095bb40 20616273 28615f6e 6f726d61 6c416e64 abs(a_normalAnd │ │ │ │ + 0x0095bb50 416e696d 6174654f 725a2e7a 2929202a AnimateOrZ.z)) * │ │ │ │ + 0x0095bb60 20676c5f 506f7369 74696f6e 2e7a3b20 gl_Position.z; │ │ │ │ + 0x0095bb70 0a202020 20765f74 6578436f 6f726473 . v_texCoords │ │ │ │ + 0x0095bb80 203d2061 5f746578 436f6f72 64733b20 = a_texCoords; │ │ │ │ + 0x0095bb90 0a202020 20765f6d 61736b43 6f6c6f72 . v_maskColor │ │ │ │ + 0x0095bba0 203d2061 5f636f6c 6f723b20 0a20207d = a_color; . } │ │ │ │ + 0x0095bbb0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x0095bbc0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0095bbd0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0095bbe0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0095bbf0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095bc00 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0095bc10 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0095bc20 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0095bc30 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0095bc40 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0095bc50 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0095bc60 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0095bc70 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0095bc80 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0095bc90 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0095bca0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0095bcb0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0095bcc0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0095bcd0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0095bce0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0095bcf0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0095bd00 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x0095bd10 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0095bd20 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x0095bd30 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x0095bd40 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x0095bd50 65633220 615f6d61 736b5465 78436f6f ec2 a_maskTexCoo │ │ │ │ + 0x0095bd60 7264733b 200a2020 6f757420 76656332 rds; . out vec2 │ │ │ │ + 0x0095bd70 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x0095bd80 733b200a 20206f75 74207665 63322076 s; . out vec2 v │ │ │ │ + 0x0095bd90 5f6d6173 6b546578 436f6f72 64733b20 _maskTexCoords; │ │ │ │ + 0x0095bda0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0095bdb0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0095bdc0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0095bdd0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x0095bde0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x0095bdf0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x0095be00 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x0095be10 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x0095be20 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0095be30 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x0095be40 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x0095be50 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x0095be60 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x0095be70 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x0095be80 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x0095be90 696e6550 6173733b 200a2020 636f6e73 inePass; . cons │ │ │ │ + 0x0095bea0 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x0095beb0 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x0095bec0 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x0095bed0 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0095bee0 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0095bef0 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0095bf00 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0095bf10 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x0095bf20 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0095bf30 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x0095bf40 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x0095bf50 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x0095bf60 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095bf70 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x0095bf80 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0095bf90 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0095bfa0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0095bfb0 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x0095bfc0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095bfd0 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x0095bfe0 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x0095bff0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0095c000 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0095c010 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x0095c020 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x0095c030 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095c040 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x0095c050 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x0095c060 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095c070 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0095c080 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0095c090 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095c0a0 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x0095c0b0 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0095c0c0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0095c0d0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0095c0e0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0095c0f0 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x0095c100 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x0095c110 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x0095c120 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x0095c130 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x0095c140 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0095c150 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x0095c160 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x0095c170 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x0095c180 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x0095c190 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x0095c1a0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0095c1b0 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x0095c1c0 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x0095c1d0 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x0095c1e0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0095c1f0 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x0095c200 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x0095c210 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x0095c220 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x0095c230 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x0095c240 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x0095c250 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x0095c260 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x0095c270 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x0095c280 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x0095c290 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x0095c2a0 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x0095c2b0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0095c2c0 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x0095c2d0 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x0095c2e0 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x0095c2f0 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x0095c300 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x0095c310 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x0095c320 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x0095c330 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x0095c340 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x0095c350 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x0095c360 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x0095c370 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x0095c380 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x0095c390 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0095c3a0 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x0095c3b0 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x0095c3c0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x0095c3d0 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x0095c3e0 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x0095c3f0 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x0095c400 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x0095c410 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0095c420 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x0095c430 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x0095c440 20706f73 203d2076 65633428 615f706f pos = vec4(a_po │ │ │ │ + 0x0095c450 73697469 6f6e2e78 797a2c20 3129202a sition.xyz, 1) * │ │ │ │ + 0x0095c460 20755f6d 6f64656c 56696577 3b200a20 u_modelView; . │ │ │ │ + 0x0095c470 20202076 65633420 73686966 74656450 vec4 shiftedP │ │ │ │ + 0x0095c480 6f73203d 20766563 3428615f 6e6f726d os = vec4(a_norm │ │ │ │ + 0x0095c490 616c2c20 302c2030 29202b20 706f733b al, 0, 0) + pos; │ │ │ │ + 0x0095c4a0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x0095c4b0 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ + 0x0095c4c0 616e7366 6f726d28 73686966 74656450 ansform(shiftedP │ │ │ │ + 0x0095c4d0 6f73202a 20755f70 726f6a65 6374696f os * u_projectio │ │ │ │ + 0x0095c4e0 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ + 0x0095c4f0 6f726d2c 20302e30 293b200a 20202020 orm, 0.0); . │ │ │ │ + 0x0095c500 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ + 0x0095c510 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ + 0x0095c520 7264733b 200a2020 2020765f 6d61736b rds; . v_mask │ │ │ │ + 0x0095c530 54657843 6f6f7264 73203d20 615f6d61 TexCoords = a_ma │ │ │ │ + 0x0095c540 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ + 0x0095c550 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x0095c560 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0095c570 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0095c580 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0095c590 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095c5a0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0095c5b0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0095c5c0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0095c5d0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0095c5e0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0095c5f0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0095c600 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0095c610 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0095c620 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0095c630 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0095c640 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0095c650 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0095c660 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0095c670 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0095c680 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0095c690 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0095c6a0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0095c6b0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0095c6c0 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ + 0x0095c6d0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x0095c6e0 78436f6f 72643b20 0a202069 6e207665 xCoord; . in ve │ │ │ │ + 0x0095c6f0 63342061 5f6d6173 6b546578 436f6f72 c4 a_maskTexCoor │ │ │ │ + 0x0095c700 643b200a 20206f75 74207665 63322076 d; . out vec2 v │ │ │ │ + 0x0095c710 5f636f6c 6f725465 78436f6f 72643b20 _colorTexCoord; │ │ │ │ + 0x0095c720 0a20206f 75742076 65633220 765f6d61 . out vec2 v_ma │ │ │ │ + 0x0095c730 736b5465 78436f6f 72643b20 0a202075 skTexCoord; . u │ │ │ │ + 0x0095c740 6e69666f 726d206d 61743420 755f6d6f niform mat4 u_mo │ │ │ │ + 0x0095c750 64656c56 6965773b 200a2020 756e6966 delView; . unif │ │ │ │ + 0x0095c760 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ + 0x0095c770 6374696f 6e3b200a 2020756e 69666f72 ction; . unifor │ │ │ │ + 0x0095c780 6d206d61 74342075 5f706976 6f745472 m mat4 u_pivotTr │ │ │ │ + 0x0095c790 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ + 0x0095c7a0 6f726d20 76656332 20755f63 6f6e7472 orm vec2 u_contr │ │ │ │ + 0x0095c7b0 61737447 616d6d61 3b200a20 20756e69 astGamma; . uni │ │ │ │ + 0x0095c7c0 666f726d 20666c6f 61742075 5f6f7061 form float u_opa │ │ │ │ + 0x0095c7d0 63697479 3b200a20 20756e69 666f726d city; . uniform │ │ │ │ + 0x0095c7e0 20666c6f 61742075 5f7a5363 616c653b float u_zScale; │ │ │ │ + 0x0095c7f0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0095c800 7420755f 696e7465 72706f6c 6174696f t u_interpolatio │ │ │ │ + 0x0095c810 6e3b200a 2020756e 69666f72 6d20666c n; . uniform fl │ │ │ │ + 0x0095c820 6f617420 755f6973 4f75746c 696e6550 oat u_isOutlineP │ │ │ │ + 0x0095c830 6173733b 200a2020 636f6e73 7420666c ass; . const fl │ │ │ │ + 0x0095c840 6f617420 6b536861 7065436f 6f726453 oat kShapeCoordS │ │ │ │ + 0x0095c850 63616c61 72203d20 31303030 2e303b20 calar = 1000.0; │ │ │ │ + 0x0095c860 0a202076 65633420 6170706c 79506976 . vec4 applyPiv │ │ │ │ + 0x0095c870 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x0095c880 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x0095c890 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x0095c8a0 61742070 69766f74 5265616c 5a29200a at pivotRealZ) . │ │ │ │ + 0x0095c8b0 20207b20 0a202020 20766563 34207472 { . vec4 tr │ │ │ │ + 0x0095c8c0 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ + 0x0095c8d0 20706976 6f743b20 0a202020 20666c6f pivot; . flo │ │ │ │ + 0x0095c8e0 61742077 203d2074 72616e73 666f726d at w = transform │ │ │ │ + 0x0095c8f0 65645069 766f742e 773b200a 20202020 edPivot.w; . │ │ │ │ + 0x0095c900 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095c910 2e787977 203d2028 7069766f 74547261 .xyw = (pivotTra │ │ │ │ + 0x0095c920 6e73666f 726d202a 20766563 34287472 nsform * vec4(tr │ │ │ │ + 0x0095c930 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x0095c940 792c2070 69766f74 5265616c 5a2c2077 y, pivotRealZ, w │ │ │ │ + 0x0095c950 29292e78 79773b20 0a202020 20747261 )).xyw; . tra │ │ │ │ + 0x0095c960 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x0095c970 2a3d2074 72616e73 666f726d 65645069 *= transformedPi │ │ │ │ + 0x0095c980 766f742e 77202f20 773b200a 20202369 vot.w / w; . #i │ │ │ │ + 0x0095c990 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0095c9a0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095c9b0 742e7920 3d202d74 72616e73 666f726d t.y = -transform │ │ │ │ + 0x0095c9c0 65645069 766f742e 793b200a 20202020 edPivot.y; . │ │ │ │ + 0x0095c9d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095c9e0 2e7a203d 20287472 616e7366 6f726d65 .z = (transforme │ │ │ │ + 0x0095c9f0 64506976 6f742e7a 20202b20 7472616e dPivot.z + tran │ │ │ │ + 0x0095ca00 73666f72 6d656450 69766f74 2e772920 sformedPivot.w) │ │ │ │ + 0x0095ca10 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x0095ca20 200a2020 20207265 7475726e 20747261 . return tra │ │ │ │ + 0x0095ca30 6e73666f 726d6564 5069766f 743b200a nsformedPivot; . │ │ │ │ + 0x0095ca40 20207d20 0a202076 65633420 6170706c } . vec4 appl │ │ │ │ + 0x0095ca50 7942696c 6c626f61 72645069 766f7454 yBillboardPivotT │ │ │ │ + 0x0095ca60 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x0095ca70 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x0095ca80 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x0095ca90 7069766f 74526561 6c5a2c20 76656332 pivotRealZ, vec2 │ │ │ │ + 0x0095caa0 206f6666 73657429 200a2020 7b200a20 offset) . { . │ │ │ │ + 0x0095cab0 20202066 6c6f6174 206c6f67 69635a20 float logicZ │ │ │ │ + 0x0095cac0 3d207069 766f742e 7a202f20 7069766f = pivot.z / pivo │ │ │ │ + 0x0095cad0 742e773b 200a2020 20207665 63342074 t.w; . vec4 t │ │ │ │ + 0x0095cae0 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x0095caf0 3d207069 766f7454 72616e73 666f726d = pivotTransform │ │ │ │ + 0x0095cb00 202a2076 65633428 7069766f 742e7879 * vec4(pivot.xy │ │ │ │ + 0x0095cb10 2c207069 766f7452 65616c5a 2c207069 , pivotRealZ, pi │ │ │ │ + 0x0095cb20 766f742e 77293b20 0a202020 20766563 vot.w); . vec │ │ │ │ + 0x0095cb30 34207363 616c6520 3d207069 766f7454 4 scale = pivotT │ │ │ │ + 0x0095cb40 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x0095cb50 312e302c 202d312e 302c2030 2e302c20 1.0, -1.0, 0.0, │ │ │ │ + 0x0095cb60 312e3029 3b200a20 20202076 65633420 1.0); . vec4 │ │ │ │ + 0x0095cb70 706f7369 74696f6e 203d2076 65633428 position = vec4( │ │ │ │ + 0x0095cb80 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095cb90 2e787920 2f207472 616e7366 6f726d65 .xy / transforme │ │ │ │ + 0x0095cba0 64506976 6f742e77 2c206c6f 6769635a dPivot.w, logicZ │ │ │ │ + 0x0095cbb0 2c20312e 3029202b 20766563 34286f66 , 1.0) + vec4(of │ │ │ │ + 0x0095cbc0 66736574 202f2073 63616c65 2e77202a fset / scale.w * │ │ │ │ + 0x0095cbd0 20736361 6c652e78 2c20302e 302c2030 scale.x, 0.0, 0 │ │ │ │ + 0x0095cbe0 2e30293b 200a2020 23696664 65662056 .0); . #ifdef V │ │ │ │ + 0x0095cbf0 554c4b41 4e200a20 20202070 6f736974 ULKAN . posit │ │ │ │ + 0x0095cc00 696f6e2e 79203d20 2d706f73 6974696f ion.y = -positio │ │ │ │ + 0x0095cc10 6e2e793b 200a2020 2020706f 73697469 n.y; . positi │ │ │ │ + 0x0095cc20 6f6e2e7a 203d2028 706f7369 74696f6e on.z = (position │ │ │ │ + 0x0095cc30 2e7a2020 2b20706f 73697469 6f6e2e77 .z + position.w │ │ │ │ + 0x0095cc40 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x0095cc50 6966200a 20202020 72657475 726e2070 if . return p │ │ │ │ + 0x0095cc60 6f736974 696f6e3b 200a2020 7d200a20 osition; . } . │ │ │ │ + 0x0095cc70 20766563 32206361 6c634c69 6e655472 vec2 calcLineTr │ │ │ │ + 0x0095cc80 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x0095cc90 28766563 32206f72 6967696e 616c4178 (vec2 originalAx │ │ │ │ + 0x0095cca0 6973506f 732c2076 65633220 73686966 isPos, vec2 shif │ │ │ │ + 0x0095ccb0 74656450 6f732c20 6d617434 206d6f64 tedPos, mat4 mod │ │ │ │ + 0x0095ccc0 656c5669 65772c20 666c6f61 74206861 elView, float ha │ │ │ │ + 0x0095ccd0 6c665769 64746829 200a2020 7b200a20 lfWidth) . { . │ │ │ │ + 0x0095cce0 20202076 65633220 70203d20 28766563 vec2 p = (vec │ │ │ │ + 0x0095ccf0 34287368 69667465 64506f73 2c20302e 4(shiftedPos, 0. │ │ │ │ + 0x0095cd00 302c2031 2e302920 2a206d6f 64656c56 0, 1.0) * modelV │ │ │ │ + 0x0095cd10 69657729 2e78793b 200a2020 20207665 iew).xy; . ve │ │ │ │ + 0x0095cd20 63322064 203d2070 202d206f 72696769 c2 d = p - origi │ │ │ │ + 0x0095cd30 6e616c41 78697350 6f733b20 0a202020 nalAxisPos; . │ │ │ │ + 0x0095cd40 20696620 28646f74 28642c20 64292021 if (dot(d, d) ! │ │ │ │ + 0x0095cd50 3d20302e 3029200a 20202020 20207265 = 0.0) . re │ │ │ │ + 0x0095cd60 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x0095cd70 73506f73 202b206e 6f726d61 6c697a65 sPos + normalize │ │ │ │ + 0x0095cd80 28642920 2a206861 6c665769 6474683b (d) * halfWidth; │ │ │ │ + 0x0095cd90 200a2020 2020656c 7365200a 20202020 . else . │ │ │ │ + 0x0095cda0 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x0095cdb0 6c417869 73506f73 3b200a20 207d200a lAxisPos; . } . │ │ │ │ + 0x0095cdc0 2020766f 6964206d 61696e28 29200a20 void main() . │ │ │ │ + 0x0095cdd0 207b200a 20202020 76656332 206e6f72 { . vec2 nor │ │ │ │ + 0x0095cde0 6d616c20 3d20615f 6e6f726d 616c2e78 mal = a_normal.x │ │ │ │ + 0x0095cdf0 793b200a 20202020 666c6f61 74206861 y; . float ha │ │ │ │ + 0x0095ce00 6c665769 64746820 3d206c65 6e677468 lfWidth = length │ │ │ │ + 0x0095ce10 286e6f72 6d616c29 3b200a20 20202076 (normal); . v │ │ │ │ + 0x0095ce20 65633220 7472616e 73666f72 6d656441 ec2 transformedA │ │ │ │ + 0x0095ce30 78697350 6f73203d 20287665 63342861 xisPos = (vec4(a │ │ │ │ + 0x0095ce40 5f706f73 6974696f 6e2e7879 2c20302e _position.xy, 0. │ │ │ │ + 0x0095ce50 302c2031 2e302920 2a20755f 6d6f6465 0, 1.0) * u_mode │ │ │ │ + 0x0095ce60 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x0095ce70 69662028 68616c66 57696474 6820213d if (halfWidth != │ │ │ │ + 0x0095ce80 20302e30 29200a20 2020207b 200a2020 0.0) . { . │ │ │ │ + 0x0095ce90 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ + 0x0095cea0 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ + 0x0095ceb0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x0095cec0 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ + 0x0095ced0 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ + 0x0095cee0 6f6e2e78 79202b20 6e6f726d 616c2c20 on.xy + normal, │ │ │ │ + 0x0095cef0 0a202020 20202020 20202020 20202020 . │ │ │ │ + 0x0095cf00 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095cf10 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095cf20 20202020 20202075 5f6d6f64 656c5669 u_modelVi │ │ │ │ + 0x0095cf30 65772c20 68616c66 57696474 68293b20 ew, halfWidth); │ │ │ │ + 0x0095cf40 0a202020 207d200a 20202020 666c6f61 . } . floa │ │ │ │ + 0x0095cf50 7420754f 66667365 74203d20 6d696e28 t uOffset = min( │ │ │ │ + 0x0095cf60 6c656e67 74682876 65633428 6b536861 length(vec4(kSha │ │ │ │ + 0x0095cf70 7065436f 6f726453 63616c61 722c2030 peCoordScalar, 0 │ │ │ │ + 0x0095cf80 2c20302c 20302920 2a20755f 6d6f6465 , 0, 0) * u_mode │ │ │ │ + 0x0095cf90 6c566965 7729202a 20615f6d 61736b54 lView) * a_maskT │ │ │ │ + 0x0095cfa0 6578436f 6f72642e 782c2031 2e30293b exCoord.x, 1.0); │ │ │ │ + 0x0095cfb0 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ + 0x0095cfc0 436f6f72 64203d20 615f636f 6c6f7254 Coord = a_colorT │ │ │ │ + 0x0095cfd0 6578436f 6f72643b 200a2020 2020765f exCoord; . v_ │ │ │ │ + 0x0095cfe0 6d61736b 54657843 6f6f7264 203d2076 maskTexCoord = v │ │ │ │ + 0x0095cff0 65633228 615f6d61 736b5465 78436f6f ec2(a_maskTexCoo │ │ │ │ + 0x0095d000 72642e79 202b2075 4f666673 6574202a rd.y + uOffset * │ │ │ │ + 0x0095d010 20615f6d 61736b54 6578436f 6f72642e a_maskTexCoord. │ │ │ │ + 0x0095d020 7a2c2061 5f6d6173 6b546578 436f6f72 z, a_maskTexCoor │ │ │ │ + 0x0095d030 642e7729 3b200a20 20202076 65633420 d.w); . vec4 │ │ │ │ + 0x0095d040 706f7320 3d207665 63342874 72616e73 pos = vec4(trans │ │ │ │ + 0x0095d050 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ + 0x0095d060 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ + 0x0095d070 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ + 0x0095d080 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x0095d090 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ + 0x0095d0a0 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ + 0x0095d0b0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0095d0c0 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ + 0x0095d0d0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0095d0e0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0095d0f0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0095d100 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0095d110 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0095d120 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0095d130 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095d140 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0095d150 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0095d160 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0095d170 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0095d180 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0095d190 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0095d1a0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0095d1b0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0095d1c0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0095d1d0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0095d1e0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0095d1f0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0095d200 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0095d210 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0095d220 63322061 5f636f6c 6f725465 78436f6f c2 a_colorTexCoo │ │ │ │ + 0x0095d230 72643b20 0a202069 6e207665 63322061 rd; . in vec2 a │ │ │ │ + 0x0095d240 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ + 0x0095d250 2020696e 20766563 3420615f 706f7369 in vec4 a_posi │ │ │ │ + 0x0095d260 74696f6e 3b200a20 20696e20 76656332 tion; . in vec2 │ │ │ │ + 0x0095d270 20615f6e 6f726d61 6c3b200a 20202369 a_normal; . #i │ │ │ │ + 0x0095d280 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x0095d290 0a20206f 7574204c 4f575f50 20766563 . out LOW_P vec │ │ │ │ + 0x0095d2a0 3420765f 636f6c6f 723b200a 20202365 4 v_color; . #e │ │ │ │ + 0x0095d2b0 6c736520 0a20206f 75742076 65633220 lse . out vec2 │ │ │ │ + 0x0095d2c0 765f636f 6c6f7254 6578436f 6f72643b v_colorTexCoord; │ │ │ │ + 0x0095d2d0 200a2020 23656e64 6966200a 20206f75 . #endif . ou │ │ │ │ + 0x0095d2e0 74207665 63322076 5f6d6173 6b546578 t vec2 v_maskTex │ │ │ │ + 0x0095d2f0 436f6f72 643b200a 2020756e 69666f72 Coord; . unifor │ │ │ │ + 0x0095d300 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x0095d310 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x0095d320 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x0095d330 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0095d340 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x0095d350 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x0095d360 65633220 755f636f 6e747261 73744761 ec2 u_contrastGa │ │ │ │ + 0x0095d370 6d6d613b 200a2020 756e6966 6f726d20 mma; . uniform │ │ │ │ + 0x0095d380 666c6f61 7420755f 6f706163 6974793b float u_opacity; │ │ │ │ + 0x0095d390 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x0095d3a0 7420755f 7a536361 6c653b20 0a202075 t u_zScale; . u │ │ │ │ + 0x0095d3b0 6e69666f 726d2066 6c6f6174 20755f69 niform float u_i │ │ │ │ + 0x0095d3c0 6e746572 706f6c61 74696f6e 3b200a20 nterpolation; . │ │ │ │ + 0x0095d3d0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0095d3e0 5f69734f 75746c69 6e655061 73733b20 _isOutlinePass; │ │ │ │ + 0x0095d3f0 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x0095d400 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ + 0x0095d410 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x0095d420 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x0095d430 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x0095d440 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x0095d450 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x0095d460 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x0095d470 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x0095d480 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x0095d490 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x0095d4a0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x0095d4b0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x0095d4c0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x0095d4d0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x0095d4e0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x0095d4f0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x0095d500 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x0095d510 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x0095d520 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x0095d530 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x0095d540 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x0095d550 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0095d560 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x0095d570 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x0095d580 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x0095d590 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x0095d5a0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x0095d5b0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x0095d5c0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x0095d5d0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x0095d5e0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x0095d5f0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x0095d600 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x0095d610 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x0095d620 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x0095d630 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x0095d640 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x0095d650 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x0095d660 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x0095d670 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x0095d680 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x0095d690 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x0095d6a0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x0095d6b0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x0095d6c0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x0095d6d0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0095d6e0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x0095d6f0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x0095d700 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x0095d710 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x0095d720 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x0095d730 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x0095d740 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x0095d750 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x0095d760 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x0095d770 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x0095d780 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x0095d790 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x0095d7a0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x0095d7b0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x0095d7c0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0095d7d0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x0095d7e0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x0095d7f0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x0095d800 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x0095d810 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x0095d820 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x0095d830 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x0095d840 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x0095d850 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x0095d860 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x0095d870 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x0095d880 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x0095d890 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x0095d8a0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x0095d8b0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x0095d8c0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x0095d8d0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x0095d8e0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x0095d8f0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x0095d900 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x0095d910 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x0095d920 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x0095d930 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x0095d940 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0095d950 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x0095d960 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x0095d970 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x0095d980 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x0095d990 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x0095d9a0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x0095d9b0 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ + 0x0095d9c0 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ + 0x0095d9d0 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ + 0x0095d9e0 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x0095d9f0 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ + 0x0095da00 3428615f 6e6f726d 616c2c20 302e302c 4(a_normal, 0.0, │ │ │ │ + 0x0095da10 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ + 0x0095da20 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x0095da30 73697469 6f6e203d 20617070 6c794269 sition = applyBi │ │ │ │ + 0x0095da40 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x0095da50 73666f72 6d287069 766f7420 2a20755f sform(pivot * u_ │ │ │ │ + 0x0095da60 70726f6a 65637469 6f6e2c20 755f7069 projection, u_pi │ │ │ │ + 0x0095da70 766f7454 72616e73 666f726d 2c200a20 votTransform, . │ │ │ │ + 0x0095da80 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095da90 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0095daa0 20202020 20202020 20202020 2020615f a_ │ │ │ │ + 0x0095dab0 706f7369 74696f6e 2e77202a 20755f7a position.w * u_z │ │ │ │ + 0x0095dac0 5363616c 652c206f 66667365 742e7879 Scale, offset.xy │ │ │ │ + 0x0095dad0 293b200a 20202369 66646566 20454e41 ); . #ifdef ENA │ │ │ │ + 0x0095dae0 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ + 0x0095daf0 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ + 0x0095db00 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ + 0x0095db10 6f725465 78436f6f 7264293b 200a2020 orTexCoord); . │ │ │ │ + 0x0095db20 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ + 0x0095db30 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ + 0x0095db40 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x0095db50 2023656e 64696620 0a202020 20765f6d #endif . v_m │ │ │ │ + 0x0095db60 61736b54 6578436f 6f726420 3d20615f askTexCoord = a_ │ │ │ │ + 0x0095db70 6d61736b 54657843 6f6f7264 3b200a20 maskTexCoord; . │ │ │ │ + 0x0095db80 207d200a 00000000 20202023 69666465 } ..... #ifde │ │ │ │ + 0x0095db90 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0095dba0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0095dbb0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0095dbc0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095dbd0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0095dbe0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0095dbf0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0095dc00 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0095dc10 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0095dc20 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0095dc30 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0095dc40 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0095dc50 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0095dc60 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0095dc70 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0095dc80 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0095dc90 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0095dca0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0095dcb0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0095dcc0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0095dcd0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0095dce0 3b200a20 20696e20 76656333 20615f6e ; . in vec3 a_n │ │ │ │ + 0x0095dcf0 6f726d61 6c3b200a 2020696e 20766563 ormal; . in vec │ │ │ │ + 0x0095dd00 3220615f 74657843 6f6f7264 733b200a 2 a_texCoords; . │ │ │ │ + 0x0095dd10 20206f75 74207665 63332076 5f6e6f72 out vec3 v_nor │ │ │ │ + 0x0095dd20 6d616c3b 200a2020 6f757420 76656332 mal; . out vec2 │ │ │ │ + 0x0095dd30 20765f74 6578436f 6f726473 3b200a20 v_texCoords; . │ │ │ │ + 0x0095dd40 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x0095dd50 7472616e 73666f72 6d3b200a 2020756e transform; . un │ │ │ │ + 0x0095dd60 69666f72 6d206d61 74342075 5f6e6f72 iform mat4 u_nor │ │ │ │ + 0x0095dd70 6d616c54 72616e73 666f726d 3b200a20 malTransform; . │ │ │ │ + 0x0095dd80 20756e69 666f726d 20766563 3420755f uniform vec4 u_ │ │ │ │ + 0x0095dd90 636f6c6f 723b200a 2020756e 69666f72 color; . unifor │ │ │ │ + 0x0095dda0 6d207665 63322075 5f746578 436f6f72 m vec2 u_texCoor │ │ │ │ + 0x0095ddb0 64466c69 7070696e 673b200a 2020636f dFlipping; . co │ │ │ │ + 0x0095ddc0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x0095ddd0 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x0095dde0 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x0095ddf0 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0095de00 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0095de10 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0095de20 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0095de30 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x0095de40 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0095de50 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x0095de60 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x0095de70 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x0095de80 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0095de90 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x0095dea0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0095deb0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0095dec0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x0095ded0 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x0095dee0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0095def0 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x0095df00 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x0095df10 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0095df20 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x0095df30 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x0095df40 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x0095df50 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0095df60 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x0095df70 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x0095df80 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x0095df90 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x0095dfa0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0095dfb0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x0095dfc0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x0095dfd0 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x0095dfe0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x0095dff0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x0095e000 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0095e010 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x0095e020 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x0095e030 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x0095e040 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x0095e050 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x0095e060 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x0095e070 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x0095e080 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x0095e090 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0095e0a0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x0095e0b0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x0095e0c0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0095e0d0 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x0095e0e0 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x0095e0f0 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x0095e100 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x0095e110 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x0095e120 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x0095e130 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x0095e140 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x0095e150 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x0095e160 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x0095e170 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0095e180 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x0095e190 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x0095e1a0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x0095e1b0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x0095e1c0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x0095e1d0 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x0095e1e0 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x0095e1f0 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x0095e200 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x0095e210 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x0095e220 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x0095e230 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x0095e240 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x0095e250 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x0095e260 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x0095e270 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x0095e280 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x0095e290 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x0095e2a0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x0095e2b0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0095e2c0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x0095e2d0 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x0095e2e0 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0095e2f0 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x0095e300 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x0095e310 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x0095e320 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0095e330 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0095e340 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x0095e350 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ + 0x0095e360 63342070 6f736974 696f6e20 3d20755f c4 position = u_ │ │ │ │ + 0x0095e370 7472616e 73666f72 6d202a20 76656334 transform * vec4 │ │ │ │ + 0x0095e380 28615f70 6f732c20 312e3029 3b200a20 (a_pos, 1.0); . │ │ │ │ + 0x0095e390 20202076 5f6e6f72 6d616c20 3d206e6f v_normal = no │ │ │ │ + 0x0095e3a0 726d616c 697a6528 28755f6e 6f726d61 rmalize((u_norma │ │ │ │ + 0x0095e3b0 6c547261 6e73666f 726d202a 20766563 lTransform * vec │ │ │ │ + 0x0095e3c0 3428615f 6e6f726d 616c2c20 302e3029 4(a_normal, 0.0) │ │ │ │ + 0x0095e3d0 292e7879 7a293b20 0a202020 20765f74 ).xyz); . v_t │ │ │ │ + 0x0095e3e0 6578436f 6f726473 203d206d 69782861 exCoords = mix(a │ │ │ │ + 0x0095e3f0 5f746578 436f6f72 64732c20 312e3020 _texCoords, 1.0 │ │ │ │ + 0x0095e400 2d20615f 74657843 6f6f7264 732c2075 - a_texCoords, u │ │ │ │ + 0x0095e410 5f746578 436f6f72 64466c69 7070696e _texCoordFlippin │ │ │ │ + 0x0095e420 67293b20 0a202020 20676c5f 506f7369 g); . gl_Posi │ │ │ │ + 0x0095e430 74696f6e 203d2070 6f736974 696f6e3b tion = position; │ │ │ │ + 0x0095e440 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0095e450 4e200a20 20202067 6c5f506f 73697469 N . gl_Positi │ │ │ │ + 0x0095e460 6f6e2e79 203d202d 676c5f50 6f736974 on.y = -gl_Posit │ │ │ │ + 0x0095e470 696f6e2e 793b200a 20202020 676c5f50 ion.y; . gl_P │ │ │ │ + 0x0095e480 6f736974 696f6e2e 7a203d20 28676c5f osition.z = (gl_ │ │ │ │ + 0x0095e490 506f7369 74696f6e 2e7a202b 20676c5f Position.z + gl_ │ │ │ │ + 0x0095e4a0 506f7369 74696f6e 2e772920 2a20302e Position.w) * 0. │ │ │ │ + 0x0095e4b0 353b200a 20202365 6e646966 200a2020 5; . #endif . │ │ │ │ + 0x0095e4c0 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x0095e4d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0095e4e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0095e4f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0095e500 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095e510 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0095e520 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0095e530 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0095e540 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0095e550 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0095e560 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0095e570 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0095e580 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0095e590 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0095e5a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0095e5b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0095e5c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0095e5d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0095e5e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0095e5f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0095e600 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0095e610 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0095e620 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0095e630 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x0095e640 6e207665 63342061 5f636f6c 6f725465 n vec4 a_colorTe │ │ │ │ + 0x0095e650 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x0095e660 76656334 20765f6e 6f726d61 6c3b200a vec4 v_normal; . │ │ │ │ + 0x0095e670 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ + 0x0095e680 56544620 0a20206f 7574204c 4f575f50 VTF . out LOW_P │ │ │ │ + 0x0095e690 20766563 3420765f 636f6c6f 723b200a vec4 v_color; . │ │ │ │ + 0x0095e6a0 20202365 6c736520 0a20206f 75742076 #else . out v │ │ │ │ + 0x0095e6b0 65633220 765f636f 6c6f7254 6578436f ec2 v_colorTexCo │ │ │ │ + 0x0095e6c0 6f726473 3b200a20 2023656e 64696620 ords; . #endif │ │ │ │ + 0x0095e6d0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0095e6e0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0095e6f0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0095e700 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x0095e710 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x0095e720 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x0095e730 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x0095e740 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x0095e750 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x0095e760 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x0095e770 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x0095e780 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x0095e790 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x0095e7a0 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x0095e7b0 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x0095e7c0 696e6550 6173733b 200a2020 23696664 inePass; . #ifd │ │ │ │ + 0x0095e7d0 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x0095e7e0 20756e69 666f726d 2073616d 706c6572 uniform sampler │ │ │ │ + 0x0095e7f0 32442075 5f636f6c 6f725465 783b200a 2D u_colorTex; . │ │ │ │ + 0x0095e800 20202365 6e646966 200a2020 636f6e73 #endif . cons │ │ │ │ + 0x0095e810 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x0095e820 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x0095e830 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x0095e840 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0095e850 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0095e860 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0095e870 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0095e880 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x0095e890 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0095e8a0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x0095e8b0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x0095e8c0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x0095e8d0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095e8e0 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x0095e8f0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0095e900 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0095e910 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0095e920 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x0095e930 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095e940 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x0095e950 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x0095e960 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0095e970 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0095e980 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x0095e990 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x0095e9a0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095e9b0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x0095e9c0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x0095e9d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095e9e0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0095e9f0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0095ea00 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095ea10 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x0095ea20 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0095ea30 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0095ea40 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0095ea50 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0095ea60 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x0095ea70 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x0095ea80 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x0095ea90 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x0095eaa0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x0095eab0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0095eac0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x0095ead0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x0095eae0 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x0095eaf0 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x0095eb00 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x0095eb10 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0095eb20 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x0095eb30 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x0095eb40 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x0095eb50 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0095eb60 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x0095eb70 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x0095eb80 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x0095eb90 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x0095eba0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x0095ebb0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x0095ebc0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x0095ebd0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x0095ebe0 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x0095ebf0 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x0095ec00 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x0095ec10 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x0095ec20 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0095ec30 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x0095ec40 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x0095ec50 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x0095ec60 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x0095ec70 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x0095ec80 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x0095ec90 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x0095eca0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x0095ecb0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x0095ecc0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x0095ecd0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x0095ece0 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x0095ecf0 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x0095ed00 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0095ed10 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x0095ed20 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x0095ed30 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x0095ed40 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x0095ed50 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x0095ed60 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x0095ed70 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x0095ed80 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0095ed90 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x0095eda0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x0095edb0 2070203d 20766563 3428615f 706f7369 p = vec4(a_posi │ │ │ │ + 0x0095edc0 74696f6e 2c203129 202a2075 5f6d6f64 tion, 1) * u_mod │ │ │ │ + 0x0095edd0 656c5669 65773b20 0a202020 20766563 elView; . vec │ │ │ │ + 0x0095ede0 3420706f 73203d20 76656334 28615f6e 4 pos = vec4(a_n │ │ │ │ + 0x0095edf0 6f726d61 6c2e7879 202b2061 5f636f6c ormal.xy + a_col │ │ │ │ + 0x0095ee00 6f725465 78436f6f 7264732e 7a772c20 orTexCoords.zw, │ │ │ │ + 0x0095ee10 302c2030 29202b20 703b200a 20202020 0, 0) + p; . │ │ │ │ + 0x0095ee20 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ + 0x0095ee30 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0095ee40 6d28706f 73202a20 755f7072 6f6a6563 m(pos * u_projec │ │ │ │ + 0x0095ee50 74696f6e 2c20755f 7069766f 74547261 tion, u_pivotTra │ │ │ │ + 0x0095ee60 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x0095ee70 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x0095ee80 5446200a 20202020 765f636f 6c6f7220 TF . v_color │ │ │ │ + 0x0095ee90 3d207465 78747572 6528755f 636f6c6f = texture(u_colo │ │ │ │ + 0x0095eea0 72546578 2c20615f 636f6c6f 72546578 rTex, a_colorTex │ │ │ │ + 0x0095eeb0 436f6f72 64732e78 79293b20 0a202023 Coords.xy); . # │ │ │ │ + 0x0095eec0 656c7365 200a2020 2020765f 636f6c6f else . v_colo │ │ │ │ + 0x0095eed0 72546578 436f6f72 6473203d 20615f63 rTexCoords = a_c │ │ │ │ + 0x0095eee0 6f6c6f72 54657843 6f6f7264 732e7879 olorTexCoords.xy │ │ │ │ + 0x0095eef0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0095ef00 20765f6e 6f726d61 6c203d20 615f6e6f v_normal = a_no │ │ │ │ + 0x0095ef10 726d616c 3b200a20 207d200a 00000000 rmal; . } ..... │ │ │ │ + 0x0095ef20 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0095ef30 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0095ef40 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0095ef50 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0095ef60 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0095ef70 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0095ef80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095ef90 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0095efa0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0095efb0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0095efc0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0095efd0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0095efe0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0095eff0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0095f000 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0095f010 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0095f020 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0095f030 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0095f040 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0095f050 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0095f060 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0095f070 63332061 5f706f73 3b200a20 20696e20 c3 a_pos; . in │ │ │ │ + 0x0095f080 76656332 20615f74 6578436f 6f726473 vec2 a_texCoords │ │ │ │ + 0x0095f090 3b200a20 206f7574 20666c6f 61742076 ; . out float v │ │ │ │ + 0x0095f0a0 5f696e74 656e7369 74793b20 0a202075 _intensity; . u │ │ │ │ + 0x0095f0b0 6e69666f 726d206d 61743420 755f7472 niform mat4 u_tr │ │ │ │ + 0x0095f0c0 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ + 0x0095f0d0 6f726d20 6d617434 20755f6e 6f726d61 orm mat4 u_norma │ │ │ │ + 0x0095f0e0 6c547261 6e73666f 726d3b20 0a202075 lTransform; . u │ │ │ │ + 0x0095f0f0 6e69666f 726d2076 65633420 755f636f niform vec4 u_co │ │ │ │ + 0x0095f100 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x0095f110 76656332 20755f74 6578436f 6f726446 vec2 u_texCoordF │ │ │ │ + 0x0095f120 6c697070 696e673b 200a2020 636f6e73 lipping; . cons │ │ │ │ + 0x0095f130 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x0095f140 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x0095f150 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x0095f160 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x0095f170 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x0095f180 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x0095f190 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x0095f1a0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x0095f1b0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0095f1c0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x0095f1d0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x0095f1e0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x0095f1f0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095f200 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x0095f210 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0095f220 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0095f230 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x0095f240 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x0095f250 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095f260 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x0095f270 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x0095f280 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0095f290 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x0095f2a0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x0095f2b0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x0095f2c0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095f2d0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x0095f2e0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x0095f2f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095f300 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0095f310 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0095f320 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095f330 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x0095f340 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x0095f350 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0095f360 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0095f370 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0095f380 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x0095f390 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x0095f3a0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x0095f3b0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x0095f3c0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x0095f3d0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x0095f3e0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x0095f3f0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x0095f400 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x0095f410 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x0095f420 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x0095f430 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0095f440 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x0095f450 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x0095f460 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x0095f470 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0095f480 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x0095f490 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x0095f4a0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x0095f4b0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x0095f4c0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x0095f4d0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x0095f4e0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x0095f4f0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x0095f500 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x0095f510 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x0095f520 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x0095f530 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x0095f540 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0095f550 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x0095f560 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x0095f570 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x0095f580 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x0095f590 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x0095f5a0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x0095f5b0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x0095f5c0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x0095f5d0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x0095f5e0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x0095f5f0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x0095f600 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x0095f610 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x0095f620 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0095f630 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x0095f640 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x0095f650 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x0095f660 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x0095f670 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x0095f680 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x0095f690 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x0095f6a0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0095f6b0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x0095f6c0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x0095f6d0 20706f73 6974696f 6e203d20 755f7472 position = u_tr │ │ │ │ + 0x0095f6e0 616e7366 6f726d20 2a207665 63342861 ansform * vec4(a │ │ │ │ + 0x0095f6f0 5f706f73 2c20312e 30293b20 0a202020 _pos, 1.0); . │ │ │ │ + 0x0095f700 20765f69 6e74656e 73697479 203d2061 v_intensity = a │ │ │ │ + 0x0095f710 5f746578 436f6f72 64732e78 3b200a20 _texCoords.x; . │ │ │ │ + 0x0095f720 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x0095f730 20706f73 6974696f 6e3b200a 20202369 position; . #i │ │ │ │ + 0x0095f740 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0095f750 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ + 0x0095f760 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ + 0x0095f770 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x0095f780 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ + 0x0095f790 6f6e2e7a 202b2067 6c5f506f 73697469 on.z + gl_Positi │ │ │ │ + 0x0095f7a0 6f6e2e77 29202a20 302e353b 200a2020 on.w) * 0.5; . │ │ │ │ + 0x0095f7b0 23656e64 6966200a 20207d20 0a000000 #endif . } .... │ │ │ │ + 0x0095f7c0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0095f7d0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0095f7e0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0095f7f0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0095f800 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0095f810 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0095f820 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0095f830 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0095f840 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0095f850 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0095f860 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0095f870 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0095f880 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0095f890 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0095f8a0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0095f8b0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0095f8c0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0095f8d0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0095f8e0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0095f8f0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0095f900 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0095f910 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x0095f920 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x0095f930 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x0095f940 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x0095f950 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x0095f960 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x0095f970 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x0095f980 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x0095f990 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x0095f9a0 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x0095f9b0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x0095f9c0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x0095f9d0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x0095f9e0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x0095f9f0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0095fa00 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x0095fa10 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x0095fa20 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x0095fa30 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x0095fa40 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x0095fa50 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x0095fa60 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x0095fa70 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x0095fa80 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x0095fa90 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x0095faa0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x0095fab0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x0095fac0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0095fad0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x0095fae0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x0095faf0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0095fb00 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x0095fb10 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x0095fb20 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x0095fb30 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0095fb40 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x0095fb50 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0095fb60 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0095fb70 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x0095fb80 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x0095fb90 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095fba0 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x0095fbb0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x0095fbc0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x0095fbd0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x0095fbe0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x0095fbf0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x0095fc00 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0095fc10 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x0095fc20 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x0095fc30 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0095fc40 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x0095fc50 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x0095fc60 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0095fc70 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x0095fc80 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x0095fc90 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x0095fca0 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x0095fcb0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x0095fcc0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x0095fcd0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x0095fce0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x0095fcf0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x0095fd00 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x0095fd10 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x0095fd20 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x0095fd30 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x0095fd40 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x0095fd50 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x0095fd60 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x0095fd70 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x0095fd80 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x0095fd90 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x0095fda0 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x0095fdb0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x0095fdc0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x0095fdd0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x0095fde0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x0095fdf0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x0095fe00 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x0095fe10 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x0095fe20 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x0095fe30 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x0095fe40 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x0095fe50 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x0095fe60 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x0095fe70 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x0095fe80 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x0095fe90 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x0095fea0 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x0095feb0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x0095fec0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x0095fed0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x0095fee0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x0095fef0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x0095ff00 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x0095ff10 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x0095ff20 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x0095ff30 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x0095ff40 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x0095ff50 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x0095ff60 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x0095ff70 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x0095ff80 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x0095ff90 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x0095ffa0 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x0095ffb0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x0095ffc0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x0095ffd0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x0095ffe0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x0095fff0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00960000 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00960010 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ + 0x00960020 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ + 0x00960030 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00960040 2020666c 6f617420 6e6f726d 616c4c65 float normalLe │ │ │ │ + 0x00960050 6e203d20 6c656e67 74682861 5f6e6f72 n = length(a_nor │ │ │ │ + 0x00960060 6d616c29 3b200a20 20202076 65633420 mal); . vec4 │ │ │ │ + 0x00960070 6e203d20 76656334 28615f70 6f736974 n = vec4(a_posit │ │ │ │ + 0x00960080 696f6e2e 7879202b 20615f6e 6f726d61 ion.xy + a_norma │ │ │ │ + 0x00960090 6c202a20 6b536861 7065436f 6f726453 l * kShapeCoordS │ │ │ │ + 0x009600a0 63616c61 722c2030 2e302c20 302e3029 calar, 0.0, 0.0) │ │ │ │ + 0x009600b0 202a2075 5f6d6f64 656c5669 65773b20 * u_modelView; │ │ │ │ + 0x009600c0 0a202020 20766563 34206e6f 726d203d . vec4 norm = │ │ │ │ + 0x009600d0 20766563 3428302e 302c2030 2e302c20 vec4(0.0, 0.0, │ │ │ │ + 0x009600e0 302e302c 20302e30 293b200a 20202020 0.0, 0.0); . │ │ │ │ + 0x009600f0 69662028 646f7428 6e2c206e 2920213d if (dot(n, n) != │ │ │ │ + 0x00960100 20302e30 29200a20 20202020 206e6f72 0.0) . nor │ │ │ │ + 0x00960110 6d203d20 6e6f726d 616c697a 65286e29 m = normalize(n) │ │ │ │ + 0x00960120 202a206e 6f726d61 6c4c656e 3b200a20 * normalLen; . │ │ │ │ + 0x00960130 20202076 65633420 73686966 74656450 vec4 shiftedP │ │ │ │ + 0x00960140 6f73203d 206e6f72 6d202b20 706f733b os = norm + pos; │ │ │ │ + 0x00960150 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x00960160 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ + 0x00960170 616e7366 6f726d28 73686966 74656450 ansform(shiftedP │ │ │ │ + 0x00960180 6f73202a 20755f70 726f6a65 6374696f os * u_projectio │ │ │ │ + 0x00960190 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ + 0x009601a0 6f726d2c 20302e30 293b200a 20202020 orm, 0.0); . │ │ │ │ + 0x009601b0 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ + 0x009601c0 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ + 0x009601d0 7264733b 200a2020 7d200a00 00000000 rds; . } ...... │ │ │ │ + 0x009601e0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x009601f0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00960200 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00960210 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00960220 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00960230 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00960240 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00960250 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00960260 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00960270 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00960280 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00960290 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009602a0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009602b0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009602c0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009602d0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009602e0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x009602f0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00960300 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00960310 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00960320 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00960330 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00960340 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x00960350 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ + 0x00960360 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ + 0x00960370 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ + 0x00960380 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ + 0x00960390 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ + 0x009603a0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x009603b0 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ + 0x009603c0 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ + 0x009603d0 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ + 0x009603e0 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ + 0x009603f0 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ + 0x00960400 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ + 0x00960410 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ + 0x00960420 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ + 0x00960430 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ + 0x00960440 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ + 0x00960450 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ + 0x00960460 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ + 0x00960470 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00960480 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ + 0x00960490 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ + 0x009604a0 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ + 0x009604b0 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ + 0x009604c0 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ + 0x009604d0 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ + 0x009604e0 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ + 0x009604f0 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ + 0x00960500 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x00960510 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x00960520 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x00960530 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00960540 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00960550 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00960560 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x00960570 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x00960580 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x00960590 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x009605a0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x009605b0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x009605c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009605d0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x009605e0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x009605f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00960600 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00960610 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x00960620 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00960630 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x00960640 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x00960650 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00960660 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00960670 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x00960680 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x00960690 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009606a0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x009606b0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x009606c0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x009606d0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x009606e0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x009606f0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x00960700 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x00960710 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x00960720 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00960730 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00960740 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00960750 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x00960760 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x00960770 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x00960780 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x00960790 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x009607a0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009607b0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x009607c0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x009607d0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x009607e0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x009607f0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x00960800 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00960810 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x00960820 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x00960830 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x00960840 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00960850 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x00960860 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x00960870 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x00960880 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x00960890 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x009608a0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x009608b0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x009608c0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x009608d0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x009608e0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x009608f0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x00960900 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00960910 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00960920 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x00960930 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x00960940 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x00960950 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x00960960 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x00960970 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x00960980 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x00960990 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x009609a0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x009609b0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x009609c0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x009609d0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x009609e0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x009609f0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00960a00 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x00960a10 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x00960a20 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00960a30 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x00960a40 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x00960a50 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x00960a60 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00960a70 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x00960a80 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x00960a90 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ + 0x00960aa0 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ + 0x00960ab0 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ + 0x00960ac0 64656c56 6965773b 200a2020 2020706f delView; . po │ │ │ │ + 0x00960ad0 732e7879 77203d20 28706f73 202a2075 s.xyw = (pos * u │ │ │ │ + 0x00960ae0 5f70726f 6a656374 696f6e29 2e787977 _projection).xyw │ │ │ │ + 0x00960af0 3b200a20 20202070 6f732e7a 203d2061 ; . pos.z = a │ │ │ │ + 0x00960b00 5f706f73 6974696f 6e2e7a20 2a20755f _position.z * u_ │ │ │ │ + 0x00960b10 7a536361 6c653b20 0a202020 20676c5f zScale; . gl_ │ │ │ │ + 0x00960b20 506f7369 74696f6e 203d2075 5f706976 Position = u_piv │ │ │ │ + 0x00960b30 6f745472 616e7366 6f726d20 2a20706f otTransform * po │ │ │ │ + 0x00960b40 733b200a 20202369 66646566 2056554c s; . #ifdef VUL │ │ │ │ + 0x00960b50 4b414e20 0a202020 20676c5f 506f7369 KAN . gl_Posi │ │ │ │ + 0x00960b60 74696f6e 2e79203d 202d676c 5f506f73 tion.y = -gl_Pos │ │ │ │ + 0x00960b70 6974696f 6e2e793b 200a2020 2020676c ition.y; . gl │ │ │ │ + 0x00960b80 5f506f73 6974696f 6e2e7a20 3d202867 _Position.z = (g │ │ │ │ + 0x00960b90 6c5f506f 73697469 6f6e2e7a 20202b20 l_Position.z + │ │ │ │ + 0x00960ba0 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ + 0x00960bb0 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ + 0x00960bc0 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00960bd0 5f565446 200a2020 2020765f 636f6c6f _VTF . v_colo │ │ │ │ + 0x00960be0 72203d20 74657874 75726528 755f636f r = texture(u_co │ │ │ │ + 0x00960bf0 6c6f7254 65782c20 615f636f 6c6f7254 lorTex, a_colorT │ │ │ │ + 0x00960c00 6578436f 6f726473 293b200a 20202365 exCoords); . #e │ │ │ │ + 0x00960c10 6c736520 0a202020 20765f63 6f6c6f72 lse . v_color │ │ │ │ + 0x00960c20 54657843 6f6f7264 73203d20 615f636f TexCoords = a_co │ │ │ │ + 0x00960c30 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x00960c40 2023656e 64696620 0a20207d 200a0000 #endif . } ... │ │ │ │ + 0x00960c50 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00960c60 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00960c70 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00960c80 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00960c90 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00960ca0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00960cb0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00960cc0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00960cd0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00960ce0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00960cf0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00960d00 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00960d10 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00960d20 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00960d30 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00960d40 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00960d50 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00960d60 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00960d70 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00960d80 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00960d90 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00960da0 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x00960db0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x00960dc0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00960dd0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00960de0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00960df0 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x00960e00 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00960e10 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00960e20 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00960e30 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00960e40 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00960e50 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00960e60 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x00960e70 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x00960e80 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00960e90 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00960ea0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00960eb0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00960ec0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00960ed0 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00960ee0 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00960ef0 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00960f00 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00960f10 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00960f20 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00960f30 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x00960f40 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x00960f50 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x00960f60 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x00960f70 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x00960f80 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00960f90 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00960fa0 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00960fb0 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00960fc0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00960fd0 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00960fe0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00960ff0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00961000 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00961010 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00961020 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00961030 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x00961040 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x00961050 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x00961060 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00961070 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x00961080 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00961090 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x009610a0 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x009610b0 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x009610c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x009610d0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x009610e0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x009610f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00961100 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00961110 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00961120 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00961130 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00961140 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00961150 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00961160 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00961170 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00961180 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00961190 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x009611a0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x009611b0 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x009611c0 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x009611d0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x009611e0 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x009611f0 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00961200 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00961210 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00961220 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00961230 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00961240 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00961250 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00961260 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00961270 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00961280 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00961290 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x009612a0 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x009612b0 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x009612c0 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x009612d0 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x009612e0 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x009612f0 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00961300 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00961310 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00961320 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00961330 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00961340 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00961350 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00961360 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00961370 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00961380 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00961390 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x009613a0 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x009613b0 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x009613c0 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x009613d0 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x009613e0 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x009613f0 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00961400 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00961410 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00961420 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00961430 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00961440 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00961450 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00961460 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00961470 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00961480 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00961490 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x009614a0 7069766f 74203d20 76656334 28615f70 pivot = vec4(a_p │ │ │ │ + 0x009614b0 6f736974 696f6e2e 78797a2c 20312e30 osition.xyz, 1.0 │ │ │ │ + 0x009614c0 29202a20 755f6d6f 64656c56 6965773b ) * u_modelView; │ │ │ │ + 0x009614d0 200a2020 20207665 6334206f 66667365 . vec4 offse │ │ │ │ + 0x009614e0 74203d20 76656334 28615f6e 6f726d61 t = vec4(a_norma │ │ │ │ + 0x009614f0 6c2c2030 2e302c20 302e3029 202a2075 l, 0.0, 0.0) * u │ │ │ │ + 0x00961500 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x00961510 2020676c 5f506f73 6974696f 6e203d20 gl_Position = │ │ │ │ + 0x00961520 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00961530 766f7454 72616e73 666f726d 28706976 votTransform(piv │ │ │ │ + 0x00961540 6f74202a 20755f70 726f6a65 6374696f ot * u_projectio │ │ │ │ + 0x00961550 6e2c2075 5f706976 6f745472 616e7366 n, u_pivotTransf │ │ │ │ + 0x00961560 6f726d2c 200a2020 20202020 20202020 orm, . │ │ │ │ + 0x00961570 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00961580 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00961590 20202020 20615f70 6f736974 696f6e2e a_position. │ │ │ │ + 0x009615a0 77202a20 755f7a53 63616c65 2c206f66 w * u_zScale, of │ │ │ │ + 0x009615b0 66736574 2e787929 3b200a20 20202076 fset.xy); . v │ │ │ │ + 0x009615c0 5f636f6c 6f725465 78436f6f 72647320 _colorTexCoords │ │ │ │ + 0x009615d0 3d20615f 636f6c6f 72546578 436f6f72 = a_colorTexCoor │ │ │ │ + 0x009615e0 64733b20 0a20207d 200a0000 00000000 ds; . } ....... │ │ │ │ + 0x009615f0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00961600 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00961610 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00961620 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00961630 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00961640 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00961650 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00961660 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00961670 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00961680 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00961690 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009616a0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009616b0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009616c0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009616d0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x009616e0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x009616f0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00961700 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00961710 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00961720 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00961730 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00961740 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00961750 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x00961760 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x00961770 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x00961780 200a2020 6f757420 76656334 20765f6e . out vec4 v_n │ │ │ │ + 0x00961790 6f726d61 6c3b200a 20202369 66646566 ormal; . #ifdef │ │ │ │ + 0x009617a0 20454e41 424c455f 56544620 0a20206f ENABLE_VTF . o │ │ │ │ + 0x009617b0 7574204c 4f575f50 20766563 3420765f ut LOW_P vec4 v_ │ │ │ │ + 0x009617c0 636f6c6f 723b200a 20202365 6c736520 color; . #else │ │ │ │ + 0x009617d0 0a20206f 75742076 65633220 765f636f . out vec2 v_co │ │ │ │ + 0x009617e0 6c6f7254 6578436f 6f726473 3b200a20 lorTexCoords; . │ │ │ │ + 0x009617f0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ + 0x00961800 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x00961810 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x00961820 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x00961830 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x00961840 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00961850 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00961860 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00961870 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00961880 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00961890 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x009618a0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x009618b0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x009618c0 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x009618d0 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009618e0 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x009618f0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x00961900 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ + 0x00961910 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x00961920 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ + 0x00961930 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x00961940 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00961950 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00961960 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00961970 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00961980 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00961990 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x009619a0 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x009619b0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x009619c0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x009619d0 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x009619e0 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x009619f0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x00961a00 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x00961a10 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x00961a20 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x00961a30 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x00961a40 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00961a50 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00961a60 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00961a70 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00961a80 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00961a90 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00961aa0 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00961ab0 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00961ac0 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00961ad0 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00961ae0 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00961af0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00961b00 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00961b10 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00961b20 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00961b30 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00961b40 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00961b50 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00961b60 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00961b70 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00961b80 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00961b90 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00961ba0 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00961bb0 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00961bc0 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00961bd0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00961be0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00961bf0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00961c00 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00961c10 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00961c20 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00961c30 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00961c40 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00961c50 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00961c60 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00961c70 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00961c80 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00961c90 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00961ca0 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00961cb0 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00961cc0 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00961cd0 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00961ce0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00961cf0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00961d00 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00961d10 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00961d20 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00961d30 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00961d40 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00961d50 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00961d60 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00961d70 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00961d80 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00961d90 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00961da0 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00961db0 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00961dc0 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00961dd0 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00961de0 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00961df0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00961e00 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00961e10 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00961e20 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00961e30 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00961e40 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00961e50 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00961e60 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00961e70 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00961e80 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00961e90 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00961ea0 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00961eb0 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00961ec0 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00961ed0 20202020 76656334 20706976 6f74203d vec4 pivot = │ │ │ │ + 0x00961ee0 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ + 0x00961ef0 2e78797a 2c20312e 3029202a 20755f6d .xyz, 1.0) * u_m │ │ │ │ + 0x00961f00 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x00961f10 65633420 6f666673 6574203d 20766563 ec4 offset = vec │ │ │ │ + 0x00961f20 3428615f 6e6f726d 616c2e78 79202b20 4(a_normal.xy + │ │ │ │ + 0x00961f30 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00961f40 2e7a772c 20302e30 2c20302e 3029202a .zw, 0.0, 0.0) * │ │ │ │ + 0x00961f50 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00961f60 20202020 676c5f50 6f736974 696f6e20 gl_Position │ │ │ │ + 0x00961f70 3d206170 706c7942 696c6c62 6f617264 = applyBillboard │ │ │ │ + 0x00961f80 5069766f 74547261 6e73666f 726d2870 PivotTransform(p │ │ │ │ + 0x00961f90 69766f74 202a2075 5f70726f 6a656374 ivot * u_project │ │ │ │ + 0x00961fa0 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ + 0x00961fb0 73666f72 6d2c2030 2e302c20 6f666673 sform, 0.0, offs │ │ │ │ + 0x00961fc0 65742e78 79293b20 0a202023 69666465 et.xy); . #ifde │ │ │ │ + 0x00961fd0 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x00961fe0 2020765f 636f6c6f 72203d20 74657874 v_color = text │ │ │ │ + 0x00961ff0 75726528 755f636f 6c6f7254 65782c20 ure(u_colorTex, │ │ │ │ + 0x00962000 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00962010 2e787929 3b200a20 2023656c 7365200a .xy); . #else . │ │ │ │ + 0x00962020 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ + 0x00962030 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ + 0x00962040 78436f6f 7264732e 78793b20 0a202023 xCoords.xy; . # │ │ │ │ + 0x00962050 656e6469 66200a20 20202076 5f6e6f72 endif . v_nor │ │ │ │ + 0x00962060 6d616c20 3d20615f 6e6f726d 616c3b20 mal = a_normal; │ │ │ │ + 0x00962070 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ + 0x00962080 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00962090 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009620a0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x009620b0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009620c0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x009620d0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x009620e0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x009620f0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00962100 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00962110 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00962120 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00962130 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00962140 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00962150 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00962160 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00962170 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00962180 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00962190 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009621a0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x009621b0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x009621c0 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ + 0x009621d0 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ + 0x009621e0 6e207665 63322061 5f6f7574 6c696e65 n vec2 a_outline │ │ │ │ + 0x009621f0 436f6c6f 72546578 436f6f72 643b200a ColorTexCoord; . │ │ │ │ + 0x00962200 2020696e 20766563 3220615f 6d61736b in vec2 a_mask │ │ │ │ + 0x00962210 54657843 6f6f7264 3b200a20 20696e20 TexCoord; . in │ │ │ │ + 0x00962220 76656334 20615f70 6f736974 696f6e3b vec4 a_position; │ │ │ │ + 0x00962230 200a2020 696e2076 65633220 615f6e6f . in vec2 a_no │ │ │ │ + 0x00962240 726d616c 3b200a20 20236966 64656620 rmal; . #ifdef │ │ │ │ + 0x00962250 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ + 0x00962260 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ + 0x00962270 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ + 0x00962280 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x00962290 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ + 0x009622a0 656e6469 66200a20 206f7574 20766563 endif . out vec │ │ │ │ + 0x009622b0 3220765f 6d61736b 54657843 6f6f7264 2 v_maskTexCoord │ │ │ │ + 0x009622c0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x009622d0 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ + 0x009622e0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x009622f0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x00962300 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x00962310 69766f74 5472616e 73666f72 6d3b200a ivotTransform; . │ │ │ │ + 0x00962320 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ + 0x00962330 5f636f6e 74726173 7447616d 6d613b20 _contrastGamma; │ │ │ │ + 0x00962340 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x00962350 20755f6f 70616369 74793b20 0a202075 u_opacity; . u │ │ │ │ + 0x00962360 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ + 0x00962370 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ + 0x00962380 6d20666c 6f617420 755f696e 74657270 m float u_interp │ │ │ │ + 0x00962390 6f6c6174 696f6e3b 200a2020 756e6966 olation; . unif │ │ │ │ + 0x009623a0 6f726d20 666c6f61 7420755f 69734f75 orm float u_isOu │ │ │ │ + 0x009623b0 746c696e 65506173 733b200a 20202369 tlinePass; . #i │ │ │ │ + 0x009623c0 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x009623d0 0a202075 6e69666f 726d2073 616d706c . uniform sampl │ │ │ │ + 0x009623e0 65723244 20755f63 6f6c6f72 5465783b er2D u_colorTex; │ │ │ │ + 0x009623f0 200a2020 23656e64 6966200a 2020636f . #endif . co │ │ │ │ + 0x00962400 6e737420 666c6f61 74204261 73654465 nst float BaseDe │ │ │ │ + 0x00962410 70746853 68696674 203d202d 31302e30 pthShift = -10.0 │ │ │ │ + 0x00962420 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x00962430 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x00962440 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x00962450 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00962460 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00962470 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00962480 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00962490 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x009624a0 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x009624b0 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x009624c0 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x009624d0 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x009624e0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x009624f0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00962500 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x00962510 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x00962520 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x00962530 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x00962540 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x00962550 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x00962560 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00962570 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x00962580 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x00962590 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x009625a0 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x009625b0 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x009625c0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x009625d0 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x009625e0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x009625f0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x00962600 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00962610 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x00962620 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x00962630 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x00962640 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00962650 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00962660 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00962670 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00962680 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x00962690 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x009626a0 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x009626b0 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x009626c0 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x009626d0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x009626e0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x009626f0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x00962700 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x00962710 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x00962720 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x00962730 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x00962740 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x00962750 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00962760 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x00962770 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00962780 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x00962790 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x009627a0 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x009627b0 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x009627c0 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x009627d0 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x009627e0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x009627f0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x00962800 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x00962810 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x00962820 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x00962830 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00962840 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x00962850 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x00962860 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x00962870 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x00962880 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x00962890 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x009628a0 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x009628b0 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x009628c0 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x009628d0 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x009628e0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x009628f0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x00962900 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x00962910 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x00962920 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x00962930 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x00962940 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x00962950 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00962960 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x00962970 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x00962980 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x00962990 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x009629a0 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x009629b0 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x009629c0 0a202020 20666c6f 61742069 734f7574 . float isOut │ │ │ │ + 0x009629d0 6c696e65 203d2073 74657028 302e352c line = step(0.5, │ │ │ │ + 0x009629e0 20755f69 734f7574 6c696e65 50617373 u_isOutlinePass │ │ │ │ + 0x009629f0 293b200a 20202020 666c6f61 74206e6f ); . float no │ │ │ │ + 0x00962a00 744f7574 6c696e65 203d2031 2e30202d tOutline = 1.0 - │ │ │ │ + 0x00962a10 2069734f 75746c69 6e653b20 0a202020 isOutline; . │ │ │ │ + 0x00962a20 20666c6f 61742064 65707468 53686966 float depthShif │ │ │ │ + 0x00962a30 74203d20 42617365 44657074 68536869 t = BaseDepthShi │ │ │ │ + 0x00962a40 6674202a 2069734f 75746c69 6e653b20 ft * isOutline; │ │ │ │ + 0x00962a50 0a202020 20766563 3420706f 73203d20 . vec4 pos = │ │ │ │ + 0x00962a60 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ + 0x00962a70 2e78797a 2c203129 202b2076 65633428 .xyz, 1) + vec4( │ │ │ │ + 0x00962a80 302e302c 20302e30 2c206465 70746853 0.0, 0.0, depthS │ │ │ │ + 0x00962a90 68696674 2c20302e 30292920 2a20755f hift, 0.0)) * u_ │ │ │ │ + 0x00962aa0 6d6f6465 6c566965 773b200a 20202020 modelView; . │ │ │ │ + 0x00962ab0 76656334 20736869 66746564 506f7320 vec4 shiftedPos │ │ │ │ + 0x00962ac0 3d207665 63342861 5f6e6f72 6d616c2c = vec4(a_normal, │ │ │ │ + 0x00962ad0 20302e30 2c20302e 3029202b 20706f73 0.0, 0.0) + pos │ │ │ │ + 0x00962ae0 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x00962af0 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ + 0x00962b00 72616e73 666f726d 28736869 66746564 ransform(shifted │ │ │ │ + 0x00962b10 506f7320 2a20755f 70726f6a 65637469 Pos * u_projecti │ │ │ │ + 0x00962b20 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ + 0x00962b30 666f726d 2c20302e 30293b20 0a202020 form, 0.0); . │ │ │ │ + 0x00962b40 20766563 3220636f 6c6f7254 6578436f vec2 colorTexCo │ │ │ │ + 0x00962b50 6f726420 3d20615f 636f6c6f 72546578 ord = a_colorTex │ │ │ │ + 0x00962b60 436f6f72 64202a20 6e6f744f 75746c69 Coord * notOutli │ │ │ │ + 0x00962b70 6e65202b 20615f6f 75746c69 6e65436f ne + a_outlineCo │ │ │ │ + 0x00962b80 6c6f7254 6578436f 6f726420 2a206973 lorTexCoord * is │ │ │ │ + 0x00962b90 4f75746c 696e653b 200a2020 23696664 Outline; . #ifd │ │ │ │ + 0x00962ba0 65662045 4e41424c 455f5654 46200a20 ef ENABLE_VTF . │ │ │ │ + 0x00962bb0 20202076 5f636f6c 6f72203d 20746578 v_color = tex │ │ │ │ + 0x00962bc0 74757265 28755f63 6f6c6f72 5465782c ture(u_colorTex, │ │ │ │ + 0x00962bd0 20636f6c 6f725465 78436f6f 7264293b colorTexCoord); │ │ │ │ + 0x00962be0 200a2020 23656c73 65200a20 20202076 . #else . v │ │ │ │ + 0x00962bf0 5f636f6c 6f725465 78436f6f 7264203d _colorTexCoord = │ │ │ │ + 0x00962c00 20636f6c 6f725465 78436f6f 72643b20 colorTexCoord; │ │ │ │ + 0x00962c10 0a202023 656e6469 66200a20 20202076 . #endif . v │ │ │ │ + 0x00962c20 5f6d6173 6b546578 436f6f72 64203d20 _maskTexCoord = │ │ │ │ + 0x00962c30 615f6d61 736b5465 78436f6f 72643b20 a_maskTexCoord; │ │ │ │ + 0x00962c40 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ + 0x00962c50 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00962c60 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00962c70 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00962c80 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00962c90 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00962ca0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00962cb0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00962cc0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00962cd0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00962ce0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00962cf0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00962d00 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00962d10 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00962d20 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00962d30 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00962d40 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00962d50 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00962d60 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00962d70 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00962d80 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00962d90 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x00962da0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00962db0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x00962dc0 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00962dd0 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x00962de0 65633220 615f6d61 736b5465 78436f6f ec2 a_maskTexCoo │ │ │ │ + 0x00962df0 7264733b 200a2020 6f757420 76656332 rds; . out vec2 │ │ │ │ + 0x00962e00 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x00962e10 733b200a 20206f75 74207665 63322076 s; . out vec2 v │ │ │ │ + 0x00962e20 5f6d6173 6b546578 436f6f72 64733b20 _maskTexCoords; │ │ │ │ + 0x00962e30 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00962e40 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00962e50 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x00962e60 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x00962e70 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x00962e80 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x00962e90 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x00962ea0 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x00962eb0 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x00962ec0 5f6f7061 63697479 3b200a20 20756e69 _opacity; . uni │ │ │ │ + 0x00962ed0 666f726d 20666c6f 61742075 5f7a5363 form float u_zSc │ │ │ │ + 0x00962ee0 616c653b 200a2020 756e6966 6f726d20 ale; . uniform │ │ │ │ + 0x00962ef0 666c6f61 7420755f 696e7465 72706f6c float u_interpol │ │ │ │ + 0x00962f00 6174696f 6e3b200a 2020756e 69666f72 ation; . unifor │ │ │ │ + 0x00962f10 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x00962f20 696e6550 6173733b 200a2020 636f6e73 inePass; . cons │ │ │ │ + 0x00962f30 7420666c 6f617420 6b536861 7065436f t float kShapeCo │ │ │ │ + 0x00962f40 6f726453 63616c61 72203d20 31303030 ordScalar = 1000 │ │ │ │ + 0x00962f50 2e303b20 0a202076 65633420 6170706c .0; . vec4 appl │ │ │ │ + 0x00962f60 79506976 6f745472 616e7366 6f726d28 yPivotTransform( │ │ │ │ + 0x00962f70 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00962f80 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00962f90 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x00962fa0 5a29200a 20207b20 0a202020 20766563 Z) . { . vec │ │ │ │ + 0x00962fb0 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00962fc0 6f74203d 20706976 6f743b20 0a202020 ot = pivot; . │ │ │ │ + 0x00962fd0 20666c6f 61742077 203d2074 72616e73 float w = trans │ │ │ │ + 0x00962fe0 666f726d 65645069 766f742e 773b200a formedPivot.w; . │ │ │ │ + 0x00962ff0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00963000 69766f74 2e787977 203d2028 7069766f ivot.xyw = (pivo │ │ │ │ + 0x00963010 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00963020 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00963030 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00963040 5a2c2077 29292e78 79773b20 0a202020 Z, w)).xyw; . │ │ │ │ + 0x00963050 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00963060 742e7a20 2a3d2074 72616e73 666f726d t.z *= transform │ │ │ │ + 0x00963070 65645069 766f742e 77202f20 773b200a edPivot.w / w; . │ │ │ │ + 0x00963080 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x00963090 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x009630a0 5069766f 742e7920 3d202d74 72616e73 Pivot.y = -trans │ │ │ │ + 0x009630b0 666f726d 65645069 766f742e 793b200a formedPivot.y; . │ │ │ │ + 0x009630c0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x009630d0 69766f74 2e7a203d 20287472 616e7366 ivot.z = (transf │ │ │ │ + 0x009630e0 6f726d65 64506976 6f742e7a 20202b20 ormedPivot.z + │ │ │ │ + 0x009630f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00963100 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00963110 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00963120 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00963130 743b200a 20207d20 0a202076 65633420 t; . } . vec4 │ │ │ │ + 0x00963140 6170706c 7942696c 6c626f61 72645069 applyBillboardPi │ │ │ │ + 0x00963150 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00963160 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00963170 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00963180 6f617420 7069766f 74526561 6c5a2c20 oat pivotRealZ, │ │ │ │ + 0x00963190 76656332 206f6666 73657429 200a2020 vec2 offset) . │ │ │ │ + 0x009631a0 7b200a20 20202066 6c6f6174 206c6f67 { . float log │ │ │ │ + 0x009631b0 69635a20 3d207069 766f742e 7a202f20 icZ = pivot.z / │ │ │ │ + 0x009631c0 7069766f 742e773b 200a2020 20207665 pivot.w; . ve │ │ │ │ + 0x009631d0 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x009631e0 766f7420 3d207069 766f7454 72616e73 vot = pivotTrans │ │ │ │ + 0x009631f0 666f726d 202a2076 65633428 7069766f form * vec4(pivo │ │ │ │ + 0x00963200 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00963210 2c207069 766f742e 77293b20 0a202020 , pivot.w); . │ │ │ │ + 0x00963220 20766563 34207363 616c6520 3d207069 vec4 scale = pi │ │ │ │ + 0x00963230 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00963240 65633428 312e302c 202d312e 302c2030 ec4(1.0, -1.0, 0 │ │ │ │ + 0x00963250 2e302c20 312e3029 3b200a20 20202076 .0, 1.0); . v │ │ │ │ + 0x00963260 65633420 706f7369 74696f6e 203d2076 ec4 position = v │ │ │ │ + 0x00963270 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x00963280 69766f74 2e787920 2f207472 616e7366 ivot.xy / transf │ │ │ │ + 0x00963290 6f726d65 64506976 6f742e77 2c206c6f ormedPivot.w, lo │ │ │ │ + 0x009632a0 6769635a 2c20312e 3029202b 20766563 gicZ, 1.0) + vec │ │ │ │ + 0x009632b0 34286f66 66736574 202f2073 63616c65 4(offset / scale │ │ │ │ + 0x009632c0 2e77202a 20736361 6c652e78 2c20302e .w * scale.x, 0. │ │ │ │ + 0x009632d0 302c2030 2e30293b 200a2020 23696664 0, 0.0); . #ifd │ │ │ │ + 0x009632e0 65662056 554c4b41 4e200a20 20202070 ef VULKAN . p │ │ │ │ + 0x009632f0 6f736974 696f6e2e 79203d20 2d706f73 osition.y = -pos │ │ │ │ + 0x00963300 6974696f 6e2e793b 200a2020 2020706f ition.y; . po │ │ │ │ + 0x00963310 73697469 6f6e2e7a 203d2028 706f7369 sition.z = (posi │ │ │ │ + 0x00963320 74696f6e 2e7a2020 2b20706f 73697469 tion.z + positi │ │ │ │ + 0x00963330 6f6e2e77 29202f20 322e303b 200a2020 on.w) / 2.0; . │ │ │ │ + 0x00963340 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x00963350 726e2070 6f736974 696f6e3b 200a2020 rn position; . │ │ │ │ + 0x00963360 7d200a20 20766563 32206361 6c634c69 } . vec2 calcLi │ │ │ │ + 0x00963370 6e655472 616e7366 6f726d65 64417869 neTransformedAxi │ │ │ │ + 0x00963380 73506f73 28766563 32206f72 6967696e sPos(vec2 origin │ │ │ │ + 0x00963390 616c4178 6973506f 732c2076 65633220 alAxisPos, vec2 │ │ │ │ + 0x009633a0 73686966 74656450 6f732c20 6d617434 shiftedPos, mat4 │ │ │ │ + 0x009633b0 206d6f64 656c5669 65772c20 666c6f61 modelView, floa │ │ │ │ + 0x009633c0 74206861 6c665769 64746829 200a2020 t halfWidth) . │ │ │ │ + 0x009633d0 7b200a20 20202076 65633220 70203d20 { . vec2 p = │ │ │ │ + 0x009633e0 28766563 34287368 69667465 64506f73 (vec4(shiftedPos │ │ │ │ + 0x009633f0 2c20302e 302c2031 2e302920 2a206d6f , 0.0, 1.0) * mo │ │ │ │ + 0x00963400 64656c56 69657729 2e78793b 200a2020 delView).xy; . │ │ │ │ + 0x00963410 20207665 63322064 203d2070 202d206f vec2 d = p - o │ │ │ │ + 0x00963420 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x00963430 0a202020 20696620 28646f74 28642c20 . if (dot(d, │ │ │ │ + 0x00963440 64292021 3d20302e 3029200a 20202020 d) != 0.0) . │ │ │ │ + 0x00963450 20207265 7475726e 206f7269 67696e61 return origina │ │ │ │ + 0x00963460 6c417869 73506f73 202b206e 6f726d61 lAxisPos + norma │ │ │ │ + 0x00963470 6c697a65 28642920 2a206861 6c665769 lize(d) * halfWi │ │ │ │ + 0x00963480 6474683b 200a2020 2020656c 7365200a dth; . else . │ │ │ │ + 0x00963490 20202020 20207265 7475726e 206f7269 return ori │ │ │ │ + 0x009634a0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x009634b0 207d200a 2020766f 6964206d 61696e28 } . void main( │ │ │ │ + 0x009634c0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x009634d0 20706976 6f74203d 20766563 3428615f pivot = vec4(a_ │ │ │ │ + 0x009634e0 706f7369 74696f6e 2e78797a 2c20312e position.xyz, 1. │ │ │ │ + 0x009634f0 3029202a 20755f6d 6f64656c 56696577 0) * u_modelView │ │ │ │ + 0x00963500 3b200a20 20202076 65633420 6f666673 ; . vec4 offs │ │ │ │ + 0x00963510 6574203d 20766563 3428615f 6e6f726d et = vec4(a_norm │ │ │ │ + 0x00963520 616c2c20 302e302c 20302e30 29202a20 al, 0.0, 0.0) * │ │ │ │ + 0x00963530 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00963540 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x00963550 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00963560 69766f74 5472616e 73666f72 6d287069 ivotTransform(pi │ │ │ │ + 0x00963570 766f7420 2a20755f 70726f6a 65637469 vot * u_projecti │ │ │ │ + 0x00963580 6f6e2c20 755f7069 766f7454 72616e73 on, u_pivotTrans │ │ │ │ + 0x00963590 666f726d 2c200a20 20202020 20202020 form, . │ │ │ │ + 0x009635a0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009635b0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009635c0 20202020 2020615f 706f7369 74696f6e a_position │ │ │ │ + 0x009635d0 2e77202a 20755f7a 5363616c 652c206f .w * u_zScale, o │ │ │ │ + 0x009635e0 66667365 742e7879 293b200a 20202020 ffset.xy); . │ │ │ │ + 0x009635f0 765f636f 6c6f7254 6578436f 6f726473 v_colorTexCoords │ │ │ │ + 0x00963600 203d2061 5f636f6c 6f725465 78436f6f = a_colorTexCoo │ │ │ │ + 0x00963610 7264733b 200a2020 2020765f 6d61736b rds; . v_mask │ │ │ │ + 0x00963620 54657843 6f6f7264 73203d20 615f6d61 TexCoords = a_ma │ │ │ │ + 0x00963630 736b5465 78436f6f 7264733b 200a2020 skTexCoords; . │ │ │ │ + 0x00963640 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x00963650 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00963660 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00963670 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00963680 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00963690 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x009636a0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x009636b0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x009636c0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x009636d0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x009636e0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x009636f0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00963700 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00963710 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00963720 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00963730 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00963740 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00963750 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00963760 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00963770 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00963780 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00963790 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ + 0x009637a0 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ + 0x009637b0 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ + 0x009637c0 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x009637d0 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ + 0x009637e0 20765f6f 66667365 74303b20 0a20206f v_offset0; . o │ │ │ │ + 0x009637f0 75742076 65633420 765f6f66 66736574 ut vec4 v_offset │ │ │ │ + 0x00963800 313b200a 20206f75 74207665 63342076 1; . out vec4 v │ │ │ │ + 0x00963810 5f6f6666 73657432 3b200a20 20756e69 _offset2; . uni │ │ │ │ + 0x00963820 666f726d 20766563 3420755f 6672616d form vec4 u_fram │ │ │ │ + 0x00963830 65627566 6665724d 65747269 63733b20 ebufferMetrics; │ │ │ │ + 0x00963840 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x00963850 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x00963860 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x00963870 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x00963880 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00963890 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x009638a0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x009638b0 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x009638c0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x009638d0 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x009638e0 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x009638f0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00963900 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x00963910 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x00963920 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x00963930 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x00963940 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x00963950 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x00963960 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x00963970 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x00963980 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00963990 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x009639a0 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x009639b0 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x009639c0 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x009639d0 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x009639e0 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x009639f0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00963a00 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x00963a10 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x00963a20 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x00963a30 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x00963a40 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x00963a50 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x00963a60 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x00963a70 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00963a80 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00963a90 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00963aa0 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00963ab0 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00963ac0 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00963ad0 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00963ae0 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00963af0 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00963b00 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00963b10 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x00963b20 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x00963b30 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x00963b40 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x00963b50 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x00963b60 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x00963b70 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00963b80 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x00963b90 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x00963ba0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00963bb0 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00963bc0 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00963bd0 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00963be0 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x00963bf0 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00963c00 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x00963c10 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x00963c20 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x00963c30 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x00963c40 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x00963c50 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00963c60 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x00963c70 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x00963c80 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00963c90 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x00963ca0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00963cb0 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00963cc0 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00963cd0 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00963ce0 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x00963cf0 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x00963d00 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x00963d10 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x00963d20 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x00963d30 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x00963d40 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x00963d50 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x00963d60 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x00963d70 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x00963d80 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x00963d90 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x00963da0 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x00963db0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00963dc0 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00963dd0 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00963de0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x00963df0 72647320 3d20615f 74636f6f 72643b20 rds = a_tcoord; │ │ │ │ + 0x00963e00 0a202020 20765f6f 66667365 7430203d . v_offset0 = │ │ │ │ + 0x00963e10 20755f66 72616d65 62756666 65724d65 u_framebufferMe │ │ │ │ + 0x00963e20 74726963 732e7879 7879202a 20766563 trics.xyxy * vec │ │ │ │ + 0x00963e30 34282d31 2e302c20 302e302c 20302e30 4(-1.0, 0.0, 0.0 │ │ │ │ + 0x00963e40 2c202d31 2e302920 2b20615f 74636f6f , -1.0) + a_tcoo │ │ │ │ + 0x00963e50 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ + 0x00963e60 6f666673 65743120 3d20755f 6672616d offset1 = u_fram │ │ │ │ + 0x00963e70 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x00963e80 79787920 2a207665 63342820 312e302c yxy * vec4( 1.0, │ │ │ │ + 0x00963e90 20302e30 2c20302e 302c2020 312e3029 0.0, 0.0, 1.0) │ │ │ │ + 0x00963ea0 202b2061 5f74636f 6f72642e 78797879 + a_tcoord.xyxy │ │ │ │ + 0x00963eb0 3b200a20 20202076 5f6f6666 73657432 ; . v_offset2 │ │ │ │ + 0x00963ec0 203d2075 5f667261 6d656275 66666572 = u_framebuffer │ │ │ │ + 0x00963ed0 4d657472 6963732e 78797879 202a2076 Metrics.xyxy * v │ │ │ │ + 0x00963ee0 65633428 2d322e30 2c20302e 302c2030 ec4(-2.0, 0.0, 0 │ │ │ │ + 0x00963ef0 2e302c20 2d322e30 29202b20 615f7463 .0, -2.0) + a_tc │ │ │ │ + 0x00963f00 6f6f7264 2e787978 793b200a 20202020 oord.xyxy; . │ │ │ │ + 0x00963f10 676c5f50 6f736974 696f6e20 3d207665 gl_Position = ve │ │ │ │ + 0x00963f20 63342861 5f706f73 2c20302e 302c2031 c4(a_pos, 0.0, 1 │ │ │ │ + 0x00963f30 2e30293b 200a2020 7d200a00 00000000 .0); . } ...... │ │ │ │ + 0x00963f40 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00963f50 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00963f60 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00963f70 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00963f80 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00963f90 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00963fa0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00963fb0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00963fc0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00963fd0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00963fe0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00963ff0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00964000 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00964010 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00964020 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00964030 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00964040 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00964050 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00964060 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00964070 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00964080 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00964090 63322061 5f706f73 6974696f 6e3b200a c2 a_position; . │ │ │ │ + 0x009640a0 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x009640b0 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x009640c0 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x009640d0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x009640e0 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x009640f0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00964100 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00964110 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00964120 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00964130 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ + 0x00964140 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ + 0x00964150 69666f72 6d207665 63322075 5f706f73 iform vec2 u_pos │ │ │ │ + 0x00964160 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ + 0x00964170 6d20666c 6f617420 755f6973 4f75746c m float u_isOutl │ │ │ │ + 0x00964180 696e6550 6173733b 200a2020 756e6966 inePass; . unif │ │ │ │ + 0x00964190 6f726d20 666c6f61 7420755f 6f706163 orm float u_opac │ │ │ │ + 0x009641a0 6974793b 200a2020 756e6966 6f726d20 ity; . uniform │ │ │ │ + 0x009641b0 666c6f61 7420755f 6c656e67 74683b20 float u_length; │ │ │ │ + 0x009641c0 0a202063 6f6e7374 20666c6f 6174206b . const float k │ │ │ │ + 0x009641d0 53686170 65436f6f 72645363 616c6172 ShapeCoordScalar │ │ │ │ + 0x009641e0 203d2031 3030302e 303b200a 20207665 = 1000.0; . ve │ │ │ │ + 0x009641f0 63342061 70706c79 5069766f 74547261 c4 applyPivotTra │ │ │ │ + 0x00964200 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00964210 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00964220 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00964230 766f7452 65616c5a 29200a20 207b200a votRealZ) . { . │ │ │ │ + 0x00964240 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00964250 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00964260 743b200a 20202020 666c6f61 74207720 t; . float w │ │ │ │ + 0x00964270 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00964280 6f742e77 3b200a20 20202074 72616e73 ot.w; . trans │ │ │ │ + 0x00964290 666f726d 65645069 766f742e 78797720 formedPivot.xyw │ │ │ │ + 0x009642a0 3d202870 69766f74 5472616e 73666f72 = (pivotTransfor │ │ │ │ + 0x009642b0 6d202a20 76656334 28747261 6e73666f m * vec4(transfo │ │ │ │ + 0x009642c0 726d6564 5069766f 742e7879 2c207069 rmedPivot.xy, pi │ │ │ │ + 0x009642d0 766f7452 65616c5a 2c207729 292e7879 votRealZ, w)).xy │ │ │ │ + 0x009642e0 773b200a 20202020 7472616e 73666f72 w; . transfor │ │ │ │ + 0x009642f0 6d656450 69766f74 2e7a202a 3d207472 medPivot.z *= tr │ │ │ │ + 0x00964300 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00964310 202f2077 3b200a20 20236966 64656620 / w; . #ifdef │ │ │ │ + 0x00964320 56554c4b 414e200a 20202020 7472616e VULKAN . tran │ │ │ │ + 0x00964330 73666f72 6d656450 69766f74 2e79203d sformedPivot.y = │ │ │ │ + 0x00964340 202d7472 616e7366 6f726d65 64506976 -transformedPiv │ │ │ │ + 0x00964350 6f742e79 3b200a20 20202074 72616e73 ot.y; . trans │ │ │ │ + 0x00964360 666f726d 65645069 766f742e 7a203d20 formedPivot.z = │ │ │ │ + 0x00964370 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00964380 742e7a20 202b2074 72616e73 666f726d t.z + transform │ │ │ │ + 0x00964390 65645069 766f742e 7729202f 20322e30 edPivot.w) / 2.0 │ │ │ │ + 0x009643a0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x009643b0 20726574 75726e20 7472616e 73666f72 return transfor │ │ │ │ + 0x009643c0 6d656450 69766f74 3b200a20 207d200a medPivot; . } . │ │ │ │ + 0x009643d0 20207665 63342061 70706c79 42696c6c vec4 applyBill │ │ │ │ + 0x009643e0 626f6172 64506976 6f745472 616e7366 boardPivotTransf │ │ │ │ + 0x009643f0 6f726d28 76656334 20706976 6f742c20 orm(vec4 pivot, │ │ │ │ + 0x00964400 6d617434 20706976 6f745472 616e7366 mat4 pivotTransf │ │ │ │ + 0x00964410 6f726d2c 20666c6f 61742070 69766f74 orm, float pivot │ │ │ │ + 0x00964420 5265616c 5a2c2076 65633220 6f666673 RealZ, vec2 offs │ │ │ │ + 0x00964430 65742920 0a20207b 200a2020 2020666c et) . { . fl │ │ │ │ + 0x00964440 6f617420 6c6f6769 635a203d 20706976 oat logicZ = piv │ │ │ │ + 0x00964450 6f742e7a 202f2070 69766f74 2e773b20 ot.z / pivot.w; │ │ │ │ + 0x00964460 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00964470 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00964480 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00964490 63342870 69766f74 2e78792c 20706976 c4(pivot.xy, piv │ │ │ │ + 0x009644a0 6f745265 616c5a2c 20706976 6f742e77 otRealZ, pivot.w │ │ │ │ + 0x009644b0 293b200a 20202020 76656334 20736361 ); . vec4 sca │ │ │ │ + 0x009644c0 6c65203d 20706976 6f745472 616e7366 le = pivotTransf │ │ │ │ + 0x009644d0 6f726d20 2a207665 63342831 2e302c20 orm * vec4(1.0, │ │ │ │ + 0x009644e0 2d312e30 2c20302e 302c2031 2e30293b -1.0, 0.0, 1.0); │ │ │ │ + 0x009644f0 200a2020 20207665 63342070 6f736974 . vec4 posit │ │ │ │ + 0x00964500 696f6e20 3d207665 63342874 72616e73 ion = vec4(trans │ │ │ │ + 0x00964510 666f726d 65645069 766f742e 7879202f formedPivot.xy / │ │ │ │ + 0x00964520 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00964530 742e772c 206c6f67 69635a2c 20312e30 t.w, logicZ, 1.0 │ │ │ │ + 0x00964540 29202b20 76656334 286f6666 73657420 ) + vec4(offset │ │ │ │ + 0x00964550 2f207363 616c652e 77202a20 7363616c / scale.w * scal │ │ │ │ + 0x00964560 652e782c 20302e30 2c20302e 30293b20 e.x, 0.0, 0.0); │ │ │ │ + 0x00964570 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00964580 200a2020 2020706f 73697469 6f6e2e79 . position.y │ │ │ │ + 0x00964590 203d202d 706f7369 74696f6e 2e793b20 = -position.y; │ │ │ │ + 0x009645a0 0a202020 20706f73 6974696f 6e2e7a20 . position.z │ │ │ │ + 0x009645b0 3d202870 6f736974 696f6e2e 7a20202b = (position.z + │ │ │ │ + 0x009645c0 20706f73 6974696f 6e2e7729 202f2032 position.w) / 2 │ │ │ │ + 0x009645d0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x009645e0 20202072 65747572 6e20706f 73697469 return positi │ │ │ │ + 0x009645f0 6f6e3b20 0a20207d 200a2020 76656332 on; . } . vec2 │ │ │ │ + 0x00964600 2063616c 634c696e 65547261 6e73666f calcLineTransfo │ │ │ │ + 0x00964610 726d6564 41786973 506f7328 76656332 rmedAxisPos(vec2 │ │ │ │ + 0x00964620 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00964630 2c207665 63322073 68696674 6564506f , vec2 shiftedPo │ │ │ │ + 0x00964640 732c206d 61743420 6d6f6465 6c566965 s, mat4 modelVie │ │ │ │ + 0x00964650 772c2066 6c6f6174 2068616c 66576964 w, float halfWid │ │ │ │ + 0x00964660 74682920 0a20207b 200a2020 20207665 th) . { . ve │ │ │ │ + 0x00964670 63322070 203d2028 76656334 28736869 c2 p = (vec4(shi │ │ │ │ + 0x00964680 66746564 506f732c 20302e30 2c20312e ftedPos, 0.0, 1. │ │ │ │ + 0x00964690 3029202a 206d6f64 656c5669 6577292e 0) * modelView). │ │ │ │ + 0x009646a0 78793b20 0a202020 20766563 32206420 xy; . vec2 d │ │ │ │ + 0x009646b0 3d207020 2d206f72 6967696e 616c4178 = p - originalAx │ │ │ │ + 0x009646c0 6973506f 733b200a 20202020 69662028 isPos; . if ( │ │ │ │ + 0x009646d0 646f7428 642c2064 2920213d 20302e30 dot(d, d) != 0.0 │ │ │ │ + 0x009646e0 29200a20 20202020 20726574 75726e20 ) . return │ │ │ │ + 0x009646f0 6f726967 696e616c 41786973 506f7320 originalAxisPos │ │ │ │ + 0x00964700 2b206e6f 726d616c 697a6528 6429202a + normalize(d) * │ │ │ │ + 0x00964710 2068616c 66576964 74683b20 0a202020 halfWidth; . │ │ │ │ + 0x00964720 20656c73 65200a20 20202020 20726574 else . ret │ │ │ │ + 0x00964730 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x00964740 506f733b 200a2020 7d200a20 20766f69 Pos; . } . voi │ │ │ │ + 0x00964750 64206d61 696e2829 200a2020 7b200a20 d main() . { . │ │ │ │ + 0x00964760 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x00964770 20766563 3428755f 706f7369 74696f6e vec4(u_position │ │ │ │ + 0x00964780 202b2061 5f706f73 6974696f 6e202b20 + a_position + │ │ │ │ + 0x00964790 755f6c65 6e677468 202a2061 5f6e6f72 u_length * a_nor │ │ │ │ + 0x009647a0 6d616c2c 20302c20 3129202a 20755f70 mal, 0, 1) * u_p │ │ │ │ + 0x009647b0 726f6a65 6374696f 6e3b200a 20202369 rojection; . #i │ │ │ │ + 0x009647c0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x009647d0 20676c5f 506f7369 74696f6e 2e79203d gl_Position.y = │ │ │ │ + 0x009647e0 202d676c 5f506f73 6974696f 6e2e793b -gl_Position.y; │ │ │ │ + 0x009647f0 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x00964800 6e2e7a20 3d202867 6c5f506f 73697469 n.z = (gl_Positi │ │ │ │ + 0x00964810 6f6e2e7a 20202b20 676c5f50 6f736974 on.z + gl_Posit │ │ │ │ + 0x00964820 696f6e2e 7729202a 20302e35 3b200a20 ion.w) * 0.5; . │ │ │ │ + 0x00964830 2023656e 64696620 0a202020 20765f63 #endif . v_c │ │ │ │ + 0x00964840 6f6c6f72 54657843 6f6f7264 73203d20 olorTexCoords = │ │ │ │ + 0x00964850 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x00964860 3b200a20 207d200a 00000000 00000000 ; . } ......... │ │ │ │ + 0x00964870 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00964880 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00964890 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x009648a0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009648b0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009648c0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x009648d0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009648e0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009648f0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00964900 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00964910 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00964920 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00964930 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00964940 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00964950 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00964960 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00964970 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00964980 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00964990 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009649a0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009649b0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009649c0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x009649d0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x009649e0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x009649f0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x00964a00 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ + 0x00964a10 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ + 0x00964a20 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ + 0x00964a30 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ + 0x00964a40 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00964a50 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00964a60 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00964a70 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ + 0x00964a80 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x00964a90 755f7061 72616d73 3b200a20 20756e69 u_params; . uni │ │ │ │ + 0x00964aa0 666f726d 20666c6f 61742075 5f6c696e form float u_lin │ │ │ │ + 0x00964ab0 6548616c 66576964 74683b20 0a202075 eHalfWidth; . u │ │ │ │ + 0x00964ac0 6e69666f 726d2066 6c6f6174 20755f6d niform float u_m │ │ │ │ + 0x00964ad0 61785261 64697573 3b200a20 20636f6e axRadius; . con │ │ │ │ + 0x00964ae0 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x00964af0 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x00964b00 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x00964b10 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00964b20 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x00964b30 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00964b40 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00964b50 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x00964b60 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00964b70 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00964b80 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00964b90 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00964ba0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00964bb0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00964bc0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00964bd0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00964be0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00964bf0 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x00964c00 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00964c10 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x00964c20 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x00964c30 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00964c40 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00964c50 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x00964c60 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00964c70 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00964c80 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x00964c90 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x00964ca0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00964cb0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x00964cc0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00964cd0 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x00964ce0 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x00964cf0 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00964d00 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00964d10 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00964d20 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00964d30 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x00964d40 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x00964d50 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x00964d60 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00964d70 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x00964d80 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x00964d90 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x00964da0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x00964db0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x00964dc0 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x00964dd0 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x00964de0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00964df0 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x00964e00 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00964e10 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x00964e20 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00964e30 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x00964e40 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x00964e50 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x00964e60 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00964e70 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x00964e80 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x00964e90 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00964ea0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x00964eb0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x00964ec0 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x00964ed0 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x00964ee0 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x00964ef0 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00964f00 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x00964f10 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x00964f20 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00964f30 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x00964f40 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x00964f50 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x00964f60 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x00964f70 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x00964f80 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x00964f90 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x00964fa0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x00964fb0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x00964fc0 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x00964fd0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00964fe0 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x00964ff0 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x00965000 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00965010 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x00965020 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x00965030 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x00965040 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00965050 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00965060 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x00965070 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x00965080 32206e6f 726d616c 203d2061 5f6e6f72 2 normal = a_nor │ │ │ │ + 0x00965090 6d616c2e 78793b20 0a202020 20766563 mal.xy; . vec │ │ │ │ + 0x009650a0 32207472 616e7366 6f726d65 64417869 2 transformedAxi │ │ │ │ + 0x009650b0 73506f73 203d2028 76656334 28615f70 sPos = (vec4(a_p │ │ │ │ + 0x009650c0 6f736974 696f6e2e 78792c20 302e302c osition.xy, 0.0, │ │ │ │ + 0x009650d0 20312e30 29202a20 755f6d6f 64656c56 1.0) * u_modelV │ │ │ │ + 0x009650e0 69657729 2e78793b 200a2020 20206966 iew).xy; . if │ │ │ │ + 0x009650f0 2028646f 74286e6f 726d616c 2c206e6f (dot(normal, no │ │ │ │ + 0x00965100 726d616c 2920213d 20302e30 29200a20 rmal) != 0.0) . │ │ │ │ + 0x00965110 2020207b 200a2020 20202020 76656332 { . vec2 │ │ │ │ + 0x00965120 206e6f72 6d203d20 6e6f726d 616c202a norm = normal * │ │ │ │ + 0x00965130 20755f6c 696e6548 616c6657 69647468 u_lineHalfWidth │ │ │ │ + 0x00965140 3b200a20 20202020 20747261 6e73666f ; . transfo │ │ │ │ + 0x00965150 726d6564 41786973 506f7320 3d206361 rmedAxisPos = ca │ │ │ │ + 0x00965160 6c634c69 6e655472 616e7366 6f726d65 lcLineTransforme │ │ │ │ + 0x00965170 64417869 73506f73 28747261 6e73666f dAxisPos(transfo │ │ │ │ + 0x00965180 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ + 0x00965190 6f736974 696f6e2e 7879202b 206e6f72 osition.xy + nor │ │ │ │ + 0x009651a0 6d2c200a 20202020 20202020 20202020 m, . │ │ │ │ + 0x009651b0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009651c0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009651d0 20202020 20202020 2020755f 6d6f6465 u_mode │ │ │ │ + 0x009651e0 6c566965 772c206c 656e6774 68286e6f lView, length(no │ │ │ │ + 0x009651f0 726d2929 3b200a20 2020207d 200a2020 rm)); . } . │ │ │ │ + 0x00965200 20207472 616e7366 6f726d65 64417869 transformedAxi │ │ │ │ + 0x00965210 73506f73 202b3d20 615f6e6f 726d616c sPos += a_normal │ │ │ │ + 0x00965220 2e7a7720 2a20755f 6c696e65 48616c66 .zw * u_lineHalf │ │ │ │ + 0x00965230 57696474 683b200a 20202020 76656334 Width; . vec4 │ │ │ │ + 0x00965240 20706f73 203d2076 65633428 7472616e pos = vec4(tran │ │ │ │ + 0x00965250 73666f72 6d656441 78697350 6f732c20 sformedAxisPos, │ │ │ │ + 0x00965260 615f706f 73697469 6f6e2e7a 2c20312e a_position.z, 1. │ │ │ │ + 0x00965270 3029202a 20755f70 726f6a65 6374696f 0) * u_projectio │ │ │ │ + 0x00965280 6e3b200a 20202020 676c5f50 6f736974 n; . gl_Posit │ │ │ │ + 0x00965290 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x009652a0 5472616e 73666f72 6d28706f 732c2075 Transform(pos, u │ │ │ │ + 0x009652b0 5f706976 6f745472 616e7366 6f726d2c _pivotTransform, │ │ │ │ + 0x009652c0 20302e30 293b200a 20202020 765f636f 0.0); . v_co │ │ │ │ + 0x009652d0 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ + 0x009652e0 20202020 765f7261 64697573 203d2076 v_radius = v │ │ │ │ + 0x009652f0 65633328 615f6e6f 726d616c 2e7a772c ec3(a_normal.zw, │ │ │ │ + 0x00965300 20755f6d 61785261 64697573 29202a20 u_maxRadius) * │ │ │ │ + 0x00965310 755f6c69 6e654861 6c665769 6474683b u_lineHalfWidth; │ │ │ │ + 0x00965320 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x00965330 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00965340 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00965350 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00965360 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00965370 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00965380 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00965390 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x009653a0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x009653b0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x009653c0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x009653d0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009653e0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x009653f0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00965400 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00965410 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00965420 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00965430 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00965440 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00965450 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00965460 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00965470 0a202069 6e207665 63322061 5f6e6f72 . in vec2 a_nor │ │ │ │ + 0x00965480 6d616c3b 200a2020 696e2076 65633220 mal; . in vec2 │ │ │ │ + 0x00965490 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x009654a0 3b200a20 206f7574 20766563 3220765f ; . out vec2 v_ │ │ │ │ + 0x009654b0 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ + 0x009654c0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x009654d0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x009654e0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x009654f0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x00965500 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x00965510 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x00965520 756e6966 6f726d20 76656334 20755f70 uniform vec4 u_p │ │ │ │ + 0x00965530 6f736974 696f6e3b 200a2020 756e6966 osition; . unif │ │ │ │ + 0x00965540 6f726d20 76656332 20755f6c 696e6550 orm vec2 u_lineP │ │ │ │ + 0x00965550 6172616d 733b200a 2020756e 69666f72 arams; . unifor │ │ │ │ + 0x00965560 6d20666c 6f617420 755f6163 63757261 m float u_accura │ │ │ │ + 0x00965570 63793b20 0a202075 6e69666f 726d2066 cy; . uniform f │ │ │ │ + 0x00965580 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ + 0x00965590 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x009655a0 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ + 0x009655b0 69666f72 6d20666c 6f617420 755f617a iform float u_az │ │ │ │ + 0x009655c0 696d7574 3b200a20 20636f6e 73742066 imut; . const f │ │ │ │ + 0x009655d0 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x009655e0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x009655f0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x00965600 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00965610 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00965620 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00965630 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x00965640 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x00965650 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x00965660 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x00965670 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x00965680 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x00965690 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009656a0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x009656b0 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x009656c0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x009656d0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x009656e0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x009656f0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00965700 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x00965710 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x00965720 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00965730 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00965740 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x00965750 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x00965760 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00965770 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x00965780 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x00965790 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x009657a0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x009657b0 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x009657c0 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x009657d0 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x009657e0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x009657f0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00965800 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00965810 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00965820 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x00965830 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x00965840 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x00965850 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x00965860 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x00965870 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00965880 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x00965890 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x009658a0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x009658b0 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x009658c0 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x009658d0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x009658e0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x009658f0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x00965900 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x00965910 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00965920 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x00965930 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x00965940 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x00965950 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x00965960 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x00965970 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x00965980 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x00965990 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x009659a0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x009659b0 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x009659c0 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x009659d0 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x009659e0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x009659f0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x00965a00 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x00965a10 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x00965a20 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x00965a30 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x00965a40 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x00965a50 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x00965a60 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x00965a70 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x00965a80 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x00965a90 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x00965aa0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x00965ab0 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x00965ac0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00965ad0 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x00965ae0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x00965af0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00965b00 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x00965b10 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x00965b20 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x00965b30 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00965b40 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x00965b50 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x00965b60 20207b20 0a202020 20666c6f 61742073 { . float s │ │ │ │ + 0x00965b70 696e5620 3d207369 6e28755f 617a696d inV = sin(u_azim │ │ │ │ + 0x00965b80 7574293b 200a2020 2020666c 6f617420 ut); . float │ │ │ │ + 0x00965b90 636f7356 203d2063 6f732875 5f617a69 cosV = cos(u_azi │ │ │ │ + 0x00965ba0 6d757429 3b200a20 2020206d 61743420 mut); . mat4 │ │ │ │ + 0x00965bb0 726f7461 74696f6e 3b200a20 20202072 rotation; . r │ │ │ │ + 0x00965bc0 6f746174 696f6e5b 305d203d 20766563 otation[0] = vec │ │ │ │ + 0x00965bd0 3428636f 73562c20 73696e56 2c20302e 4(cosV, sinV, 0. │ │ │ │ + 0x00965be0 302c2030 2e30293b 200a2020 2020726f 0, 0.0); . ro │ │ │ │ + 0x00965bf0 74617469 6f6e5b31 5d203d20 76656334 tation[1] = vec4 │ │ │ │ + 0x00965c00 282d7369 6e562c20 636f7356 2c20302e (-sinV, cosV, 0. │ │ │ │ + 0x00965c10 302c2030 2e30293b 200a2020 2020726f 0, 0.0); . ro │ │ │ │ + 0x00965c20 74617469 6f6e5b32 5d203d20 76656334 tation[2] = vec4 │ │ │ │ + 0x00965c30 28302e30 2c20302e 302c2031 2e302c20 (0.0, 0.0, 1.0, │ │ │ │ + 0x00965c40 302e3029 3b200a20 20202072 6f746174 0.0); . rotat │ │ │ │ + 0x00965c50 696f6e5b 335d203d 20766563 3428302e ion[3] = vec4(0. │ │ │ │ + 0x00965c60 302c2030 2e302c20 302e302c 20312e30 0, 0.0, 0.0, 1.0 │ │ │ │ + 0x00965c70 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00965c80 203d2076 65633428 755f706f 73697469 = vec4(u_positi │ │ │ │ + 0x00965c90 6f6e2e78 797a2c20 312e3029 202a2075 on.xyz, 1.0) * u │ │ │ │ + 0x00965ca0 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ + 0x00965cb0 20766563 34206e6f 726d616c 203d2076 vec4 normal = v │ │ │ │ + 0x00965cc0 65633428 615f6e6f 726d616c 2c20302c ec4(a_normal, 0, │ │ │ │ + 0x00965cd0 2030293b 200a2020 20207665 63342073 0); . vec4 s │ │ │ │ + 0x00965ce0 68696674 6564506f 73203d20 6e6f726d hiftedPos = norm │ │ │ │ + 0x00965cf0 616c202a 20726f74 6174696f 6e202b20 al * rotation + │ │ │ │ + 0x00965d00 706f733b 200a2020 2020676c 5f506f73 pos; . gl_Pos │ │ │ │ + 0x00965d10 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ + 0x00965d20 6f745472 616e7366 6f726d28 73686966 otTransform(shif │ │ │ │ + 0x00965d30 74656450 6f73202a 20755f70 726f6a65 tedPos * u_proje │ │ │ │ + 0x00965d40 6374696f 6e2c2075 5f706976 6f745472 ction, u_pivotTr │ │ │ │ + 0x00965d50 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ + 0x00965d60 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ + 0x00965d70 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ + 0x00965d80 78436f6f 7264733b 200a2020 7d200a00 xCoords; . } .. │ │ │ │ + 0x00965d90 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00965da0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00965db0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00965dc0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00965dd0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00965de0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00965df0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00965e00 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00965e10 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00965e20 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00965e30 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00965e40 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00965e50 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00965e60 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00965e70 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00965e80 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00965e90 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00965ea0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00965eb0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00965ec0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00965ed0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00965ee0 63332061 5f6e6f72 6d616c3b 200a2020 c3 a_normal; . │ │ │ │ + 0x00965ef0 696e2076 65633320 615f706f 73697469 in vec3 a_positi │ │ │ │ + 0x00965f00 6f6e3b20 0a202069 6e207665 63342061 on; . in vec4 a │ │ │ │ + 0x00965f10 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x00965f20 65633320 765f7261 64697573 3b200a20 ec3 v_radius; . │ │ │ │ + 0x00965f30 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ + 0x00965f40 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ + 0x00965f50 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ + 0x00965f60 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x00965f70 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00965f80 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x00965f90 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ + 0x00965fa0 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ + 0x00965fb0 755f636f 6e747261 73744761 6d6d613b u_contrastGamma; │ │ │ │ + 0x00965fc0 200a2020 756e6966 6f726d20 666c6f61 . uniform floa │ │ │ │ + 0x00965fd0 7420755f 6f706163 6974793b 200a2020 t u_opacity; . │ │ │ │ + 0x00965fe0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00965ff0 7a536361 6c653b20 0a202075 6e69666f zScale; . unifo │ │ │ │ + 0x00966000 726d2066 6c6f6174 20755f69 6e746572 rm float u_inter │ │ │ │ + 0x00966010 706f6c61 74696f6e 3b200a20 20756e69 polation; . uni │ │ │ │ + 0x00966020 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ + 0x00966030 75746c69 6e655061 73733b20 0a202063 utlinePass; . c │ │ │ │ + 0x00966040 6f6e7374 20666c6f 6174206b 53686170 onst float kShap │ │ │ │ + 0x00966050 65436f6f 72645363 616c6172 203d2031 eCoordScalar = 1 │ │ │ │ + 0x00966060 3030302e 303b200a 20207665 63342061 000.0; . vec4 a │ │ │ │ + 0x00966070 70706c79 5069766f 74547261 6e73666f pplyPivotTransfo │ │ │ │ + 0x00966080 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00966090 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x009660a0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x009660b0 65616c5a 29200a20 207b200a 20202020 ealZ) . { . │ │ │ │ + 0x009660c0 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x009660d0 5069766f 74203d20 7069766f 743b200a Pivot = pivot; . │ │ │ │ + 0x009660e0 20202020 666c6f61 74207720 3d207472 float w = tr │ │ │ │ + 0x009660f0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x00966100 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00966110 65645069 766f742e 78797720 3d202870 edPivot.xyw = (p │ │ │ │ + 0x00966120 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00966130 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00966140 5069766f 742e7879 2c207069 766f7452 Pivot.xy, pivotR │ │ │ │ + 0x00966150 65616c5a 2c207729 292e7879 773b200a ealZ, w)).xyw; . │ │ │ │ + 0x00966160 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x00966170 69766f74 2e7a202a 3d207472 616e7366 ivot.z *= transf │ │ │ │ + 0x00966180 6f726d65 64506976 6f742e77 202f2077 ormedPivot.w / w │ │ │ │ + 0x00966190 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x009661a0 414e200a 20202020 7472616e 73666f72 AN . transfor │ │ │ │ + 0x009661b0 6d656450 69766f74 2e79203d 202d7472 medPivot.y = -tr │ │ │ │ + 0x009661c0 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x009661d0 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x009661e0 65645069 766f742e 7a203d20 28747261 edPivot.z = (tra │ │ │ │ + 0x009661f0 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00966200 202b2074 72616e73 666f726d 65645069 + transformedPi │ │ │ │ + 0x00966210 766f742e 7729202f 20322e30 3b200a20 vot.w) / 2.0; . │ │ │ │ + 0x00966220 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00966230 75726e20 7472616e 73666f72 6d656450 urn transformedP │ │ │ │ + 0x00966240 69766f74 3b200a20 207d200a 20207665 ivot; . } . ve │ │ │ │ + 0x00966250 63342061 70706c79 42696c6c 626f6172 c4 applyBillboar │ │ │ │ + 0x00966260 64506976 6f745472 616e7366 6f726d28 dPivotTransform( │ │ │ │ + 0x00966270 76656334 20706976 6f742c20 6d617434 vec4 pivot, mat4 │ │ │ │ + 0x00966280 20706976 6f745472 616e7366 6f726d2c pivotTransform, │ │ │ │ + 0x00966290 20666c6f 61742070 69766f74 5265616c float pivotReal │ │ │ │ + 0x009662a0 5a2c2076 65633220 6f666673 65742920 Z, vec2 offset) │ │ │ │ + 0x009662b0 0a20207b 200a2020 2020666c 6f617420 . { . float │ │ │ │ + 0x009662c0 6c6f6769 635a203d 20706976 6f742e7a logicZ = pivot.z │ │ │ │ + 0x009662d0 202f2070 69766f74 2e773b20 0a202020 / pivot.w; . │ │ │ │ + 0x009662e0 20766563 34207472 616e7366 6f726d65 vec4 transforme │ │ │ │ + 0x009662f0 64506976 6f74203d 20706976 6f745472 dPivot = pivotTr │ │ │ │ + 0x00966300 616e7366 6f726d20 2a207665 63342870 ansform * vec4(p │ │ │ │ + 0x00966310 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x00966320 616c5a2c 20706976 6f742e77 293b200a alZ, pivot.w); . │ │ │ │ + 0x00966330 20202020 76656334 20736361 6c65203d vec4 scale = │ │ │ │ + 0x00966340 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00966350 2a207665 63342831 2e302c20 2d312e30 * vec4(1.0, -1.0 │ │ │ │ + 0x00966360 2c20302e 302c2031 2e30293b 200a2020 , 0.0, 1.0); . │ │ │ │ + 0x00966370 20207665 63342070 6f736974 696f6e20 vec4 position │ │ │ │ + 0x00966380 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x00966390 65645069 766f742e 7879202f 20747261 edPivot.xy / tra │ │ │ │ + 0x009663a0 6e73666f 726d6564 5069766f 742e772c nsformedPivot.w, │ │ │ │ + 0x009663b0 206c6f67 69635a2c 20312e30 29202b20 logicZ, 1.0) + │ │ │ │ + 0x009663c0 76656334 286f6666 73657420 2f207363 vec4(offset / sc │ │ │ │ + 0x009663d0 616c652e 77202a20 7363616c 652e782c ale.w * scale.x, │ │ │ │ + 0x009663e0 20302e30 2c20302e 30293b20 0a202023 0.0, 0.0); . # │ │ │ │ + 0x009663f0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00966400 2020706f 73697469 6f6e2e79 203d202d position.y = - │ │ │ │ + 0x00966410 706f7369 74696f6e 2e793b20 0a202020 position.y; . │ │ │ │ + 0x00966420 20706f73 6974696f 6e2e7a20 3d202870 position.z = (p │ │ │ │ + 0x00966430 6f736974 696f6e2e 7a20202b 20706f73 osition.z + pos │ │ │ │ + 0x00966440 6974696f 6e2e7729 202f2032 2e303b20 ition.w) / 2.0; │ │ │ │ + 0x00966450 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x00966460 65747572 6e20706f 73697469 6f6e3b20 eturn position; │ │ │ │ + 0x00966470 0a20207d 200a2020 76656332 2063616c . } . vec2 cal │ │ │ │ + 0x00966480 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x00966490 41786973 506f7328 76656332 206f7269 AxisPos(vec2 ori │ │ │ │ + 0x009664a0 67696e61 6c417869 73506f73 2c207665 ginalAxisPos, ve │ │ │ │ + 0x009664b0 63322073 68696674 6564506f 732c206d c2 shiftedPos, m │ │ │ │ + 0x009664c0 61743420 6d6f6465 6c566965 772c2066 at4 modelView, f │ │ │ │ + 0x009664d0 6c6f6174 2068616c 66576964 74682920 loat halfWidth) │ │ │ │ + 0x009664e0 0a20207b 200a2020 20207665 63322070 . { . vec2 p │ │ │ │ + 0x009664f0 203d2028 76656334 28736869 66746564 = (vec4(shifted │ │ │ │ + 0x00966500 506f732c 20302e30 2c20312e 3029202a Pos, 0.0, 1.0) * │ │ │ │ + 0x00966510 206d6f64 656c5669 6577292e 78793b20 modelView).xy; │ │ │ │ + 0x00966520 0a202020 20766563 32206420 3d207020 . vec2 d = p │ │ │ │ + 0x00966530 2d206f72 6967696e 616c4178 6973506f - originalAxisPo │ │ │ │ + 0x00966540 733b200a 20202020 69662028 646f7428 s; . if (dot( │ │ │ │ + 0x00966550 642c2064 2920213d 20302e30 29200a20 d, d) != 0.0) . │ │ │ │ + 0x00966560 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00966570 696e616c 41786973 506f7320 2b206e6f inalAxisPos + no │ │ │ │ + 0x00966580 726d616c 697a6528 6429202a 2068616c rmalize(d) * hal │ │ │ │ + 0x00966590 66576964 74683b20 0a202020 20656c73 fWidth; . els │ │ │ │ + 0x009665a0 65200a20 20202020 20726574 75726e20 e . return │ │ │ │ + 0x009665b0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x009665c0 200a2020 7d200a20 20766f69 64206d61 . } . void ma │ │ │ │ + 0x009665d0 696e2829 200a2020 7b200a20 20202076 in() . { . v │ │ │ │ + 0x009665e0 65633320 72616469 7573203d 20615f6e ec3 radius = a_n │ │ │ │ + 0x009665f0 6f726d61 6c202a20 615f706f 73697469 ormal * a_positi │ │ │ │ + 0x00966600 6f6e2e7a 3b200a20 20202076 65633420 on.z; . vec4 │ │ │ │ + 0x00966610 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ + 0x00966620 6974696f 6e2e7879 2c20302c 20312920 ition.xy, 0, 1) │ │ │ │ + 0x00966630 2a20755f 6d6f6465 6c566965 773b200a * u_modelView; . │ │ │ │ + 0x00966640 20202020 76656334 20736869 66746564 vec4 shifted │ │ │ │ + 0x00966650 506f7320 3d207665 63342872 61646975 Pos = vec4(radiu │ │ │ │ + 0x00966660 732e7879 2c20302c 20302920 2b20706f s.xy, 0, 0) + po │ │ │ │ + 0x00966670 733b200a 20202020 676c5f50 6f736974 s; . gl_Posit │ │ │ │ + 0x00966680 696f6e20 3d206170 706c7950 69766f74 ion = applyPivot │ │ │ │ + 0x00966690 5472616e 73666f72 6d287368 69667465 Transform(shifte │ │ │ │ + 0x009666a0 64506f73 202a2075 5f70726f 6a656374 dPos * u_project │ │ │ │ + 0x009666b0 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ + 0x009666c0 73666f72 6d2c2030 2e30293b 200a2020 sform, 0.0); . │ │ │ │ + 0x009666d0 2020765f 72616469 7573203d 20726164 v_radius = rad │ │ │ │ + 0x009666e0 6975733b 200a2020 2020765f 636f6c6f ius; . v_colo │ │ │ │ + 0x009666f0 72203d20 615f636f 6c6f723b 200a2020 r = a_color; . │ │ │ │ + 0x00966700 7d200a00 00000000 20202023 69666465 } ...... #ifde │ │ │ │ + 0x00966710 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00966720 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00966730 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00966740 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00966750 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00966760 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00966770 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00966780 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00966790 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x009667a0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x009667b0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009667c0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x009667d0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009667e0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009667f0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00966800 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00966810 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00966820 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00966830 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00966840 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00966850 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ + 0x00966860 3b200a20 20696e20 76656332 20615f74 ; . in vec2 a_t │ │ │ │ + 0x00966870 636f6f72 643b200a 20206f75 74207665 coord; . out ve │ │ │ │ + 0x00966880 63322076 5f636f6c 6f725465 78436f6f c2 v_colorTexCoo │ │ │ │ + 0x00966890 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ + 0x009668a0 20765f6f 66667365 743b200a 2020756e v_offset; . un │ │ │ │ + 0x009668b0 69666f72 6d207665 63342075 5f667261 iform vec4 u_fra │ │ │ │ + 0x009668c0 6d656275 66666572 4d657472 6963733b mebufferMetrics; │ │ │ │ + 0x009668d0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x009668e0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x009668f0 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00966900 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00966910 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00966920 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00966930 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00966940 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00966950 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00966960 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00966970 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00966980 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x00966990 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x009669a0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x009669b0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x009669c0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x009669d0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x009669e0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x009669f0 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00966a00 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00966a10 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00966a20 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00966a30 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00966a40 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00966a50 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00966a60 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00966a70 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00966a80 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00966a90 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00966aa0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00966ab0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00966ac0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00966ad0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00966ae0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00966af0 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00966b00 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00966b10 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00966b20 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00966b30 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00966b40 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00966b50 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00966b60 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00966b70 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00966b80 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00966b90 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00966ba0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00966bb0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00966bc0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00966bd0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00966be0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00966bf0 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00966c00 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00966c10 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00966c20 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00966c30 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00966c40 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00966c50 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00966c60 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00966c70 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00966c80 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00966c90 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00966ca0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00966cb0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00966cc0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00966cd0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00966ce0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00966cf0 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00966d00 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00966d10 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00966d20 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00966d30 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00966d40 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00966d50 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00966d60 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00966d70 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00966d80 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00966d90 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00966da0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00966db0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00966dc0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00966dd0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00966de0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00966df0 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00966e00 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00966e10 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00966e20 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00966e30 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00966e40 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00966e50 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00966e60 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00966e70 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ + 0x00966e80 6f726473 203d2061 5f74636f 6f72643b ords = a_tcoord; │ │ │ │ + 0x00966e90 200a2020 2020765f 6f666673 6574203d . v_offset = │ │ │ │ + 0x00966ea0 20755f66 72616d65 62756666 65724d65 u_framebufferMe │ │ │ │ + 0x00966eb0 74726963 732e7879 7879202a 20766563 trics.xyxy * vec │ │ │ │ + 0x00966ec0 3428312e 302c2030 2e302c20 302e302c 4(1.0, 0.0, 0.0, │ │ │ │ + 0x00966ed0 20312e30 29202b20 615f7463 6f6f7264 1.0) + a_tcoord │ │ │ │ + 0x00966ee0 2e787978 793b200a 20202020 676c5f50 .xyxy; . gl_P │ │ │ │ + 0x00966ef0 6f736974 696f6e20 3d207665 63342861 osition = vec4(a │ │ │ │ + 0x00966f00 5f706f73 2c20302e 302c2031 2e30293b _pos, 0.0, 1.0); │ │ │ │ + 0x00966f10 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x00966f20 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00966f30 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00966f40 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00966f50 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00966f60 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00966f70 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00966f80 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00966f90 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00966fa0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00966fb0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00966fc0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00966fd0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00966fe0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00966ff0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00967000 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00967010 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00967020 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00967030 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00967040 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00967050 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00967060 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ + 0x00967070 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ + 0x00967080 6e207665 63322061 5f6f7574 6c696e65 n vec2 a_outline │ │ │ │ + 0x00967090 436f6c6f 72546578 436f6f72 643b200a ColorTexCoord; . │ │ │ │ + 0x009670a0 2020696e 20766563 3220615f 6d61736b in vec2 a_mask │ │ │ │ + 0x009670b0 54657843 6f6f7264 3b200a20 20696e20 TexCoord; . in │ │ │ │ + 0x009670c0 76656334 20615f70 6f736974 696f6e3b vec4 a_position; │ │ │ │ + 0x009670d0 200a2020 696e2076 65633220 615f6e6f . in vec2 a_no │ │ │ │ + 0x009670e0 726d616c 3b200a20 20236966 64656620 rmal; . #ifdef │ │ │ │ + 0x009670f0 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ + 0x00967100 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ + 0x00967110 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ + 0x00967120 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x00967130 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ + 0x00967140 656e6469 66200a20 206f7574 20766563 endif . out vec │ │ │ │ + 0x00967150 3220765f 6d61736b 54657843 6f6f7264 2 v_maskTexCoord │ │ │ │ + 0x00967160 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00967170 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ + 0x00967180 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00967190 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x009671a0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x009671b0 69766f74 5472616e 73666f72 6d3b200a ivotTransform; . │ │ │ │ + 0x009671c0 2020756e 69666f72 6d207665 63322075 uniform vec2 u │ │ │ │ + 0x009671d0 5f636f6e 74726173 7447616d 6d613b20 _contrastGamma; │ │ │ │ + 0x009671e0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x009671f0 20755f6f 70616369 74793b20 0a202075 u_opacity; . u │ │ │ │ + 0x00967200 6e69666f 726d2066 6c6f6174 20755f7a niform float u_z │ │ │ │ + 0x00967210 5363616c 653b200a 2020756e 69666f72 Scale; . unifor │ │ │ │ + 0x00967220 6d20666c 6f617420 755f696e 74657270 m float u_interp │ │ │ │ + 0x00967230 6f6c6174 696f6e3b 200a2020 756e6966 olation; . unif │ │ │ │ + 0x00967240 6f726d20 666c6f61 7420755f 69734f75 orm float u_isOu │ │ │ │ + 0x00967250 746c696e 65506173 733b200a 2020756e tlinePass; . un │ │ │ │ + 0x00967260 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ + 0x00967270 755f636f 6c6f7254 65783b20 0a202063 u_colorTex; . c │ │ │ │ + 0x00967280 6f6e7374 20666c6f 6174206b 42617365 onst float kBase │ │ │ │ + 0x00967290 44657074 68536869 6674203d 202d3130 DepthShift = -10 │ │ │ │ + 0x009672a0 2e303b20 0a202063 6f6e7374 20666c6f .0; . const flo │ │ │ │ + 0x009672b0 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ + 0x009672c0 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ + 0x009672d0 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ + 0x009672e0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x009672f0 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00967300 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00967310 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ + 0x00967320 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ + 0x00967330 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00967340 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ + 0x00967350 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ + 0x00967360 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ + 0x00967370 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00967380 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ + 0x00967390 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ + 0x009673a0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x009673b0 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ + 0x009673c0 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ + 0x009673d0 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ + 0x009673e0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x009673f0 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ + 0x00967400 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00967410 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00967420 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ + 0x00967430 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ + 0x00967440 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00967450 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ + 0x00967460 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ + 0x00967470 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ + 0x00967480 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00967490 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ + 0x009674a0 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ + 0x009674b0 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ + 0x009674c0 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ + 0x009674d0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x009674e0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x009674f0 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00967500 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ + 0x00967510 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ + 0x00967520 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ + 0x00967530 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ + 0x00967540 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ + 0x00967550 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ + 0x00967560 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00967570 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ + 0x00967580 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ + 0x00967590 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ + 0x009675a0 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ + 0x009675b0 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ + 0x009675c0 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ + 0x009675d0 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ + 0x009675e0 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ + 0x009675f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00967600 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ + 0x00967610 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ + 0x00967620 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ + 0x00967630 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ + 0x00967640 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ + 0x00967650 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ + 0x00967660 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ + 0x00967670 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ + 0x00967680 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ + 0x00967690 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ + 0x009676a0 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ + 0x009676b0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x009676c0 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ + 0x009676d0 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ + 0x009676e0 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ + 0x009676f0 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x00967700 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ + 0x00967710 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ + 0x00967720 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ + 0x00967730 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ + 0x00967740 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ + 0x00967750 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ + 0x00967760 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ + 0x00967770 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ + 0x00967780 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ + 0x00967790 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ + 0x009677a0 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ + 0x009677b0 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ + 0x009677c0 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ + 0x009677d0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x009677e0 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ + 0x009677f0 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ + 0x00967800 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ + 0x00967810 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00967820 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ + 0x00967830 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ + 0x00967840 7b200a20 20202066 6c6f6174 2069734f { . float isO │ │ │ │ + 0x00967850 75746c69 6e65203d 20737465 7028302e utline = step(0. │ │ │ │ + 0x00967860 352c2075 5f69734f 75746c69 6e655061 5, u_isOutlinePa │ │ │ │ + 0x00967870 7373293b 200a2020 2020666c 6f617420 ss); . float │ │ │ │ + 0x00967880 64657074 68536869 6674203d 206b4261 depthShift = kBa │ │ │ │ + 0x00967890 73654465 70746853 68696674 202a2069 seDepthShift * i │ │ │ │ + 0x009678a0 734f7574 6c696e65 3b200a20 20202076 sOutline; . v │ │ │ │ + 0x009678b0 65633420 7069766f 74203d20 28766563 ec4 pivot = (vec │ │ │ │ + 0x009678c0 3428615f 706f7369 74696f6e 2e78797a 4(a_position.xyz │ │ │ │ + 0x009678d0 2c20312e 3029202b 20766563 3428302e , 1.0) + vec4(0. │ │ │ │ + 0x009678e0 302c2030 2e302c20 64657074 68536869 0, 0.0, depthShi │ │ │ │ + 0x009678f0 66742c20 302e3029 29202a20 755f6d6f ft, 0.0)) * u_mo │ │ │ │ + 0x00967900 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ + 0x00967910 6334206f 66667365 74203d20 76656334 c4 offset = vec4 │ │ │ │ + 0x00967920 28615f6e 6f726d61 6c2c2030 2e302c20 (a_normal, 0.0, │ │ │ │ + 0x00967930 302e3029 202a2075 5f70726f 6a656374 0.0) * u_project │ │ │ │ + 0x00967940 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ + 0x00967950 6974696f 6e203d20 6170706c 7942696c ition = applyBil │ │ │ │ + 0x00967960 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00967970 666f726d 28706976 6f74202a 20755f70 form(pivot * u_p │ │ │ │ + 0x00967980 726f6a65 6374696f 6e2c2075 5f706976 rojection, u_piv │ │ │ │ + 0x00967990 6f745472 616e7366 6f726d2c 200a2020 otTransform, . │ │ │ │ + 0x009679a0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009679b0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009679c0 20202020 20202020 20202020 20615f70 a_p │ │ │ │ + 0x009679d0 6f736974 696f6e2e 77202a20 755f7a53 osition.w * u_zS │ │ │ │ + 0x009679e0 63616c65 2c206f66 66736574 2e787929 cale, offset.xy) │ │ │ │ + 0x009679f0 3b200a20 20202076 65633220 636f6c6f ; . vec2 colo │ │ │ │ + 0x00967a00 72546578 436f6f72 64203d20 6d697828 rTexCoord = mix( │ │ │ │ + 0x00967a10 615f636f 6c6f7254 6578436f 6f72642c a_colorTexCoord, │ │ │ │ + 0x00967a20 20615f6f 75746c69 6e65436f 6c6f7254 a_outlineColorT │ │ │ │ + 0x00967a30 6578436f 6f72642c 2069734f 75746c69 exCoord, isOutli │ │ │ │ + 0x00967a40 6e65293b 200a2020 23696664 65662045 ne); . #ifdef E │ │ │ │ + 0x00967a50 4e41424c 455f5654 46200a20 20202076 NABLE_VTF . v │ │ │ │ + 0x00967a60 5f636f6c 6f72203d 20746578 74757265 _color = texture │ │ │ │ + 0x00967a70 28755f63 6f6c6f72 5465782c 20636f6c (u_colorTex, col │ │ │ │ + 0x00967a80 6f725465 78436f6f 7264293b 200a2020 orTexCoord); . │ │ │ │ + 0x00967a90 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ + 0x00967aa0 6f725465 78436f6f 7264203d 20636f6c orTexCoord = col │ │ │ │ + 0x00967ab0 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ + 0x00967ac0 656e6469 66200a20 20202076 5f6d6173 endif . v_mas │ │ │ │ + 0x00967ad0 6b546578 436f6f72 64203d20 615f6d61 kTexCoord = a_ma │ │ │ │ + 0x00967ae0 736b5465 78436f6f 72643b20 0a20207d skTexCoord; . } │ │ │ │ + 0x00967af0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x00967b00 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00967b10 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00967b20 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00967b30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00967b40 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00967b50 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00967b60 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00967b70 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00967b80 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00967b90 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00967ba0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00967bb0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00967bc0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00967bd0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00967be0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00967bf0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00967c00 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00967c10 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00967c20 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00967c30 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00967c40 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00967c50 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00967c60 3420615f 6e6f726d 616c3b20 0a202069 4 a_normal; . i │ │ │ │ + 0x00967c70 6e207665 63342061 5f636f6c 6f723b20 n vec4 a_color; │ │ │ │ + 0x00967c80 0a20206f 75742076 65633420 765f6f66 . out vec4 v_of │ │ │ │ + 0x00967c90 66736574 733b200a 20206f75 74207665 fsets; . out ve │ │ │ │ + 0x00967ca0 63342076 5f636f6c 6f723b20 0a202075 c4 v_color; . u │ │ │ │ + 0x00967cb0 6e69666f 726d206d 61743420 755f6d6f niform mat4 u_mo │ │ │ │ + 0x00967cc0 64656c56 6965773b 200a2020 756e6966 delView; . unif │ │ │ │ + 0x00967cd0 6f726d20 6d617434 20755f70 726f6a65 orm mat4 u_proje │ │ │ │ + 0x00967ce0 6374696f 6e3b200a 2020756e 69666f72 ction; . unifor │ │ │ │ + 0x00967cf0 6d206d61 74342075 5f706976 6f745472 m mat4 u_pivotTr │ │ │ │ + 0x00967d00 616e7366 6f726d3b 200a2020 756e6966 ansform; . unif │ │ │ │ + 0x00967d10 6f726d20 76656334 20755f70 6172616d orm vec4 u_param │ │ │ │ + 0x00967d20 733b200a 2020756e 69666f72 6d20666c s; . uniform fl │ │ │ │ + 0x00967d30 6f617420 755f6c69 6e654861 6c665769 oat u_lineHalfWi │ │ │ │ + 0x00967d40 6474683b 200a2020 756e6966 6f726d20 dth; . uniform │ │ │ │ + 0x00967d50 666c6f61 7420755f 6d617852 61646975 float u_maxRadiu │ │ │ │ + 0x00967d60 733b200a 2020636f 6e737420 666c6f61 s; . const floa │ │ │ │ + 0x00967d70 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00967d80 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00967d90 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x00967da0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00967db0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00967dc0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00967dd0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x00967de0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x00967df0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x00967e00 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x00967e10 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x00967e20 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x00967e30 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x00967e40 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x00967e50 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x00967e60 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x00967e70 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x00967e80 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x00967e90 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x00967ea0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00967eb0 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x00967ec0 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x00967ed0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00967ee0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x00967ef0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x00967f00 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00967f10 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x00967f20 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x00967f30 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x00967f40 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00967f50 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x00967f60 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x00967f70 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x00967f80 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00967f90 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x00967fa0 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x00967fb0 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x00967fc0 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x00967fd0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x00967fe0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x00967ff0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x00968000 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x00968010 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00968020 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x00968030 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x00968040 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x00968050 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x00968060 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x00968070 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x00968080 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x00968090 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x009680a0 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x009680b0 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x009680c0 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x009680d0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x009680e0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x009680f0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x00968100 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x00968110 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x00968120 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x00968130 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x00968140 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x00968150 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x00968160 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x00968170 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x00968180 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x00968190 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x009681a0 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x009681b0 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x009681c0 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x009681d0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x009681e0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x009681f0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x00968200 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x00968210 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x00968220 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x00968230 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x00968240 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x00968250 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x00968260 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x00968270 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x00968280 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x00968290 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x009682a0 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x009682b0 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x009682c0 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x009682d0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x009682e0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x009682f0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x00968300 200a2020 20207665 63342070 6f73203d . vec4 pos = │ │ │ │ + 0x00968310 20766563 3428615f 706f7369 74696f6e vec4(a_position │ │ │ │ + 0x00968320 2e78792c 20302c20 3129202a 20755f6d .xy, 0, 1) * u_m │ │ │ │ + 0x00968330 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x00968340 65633220 6e6f726d 616c203d 20766563 ec2 normal = vec │ │ │ │ + 0x00968350 3228615f 6e6f726d 616c2e78 202a2075 2(a_normal.x * u │ │ │ │ + 0x00968360 5f706172 616d732e 78202d20 615f6e6f _params.x - a_no │ │ │ │ + 0x00968370 726d616c 2e79202a 20755f70 6172616d rmal.y * u_param │ │ │ │ + 0x00968380 732e792c 200a2020 20202020 20202020 s.y, . │ │ │ │ + 0x00968390 20202020 20202020 20202020 20615f6e a_n │ │ │ │ + 0x009683a0 6f726d61 6c2e7820 2a20755f 70617261 ormal.x * u_para │ │ │ │ + 0x009683b0 6d732e79 202b2061 5f6e6f72 6d616c2e ms.y + a_normal. │ │ │ │ + 0x009683c0 79202a20 755f7061 72616d73 2e78293b y * u_params.x); │ │ │ │ + 0x009683d0 200a2020 20207665 63322073 68696674 . vec2 shift │ │ │ │ + 0x009683e0 6564506f 73203d20 6e6f726d 616c202a edPos = normal * │ │ │ │ + 0x009683f0 20755f70 6172616d 732e7a20 2b20706f u_params.z + po │ │ │ │ + 0x00968400 732e7879 3b200a20 20202070 6f73203d s.xy; . pos = │ │ │ │ + 0x00968410 20766563 34287368 69667465 64506f73 vec4(shiftedPos │ │ │ │ + 0x00968420 2c20615f 706f7369 74696f6e 2e7a2c20 , a_position.z, │ │ │ │ + 0x00968430 312e3029 202a2075 5f70726f 6a656374 1.0) * u_project │ │ │ │ + 0x00968440 696f6e3b 200a2020 2020676c 5f506f73 ion; . gl_Pos │ │ │ │ + 0x00968450 6974696f 6e203d20 6170706c 79506976 ition = applyPiv │ │ │ │ + 0x00968460 6f745472 616e7366 6f726d28 706f732c otTransform(pos, │ │ │ │ + 0x00968470 20755f70 69766f74 5472616e 73666f72 u_pivotTransfor │ │ │ │ + 0x00968480 6d2c2030 2e30293b 200a2020 20207665 m, 0.0); . ve │ │ │ │ + 0x00968490 6332206f 66667365 7473203d 20616273 c2 offsets = abs │ │ │ │ + 0x009684a0 28615f6e 6f726d61 6c2e7a77 293b200a (a_normal.zw); . │ │ │ │ + 0x009684b0 20202020 765f6f66 66736574 73203d20 v_offsets = │ │ │ │ + 0x009684c0 76656334 28615f6e 6f726d61 6c2e7a77 vec4(a_normal.zw │ │ │ │ + 0x009684d0 2c206f66 66736574 73202d20 312e3029 , offsets - 1.0) │ │ │ │ + 0x009684e0 3b200a20 20202076 5f636f6c 6f72203d ; . v_color = │ │ │ │ + 0x009684f0 20615f63 6f6c6f72 3b200a20 207d200a a_color; . } . │ │ │ │ + 0x00968500 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x00968510 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00968520 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00968530 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00968540 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00968550 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00968560 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00968570 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00968580 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00968590 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x009685a0 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x009685b0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x009685c0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x009685d0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009685e0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009685f0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00968600 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00968610 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00968620 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00968630 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00968640 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00968650 0a202069 6e207665 63322061 5f636f6c . in vec2 a_col │ │ │ │ + 0x00968660 6f725465 78436f6f 72643b20 0a202069 orTexCoord; . i │ │ │ │ + 0x00968670 6e207665 63322061 5f6d6173 6b546578 n vec2 a_maskTex │ │ │ │ + 0x00968680 436f6f72 643b200a 2020696e 20766563 Coord; . in vec │ │ │ │ + 0x00968690 3420615f 706f7369 74696f6e 3b200a20 4 a_position; . │ │ │ │ + 0x009686a0 20696e20 76656332 20615f6e 6f726d61 in vec2 a_norma │ │ │ │ + 0x009686b0 6c3b200a 20202369 66646566 20454e41 l; . #ifdef ENA │ │ │ │ + 0x009686c0 424c455f 56544620 0a20206f 7574204c BLE_VTF . out L │ │ │ │ + 0x009686d0 4f575f50 20766563 3420765f 636f6c6f OW_P vec4 v_colo │ │ │ │ + 0x009686e0 723b200a 20202365 6c736520 0a20206f r; . #else . o │ │ │ │ + 0x009686f0 75742076 65633220 765f636f 6c6f7254 ut vec2 v_colorT │ │ │ │ + 0x00968700 6578436f 6f72643b 200a2020 23656e64 exCoord; . #end │ │ │ │ + 0x00968710 6966200a 20206f75 74207665 63322076 if . out vec2 v │ │ │ │ + 0x00968720 5f6d6173 6b546578 436f6f72 643b200a _maskTexCoord; . │ │ │ │ + 0x00968730 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00968740 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00968750 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00968760 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x00968770 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x00968780 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x00968790 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x009687a0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x009687b0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x009687c0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x009687d0 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x009687e0 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x009687f0 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00968800 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00968810 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00968820 6e655061 73733b20 0a202023 69666465 nePass; . #ifde │ │ │ │ + 0x00968830 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x00968840 756e6966 6f726d20 73616d70 6c657232 uniform sampler2 │ │ │ │ + 0x00968850 4420755f 636f6c6f 72546578 3b200a20 D u_colorTex; . │ │ │ │ + 0x00968860 2023656e 64696620 0a202063 6f6e7374 #endif . const │ │ │ │ + 0x00968870 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00968880 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00968890 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x009688a0 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x009688b0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x009688c0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x009688d0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x009688e0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x009688f0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00968900 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00968910 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00968920 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00968930 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00968940 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00968950 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00968960 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00968970 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00968980 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00968990 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009689a0 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x009689b0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x009689c0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x009689d0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x009689e0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x009689f0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x00968a00 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00968a10 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00968a20 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00968a30 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00968a40 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00968a50 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00968a60 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00968a70 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00968a80 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00968a90 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00968aa0 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x00968ab0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x00968ac0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x00968ad0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x00968ae0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x00968af0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x00968b00 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00968b10 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00968b20 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00968b30 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00968b40 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00968b50 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00968b60 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00968b70 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00968b80 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00968b90 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00968ba0 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x00968bb0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00968bc0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x00968bd0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x00968be0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x00968bf0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x00968c00 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00968c10 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00968c20 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00968c30 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00968c40 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00968c50 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00968c60 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00968c70 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00968c80 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00968c90 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00968ca0 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x00968cb0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x00968cc0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x00968cd0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x00968ce0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x00968cf0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x00968d00 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00968d10 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00968d20 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00968d30 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00968d40 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00968d50 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00968d60 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00968d70 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00968d80 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00968d90 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00968da0 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x00968db0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x00968dc0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x00968dd0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x00968de0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00968df0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x00968e00 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x00968e10 706f7320 3d207665 63342861 5f706f73 pos = vec4(a_pos │ │ │ │ + 0x00968e20 6974696f 6e2e7879 7a2c2031 29202a20 ition.xyz, 1) * │ │ │ │ + 0x00968e30 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x00968e40 20207665 63342073 68696674 6564506f vec4 shiftedPo │ │ │ │ + 0x00968e50 73203d20 76656334 28615f6e 6f726d61 s = vec4(a_norma │ │ │ │ + 0x00968e60 6c2c2030 2e302c20 302e3029 202b2070 l, 0.0, 0.0) + p │ │ │ │ + 0x00968e70 6f733b20 0a202020 20676c5f 506f7369 os; . gl_Posi │ │ │ │ + 0x00968e80 74696f6e 203d2061 70706c79 5069766f tion = applyPivo │ │ │ │ + 0x00968e90 74547261 6e73666f 726d2873 68696674 tTransform(shift │ │ │ │ + 0x00968ea0 6564506f 73202a20 755f7072 6f6a6563 edPos * u_projec │ │ │ │ + 0x00968eb0 74696f6e 2c20755f 7069766f 74547261 tion, u_pivotTra │ │ │ │ + 0x00968ec0 6e73666f 726d2c20 302e3029 3b200a20 nsform, 0.0); . │ │ │ │ + 0x00968ed0 20236966 64656620 454e4142 4c455f56 #ifdef ENABLE_V │ │ │ │ + 0x00968ee0 5446200a 20202020 765f636f 6c6f7220 TF . v_color │ │ │ │ + 0x00968ef0 3d207465 78747572 6528755f 636f6c6f = texture(u_colo │ │ │ │ + 0x00968f00 72546578 2c20615f 636f6c6f 72546578 rTex, a_colorTex │ │ │ │ + 0x00968f10 436f6f72 64293b20 0a202023 656c7365 Coord); . #else │ │ │ │ + 0x00968f20 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ + 0x00968f30 436f6f72 64203d20 615f636f 6c6f7254 Coord = a_colorT │ │ │ │ + 0x00968f40 6578436f 6f72643b 200a2020 23656e64 exCoord; . #end │ │ │ │ + 0x00968f50 6966200a 20202020 765f6d61 736b5465 if . v_maskTe │ │ │ │ + 0x00968f60 78436f6f 7264203d 20615f6d 61736b54 xCoord = a_maskT │ │ │ │ + 0x00968f70 6578436f 6f72643b 200a2020 7d200a00 exCoord; . } .. │ │ │ │ + 0x00968f80 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00968f90 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00968fa0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00968fb0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00968fc0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00968fd0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00968fe0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00968ff0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00969000 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x00969010 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00969020 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00969030 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00969040 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00969050 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00969060 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00969070 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00969080 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00969090 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x009690a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x009690b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009690c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009690d0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x009690e0 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x009690f0 616c416e 64416e69 6d617465 4f725a3b alAndAnimateOrZ; │ │ │ │ + 0x00969100 200a2020 696e2076 65633420 615f7465 . in vec4 a_te │ │ │ │ + 0x00969110 78436f6f 7264733b 200a2020 696e2076 xCoords; . in v │ │ │ │ + 0x00969120 65633420 615f636f 6c6f723b 200a2020 ec4 a_color; . │ │ │ │ + 0x00969130 6f757420 76656334 20765f74 6578436f out vec4 v_texCo │ │ │ │ + 0x00969140 6f726473 3b200a20 206f7574 20766563 ords; . out vec │ │ │ │ + 0x00969150 3420765f 6d61736b 436f6c6f 723b200a 4 v_maskColor; . │ │ │ │ + 0x00969160 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x00969170 5f6d6f64 656c5669 65773b20 0a202075 _modelView; . u │ │ │ │ + 0x00969180 6e69666f 726d206d 61743420 755f7072 niform mat4 u_pr │ │ │ │ + 0x00969190 6f6a6563 74696f6e 3b200a20 20756e69 ojection; . uni │ │ │ │ + 0x009691a0 666f726d 206d6174 3420755f 7069766f form mat4 u_pivo │ │ │ │ + 0x009691b0 74547261 6e73666f 726d3b20 0a202075 tTransform; . u │ │ │ │ + 0x009691c0 6e69666f 726d2076 65633220 755f636f niform vec2 u_co │ │ │ │ + 0x009691d0 6e747261 73744761 6d6d613b 200a2020 ntrastGamma; . │ │ │ │ + 0x009691e0 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x009691f0 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x00969200 6f726d20 666c6f61 7420755f 7a536361 orm float u_zSca │ │ │ │ + 0x00969210 6c653b20 0a202075 6e69666f 726d2066 le; . uniform f │ │ │ │ + 0x00969220 6c6f6174 20755f69 6e746572 706f6c61 loat u_interpola │ │ │ │ + 0x00969230 74696f6e 3b200a20 20756e69 666f726d tion; . uniform │ │ │ │ + 0x00969240 20666c6f 61742075 5f69734f 75746c69 float u_isOutli │ │ │ │ + 0x00969250 6e655061 73733b20 0a202063 6f6e7374 nePass; . const │ │ │ │ + 0x00969260 20666c6f 6174206b 53686170 65436f6f float kShapeCoo │ │ │ │ + 0x00969270 72645363 616c6172 203d2031 3030302e rdScalar = 1000. │ │ │ │ + 0x00969280 303b200a 20207665 63342061 70706c79 0; . vec4 apply │ │ │ │ + 0x00969290 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x009692a0 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x009692b0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x009692c0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x009692d0 29200a20 207b200a 20202020 76656334 ) . { . vec4 │ │ │ │ + 0x009692e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009692f0 74203d20 7069766f 743b200a 20202020 t = pivot; . │ │ │ │ + 0x00969300 666c6f61 74207720 3d207472 616e7366 float w = transf │ │ │ │ + 0x00969310 6f726d65 64506976 6f742e77 3b200a20 ormedPivot.w; . │ │ │ │ + 0x00969320 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00969330 766f742e 78797720 3d202870 69766f74 vot.xyw = (pivot │ │ │ │ + 0x00969340 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00969350 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00969360 742e7879 2c207069 766f7452 65616c5a t.xy, pivotRealZ │ │ │ │ + 0x00969370 2c207729 292e7879 773b200a 20202020 , w)).xyw; . │ │ │ │ + 0x00969380 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00969390 2e7a202a 3d207472 616e7366 6f726d65 .z *= transforme │ │ │ │ + 0x009693a0 64506976 6f742e77 202f2077 3b200a20 dPivot.w / w; . │ │ │ │ + 0x009693b0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x009693c0 20202020 7472616e 73666f72 6d656450 transformedP │ │ │ │ + 0x009693d0 69766f74 2e79203d 202d7472 616e7366 ivot.y = -transf │ │ │ │ + 0x009693e0 6f726d65 64506976 6f742e79 3b200a20 ormedPivot.y; . │ │ │ │ + 0x009693f0 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00969400 766f742e 7a203d20 28747261 6e73666f vot.z = (transfo │ │ │ │ + 0x00969410 726d6564 5069766f 742e7a20 202b2074 rmedPivot.z + t │ │ │ │ + 0x00969420 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00969430 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00969440 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00969450 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00969460 3b200a20 207d200a 20207665 63342061 ; . } . vec4 a │ │ │ │ + 0x00969470 70706c79 42696c6c 626f6172 64506976 pplyBillboardPiv │ │ │ │ + 0x00969480 6f745472 616e7366 6f726d28 76656334 otTransform(vec4 │ │ │ │ + 0x00969490 20706976 6f742c20 6d617434 20706976 pivot, mat4 piv │ │ │ │ + 0x009694a0 6f745472 616e7366 6f726d2c 20666c6f otTransform, flo │ │ │ │ + 0x009694b0 61742070 69766f74 5265616c 5a2c2076 at pivotRealZ, v │ │ │ │ + 0x009694c0 65633220 6f666673 65742920 0a20207b ec2 offset) . { │ │ │ │ + 0x009694d0 200a2020 2020666c 6f617420 6c6f6769 . float logi │ │ │ │ + 0x009694e0 635a203d 20706976 6f742e7a 202f2070 cZ = pivot.z / p │ │ │ │ + 0x009694f0 69766f74 2e773b20 0a202020 20766563 ivot.w; . vec │ │ │ │ + 0x00969500 34207472 616e7366 6f726d65 64506976 4 transformedPiv │ │ │ │ + 0x00969510 6f74203d 20706976 6f745472 616e7366 ot = pivotTransf │ │ │ │ + 0x00969520 6f726d20 2a207665 63342870 69766f74 orm * vec4(pivot │ │ │ │ + 0x00969530 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00969540 20706976 6f742e77 293b200a 20202020 pivot.w); . │ │ │ │ + 0x00969550 76656334 20736361 6c65203d 20706976 vec4 scale = piv │ │ │ │ + 0x00969560 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00969570 63342831 2e302c20 2d312e30 2c20302e c4(1.0, -1.0, 0. │ │ │ │ + 0x00969580 302c2031 2e30293b 200a2020 20207665 0, 1.0); . ve │ │ │ │ + 0x00969590 63342070 6f736974 696f6e20 3d207665 c4 position = ve │ │ │ │ + 0x009695a0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x009695b0 766f742e 7879202f 20747261 6e73666f vot.xy / transfo │ │ │ │ + 0x009695c0 726d6564 5069766f 742e772c 206c6f67 rmedPivot.w, log │ │ │ │ + 0x009695d0 69635a2c 20312e30 29202b20 76656334 icZ, 1.0) + vec4 │ │ │ │ + 0x009695e0 286f6666 73657420 2f207363 616c652e (offset / scale. │ │ │ │ + 0x009695f0 77202a20 7363616c 652e782c 20302e30 w * scale.x, 0.0 │ │ │ │ + 0x00969600 2c20302e 30293b20 0a202023 69666465 , 0.0); . #ifde │ │ │ │ + 0x00969610 66205655 4c4b414e 200a2020 2020706f f VULKAN . po │ │ │ │ + 0x00969620 73697469 6f6e2e79 203d202d 706f7369 sition.y = -posi │ │ │ │ + 0x00969630 74696f6e 2e793b20 0a202020 20706f73 tion.y; . pos │ │ │ │ + 0x00969640 6974696f 6e2e7a20 3d202870 6f736974 ition.z = (posit │ │ │ │ + 0x00969650 696f6e2e 7a20202b 20706f73 6974696f ion.z + positio │ │ │ │ + 0x00969660 6e2e7729 202f2032 2e303b20 0a202023 n.w) / 2.0; . # │ │ │ │ + 0x00969670 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x00969680 6e20706f 73697469 6f6e3b20 0a20207d n position; . } │ │ │ │ + 0x00969690 200a2020 76656332 2063616c 634c696e . vec2 calcLin │ │ │ │ + 0x009696a0 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x009696b0 506f7328 76656332 206f7269 67696e61 Pos(vec2 origina │ │ │ │ + 0x009696c0 6c417869 73506f73 2c207665 63322073 lAxisPos, vec2 s │ │ │ │ + 0x009696d0 68696674 6564506f 732c206d 61743420 hiftedPos, mat4 │ │ │ │ + 0x009696e0 6d6f6465 6c566965 772c2066 6c6f6174 modelView, float │ │ │ │ + 0x009696f0 2068616c 66576964 74682920 0a20207b halfWidth) . { │ │ │ │ + 0x00969700 200a2020 20207665 63322070 203d2028 . vec2 p = ( │ │ │ │ + 0x00969710 76656334 28736869 66746564 506f732c vec4(shiftedPos, │ │ │ │ + 0x00969720 20302e30 2c20312e 3029202a 206d6f64 0.0, 1.0) * mod │ │ │ │ + 0x00969730 656c5669 6577292e 78793b20 0a202020 elView).xy; . │ │ │ │ + 0x00969740 20766563 32206420 3d207020 2d206f72 vec2 d = p - or │ │ │ │ + 0x00969750 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00969760 20202020 69662028 646f7428 642c2064 if (dot(d, d │ │ │ │ + 0x00969770 2920213d 20302e30 29200a20 20202020 ) != 0.0) . │ │ │ │ + 0x00969780 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00969790 41786973 506f7320 2b206e6f 726d616c AxisPos + normal │ │ │ │ + 0x009697a0 697a6528 6429202a 2068616c 66576964 ize(d) * halfWid │ │ │ │ + 0x009697b0 74683b20 0a202020 20656c73 65200a20 th; . else . │ │ │ │ + 0x009697c0 20202020 20726574 75726e20 6f726967 return orig │ │ │ │ + 0x009697d0 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x009697e0 7d200a20 20766f69 64206d61 696e2829 } . void main() │ │ │ │ + 0x009697f0 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x00969800 6e6f726d 616c203d 20615f6e 6f726d61 normal = a_norma │ │ │ │ + 0x00969810 6c416e64 416e696d 6174654f 725a2e78 lAndAnimateOrZ.x │ │ │ │ + 0x00969820 793b200a 20202020 69662028 615f6e6f y; . if (a_no │ │ │ │ + 0x00969830 726d616c 416e6441 6e696d61 74654f72 rmalAndAnimateOr │ │ │ │ + 0x00969840 5a2e7a20 3e20302e 3029200a 20202020 Z.z > 0.0) . │ │ │ │ + 0x00969850 20206e6f 726d616c 203d2075 5f696e74 normal = u_int │ │ │ │ + 0x00969860 6572706f 6c617469 6f6e202a 206e6f72 erpolation * nor │ │ │ │ + 0x00969870 6d616c3b 200a2020 20207665 63342070 mal; . vec4 p │ │ │ │ + 0x00969880 69766f74 203d2076 65633428 615f706f ivot = vec4(a_po │ │ │ │ + 0x00969890 73697469 6f6e2c20 312e3029 202a2075 sition, 1.0) * u │ │ │ │ + 0x009698a0 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ + 0x009698b0 20766563 34206f66 66736574 203d2076 vec4 offset = v │ │ │ │ + 0x009698c0 65633428 6e6f726d 616c2c20 302e302c ec4(normal, 0.0, │ │ │ │ + 0x009698d0 20302e30 29202a20 755f7072 6f6a6563 0.0) * u_projec │ │ │ │ + 0x009698e0 74696f6e 3b200a20 20202076 65633420 tion; . vec4 │ │ │ │ + 0x009698f0 70726f6a 65637465 64506976 6f74203d projectedPivot = │ │ │ │ + 0x00969900 20706976 6f74202a 20755f70 726f6a65 pivot * u_proje │ │ │ │ + 0x00969910 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ + 0x00969920 6f736974 696f6e20 3d206170 706c7942 osition = applyB │ │ │ │ + 0x00969930 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x00969940 6e73666f 726d2870 726f6a65 63746564 nsform(projected │ │ │ │ + 0x00969950 5069766f 742c2075 5f706976 6f745472 Pivot, u_pivotTr │ │ │ │ + 0x00969960 616e7366 6f726d2c 20302e30 2c206f66 ansform, 0.0, of │ │ │ │ + 0x00969970 66736574 2e787929 3b200a20 20202066 fset.xy); . f │ │ │ │ + 0x00969980 6c6f6174 206e6577 5a203d20 70726f6a loat newZ = proj │ │ │ │ + 0x00969990 65637465 64506976 6f742e79 202f2070 ectedPivot.y / p │ │ │ │ + 0x009699a0 726f6a65 63746564 5069766f 742e7720 rojectedPivot.w │ │ │ │ + 0x009699b0 2a20302e 35202b20 302e353b 200a2020 * 0.5 + 0.5; . │ │ │ │ + 0x009699c0 2020676c 5f506f73 6974696f 6e2e7a20 gl_Position.z │ │ │ │ + 0x009699d0 3d206162 7328615f 6e6f726d 616c416e = abs(a_normalAn │ │ │ │ + 0x009699e0 64416e69 6d617465 4f725a2e 7a29202a dAnimateOrZ.z) * │ │ │ │ + 0x009699f0 206e6577 5a20202b 2028312e 30202d20 newZ + (1.0 - │ │ │ │ + 0x00969a00 61627328 615f6e6f 726d616c 416e6441 abs(a_normalAndA │ │ │ │ + 0x00969a10 6e696d61 74654f72 5a2e7a29 29202a20 nimateOrZ.z)) * │ │ │ │ + 0x00969a20 676c5f50 6f736974 696f6e2e 7a3b200a gl_Position.z; . │ │ │ │ + 0x00969a30 20202020 765f7465 78436f6f 72647320 v_texCoords │ │ │ │ + 0x00969a40 3d20615f 74657843 6f6f7264 733b200a = a_texCoords; . │ │ │ │ + 0x00969a50 20202020 765f6d61 736b436f 6c6f7220 v_maskColor │ │ │ │ + 0x00969a60 3d20615f 636f6c6f 723b200a 20207d20 = a_color; . } │ │ │ │ + 0x00969a70 0a000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x00969a80 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00969a90 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00969aa0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00969ab0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00969ac0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00969ad0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00969ae0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00969af0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00969b00 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00969b10 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00969b20 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00969b30 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00969b40 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00969b50 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00969b60 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00969b70 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00969b80 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00969b90 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00969ba0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00969bb0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00969bc0 0a202069 6e207665 63322061 5f706f73 . in vec2 a_pos │ │ │ │ + 0x00969bd0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00969be0 3220615f 74657843 6f6f7264 733b200a 2 a_texCoords; . │ │ │ │ + 0x00969bf0 2020696e 20766563 3420615f 636f6c6f in vec4 a_colo │ │ │ │ + 0x00969c00 723b200a 20206f75 74207665 63322076 r; . out vec2 v │ │ │ │ + 0x00969c10 5f746578 436f6f72 64733b20 0a20206f _texCoords; . o │ │ │ │ + 0x00969c20 75742076 65633420 765f636f 6c6f723b ut vec4 v_color; │ │ │ │ + 0x00969c30 200a2020 756e6966 6f726d20 6d617434 . uniform mat4 │ │ │ │ + 0x00969c40 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x00969c50 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ + 0x00969c60 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ + 0x00969c70 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ + 0x00969c80 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ + 0x00969c90 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00969ca0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00969cb0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00969cc0 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ + 0x00969cd0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x00969ce0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x00969cf0 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ + 0x00969d00 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x00969d10 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ + 0x00969d20 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ + 0x00969d30 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ + 0x00969d40 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ + 0x00969d50 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ + 0x00969d60 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ + 0x00969d70 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x00969d80 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ + 0x00969d90 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ + 0x00969da0 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ + 0x00969db0 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ + 0x00969dc0 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ + 0x00969dd0 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ + 0x00969de0 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ + 0x00969df0 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ + 0x00969e00 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00969e10 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ + 0x00969e20 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ + 0x00969e30 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x00969e40 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ + 0x00969e50 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ + 0x00969e60 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ + 0x00969e70 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ + 0x00969e80 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x00969e90 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x00969ea0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x00969eb0 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ + 0x00969ec0 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ + 0x00969ed0 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ + 0x00969ee0 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ + 0x00969ef0 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x00969f00 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x00969f10 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00969f20 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ + 0x00969f30 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ + 0x00969f40 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ + 0x00969f50 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ + 0x00969f60 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ + 0x00969f70 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ + 0x00969f80 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x00969f90 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ + 0x00969fa0 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ + 0x00969fb0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00969fc0 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ + 0x00969fd0 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ + 0x00969fe0 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ + 0x00969ff0 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ + 0x0096a000 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0096a010 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ + 0x0096a020 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ + 0x0096a030 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ + 0x0096a040 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ + 0x0096a050 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ + 0x0096a060 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x0096a070 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ + 0x0096a080 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ + 0x0096a090 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x0096a0a0 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ + 0x0096a0b0 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ + 0x0096a0c0 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ + 0x0096a0d0 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ + 0x0096a0e0 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ + 0x0096a0f0 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ + 0x0096a100 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ + 0x0096a110 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ + 0x0096a120 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ + 0x0096a130 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ + 0x0096a140 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ + 0x0096a150 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ + 0x0096a160 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ + 0x0096a170 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0096a180 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ + 0x0096a190 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ + 0x0096a1a0 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ + 0x0096a1b0 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ + 0x0096a1c0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x0096a1d0 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ + 0x0096a1e0 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ + 0x0096a1f0 2020765f 74657843 6f6f7264 73203d20 v_texCoords = │ │ │ │ + 0x0096a200 615f7465 78436f6f 7264733b 200a2020 a_texCoords; . │ │ │ │ + 0x0096a210 2020765f 636f6c6f 72203d20 615f636f v_color = a_co │ │ │ │ + 0x0096a220 6c6f723b 200a2020 2020676c 5f506f73 lor; . gl_Pos │ │ │ │ + 0x0096a230 6974696f 6e203d20 76656334 28615f70 ition = vec4(a_p │ │ │ │ + 0x0096a240 6f736974 696f6e2c 20302c20 3129202a osition, 0, 1) * │ │ │ │ + 0x0096a250 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x0096a260 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0096a270 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x0096a280 2e79203d 202d676c 5f506f73 6974696f .y = -gl_Positio │ │ │ │ + 0x0096a290 6e2e793b 200a2020 2020676c 5f506f73 n.y; . gl_Pos │ │ │ │ + 0x0096a2a0 6974696f 6e2e7a20 3d202867 6c5f506f ition.z = (gl_Po │ │ │ │ + 0x0096a2b0 73697469 6f6e2e7a 20202b20 676c5f50 sition.z + gl_P │ │ │ │ + 0x0096a2c0 6f736974 696f6e2e 7729202a 20302e35 osition.w) * 0.5 │ │ │ │ + 0x0096a2d0 3b200a20 2023656e 64696620 0a20207d ; . #endif . } │ │ │ │ + 0x0096a2e0 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x0096a2f0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0096a300 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0096a310 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0096a320 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096a330 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0096a340 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0096a350 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0096a360 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0096a370 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0096a380 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0096a390 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0096a3a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0096a3b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0096a3c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0096a3d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0096a3e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0096a3f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0096a400 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0096a410 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0096a420 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0096a430 0a202069 6e207665 63322061 5f6e6f72 . in vec2 a_nor │ │ │ │ + 0x0096a440 6d616c3b 200a2020 696e2076 65633220 mal; . in vec2 │ │ │ │ + 0x0096a450 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x0096a460 3b200a20 206f7574 20766563 3220765f ; . out vec2 v_ │ │ │ │ + 0x0096a470 636f6c6f 72546578 436f6f72 64733b20 colorTexCoords; │ │ │ │ + 0x0096a480 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0096a490 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0096a4a0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0096a4b0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x0096a4c0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x0096a4d0 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x0096a4e0 756e6966 6f726d20 76656334 20755f70 uniform vec4 u_p │ │ │ │ + 0x0096a4f0 6f736974 696f6e3b 200a2020 756e6966 osition; . unif │ │ │ │ + 0x0096a500 6f726d20 76656332 20755f6c 696e6550 orm vec2 u_lineP │ │ │ │ + 0x0096a510 6172616d 733b200a 2020756e 69666f72 arams; . unifor │ │ │ │ + 0x0096a520 6d20666c 6f617420 755f6163 63757261 m float u_accura │ │ │ │ + 0x0096a530 63793b20 0a202075 6e69666f 726d2066 cy; . uniform f │ │ │ │ + 0x0096a540 6c6f6174 20755f7a 5363616c 653b200a loat u_zScale; . │ │ │ │ + 0x0096a550 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0096a560 755f6f70 61636974 793b200a 2020756e u_opacity; . un │ │ │ │ + 0x0096a570 69666f72 6d20666c 6f617420 755f617a iform float u_az │ │ │ │ + 0x0096a580 696d7574 3b200a20 20636f6e 73742066 imut; . const f │ │ │ │ + 0x0096a590 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x0096a5a0 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x0096a5b0 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x0096a5c0 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0096a5d0 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0096a5e0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0096a5f0 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x0096a600 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x0096a610 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x0096a620 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x0096a630 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x0096a640 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x0096a650 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096a660 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x0096a670 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x0096a680 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096a690 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x0096a6a0 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x0096a6b0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x0096a6c0 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x0096a6d0 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x0096a6e0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x0096a6f0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0096a700 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x0096a710 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x0096a720 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096a730 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x0096a740 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x0096a750 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x0096a760 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x0096a770 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x0096a780 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x0096a790 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x0096a7a0 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x0096a7b0 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x0096a7c0 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x0096a7d0 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x0096a7e0 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x0096a7f0 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x0096a800 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x0096a810 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x0096a820 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x0096a830 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096a840 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x0096a850 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x0096a860 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x0096a870 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x0096a880 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x0096a890 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0096a8a0 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x0096a8b0 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x0096a8c0 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x0096a8d0 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0096a8e0 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x0096a8f0 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x0096a900 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x0096a910 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x0096a920 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x0096a930 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x0096a940 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x0096a950 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x0096a960 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x0096a970 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x0096a980 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x0096a990 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x0096a9a0 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x0096a9b0 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x0096a9c0 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x0096a9d0 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x0096a9e0 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x0096a9f0 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x0096aa00 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x0096aa10 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x0096aa20 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x0096aa30 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x0096aa40 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x0096aa50 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x0096aa60 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x0096aa70 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x0096aa80 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x0096aa90 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x0096aaa0 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x0096aab0 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x0096aac0 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x0096aad0 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x0096aae0 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x0096aaf0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x0096ab00 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x0096ab10 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x0096ab20 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ + 0x0096ab30 73697469 6f6e203d 20766563 3428755f sition = vec4(u_ │ │ │ │ + 0x0096ab40 706f7369 74696f6e 2e78792c 20302e30 position.xy, 0.0 │ │ │ │ + 0x0096ab50 2c20312e 3029202a 20755f6d 6f64656c , 1.0) * u_model │ │ │ │ + 0x0096ab60 56696577 3b200a20 20202076 65633420 View; . vec4 │ │ │ │ + 0x0096ab70 6e6f726d 616c203d 20766563 3428615f normal = vec4(a_ │ │ │ │ + 0x0096ab80 6e6f726d 616c202a 20755f61 63637572 normal * u_accur │ │ │ │ + 0x0096ab90 6163792c 20302e30 2c20302e 30293b20 acy, 0.0, 0.0); │ │ │ │ + 0x0096aba0 0a202020 20706f73 6974696f 6e203d20 . position = │ │ │ │ + 0x0096abb0 28706f73 6974696f 6e202b20 6e6f726d (position + norm │ │ │ │ + 0x0096abc0 616c2920 2a20755f 70726f6a 65637469 al) * u_projecti │ │ │ │ + 0x0096abd0 6f6e3b20 0a202020 20676c5f 506f7369 on; . gl_Posi │ │ │ │ + 0x0096abe0 74696f6e 203d2061 70706c79 5069766f tion = applyPivo │ │ │ │ + 0x0096abf0 74547261 6e73666f 726d2870 6f736974 tTransform(posit │ │ │ │ + 0x0096ac00 696f6e2c 20755f70 69766f74 5472616e ion, u_pivotTran │ │ │ │ + 0x0096ac10 73666f72 6d2c2075 5f706f73 6974696f sform, u_positio │ │ │ │ + 0x0096ac20 6e2e7a20 2a20755f 7a536361 6c65293b n.z * u_zScale); │ │ │ │ + 0x0096ac30 200a2020 2020765f 636f6c6f 72546578 . v_colorTex │ │ │ │ + 0x0096ac40 436f6f72 6473203d 20615f63 6f6c6f72 Coords = a_color │ │ │ │ + 0x0096ac50 54657843 6f6f7264 733b200a 20207d20 TexCoords; . } │ │ │ │ + 0x0096ac60 0a000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x0096ac70 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0096ac80 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0096ac90 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0096aca0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096acb0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0096acc0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0096acd0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0096ace0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0096acf0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0096ad00 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0096ad10 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0096ad20 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0096ad30 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0096ad40 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0096ad50 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0096ad60 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0096ad70 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0096ad80 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0096ad90 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0096ada0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0096adb0 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0096adc0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0096add0 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x0096ade0 643b200a 2020696e 20766563 3220615f d; . in vec2 a_ │ │ │ │ + 0x0096adf0 6f75746c 696e6543 6f6c6f72 54657843 outlineColorTexC │ │ │ │ + 0x0096ae00 6f6f7264 3b200a20 20696e20 76656332 oord; . in vec2 │ │ │ │ + 0x0096ae10 20615f6e 6f726d61 6c3b200a 2020696e a_normal; . in │ │ │ │ + 0x0096ae20 20766563 3220615f 6d61736b 54657843 vec2 a_maskTexC │ │ │ │ + 0x0096ae30 6f6f7264 3b200a20 20236966 64656620 oord; . #ifdef │ │ │ │ + 0x0096ae40 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ + 0x0096ae50 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ + 0x0096ae60 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ + 0x0096ae70 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x0096ae80 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ + 0x0096ae90 656e6469 66200a20 206f7574 20766563 endif . out vec │ │ │ │ + 0x0096aea0 3220765f 6d61736b 54657843 6f6f7264 2 v_maskTexCoord │ │ │ │ + 0x0096aeb0 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0096aec0 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ + 0x0096aed0 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x0096aee0 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x0096aef0 756e6966 6f726d20 76656332 20755f63 uniform vec2 u_c │ │ │ │ + 0x0096af00 6f6e7472 61737447 616d6d61 3b200a20 ontrastGamma; . │ │ │ │ + 0x0096af10 20756e69 666f726d 20766563 3220755f uniform vec2 u_ │ │ │ │ + 0x0096af20 706f7369 74696f6e 3b200a20 20756e69 position; . uni │ │ │ │ + 0x0096af30 666f726d 20666c6f 61742075 5f69734f form float u_isO │ │ │ │ + 0x0096af40 75746c69 6e655061 73733b20 0a202075 utlinePass; . u │ │ │ │ + 0x0096af50 6e69666f 726d2066 6c6f6174 20755f6f niform float u_o │ │ │ │ + 0x0096af60 70616369 74793b20 0a202075 6e69666f pacity; . unifo │ │ │ │ + 0x0096af70 726d2066 6c6f6174 20755f6c 656e6774 rm float u_lengt │ │ │ │ + 0x0096af80 683b200a 20202369 66646566 20454e41 h; . #ifdef ENA │ │ │ │ + 0x0096af90 424c455f 56544620 0a202075 6e69666f BLE_VTF . unifo │ │ │ │ + 0x0096afa0 726d2073 616d706c 65723244 20755f63 rm sampler2D u_c │ │ │ │ + 0x0096afb0 6f6c6f72 5465783b 200a2020 23656e64 olorTex; . #end │ │ │ │ + 0x0096afc0 6966200a 2020636f 6e737420 666c6f61 if . const floa │ │ │ │ + 0x0096afd0 74206b42 61736544 65707468 53686966 t kBaseDepthShif │ │ │ │ + 0x0096afe0 74203d20 2d31302e 303b200a 2020636f t = -10.0; . co │ │ │ │ + 0x0096aff0 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x0096b000 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x0096b010 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x0096b020 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0096b030 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0096b040 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0096b050 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0096b060 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x0096b070 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0096b080 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x0096b090 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x0096b0a0 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x0096b0b0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0096b0c0 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x0096b0d0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0096b0e0 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0096b0f0 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x0096b100 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x0096b110 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0096b120 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x0096b130 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x0096b140 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0096b150 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x0096b160 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x0096b170 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x0096b180 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0096b190 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x0096b1a0 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x0096b1b0 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x0096b1c0 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x0096b1d0 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0096b1e0 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x0096b1f0 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x0096b200 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x0096b210 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x0096b220 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x0096b230 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0096b240 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x0096b250 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x0096b260 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x0096b270 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x0096b280 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x0096b290 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x0096b2a0 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x0096b2b0 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x0096b2c0 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0096b2d0 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x0096b2e0 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x0096b2f0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0096b300 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x0096b310 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x0096b320 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x0096b330 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x0096b340 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x0096b350 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x0096b360 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x0096b370 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x0096b380 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x0096b390 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x0096b3a0 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0096b3b0 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x0096b3c0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x0096b3d0 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x0096b3e0 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x0096b3f0 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x0096b400 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x0096b410 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x0096b420 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x0096b430 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x0096b440 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x0096b450 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x0096b460 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x0096b470 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x0096b480 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x0096b490 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x0096b4a0 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x0096b4b0 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x0096b4c0 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x0096b4d0 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x0096b4e0 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0096b4f0 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x0096b500 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x0096b510 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0096b520 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x0096b530 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x0096b540 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x0096b550 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0096b560 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0096b570 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x0096b580 6e282920 0a20207b 200a2020 2020666c n() . { . fl │ │ │ │ + 0x0096b590 6f617420 69734f75 746c696e 65203d20 oat isOutline = │ │ │ │ + 0x0096b5a0 73746570 28302e35 2c20755f 69734f75 step(0.5, u_isOu │ │ │ │ + 0x0096b5b0 746c696e 65506173 73293b20 0a202020 tlinePass); . │ │ │ │ + 0x0096b5c0 20666c6f 61742064 65707468 53686966 float depthShif │ │ │ │ + 0x0096b5d0 74203d20 6b426173 65446570 74685368 t = kBaseDepthSh │ │ │ │ + 0x0096b5e0 69667420 2a206973 4f75746c 696e653b ift * isOutline; │ │ │ │ + 0x0096b5f0 200a2020 20207665 63342070 6f73203d . vec4 pos = │ │ │ │ + 0x0096b600 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ + 0x0096b610 6e2c2031 2e302920 2b207665 63342830 n, 1.0) + vec4(0 │ │ │ │ + 0x0096b620 2e302c20 302e302c 20646570 74685368 .0, 0.0, depthSh │ │ │ │ + 0x0096b630 6966742c 20302e30 2929202a 20755f6d ift, 0.0)) * u_m │ │ │ │ + 0x0096b640 6f64656c 56696577 3b200a20 20202076 odelView; . v │ │ │ │ + 0x0096b650 65633420 73686966 74656450 6f73203d ec4 shiftedPos = │ │ │ │ + 0x0096b660 20766563 3428615f 6e6f726d 616c2c20 vec4(a_normal, │ │ │ │ + 0x0096b670 302e302c 20302e30 29202b20 706f733b 0.0, 0.0) + pos; │ │ │ │ + 0x0096b680 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x0096b690 6e203d20 73686966 74656450 6f73202a n = shiftedPos * │ │ │ │ + 0x0096b6a0 20755f70 726f6a65 6374696f 6e3b200a u_projection; . │ │ │ │ + 0x0096b6b0 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0096b6c0 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x0096b6d0 2e79203d 202d676c 5f506f73 6974696f .y = -gl_Positio │ │ │ │ + 0x0096b6e0 6e2e793b 200a2020 2020676c 5f506f73 n.y; . gl_Pos │ │ │ │ + 0x0096b6f0 6974696f 6e2e7a20 3d202867 6c5f506f ition.z = (gl_Po │ │ │ │ + 0x0096b700 73697469 6f6e2e7a 20202b20 676c5f50 sition.z + gl_P │ │ │ │ + 0x0096b710 6f736974 696f6e2e 7729202a 20302e35 osition.w) * 0.5 │ │ │ │ + 0x0096b720 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0096b730 20766563 3220636f 6c6f7254 6578436f vec2 colorTexCo │ │ │ │ + 0x0096b740 6f726420 3d206d69 7828615f 636f6c6f ord = mix(a_colo │ │ │ │ + 0x0096b750 72546578 436f6f72 642c2061 5f6f7574 rTexCoord, a_out │ │ │ │ + 0x0096b760 6c696e65 436f6c6f 72546578 436f6f72 lineColorTexCoor │ │ │ │ + 0x0096b770 642c2069 734f7574 6c696e65 293b200a d, isOutline); . │ │ │ │ + 0x0096b780 20202369 66646566 20454e41 424c455f #ifdef ENABLE_ │ │ │ │ + 0x0096b790 56544620 0a202020 20765f63 6f6c6f72 VTF . v_color │ │ │ │ + 0x0096b7a0 203d2074 65787475 72652875 5f636f6c = texture(u_col │ │ │ │ + 0x0096b7b0 6f725465 782c2063 6f6c6f72 54657843 orTex, colorTexC │ │ │ │ + 0x0096b7c0 6f6f7264 293b200a 20202365 6c736520 oord); . #else │ │ │ │ + 0x0096b7d0 0a202020 20765f63 6f6c6f72 54657843 . v_colorTexC │ │ │ │ + 0x0096b7e0 6f6f7264 203d2063 6f6c6f72 54657843 oord = colorTexC │ │ │ │ + 0x0096b7f0 6f6f7264 3b200a20 2023656e 64696620 oord; . #endif │ │ │ │ + 0x0096b800 0a202020 20765f6d 61736b54 6578436f . v_maskTexCo │ │ │ │ + 0x0096b810 6f726420 3d20615f 6d61736b 54657843 ord = a_maskTexC │ │ │ │ + 0x0096b820 6f6f7264 3b200a20 207d200a 00000000 oord; . } ..... │ │ │ │ + 0x0096b830 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096b840 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096b850 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096b860 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096b870 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096b880 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096b890 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096b8a0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096b8b0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096b8c0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096b8d0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096b8e0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096b8f0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096b900 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096b910 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096b920 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096b930 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096b940 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096b950 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096b960 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096b970 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096b980 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0096b990 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x0096b9a0 72546578 436f6f72 64733b20 0a202023 rTexCoords; . # │ │ │ │ + 0x0096b9b0 69666465 6620454e 41424c45 5f565446 ifdef ENABLE_VTF │ │ │ │ + 0x0096b9c0 200a2020 6f757420 4c4f575f 50207665 . out LOW_P ve │ │ │ │ + 0x0096b9d0 63342076 5f636f6c 6f723b20 0a202023 c4 v_color; . # │ │ │ │ + 0x0096b9e0 656c7365 200a2020 6f757420 76656332 else . out vec2 │ │ │ │ + 0x0096b9f0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x0096ba00 733b200a 20202365 6e646966 200a2020 s; . #endif . │ │ │ │ + 0x0096ba10 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ + 0x0096ba20 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ + 0x0096ba30 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ + 0x0096ba40 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ + 0x0096ba50 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ + 0x0096ba60 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ + 0x0096ba70 666f726d 20766563 3220755f 636f6e74 form vec2 u_cont │ │ │ │ + 0x0096ba80 72617374 47616d6d 613b200a 2020756e rastGamma; . un │ │ │ │ + 0x0096ba90 69666f72 6d20666c 6f617420 755f6f70 iform float u_op │ │ │ │ + 0x0096baa0 61636974 793b200a 2020756e 69666f72 acity; . unifor │ │ │ │ + 0x0096bab0 6d20666c 6f617420 755f7a53 63616c65 m float u_zScale │ │ │ │ + 0x0096bac0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0096bad0 61742075 5f696e74 6572706f 6c617469 at u_interpolati │ │ │ │ + 0x0096bae0 6f6e3b20 0a202075 6e69666f 726d2066 on; . uniform f │ │ │ │ + 0x0096baf0 6c6f6174 20755f69 734f7574 6c696e65 loat u_isOutline │ │ │ │ + 0x0096bb00 50617373 3b200a20 20236966 64656620 Pass; . #ifdef │ │ │ │ + 0x0096bb10 454e4142 4c455f56 5446200a 2020756e ENABLE_VTF . un │ │ │ │ + 0x0096bb20 69666f72 6d207361 6d706c65 72324420 iform sampler2D │ │ │ │ + 0x0096bb30 755f636f 6c6f7254 65783b20 0a202023 u_colorTex; . # │ │ │ │ + 0x0096bb40 656e6469 66200a20 20636f6e 73742066 endif . const f │ │ │ │ + 0x0096bb50 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x0096bb60 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x0096bb70 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x0096bb80 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x0096bb90 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x0096bba0 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x0096bbb0 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x0096bbc0 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x0096bbd0 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x0096bbe0 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x0096bbf0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x0096bc00 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x0096bc10 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096bc20 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x0096bc30 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x0096bc40 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096bc50 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x0096bc60 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x0096bc70 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x0096bc80 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x0096bc90 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x0096bca0 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x0096bcb0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0096bcc0 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x0096bcd0 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x0096bce0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096bcf0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x0096bd00 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x0096bd10 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x0096bd20 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x0096bd30 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x0096bd40 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x0096bd50 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x0096bd60 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x0096bd70 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x0096bd80 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x0096bd90 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x0096bda0 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x0096bdb0 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x0096bdc0 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x0096bdd0 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x0096bde0 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x0096bdf0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096be00 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x0096be10 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x0096be20 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x0096be30 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x0096be40 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x0096be50 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0096be60 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x0096be70 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x0096be80 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x0096be90 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x0096bea0 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x0096beb0 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x0096bec0 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x0096bed0 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x0096bee0 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x0096bef0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x0096bf00 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x0096bf10 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x0096bf20 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x0096bf30 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x0096bf40 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x0096bf50 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x0096bf60 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x0096bf70 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x0096bf80 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x0096bf90 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x0096bfa0 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x0096bfb0 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x0096bfc0 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x0096bfd0 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x0096bfe0 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x0096bff0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x0096c000 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x0096c010 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x0096c020 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x0096c030 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x0096c040 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x0096c050 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x0096c060 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x0096c070 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x0096c080 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x0096c090 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x0096c0a0 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x0096c0b0 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x0096c0c0 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x0096c0d0 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x0096c0e0 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ + 0x0096c0f0 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ + 0x0096c100 696f6e2c 20312920 2a20755f 6d6f6465 ion, 1) * u_mode │ │ │ │ + 0x0096c110 6c566965 77202a20 755f7072 6f6a6563 lView * u_projec │ │ │ │ + 0x0096c120 74696f6e 3b200a20 20202067 6c5f506f tion; . gl_Po │ │ │ │ + 0x0096c130 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ + 0x0096c140 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ + 0x0096c150 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x0096c160 726d2c20 302e3029 3b200a20 20236966 rm, 0.0); . #if │ │ │ │ + 0x0096c170 64656620 454e4142 4c455f56 5446200a def ENABLE_VTF . │ │ │ │ + 0x0096c180 20202020 765f636f 6c6f7220 3d207465 v_color = te │ │ │ │ + 0x0096c190 78747572 6528755f 636f6c6f 72546578 xture(u_colorTex │ │ │ │ + 0x0096c1a0 2c20615f 636f6c6f 72546578 436f6f72 , a_colorTexCoor │ │ │ │ + 0x0096c1b0 6473293b 200a2020 23656c73 65200a20 ds); . #else . │ │ │ │ + 0x0096c1c0 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x0096c1d0 72647320 3d20615f 636f6c6f 72546578 rds = a_colorTex │ │ │ │ + 0x0096c1e0 436f6f72 64733b20 0a202023 656e6469 Coords; . #endi │ │ │ │ + 0x0096c1f0 66200a20 207d200a 00000000 00000000 f . } ......... │ │ │ │ + 0x0096c200 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096c210 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096c220 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096c230 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096c240 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096c250 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096c260 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096c270 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096c280 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096c290 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096c2a0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096c2b0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096c2c0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096c2d0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096c2e0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096c2f0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096c300 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096c310 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096c320 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096c330 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096c340 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096c350 63322061 5f706f73 3b200a20 20696e20 c2 a_pos; . in │ │ │ │ + 0x0096c360 76656332 20615f74 636f6f72 643b200a vec2 a_tcoord; . │ │ │ │ + 0x0096c370 20206f75 74207665 63342076 5f636f6f out vec4 v_coo │ │ │ │ + 0x0096c380 7264733b 200a2020 6f757420 76656334 rds; . out vec4 │ │ │ │ + 0x0096c390 20765f6f 66667365 74303b20 0a20206f v_offset0; . o │ │ │ │ + 0x0096c3a0 75742076 65633420 765f6f66 66736574 ut vec4 v_offset │ │ │ │ + 0x0096c3b0 313b200a 20206f75 74207665 63342076 1; . out vec4 v │ │ │ │ + 0x0096c3c0 5f6f6666 73657432 3b200a20 20756e69 _offset2; . uni │ │ │ │ + 0x0096c3d0 666f726d 20766563 3420755f 6672616d form vec4 u_fram │ │ │ │ + 0x0096c3e0 65627566 6665724d 65747269 63733b20 ebufferMetrics; │ │ │ │ + 0x0096c3f0 0a202023 64656669 6e652053 4d41415f . #define SMAA_ │ │ │ │ + 0x0096c400 4d41585f 53454152 43485f53 54455053 MAX_SEARCH_STEPS │ │ │ │ + 0x0096c410 20382e30 200a2020 636f6e73 74207665 8.0 . const ve │ │ │ │ + 0x0096c420 6334206b 4d617853 65617263 68537465 c4 kMaxSearchSte │ │ │ │ + 0x0096c430 7073203d 20766563 34282d32 2e30202a ps = vec4(-2.0 * │ │ │ │ + 0x0096c440 20534d41 415f4d41 585f5345 41524348 SMAA_MAX_SEARCH │ │ │ │ + 0x0096c450 5f535445 50532c20 322e3020 2a20534d _STEPS, 2.0 * SM │ │ │ │ + 0x0096c460 41415f4d 41585f53 45415243 485f5354 AA_MAX_SEARCH_ST │ │ │ │ + 0x0096c470 4550532c 200a2020 20202020 20202020 EPS, . │ │ │ │ + 0x0096c480 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096c490 20202020 20202020 20202d32 2e30202a -2.0 * │ │ │ │ + 0x0096c4a0 20534d41 415f4d41 585f5345 41524348 SMAA_MAX_SEARCH │ │ │ │ + 0x0096c4b0 5f535445 50532c20 322e3020 202a2053 _STEPS, 2.0 * S │ │ │ │ + 0x0096c4c0 4d41415f 4d41585f 53454152 43485f53 MAA_MAX_SEARCH_S │ │ │ │ + 0x0096c4d0 54455053 293b200a 2020636f 6e737420 TEPS); . const │ │ │ │ + 0x0096c4e0 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ + 0x0096c4f0 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ + 0x0096c500 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ + 0x0096c510 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x0096c520 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x0096c530 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x0096c540 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ + 0x0096c550 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x0096c560 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096c570 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ + 0x0096c580 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ + 0x0096c590 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ + 0x0096c5a0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0096c5b0 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ + 0x0096c5c0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x0096c5d0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096c5e0 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x0096c5f0 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ + 0x0096c600 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096c610 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ + 0x0096c620 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ + 0x0096c630 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x0096c640 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0096c650 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ + 0x0096c660 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ + 0x0096c670 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x0096c680 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ + 0x0096c690 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ + 0x0096c6a0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x0096c6b0 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x0096c6c0 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ + 0x0096c6d0 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ + 0x0096c6e0 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ + 0x0096c6f0 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ + 0x0096c700 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x0096c710 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x0096c720 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x0096c730 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ + 0x0096c740 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ + 0x0096c750 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ + 0x0096c760 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ + 0x0096c770 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ + 0x0096c780 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096c790 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ + 0x0096c7a0 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ + 0x0096c7b0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x0096c7c0 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ + 0x0096c7d0 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ + 0x0096c7e0 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0096c7f0 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ + 0x0096c800 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ + 0x0096c810 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ + 0x0096c820 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x0096c830 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ + 0x0096c840 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ + 0x0096c850 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ + 0x0096c860 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ + 0x0096c870 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ + 0x0096c880 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ + 0x0096c890 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ + 0x0096c8a0 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ + 0x0096c8b0 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ + 0x0096c8c0 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ + 0x0096c8d0 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ + 0x0096c8e0 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x0096c8f0 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x0096c900 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ + 0x0096c910 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ + 0x0096c920 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x0096c930 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ + 0x0096c940 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ + 0x0096c950 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ + 0x0096c960 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ + 0x0096c970 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ + 0x0096c980 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ + 0x0096c990 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ + 0x0096c9a0 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ + 0x0096c9b0 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x0096c9c0 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ + 0x0096c9d0 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x0096c9e0 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ + 0x0096c9f0 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ + 0x0096ca00 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x0096ca10 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ + 0x0096ca20 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ + 0x0096ca30 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ + 0x0096ca40 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0096ca50 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ + 0x0096ca60 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ + 0x0096ca70 0a20207b 200a2020 2020765f 636f6f72 . { . v_coor │ │ │ │ + 0x0096ca80 6473203d 20766563 3428615f 74636f6f ds = vec4(a_tcoo │ │ │ │ + 0x0096ca90 72642c20 615f7463 6f6f7264 202a2075 rd, a_tcoord * u │ │ │ │ + 0x0096caa0 5f667261 6d656275 66666572 4d657472 _framebufferMetr │ │ │ │ + 0x0096cab0 6963732e 7a77293b 200a2020 2020765f ics.zw); . v_ │ │ │ │ + 0x0096cac0 6f666673 65743020 3d20755f 6672616d offset0 = u_fram │ │ │ │ + 0x0096cad0 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x0096cae0 79787920 2a207665 6334282d 302e3235 yxy * vec4(-0.25 │ │ │ │ + 0x0096caf0 2c202d30 2e313235 2c20312e 32352c20 , -0.125, 1.25, │ │ │ │ + 0x0096cb00 2d302e31 32352920 2b20615f 74636f6f -0.125) + a_tcoo │ │ │ │ + 0x0096cb10 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ + 0x0096cb20 6f666673 65743120 3d20755f 6672616d offset1 = u_fram │ │ │ │ + 0x0096cb30 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x0096cb40 79787920 2a207665 6334282d 302e3132 yxy * vec4(-0.12 │ │ │ │ + 0x0096cb50 352c202d 302e3235 2c202d30 2e313235 5, -0.25, -0.125 │ │ │ │ + 0x0096cb60 2c20312e 32352920 2b20615f 74636f6f , 1.25) + a_tcoo │ │ │ │ + 0x0096cb70 72642e78 7978793b 200a2020 2020765f rd.xyxy; . v_ │ │ │ │ + 0x0096cb80 6f666673 65743220 3d20755f 6672616d offset2 = u_fram │ │ │ │ + 0x0096cb90 65627566 6665724d 65747269 63732e78 ebufferMetrics.x │ │ │ │ + 0x0096cba0 78797920 2a206b4d 61785365 61726368 xyy * kMaxSearch │ │ │ │ + 0x0096cbb0 53746570 73202b20 76656334 28765f6f Steps + vec4(v_o │ │ │ │ + 0x0096cbc0 66667365 74302e78 7a2c2076 5f6f6666 ffset0.xz, v_off │ │ │ │ + 0x0096cbd0 73657431 2e797729 3b200a20 20202067 set1.yw); . g │ │ │ │ + 0x0096cbe0 6c5f506f 73697469 6f6e203d 20766563 l_Position = vec │ │ │ │ + 0x0096cbf0 3428615f 706f732c 20302e30 2c20312e 4(a_pos, 0.0, 1. │ │ │ │ + 0x0096cc00 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ + 0x0096cc10 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096cc20 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096cc30 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096cc40 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096cc50 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096cc60 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096cc70 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096cc80 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096cc90 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096cca0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096ccb0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096ccc0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096ccd0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096cce0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096ccf0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096cd00 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096cd10 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096cd20 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096cd30 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096cd40 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096cd50 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096cd60 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0096cd70 2020696e 20766563 3220615f 6e6f726d in vec2 a_norm │ │ │ │ + 0x0096cd80 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x0096cd90 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x0096cda0 200a2020 696e2076 65633320 615f6c65 . in vec3 a_le │ │ │ │ + 0x0096cdb0 6e677468 3b200a20 20236966 64656620 ngth; . #ifdef │ │ │ │ + 0x0096cdc0 454e4142 4c455f56 5446200a 20206f75 ENABLE_VTF . ou │ │ │ │ + 0x0096cdd0 74204c4f 575f5020 76656334 20765f63 t LOW_P vec4 v_c │ │ │ │ + 0x0096cde0 6f6c6f72 3b200a20 2023656c 7365200a olor; . #else . │ │ │ │ + 0x0096cdf0 20206f75 74207665 63322076 5f636f6c out vec2 v_col │ │ │ │ + 0x0096ce00 6f725465 78436f6f 72643b20 0a202023 orTexCoord; . # │ │ │ │ + 0x0096ce10 656e6469 66200a20 206f7574 20666c6f endif . out flo │ │ │ │ + 0x0096ce20 61742076 5f6c656e 67746859 3b200a20 at v_lengthY; . │ │ │ │ + 0x0096ce30 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x0096ce40 6d6f6465 6c566965 773b200a 2020756e modelView; . un │ │ │ │ + 0x0096ce50 69666f72 6d206d61 74342075 5f70726f iform mat4 u_pro │ │ │ │ + 0x0096ce60 6a656374 696f6e3b 200a2020 756e6966 jection; . unif │ │ │ │ + 0x0096ce70 6f726d20 6d617434 20755f70 69766f74 orm mat4 u_pivot │ │ │ │ + 0x0096ce80 5472616e 73666f72 6d3b200a 2020756e Transform; . un │ │ │ │ + 0x0096ce90 69666f72 6d207665 63342075 5f706f73 iform vec4 u_pos │ │ │ │ + 0x0096cea0 6974696f 6e3b200a 2020756e 69666f72 ition; . unifor │ │ │ │ + 0x0096ceb0 6d207665 63322075 5f6c696e 65506172 m vec2 u_linePar │ │ │ │ + 0x0096cec0 616d733b 200a2020 756e6966 6f726d20 ams; . uniform │ │ │ │ + 0x0096ced0 666c6f61 7420755f 61636375 72616379 float u_accuracy │ │ │ │ + 0x0096cee0 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0096cef0 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x0096cf00 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x0096cf10 6f706163 6974793b 200a2020 756e6966 opacity; . unif │ │ │ │ + 0x0096cf20 6f726d20 666c6f61 7420755f 617a696d orm float u_azim │ │ │ │ + 0x0096cf30 75743b20 0a202023 69666465 6620454e ut; . #ifdef EN │ │ │ │ + 0x0096cf40 41424c45 5f565446 200a2020 756e6966 ABLE_VTF . unif │ │ │ │ + 0x0096cf50 6f726d20 73616d70 6c657232 4420755f orm sampler2D u_ │ │ │ │ + 0x0096cf60 636f6c6f 72546578 3b200a20 2023656e colorTex; . #en │ │ │ │ + 0x0096cf70 64696620 0a202063 6f6e7374 20666c6f dif . const flo │ │ │ │ + 0x0096cf80 6174206b 416e7469 616c6961 73696e67 at kAntialiasing │ │ │ │ + 0x0096cf90 54687265 73686f6c 64203d20 302e3932 Threshold = 0.92 │ │ │ │ + 0x0096cfa0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x0096cfb0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x0096cfc0 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x0096cfd0 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x0096cfe0 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x0096cff0 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x0096d000 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x0096d010 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x0096d020 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x0096d030 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x0096d040 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x0096d050 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x0096d060 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x0096d070 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x0096d080 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x0096d090 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x0096d0a0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x0096d0b0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x0096d0c0 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x0096d0d0 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x0096d0e0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096d0f0 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x0096d100 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x0096d110 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x0096d120 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x0096d130 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x0096d140 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x0096d150 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x0096d160 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x0096d170 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x0096d180 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x0096d190 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x0096d1a0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x0096d1b0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x0096d1c0 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x0096d1d0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x0096d1e0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x0096d1f0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x0096d200 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x0096d210 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x0096d220 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x0096d230 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x0096d240 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x0096d250 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x0096d260 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x0096d270 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x0096d280 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x0096d290 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x0096d2a0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x0096d2b0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x0096d2c0 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x0096d2d0 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x0096d2e0 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x0096d2f0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x0096d300 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x0096d310 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x0096d320 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x0096d330 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x0096d340 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x0096d350 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x0096d360 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x0096d370 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x0096d380 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x0096d390 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x0096d3a0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x0096d3b0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x0096d3c0 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x0096d3d0 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x0096d3e0 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x0096d3f0 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x0096d400 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x0096d410 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x0096d420 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x0096d430 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x0096d440 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x0096d450 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x0096d460 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x0096d470 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x0096d480 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x0096d490 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x0096d4a0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x0096d4b0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x0096d4c0 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x0096d4d0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x0096d4e0 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x0096d4f0 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x0096d500 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x0096d510 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x0096d520 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x0096d530 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x0096d540 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ + 0x0096d550 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ + 0x0096d560 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x0096d570 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ + 0x0096d580 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ + 0x0096d590 200a2020 20207665 6332206c 656e203d . vec2 len = │ │ │ │ + 0x0096d5a0 20766563 3228615f 6c656e67 74682e78 vec2(a_length.x │ │ │ │ + 0x0096d5b0 2c20615f 6c656e67 74682e7a 293b200a , a_length.z); . │ │ │ │ + 0x0096d5c0 20202020 69662028 646f7428 615f6e6f if (dot(a_no │ │ │ │ + 0x0096d5d0 726d616c 2c20615f 6e6f726d 616c2920 rmal, a_normal) │ │ │ │ + 0x0096d5e0 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ + 0x0096d5f0 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ + 0x0096d600 3d20615f 6e6f726d 616c202a 20755f6c = a_normal * u_l │ │ │ │ + 0x0096d610 696e6550 6172616d 732e783b 200a2020 ineParams.x; . │ │ │ │ + 0x0096d620 20202020 7472616e 73666f72 6d656441 transformedA │ │ │ │ + 0x0096d630 78697350 6f73203d 2063616c 634c696e xisPos = calcLin │ │ │ │ + 0x0096d640 65547261 6e73666f 726d6564 41786973 eTransformedAxis │ │ │ │ + 0x0096d650 506f7328 7472616e 73666f72 6d656441 Pos(transformedA │ │ │ │ + 0x0096d660 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ + 0x0096d670 6f6e2e78 79202b20 6e6f726d 2c200a20 on.xy + norm, . │ │ │ │ + 0x0096d680 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096d690 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096d6a0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096d6b0 20202020 20755f6d 6f64656c 56696577 u_modelView │ │ │ │ + 0x0096d6c0 2c206c65 6e677468 286e6f72 6d29293b , length(norm)); │ │ │ │ + 0x0096d6d0 200a2020 20202020 69662028 755f6c69 . if (u_li │ │ │ │ + 0x0096d6e0 6e655061 72616d73 2e792021 3d20302e neParams.y != 0. │ │ │ │ + 0x0096d6f0 3029200a 20202020 20202020 6c656e20 0) . len │ │ │ │ + 0x0096d700 3d207665 63322861 5f6c656e 6774682e = vec2(a_length. │ │ │ │ + 0x0096d710 78202b20 615f6c65 6e677468 2e79202a x + a_length.y * │ │ │ │ + 0x0096d720 20755f6c 696e6550 6172616d 732e792c u_lineParams.y, │ │ │ │ + 0x0096d730 20615f6c 656e6774 682e7a29 3b200a20 a_length.z); . │ │ │ │ + 0x0096d740 2020207d 200a2020 23696664 65662045 } . #ifdef E │ │ │ │ + 0x0096d750 4e41424c 455f5654 46200a20 20202076 NABLE_VTF . v │ │ │ │ + 0x0096d760 5f636f6c 6f72203d 20746578 74757265 _color = texture │ │ │ │ + 0x0096d770 28755f63 6f6c6f72 5465782c 20615f63 (u_colorTex, a_c │ │ │ │ + 0x0096d780 6f6c6f72 54657843 6f6f7264 73293b20 olorTexCoords); │ │ │ │ + 0x0096d790 0a202023 656c7365 200a2020 2020765f . #else . v_ │ │ │ │ + 0x0096d7a0 636f6c6f 72546578 436f6f72 64203d20 colorTexCoord = │ │ │ │ + 0x0096d7b0 615f636f 6c6f7254 6578436f 6f726473 a_colorTexCoords │ │ │ │ + 0x0096d7c0 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0096d7d0 20765f6c 656e6774 6859203d 206c656e v_lengthY = len │ │ │ │ + 0x0096d7e0 2e793b20 0a202020 20766563 3420706f .y; . vec4 po │ │ │ │ + 0x0096d7f0 73203d20 76656334 28747261 6e73666f s = vec4(transfo │ │ │ │ + 0x0096d800 726d6564 41786973 506f732c 20615f70 rmedAxisPos, a_p │ │ │ │ + 0x0096d810 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ + 0x0096d820 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ + 0x0096d830 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x0096d840 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ + 0x0096d850 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ + 0x0096d860 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x0096d870 30293b20 0a20207d 200a0000 00000000 0); . } ....... │ │ │ │ + 0x0096d880 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096d890 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096d8a0 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096d8b0 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096d8c0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096d8d0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096d8e0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096d8f0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096d900 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096d910 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096d920 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096d930 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096d940 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096d950 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096d960 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096d970 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096d980 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096d990 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096d9a0 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096d9b0 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096d9c0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096d9d0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x0096d9e0 2020696e 20766563 3220615f 636f6c6f in vec2 a_colo │ │ │ │ + 0x0096d9f0 72546578 436f6f72 643b200a 20206f75 rTexCoord; . ou │ │ │ │ + 0x0096da00 74207665 63322076 5f636f6c 6f725465 t vec2 v_colorTe │ │ │ │ + 0x0096da10 78436f6f 72643b20 0a202075 6e69666f xCoord; . unifo │ │ │ │ + 0x0096da20 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x0096da30 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x0096da40 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x0096da50 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x0096da60 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x0096da70 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x0096da80 76656334 20755f74 72616666 69635061 vec4 u_trafficPa │ │ │ │ + 0x0096da90 72616d73 3b200a20 20756e69 666f726d rams; . uniform │ │ │ │ + 0x0096daa0 20766563 3420755f 6f75746c 696e6543 vec4 u_outlineC │ │ │ │ + 0x0096dab0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ + 0x0096dac0 20766563 3420755f 6c696768 74417272 vec4 u_lightArr │ │ │ │ + 0x0096dad0 6f77436f 6c6f723b 200a2020 756e6966 owColor; . unif │ │ │ │ + 0x0096dae0 6f726d20 76656334 20755f64 61726b41 orm vec4 u_darkA │ │ │ │ + 0x0096daf0 72726f77 436f6c6f 723b200a 2020756e rrowColor; . un │ │ │ │ + 0x0096db00 69666f72 6d20666c 6f617420 755f6f75 iform float u_ou │ │ │ │ + 0x0096db10 746c696e 653b200a 2020756e 69666f72 tline; . unifor │ │ │ │ + 0x0096db20 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x0096db30 793b200a 2020636f 6e737420 666c6f61 y; . const floa │ │ │ │ + 0x0096db40 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x0096db50 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x0096db60 20766563 34206170 706c7950 69766f74 vec4 applyPivot │ │ │ │ + 0x0096db70 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x0096db80 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x0096db90 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x0096dba0 20706976 6f745265 616c5a29 200a2020 pivotRealZ) . │ │ │ │ + 0x0096dbb0 7b200a20 20202076 65633420 7472616e { . vec4 tran │ │ │ │ + 0x0096dbc0 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x0096dbd0 69766f74 3b200a20 20202066 6c6f6174 ivot; . float │ │ │ │ + 0x0096dbe0 2077203d 20747261 6e73666f 726d6564 w = transformed │ │ │ │ + 0x0096dbf0 5069766f 742e773b 200a2020 20207472 Pivot.w; . tr │ │ │ │ + 0x0096dc00 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x0096dc10 7977203d 20287069 766f7454 72616e73 yw = (pivotTrans │ │ │ │ + 0x0096dc20 666f726d 202a2076 65633428 7472616e form * vec4(tran │ │ │ │ + 0x0096dc30 73666f72 6d656450 69766f74 2e78792c sformedPivot.xy, │ │ │ │ + 0x0096dc40 20706976 6f745265 616c5a2c 20772929 pivotRealZ, w)) │ │ │ │ + 0x0096dc50 2e787977 3b200a20 20202074 72616e73 .xyw; . trans │ │ │ │ + 0x0096dc60 666f726d 65645069 766f742e 7a202a3d formedPivot.z *= │ │ │ │ + 0x0096dc70 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096dc80 742e7720 2f20773b 200a2020 23696664 t.w / w; . #ifd │ │ │ │ + 0x0096dc90 65662056 554c4b41 4e200a20 20202074 ef VULKAN . t │ │ │ │ + 0x0096dca0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096dcb0 79203d20 2d747261 6e73666f 726d6564 y = -transformed │ │ │ │ + 0x0096dcc0 5069766f 742e793b 200a2020 20207472 Pivot.y; . tr │ │ │ │ + 0x0096dcd0 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x0096dce0 203d2028 7472616e 73666f72 6d656450 = (transformedP │ │ │ │ + 0x0096dcf0 69766f74 2e7a2020 2b207472 616e7366 ivot.z + transf │ │ │ │ + 0x0096dd00 6f726d65 64506976 6f742e77 29202f20 ormedPivot.w) / │ │ │ │ + 0x0096dd10 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x0096dd20 20202020 72657475 726e2074 72616e73 return trans │ │ │ │ + 0x0096dd30 666f726d 65645069 766f743b 200a2020 formedPivot; . │ │ │ │ + 0x0096dd40 7d200a20 20766563 34206170 706c7942 } . vec4 applyB │ │ │ │ + 0x0096dd50 696c6c62 6f617264 5069766f 74547261 illboardPivotTra │ │ │ │ + 0x0096dd60 6e73666f 726d2876 65633420 7069766f nsform(vec4 pivo │ │ │ │ + 0x0096dd70 742c206d 61743420 7069766f 74547261 t, mat4 pivotTra │ │ │ │ + 0x0096dd80 6e73666f 726d2c20 666c6f61 74207069 nsform, float pi │ │ │ │ + 0x0096dd90 766f7452 65616c5a 2c207665 6332206f votRealZ, vec2 o │ │ │ │ + 0x0096dda0 66667365 7429200a 20207b20 0a202020 ffset) . { . │ │ │ │ + 0x0096ddb0 20666c6f 6174206c 6f676963 5a203d20 float logicZ = │ │ │ │ + 0x0096ddc0 7069766f 742e7a20 2f207069 766f742e pivot.z / pivot. │ │ │ │ + 0x0096ddd0 773b200a 20202020 76656334 20747261 w; . vec4 tra │ │ │ │ + 0x0096dde0 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x0096ddf0 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0096de00 20766563 34287069 766f742e 78792c20 vec4(pivot.xy, │ │ │ │ + 0x0096de10 7069766f 74526561 6c5a2c20 7069766f pivotRealZ, pivo │ │ │ │ + 0x0096de20 742e7729 3b200a20 20202076 65633420 t.w); . vec4 │ │ │ │ + 0x0096de30 7363616c 65203d20 7069766f 74547261 scale = pivotTra │ │ │ │ + 0x0096de40 6e73666f 726d202a 20766563 3428312e nsform * vec4(1. │ │ │ │ + 0x0096de50 302c202d 312e302c 20302e30 2c20312e 0, -1.0, 0.0, 1. │ │ │ │ + 0x0096de60 30293b20 0a202020 20766563 3420706f 0); . vec4 po │ │ │ │ + 0x0096de70 73697469 6f6e203d 20766563 34287472 sition = vec4(tr │ │ │ │ + 0x0096de80 616e7366 6f726d65 64506976 6f742e78 ansformedPivot.x │ │ │ │ + 0x0096de90 79202f20 7472616e 73666f72 6d656450 y / transformedP │ │ │ │ + 0x0096dea0 69766f74 2e772c20 6c6f6769 635a2c20 ivot.w, logicZ, │ │ │ │ + 0x0096deb0 312e3029 202b2076 65633428 6f666673 1.0) + vec4(offs │ │ │ │ + 0x0096dec0 6574202f 20736361 6c652e77 202a2073 et / scale.w * s │ │ │ │ + 0x0096ded0 63616c65 2e782c20 302e302c 20302e30 cale.x, 0.0, 0.0 │ │ │ │ + 0x0096dee0 293b200a 20202369 66646566 2056554c ); . #ifdef VUL │ │ │ │ + 0x0096def0 4b414e20 0a202020 20706f73 6974696f KAN . positio │ │ │ │ + 0x0096df00 6e2e7920 3d202d70 6f736974 696f6e2e n.y = -position. │ │ │ │ + 0x0096df10 793b200a 20202020 706f7369 74696f6e y; . position │ │ │ │ + 0x0096df20 2e7a203d 2028706f 73697469 6f6e2e7a .z = (position.z │ │ │ │ + 0x0096df30 20202b20 706f7369 74696f6e 2e772920 + position.w) │ │ │ │ + 0x0096df40 2f20322e 303b200a 20202365 6e646966 / 2.0; . #endif │ │ │ │ + 0x0096df50 200a2020 20207265 7475726e 20706f73 . return pos │ │ │ │ + 0x0096df60 6974696f 6e3b200a 20207d20 0a202076 ition; . } . v │ │ │ │ + 0x0096df70 65633220 63616c63 4c696e65 5472616e ec2 calcLineTran │ │ │ │ + 0x0096df80 73666f72 6d656441 78697350 6f732876 sformedAxisPos(v │ │ │ │ + 0x0096df90 65633220 6f726967 696e616c 41786973 ec2 originalAxis │ │ │ │ + 0x0096dfa0 506f732c 20766563 32207368 69667465 Pos, vec2 shifte │ │ │ │ + 0x0096dfb0 64506f73 2c206d61 7434206d 6f64656c dPos, mat4 model │ │ │ │ + 0x0096dfc0 56696577 2c20666c 6f617420 68616c66 View, float half │ │ │ │ + 0x0096dfd0 57696474 6829200a 20207b20 0a202020 Width) . { . │ │ │ │ + 0x0096dfe0 20766563 32207020 3d202876 65633428 vec2 p = (vec4( │ │ │ │ + 0x0096dff0 73686966 74656450 6f732c20 302e302c shiftedPos, 0.0, │ │ │ │ + 0x0096e000 20312e30 29202a20 6d6f6465 6c566965 1.0) * modelVie │ │ │ │ + 0x0096e010 77292e78 793b200a 20202020 76656332 w).xy; . vec2 │ │ │ │ + 0x0096e020 2064203d 2070202d 206f7269 67696e61 d = p - origina │ │ │ │ + 0x0096e030 6c417869 73506f73 3b200a20 20202069 lAxisPos; . i │ │ │ │ + 0x0096e040 66202864 6f742864 2c206429 20213d20 f (dot(d, d) != │ │ │ │ + 0x0096e050 302e3029 200a2020 20202020 72657475 0.0) . retu │ │ │ │ + 0x0096e060 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x0096e070 6f73202b 206e6f72 6d616c69 7a652864 os + normalize(d │ │ │ │ + 0x0096e080 29202a20 68616c66 57696474 683b200a ) * halfWidth; . │ │ │ │ + 0x0096e090 20202020 656c7365 200a2020 20202020 else . │ │ │ │ + 0x0096e0a0 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x0096e0b0 78697350 6f733b20 0a20207d 200a2020 xisPos; . } . │ │ │ │ + 0x0096e0c0 766f6964 206d6169 6e282920 0a20207b void main() . { │ │ │ │ + 0x0096e0d0 200a2020 20207665 63322074 72616e73 . vec2 trans │ │ │ │ + 0x0096e0e0 666f726d 65644178 6973506f 73203d20 formedAxisPos = │ │ │ │ + 0x0096e0f0 28766563 3428615f 706f7369 74696f6e (vec4(a_position │ │ │ │ + 0x0096e100 2e78792c 20302e30 2c20312e 3029202a .xy, 0.0, 1.0) * │ │ │ │ + 0x0096e110 20755f6d 6f64656c 56696577 292e7879 u_modelView).xy │ │ │ │ + 0x0096e120 3b200a20 20202076 65633420 706f7320 ; . vec4 pos │ │ │ │ + 0x0096e130 3d207665 63342874 72616e73 666f726d = vec4(transform │ │ │ │ + 0x0096e140 65644178 6973506f 732c2061 5f706f73 edAxisPos, a_pos │ │ │ │ + 0x0096e150 6974696f 6e2e7a2c 20312e30 29202a20 ition.z, 1.0) * │ │ │ │ + 0x0096e160 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x0096e170 20202076 5f636f6c 6f725465 78436f6f v_colorTexCoo │ │ │ │ + 0x0096e180 7264203d 20615f63 6f6c6f72 54657843 rd = a_colorTexC │ │ │ │ + 0x0096e190 6f6f7264 3b200a20 20202067 6c5f506f oord; . gl_Po │ │ │ │ + 0x0096e1a0 73697469 6f6e203d 20617070 6c795069 sition = applyPi │ │ │ │ + 0x0096e1b0 766f7454 72616e73 666f726d 28706f73 votTransform(pos │ │ │ │ + 0x0096e1c0 2c20755f 7069766f 74547261 6e73666f , u_pivotTransfo │ │ │ │ + 0x0096e1d0 726d2c20 302e3029 3b200a20 207d200a rm, 0.0); . } . │ │ │ │ + 0x0096e1e0 00000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x0096e1f0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x0096e200 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x0096e210 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x0096e220 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096e230 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x0096e240 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x0096e250 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x0096e260 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x0096e270 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x0096e280 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x0096e290 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x0096e2a0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x0096e2b0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x0096e2c0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x0096e2d0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x0096e2e0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x0096e2f0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x0096e300 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x0096e310 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x0096e320 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x0096e330 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x0096e340 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x0096e350 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x0096e360 6e207665 63332061 5f6c656e 6774683b n vec3 a_length; │ │ │ │ + 0x0096e370 200a2020 696e2076 65633420 615f636f . in vec4 a_co │ │ │ │ + 0x0096e380 6c6f723b 200a2020 6f757420 76656333 lor; . out vec3 │ │ │ │ + 0x0096e390 20765f6c 656e6774 683b200a 20206f75 v_length; . ou │ │ │ │ + 0x0096e3a0 74207665 63342076 5f636f6c 6f723b20 t vec4 v_color; │ │ │ │ + 0x0096e3b0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0096e3c0 755f6d6f 64656c56 6965773b 200a2020 u_modelView; . │ │ │ │ + 0x0096e3d0 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0096e3e0 726f6a65 6374696f 6e3b200a 2020756e rojection; . un │ │ │ │ + 0x0096e3f0 69666f72 6d206d61 74342075 5f706976 iform mat4 u_piv │ │ │ │ + 0x0096e400 6f745472 616e7366 6f726d3b 200a2020 otTransform; . │ │ │ │ + 0x0096e410 756e6966 6f726d20 76656334 20755f72 uniform vec4 u_r │ │ │ │ + 0x0096e420 6f757465 50617261 6d733b20 0a202075 outeParams; . u │ │ │ │ + 0x0096e430 6e69666f 726d2076 65633420 755f636f niform vec4 u_co │ │ │ │ + 0x0096e440 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x0096e450 76656334 20755f6d 61736b43 6f6c6f72 vec4 u_maskColor │ │ │ │ + 0x0096e460 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x0096e470 3420755f 6f75746c 696e6543 6f6c6f72 4 u_outlineColor │ │ │ │ + 0x0096e480 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x0096e490 3420755f 66616b65 436f6c6f 723b200a 4 u_fakeColor; . │ │ │ │ + 0x0096e4a0 2020756e 69666f72 6d207665 63342075 uniform vec4 u │ │ │ │ + 0x0096e4b0 5f66616b 654f7574 6c696e65 436f6c6f _fakeOutlineColo │ │ │ │ + 0x0096e4c0 723b200a 2020756e 69666f72 6d207665 r; . uniform ve │ │ │ │ + 0x0096e4d0 63322075 5f66616b 65426f72 64657273 c2 u_fakeBorders │ │ │ │ + 0x0096e4e0 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x0096e4f0 3220755f 70617474 65726e3b 200a2020 2 u_pattern; . │ │ │ │ + 0x0096e500 756e6966 6f726d20 76656332 20755f61 uniform vec2 u_a │ │ │ │ + 0x0096e510 6e676c65 436f7353 696e3b20 0a202075 ngleCosSin; . u │ │ │ │ + 0x0096e520 6e69666f 726d2066 6c6f6174 20755f61 niform float u_a │ │ │ │ + 0x0096e530 72726f77 48616c66 57696474 683b200a rrowHalfWidth; . │ │ │ │ + 0x0096e540 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0096e550 755f6f70 61636974 793b200a 2020636f u_opacity; . co │ │ │ │ + 0x0096e560 6e737420 666c6f61 74206b53 68617065 nst float kShape │ │ │ │ + 0x0096e570 436f6f72 64536361 6c617220 3d203130 CoordScalar = 10 │ │ │ │ + 0x0096e580 30302e30 3b200a20 20766563 34206170 00.0; . vec4 ap │ │ │ │ + 0x0096e590 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x0096e5a0 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0096e5b0 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0096e5c0 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0096e5d0 616c5a29 200a2020 7b200a20 20202076 alZ) . { . v │ │ │ │ + 0x0096e5e0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x0096e5f0 69766f74 203d2070 69766f74 3b200a20 ivot = pivot; . │ │ │ │ + 0x0096e600 20202066 6c6f6174 2077203d 20747261 float w = tra │ │ │ │ + 0x0096e610 6e73666f 726d6564 5069766f 742e773b nsformedPivot.w; │ │ │ │ + 0x0096e620 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0096e630 64506976 6f742e78 7977203d 20287069 dPivot.xyw = (pi │ │ │ │ + 0x0096e640 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x0096e650 65633428 7472616e 73666f72 6d656450 ec4(transformedP │ │ │ │ + 0x0096e660 69766f74 2e78792c 20706976 6f745265 ivot.xy, pivotRe │ │ │ │ + 0x0096e670 616c5a2c 20772929 2e787977 3b200a20 alZ, w)).xyw; . │ │ │ │ + 0x0096e680 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x0096e690 766f742e 7a202a3d 20747261 6e73666f vot.z *= transfo │ │ │ │ + 0x0096e6a0 726d6564 5069766f 742e7720 2f20773b rmedPivot.w / w; │ │ │ │ + 0x0096e6b0 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x0096e6c0 4e200a20 20202074 72616e73 666f726d N . transform │ │ │ │ + 0x0096e6d0 65645069 766f742e 79203d20 2d747261 edPivot.y = -tra │ │ │ │ + 0x0096e6e0 6e73666f 726d6564 5069766f 742e793b nsformedPivot.y; │ │ │ │ + 0x0096e6f0 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0096e700 64506976 6f742e7a 203d2028 7472616e dPivot.z = (tran │ │ │ │ + 0x0096e710 73666f72 6d656450 69766f74 2e7a2020 sformedPivot.z │ │ │ │ + 0x0096e720 2b207472 616e7366 6f726d65 64506976 + transformedPiv │ │ │ │ + 0x0096e730 6f742e77 29202f20 322e303b 200a2020 ot.w) / 2.0; . │ │ │ │ + 0x0096e740 23656e64 6966200a 20202020 72657475 #endif . retu │ │ │ │ + 0x0096e750 726e2074 72616e73 666f726d 65645069 rn transformedPi │ │ │ │ + 0x0096e760 766f743b 200a2020 7d200a20 20766563 vot; . } . vec │ │ │ │ + 0x0096e770 34206170 706c7942 696c6c62 6f617264 4 applyBillboard │ │ │ │ + 0x0096e780 5069766f 74547261 6e73666f 726d2876 PivotTransform(v │ │ │ │ + 0x0096e790 65633420 7069766f 742c206d 61743420 ec4 pivot, mat4 │ │ │ │ + 0x0096e7a0 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x0096e7b0 666c6f61 74207069 766f7452 65616c5a float pivotRealZ │ │ │ │ + 0x0096e7c0 2c207665 6332206f 66667365 7429200a , vec2 offset) . │ │ │ │ + 0x0096e7d0 20207b20 0a202020 20666c6f 6174206c { . float l │ │ │ │ + 0x0096e7e0 6f676963 5a203d20 7069766f 742e7a20 ogicZ = pivot.z │ │ │ │ + 0x0096e7f0 2f207069 766f742e 773b200a 20202020 / pivot.w; . │ │ │ │ + 0x0096e800 76656334 20747261 6e73666f 726d6564 vec4 transformed │ │ │ │ + 0x0096e810 5069766f 74203d20 7069766f 74547261 Pivot = pivotTra │ │ │ │ + 0x0096e820 6e73666f 726d202a 20766563 34287069 nsform * vec4(pi │ │ │ │ + 0x0096e830 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x0096e840 6c5a2c20 7069766f 742e7729 3b200a20 lZ, pivot.w); . │ │ │ │ + 0x0096e850 20202076 65633420 7363616c 65203d20 vec4 scale = │ │ │ │ + 0x0096e860 7069766f 74547261 6e73666f 726d202a pivotTransform * │ │ │ │ + 0x0096e870 20766563 3428312e 302c202d 312e302c vec4(1.0, -1.0, │ │ │ │ + 0x0096e880 20302e30 2c20312e 30293b20 0a202020 0.0, 1.0); . │ │ │ │ + 0x0096e890 20766563 3420706f 73697469 6f6e203d vec4 position = │ │ │ │ + 0x0096e8a0 20766563 34287472 616e7366 6f726d65 vec4(transforme │ │ │ │ + 0x0096e8b0 64506976 6f742e78 79202f20 7472616e dPivot.xy / tran │ │ │ │ + 0x0096e8c0 73666f72 6d656450 69766f74 2e772c20 sformedPivot.w, │ │ │ │ + 0x0096e8d0 6c6f6769 635a2c20 312e3029 202b2076 logicZ, 1.0) + v │ │ │ │ + 0x0096e8e0 65633428 6f666673 6574202f 20736361 ec4(offset / sca │ │ │ │ + 0x0096e8f0 6c652e77 202a2073 63616c65 2e782c20 le.w * scale.x, │ │ │ │ + 0x0096e900 302e302c 20302e30 293b200a 20202369 0.0, 0.0); . #i │ │ │ │ + 0x0096e910 66646566 2056554c 4b414e20 0a202020 fdef VULKAN . │ │ │ │ + 0x0096e920 20706f73 6974696f 6e2e7920 3d202d70 position.y = -p │ │ │ │ + 0x0096e930 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x0096e940 706f7369 74696f6e 2e7a203d 2028706f position.z = (po │ │ │ │ + 0x0096e950 73697469 6f6e2e7a 20202b20 706f7369 sition.z + posi │ │ │ │ + 0x0096e960 74696f6e 2e772920 2f20322e 303b200a tion.w) / 2.0; . │ │ │ │ + 0x0096e970 20202365 6e646966 200a2020 20207265 #endif . re │ │ │ │ + 0x0096e980 7475726e 20706f73 6974696f 6e3b200a turn position; . │ │ │ │ + 0x0096e990 20207d20 0a202076 65633220 63616c63 } . vec2 calc │ │ │ │ + 0x0096e9a0 4c696e65 5472616e 73666f72 6d656441 LineTransformedA │ │ │ │ + 0x0096e9b0 78697350 6f732876 65633220 6f726967 xisPos(vec2 orig │ │ │ │ + 0x0096e9c0 696e616c 41786973 506f732c 20766563 inalAxisPos, vec │ │ │ │ + 0x0096e9d0 32207368 69667465 64506f73 2c206d61 2 shiftedPos, ma │ │ │ │ + 0x0096e9e0 7434206d 6f64656c 56696577 2c20666c t4 modelView, fl │ │ │ │ + 0x0096e9f0 6f617420 68616c66 57696474 6829200a oat halfWidth) . │ │ │ │ + 0x0096ea00 20207b20 0a202020 20766563 32207020 { . vec2 p │ │ │ │ + 0x0096ea10 3d202876 65633428 73686966 74656450 = (vec4(shiftedP │ │ │ │ + 0x0096ea20 6f732c20 302e302c 20312e30 29202a20 os, 0.0, 1.0) * │ │ │ │ + 0x0096ea30 6d6f6465 6c566965 77292e78 793b200a modelView).xy; . │ │ │ │ + 0x0096ea40 20202020 76656332 2064203d 2070202d vec2 d = p - │ │ │ │ + 0x0096ea50 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x0096ea60 3b200a20 20202069 66202864 6f742864 ; . if (dot(d │ │ │ │ + 0x0096ea70 2c206429 20213d20 302e3029 200a2020 , d) != 0.0) . │ │ │ │ + 0x0096ea80 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x0096ea90 6e616c41 78697350 6f73202b 206e6f72 nalAxisPos + nor │ │ │ │ + 0x0096eaa0 6d616c69 7a652864 29202a20 68616c66 malize(d) * half │ │ │ │ + 0x0096eab0 57696474 683b200a 20202020 656c7365 Width; . else │ │ │ │ + 0x0096eac0 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x0096ead0 72696769 6e616c41 78697350 6f733b20 riginalAxisPos; │ │ │ │ + 0x0096eae0 0a20207d 200a2020 766f6964 206d6169 . } . void mai │ │ │ │ + 0x0096eaf0 6e282920 0a20207b 200a2020 20207665 n() . { . ve │ │ │ │ + 0x0096eb00 63322074 72616e73 666f726d 65644178 c2 transformedAx │ │ │ │ + 0x0096eb10 6973506f 73203d20 28766563 3428615f isPos = (vec4(a_ │ │ │ │ + 0x0096eb20 706f7369 74696f6e 2e78792c 20302e30 position.xy, 0.0 │ │ │ │ + 0x0096eb30 2c20312e 3029202a 20755f6d 6f64656c , 1.0) * u_model │ │ │ │ + 0x0096eb40 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x0096eb50 65633220 6c656e20 3d207665 63322861 ec2 len = vec2(a │ │ │ │ + 0x0096eb60 5f6c656e 6774682e 782c2061 5f6c656e _length.x, a_len │ │ │ │ + 0x0096eb70 6774682e 7a293b20 0a202020 20696620 gth.z); . if │ │ │ │ + 0x0096eb80 28646f74 28615f6e 6f726d61 6c2c2061 (dot(a_normal, a │ │ │ │ + 0x0096eb90 5f6e6f72 6d616c29 20213d20 302e3029 _normal) != 0.0) │ │ │ │ + 0x0096eba0 200a2020 20207b20 0a202020 20202076 . { . v │ │ │ │ + 0x0096ebb0 65633220 6e6f726d 203d2061 5f6e6f72 ec2 norm = a_nor │ │ │ │ + 0x0096ebc0 6d616c20 2a20755f 726f7574 65506172 mal * u_routePar │ │ │ │ + 0x0096ebd0 616d732e 783b200a 20202020 20207472 ams.x; . tr │ │ │ │ + 0x0096ebe0 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x0096ebf0 203d2063 616c634c 696e6554 72616e73 = calcLineTrans │ │ │ │ + 0x0096ec00 666f726d 65644178 6973506f 73287472 formedAxisPos(tr │ │ │ │ + 0x0096ec10 616e7366 6f726d65 64417869 73506f73 ansformedAxisPos │ │ │ │ + 0x0096ec20 2c20615f 706f7369 74696f6e 2e787920 , a_position.xy │ │ │ │ + 0x0096ec30 2b206e6f 726d2c20 0a202020 20202020 + norm, . │ │ │ │ + 0x0096ec40 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096ec50 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096ec60 20202020 20202020 20202020 20202075 u │ │ │ │ + 0x0096ec70 5f6d6f64 656c5669 65772c20 6c656e67 _modelView, leng │ │ │ │ + 0x0096ec80 7468286e 6f726d29 293b200a 20202020 th(norm)); . │ │ │ │ + 0x0096ec90 20206966 2028755f 726f7574 65506172 if (u_routePar │ │ │ │ + 0x0096eca0 616d732e 7920213d 20302e30 29200a20 ams.y != 0.0) . │ │ │ │ + 0x0096ecb0 20202020 2020206c 656e203d 20766563 len = vec │ │ │ │ + 0x0096ecc0 3228615f 6c656e67 74682e78 202b2061 2(a_length.x + a │ │ │ │ + 0x0096ecd0 5f6c656e 6774682e 79202a20 755f726f _length.y * u_ro │ │ │ │ + 0x0096ece0 75746550 6172616d 732e792c 20615f6c uteParams.y, a_l │ │ │ │ + 0x0096ecf0 656e6774 682e7a29 3b200a20 2020207d ength.z); . } │ │ │ │ + 0x0096ed00 200a2020 2020765f 6c656e67 7468203d . v_length = │ │ │ │ + 0x0096ed10 20766563 33286c65 6e2c2075 5f726f75 vec3(len, u_rou │ │ │ │ + 0x0096ed20 74655061 72616d73 2e7a293b 200a2020 teParams.z); . │ │ │ │ + 0x0096ed30 2020765f 636f6c6f 72203d20 615f636f v_color = a_co │ │ │ │ + 0x0096ed40 6c6f723b 200a2020 20207665 63342070 lor; . vec4 p │ │ │ │ + 0x0096ed50 6f73203d 20766563 34287472 616e7366 os = vec4(transf │ │ │ │ + 0x0096ed60 6f726d65 64417869 73506f73 2c20615f ormedAxisPos, a_ │ │ │ │ + 0x0096ed70 706f7369 74696f6e 2e7a2c20 312e3029 position.z, 1.0) │ │ │ │ + 0x0096ed80 202a2075 5f70726f 6a656374 696f6e3b * u_projection; │ │ │ │ + 0x0096ed90 200a2020 2020676c 5f506f73 6974696f . gl_Positio │ │ │ │ + 0x0096eda0 6e203d20 6170706c 79506976 6f745472 n = applyPivotTr │ │ │ │ + 0x0096edb0 616e7366 6f726d28 706f732c 20755f70 ansform(pos, u_p │ │ │ │ + 0x0096edc0 69766f74 5472616e 73666f72 6d2c2030 ivotTransform, 0 │ │ │ │ + 0x0096edd0 2e30293b 200a2020 7d200a00 00000000 .0); . } ...... │ │ │ │ + 0x0096ede0 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096edf0 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096ee00 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096ee10 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096ee20 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096ee30 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096ee40 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096ee50 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096ee60 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096ee70 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096ee80 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096ee90 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096eea0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096eeb0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096eec0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096eed0 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096eee0 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096eef0 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096ef00 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096ef10 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096ef20 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x0096ef30 63342061 5f706f73 6974696f 6e3b200a c4 a_position; . │ │ │ │ + 0x0096ef40 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x0096ef50 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x0096ef60 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x0096ef70 65633420 765f7261 64697573 3b200a20 ec4 v_radius; . │ │ │ │ + 0x0096ef80 206f7574 20766563 3420765f 636f6c6f out vec4 v_colo │ │ │ │ + 0x0096ef90 723b200a 2020756e 69666f72 6d206d61 r; . uniform ma │ │ │ │ + 0x0096efa0 74342075 5f6d6f64 656c5669 65773b20 t4 u_modelView; │ │ │ │ + 0x0096efb0 0a202075 6e69666f 726d206d 61743420 . uniform mat4 │ │ │ │ + 0x0096efc0 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x0096efd0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x0096efe0 7069766f 74547261 6e73666f 726d3b20 pivotTransform; │ │ │ │ + 0x0096eff0 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x0096f000 755f726f 75746550 6172616d 733b200a u_routeParams; . │ │ │ │ + 0x0096f010 2020756e 69666f72 6d207665 63342075 uniform vec4 u │ │ │ │ + 0x0096f020 5f636f6c 6f723b20 0a202075 6e69666f _color; . unifo │ │ │ │ + 0x0096f030 726d2076 65633420 755f6d61 736b436f rm vec4 u_maskCo │ │ │ │ + 0x0096f040 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x0096f050 76656334 20755f6f 75746c69 6e65436f vec4 u_outlineCo │ │ │ │ + 0x0096f060 6c6f723b 200a2020 756e6966 6f726d20 lor; . uniform │ │ │ │ + 0x0096f070 76656334 20755f66 616b6543 6f6c6f72 vec4 u_fakeColor │ │ │ │ + 0x0096f080 3b200a20 20756e69 666f726d 20766563 ; . uniform vec │ │ │ │ + 0x0096f090 3420755f 66616b65 4f75746c 696e6543 4 u_fakeOutlineC │ │ │ │ + 0x0096f0a0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ + 0x0096f0b0 20766563 3220755f 66616b65 426f7264 vec2 u_fakeBord │ │ │ │ + 0x0096f0c0 6572733b 200a2020 756e6966 6f726d20 ers; . uniform │ │ │ │ + 0x0096f0d0 76656332 20755f70 61747465 726e3b20 vec2 u_pattern; │ │ │ │ + 0x0096f0e0 0a202075 6e69666f 726d2076 65633220 . uniform vec2 │ │ │ │ + 0x0096f0f0 755f616e 676c6543 6f735369 6e3b200a u_angleCosSin; . │ │ │ │ + 0x0096f100 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x0096f110 755f6172 726f7748 616c6657 69647468 u_arrowHalfWidth │ │ │ │ + 0x0096f120 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x0096f130 61742075 5f6f7061 63697479 3b200a20 at u_opacity; . │ │ │ │ + 0x0096f140 20636f6e 73742066 6c6f6174 206b5368 const float kSh │ │ │ │ + 0x0096f150 61706543 6f6f7264 5363616c 6172203d apeCoordScalar = │ │ │ │ + 0x0096f160 20313030 302e303b 200a2020 76656334 1000.0; . vec4 │ │ │ │ + 0x0096f170 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x0096f180 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x0096f190 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x0096f1a0 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x0096f1b0 74526561 6c5a2920 0a20207b 200a2020 tRealZ) . { . │ │ │ │ + 0x0096f1c0 20207665 63342074 72616e73 666f726d vec4 transform │ │ │ │ + 0x0096f1d0 65645069 766f7420 3d207069 766f743b edPivot = pivot; │ │ │ │ + 0x0096f1e0 200a2020 2020666c 6f617420 77203d20 . float w = │ │ │ │ + 0x0096f1f0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096f200 2e773b20 0a202020 20747261 6e73666f .w; . transfo │ │ │ │ + 0x0096f210 726d6564 5069766f 742e7879 77203d20 rmedPivot.xyw = │ │ │ │ + 0x0096f220 28706976 6f745472 616e7366 6f726d20 (pivotTransform │ │ │ │ + 0x0096f230 2a207665 63342874 72616e73 666f726d * vec4(transform │ │ │ │ + 0x0096f240 65645069 766f742e 78792c20 7069766f edPivot.xy, pivo │ │ │ │ + 0x0096f250 74526561 6c5a2c20 7729292e 7879773b tRealZ, w)).xyw; │ │ │ │ + 0x0096f260 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x0096f270 64506976 6f742e7a 202a3d20 7472616e dPivot.z *= tran │ │ │ │ + 0x0096f280 73666f72 6d656450 69766f74 2e77202f sformedPivot.w / │ │ │ │ + 0x0096f290 20773b20 0a202023 69666465 66205655 w; . #ifdef VU │ │ │ │ + 0x0096f2a0 4c4b414e 200a2020 20207472 616e7366 LKAN . transf │ │ │ │ + 0x0096f2b0 6f726d65 64506976 6f742e79 203d202d ormedPivot.y = - │ │ │ │ + 0x0096f2c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096f2d0 2e793b20 0a202020 20747261 6e73666f .y; . transfo │ │ │ │ + 0x0096f2e0 726d6564 5069766f 742e7a20 3d202874 rmedPivot.z = (t │ │ │ │ + 0x0096f2f0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096f300 7a20202b 20747261 6e73666f 726d6564 z + transformed │ │ │ │ + 0x0096f310 5069766f 742e7729 202f2032 2e303b20 Pivot.w) / 2.0; │ │ │ │ + 0x0096f320 0a202023 656e6469 66200a20 20202072 . #endif . r │ │ │ │ + 0x0096f330 65747572 6e207472 616e7366 6f726d65 eturn transforme │ │ │ │ + 0x0096f340 64506976 6f743b20 0a20207d 200a2020 dPivot; . } . │ │ │ │ + 0x0096f350 76656334 20617070 6c794269 6c6c626f vec4 applyBillbo │ │ │ │ + 0x0096f360 61726450 69766f74 5472616e 73666f72 ardPivotTransfor │ │ │ │ + 0x0096f370 6d287665 63342070 69766f74 2c206d61 m(vec4 pivot, ma │ │ │ │ + 0x0096f380 74342070 69766f74 5472616e 73666f72 t4 pivotTransfor │ │ │ │ + 0x0096f390 6d2c2066 6c6f6174 20706976 6f745265 m, float pivotRe │ │ │ │ + 0x0096f3a0 616c5a2c 20766563 32206f66 66736574 alZ, vec2 offset │ │ │ │ + 0x0096f3b0 29200a20 207b200a 20202020 666c6f61 ) . { . floa │ │ │ │ + 0x0096f3c0 74206c6f 6769635a 203d2070 69766f74 t logicZ = pivot │ │ │ │ + 0x0096f3d0 2e7a202f 20706976 6f742e77 3b200a20 .z / pivot.w; . │ │ │ │ + 0x0096f3e0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x0096f3f0 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x0096f400 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x0096f410 28706976 6f742e78 792c2070 69766f74 (pivot.xy, pivot │ │ │ │ + 0x0096f420 5265616c 5a2c2070 69766f74 2e77293b RealZ, pivot.w); │ │ │ │ + 0x0096f430 200a2020 20207665 63342073 63616c65 . vec4 scale │ │ │ │ + 0x0096f440 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x0096f450 6d202a20 76656334 28312e30 2c202d31 m * vec4(1.0, -1 │ │ │ │ + 0x0096f460 2e302c20 302e302c 20312e30 293b200a .0, 0.0, 1.0); . │ │ │ │ + 0x0096f470 20202020 76656334 20706f73 6974696f vec4 positio │ │ │ │ + 0x0096f480 6e203d20 76656334 28747261 6e73666f n = vec4(transfo │ │ │ │ + 0x0096f490 726d6564 5069766f 742e7879 202f2074 rmedPivot.xy / t │ │ │ │ + 0x0096f4a0 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x0096f4b0 772c206c 6f676963 5a2c2031 2e302920 w, logicZ, 1.0) │ │ │ │ + 0x0096f4c0 2b207665 6334286f 66667365 74202f20 + vec4(offset / │ │ │ │ + 0x0096f4d0 7363616c 652e7720 2a207363 616c652e scale.w * scale. │ │ │ │ + 0x0096f4e0 782c2030 2e302c20 302e3029 3b200a20 x, 0.0, 0.0); . │ │ │ │ + 0x0096f4f0 20236966 64656620 56554c4b 414e200a #ifdef VULKAN . │ │ │ │ + 0x0096f500 20202020 706f7369 74696f6e 2e79203d position.y = │ │ │ │ + 0x0096f510 202d706f 73697469 6f6e2e79 3b200a20 -position.y; . │ │ │ │ + 0x0096f520 20202070 6f736974 696f6e2e 7a203d20 position.z = │ │ │ │ + 0x0096f530 28706f73 6974696f 6e2e7a20 202b2070 (position.z + p │ │ │ │ + 0x0096f540 6f736974 696f6e2e 7729202f 20322e30 osition.w) / 2.0 │ │ │ │ + 0x0096f550 3b200a20 2023656e 64696620 0a202020 ; . #endif . │ │ │ │ + 0x0096f560 20726574 75726e20 706f7369 74696f6e return position │ │ │ │ + 0x0096f570 3b200a20 207d200a 20207665 63322063 ; . } . vec2 c │ │ │ │ + 0x0096f580 616c634c 696e6554 72616e73 666f726d alcLineTransform │ │ │ │ + 0x0096f590 65644178 6973506f 73287665 6332206f edAxisPos(vec2 o │ │ │ │ + 0x0096f5a0 72696769 6e616c41 78697350 6f732c20 riginalAxisPos, │ │ │ │ + 0x0096f5b0 76656332 20736869 66746564 506f732c vec2 shiftedPos, │ │ │ │ + 0x0096f5c0 206d6174 34206d6f 64656c56 6965772c mat4 modelView, │ │ │ │ + 0x0096f5d0 20666c6f 61742068 616c6657 69647468 float halfWidth │ │ │ │ + 0x0096f5e0 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x0096f5f0 2070203d 20287665 63342873 68696674 p = (vec4(shift │ │ │ │ + 0x0096f600 6564506f 732c2030 2e302c20 312e3029 edPos, 0.0, 1.0) │ │ │ │ + 0x0096f610 202a206d 6f64656c 56696577 292e7879 * modelView).xy │ │ │ │ + 0x0096f620 3b200a20 20202076 65633220 64203d20 ; . vec2 d = │ │ │ │ + 0x0096f630 70202d20 6f726967 696e616c 41786973 p - originalAxis │ │ │ │ + 0x0096f640 506f733b 200a2020 20206966 2028646f Pos; . if (do │ │ │ │ + 0x0096f650 7428642c 20642920 213d2030 2e302920 t(d, d) != 0.0) │ │ │ │ + 0x0096f660 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x0096f670 6967696e 616c4178 6973506f 73202b20 iginalAxisPos + │ │ │ │ + 0x0096f680 6e6f726d 616c697a 65286429 202a2068 normalize(d) * h │ │ │ │ + 0x0096f690 616c6657 69647468 3b200a20 20202065 alfWidth; . e │ │ │ │ + 0x0096f6a0 6c736520 0a202020 20202072 65747572 lse . retur │ │ │ │ + 0x0096f6b0 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x0096f6c0 733b200a 20207d20 0a202076 6f696420 s; . } . void │ │ │ │ + 0x0096f6d0 6d61696e 2829200a 20207b20 0a202020 main() . { . │ │ │ │ + 0x0096f6e0 20666c6f 61742072 203d2075 5f726f75 float r = u_rou │ │ │ │ + 0x0096f6f0 74655061 72616d73 2e78202a 20615f6e teParams.x * a_n │ │ │ │ + 0x0096f700 6f726d61 6c2e7a3b 200a2020 20207665 ormal.z; . ve │ │ │ │ + 0x0096f710 6332206e 6f726d61 6c203d20 76656332 c2 normal = vec2 │ │ │ │ + 0x0096f720 28615f6e 6f726d61 6c2e7820 2a20755f (a_normal.x * u_ │ │ │ │ + 0x0096f730 616e676c 65436f73 53696e2e 78202d20 angleCosSin.x - │ │ │ │ + 0x0096f740 615f6e6f 726d616c 2e79202a 20755f61 a_normal.y * u_a │ │ │ │ + 0x0096f750 6e676c65 436f7353 696e2e79 2c200a20 ngleCosSin.y, . │ │ │ │ + 0x0096f760 20202020 20202020 20202020 20202020 │ │ │ │ + 0x0096f770 20202020 2020615f 6e6f726d 616c2e78 a_normal.x │ │ │ │ + 0x0096f780 202a2075 5f616e67 6c65436f 7353696e * u_angleCosSin │ │ │ │ + 0x0096f790 2e79202b 20615f6e 6f726d61 6c2e7920 .y + a_normal.y │ │ │ │ + 0x0096f7a0 2a20755f 616e676c 65436f73 53696e2e * u_angleCosSin. │ │ │ │ + 0x0096f7b0 78293b20 0a202020 20766563 34207261 x); . vec4 ra │ │ │ │ + 0x0096f7c0 64697573 203d2076 65633428 6e6f726d dius = vec4(norm │ │ │ │ + 0x0096f7d0 616c2e78 79202a20 722c2072 2c20615f al.xy * r, r, a_ │ │ │ │ + 0x0096f7e0 706f7369 74696f6e 2e77293b 200a2020 position.w); . │ │ │ │ + 0x0096f7f0 20207665 63342070 6f73203d 20766563 vec4 pos = vec │ │ │ │ + 0x0096f800 3428615f 706f7369 74696f6e 2e78792c 4(a_position.xy, │ │ │ │ + 0x0096f810 20302c20 3129202a 20755f6d 6f64656c 0, 1) * u_model │ │ │ │ + 0x0096f820 56696577 3b200a20 20202076 65633220 View; . vec2 │ │ │ │ + 0x0096f830 73686966 74656450 6f73203d 20726164 shiftedPos = rad │ │ │ │ + 0x0096f840 6975732e 7879202b 20706f73 2e78793b ius.xy + pos.xy; │ │ │ │ + 0x0096f850 200a2020 2020706f 73203d20 76656334 . pos = vec4 │ │ │ │ + 0x0096f860 28736869 66746564 506f732c 20615f70 (shiftedPos, a_p │ │ │ │ + 0x0096f870 6f736974 696f6e2e 7a2c2031 2e302920 osition.z, 1.0) │ │ │ │ + 0x0096f880 2a20755f 70726f6a 65637469 6f6e3b20 * u_projection; │ │ │ │ + 0x0096f890 0a202020 20676c5f 506f7369 74696f6e . gl_Position │ │ │ │ + 0x0096f8a0 203d2061 70706c79 5069766f 74547261 = applyPivotTra │ │ │ │ + 0x0096f8b0 6e73666f 726d2870 6f732c20 755f7069 nsform(pos, u_pi │ │ │ │ + 0x0096f8c0 766f7454 72616e73 666f726d 2c20302e votTransform, 0. │ │ │ │ + 0x0096f8d0 30293b20 0a202020 20765f72 61646975 0); . v_radiu │ │ │ │ + 0x0096f8e0 73203d20 72616469 75733b20 0a202020 s = radius; . │ │ │ │ + 0x0096f8f0 20765f63 6f6c6f72 203d2061 5f636f6c v_color = a_col │ │ │ │ + 0x0096f900 6f723b20 0a20207d 200a0000 00000000 or; . } ....... │ │ │ │ + 0x0096f910 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x0096f920 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x0096f930 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x0096f940 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x0096f950 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x0096f960 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x0096f970 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x0096f980 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x0096f990 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x0096f9a0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x0096f9b0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x0096f9c0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x0096f9d0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x0096f9e0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x0096f9f0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x0096fa00 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x0096fa10 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x0096fa20 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x0096fa30 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x0096fa40 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x0096fa50 2023656e 64696620 0a202023 64656669 #endif . #defi │ │ │ │ + 0x0096fa60 6e652054 494c455f 4241434b 47524f55 ne TILE_BACKGROU │ │ │ │ + 0x0096fa70 4e445f4d 41585f43 4f554e54 20363420 ND_MAX_COUNT 64 │ │ │ │ + 0x0096fa80 0a20206f 75742076 65633320 765f7465 . out vec3 v_te │ │ │ │ + 0x0096fa90 78436f6f 7264733b 200a2020 756e6966 xCoords; . unif │ │ │ │ + 0x0096faa0 6f726d20 76656334 20755f74 696c6543 orm vec4 u_tileC │ │ │ │ + 0x0096fab0 6f6f7264 734d696e 4d61785b 54494c45 oordsMinMax[TILE │ │ │ │ + 0x0096fac0 5f424143 4b47524f 554e445f 4d41585f _BACKGROUND_MAX_ │ │ │ │ + 0x0096fad0 434f554e 545d3b20 0a202075 6e69666f COUNT]; . unifo │ │ │ │ + 0x0096fae0 726d2069 6e742075 5f746578 74757265 rm int u_texture │ │ │ │ + 0x0096faf0 496e6465 785b5449 4c455f42 41434b47 Index[TILE_BACKG │ │ │ │ + 0x0096fb00 524f554e 445f4d41 585f434f 554e545d ROUND_MAX_COUNT] │ │ │ │ + 0x0096fb10 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x0096fb20 3420755f 6d6f6465 6c566965 773b200a 4 u_modelView; . │ │ │ │ + 0x0096fb30 2020756e 69666f72 6d206d61 74342075 uniform mat4 u │ │ │ │ + 0x0096fb40 5f70726f 6a656374 696f6e3b 200a2020 _projection; . │ │ │ │ + 0x0096fb50 756e6966 6f726d20 6d617434 20755f70 uniform mat4 u_p │ │ │ │ + 0x0096fb60 69766f74 5472616e 73666f72 6d3b200a ivotTransform; . │ │ │ │ + 0x0096fb70 2020636f 6e737420 666c6f61 74206b53 const float kS │ │ │ │ + 0x0096fb80 68617065 436f6f72 64536361 6c617220 hapeCoordScalar │ │ │ │ + 0x0096fb90 3d203130 30302e30 3b200a20 20766563 = 1000.0; . vec │ │ │ │ + 0x0096fba0 34206170 706c7950 69766f74 5472616e 4 applyPivotTran │ │ │ │ + 0x0096fbb0 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x0096fbc0 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x0096fbd0 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x0096fbe0 6f745265 616c5a29 200a2020 7b200a20 otRealZ) . { . │ │ │ │ + 0x0096fbf0 20202076 65633420 7472616e 73666f72 vec4 transfor │ │ │ │ + 0x0096fc00 6d656450 69766f74 203d2070 69766f74 medPivot = pivot │ │ │ │ + 0x0096fc10 3b200a20 20202066 6c6f6174 2077203d ; . float w = │ │ │ │ + 0x0096fc20 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x0096fc30 742e773b 200a2020 20207472 616e7366 t.w; . transf │ │ │ │ + 0x0096fc40 6f726d65 64506976 6f742e78 7977203d ormedPivot.xyw = │ │ │ │ + 0x0096fc50 20287069 766f7454 72616e73 666f726d (pivotTransform │ │ │ │ + 0x0096fc60 202a2076 65633428 7472616e 73666f72 * vec4(transfor │ │ │ │ + 0x0096fc70 6d656450 69766f74 2e78792c 20706976 medPivot.xy, piv │ │ │ │ + 0x0096fc80 6f745265 616c5a2c 20772929 2e787977 otRealZ, w)).xyw │ │ │ │ + 0x0096fc90 3b200a20 20202074 72616e73 666f726d ; . transform │ │ │ │ + 0x0096fca0 65645069 766f742e 7a202a3d 20747261 edPivot.z *= tra │ │ │ │ + 0x0096fcb0 6e73666f 726d6564 5069766f 742e7720 nsformedPivot.w │ │ │ │ + 0x0096fcc0 2f20773b 200a2020 23696664 65662056 / w; . #ifdef V │ │ │ │ + 0x0096fcd0 554c4b41 4e200a20 20202074 72616e73 ULKAN . trans │ │ │ │ + 0x0096fce0 666f726d 65645069 766f742e 79203d20 formedPivot.y = │ │ │ │ + 0x0096fcf0 2d747261 6e73666f 726d6564 5069766f -transformedPivo │ │ │ │ + 0x0096fd00 742e793b 200a2020 20207472 616e7366 t.y; . transf │ │ │ │ + 0x0096fd10 6f726d65 64506976 6f742e7a 203d2028 ormedPivot.z = ( │ │ │ │ + 0x0096fd20 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096fd30 2e7a2020 2b207472 616e7366 6f726d65 .z + transforme │ │ │ │ + 0x0096fd40 64506976 6f742e77 29202f20 322e303b dPivot.w) / 2.0; │ │ │ │ + 0x0096fd50 200a2020 23656e64 6966200a 20202020 . #endif . │ │ │ │ + 0x0096fd60 72657475 726e2074 72616e73 666f726d return transform │ │ │ │ + 0x0096fd70 65645069 766f743b 200a2020 7d200a20 edPivot; . } . │ │ │ │ + 0x0096fd80 20766563 34206170 706c7942 696c6c62 vec4 applyBillb │ │ │ │ + 0x0096fd90 6f617264 5069766f 74547261 6e73666f oardPivotTransfo │ │ │ │ + 0x0096fda0 726d2876 65633420 7069766f 742c206d rm(vec4 pivot, m │ │ │ │ + 0x0096fdb0 61743420 7069766f 74547261 6e73666f at4 pivotTransfo │ │ │ │ + 0x0096fdc0 726d2c20 666c6f61 74207069 766f7452 rm, float pivotR │ │ │ │ + 0x0096fdd0 65616c5a 2c207665 6332206f 66667365 ealZ, vec2 offse │ │ │ │ + 0x0096fde0 7429200a 20207b20 0a202020 20666c6f t) . { . flo │ │ │ │ + 0x0096fdf0 6174206c 6f676963 5a203d20 7069766f at logicZ = pivo │ │ │ │ + 0x0096fe00 742e7a20 2f207069 766f742e 773b200a t.z / pivot.w; . │ │ │ │ + 0x0096fe10 20202020 76656334 20747261 6e73666f vec4 transfo │ │ │ │ + 0x0096fe20 726d6564 5069766f 74203d20 7069766f rmedPivot = pivo │ │ │ │ + 0x0096fe30 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x0096fe40 34287069 766f742e 78792c20 7069766f 4(pivot.xy, pivo │ │ │ │ + 0x0096fe50 74526561 6c5a2c20 7069766f 742e7729 tRealZ, pivot.w) │ │ │ │ + 0x0096fe60 3b200a20 20202076 65633420 7363616c ; . vec4 scal │ │ │ │ + 0x0096fe70 65203d20 7069766f 74547261 6e73666f e = pivotTransfo │ │ │ │ + 0x0096fe80 726d202a 20766563 3428312e 302c202d rm * vec4(1.0, - │ │ │ │ + 0x0096fe90 312e302c 20302e30 2c20312e 30293b20 1.0, 0.0, 1.0); │ │ │ │ + 0x0096fea0 0a202020 20766563 3420706f 73697469 . vec4 positi │ │ │ │ + 0x0096feb0 6f6e203d 20766563 34287472 616e7366 on = vec4(transf │ │ │ │ + 0x0096fec0 6f726d65 64506976 6f742e78 79202f20 ormedPivot.xy / │ │ │ │ + 0x0096fed0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x0096fee0 2e772c20 6c6f6769 635a2c20 312e3029 .w, logicZ, 1.0) │ │ │ │ + 0x0096fef0 202b2076 65633428 6f666673 6574202f + vec4(offset / │ │ │ │ + 0x0096ff00 20736361 6c652e77 202a2073 63616c65 scale.w * scale │ │ │ │ + 0x0096ff10 2e782c20 302e302c 20302e30 293b200a .x, 0.0, 0.0); . │ │ │ │ + 0x0096ff20 20202369 66646566 2056554c 4b414e20 #ifdef VULKAN │ │ │ │ + 0x0096ff30 0a202020 20706f73 6974696f 6e2e7920 . position.y │ │ │ │ + 0x0096ff40 3d202d70 6f736974 696f6e2e 793b200a = -position.y; . │ │ │ │ + 0x0096ff50 20202020 706f7369 74696f6e 2e7a203d position.z = │ │ │ │ + 0x0096ff60 2028706f 73697469 6f6e2e7a 20202b20 (position.z + │ │ │ │ + 0x0096ff70 706f7369 74696f6e 2e772920 2f20322e position.w) / 2. │ │ │ │ + 0x0096ff80 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x0096ff90 20207265 7475726e 20706f73 6974696f return positio │ │ │ │ + 0x0096ffa0 6e3b200a 20207d20 0a202076 65633220 n; . } . vec2 │ │ │ │ + 0x0096ffb0 63616c63 4c696e65 5472616e 73666f72 calcLineTransfor │ │ │ │ + 0x0096ffc0 6d656441 78697350 6f732876 65633220 medAxisPos(vec2 │ │ │ │ + 0x0096ffd0 6f726967 696e616c 41786973 506f732c originalAxisPos, │ │ │ │ + 0x0096ffe0 20766563 32207368 69667465 64506f73 vec2 shiftedPos │ │ │ │ + 0x0096fff0 2c206d61 7434206d 6f64656c 56696577 , mat4 modelView │ │ │ │ + 0x00970000 2c20666c 6f617420 68616c66 57696474 , float halfWidt │ │ │ │ + 0x00970010 6829200a 20207b20 0a202020 20766563 h) . { . vec │ │ │ │ + 0x00970020 32207020 3d202876 65633428 73686966 2 p = (vec4(shif │ │ │ │ + 0x00970030 74656450 6f732c20 302e302c 20312e30 tedPos, 0.0, 1.0 │ │ │ │ + 0x00970040 29202a20 6d6f6465 6c566965 77292e78 ) * modelView).x │ │ │ │ + 0x00970050 793b200a 20202020 76656332 2064203d y; . vec2 d = │ │ │ │ + 0x00970060 2070202d 206f7269 67696e61 6c417869 p - originalAxi │ │ │ │ + 0x00970070 73506f73 3b200a20 20202069 66202864 sPos; . if (d │ │ │ │ + 0x00970080 6f742864 2c206429 20213d20 302e3029 ot(d, d) != 0.0) │ │ │ │ + 0x00970090 200a2020 20202020 72657475 726e206f . return o │ │ │ │ + 0x009700a0 72696769 6e616c41 78697350 6f73202b riginalAxisPos + │ │ │ │ + 0x009700b0 206e6f72 6d616c69 7a652864 29202a20 normalize(d) * │ │ │ │ + 0x009700c0 68616c66 57696474 683b200a 20202020 halfWidth; . │ │ │ │ + 0x009700d0 656c7365 200a2020 20202020 72657475 else . retu │ │ │ │ + 0x009700e0 726e206f 72696769 6e616c41 78697350 rn originalAxisP │ │ │ │ + 0x009700f0 6f733b20 0a20207d 200a2020 766f6964 os; . } . void │ │ │ │ + 0x00970100 206d6169 6e282920 0a20207b 200a2020 main() . { . │ │ │ │ + 0x00970110 20207665 63322071 75616456 65727465 vec2 quadVerte │ │ │ │ + 0x00970120 78203d20 76656332 28676c5f 56657274 x = vec2(gl_Vert │ │ │ │ + 0x00970130 65784944 20262031 2c202867 6c5f5665 exID & 1, (gl_Ve │ │ │ │ + 0x00970140 72746578 4944203e 3e203129 20262031 rtexID >> 1) & 1 │ │ │ │ + 0x00970150 293b200a 2020200a 20202020 76656334 ); . . vec4 │ │ │ │ + 0x00970160 2074696c 65436f6f 7264734d 696e4d61 tileCoordsMinMa │ │ │ │ + 0x00970170 78203d20 755f7469 6c65436f 6f726473 x = u_tileCoords │ │ │ │ + 0x00970180 4d696e4d 61785b67 6c5f496e 7374616e MinMax[gl_Instan │ │ │ │ + 0x00970190 63654944 5d3b200a 20202020 76656332 ceID]; . vec2 │ │ │ │ + 0x009701a0 20776f72 6c64506f 73203d20 6d697828 worldPos = mix( │ │ │ │ + 0x009701b0 74696c65 436f6f72 64734d69 6e4d6178 tileCoordsMinMax │ │ │ │ + 0x009701c0 2e78792c 2074696c 65436f6f 7264734d .xy, tileCoordsM │ │ │ │ + 0x009701d0 696e4d61 782e7a77 2c207175 61645665 inMax.zw, quadVe │ │ │ │ + 0x009701e0 72746578 293b200a 20202020 76656334 rtex); . vec4 │ │ │ │ + 0x009701f0 20706f73 203d2076 65633428 776f726c pos = vec4(worl │ │ │ │ + 0x00970200 64506f73 2c20302e 302c2031 2e302920 dPos, 0.0, 1.0) │ │ │ │ + 0x00970210 2a20755f 6d6f6465 6c566965 77202a20 * u_modelView * │ │ │ │ + 0x00970220 755f7072 6f6a6563 74696f6e 3b200a20 u_projection; . │ │ │ │ + 0x00970230 20202067 6c5f506f 73697469 6f6e203d gl_Position = │ │ │ │ + 0x00970240 20617070 6c795069 766f7454 72616e73 applyPivotTrans │ │ │ │ + 0x00970250 666f726d 28706f73 2c20755f 7069766f form(pos, u_pivo │ │ │ │ + 0x00970260 74547261 6e73666f 726d2c20 302e3029 tTransform, 0.0) │ │ │ │ + 0x00970270 3b200a20 20200a20 20202076 5f746578 ; . . v_tex │ │ │ │ + 0x00970280 436f6f72 6473203d 20766563 33287175 Coords = vec3(qu │ │ │ │ + 0x00970290 61645665 72746578 2c20666c 6f617428 adVertex, float( │ │ │ │ + 0x009702a0 755f7465 78747572 65496e64 65785b67 u_textureIndex[g │ │ │ │ + 0x009702b0 6c5f496e 7374616e 63654944 5d29293b l_InstanceID])); │ │ │ │ + 0x009702c0 200a2020 7d200a00 20202023 69666465 . } .. #ifde │ │ │ │ + 0x009702d0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x009702e0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009702f0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00970300 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00970310 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00970320 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00970330 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00970340 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00970350 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00970360 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00970370 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00970380 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00970390 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x009703a0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009703b0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x009703c0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x009703d0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x009703e0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009703f0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00970400 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00970410 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00970420 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00970430 3220615f 636f6c6f 72546578 436f6f72 2 a_colorTexCoor │ │ │ │ + 0x00970440 64733b20 0a202069 6e207665 63322061 ds; . in vec2 a │ │ │ │ + 0x00970450 5f6d6173 6b546578 436f6f72 64733b20 _maskTexCoords; │ │ │ │ + 0x00970460 0a202023 69666465 6620454e 41424c45 . #ifdef ENABLE │ │ │ │ + 0x00970470 5f565446 200a2020 6f757420 4c4f575f _VTF . out LOW_ │ │ │ │ + 0x00970480 50207665 63342076 5f636f6c 6f723b20 P vec4 v_color; │ │ │ │ + 0x00970490 0a202023 656c7365 200a2020 6f757420 . #else . out │ │ │ │ + 0x009704a0 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x009704b0 6f6f7264 733b200a 20202365 6e646966 oords; . #endif │ │ │ │ + 0x009704c0 200a2020 6f757420 76656332 20765f6d . out vec2 v_m │ │ │ │ + 0x009704d0 61736b54 6578436f 6f726473 3b200a20 askTexCoords; . │ │ │ │ + 0x009704e0 20756e69 666f726d 206d6174 3420755f uniform mat4 u_ │ │ │ │ + 0x009704f0 6d6f6465 6c566965 773b200a 2020756e modelView; . un │ │ │ │ + 0x00970500 69666f72 6d206d61 74342075 5f70726f iform mat4 u_pro │ │ │ │ + 0x00970510 6a656374 696f6e3b 200a2020 756e6966 jection; . unif │ │ │ │ + 0x00970520 6f726d20 6d617434 20755f70 69766f74 orm mat4 u_pivot │ │ │ │ + 0x00970530 5472616e 73666f72 6d3b200a 2020756e Transform; . un │ │ │ │ + 0x00970540 69666f72 6d207665 63322075 5f636f6e iform vec2 u_con │ │ │ │ + 0x00970550 74726173 7447616d 6d613b20 0a202075 trastGamma; . u │ │ │ │ + 0x00970560 6e69666f 726d2066 6c6f6174 20755f6f niform float u_o │ │ │ │ + 0x00970570 70616369 74793b20 0a202075 6e69666f pacity; . unifo │ │ │ │ + 0x00970580 726d2066 6c6f6174 20755f7a 5363616c rm float u_zScal │ │ │ │ + 0x00970590 653b200a 2020756e 69666f72 6d20666c e; . uniform fl │ │ │ │ + 0x009705a0 6f617420 755f696e 74657270 6f6c6174 oat u_interpolat │ │ │ │ + 0x009705b0 696f6e3b 200a2020 756e6966 6f726d20 ion; . uniform │ │ │ │ + 0x009705c0 666c6f61 7420755f 69734f75 746c696e float u_isOutlin │ │ │ │ + 0x009705d0 65506173 733b200a 20202369 66646566 ePass; . #ifdef │ │ │ │ + 0x009705e0 20454e41 424c455f 56544620 0a202075 ENABLE_VTF . u │ │ │ │ + 0x009705f0 6e69666f 726d2073 616d706c 65723244 niform sampler2D │ │ │ │ + 0x00970600 20755f63 6f6c6f72 5465783b 200a2020 u_colorTex; . │ │ │ │ + 0x00970610 23656e64 6966200a 2020636f 6e737420 #endif . const │ │ │ │ + 0x00970620 666c6f61 74206b53 68617065 436f6f72 float kShapeCoor │ │ │ │ + 0x00970630 64536361 6c617220 3d203130 30302e30 dScalar = 1000.0 │ │ │ │ + 0x00970640 3b200a20 20766563 34206170 706c7950 ; . vec4 applyP │ │ │ │ + 0x00970650 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00970660 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00970670 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00970680 6c6f6174 20706976 6f745265 616c5a29 loat pivotRealZ) │ │ │ │ + 0x00970690 200a2020 7b200a20 20202076 65633420 . { . vec4 │ │ │ │ + 0x009706a0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009706b0 203d2070 69766f74 3b200a20 20202066 = pivot; . f │ │ │ │ + 0x009706c0 6c6f6174 2077203d 20747261 6e73666f loat w = transfo │ │ │ │ + 0x009706d0 726d6564 5069766f 742e773b 200a2020 rmedPivot.w; . │ │ │ │ + 0x009706e0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x009706f0 6f742e78 7977203d 20287069 766f7454 ot.xyw = (pivotT │ │ │ │ + 0x00970700 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x00970710 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00970720 2e78792c 20706976 6f745265 616c5a2c .xy, pivotRealZ, │ │ │ │ + 0x00970730 20772929 2e787977 3b200a20 20202074 w)).xyw; . t │ │ │ │ + 0x00970740 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00970750 7a202a3d 20747261 6e73666f 726d6564 z *= transformed │ │ │ │ + 0x00970760 5069766f 742e7720 2f20773b 200a2020 Pivot.w / w; . │ │ │ │ + 0x00970770 23696664 65662056 554c4b41 4e200a20 #ifdef VULKAN . │ │ │ │ + 0x00970780 20202074 72616e73 666f726d 65645069 transformedPi │ │ │ │ + 0x00970790 766f742e 79203d20 2d747261 6e73666f vot.y = -transfo │ │ │ │ + 0x009707a0 726d6564 5069766f 742e793b 200a2020 rmedPivot.y; . │ │ │ │ + 0x009707b0 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x009707c0 6f742e7a 203d2028 7472616e 73666f72 ot.z = (transfor │ │ │ │ + 0x009707d0 6d656450 69766f74 2e7a2020 2b207472 medPivot.z + tr │ │ │ │ + 0x009707e0 616e7366 6f726d65 64506976 6f742e77 ansformedPivot.w │ │ │ │ + 0x009707f0 29202f20 322e303b 200a2020 23656e64 ) / 2.0; . #end │ │ │ │ + 0x00970800 6966200a 20202020 72657475 726e2074 if . return t │ │ │ │ + 0x00970810 72616e73 666f726d 65645069 766f743b ransformedPivot; │ │ │ │ + 0x00970820 200a2020 7d200a20 20766563 34206170 . } . vec4 ap │ │ │ │ + 0x00970830 706c7942 696c6c62 6f617264 5069766f plyBillboardPivo │ │ │ │ + 0x00970840 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x00970850 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00970860 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00970870 74207069 766f7452 65616c5a 2c207665 t pivotRealZ, ve │ │ │ │ + 0x00970880 6332206f 66667365 7429200a 20207b20 c2 offset) . { │ │ │ │ + 0x00970890 0a202020 20666c6f 6174206c 6f676963 . float logic │ │ │ │ + 0x009708a0 5a203d20 7069766f 742e7a20 2f207069 Z = pivot.z / pi │ │ │ │ + 0x009708b0 766f742e 773b200a 20202020 76656334 vot.w; . vec4 │ │ │ │ + 0x009708c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009708d0 74203d20 7069766f 74547261 6e73666f t = pivotTransfo │ │ │ │ + 0x009708e0 726d202a 20766563 34287069 766f742e rm * vec4(pivot. │ │ │ │ + 0x009708f0 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00970900 7069766f 742e7729 3b200a20 20202076 pivot.w); . v │ │ │ │ + 0x00970910 65633420 7363616c 65203d20 7069766f ec4 scale = pivo │ │ │ │ + 0x00970920 74547261 6e73666f 726d202a 20766563 tTransform * vec │ │ │ │ + 0x00970930 3428312e 302c202d 312e302c 20302e30 4(1.0, -1.0, 0.0 │ │ │ │ + 0x00970940 2c20312e 30293b20 0a202020 20766563 , 1.0); . vec │ │ │ │ + 0x00970950 3420706f 73697469 6f6e203d 20766563 4 position = vec │ │ │ │ + 0x00970960 34287472 616e7366 6f726d65 64506976 4(transformedPiv │ │ │ │ + 0x00970970 6f742e78 79202f20 7472616e 73666f72 ot.xy / transfor │ │ │ │ + 0x00970980 6d656450 69766f74 2e772c20 6c6f6769 medPivot.w, logi │ │ │ │ + 0x00970990 635a2c20 312e3029 202b2076 65633428 cZ, 1.0) + vec4( │ │ │ │ + 0x009709a0 6f666673 6574202f 20736361 6c652e77 offset / scale.w │ │ │ │ + 0x009709b0 202a2073 63616c65 2e782c20 302e302c * scale.x, 0.0, │ │ │ │ + 0x009709c0 20302e30 293b200a 20202369 66646566 0.0); . #ifdef │ │ │ │ + 0x009709d0 2056554c 4b414e20 0a202020 20706f73 VULKAN . pos │ │ │ │ + 0x009709e0 6974696f 6e2e7920 3d202d70 6f736974 ition.y = -posit │ │ │ │ + 0x009709f0 696f6e2e 793b200a 20202020 706f7369 ion.y; . posi │ │ │ │ + 0x00970a00 74696f6e 2e7a203d 2028706f 73697469 tion.z = (positi │ │ │ │ + 0x00970a10 6f6e2e7a 20202b20 706f7369 74696f6e on.z + position │ │ │ │ + 0x00970a20 2e772920 2f20322e 303b200a 20202365 .w) / 2.0; . #e │ │ │ │ + 0x00970a30 6e646966 200a2020 20207265 7475726e ndif . return │ │ │ │ + 0x00970a40 20706f73 6974696f 6e3b200a 20207d20 position; . } │ │ │ │ + 0x00970a50 0a202076 65633220 63616c63 4c696e65 . vec2 calcLine │ │ │ │ + 0x00970a60 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x00970a70 6f732876 65633220 6f726967 696e616c os(vec2 original │ │ │ │ + 0x00970a80 41786973 506f732c 20766563 32207368 AxisPos, vec2 sh │ │ │ │ + 0x00970a90 69667465 64506f73 2c206d61 7434206d iftedPos, mat4 m │ │ │ │ + 0x00970aa0 6f64656c 56696577 2c20666c 6f617420 odelView, float │ │ │ │ + 0x00970ab0 68616c66 57696474 6829200a 20207b20 halfWidth) . { │ │ │ │ + 0x00970ac0 0a202020 20766563 32207020 3d202876 . vec2 p = (v │ │ │ │ + 0x00970ad0 65633428 73686966 74656450 6f732c20 ec4(shiftedPos, │ │ │ │ + 0x00970ae0 302e302c 20312e30 29202a20 6d6f6465 0.0, 1.0) * mode │ │ │ │ + 0x00970af0 6c566965 77292e78 793b200a 20202020 lView).xy; . │ │ │ │ + 0x00970b00 76656332 2064203d 2070202d 206f7269 vec2 d = p - ori │ │ │ │ + 0x00970b10 67696e61 6c417869 73506f73 3b200a20 ginalAxisPos; . │ │ │ │ + 0x00970b20 20202069 66202864 6f742864 2c206429 if (dot(d, d) │ │ │ │ + 0x00970b30 20213d20 302e3029 200a2020 20202020 != 0.0) . │ │ │ │ + 0x00970b40 72657475 726e206f 72696769 6e616c41 return originalA │ │ │ │ + 0x00970b50 78697350 6f73202b 206e6f72 6d616c69 xisPos + normali │ │ │ │ + 0x00970b60 7a652864 29202a20 68616c66 57696474 ze(d) * halfWidt │ │ │ │ + 0x00970b70 683b200a 20202020 656c7365 200a2020 h; . else . │ │ │ │ + 0x00970b80 20202020 72657475 726e206f 72696769 return origi │ │ │ │ + 0x00970b90 6e616c41 78697350 6f733b20 0a20207d nalAxisPos; . } │ │ │ │ + 0x00970ba0 200a2020 766f6964 206d6169 6e282920 . void main() │ │ │ │ + 0x00970bb0 0a20207b 200a2020 20207665 63342070 . { . vec4 p │ │ │ │ + 0x00970bc0 6f73203d 20766563 3428615f 706f7369 os = vec4(a_posi │ │ │ │ + 0x00970bd0 74696f6e 2c203129 202a2075 5f6d6f64 tion, 1) * u_mod │ │ │ │ + 0x00970be0 656c5669 6577202a 20755f70 726f6a65 elView * u_proje │ │ │ │ + 0x00970bf0 6374696f 6e3b200a 20202020 676c5f50 ction; . gl_P │ │ │ │ + 0x00970c00 6f736974 696f6e20 3d206170 706c7950 osition = applyP │ │ │ │ + 0x00970c10 69766f74 5472616e 73666f72 6d28706f ivotTransform(po │ │ │ │ + 0x00970c20 732c2075 5f706976 6f745472 616e7366 s, u_pivotTransf │ │ │ │ + 0x00970c30 6f726d2c 20302e30 293b200a 20202369 orm, 0.0); . #i │ │ │ │ + 0x00970c40 66646566 20454e41 424c455f 56544620 fdef ENABLE_VTF │ │ │ │ + 0x00970c50 0a202020 20765f63 6f6c6f72 203d2074 . v_color = t │ │ │ │ + 0x00970c60 65787475 72652875 5f636f6c 6f725465 exture(u_colorTe │ │ │ │ + 0x00970c70 782c2061 5f636f6c 6f725465 78436f6f x, a_colorTexCoo │ │ │ │ + 0x00970c80 72647329 3b200a20 2023656c 7365200a rds); . #else . │ │ │ │ + 0x00970c90 20202020 765f636f 6c6f7254 6578436f v_colorTexCo │ │ │ │ + 0x00970ca0 6f726473 203d2061 5f636f6c 6f725465 ords = a_colorTe │ │ │ │ + 0x00970cb0 78436f6f 7264733b 200a2020 23656e64 xCoords; . #end │ │ │ │ + 0x00970cc0 6966200a 20202020 765f6d61 736b5465 if . v_maskTe │ │ │ │ + 0x00970cd0 78436f6f 72647320 3d20615f 6d61736b xCoords = a_mask │ │ │ │ + 0x00970ce0 54657843 6f6f7264 733b200a 20207d20 TexCoords; . } │ │ │ │ + 0x00970cf0 0a000000 00000000 20202023 69666465 ........ #ifde │ │ │ │ + 0x00970d00 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00970d10 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00970d20 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00970d30 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00970d40 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00970d50 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00970d60 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00970d70 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00970d80 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00970d90 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00970da0 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00970db0 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00970dc0 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00970dd0 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00970de0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00970df0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00970e00 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00970e10 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00970e20 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00970e30 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00970e40 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00970e50 3b200a20 20696e20 76656333 20615f6e ; . in vec3 a_n │ │ │ │ + 0x00970e60 6f726d61 6c3b200a 20206f75 74207665 ormal; . out ve │ │ │ │ + 0x00970e70 63332076 5f6e6f72 6d616c3b 200a2020 c3 v_normal; . │ │ │ │ + 0x00970e80 756e6966 6f726d20 6d617434 20755f74 uniform mat4 u_t │ │ │ │ + 0x00970e90 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ + 0x00970ea0 666f726d 206d6174 3420755f 6e6f726d form mat4 u_norm │ │ │ │ + 0x00970eb0 616c5472 616e7366 6f726d3b 200a2020 alTransform; . │ │ │ │ + 0x00970ec0 756e6966 6f726d20 76656334 20755f63 uniform vec4 u_c │ │ │ │ + 0x00970ed0 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ + 0x00970ee0 20766563 3220755f 74657843 6f6f7264 vec2 u_texCoord │ │ │ │ + 0x00970ef0 466c6970 70696e67 3b200a20 20636f6e Flipping; . con │ │ │ │ + 0x00970f00 73742066 6c6f6174 206b5368 61706543 st float kShapeC │ │ │ │ + 0x00970f10 6f6f7264 5363616c 6172203d 20313030 oordScalar = 100 │ │ │ │ + 0x00970f20 302e303b 200a2020 76656334 20617070 0.0; . vec4 app │ │ │ │ + 0x00970f30 6c795069 766f7454 72616e73 666f726d lyPivotTransform │ │ │ │ + 0x00970f40 28766563 34207069 766f742c 206d6174 (vec4 pivot, mat │ │ │ │ + 0x00970f50 34207069 766f7454 72616e73 666f726d 4 pivotTransform │ │ │ │ + 0x00970f60 2c20666c 6f617420 7069766f 74526561 , float pivotRea │ │ │ │ + 0x00970f70 6c5a2920 0a20207b 200a2020 20207665 lZ) . { . ve │ │ │ │ + 0x00970f80 63342074 72616e73 666f726d 65645069 c4 transformedPi │ │ │ │ + 0x00970f90 766f7420 3d207069 766f743b 200a2020 vot = pivot; . │ │ │ │ + 0x00970fa0 2020666c 6f617420 77203d20 7472616e float w = tran │ │ │ │ + 0x00970fb0 73666f72 6d656450 69766f74 2e773b20 sformedPivot.w; │ │ │ │ + 0x00970fc0 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x00970fd0 5069766f 742e7879 77203d20 28706976 Pivot.xyw = (piv │ │ │ │ + 0x00970fe0 6f745472 616e7366 6f726d20 2a207665 otTransform * ve │ │ │ │ + 0x00970ff0 63342874 72616e73 666f726d 65645069 c4(transformedPi │ │ │ │ + 0x00971000 766f742e 78792c20 7069766f 74526561 vot.xy, pivotRea │ │ │ │ + 0x00971010 6c5a2c20 7729292e 7879773b 200a2020 lZ, w)).xyw; . │ │ │ │ + 0x00971020 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00971030 6f742e7a 202a3d20 7472616e 73666f72 ot.z *= transfor │ │ │ │ + 0x00971040 6d656450 69766f74 2e77202f 20773b20 medPivot.w / w; │ │ │ │ + 0x00971050 0a202023 69666465 66205655 4c4b414e . #ifdef VULKAN │ │ │ │ + 0x00971060 200a2020 20207472 616e7366 6f726d65 . transforme │ │ │ │ + 0x00971070 64506976 6f742e79 203d202d 7472616e dPivot.y = -tran │ │ │ │ + 0x00971080 73666f72 6d656450 69766f74 2e793b20 sformedPivot.y; │ │ │ │ + 0x00971090 0a202020 20747261 6e73666f 726d6564 . transformed │ │ │ │ + 0x009710a0 5069766f 742e7a20 3d202874 72616e73 Pivot.z = (trans │ │ │ │ + 0x009710b0 666f726d 65645069 766f742e 7a20202b formedPivot.z + │ │ │ │ + 0x009710c0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009710d0 742e7729 202f2032 2e303b20 0a202023 t.w) / 2.0; . # │ │ │ │ + 0x009710e0 656e6469 66200a20 20202072 65747572 endif . retur │ │ │ │ + 0x009710f0 6e207472 616e7366 6f726d65 64506976 n transformedPiv │ │ │ │ + 0x00971100 6f743b20 0a20207d 200a2020 76656334 ot; . } . vec4 │ │ │ │ + 0x00971110 20617070 6c794269 6c6c626f 61726450 applyBillboardP │ │ │ │ + 0x00971120 69766f74 5472616e 73666f72 6d287665 ivotTransform(ve │ │ │ │ + 0x00971130 63342070 69766f74 2c206d61 74342070 c4 pivot, mat4 p │ │ │ │ + 0x00971140 69766f74 5472616e 73666f72 6d2c2066 ivotTransform, f │ │ │ │ + 0x00971150 6c6f6174 20706976 6f745265 616c5a2c loat pivotRealZ, │ │ │ │ + 0x00971160 20766563 32206f66 66736574 29200a20 vec2 offset) . │ │ │ │ + 0x00971170 207b200a 20202020 666c6f61 74206c6f { . float lo │ │ │ │ + 0x00971180 6769635a 203d2070 69766f74 2e7a202f gicZ = pivot.z / │ │ │ │ + 0x00971190 20706976 6f742e77 3b200a20 20202076 pivot.w; . v │ │ │ │ + 0x009711a0 65633420 7472616e 73666f72 6d656450 ec4 transformedP │ │ │ │ + 0x009711b0 69766f74 203d2070 69766f74 5472616e ivot = pivotTran │ │ │ │ + 0x009711c0 73666f72 6d202a20 76656334 28706976 sform * vec4(piv │ │ │ │ + 0x009711d0 6f742e78 792c2070 69766f74 5265616c ot.xy, pivotReal │ │ │ │ + 0x009711e0 5a2c2070 69766f74 2e77293b 200a2020 Z, pivot.w); . │ │ │ │ + 0x009711f0 20207665 63342073 63616c65 203d2070 vec4 scale = p │ │ │ │ + 0x00971200 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00971210 76656334 28312e30 2c202d31 2e302c20 vec4(1.0, -1.0, │ │ │ │ + 0x00971220 302e302c 20312e30 293b200a 20202020 0.0, 1.0); . │ │ │ │ + 0x00971230 76656334 20706f73 6974696f 6e203d20 vec4 position = │ │ │ │ + 0x00971240 76656334 28747261 6e73666f 726d6564 vec4(transformed │ │ │ │ + 0x00971250 5069766f 742e7879 202f2074 72616e73 Pivot.xy / trans │ │ │ │ + 0x00971260 666f726d 65645069 766f742e 772c206c formedPivot.w, l │ │ │ │ + 0x00971270 6f676963 5a2c2031 2e302920 2b207665 ogicZ, 1.0) + ve │ │ │ │ + 0x00971280 6334286f 66667365 74202f20 7363616c c4(offset / scal │ │ │ │ + 0x00971290 652e7720 2a207363 616c652e 782c2030 e.w * scale.x, 0 │ │ │ │ + 0x009712a0 2e302c20 302e3029 3b200a20 20236966 .0, 0.0); . #if │ │ │ │ + 0x009712b0 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x009712c0 706f7369 74696f6e 2e79203d 202d706f position.y = -po │ │ │ │ + 0x009712d0 73697469 6f6e2e79 3b200a20 20202070 sition.y; . p │ │ │ │ + 0x009712e0 6f736974 696f6e2e 7a203d20 28706f73 osition.z = (pos │ │ │ │ + 0x009712f0 6974696f 6e2e7a20 202b2070 6f736974 ition.z + posit │ │ │ │ + 0x00971300 696f6e2e 7729202f 20322e30 3b200a20 ion.w) / 2.0; . │ │ │ │ + 0x00971310 2023656e 64696620 0a202020 20726574 #endif . ret │ │ │ │ + 0x00971320 75726e20 706f7369 74696f6e 3b200a20 urn position; . │ │ │ │ + 0x00971330 207d200a 20207665 63322063 616c634c } . vec2 calcL │ │ │ │ + 0x00971340 696e6554 72616e73 666f726d 65644178 ineTransformedAx │ │ │ │ + 0x00971350 6973506f 73287665 6332206f 72696769 isPos(vec2 origi │ │ │ │ + 0x00971360 6e616c41 78697350 6f732c20 76656332 nalAxisPos, vec2 │ │ │ │ + 0x00971370 20736869 66746564 506f732c 206d6174 shiftedPos, mat │ │ │ │ + 0x00971380 34206d6f 64656c56 6965772c 20666c6f 4 modelView, flo │ │ │ │ + 0x00971390 61742068 616c6657 69647468 29200a20 at halfWidth) . │ │ │ │ + 0x009713a0 207b200a 20202020 76656332 2070203d { . vec2 p = │ │ │ │ + 0x009713b0 20287665 63342873 68696674 6564506f (vec4(shiftedPo │ │ │ │ + 0x009713c0 732c2030 2e302c20 312e3029 202a206d s, 0.0, 1.0) * m │ │ │ │ + 0x009713d0 6f64656c 56696577 292e7879 3b200a20 odelView).xy; . │ │ │ │ + 0x009713e0 20202076 65633220 64203d20 70202d20 vec2 d = p - │ │ │ │ + 0x009713f0 6f726967 696e616c 41786973 506f733b originalAxisPos; │ │ │ │ + 0x00971400 200a2020 20206966 2028646f 7428642c . if (dot(d, │ │ │ │ + 0x00971410 20642920 213d2030 2e302920 0a202020 d) != 0.0) . │ │ │ │ + 0x00971420 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00971430 616c4178 6973506f 73202b20 6e6f726d alAxisPos + norm │ │ │ │ + 0x00971440 616c697a 65286429 202a2068 616c6657 alize(d) * halfW │ │ │ │ + 0x00971450 69647468 3b200a20 20202065 6c736520 idth; . else │ │ │ │ + 0x00971460 0a202020 20202072 65747572 6e206f72 . return or │ │ │ │ + 0x00971470 6967696e 616c4178 6973506f 733b200a iginalAxisPos; . │ │ │ │ + 0x00971480 20207d20 0a202076 6f696420 6d61696e } . void main │ │ │ │ + 0x00971490 2829200a 20207b20 0a202020 20766563 () . { . vec │ │ │ │ + 0x009714a0 3420706f 73697469 6f6e203d 20755f74 4 position = u_t │ │ │ │ + 0x009714b0 72616e73 666f726d 202a2076 65633428 ransform * vec4( │ │ │ │ + 0x009714c0 615f706f 732c2031 2e30293b 200a2020 a_pos, 1.0); . │ │ │ │ + 0x009714d0 2020765f 6e6f726d 616c203d 206e6f72 v_normal = nor │ │ │ │ + 0x009714e0 6d616c69 7a652828 755f6e6f 726d616c malize((u_normal │ │ │ │ + 0x009714f0 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00971500 28615f6e 6f726d61 6c2c2030 2e302929 (a_normal, 0.0)) │ │ │ │ + 0x00971510 2e78797a 293b200a 20202020 676c5f50 .xyz); . gl_P │ │ │ │ + 0x00971520 6f736974 696f6e20 3d20706f 73697469 osition = positi │ │ │ │ + 0x00971530 6f6e3b20 0a202023 69666465 66205655 on; . #ifdef VU │ │ │ │ + 0x00971540 4c4b414e 200a2020 2020676c 5f506f73 LKAN . gl_Pos │ │ │ │ + 0x00971550 6974696f 6e2e7920 3d202d67 6c5f506f ition.y = -gl_Po │ │ │ │ + 0x00971560 73697469 6f6e2e79 3b200a20 20202067 sition.y; . g │ │ │ │ + 0x00971570 6c5f506f 73697469 6f6e2e7a 203d2028 l_Position.z = ( │ │ │ │ + 0x00971580 676c5f50 6f736974 696f6e2e 7a202b20 gl_Position.z + │ │ │ │ + 0x00971590 676c5f50 6f736974 696f6e2e 7729202a gl_Position.w) * │ │ │ │ + 0x009715a0 20302e35 3b200a20 2023656e 64696620 0.5; . #endif │ │ │ │ + 0x009715b0 0a20207d 200a0000 20202023 69666465 . } ... #ifde │ │ │ │ + 0x009715c0 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x009715d0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x009715e0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x009715f0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00971600 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00971610 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00971620 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00971630 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00971640 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00971650 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00971660 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00971670 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00971680 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00971690 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x009716a0 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x009716b0 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x009716c0 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x009716d0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x009716e0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x009716f0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00971700 0a202069 6e207665 63332061 5f706f73 . in vec3 a_pos │ │ │ │ + 0x00971710 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00971720 3320615f 6e6f726d 616c3b20 0a202069 3 a_normal; . i │ │ │ │ + 0x00971730 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00971740 78436f6f 72643b20 0a202023 69666465 xCoord; . #ifde │ │ │ │ + 0x00971750 6620454e 41424c45 5f565446 200a2020 f ENABLE_VTF . │ │ │ │ + 0x00971760 6f757420 4c4f575f 50207665 63342076 out LOW_P vec4 v │ │ │ │ + 0x00971770 5f636f6c 6f723b20 0a202023 656c7365 _color; . #else │ │ │ │ + 0x00971780 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x00971790 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x009717a0 2023656e 64696620 0a202075 6e69666f #endif . unifo │ │ │ │ + 0x009717b0 726d206d 61743420 755f6d6f 64656c56 rm mat4 u_modelV │ │ │ │ + 0x009717c0 6965773b 200a2020 756e6966 6f726d20 iew; . uniform │ │ │ │ + 0x009717d0 6d617434 20755f70 726f6a65 6374696f mat4 u_projectio │ │ │ │ + 0x009717e0 6e3b200a 2020756e 69666f72 6d206d61 n; . uniform ma │ │ │ │ + 0x009717f0 74342075 5f706976 6f745472 616e7366 t4 u_pivotTransf │ │ │ │ + 0x00971800 6f726d3b 200a2020 756e6966 6f726d20 orm; . uniform │ │ │ │ + 0x00971810 76656332 20755f63 6f6e7472 61737447 vec2 u_contrastG │ │ │ │ + 0x00971820 616d6d61 3b200a20 20756e69 666f726d amma; . uniform │ │ │ │ + 0x00971830 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00971840 3b200a20 20756e69 666f726d 20666c6f ; . uniform flo │ │ │ │ + 0x00971850 61742075 5f7a5363 616c653b 200a2020 at u_zScale; . │ │ │ │ + 0x00971860 756e6966 6f726d20 666c6f61 7420755f uniform float u_ │ │ │ │ + 0x00971870 696e7465 72706f6c 6174696f 6e3b200a interpolation; . │ │ │ │ + 0x00971880 2020756e 69666f72 6d20666c 6f617420 uniform float │ │ │ │ + 0x00971890 755f6973 4f75746c 696e6550 6173733b u_isOutlinePass; │ │ │ │ + 0x009718a0 200a2020 23696664 65662045 4e41424c . #ifdef ENABL │ │ │ │ + 0x009718b0 455f5654 46200a20 20756e69 666f726d E_VTF . uniform │ │ │ │ + 0x009718c0 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x009718d0 6f725465 783b200a 20202365 6e646966 orTex; . #endif │ │ │ │ + 0x009718e0 200a2020 636f6e73 7420666c 6f617420 . const float │ │ │ │ + 0x009718f0 6b536861 7065436f 6f726453 63616c61 kShapeCoordScala │ │ │ │ + 0x00971900 72203d20 31303030 2e303b20 0a202076 r = 1000.0; . v │ │ │ │ + 0x00971910 65633420 6170706c 79506976 6f745472 ec4 applyPivotTr │ │ │ │ + 0x00971920 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x00971930 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00971940 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00971950 69766f74 5265616c 5a29200a 20207b20 ivotRealZ) . { │ │ │ │ + 0x00971960 0a202020 20766563 34207472 616e7366 . vec4 transf │ │ │ │ + 0x00971970 6f726d65 64506976 6f74203d 20706976 ormedPivot = piv │ │ │ │ + 0x00971980 6f743b20 0a202020 20666c6f 61742077 ot; . float w │ │ │ │ + 0x00971990 203d2074 72616e73 666f726d 65645069 = transformedPi │ │ │ │ + 0x009719a0 766f742e 773b200a 20202020 7472616e vot.w; . tran │ │ │ │ + 0x009719b0 73666f72 6d656450 69766f74 2e787977 sformedPivot.xyw │ │ │ │ + 0x009719c0 203d2028 7069766f 74547261 6e73666f = (pivotTransfo │ │ │ │ + 0x009719d0 726d202a 20766563 34287472 616e7366 rm * vec4(transf │ │ │ │ + 0x009719e0 6f726d65 64506976 6f742e78 792c2070 ormedPivot.xy, p │ │ │ │ + 0x009719f0 69766f74 5265616c 5a2c2077 29292e78 ivotRealZ, w)).x │ │ │ │ + 0x00971a00 79773b20 0a202020 20747261 6e73666f yw; . transfo │ │ │ │ + 0x00971a10 726d6564 5069766f 742e7a20 2a3d2074 rmedPivot.z *= t │ │ │ │ + 0x00971a20 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00971a30 77202f20 773b200a 20202369 66646566 w / w; . #ifdef │ │ │ │ + 0x00971a40 2056554c 4b414e20 0a202020 20747261 VULKAN . tra │ │ │ │ + 0x00971a50 6e73666f 726d6564 5069766f 742e7920 nsformedPivot.y │ │ │ │ + 0x00971a60 3d202d74 72616e73 666f726d 65645069 = -transformedPi │ │ │ │ + 0x00971a70 766f742e 793b200a 20202020 7472616e vot.y; . tran │ │ │ │ + 0x00971a80 73666f72 6d656450 69766f74 2e7a203d sformedPivot.z = │ │ │ │ + 0x00971a90 20287472 616e7366 6f726d65 64506976 (transformedPiv │ │ │ │ + 0x00971aa0 6f742e7a 20202b20 7472616e 73666f72 ot.z + transfor │ │ │ │ + 0x00971ab0 6d656450 69766f74 2e772920 2f20322e medPivot.w) / 2. │ │ │ │ + 0x00971ac0 303b200a 20202365 6e646966 200a2020 0; . #endif . │ │ │ │ + 0x00971ad0 20207265 7475726e 20747261 6e73666f return transfo │ │ │ │ + 0x00971ae0 726d6564 5069766f 743b200a 20207d20 rmedPivot; . } │ │ │ │ + 0x00971af0 0a202076 65633420 6170706c 7942696c . vec4 applyBil │ │ │ │ + 0x00971b00 6c626f61 72645069 766f7454 72616e73 lboardPivotTrans │ │ │ │ + 0x00971b10 666f726d 28766563 34207069 766f742c form(vec4 pivot, │ │ │ │ + 0x00971b20 206d6174 34207069 766f7454 72616e73 mat4 pivotTrans │ │ │ │ + 0x00971b30 666f726d 2c20666c 6f617420 7069766f form, float pivo │ │ │ │ + 0x00971b40 74526561 6c5a2c20 76656332 206f6666 tRealZ, vec2 off │ │ │ │ + 0x00971b50 73657429 200a2020 7b200a20 20202066 set) . { . f │ │ │ │ + 0x00971b60 6c6f6174 206c6f67 69635a20 3d207069 loat logicZ = pi │ │ │ │ + 0x00971b70 766f742e 7a202f20 7069766f 742e773b vot.z / pivot.w; │ │ │ │ + 0x00971b80 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00971b90 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00971ba0 766f7454 72616e73 666f726d 202a2076 votTransform * v │ │ │ │ + 0x00971bb0 65633428 7069766f 742e7879 2c207069 ec4(pivot.xy, pi │ │ │ │ + 0x00971bc0 766f7452 65616c5a 2c207069 766f742e votRealZ, pivot. │ │ │ │ + 0x00971bd0 77293b20 0a202020 20766563 34207363 w); . vec4 sc │ │ │ │ + 0x00971be0 616c6520 3d207069 766f7454 72616e73 ale = pivotTrans │ │ │ │ + 0x00971bf0 666f726d 202a2076 65633428 312e302c form * vec4(1.0, │ │ │ │ + 0x00971c00 202d312e 302c2030 2e302c20 312e3029 -1.0, 0.0, 1.0) │ │ │ │ + 0x00971c10 3b200a20 20202076 65633420 706f7369 ; . vec4 posi │ │ │ │ + 0x00971c20 74696f6e 203d2076 65633428 7472616e tion = vec4(tran │ │ │ │ + 0x00971c30 73666f72 6d656450 69766f74 2e787920 sformedPivot.xy │ │ │ │ + 0x00971c40 2f207472 616e7366 6f726d65 64506976 / transformedPiv │ │ │ │ + 0x00971c50 6f742e77 2c206c6f 6769635a 2c20312e ot.w, logicZ, 1. │ │ │ │ + 0x00971c60 3029202b 20766563 34286f66 66736574 0) + vec4(offset │ │ │ │ + 0x00971c70 202f2073 63616c65 2e77202a 20736361 / scale.w * sca │ │ │ │ + 0x00971c80 6c652e78 2c20302e 302c2030 2e30293b le.x, 0.0, 0.0); │ │ │ │ + 0x00971c90 200a2020 23696664 65662056 554c4b41 . #ifdef VULKA │ │ │ │ + 0x00971ca0 4e200a20 20202070 6f736974 696f6e2e N . position. │ │ │ │ + 0x00971cb0 79203d20 2d706f73 6974696f 6e2e793b y = -position.y; │ │ │ │ + 0x00971cc0 200a2020 2020706f 73697469 6f6e2e7a . position.z │ │ │ │ + 0x00971cd0 203d2028 706f7369 74696f6e 2e7a2020 = (position.z │ │ │ │ + 0x00971ce0 2b20706f 73697469 6f6e2e77 29202f20 + position.w) / │ │ │ │ + 0x00971cf0 322e303b 200a2020 23656e64 6966200a 2.0; . #endif . │ │ │ │ + 0x00971d00 20202020 72657475 726e2070 6f736974 return posit │ │ │ │ + 0x00971d10 696f6e3b 200a2020 7d200a20 20766563 ion; . } . vec │ │ │ │ + 0x00971d20 32206361 6c634c69 6e655472 616e7366 2 calcLineTransf │ │ │ │ + 0x00971d30 6f726d65 64417869 73506f73 28766563 ormedAxisPos(vec │ │ │ │ + 0x00971d40 32206f72 6967696e 616c4178 6973506f 2 originalAxisPo │ │ │ │ + 0x00971d50 732c2076 65633220 73686966 74656450 s, vec2 shiftedP │ │ │ │ + 0x00971d60 6f732c20 6d617434 206d6f64 656c5669 os, mat4 modelVi │ │ │ │ + 0x00971d70 65772c20 666c6f61 74206861 6c665769 ew, float halfWi │ │ │ │ + 0x00971d80 64746829 200a2020 7b200a20 20202076 dth) . { . v │ │ │ │ + 0x00971d90 65633220 70203d20 28766563 34287368 ec2 p = (vec4(sh │ │ │ │ + 0x00971da0 69667465 64506f73 2c20302e 302c2031 iftedPos, 0.0, 1 │ │ │ │ + 0x00971db0 2e302920 2a206d6f 64656c56 69657729 .0) * modelView) │ │ │ │ + 0x00971dc0 2e78793b 200a2020 20207665 63322064 .xy; . vec2 d │ │ │ │ + 0x00971dd0 203d2070 202d206f 72696769 6e616c41 = p - originalA │ │ │ │ + 0x00971de0 78697350 6f733b20 0a202020 20696620 xisPos; . if │ │ │ │ + 0x00971df0 28646f74 28642c20 64292021 3d20302e (dot(d, d) != 0. │ │ │ │ + 0x00971e00 3029200a 20202020 20207265 7475726e 0) . return │ │ │ │ + 0x00971e10 206f7269 67696e61 6c417869 73506f73 originalAxisPos │ │ │ │ + 0x00971e20 202b206e 6f726d61 6c697a65 28642920 + normalize(d) │ │ │ │ + 0x00971e30 2a206861 6c665769 6474683b 200a2020 * halfWidth; . │ │ │ │ + 0x00971e40 2020656c 7365200a 20202020 20207265 else . re │ │ │ │ + 0x00971e50 7475726e 206f7269 67696e61 6c417869 turn originalAxi │ │ │ │ + 0x00971e60 73506f73 3b200a20 207d200a 2020766f sPos; . } . vo │ │ │ │ + 0x00971e70 6964206d 61696e28 29200a20 207b200a id main() . { . │ │ │ │ + 0x00971e80 20202020 76656332 206e6f72 6d616c20 vec2 normal │ │ │ │ + 0x00971e90 3d20615f 6e6f726d 616c2e78 793b200a = a_normal.xy; . │ │ │ │ + 0x00971ea0 20202020 666c6f61 74206861 6c665769 float halfWi │ │ │ │ + 0x00971eb0 64746820 3d206c65 6e677468 286e6f72 dth = length(nor │ │ │ │ + 0x00971ec0 6d616c29 3b200a20 20202076 65633220 mal); . vec2 │ │ │ │ + 0x00971ed0 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x00971ee0 6f73203d 20287665 63342861 5f706f73 os = (vec4(a_pos │ │ │ │ + 0x00971ef0 6974696f 6e2e7879 2c20302e 302c2031 ition.xy, 0.0, 1 │ │ │ │ + 0x00971f00 2e302920 2a20755f 6d6f6465 6c566965 .0) * u_modelVie │ │ │ │ + 0x00971f10 77292e78 793b200a 20202020 69662028 w).xy; . if ( │ │ │ │ + 0x00971f20 68616c66 57696474 6820213d 20302e30 halfWidth != 0.0 │ │ │ │ + 0x00971f30 29200a20 2020207b 200a2020 20202020 ) . { . │ │ │ │ + 0x00971f40 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x00971f50 6f73203d 2063616c 634c696e 65547261 os = calcLineTra │ │ │ │ + 0x00971f60 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x00971f70 7472616e 73666f72 6d656441 78697350 transformedAxisP │ │ │ │ + 0x00971f80 6f732c20 615f706f 73697469 6f6e2e78 os, a_position.x │ │ │ │ + 0x00971f90 79202b20 6e6f726d 616c2c20 0a202020 y + normal, . │ │ │ │ + 0x00971fa0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00971fb0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00971fc0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00971fd0 20202075 5f6d6f64 656c5669 65772c20 u_modelView, │ │ │ │ + 0x00971fe0 68616c66 57696474 68293b20 0a202020 halfWidth); . │ │ │ │ + 0x00971ff0 207d200a 20202369 66646566 20454e41 } . #ifdef ENA │ │ │ │ + 0x00972000 424c455f 56544620 0a202020 20765f63 BLE_VTF . v_c │ │ │ │ + 0x00972010 6f6c6f72 203d2074 65787475 72652875 olor = texture(u │ │ │ │ + 0x00972020 5f636f6c 6f725465 782c2061 5f636f6c _colorTex, a_col │ │ │ │ + 0x00972030 6f725465 78436f6f 7264293b 200a2020 orTexCoord); . │ │ │ │ + 0x00972040 23656c73 65200a20 20202076 5f636f6c #else . v_col │ │ │ │ + 0x00972050 6f725465 78436f6f 7264203d 20615f63 orTexCoord = a_c │ │ │ │ + 0x00972060 6f6c6f72 54657843 6f6f7264 3b200a20 olorTexCoord; . │ │ │ │ + 0x00972070 2023656e 64696620 0a202020 20766563 #endif . vec │ │ │ │ + 0x00972080 3420706f 73203d20 76656334 28747261 4 pos = vec4(tra │ │ │ │ + 0x00972090 6e73666f 726d6564 41786973 506f732c nsformedAxisPos, │ │ │ │ + 0x009720a0 20615f70 6f736974 696f6e2e 7a2c2031 a_position.z, 1 │ │ │ │ + 0x009720b0 2e302920 2a20755f 70726f6a 65637469 .0) * u_projecti │ │ │ │ + 0x009720c0 6f6e3b20 0a202020 20676c5f 506f7369 on; . gl_Posi │ │ │ │ + 0x009720d0 74696f6e 203d2061 70706c79 5069766f tion = applyPivo │ │ │ │ + 0x009720e0 74547261 6e73666f 726d2870 6f732c20 tTransform(pos, │ │ │ │ + 0x009720f0 755f7069 766f7454 72616e73 666f726d u_pivotTransform │ │ │ │ + 0x00972100 2c20302e 30293b20 0a20207d 200a0000 , 0.0); . } ... │ │ │ │ + 0x00972110 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00972120 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00972130 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00972140 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x00972150 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x00972160 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x00972170 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00972180 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x00972190 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x009721a0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x009721b0 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x009721c0 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x009721d0 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x009721e0 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x009721f0 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00972200 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00972210 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00972220 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00972230 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00972240 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x00972250 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x00972260 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x00972270 2020696e 20766563 3320615f 6e6f726d in vec3 a_norm │ │ │ │ + 0x00972280 616c3b20 0a202069 6e207665 63322061 al; . in vec2 a │ │ │ │ + 0x00972290 5f636f6c 6f725465 78436f6f 7264733b _colorTexCoords; │ │ │ │ + 0x009722a0 200a2020 6f757420 76656332 20765f63 . out vec2 v_c │ │ │ │ + 0x009722b0 6f6c6f72 54657843 6f6f7264 733b200a olorTexCoords; . │ │ │ │ + 0x009722c0 20206f75 7420666c 6f617420 765f696e out float v_in │ │ │ │ + 0x009722d0 74656e73 6974793b 200a2020 756e6966 tensity; . unif │ │ │ │ + 0x009722e0 6f726d20 6d617434 20755f6d 6f64656c orm mat4 u_model │ │ │ │ + 0x009722f0 56696577 3b200a20 20756e69 666f726d View; . uniform │ │ │ │ + 0x00972300 206d6174 3420755f 70726f6a 65637469 mat4 u_projecti │ │ │ │ + 0x00972310 6f6e3b20 0a202075 6e69666f 726d206d on; . uniform m │ │ │ │ + 0x00972320 61743420 755f7069 766f7454 72616e73 at4 u_pivotTrans │ │ │ │ + 0x00972330 666f726d 3b200a20 20756e69 666f726d form; . uniform │ │ │ │ + 0x00972340 20766563 3220755f 636f6e74 72617374 vec2 u_contrast │ │ │ │ + 0x00972350 47616d6d 613b200a 2020756e 69666f72 Gamma; . unifor │ │ │ │ + 0x00972360 6d20666c 6f617420 755f6f70 61636974 m float u_opacit │ │ │ │ + 0x00972370 793b200a 2020756e 69666f72 6d20666c y; . uniform fl │ │ │ │ + 0x00972380 6f617420 755f7a53 63616c65 3b200a20 oat u_zScale; . │ │ │ │ + 0x00972390 20756e69 666f726d 20666c6f 61742075 uniform float u │ │ │ │ + 0x009723a0 5f696e74 6572706f 6c617469 6f6e3b20 _interpolation; │ │ │ │ + 0x009723b0 0a202075 6e69666f 726d2066 6c6f6174 . uniform float │ │ │ │ + 0x009723c0 20755f69 734f7574 6c696e65 50617373 u_isOutlinePass │ │ │ │ + 0x009723d0 3b200a20 20636f6e 73742076 65633420 ; . const vec4 │ │ │ │ + 0x009723e0 6b4e6f72 6d616c69 7a65644c 69676874 kNormalizedLight │ │ │ │ + 0x009723f0 44697220 3d207665 63342830 2e333136 Dir = vec4(0.316 │ │ │ │ + 0x00972400 322c2030 2e302c20 302e3934 38362c20 2, 0.0, 0.9486, │ │ │ │ + 0x00972410 302e3029 3b200a20 20636f6e 73742066 0.0); . const f │ │ │ │ + 0x00972420 6c6f6174 206b5368 61706543 6f6f7264 loat kShapeCoord │ │ │ │ + 0x00972430 5363616c 6172203d 20313030 302e303b Scalar = 1000.0; │ │ │ │ + 0x00972440 200a2020 76656334 20617070 6c795069 . vec4 applyPi │ │ │ │ + 0x00972450 766f7454 72616e73 666f726d 28766563 votTransform(vec │ │ │ │ + 0x00972460 34207069 766f742c 206d6174 34207069 4 pivot, mat4 pi │ │ │ │ + 0x00972470 766f7454 72616e73 666f726d 2c20666c votTransform, fl │ │ │ │ + 0x00972480 6f617420 7069766f 74526561 6c5a2920 oat pivotRealZ) │ │ │ │ + 0x00972490 0a20207b 200a2020 20207665 63342074 . { . vec4 t │ │ │ │ + 0x009724a0 72616e73 666f726d 65645069 766f7420 ransformedPivot │ │ │ │ + 0x009724b0 3d207069 766f743b 200a2020 2020666c = pivot; . fl │ │ │ │ + 0x009724c0 6f617420 77203d20 7472616e 73666f72 oat w = transfor │ │ │ │ + 0x009724d0 6d656450 69766f74 2e773b20 0a202020 medPivot.w; . │ │ │ │ + 0x009724e0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009724f0 742e7879 77203d20 28706976 6f745472 t.xyw = (pivotTr │ │ │ │ + 0x00972500 616e7366 6f726d20 2a207665 63342874 ansform * vec4(t │ │ │ │ + 0x00972510 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00972520 78792c20 7069766f 74526561 6c5a2c20 xy, pivotRealZ, │ │ │ │ + 0x00972530 7729292e 7879773b 200a2020 20207472 w)).xyw; . tr │ │ │ │ + 0x00972540 616e7366 6f726d65 64506976 6f742e7a ansformedPivot.z │ │ │ │ + 0x00972550 202a3d20 7472616e 73666f72 6d656450 *= transformedP │ │ │ │ + 0x00972560 69766f74 2e77202f 20773b20 0a202023 ivot.w / w; . # │ │ │ │ + 0x00972570 69666465 66205655 4c4b414e 200a2020 ifdef VULKAN . │ │ │ │ + 0x00972580 20207472 616e7366 6f726d65 64506976 transformedPiv │ │ │ │ + 0x00972590 6f742e79 203d202d 7472616e 73666f72 ot.y = -transfor │ │ │ │ + 0x009725a0 6d656450 69766f74 2e793b20 0a202020 medPivot.y; . │ │ │ │ + 0x009725b0 20747261 6e73666f 726d6564 5069766f transformedPivo │ │ │ │ + 0x009725c0 742e7a20 3d202874 72616e73 666f726d t.z = (transform │ │ │ │ + 0x009725d0 65645069 766f742e 7a20202b 20747261 edPivot.z + tra │ │ │ │ + 0x009725e0 6e73666f 726d6564 5069766f 742e7729 nsformedPivot.w) │ │ │ │ + 0x009725f0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x00972600 66200a20 20202072 65747572 6e207472 f . return tr │ │ │ │ + 0x00972610 616e7366 6f726d65 64506976 6f743b20 ansformedPivot; │ │ │ │ + 0x00972620 0a20207d 200a2020 76656334 20617070 . } . vec4 app │ │ │ │ + 0x00972630 6c794269 6c6c626f 61726450 69766f74 lyBillboardPivot │ │ │ │ + 0x00972640 5472616e 73666f72 6d287665 63342070 Transform(vec4 p │ │ │ │ + 0x00972650 69766f74 2c206d61 74342070 69766f74 ivot, mat4 pivot │ │ │ │ + 0x00972660 5472616e 73666f72 6d2c2066 6c6f6174 Transform, float │ │ │ │ + 0x00972670 20706976 6f745265 616c5a2c 20766563 pivotRealZ, vec │ │ │ │ + 0x00972680 32206f66 66736574 29200a20 207b200a 2 offset) . { . │ │ │ │ + 0x00972690 20202020 666c6f61 74206c6f 6769635a float logicZ │ │ │ │ + 0x009726a0 203d2070 69766f74 2e7a202f 20706976 = pivot.z / piv │ │ │ │ + 0x009726b0 6f742e77 3b200a20 20202076 65633420 ot.w; . vec4 │ │ │ │ + 0x009726c0 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x009726d0 203d2070 69766f74 5472616e 73666f72 = pivotTransfor │ │ │ │ + 0x009726e0 6d202a20 76656334 28706976 6f742e78 m * vec4(pivot.x │ │ │ │ + 0x009726f0 792c2070 69766f74 5265616c 5a2c2070 y, pivotRealZ, p │ │ │ │ + 0x00972700 69766f74 2e77293b 200a2020 20207665 ivot.w); . ve │ │ │ │ + 0x00972710 63342073 63616c65 203d2070 69766f74 c4 scale = pivot │ │ │ │ + 0x00972720 5472616e 73666f72 6d202a20 76656334 Transform * vec4 │ │ │ │ + 0x00972730 28312e30 2c202d31 2e302c20 302e302c (1.0, -1.0, 0.0, │ │ │ │ + 0x00972740 20312e30 293b200a 20202020 76656334 1.0); . vec4 │ │ │ │ + 0x00972750 20706f73 6974696f 6e203d20 76656334 position = vec4 │ │ │ │ + 0x00972760 28747261 6e73666f 726d6564 5069766f (transformedPivo │ │ │ │ + 0x00972770 742e7879 202f2074 72616e73 666f726d t.xy / transform │ │ │ │ + 0x00972780 65645069 766f742e 772c206c 6f676963 edPivot.w, logic │ │ │ │ + 0x00972790 5a2c2031 2e302920 2b207665 6334286f Z, 1.0) + vec4(o │ │ │ │ + 0x009727a0 66667365 74202f20 7363616c 652e7720 ffset / scale.w │ │ │ │ + 0x009727b0 2a207363 616c652e 782c2030 2e302c20 * scale.x, 0.0, │ │ │ │ + 0x009727c0 302e3029 3b200a20 20236966 64656620 0.0); . #ifdef │ │ │ │ + 0x009727d0 56554c4b 414e200a 20202020 706f7369 VULKAN . posi │ │ │ │ + 0x009727e0 74696f6e 2e79203d 202d706f 73697469 tion.y = -positi │ │ │ │ + 0x009727f0 6f6e2e79 3b200a20 20202070 6f736974 on.y; . posit │ │ │ │ + 0x00972800 696f6e2e 7a203d20 28706f73 6974696f ion.z = (positio │ │ │ │ + 0x00972810 6e2e7a20 202b2070 6f736974 696f6e2e n.z + position. │ │ │ │ + 0x00972820 7729202f 20322e30 3b200a20 2023656e w) / 2.0; . #en │ │ │ │ + 0x00972830 64696620 0a202020 20726574 75726e20 dif . return │ │ │ │ + 0x00972840 706f7369 74696f6e 3b200a20 207d200a position; . } . │ │ │ │ + 0x00972850 20207665 63322063 616c634c 696e6554 vec2 calcLineT │ │ │ │ + 0x00972860 72616e73 666f726d 65644178 6973506f ransformedAxisPo │ │ │ │ + 0x00972870 73287665 6332206f 72696769 6e616c41 s(vec2 originalA │ │ │ │ + 0x00972880 78697350 6f732c20 76656332 20736869 xisPos, vec2 shi │ │ │ │ + 0x00972890 66746564 506f732c 206d6174 34206d6f ftedPos, mat4 mo │ │ │ │ + 0x009728a0 64656c56 6965772c 20666c6f 61742068 delView, float h │ │ │ │ + 0x009728b0 616c6657 69647468 29200a20 207b200a alfWidth) . { . │ │ │ │ + 0x009728c0 20202020 76656332 2070203d 20287665 vec2 p = (ve │ │ │ │ + 0x009728d0 63342873 68696674 6564506f 732c2030 c4(shiftedPos, 0 │ │ │ │ + 0x009728e0 2e302c20 312e3029 202a206d 6f64656c .0, 1.0) * model │ │ │ │ + 0x009728f0 56696577 292e7879 3b200a20 20202076 View).xy; . v │ │ │ │ + 0x00972900 65633220 64203d20 70202d20 6f726967 ec2 d = p - orig │ │ │ │ + 0x00972910 696e616c 41786973 506f733b 200a2020 inalAxisPos; . │ │ │ │ + 0x00972920 20206966 2028646f 7428642c 20642920 if (dot(d, d) │ │ │ │ + 0x00972930 213d2030 2e302920 0a202020 20202072 != 0.0) . r │ │ │ │ + 0x00972940 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00972950 6973506f 73202b20 6e6f726d 616c697a isPos + normaliz │ │ │ │ + 0x00972960 65286429 202a2068 616c6657 69647468 e(d) * halfWidth │ │ │ │ + 0x00972970 3b200a20 20202065 6c736520 0a202020 ; . else . │ │ │ │ + 0x00972980 20202072 65747572 6e206f72 6967696e return origin │ │ │ │ + 0x00972990 616c4178 6973506f 733b200a 20207d20 alAxisPos; . } │ │ │ │ + 0x009729a0 0a202076 6f696420 6d61696e 2829200a . void main() . │ │ │ │ + 0x009729b0 20207b20 0a202020 20766563 3420706f { . vec4 po │ │ │ │ + 0x009729c0 73203d20 76656334 28615f70 6f736974 s = vec4(a_posit │ │ │ │ + 0x009729d0 696f6e2c 20312e30 29202a20 755f6d6f ion, 1.0) * u_mo │ │ │ │ + 0x009729e0 64656c56 6965773b 200a2020 20207665 delView; . ve │ │ │ │ + 0x009729f0 6334206e 6f726d61 6c203d20 76656334 c4 normal = vec4 │ │ │ │ + 0x00972a00 28615f70 6f736974 696f6e20 2b20615f (a_position + a_ │ │ │ │ + 0x00972a10 6e6f726d 616c2c20 312e3029 202a2075 normal, 1.0) * u │ │ │ │ + 0x00972a20 5f6d6f64 656c5669 65773b20 0a202020 _modelView; . │ │ │ │ + 0x00972a30 206e6f72 6d616c2e 78797720 3d20286e normal.xyw = (n │ │ │ │ + 0x00972a40 6f726d61 6c202a20 755f7072 6f6a6563 ormal * u_projec │ │ │ │ + 0x00972a50 74696f6e 292e7879 773b200a 20202020 tion).xyw; . │ │ │ │ + 0x00972a60 6e6f726d 616c2e7a 203d206e 6f726d61 normal.z = norma │ │ │ │ + 0x00972a70 6c2e7a20 2a20755f 7a536361 6c653b20 l.z * u_zScale; │ │ │ │ + 0x00972a80 0a202020 20706f73 2e787977 203d2028 . pos.xyw = ( │ │ │ │ + 0x00972a90 706f7320 2a20755f 70726f6a 65637469 pos * u_projecti │ │ │ │ + 0x00972aa0 6f6e292e 7879773b 200a2020 2020706f on).xyw; . po │ │ │ │ + 0x00972ab0 732e7a20 3d20615f 706f7369 74696f6e s.z = a_position │ │ │ │ + 0x00972ac0 2e7a202a 20755f7a 5363616c 653b200a .z * u_zScale; . │ │ │ │ + 0x00972ad0 20202020 76656334 206e6f72 6d446972 vec4 normDir │ │ │ │ + 0x00972ae0 203d206e 6f726d61 6c202d20 706f733b = normal - pos; │ │ │ │ + 0x00972af0 200a2020 20206966 2028646f 74286e6f . if (dot(no │ │ │ │ + 0x00972b00 726d4469 722c206e 6f726d44 69722920 rmDir, normDir) │ │ │ │ + 0x00972b10 213d2030 2e302920 0a202020 20202076 != 0.0) . v │ │ │ │ + 0x00972b20 5f696e74 656e7369 7479203d 206d6178 _intensity = max │ │ │ │ + 0x00972b30 28302e30 2c202d64 6f74286b 4e6f726d (0.0, -dot(kNorm │ │ │ │ + 0x00972b40 616c697a 65644c69 67687444 69722c20 alizedLightDir, │ │ │ │ + 0x00972b50 6e6f726d 616c697a 65286e6f 726d4469 normalize(normDi │ │ │ │ + 0x00972b60 72292929 3b200a20 20202065 6c736520 r))); . else │ │ │ │ + 0x00972b70 0a202020 20202076 5f696e74 656e7369 . v_intensi │ │ │ │ + 0x00972b80 7479203d 20302e30 3b200a20 20202067 ty = 0.0; . g │ │ │ │ + 0x00972b90 6c5f506f 73697469 6f6e203d 20755f70 l_Position = u_p │ │ │ │ + 0x00972ba0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x00972bb0 706f733b 200a2020 23696664 65662056 pos; . #ifdef V │ │ │ │ + 0x00972bc0 554c4b41 4e200a20 20202067 6c5f506f ULKAN . gl_Po │ │ │ │ + 0x00972bd0 73697469 6f6e2e79 203d202d 676c5f50 sition.y = -gl_P │ │ │ │ + 0x00972be0 6f736974 696f6e2e 793b200a 20202020 osition.y; . │ │ │ │ + 0x00972bf0 676c5f50 6f736974 696f6e2e 7a203d20 gl_Position.z = │ │ │ │ + 0x00972c00 28676c5f 506f7369 74696f6e 2e7a2020 (gl_Position.z │ │ │ │ + 0x00972c10 2b20676c 5f506f73 6974696f 6e2e7729 + gl_Position.w) │ │ │ │ + 0x00972c20 202a2030 2e353b20 0a202023 656e6469 * 0.5; . #endi │ │ │ │ + 0x00972c30 66200a20 20202076 5f636f6c 6f725465 f . v_colorTe │ │ │ │ + 0x00972c40 78436f6f 72647320 3d20615f 636f6c6f xCoords = a_colo │ │ │ │ + 0x00972c50 72546578 436f6f72 64733b20 0a20207d rTexCoords; . } │ │ │ │ + 0x00972c60 200a0000 00000000 20202023 69666465 ....... #ifde │ │ │ │ + 0x00972c70 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00972c80 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00972c90 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00972ca0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00972cb0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00972cc0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00972cd0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00972ce0 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00972cf0 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00972d00 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00972d10 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00972d20 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00972d30 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00972d40 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00972d50 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00972d60 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00972d70 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00972d80 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00972d90 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00972da0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00972db0 0a202069 6e207665 63342076 5f636f6f . in vec4 v_coo │ │ │ │ + 0x00972dc0 7264733b 200a2020 696e2076 65633420 rds; . in vec4 │ │ │ │ + 0x00972dd0 765f6f66 66736574 303b200a 2020696e v_offset0; . in │ │ │ │ + 0x00972de0 20766563 3420765f 6f666673 6574313b vec4 v_offset1; │ │ │ │ + 0x00972df0 200a2020 696e2076 65633420 765f6f66 . in vec4 v_of │ │ │ │ + 0x00972e00 66736574 323b200a 20206f75 74207665 fset2; . out ve │ │ │ │ + 0x00972e10 63342076 5f467261 67436f6c 6f723b20 c4 v_FragColor; │ │ │ │ + 0x00972e20 0a202075 6e69666f 726d2076 65633420 . uniform vec4 │ │ │ │ + 0x00972e30 755f6672 616d6562 75666665 724d6574 u_framebufferMet │ │ │ │ + 0x00972e40 72696373 3b200a20 20756e69 666f726d rics; . uniform │ │ │ │ + 0x00972e50 2073616d 706c6572 32442075 5f636f6c sampler2D u_col │ │ │ │ + 0x00972e60 6f725465 783b200a 2020756e 69666f72 orTex; . unifor │ │ │ │ + 0x00972e70 6d207361 6d706c65 72324420 755f736d m sampler2D u_sm │ │ │ │ + 0x00972e80 61614172 65613b20 0a202075 6e69666f aaArea; . unifo │ │ │ │ + 0x00972e90 726d2073 616d706c 65723244 20755f73 rm sampler2D u_s │ │ │ │ + 0x00972ea0 6d616153 65617263 683b200a 20202364 maaSearch; . #d │ │ │ │ + 0x00972eb0 6566696e 6520534d 41415f53 45415243 efine SMAA_SEARC │ │ │ │ + 0x00972ec0 48544558 5f53495a 45207665 63322836 HTEX_SIZE vec2(6 │ │ │ │ + 0x00972ed0 362e302c 2033332e 3029200a 20202364 6.0, 33.0) . #d │ │ │ │ + 0x00972ee0 6566696e 6520534d 41415f53 45415243 efine SMAA_SEARC │ │ │ │ + 0x00972ef0 48544558 5f504143 4b45445f 53495a45 HTEX_PACKED_SIZE │ │ │ │ + 0x00972f00 20766563 32283634 2e302c20 31362e30 vec2(64.0, 16.0 │ │ │ │ + 0x00972f10 29200a20 20236465 66696e65 20534d41 ) . #define SMA │ │ │ │ + 0x00972f20 415f4152 45415445 585f4d41 585f4449 A_AREATEX_MAX_DI │ │ │ │ + 0x00972f30 5354414e 43452031 362e3020 0a202023 STANCE 16.0 . # │ │ │ │ + 0x00972f40 64656669 6e652053 4d41415f 41524541 define SMAA_AREA │ │ │ │ + 0x00972f50 5445585f 50495845 4c5f5349 5a452028 TEX_PIXEL_SIZE ( │ │ │ │ + 0x00972f60 76656332 28312e30 202f2032 35362e30 vec2(1.0 / 256.0 │ │ │ │ + 0x00972f70 2c20312e 30202f20 31303234 2e302929 , 1.0 / 1024.0)) │ │ │ │ + 0x00972f80 200a2020 23646566 696e6520 534d4141 . #define SMAA │ │ │ │ + 0x00972f90 4c6f6f70 42656769 6e28636f 6e646974 LoopBegin(condit │ │ │ │ + 0x00972fa0 696f6e29 20776869 6c652028 636f6e64 ion) while (cond │ │ │ │ + 0x00972fb0 6974696f 6e29207b 200a2020 23646566 ition) { . #def │ │ │ │ + 0x00972fc0 696e6520 534d4141 4c6f6f70 456e6420 ine SMAALoopEnd │ │ │ │ + 0x00972fd0 7d200a20 20236465 66696e65 20534d41 } . #define SMA │ │ │ │ + 0x00972fe0 4153616d 706c654c 6576656c 5a65726f ASampleLevelZero │ │ │ │ + 0x00972ff0 28746578 2c20636f 6f726429 20746578 (tex, coord) tex │ │ │ │ + 0x00973000 74757265 4c6f6428 7465782c 20636f6f tureLod(tex, coo │ │ │ │ + 0x00973010 72642c20 302e3029 200a2020 23646566 rd, 0.0) . #def │ │ │ │ + 0x00973020 696e6520 534d4141 53616d70 6c654c65 ine SMAASampleLe │ │ │ │ + 0x00973030 76656c5a 65726f4f 66667365 74287465 velZeroOffset(te │ │ │ │ + 0x00973040 782c2063 6f6f7264 2c206f66 66736574 x, coord, offset │ │ │ │ + 0x00973050 29207465 78747572 654c6f64 4f666673 ) textureLodOffs │ │ │ │ + 0x00973060 65742874 65782c20 636f6f72 642c2030 et(tex, coord, 0 │ │ │ │ + 0x00973070 2e302c20 6f666673 65742920 0a202023 .0, offset) . # │ │ │ │ + 0x00973080 64656669 6e652053 4d414152 6f756e64 define SMAARound │ │ │ │ + 0x00973090 28762920 726f756e 64282876 2929200a (v) round((v)) . │ │ │ │ + 0x009730a0 20202364 6566696e 6520534d 41414f66 #define SMAAOf │ │ │ │ + 0x009730b0 66736574 28782c79 29206976 65633228 fset(x,y) ivec2( │ │ │ │ + 0x009730c0 782c7929 200a2020 636f6e73 74207665 x,y) . const ve │ │ │ │ + 0x009730d0 6332206b 41726561 5465784d 61784469 c2 kAreaTexMaxDi │ │ │ │ + 0x009730e0 7374616e 6365203d 20766563 3228534d stance = vec2(SM │ │ │ │ + 0x009730f0 41415f41 52454154 45585f4d 41585f44 AA_AREATEX_MAX_D │ │ │ │ + 0x00973100 49535441 4e43452c 20534d41 415f4152 ISTANCE, SMAA_AR │ │ │ │ + 0x00973110 45415445 585f4d41 585f4449 5354414e EATEX_MAX_DISTAN │ │ │ │ + 0x00973120 4345293b 200a2020 636f6e73 7420666c CE); . const fl │ │ │ │ + 0x00973130 6f617420 6b416374 69766174 696f6e54 oat kActivationT │ │ │ │ + 0x00973140 68726573 686f6c64 203d2030 2e383238 hreshold = 0.828 │ │ │ │ + 0x00973150 313b200a 2020666c 6f617420 534d4141 1; . float SMAA │ │ │ │ + 0x00973160 53656172 63684c65 6e677468 28766563 SearchLength(vec │ │ │ │ + 0x00973170 3220652c 20666c6f 6174206f 66667365 2 e, float offse │ │ │ │ + 0x00973180 7429200a 20207b20 0a202020 20766563 t) . { . vec │ │ │ │ + 0x00973190 32207363 616c6520 3d20534d 41415f53 2 scale = SMAA_S │ │ │ │ + 0x009731a0 45415243 48544558 5f53495a 45202a20 EARCHTEX_SIZE * │ │ │ │ + 0x009731b0 76656332 28302e35 2c202d31 2e30293b vec2(0.5, -1.0); │ │ │ │ + 0x009731c0 200a2020 20207665 63322062 69617320 . vec2 bias │ │ │ │ + 0x009731d0 3d20534d 41415f53 45415243 48544558 = SMAA_SEARCHTEX │ │ │ │ + 0x009731e0 5f53495a 45202a20 76656332 286f6666 _SIZE * vec2(off │ │ │ │ + 0x009731f0 7365742c 20312e30 293b200a 20202020 set, 1.0); . │ │ │ │ + 0x00973200 7363616c 65202b3d 20766563 32282d31 scale += vec2(-1 │ │ │ │ + 0x00973210 2e302c20 20312e30 293b200a 20202020 .0, 1.0); . │ │ │ │ + 0x00973220 62696173 202b3d20 76656332 2820302e bias += vec2( 0. │ │ │ │ + 0x00973230 352c202d 302e3529 3b200a20 20202073 5, -0.5); . s │ │ │ │ + 0x00973240 63616c65 202a3d20 312e3020 2f20534d cale *= 1.0 / SM │ │ │ │ + 0x00973250 41415f53 45415243 48544558 5f504143 AA_SEARCHTEX_PAC │ │ │ │ + 0x00973260 4b45445f 53495a45 3b200a20 20202062 KED_SIZE; . b │ │ │ │ + 0x00973270 69617320 2a3d2031 2e30202f 20534d41 ias *= 1.0 / SMA │ │ │ │ + 0x00973280 415f5345 41524348 5445585f 5041434b A_SEARCHTEX_PACK │ │ │ │ + 0x00973290 45445f53 495a453b 200a2020 20207265 ED_SIZE; . re │ │ │ │ + 0x009732a0 7475726e 20534d41 4153616d 706c654c turn SMAASampleL │ │ │ │ + 0x009732b0 6576656c 5a65726f 28755f73 6d616153 evelZero(u_smaaS │ │ │ │ + 0x009732c0 65617263 682c2073 63616c65 202a2065 earch, scale * e │ │ │ │ + 0x009732d0 202b2062 69617329 2e723b20 0a20207d + bias).r; . } │ │ │ │ + 0x009732e0 200a2020 666c6f61 7420534d 41415365 . float SMAASe │ │ │ │ + 0x009732f0 61726368 584c6566 74287665 63322074 archXLeft(vec2 t │ │ │ │ + 0x00973300 6578636f 6f72642c 20666c6f 61742065 excoord, float e │ │ │ │ + 0x00973310 6e642920 0a20207b 200a2020 20207665 nd) . { . ve │ │ │ │ + 0x00973320 63322065 203d2076 65633228 302e302c c2 e = vec2(0.0, │ │ │ │ + 0x00973330 20312e30 293b200a 20202020 534d4141 1.0); . SMAA │ │ │ │ + 0x00973340 4c6f6f70 42656769 6e287465 78636f6f LoopBegin(texcoo │ │ │ │ + 0x00973350 72642e78 203e2065 6e642026 2620652e rd.x > end && e. │ │ │ │ + 0x00973360 67203e20 6b416374 69766174 696f6e54 g > kActivationT │ │ │ │ + 0x00973370 68726573 686f6c64 20262620 652e7220 hreshold && e.r │ │ │ │ + 0x00973380 3d3d2030 2e302920 0a202020 20202065 == 0.0) . e │ │ │ │ + 0x00973390 203d2053 4d414153 616d706c 654c6576 = SMAASampleLev │ │ │ │ + 0x009733a0 656c5a65 726f2875 5f636f6c 6f725465 elZero(u_colorTe │ │ │ │ + 0x009733b0 782c2074 6578636f 6f726429 2e72673b x, texcoord).rg; │ │ │ │ + 0x009733c0 200a2020 20202020 74657863 6f6f7264 . texcoord │ │ │ │ + 0x009733d0 203d2076 65633228 2d322e30 2c20302e = vec2(-2.0, 0. │ │ │ │ + 0x009733e0 3029202a 20755f66 72616d65 62756666 0) * u_framebuff │ │ │ │ + 0x009733f0 65724d65 74726963 732e7879 202b2074 erMetrics.xy + t │ │ │ │ + 0x00973400 6578636f 6f72643b 200a2020 2020534d excoord; . SM │ │ │ │ + 0x00973410 41414c6f 6f70456e 64200a20 20202066 AALoopEnd . f │ │ │ │ + 0x00973420 6c6f6174 206f6666 73657420 3d20332e loat offset = 3. │ │ │ │ + 0x00973430 3235202d 20283235 352e3020 2f203132 25 - (255.0 / 12 │ │ │ │ + 0x00973440 372e3029 202a2053 4d414153 65617263 7.0) * SMAASearc │ │ │ │ + 0x00973450 684c656e 67746828 652c2030 2e30293b hLength(e, 0.0); │ │ │ │ + 0x00973460 200a2020 20207265 7475726e 20755f66 . return u_f │ │ │ │ + 0x00973470 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ + 0x00973480 732e7820 2a206f66 66736574 202b2074 s.x * offset + t │ │ │ │ + 0x00973490 6578636f 6f72642e 783b200a 20207d20 excoord.x; . } │ │ │ │ + 0x009734a0 0a202066 6c6f6174 20534d41 41536561 . float SMAASea │ │ │ │ + 0x009734b0 72636858 52696768 74287665 63322074 rchXRight(vec2 t │ │ │ │ + 0x009734c0 6578636f 6f72642c 20666c6f 61742065 excoord, float e │ │ │ │ + 0x009734d0 6e642920 0a20207b 200a2020 20207665 nd) . { . ve │ │ │ │ + 0x009734e0 63322065 203d2076 65633228 302e302c c2 e = vec2(0.0, │ │ │ │ + 0x009734f0 20312e30 293b200a 20202020 534d4141 1.0); . SMAA │ │ │ │ + 0x00973500 4c6f6f70 42656769 6e287465 78636f6f LoopBegin(texcoo │ │ │ │ + 0x00973510 72642e78 203c2065 6e642026 2620652e rd.x < end && e. │ │ │ │ + 0x00973520 67203e20 6b416374 69766174 696f6e54 g > kActivationT │ │ │ │ + 0x00973530 68726573 686f6c64 20262620 652e7220 hreshold && e.r │ │ │ │ + 0x00973540 3d3d2030 2e302920 0a202020 20202065 == 0.0) . e │ │ │ │ + 0x00973550 203d2053 4d414153 616d706c 654c6576 = SMAASampleLev │ │ │ │ + 0x00973560 656c5a65 726f2875 5f636f6c 6f725465 elZero(u_colorTe │ │ │ │ + 0x00973570 782c2074 6578636f 6f726429 2e72673b x, texcoord).rg; │ │ │ │ + 0x00973580 200a2020 20202020 74657863 6f6f7264 . texcoord │ │ │ │ + 0x00973590 203d2076 65633228 322e302c 20302e30 = vec2(2.0, 0.0 │ │ │ │ + 0x009735a0 29202a20 755f6672 616d6562 75666665 ) * u_framebuffe │ │ │ │ + 0x009735b0 724d6574 72696373 2e787920 2b207465 rMetrics.xy + te │ │ │ │ + 0x009735c0 78636f6f 72643b20 0a202020 20534d41 xcoord; . SMA │ │ │ │ + 0x009735d0 414c6f6f 70456e64 200a2020 2020666c ALoopEnd . fl │ │ │ │ + 0x009735e0 6f617420 6f666673 6574203d 20332e32 oat offset = 3.2 │ │ │ │ + 0x009735f0 35202d20 28323535 2e30202f 20313237 5 - (255.0 / 127 │ │ │ │ + 0x00973600 2e302920 2a20534d 41415365 61726368 .0) * SMAASearch │ │ │ │ + 0x00973610 4c656e67 74682865 2c20302e 35293b20 Length(e, 0.5); │ │ │ │ + 0x00973620 0a202020 20726574 75726e20 2d755f66 . return -u_f │ │ │ │ + 0x00973630 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ + 0x00973640 732e7820 2a206f66 66736574 202b2074 s.x * offset + t │ │ │ │ + 0x00973650 6578636f 6f72642e 783b200a 20207d20 excoord.x; . } │ │ │ │ + 0x00973660 0a202066 6c6f6174 20534d41 41536561 . float SMAASea │ │ │ │ + 0x00973670 72636859 55702876 65633220 74657863 rchYUp(vec2 texc │ │ │ │ + 0x00973680 6f6f7264 2c20666c 6f617420 656e6429 oord, float end) │ │ │ │ + 0x00973690 200a2020 7b200a20 20202076 65633220 . { . vec2 │ │ │ │ + 0x009736a0 65203d20 76656332 28312e30 2c20302e e = vec2(1.0, 0. │ │ │ │ + 0x009736b0 30293b20 0a202020 20534d41 414c6f6f 0); . SMAALoo │ │ │ │ + 0x009736c0 70426567 696e2874 6578636f 6f72642e pBegin(texcoord. │ │ │ │ + 0x009736d0 79203e20 656e6420 26262065 2e72203e y > end && e.r > │ │ │ │ + 0x009736e0 206b4163 74697661 74696f6e 54687265 kActivationThre │ │ │ │ + 0x009736f0 73686f6c 64202626 20652e67 203d3d20 shold && e.g == │ │ │ │ + 0x00973700 302e3029 200a2020 20202020 65203d20 0.0) . e = │ │ │ │ + 0x00973710 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ + 0x00973720 65726f28 755f636f 6c6f7254 65782c20 ero(u_colorTex, │ │ │ │ + 0x00973730 74657863 6f6f7264 292e7267 3b200a20 texcoord).rg; . │ │ │ │ + 0x00973740 20202020 20746578 636f6f72 64203d20 texcoord = │ │ │ │ + 0x00973750 76656332 28302e30 2c202d32 2e302920 vec2(0.0, -2.0) │ │ │ │ + 0x00973760 2a20755f 6672616d 65627566 6665724d * u_framebufferM │ │ │ │ + 0x00973770 65747269 63732e78 79202b20 74657863 etrics.xy + texc │ │ │ │ + 0x00973780 6f6f7264 3b200a20 20202053 4d41414c oord; . SMAAL │ │ │ │ + 0x00973790 6f6f7045 6e64200a 20202020 666c6f61 oopEnd . floa │ │ │ │ + 0x009737a0 74206f66 66736574 203d2033 2e323520 t offset = 3.25 │ │ │ │ + 0x009737b0 2d202832 35352e30 202f2031 32372e30 - (255.0 / 127.0 │ │ │ │ + 0x009737c0 29202a20 534d4141 53656172 63684c65 ) * SMAASearchLe │ │ │ │ + 0x009737d0 6e677468 28652e67 722c2030 2e30293b ngth(e.gr, 0.0); │ │ │ │ + 0x009737e0 200a2020 20207265 7475726e 20755f66 . return u_f │ │ │ │ + 0x009737f0 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ + 0x00973800 732e7920 2a206f66 66736574 202b2074 s.y * offset + t │ │ │ │ + 0x00973810 6578636f 6f72642e 793b200a 20207d20 excoord.y; . } │ │ │ │ + 0x00973820 0a202066 6c6f6174 20534d41 41536561 . float SMAASea │ │ │ │ + 0x00973830 72636859 446f776e 28766563 32207465 rchYDown(vec2 te │ │ │ │ + 0x00973840 78636f6f 72642c20 666c6f61 7420656e xcoord, float en │ │ │ │ + 0x00973850 6429200a 20207b20 0a202020 20766563 d) . { . vec │ │ │ │ + 0x00973860 32206520 3d207665 63322831 2e302c20 2 e = vec2(1.0, │ │ │ │ + 0x00973870 302e3029 3b200a20 20202053 4d41414c 0.0); . SMAAL │ │ │ │ + 0x00973880 6f6f7042 6567696e 28746578 636f6f72 oopBegin(texcoor │ │ │ │ + 0x00973890 642e7920 3c20656e 64202626 20652e72 d.y < end && e.r │ │ │ │ + 0x009738a0 203e206b 41637469 76617469 6f6e5468 > kActivationTh │ │ │ │ + 0x009738b0 72657368 6f6c6420 26262065 2e67203d reshold && e.g = │ │ │ │ + 0x009738c0 3d20302e 3029200a 20202020 20206520 = 0.0) . e │ │ │ │ + 0x009738d0 3d20534d 41415361 6d706c65 4c657665 = SMAASampleLeve │ │ │ │ + 0x009738e0 6c5a6572 6f28755f 636f6c6f 72546578 lZero(u_colorTex │ │ │ │ + 0x009738f0 2c207465 78636f6f 7264292e 72673b20 , texcoord).rg; │ │ │ │ + 0x00973900 0a202020 20202074 6578636f 6f726420 . texcoord │ │ │ │ + 0x00973910 3d207665 63322830 2e302c20 322e3029 = vec2(0.0, 2.0) │ │ │ │ + 0x00973920 202a2075 5f667261 6d656275 66666572 * u_framebuffer │ │ │ │ + 0x00973930 4d657472 6963732e 7879202b 20746578 Metrics.xy + tex │ │ │ │ + 0x00973940 636f6f72 643b200a 20202020 534d4141 coord; . SMAA │ │ │ │ + 0x00973950 4c6f6f70 456e6420 0a202020 20666c6f LoopEnd . flo │ │ │ │ + 0x00973960 6174206f 66667365 74203d20 332e3235 at offset = 3.25 │ │ │ │ + 0x00973970 202d2028 3235352e 30202f20 3132372e - (255.0 / 127. │ │ │ │ + 0x00973980 3029202a 20534d41 41536561 7263684c 0) * SMAASearchL │ │ │ │ + 0x00973990 656e6774 6828652e 67722c20 302e3529 ength(e.gr, 0.5) │ │ │ │ + 0x009739a0 3b200a20 20202072 65747572 6e202d75 ; . return -u │ │ │ │ + 0x009739b0 5f667261 6d656275 66666572 4d657472 _framebufferMetr │ │ │ │ + 0x009739c0 6963732e 79202a20 6f666673 6574202b ics.y * offset + │ │ │ │ + 0x009739d0 20746578 636f6f72 642e793b 200a2020 texcoord.y; . │ │ │ │ + 0x009739e0 7d200a20 20766563 3220534d 41414172 } . vec2 SMAAAr │ │ │ │ + 0x009739f0 65612876 65633220 64697374 2c20666c ea(vec2 dist, fl │ │ │ │ + 0x00973a00 6f617420 65312c20 666c6f61 74206532 oat e1, float e2 │ │ │ │ + 0x00973a10 29200a20 207b200a 20202020 76656332 ) . { . vec2 │ │ │ │ + 0x00973a20 20746578 636f6f72 64203d20 6b417265 texcoord = kAre │ │ │ │ + 0x00973a30 61546578 4d617844 69737461 6e636520 aTexMaxDistance │ │ │ │ + 0x00973a40 2a20534d 4141526f 756e6428 342e3020 * SMAARound(4.0 │ │ │ │ + 0x00973a50 2a207665 63322865 312c2065 32292920 * vec2(e1, e2)) │ │ │ │ + 0x00973a60 2b206469 73743b20 0a202020 20746578 + dist; . tex │ │ │ │ + 0x00973a70 636f6f72 64203d20 534d4141 5f415245 coord = SMAA_ARE │ │ │ │ + 0x00973a80 41544558 5f504958 454c5f53 495a4520 ATEX_PIXEL_SIZE │ │ │ │ + 0x00973a90 2a202874 6578636f 6f726420 2b20302e * (texcoord + 0. │ │ │ │ + 0x00973aa0 35293b20 0a202020 20726574 75726e20 5); . return │ │ │ │ + 0x00973ab0 534d4141 53616d70 6c654c65 76656c5a SMAASampleLevelZ │ │ │ │ + 0x00973ac0 65726f28 755f736d 61614172 65612c20 ero(u_smaaArea, │ │ │ │ + 0x00973ad0 74657863 6f6f7264 292e7267 3b200a20 texcoord).rg; . │ │ │ │ + 0x00973ae0 207d200a 2020636f 6e737420 666c6f61 } . const floa │ │ │ │ + 0x00973af0 74206b53 68617065 436f6f72 64536361 t kShapeCoordSca │ │ │ │ + 0x00973b00 6c617220 3d203130 30302e30 3b200a20 lar = 1000.0; . │ │ │ │ + 0x00973b10 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ + 0x00973b20 7b200a20 20202076 65633420 77656967 { . vec4 weig │ │ │ │ + 0x00973b30 68747320 3d207665 63342830 2e302c20 hts = vec4(0.0, │ │ │ │ + 0x00973b40 302e302c 20302e30 2c20302e 30293b20 0.0, 0.0, 0.0); │ │ │ │ + 0x00973b50 0a202020 20766563 32206520 3d207465 . vec2 e = te │ │ │ │ + 0x00973b60 78747572 6528755f 636f6c6f 72546578 xture(u_colorTex │ │ │ │ + 0x00973b70 2c20765f 636f6f72 64732e78 79292e72 , v_coords.xy).r │ │ │ │ + 0x00973b80 673b200a 20202020 69662028 652e6720 g; . if (e.g │ │ │ │ + 0x00973b90 3e20302e 3029202f 2f204564 67652061 > 0.0) // Edge a │ │ │ │ + 0x00973ba0 74206e6f 72746820 0a202020 207b200a t north . { . │ │ │ │ + 0x00973bb0 20202020 20207665 63322064 3b200a20 vec2 d; . │ │ │ │ + 0x00973bc0 20202020 20766563 3320636f 6f726473 vec3 coords │ │ │ │ + 0x00973bd0 3b200a20 20202020 20636f6f 7264732e ; . coords. │ │ │ │ + 0x00973be0 78203d20 534d4141 53656172 6368584c x = SMAASearchXL │ │ │ │ + 0x00973bf0 65667428 765f6f66 66736574 302e7879 eft(v_offset0.xy │ │ │ │ + 0x00973c00 2c20765f 6f666673 6574322e 78293b20 , v_offset2.x); │ │ │ │ + 0x00973c10 0a202020 20202063 6f6f7264 732e7920 . coords.y │ │ │ │ + 0x00973c20 3d20765f 6f666673 6574312e 793b200a = v_offset1.y; . │ │ │ │ + 0x00973c30 20202020 2020642e 78203d20 636f6f72 d.x = coor │ │ │ │ + 0x00973c40 64732e78 3b200a20 20202020 20666c6f ds.x; . flo │ │ │ │ + 0x00973c50 61742065 31203d20 534d4141 53616d70 at e1 = SMAASamp │ │ │ │ + 0x00973c60 6c654c65 76656c5a 65726f28 755f636f leLevelZero(u_co │ │ │ │ + 0x00973c70 6c6f7254 65782c20 636f6f72 64732e78 lorTex, coords.x │ │ │ │ + 0x00973c80 79292e72 3b200a20 20202020 20636f6f y).r; . coo │ │ │ │ + 0x00973c90 7264732e 7a203d20 534d4141 53656172 rds.z = SMAASear │ │ │ │ + 0x00973ca0 63685852 69676874 28765f6f 66667365 chXRight(v_offse │ │ │ │ + 0x00973cb0 74302e7a 772c2076 5f6f6666 73657432 t0.zw, v_offset2 │ │ │ │ + 0x00973cc0 2e79293b 200a2020 20202020 642e7920 .y); . d.y │ │ │ │ + 0x00973cd0 3d20636f 6f726473 2e7a3b20 0a202020 = coords.z; . │ │ │ │ + 0x00973ce0 20202076 65633220 7a7a203d 20755f66 vec2 zz = u_f │ │ │ │ + 0x00973cf0 72616d65 62756666 65724d65 74726963 ramebufferMetric │ │ │ │ + 0x00973d00 732e7a7a 3b200a20 20202020 2064203d s.zz; . d = │ │ │ │ + 0x00973d10 20616273 28534d41 41526f75 6e64287a abs(SMAARound(z │ │ │ │ + 0x00973d20 7a202a20 64202d20 765f636f 6f726473 z * d - v_coords │ │ │ │ + 0x00973d30 2e7a7a29 293b200a 20202020 20207665 .zz)); . ve │ │ │ │ + 0x00973d40 63322073 7172745f 64203d20 73717274 c2 sqrt_d = sqrt │ │ │ │ + 0x00973d50 2864293b 200a2020 20202020 666c6f61 (d); . floa │ │ │ │ + 0x00973d60 74206532 203d2053 4d414153 616d706c t e2 = SMAASampl │ │ │ │ + 0x00973d70 654c6576 656c5a65 726f4f66 66736574 eLevelZeroOffset │ │ │ │ + 0x00973d80 28755f63 6f6c6f72 5465782c 20636f6f (u_colorTex, coo │ │ │ │ + 0x00973d90 7264732e 7a792c20 534d4141 4f666673 rds.zy, SMAAOffs │ │ │ │ + 0x00973da0 65742831 2c203029 292e723b 200a2020 et(1, 0)).r; . │ │ │ │ + 0x00973db0 20202020 77656967 6874732e 7267203d weights.rg = │ │ │ │ + 0x00973dc0 20534d41 41417265 61287371 72745f64 SMAAArea(sqrt_d │ │ │ │ + 0x00973dd0 2c206531 2c206532 293b200a 20202020 , e1, e2); . │ │ │ │ + 0x00973de0 7d200a20 20202069 66202865 2e72203e } . if (e.r > │ │ │ │ + 0x00973df0 20302e30 29202f2f 20456467 65206174 0.0) // Edge at │ │ │ │ + 0x00973e00 20776573 74200a20 2020207b 200a2020 west . { . │ │ │ │ + 0x00973e10 20202020 76656332 20643b20 0a202020 vec2 d; . │ │ │ │ + 0x00973e20 20202076 65633320 636f6f72 64733b20 vec3 coords; │ │ │ │ + 0x00973e30 0a202020 20202063 6f6f7264 732e7920 . coords.y │ │ │ │ + 0x00973e40 3d20534d 41415365 61726368 59557028 = SMAASearchYUp( │ │ │ │ + 0x00973e50 765f6f66 66736574 312e7879 2c20765f v_offset1.xy, v_ │ │ │ │ + 0x00973e60 6f666673 6574322e 7a293b20 0a202020 offset2.z); . │ │ │ │ + 0x00973e70 20202063 6f6f7264 732e7820 3d20765f coords.x = v_ │ │ │ │ + 0x00973e80 6f666673 6574302e 783b200a 20202020 offset0.x; . │ │ │ │ + 0x00973e90 2020642e 78203d20 636f6f72 64732e79 d.x = coords.y │ │ │ │ + 0x00973ea0 3b200a20 20202020 20666c6f 61742065 ; . float e │ │ │ │ + 0x00973eb0 31203d20 534d4141 53616d70 6c654c65 1 = SMAASampleLe │ │ │ │ + 0x00973ec0 76656c5a 65726f28 755f636f 6c6f7254 velZero(u_colorT │ │ │ │ + 0x00973ed0 65782c20 636f6f72 64732e78 79292e67 ex, coords.xy).g │ │ │ │ + 0x00973ee0 3b200a20 20202020 20636f6f 7264732e ; . coords. │ │ │ │ + 0x00973ef0 7a203d20 534d4141 53656172 63685944 z = SMAASearchYD │ │ │ │ + 0x00973f00 6f776e28 765f6f66 66736574 312e7a77 own(v_offset1.zw │ │ │ │ + 0x00973f10 2c20765f 6f666673 6574322e 77293b20 , v_offset2.w); │ │ │ │ + 0x00973f20 0a202020 20202064 2e79203d 20636f6f . d.y = coo │ │ │ │ + 0x00973f30 7264732e 7a3b200a 20202020 20207665 rds.z; . ve │ │ │ │ + 0x00973f40 63322077 77203d20 755f6672 616d6562 c2 ww = u_frameb │ │ │ │ + 0x00973f50 75666665 724d6574 72696373 2e77773b ufferMetrics.ww; │ │ │ │ + 0x00973f60 200a2020 20202020 64203d20 61627328 . d = abs( │ │ │ │ + 0x00973f70 534d4141 526f756e 64287777 202a2064 SMAARound(ww * d │ │ │ │ + 0x00973f80 202d2076 5f636f6f 7264732e 77772929 - v_coords.ww)) │ │ │ │ + 0x00973f90 3b200a20 20202020 20766563 32207371 ; . vec2 sq │ │ │ │ + 0x00973fa0 72745f64 203d2073 71727428 64293b20 rt_d = sqrt(d); │ │ │ │ + 0x00973fb0 0a202020 20202066 6c6f6174 20653220 . float e2 │ │ │ │ + 0x00973fc0 3d20534d 41415361 6d706c65 4c657665 = SMAASampleLeve │ │ │ │ + 0x00973fd0 6c5a6572 6f4f6666 73657428 755f636f lZeroOffset(u_co │ │ │ │ + 0x00973fe0 6c6f7254 65782c20 636f6f72 64732e78 lorTex, coords.x │ │ │ │ + 0x00973ff0 7a2c2053 4d41414f 66667365 7428302c z, SMAAOffset(0, │ │ │ │ + 0x00974000 20312929 2e673b20 0a202020 20202077 1)).g; . w │ │ │ │ + 0x00974010 65696768 74732e62 61203d20 534d4141 eights.ba = SMAA │ │ │ │ + 0x00974020 41726561 28737172 745f642c 2065312c Area(sqrt_d, e1, │ │ │ │ + 0x00974030 20653229 3b200a20 2020207d 200a2020 e2); . } . │ │ │ │ + 0x00974040 2020765f 46726167 436f6c6f 72203d20 v_FragColor = │ │ │ │ + 0x00974050 77656967 6874733b 200a2020 7d200a00 weights; . } .. │ │ │ │ + 0x00974060 20202023 69666465 6620474c 5f455320 #ifdef GL_ES │ │ │ │ + 0x00974070 0a202020 20236966 64656620 474c5f46 . #ifdef GL_F │ │ │ │ + 0x00974080 5241474d 454e545f 50524543 4953494f RAGMENT_PRECISIO │ │ │ │ + 0x00974090 4e5f4849 4748200a 20202020 20202364 N_HIGH . #d │ │ │ │ + 0x009740a0 6566696e 65204d41 58505245 43206869 efine MAXPREC hi │ │ │ │ + 0x009740b0 67687020 0a202020 2023656c 7365200a ghp . #else . │ │ │ │ + 0x009740c0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x009740d0 58505245 43206d65 6469756d 70200a20 XPREC mediump . │ │ │ │ + 0x009740e0 20202023 656e6469 66200a20 20202070 #endif . p │ │ │ │ + 0x009740f0 72656369 73696f6e 204d4158 50524543 recision MAXPREC │ │ │ │ + 0x00974100 20666c6f 61743b20 0a202020 20236465 float; . #de │ │ │ │ + 0x00974110 66696e65 204c4f57 5f50206c 6f777020 fine LOW_P lowp │ │ │ │ + 0x00974120 0a202020 20236465 66696e65 204d4544 . #define MED │ │ │ │ + 0x00974130 49554d5f 50206d65 6469756d 70200a20 IUM_P mediump . │ │ │ │ + 0x00974140 20202023 64656669 6e652048 4947485f #define HIGH_ │ │ │ │ + 0x00974150 50206869 67687020 0a202023 656c7365 P highp . #else │ │ │ │ + 0x00974160 200a2020 20202364 6566696e 65204c4f . #define LO │ │ │ │ + 0x00974170 575f5020 0a202020 20236465 66696e65 W_P . #define │ │ │ │ + 0x00974180 204d4544 49554d5f 50200a20 20202023 MEDIUM_P . # │ │ │ │ + 0x00974190 64656669 6e652048 4947485f 50200a20 define HIGH_P . │ │ │ │ + 0x009741a0 2023656e 64696620 0a202069 6e207665 #endif . in ve │ │ │ │ + 0x009741b0 63332061 5f706f73 6974696f 6e3b200a c3 a_position; . │ │ │ │ + 0x009741c0 2020696e 20766563 3420615f 6e6f726d in vec4 a_norm │ │ │ │ + 0x009741d0 616c3b20 0a202069 6e207665 63342061 al; . in vec4 a │ │ │ │ + 0x009741e0 5f636f6c 6f723b20 0a20206f 75742076 _color; . out v │ │ │ │ + 0x009741f0 65633420 765f636f 6c6f723b 200a2020 ec4 v_color; . │ │ │ │ + 0x00974200 756e6966 6f726d20 6d617434 20755f6d uniform mat4 u_m │ │ │ │ + 0x00974210 6f64656c 56696577 3b200a20 20756e69 odelView; . uni │ │ │ │ + 0x00974220 666f726d 206d6174 3420755f 70726f6a form mat4 u_proj │ │ │ │ + 0x00974230 65637469 6f6e3b20 0a202075 6e69666f ection; . unifo │ │ │ │ + 0x00974240 726d206d 61743420 755f7069 766f7454 rm mat4 u_pivotT │ │ │ │ + 0x00974250 72616e73 666f726d 3b200a20 20756e69 ransform; . uni │ │ │ │ + 0x00974260 666f726d 20766563 3420755f 70617261 form vec4 u_para │ │ │ │ + 0x00974270 6d733b20 0a202075 6e69666f 726d2066 ms; . uniform f │ │ │ │ + 0x00974280 6c6f6174 20755f6c 696e6548 616c6657 loat u_lineHalfW │ │ │ │ + 0x00974290 69647468 3b200a20 20756e69 666f726d idth; . uniform │ │ │ │ + 0x009742a0 20666c6f 61742075 5f6d6178 52616469 float u_maxRadi │ │ │ │ + 0x009742b0 75733b20 0a202063 6f6e7374 20666c6f us; . const flo │ │ │ │ + 0x009742c0 6174206b 53686170 65436f6f 72645363 at kShapeCoordSc │ │ │ │ + 0x009742d0 616c6172 203d2031 3030302e 303b200a alar = 1000.0; . │ │ │ │ + 0x009742e0 20207665 63342061 70706c79 5069766f vec4 applyPivo │ │ │ │ + 0x009742f0 74547261 6e73666f 726d2876 65633420 tTransform(vec4 │ │ │ │ + 0x00974300 7069766f 742c206d 61743420 7069766f pivot, mat4 pivo │ │ │ │ + 0x00974310 74547261 6e73666f 726d2c20 666c6f61 tTransform, floa │ │ │ │ + 0x00974320 74207069 766f7452 65616c5a 29200a20 t pivotRealZ) . │ │ │ │ + 0x00974330 207b200a 20202020 76656334 20747261 { . vec4 tra │ │ │ │ + 0x00974340 6e73666f 726d6564 5069766f 74203d20 nsformedPivot = │ │ │ │ + 0x00974350 7069766f 743b200a 20202020 666c6f61 pivot; . floa │ │ │ │ + 0x00974360 74207720 3d207472 616e7366 6f726d65 t w = transforme │ │ │ │ + 0x00974370 64506976 6f742e77 3b200a20 20202074 dPivot.w; . t │ │ │ │ + 0x00974380 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00974390 78797720 3d202870 69766f74 5472616e xyw = (pivotTran │ │ │ │ + 0x009743a0 73666f72 6d202a20 76656334 28747261 sform * vec4(tra │ │ │ │ + 0x009743b0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x009743c0 2c207069 766f7452 65616c5a 2c207729 , pivotRealZ, w) │ │ │ │ + 0x009743d0 292e7879 773b200a 20202020 7472616e ).xyw; . tran │ │ │ │ + 0x009743e0 73666f72 6d656450 69766f74 2e7a202a sformedPivot.z * │ │ │ │ + 0x009743f0 3d207472 616e7366 6f726d65 64506976 = transformedPiv │ │ │ │ + 0x00974400 6f742e77 202f2077 3b200a20 20236966 ot.w / w; . #if │ │ │ │ + 0x00974410 64656620 56554c4b 414e200a 20202020 def VULKAN . │ │ │ │ + 0x00974420 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00974430 2e79203d 202d7472 616e7366 6f726d65 .y = -transforme │ │ │ │ + 0x00974440 64506976 6f742e79 3b200a20 20202074 dPivot.y; . t │ │ │ │ + 0x00974450 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00974460 7a203d20 28747261 6e73666f 726d6564 z = (transformed │ │ │ │ + 0x00974470 5069766f 742e7a20 202b2074 72616e73 Pivot.z + trans │ │ │ │ + 0x00974480 666f726d 65645069 766f742e 7729202f formedPivot.w) / │ │ │ │ + 0x00974490 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x009744a0 0a202020 20726574 75726e20 7472616e . return tran │ │ │ │ + 0x009744b0 73666f72 6d656450 69766f74 3b200a20 sformedPivot; . │ │ │ │ + 0x009744c0 207d200a 20207665 63342061 70706c79 } . vec4 apply │ │ │ │ + 0x009744d0 42696c6c 626f6172 64506976 6f745472 BillboardPivotTr │ │ │ │ + 0x009744e0 616e7366 6f726d28 76656334 20706976 ansform(vec4 piv │ │ │ │ + 0x009744f0 6f742c20 6d617434 20706976 6f745472 ot, mat4 pivotTr │ │ │ │ + 0x00974500 616e7366 6f726d2c 20666c6f 61742070 ansform, float p │ │ │ │ + 0x00974510 69766f74 5265616c 5a2c2076 65633220 ivotRealZ, vec2 │ │ │ │ + 0x00974520 6f666673 65742920 0a20207b 200a2020 offset) . { . │ │ │ │ + 0x00974530 2020666c 6f617420 6c6f6769 635a203d float logicZ = │ │ │ │ + 0x00974540 20706976 6f742e7a 202f2070 69766f74 pivot.z / pivot │ │ │ │ + 0x00974550 2e773b20 0a202020 20766563 34207472 .w; . vec4 tr │ │ │ │ + 0x00974560 616e7366 6f726d65 64506976 6f74203d ansformedPivot = │ │ │ │ + 0x00974570 20706976 6f745472 616e7366 6f726d20 pivotTransform │ │ │ │ + 0x00974580 2a207665 63342870 69766f74 2e78792c * vec4(pivot.xy, │ │ │ │ + 0x00974590 20706976 6f745265 616c5a2c 20706976 pivotRealZ, piv │ │ │ │ + 0x009745a0 6f742e77 293b200a 20202020 76656334 ot.w); . vec4 │ │ │ │ + 0x009745b0 20736361 6c65203d 20706976 6f745472 scale = pivotTr │ │ │ │ + 0x009745c0 616e7366 6f726d20 2a207665 63342831 ansform * vec4(1 │ │ │ │ + 0x009745d0 2e302c20 2d312e30 2c20302e 302c2031 .0, -1.0, 0.0, 1 │ │ │ │ + 0x009745e0 2e30293b 200a2020 20207665 63342070 .0); . vec4 p │ │ │ │ + 0x009745f0 6f736974 696f6e20 3d207665 63342874 osition = vec4(t │ │ │ │ + 0x00974600 72616e73 666f726d 65645069 766f742e ransformedPivot. │ │ │ │ + 0x00974610 7879202f 20747261 6e73666f 726d6564 xy / transformed │ │ │ │ + 0x00974620 5069766f 742e772c 206c6f67 69635a2c Pivot.w, logicZ, │ │ │ │ + 0x00974630 20312e30 29202b20 76656334 286f6666 1.0) + vec4(off │ │ │ │ + 0x00974640 73657420 2f207363 616c652e 77202a20 set / scale.w * │ │ │ │ + 0x00974650 7363616c 652e782c 20302e30 2c20302e scale.x, 0.0, 0. │ │ │ │ + 0x00974660 30293b20 0a202023 69666465 66205655 0); . #ifdef VU │ │ │ │ + 0x00974670 4c4b414e 200a2020 2020706f 73697469 LKAN . positi │ │ │ │ + 0x00974680 6f6e2e79 203d202d 706f7369 74696f6e on.y = -position │ │ │ │ + 0x00974690 2e793b20 0a202020 20706f73 6974696f .y; . positio │ │ │ │ + 0x009746a0 6e2e7a20 3d202870 6f736974 696f6e2e n.z = (position. │ │ │ │ + 0x009746b0 7a20202b 20706f73 6974696f 6e2e7729 z + position.w) │ │ │ │ + 0x009746c0 202f2032 2e303b20 0a202023 656e6469 / 2.0; . #endi │ │ │ │ + 0x009746d0 66200a20 20202072 65747572 6e20706f f . return po │ │ │ │ + 0x009746e0 73697469 6f6e3b20 0a20207d 200a2020 sition; . } . │ │ │ │ + 0x009746f0 76656332 2063616c 634c696e 65547261 vec2 calcLineTra │ │ │ │ + 0x00974700 6e73666f 726d6564 41786973 506f7328 nsformedAxisPos( │ │ │ │ + 0x00974710 76656332 206f7269 67696e61 6c417869 vec2 originalAxi │ │ │ │ + 0x00974720 73506f73 2c207665 63322073 68696674 sPos, vec2 shift │ │ │ │ + 0x00974730 6564506f 732c206d 61743420 6d6f6465 edPos, mat4 mode │ │ │ │ + 0x00974740 6c566965 772c2066 6c6f6174 2068616c lView, float hal │ │ │ │ + 0x00974750 66576964 74682920 0a20207b 200a2020 fWidth) . { . │ │ │ │ + 0x00974760 20207665 63322070 203d2028 76656334 vec2 p = (vec4 │ │ │ │ + 0x00974770 28736869 66746564 506f732c 20302e30 (shiftedPos, 0.0 │ │ │ │ + 0x00974780 2c20312e 3029202a 206d6f64 656c5669 , 1.0) * modelVi │ │ │ │ + 0x00974790 6577292e 78793b20 0a202020 20766563 ew).xy; . vec │ │ │ │ + 0x009747a0 32206420 3d207020 2d206f72 6967696e 2 d = p - origin │ │ │ │ + 0x009747b0 616c4178 6973506f 733b200a 20202020 alAxisPos; . │ │ │ │ + 0x009747c0 69662028 646f7428 642c2064 2920213d if (dot(d, d) != │ │ │ │ + 0x009747d0 20302e30 29200a20 20202020 20726574 0.0) . ret │ │ │ │ + 0x009747e0 75726e20 6f726967 696e616c 41786973 urn originalAxis │ │ │ │ + 0x009747f0 506f7320 2b206e6f 726d616c 697a6528 Pos + normalize( │ │ │ │ + 0x00974800 6429202a 2068616c 66576964 74683b20 d) * halfWidth; │ │ │ │ + 0x00974810 0a202020 20656c73 65200a20 20202020 . else . │ │ │ │ + 0x00974820 20726574 75726e20 6f726967 696e616c return original │ │ │ │ + 0x00974830 41786973 506f733b 200a2020 7d200a20 AxisPos; . } . │ │ │ │ + 0x00974840 20766f69 64206d61 696e2829 200a2020 void main() . │ │ │ │ + 0x00974850 7b200a20 20202076 65633220 6e6f726d { . vec2 norm │ │ │ │ + 0x00974860 616c203d 20615f6e 6f726d61 6c2e7879 al = a_normal.xy │ │ │ │ + 0x00974870 3b200a20 20202076 65633220 7472616e ; . vec2 tran │ │ │ │ + 0x00974880 73666f72 6d656441 78697350 6f73203d sformedAxisPos = │ │ │ │ + 0x00974890 20287665 63342861 5f706f73 6974696f (vec4(a_positio │ │ │ │ + 0x009748a0 6e2e7879 2c20302e 302c2031 2e302920 n.xy, 0.0, 1.0) │ │ │ │ + 0x009748b0 2a20755f 6d6f6465 6c566965 77292e78 * u_modelView).x │ │ │ │ + 0x009748c0 793b200a 20202020 69662028 646f7428 y; . if (dot( │ │ │ │ + 0x009748d0 6e6f726d 616c2c20 6e6f726d 616c2920 normal, normal) │ │ │ │ + 0x009748e0 213d2030 2e302920 0a202020 207b200a != 0.0) . { . │ │ │ │ + 0x009748f0 20202020 20207665 6332206e 6f726d20 vec2 norm │ │ │ │ + 0x00974900 3d206e6f 726d616c 202a2075 5f6c696e = normal * u_lin │ │ │ │ + 0x00974910 6548616c 66576964 74683b20 0a202020 eHalfWidth; . │ │ │ │ + 0x00974920 20202074 72616e73 666f726d 65644178 transformedAx │ │ │ │ + 0x00974930 6973506f 73203d20 63616c63 4c696e65 isPos = calcLine │ │ │ │ + 0x00974940 5472616e 73666f72 6d656441 78697350 TransformedAxisP │ │ │ │ + 0x00974950 6f732874 72616e73 666f726d 65644178 os(transformedAx │ │ │ │ + 0x00974960 6973506f 732c2061 5f706f73 6974696f isPos, a_positio │ │ │ │ + 0x00974970 6e2e7879 202b206e 6f726d2c 200a2020 n.xy + norm, . │ │ │ │ + 0x00974980 20202020 20202020 20202020 20202020 │ │ │ │ + 0x00974990 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009749a0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009749b0 20202020 755f6d6f 64656c56 6965772c u_modelView, │ │ │ │ + 0x009749c0 206c656e 67746828 6e6f726d 29293b20 length(norm)); │ │ │ │ + 0x009749d0 0a202020 207d200a 20202020 765f636f . } . v_co │ │ │ │ + 0x009749e0 6c6f7220 3d20615f 636f6c6f 723b200a lor = a_color; . │ │ │ │ + 0x009749f0 20202020 76656334 20706f73 203d2076 vec4 pos = v │ │ │ │ + 0x00974a00 65633428 7472616e 73666f72 6d656441 ec4(transformedA │ │ │ │ + 0x00974a10 78697350 6f732c20 615f706f 73697469 xisPos, a_positi │ │ │ │ + 0x00974a20 6f6e2e7a 2c20312e 3029202a 20755f70 on.z, 1.0) * u_p │ │ │ │ + 0x00974a30 726f6a65 6374696f 6e3b200a 20202020 rojection; . │ │ │ │ + 0x00974a40 676c5f50 6f736974 696f6e20 3d206170 gl_Position = ap │ │ │ │ + 0x00974a50 706c7950 69766f74 5472616e 73666f72 plyPivotTransfor │ │ │ │ + 0x00974a60 6d28706f 732c2075 5f706976 6f745472 m(pos, u_pivotTr │ │ │ │ + 0x00974a70 616e7366 6f726d2c 20302e30 293b200a ansform, 0.0); . │ │ │ │ + 0x00974a80 20207d20 0a000000 20202023 69666465 } .... #ifde │ │ │ │ + 0x00974a90 6620474c 5f455320 0a202020 20236966 f GL_ES . #if │ │ │ │ + 0x00974aa0 64656620 474c5f46 5241474d 454e545f def GL_FRAGMENT_ │ │ │ │ + 0x00974ab0 50524543 4953494f 4e5f4849 4748200a PRECISION_HIGH . │ │ │ │ + 0x00974ac0 20202020 20202364 6566696e 65204d41 #define MA │ │ │ │ + 0x00974ad0 58505245 43206869 67687020 0a202020 XPREC highp . │ │ │ │ + 0x00974ae0 2023656c 7365200a 20202020 20202364 #else . #d │ │ │ │ + 0x00974af0 6566696e 65204d41 58505245 43206d65 efine MAXPREC me │ │ │ │ + 0x00974b00 6469756d 70200a20 20202023 656e6469 diump . #endi │ │ │ │ + 0x00974b10 66200a20 20202070 72656369 73696f6e f . precision │ │ │ │ + 0x00974b20 204d4158 50524543 20666c6f 61743b20 MAXPREC float; │ │ │ │ + 0x00974b30 0a202020 20236465 66696e65 204c4f57 . #define LOW │ │ │ │ + 0x00974b40 5f50206c 6f777020 0a202020 20236465 _P lowp . #de │ │ │ │ + 0x00974b50 66696e65 204d4544 49554d5f 50206d65 fine MEDIUM_P me │ │ │ │ + 0x00974b60 6469756d 70200a20 20202023 64656669 diump . #defi │ │ │ │ + 0x00974b70 6e652048 4947485f 50206869 67687020 ne HIGH_P highp │ │ │ │ + 0x00974b80 0a202023 656c7365 200a2020 20202364 . #else . #d │ │ │ │ + 0x00974b90 6566696e 65204c4f 575f5020 0a202020 efine LOW_P . │ │ │ │ + 0x00974ba0 20236465 66696e65 204d4544 49554d5f #define MEDIUM_ │ │ │ │ + 0x00974bb0 50200a20 20202023 64656669 6e652048 P . #define H │ │ │ │ + 0x00974bc0 4947485f 50200a20 2023656e 64696620 IGH_P . #endif │ │ │ │ + 0x00974bd0 0a202069 6e207665 63342061 5f706f73 . in vec4 a_pos │ │ │ │ + 0x00974be0 6974696f 6e3b200a 2020696e 20766563 ition; . in vec │ │ │ │ + 0x00974bf0 3220615f 6e6f726d 616c3b20 0a202069 2 a_normal; . i │ │ │ │ + 0x00974c00 6e207665 63322061 5f636f6c 6f725465 n vec2 a_colorTe │ │ │ │ + 0x00974c10 78436f6f 7264733b 200a2020 6f757420 xCoords; . out │ │ │ │ + 0x00974c20 76656332 20765f63 6f6c6f72 54657843 vec2 v_colorTexC │ │ │ │ + 0x00974c30 6f6f7264 733b200a 2020756e 69666f72 oords; . unifor │ │ │ │ + 0x00974c40 6d206d61 74342075 5f6d6f64 656c5669 m mat4 u_modelVi │ │ │ │ + 0x00974c50 65773b20 0a202075 6e69666f 726d206d ew; . uniform m │ │ │ │ + 0x00974c60 61743420 755f7072 6f6a6563 74696f6e at4 u_projection │ │ │ │ + 0x00974c70 3b200a20 20756e69 666f726d 206d6174 ; . uniform mat │ │ │ │ + 0x00974c80 3420755f 7069766f 74547261 6e73666f 4 u_pivotTransfo │ │ │ │ + 0x00974c90 726d3b20 0a202075 6e69666f 726d2076 rm; . uniform v │ │ │ │ + 0x00974ca0 65633420 755f726f 75746550 6172616d ec4 u_routeParam │ │ │ │ + 0x00974cb0 733b200a 2020756e 69666f72 6d207665 s; . uniform ve │ │ │ │ + 0x00974cc0 63342075 5f636f6c 6f723b20 0a202075 c4 u_color; . u │ │ │ │ + 0x00974cd0 6e69666f 726d2076 65633420 755f6d61 niform vec4 u_ma │ │ │ │ + 0x00974ce0 736b436f 6c6f723b 200a2020 756e6966 skColor; . unif │ │ │ │ + 0x00974cf0 6f726d20 76656334 20755f6f 75746c69 orm vec4 u_outli │ │ │ │ + 0x00974d00 6e65436f 6c6f723b 200a2020 756e6966 neColor; . unif │ │ │ │ + 0x00974d10 6f726d20 76656334 20755f66 616b6543 orm vec4 u_fakeC │ │ │ │ + 0x00974d20 6f6c6f72 3b200a20 20756e69 666f726d olor; . uniform │ │ │ │ + 0x00974d30 20766563 3420755f 66616b65 4f75746c vec4 u_fakeOutl │ │ │ │ + 0x00974d40 696e6543 6f6c6f72 3b200a20 20756e69 ineColor; . uni │ │ │ │ + 0x00974d50 666f726d 20766563 3220755f 66616b65 form vec2 u_fake │ │ │ │ + 0x00974d60 426f7264 6572733b 200a2020 756e6966 Borders; . unif │ │ │ │ + 0x00974d70 6f726d20 76656332 20755f70 61747465 orm vec2 u_patte │ │ │ │ + 0x00974d80 726e3b20 0a202075 6e69666f 726d2076 rn; . uniform v │ │ │ │ + 0x00974d90 65633220 755f616e 676c6543 6f735369 ec2 u_angleCosSi │ │ │ │ + 0x00974da0 6e3b200a 2020756e 69666f72 6d20666c n; . uniform fl │ │ │ │ + 0x00974db0 6f617420 755f6172 726f7748 616c6657 oat u_arrowHalfW │ │ │ │ + 0x00974dc0 69647468 3b200a20 20756e69 666f726d idth; . uniform │ │ │ │ + 0x00974dd0 20666c6f 61742075 5f6f7061 63697479 float u_opacity │ │ │ │ + 0x00974de0 3b200a20 20636f6e 73742066 6c6f6174 ; . const float │ │ │ │ + 0x00974df0 206b5368 61706543 6f6f7264 5363616c kShapeCoordScal │ │ │ │ + 0x00974e00 6172203d 20313030 302e303b 200a2020 ar = 1000.0; . │ │ │ │ + 0x00974e10 76656334 20617070 6c795069 766f7454 vec4 applyPivotT │ │ │ │ + 0x00974e20 72616e73 666f726d 28766563 34207069 ransform(vec4 pi │ │ │ │ + 0x00974e30 766f742c 206d6174 34207069 766f7454 vot, mat4 pivotT │ │ │ │ + 0x00974e40 72616e73 666f726d 2c20666c 6f617420 ransform, float │ │ │ │ + 0x00974e50 7069766f 74526561 6c5a2920 0a20207b pivotRealZ) . { │ │ │ │ + 0x00974e60 200a2020 20207665 63342074 72616e73 . vec4 trans │ │ │ │ + 0x00974e70 666f726d 65645069 766f7420 3d207069 formedPivot = pi │ │ │ │ + 0x00974e80 766f743b 200a2020 2020666c 6f617420 vot; . float │ │ │ │ + 0x00974e90 77203d20 7472616e 73666f72 6d656450 w = transformedP │ │ │ │ + 0x00974ea0 69766f74 2e773b20 0a202020 20747261 ivot.w; . tra │ │ │ │ + 0x00974eb0 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00974ec0 77203d20 28706976 6f745472 616e7366 w = (pivotTransf │ │ │ │ + 0x00974ed0 6f726d20 2a207665 63342874 72616e73 orm * vec4(trans │ │ │ │ + 0x00974ee0 666f726d 65645069 766f742e 78792c20 formedPivot.xy, │ │ │ │ + 0x00974ef0 7069766f 74526561 6c5a2c20 7729292e pivotRealZ, w)). │ │ │ │ + 0x00974f00 7879773b 200a2020 20207472 616e7366 xyw; . transf │ │ │ │ + 0x00974f10 6f726d65 64506976 6f742e7a 202a3d20 ormedPivot.z *= │ │ │ │ + 0x00974f20 7472616e 73666f72 6d656450 69766f74 transformedPivot │ │ │ │ + 0x00974f30 2e77202f 20773b20 0a202023 69666465 .w / w; . #ifde │ │ │ │ + 0x00974f40 66205655 4c4b414e 200a2020 20207472 f VULKAN . tr │ │ │ │ + 0x00974f50 616e7366 6f726d65 64506976 6f742e79 ansformedPivot.y │ │ │ │ + 0x00974f60 203d202d 7472616e 73666f72 6d656450 = -transformedP │ │ │ │ + 0x00974f70 69766f74 2e793b20 0a202020 20747261 ivot.y; . tra │ │ │ │ + 0x00974f80 6e73666f 726d6564 5069766f 742e7a20 nsformedPivot.z │ │ │ │ + 0x00974f90 3d202874 72616e73 666f726d 65645069 = (transformedPi │ │ │ │ + 0x00974fa0 766f742e 7a20202b 20747261 6e73666f vot.z + transfo │ │ │ │ + 0x00974fb0 726d6564 5069766f 742e7729 202f2032 rmedPivot.w) / 2 │ │ │ │ + 0x00974fc0 2e303b20 0a202023 656e6469 66200a20 .0; . #endif . │ │ │ │ + 0x00974fd0 20202072 65747572 6e207472 616e7366 return transf │ │ │ │ + 0x00974fe0 6f726d65 64506976 6f743b20 0a20207d ormedPivot; . } │ │ │ │ + 0x00974ff0 200a2020 76656334 20617070 6c794269 . vec4 applyBi │ │ │ │ + 0x00975000 6c6c626f 61726450 69766f74 5472616e llboardPivotTran │ │ │ │ + 0x00975010 73666f72 6d287665 63342070 69766f74 sform(vec4 pivot │ │ │ │ + 0x00975020 2c206d61 74342070 69766f74 5472616e , mat4 pivotTran │ │ │ │ + 0x00975030 73666f72 6d2c2066 6c6f6174 20706976 sform, float piv │ │ │ │ + 0x00975040 6f745265 616c5a2c 20766563 32206f66 otRealZ, vec2 of │ │ │ │ + 0x00975050 66736574 29200a20 207b200a 20202020 fset) . { . │ │ │ │ + 0x00975060 666c6f61 74206c6f 6769635a 203d2070 float logicZ = p │ │ │ │ + 0x00975070 69766f74 2e7a202f 20706976 6f742e77 ivot.z / pivot.w │ │ │ │ + 0x00975080 3b200a20 20202076 65633420 7472616e ; . vec4 tran │ │ │ │ + 0x00975090 73666f72 6d656450 69766f74 203d2070 sformedPivot = p │ │ │ │ + 0x009750a0 69766f74 5472616e 73666f72 6d202a20 ivotTransform * │ │ │ │ + 0x009750b0 76656334 28706976 6f742e78 792c2070 vec4(pivot.xy, p │ │ │ │ + 0x009750c0 69766f74 5265616c 5a2c2070 69766f74 ivotRealZ, pivot │ │ │ │ + 0x009750d0 2e77293b 200a2020 20207665 63342073 .w); . vec4 s │ │ │ │ + 0x009750e0 63616c65 203d2070 69766f74 5472616e cale = pivotTran │ │ │ │ + 0x009750f0 73666f72 6d202a20 76656334 28312e30 sform * vec4(1.0 │ │ │ │ + 0x00975100 2c202d31 2e302c20 302e302c 20312e30 , -1.0, 0.0, 1.0 │ │ │ │ + 0x00975110 293b200a 20202020 76656334 20706f73 ); . vec4 pos │ │ │ │ + 0x00975120 6974696f 6e203d20 76656334 28747261 ition = vec4(tra │ │ │ │ + 0x00975130 6e73666f 726d6564 5069766f 742e7879 nsformedPivot.xy │ │ │ │ + 0x00975140 202f2074 72616e73 666f726d 65645069 / transformedPi │ │ │ │ + 0x00975150 766f742e 772c206c 6f676963 5a2c2031 vot.w, logicZ, 1 │ │ │ │ + 0x00975160 2e302920 2b207665 6334286f 66667365 .0) + vec4(offse │ │ │ │ + 0x00975170 74202f20 7363616c 652e7720 2a207363 t / scale.w * sc │ │ │ │ + 0x00975180 616c652e 782c2030 2e302c20 302e3029 ale.x, 0.0, 0.0) │ │ │ │ + 0x00975190 3b200a20 20236966 64656620 56554c4b ; . #ifdef VULK │ │ │ │ + 0x009751a0 414e200a 20202020 706f7369 74696f6e AN . position │ │ │ │ + 0x009751b0 2e79203d 202d706f 73697469 6f6e2e79 .y = -position.y │ │ │ │ + 0x009751c0 3b200a20 20202070 6f736974 696f6e2e ; . position. │ │ │ │ + 0x009751d0 7a203d20 28706f73 6974696f 6e2e7a20 z = (position.z │ │ │ │ + 0x009751e0 202b2070 6f736974 696f6e2e 7729202f + position.w) / │ │ │ │ + 0x009751f0 20322e30 3b200a20 2023656e 64696620 2.0; . #endif │ │ │ │ + 0x00975200 0a202020 20726574 75726e20 706f7369 . return posi │ │ │ │ + 0x00975210 74696f6e 3b200a20 207d200a 20207665 tion; . } . ve │ │ │ │ + 0x00975220 63322063 616c634c 696e6554 72616e73 c2 calcLineTrans │ │ │ │ + 0x00975230 666f726d 65644178 6973506f 73287665 formedAxisPos(ve │ │ │ │ + 0x00975240 6332206f 72696769 6e616c41 78697350 c2 originalAxisP │ │ │ │ + 0x00975250 6f732c20 76656332 20736869 66746564 os, vec2 shifted │ │ │ │ + 0x00975260 506f732c 206d6174 34206d6f 64656c56 Pos, mat4 modelV │ │ │ │ + 0x00975270 6965772c 20666c6f 61742068 616c6657 iew, float halfW │ │ │ │ + 0x00975280 69647468 29200a20 207b200a 20202020 idth) . { . │ │ │ │ + 0x00975290 76656332 2070203d 20287665 63342873 vec2 p = (vec4(s │ │ │ │ + 0x009752a0 68696674 6564506f 732c2030 2e302c20 hiftedPos, 0.0, │ │ │ │ + 0x009752b0 312e3029 202a206d 6f64656c 56696577 1.0) * modelView │ │ │ │ + 0x009752c0 292e7879 3b200a20 20202076 65633220 ).xy; . vec2 │ │ │ │ + 0x009752d0 64203d20 70202d20 6f726967 696e616c d = p - original │ │ │ │ + 0x009752e0 41786973 506f733b 200a2020 20206966 AxisPos; . if │ │ │ │ + 0x009752f0 2028646f 7428642c 20642920 213d2030 (dot(d, d) != 0 │ │ │ │ + 0x00975300 2e302920 0a202020 20202072 65747572 .0) . retur │ │ │ │ + 0x00975310 6e206f72 6967696e 616c4178 6973506f n originalAxisPo │ │ │ │ + 0x00975320 73202b20 6e6f726d 616c697a 65286429 s + normalize(d) │ │ │ │ + 0x00975330 202a2068 616c6657 69647468 3b200a20 * halfWidth; . │ │ │ │ + 0x00975340 20202065 6c736520 0a202020 20202072 else . r │ │ │ │ + 0x00975350 65747572 6e206f72 6967696e 616c4178 eturn originalAx │ │ │ │ + 0x00975360 6973506f 733b200a 20207d20 0a202076 isPos; . } . v │ │ │ │ + 0x00975370 6f696420 6d61696e 2829200a 20207b20 oid main() . { │ │ │ │ + 0x00975380 0a202020 20766563 32207472 616e7366 . vec2 transf │ │ │ │ + 0x00975390 6f726d65 64417869 73506f73 203d2028 ormedAxisPos = ( │ │ │ │ + 0x009753a0 76656334 28615f70 6f736974 696f6e2e vec4(a_position. │ │ │ │ + 0x009753b0 78792c20 302e302c 20312e30 29202a20 xy, 0.0, 1.0) * │ │ │ │ + 0x009753c0 755f6d6f 64656c56 69657729 2e78793b u_modelView).xy; │ │ │ │ + 0x009753d0 200a2020 20206966 2028646f 7428615f . if (dot(a_ │ │ │ │ + 0x009753e0 6e6f726d 616c2c20 615f6e6f 726d616c normal, a_normal │ │ │ │ + 0x009753f0 2920213d 20302e30 29200a20 2020207b ) != 0.0) . { │ │ │ │ + 0x00975400 200a2020 20202020 76656332 206e6f72 . vec2 nor │ │ │ │ + 0x00975410 6d203d20 615f6e6f 726d616c 202a2075 m = a_normal * u │ │ │ │ + 0x00975420 5f617272 6f774861 6c665769 6474683b _arrowHalfWidth; │ │ │ │ + 0x00975430 200a2020 20202020 7472616e 73666f72 . transfor │ │ │ │ + 0x00975440 6d656441 78697350 6f73203d 2063616c medAxisPos = cal │ │ │ │ + 0x00975450 634c696e 65547261 6e73666f 726d6564 cLineTransformed │ │ │ │ + 0x00975460 41786973 506f7328 7472616e 73666f72 AxisPos(transfor │ │ │ │ + 0x00975470 6d656441 78697350 6f732c20 615f706f medAxisPos, a_po │ │ │ │ + 0x00975480 73697469 6f6e2e78 79202b20 6e6f726d sition.xy + norm │ │ │ │ + 0x00975490 2c200a20 20202020 20202020 20202020 , . │ │ │ │ + 0x009754a0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009754b0 20202020 20202020 20202020 20202020 │ │ │ │ + 0x009754c0 20202020 20202020 20755f6d 6f64656c u_model │ │ │ │ + 0x009754d0 56696577 2c206c65 6e677468 286e6f72 View, length(nor │ │ │ │ + 0x009754e0 6d29293b 200a2020 20207d20 0a202020 m)); . } . │ │ │ │ + 0x009754f0 20765f63 6f6c6f72 54657843 6f6f7264 v_colorTexCoord │ │ │ │ + 0x00975500 73203d20 615f636f 6c6f7254 6578436f s = a_colorTexCo │ │ │ │ + 0x00975510 6f726473 3b200a20 20202076 65633420 ords; . vec4 │ │ │ │ + 0x00975520 706f7320 3d207665 63342874 72616e73 pos = vec4(trans │ │ │ │ + 0x00975530 666f726d 65644178 6973506f 732c2061 formedAxisPos, a │ │ │ │ + 0x00975540 5f706f73 6974696f 6e2e7a2c 20312e30 _position.z, 1.0 │ │ │ │ + 0x00975550 29202a20 755f7072 6f6a6563 74696f6e ) * u_projection │ │ │ │ + 0x00975560 3b200a20 20202067 6c5f506f 73697469 ; . gl_Positi │ │ │ │ + 0x00975570 6f6e203d 20617070 6c795069 766f7454 on = applyPivotT │ │ │ │ + 0x00975580 72616e73 666f726d 28706f73 2c20755f ransform(pos, u_ │ │ │ │ + 0x00975590 7069766f 74547261 6e73666f 726d2c20 pivotTransform, │ │ │ │ + 0x009755a0 302e3029 3b200a20 207d200a 00000000 0.0); . } ..... │ │ │ │ 0x009755b0 ae79d8ff bc79d8ff ca79d8ff d879d8ff .y...y...y...y.. │ │ │ │ 0x009755c0 e679d8ff f479d8ff 027ad8ff 107ad8ff .y...y...z...z.. │ │ │ │ 0x009755d0 1e7ad8ff 2c7ad8ff 3a7ad8ff 487ad8ff .z..,z..:z..Hz.. │ │ │ │ 0x009755e0 647ad8ff 727ad8ff 567ad8ff 807ad8ff dz..rz..Vz...z.. │ │ │ │ 0x009755f0 a079d8ff 9279d8ff e878d8ff 2079d8ff .y...y...x.. y.. │ │ │ │ 0x00975600 1279d8ff f678d8ff 0479d8ff 487cd8ff .y...x...y..H|.. │ │ │ │ 0x00975610 447cd8ff 2e7cd8ff 4e7cd8ff 5c7cd8ff D|...|..N|..\|.. │ │ │ ├── readelf --wide --decompress --hex-dump=.gnu_debuglink {} │ │ │ │ @@ -1,7 +1,7 @@ │ │ │ │ │ │ │ │ Hex dump of section '.gnu_debuglink': │ │ │ │ - 0x00000000 37346261 38303836 61393838 64303036 74ba8086a988d006 │ │ │ │ - 0x00000010 61393836 31613835 65386332 33343236 a9861a85e8c23426 │ │ │ │ - 0x00000020 36613830 33652e64 65627567 00000000 6a803e.debug.... │ │ │ │ - 0x00000030 f274a556 .t.V │ │ │ │ + 0x00000000 35356262 34363536 61626437 66396166 55bb4656abd7f9af │ │ │ │ + 0x00000010 36616537 63343666 36626164 31306364 6ae7c46f6bad10cd │ │ │ │ + 0x00000020 65363132 38632e64 65627567 00000000 e6128c.debug.... │ │ │ │ + 0x00000030 12fc0ee7 ....