	.file	"556225.c"
	.intel_syntax noprefix
	.text
	.globl	datatoc_armature_sphere_solid_vert_glsl_size
	.data
	.align 4
	.type	datatoc_armature_sphere_solid_vert_glsl_size, @object
	.size	datatoc_armature_sphere_solid_vert_glsl_size, 4
datatoc_armature_sphere_solid_vert_glsl_size:
	.long	2527
	.globl	datatoc_armature_sphere_solid_vert_glsl
	.align 32
	.type	datatoc_armature_sphere_solid_vert_glsl, @object
	.size	datatoc_armature_sphere_solid_vert_glsl, 2528
datatoc_armature_sphere_solid_vert_glsl:
	.ascii	"\r\nuniform mat4 ViewMatrix;\r\nuniform mat4 ProjectionMatri"
	.ascii	"x;\r\n\r\n/* ---- Instantiated Attribs ---- */\r\nin vec2 po"
	.ascii	"s;\r\n\r\n/* ---- Per instance Attribs ---- */\r\nin mat4 In"
	.ascii	"stanceModelMatrix;\r\nin vec3 stateColor;\r\nin vec3 boneCol"
	.ascii	"or;\r\n\r\nflat out vec3 finalStateColor;\r\nflat out vec3 f"
	.ascii	"inalBoneColor;\r\nflat out mat4 sphereMatrix;\r\nout vec3 vi"
	.ascii	"ewPosition;\r\n\r\n/* Sphere radius */\r\nconst float rad = "
	.ascii	"0.05;\r\n\r\nvoid main()\r\n{\r\n\tmat4 model_view_matrix = "
	.ascii	"ViewMatrix * InstanceModelMatrix;\r\n\tsphereMatrix = invers"
	.ascii	"e(model_view_matrix);\r\n\r\n\tbool is_persp = (ProjectionMa"
	.ascii	"trix[3][3] == 0.0);\r\n\r\n\t/* This is the local space came"
	.ascii	"ra ray (not normalize).\r\n\t * In perspective mode it's als"
	.ascii	"o the viewspace position\r\n\t * of the sphere center. */\r\n"
	.ascii	"\tvec3 cam_ray = (is_persp) ? model_view_matrix[3].xyz : vec"
	.ascii	"3(0.0, 0.0, -1.0);\r\n\tcam_ray = mat3(sphereMatrix) * cam_r"
	.ascii	"ay;\r\n\r\n\t/* Sphere center distance from the camera (pers"
	.ascii	"p) in local space. */\r\n\tfloat cam_dist = length(cam_ray);"
	.ascii	"\r\n\r\n\t/* Compute view aligned orthonormal space. */\r\n\t"
	.ascii	"vec3 z_axis = cam_ray / cam_dist;\r\n\tvec3 x_axis = normali"
	.ascii	"ze(cross(sphereMatrix[1].xyz, z_axis));\r\n\tvec3 y_axis = c"
	.ascii	"ross(z_axis, x_axis);\r\n\r\n\tfloat z_ofs = -rad - 1e-8; /*"
	.ascii	" offset to the front of the sphere */\r\n\tif (is_persp) {\r"
	.ascii	"\n\t\t/* For perspective, the projected sphere radius\r\n\t\t"
	.ascii	" * can be bigger than the center disc. Compute the\r\n\t\t *"
	.ascii	" max angular size and compensate by sliding the disc\r\n\t\t"
	.ascii	" * towards the camera and scale it accordingly. */\r\n\t\tco"
	.ascii	"nst float half_pi = 3.1415926 * 0.5;\r\n\t\t/* Let be (in lo"
	.ascii	"cal space):\r\n\t\t * V the view vector origin.\r\n\t\t * O "
	.ascii	"the sphere origin.\r\n\t\t * T the point on the target circl"
	.ascii	"e.\r\n\t\t * We compute the angle between (OV) and (OT). */\r"
	.ascii	"\n\t\tfloat a = half_pi - asin(rad / cam_dist);\r\n\t\tfloat"
	.ascii	" cos_b = cos(a);\r\n\t\tfloat sin_b = sqrt(clamp(1.0 - cos_b"
	.ascii	" * cos_b, 0.0, 1.0));\r\n#if 1\r\n\t\t/* Instead of choosing"
	.ascii	" the biggest circle in screenspace,\r\n\t\t * we choose the "
	.ascii	"nearest with the same angular size. This\r\n\t\t * permit us"
	.ascii	" to leverage GL_ARB_conservative_depth in the\r\n\t\t * frag"
	.ascii	"ment s"
	.ascii	"hader. */\r\n\t\tfloat minor = cam_dist - rad;\r\n\t\tfloat "
	.ascii	"major = cam_dist - cos_b * rad;\r\n\t\tfloat fac = minor / m"
	.ascii	"ajor;\r\n\t\tsin_b *= fac;\r\n#else\r\n\t\tz_ofs = -rad * co"
	.ascii	"s_b;\r\n#endif\r\n\t\tx_axis *= sin_b;\r\n\t\ty_axis *= sin_"
	.ascii	"b;\r\n\t}\r\n\r\n\t/* Camera oriented position (but still in"
	.ascii	" local spac"
	.string	"e) */\r\n\tvec3 cam_pos = x_axis * pos.x + y_axis * pos.y + z_axis * z_ofs;\r\n\r\n\tvec4 V = model_view_matrix * vec4(cam_pos, 1.0);\r\n\tgl_Position = ProjectionMatrix * V;\r\n\tviewPosition = V.xyz;\r\n\r\n\tfinalStateColor = stateColor;\r\n\tfinalBoneColor = boneColor;\r\n}\r\n"
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"556225.c"
	.text
	.global	datatoc_armature_sphere_solid_vert_glsl_size
	.data
	.align	2
	.type	datatoc_armature_sphere_solid_vert_glsl_size, %object
	.size	datatoc_armature_sphere_solid_vert_glsl_size, 4
datatoc_armature_sphere_solid_vert_glsl_size:
	.word	2527
	.global	datatoc_armature_sphere_solid_vert_glsl
	.align	2
	.type	datatoc_armature_sphere_solid_vert_glsl, %object
	.size	datatoc_armature_sphere_solid_vert_glsl, 2528
datatoc_armature_sphere_solid_vert_glsl:
	.ascii	"\015\012uniform mat4 ViewMatrix;\015\012uniform mat"
	.ascii	"4 ProjectionMatrix;\015\012\015\012/* ---- Instanti"
	.ascii	"ated Attribs ---- */\015\012in vec2 pos;\015\012\015"
	.ascii	"\012/* ---- Per instance Attribs ---- */\015\012in "
	.ascii	"mat4 InstanceModelMatrix;\015\012in vec3 stateColor"
	.ascii	";\015\012in vec3 boneColor;\015\012\015\012flat out"
	.ascii	" vec3 finalStateColor;\015\012flat out vec3 finalBo"
	.ascii	"neColor;\015\012flat out mat4 sphereMatrix;\015\012"
	.ascii	"out vec3 viewPosition;\015\012\015\012/* Sphere rad"
	.ascii	"ius */\015\012const float rad = 0.05;\015\012\015\012"
	.ascii	"void main()\015\012{\015\012\011mat4 model_view_mat"
	.ascii	"rix = ViewMatrix * InstanceModelMatrix;\015\012\011"
	.ascii	"sphereMatrix = inverse(model_view_matrix);\015\012\015"
	.ascii	"\012\011bool is_persp = (ProjectionMatrix[3][3] == "
	.ascii	"0.0);\015\012\015\012\011/* This is the local space"
	.ascii	" camera ray (not normalize).\015\012\011 * In persp"
	.ascii	"ective mode it's also the viewspace position\015\012"
	.ascii	"\011 * of the sphere center. */\015\012\011vec3 cam"
	.ascii	"_ray = (is_persp) ? model_view_matrix[3].xyz : vec3"
	.ascii	"(0.0, 0.0, -1.0);\015\012\011cam_ray = mat3(sphereM"
	.ascii	"atrix) * cam_ray;\015\012\015\012\011/* Sphere cent"
	.ascii	"er distance from the camera (persp) in local space."
	.ascii	" */\015\012\011float cam_dist = length(cam_ray);\015"
	.ascii	"\012\015\012\011/* Compute view aligned orthonormal"
	.ascii	" space. */\015\012\011vec3 z_axis = cam_ray / cam_d"
	.ascii	"ist;\015\012\011vec3 x_axis = normalize(cross(spher"
	.ascii	"eMatrix[1].xyz, z_axis));\015\012\011vec3 y_axis = "
	.ascii	"cross(z_axis, x_axis);\015\012\015\012\011float z_o"
	.ascii	"fs = -rad - 1e-8; /* offset to the front of the sph"
	.ascii	"ere */\015\012\011if (is_persp) {\015\012\011\011/*"
	.ascii	" For perspective, the projected sphere radius\015\012"
	.ascii	"\011\011 * can be bigger than the center disc. Comp"
	.ascii	"ute the\015\012\011\011 * max angular size and comp"
	.ascii	"ensate by sliding the disc\015\012\011\011 * toward"
	.ascii	"s the camera and scale it accordingly. */\015\012\011"
	.ascii	"\011const float half_pi = 3.1415926 * 0.5;\015\012\011"
	.ascii	"\011/* Let be (in local space):\015\012\011\011 * V"
	.ascii	" the view vector origin.\015\012\011\011 * O the sp"
	.ascii	"here origin.\015\012\011\011 * T the point on the t"
	.ascii	"arget circle.\015\012\011\011 * We compute the angl"
	.ascii	"e between (OV) and (OT). */\015\012\011\011float a "
	.ascii	"= half_pi - asin(rad / cam_dist);\015\012\011\011fl"
	.ascii	"oat cos_b = cos(a);\015\012\011\011float sin_b = sq"
	.ascii	"rt(clamp(1.0 - cos_b * cos_b, 0.0, 1.0));\015\012#i"
	.ascii	"f 1\015\012\011\011/* Instead of choosing the bigge"
	.ascii	"st circle in screenspace,\015\012\011\011 * we choo"
	.ascii	"se the nearest with the same angular size. This\015"
	.ascii	"\012\011\011 * permit us to leverage GL_ARB_conserv"
	.ascii	"ative_depth in the\015\012\011\011 * fragment s"
	.ascii	"hader. */\015\012\011\011float minor = cam_dist - r"
	.ascii	"ad;\015\012\011\011float major = cam_dist - cos_b *"
	.ascii	" rad;\015\012\011\011float fac = minor / major;\015"
	.ascii	"\012\011\011sin_b *= fac;\015\012#else\015\012\011\011"
	.ascii	"z_ofs = -rad * cos_b;\015\012#endif\015\012\011\011"
	.ascii	"x_axis *= sin_b;\015\012\011\011y_axis *= sin_b;\015"
	.ascii	"\012\011}\015\012\015\012\011/* Camera oriented pos"
	.ascii	"ition (but still in local space) */\015\012\011vec3"
	.ascii	" cam_pos = x_axis * pos.x + y_axis * pos.y + z_axis"
	.ascii	" * z_ofs;\015\012\015\012\011vec4 V = model_view_ma"
	.ascii	"trix * vec4(cam_pos, 1.0);\015\012\011gl_Position ="
	.ascii	" ProjectionMatrix * V;\015\012\011viewPosition = V."
	.ascii	"xyz;\015\012\015\012\011finalStateColor = stateColo"
	.ascii	"r;\015\012\011finalBoneColor = boneColor;\015\012}\015"
	.ascii	"\012\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
