	.file	"330470.c"
	.intel_syntax noprefix
	.text
	.globl	datatoc_object_grid_frag_glsl_size
	.data
	.align 4
	.type	datatoc_object_grid_frag_glsl_size, @object
	.size	datatoc_object_grid_frag_glsl_size, 4
datatoc_object_grid_frag_glsl_size:
	.long	6423
	.globl	datatoc_object_grid_frag_glsl
	.align 32
	.type	datatoc_object_grid_frag_glsl, @object
	.size	datatoc_object_grid_frag_glsl, 6424
datatoc_object_grid_frag_glsl:
	.ascii	"\r\n/* Infinite grid\r\n * Author: Cl\303\251ment Foucault *"
	.ascii	"/\r\n\r\n/* We use the normalized local position to avoid pr"
	.ascii	"ecision\r\n * loss during interpolation. */\r\nin vec3 local"
	.ascii	"_pos;\r\n\r\nout vec4 FragColor;\r\n\r\nuniform mat4 Project"
	.ascii	"ionMatrix;\r\nuniform vec3 cameraPos;\r\nuniform vec3 planeA"
	.ascii	"xes;\r\nuniform vec3 eye;\r\nuniform vec4 gridSettings;\r\nu"
	.ascii	"niform float meshSize;\r\nuniform float lineKernel = 0.0;\r\n"
	.ascii	"uniform float gridOneOverLogSubdiv;\r\nuniform sampler2D dep"
	.ascii	"thBuffer;\r\n\r\n#define gridDistance      gridSettings.x\r\n"
	.ascii	"#define gridResolution    gridSettings.y\r\n#define gridScal"
	.ascii	"e         gridSettings.z\r\n#define gridSubdiv        gridSe"
	.ascii	"ttings.w\r\n\r\nuniform int gridFlag;\r\n\r\n#define AXIS_X "
	.ascii	"   (1 << 0)\r\n#define AXIS_Y    (1 << 1)\r\n#define AXIS_Z "
	.ascii	"   (1 << 2)\r\n#define GRID      (1 << 3)\r\n#define PLANE_X"
	.ascii	"Y  (1 << 4)\r\n#define PLANE_XZ  (1 << 5)\r\n#define PLANE_Y"
	.ascii	"Z  (1 << 6)\r\n#define GRID_BACK (1 << 9) /* grid is behind "
	.ascii	"objects */\r\n\r\n#define M_1_SQRTPI   0.5641895835477563   "
	.ascii	" /* 1/sqrt(pi) */\r\n\r\n/**\r\n * We want to know how much "
	.ascii	"a pixel is covered by a line.\r\n * We replace the square pi"
	.ascii	"xel with acircle of the same area and try to find the inters"
	.ascii	"ection area.\r\n * The area we search is the circular segmen"
	.ascii	"t. https://en.wikipedia.org/wiki/Circular_segment\r\n * The "
	.ascii	"formula for the area uses inverse trig function and is quite"
	.ascii	" complexe.\r\n * Instead, we approximate it by using the smo"
	.ascii	"othstep function and a 1.05 factor to the disc radius.\r\n *"
	.ascii	"*/\r\n#define DISC_RADIUS (M_1_SQRTPI * 1.05)\r\n#define GRI"
	.ascii	"D_LINE_SMOOTH_START (0.5 - DISC_RADIUS)\r\n#define GRID_LINE"
	.ascii	"_SMOOTH_END (0.5 + DISC_RADIUS)\r\n\r\nfloat get_grid(vec2 c"
	.ascii	"o, vec2 fwidthCos, float grid_size)\r\n{\r\n\tfloat half_siz"
	.ascii	"e = grid_size / 2.0;\r\n\t/* triangular wave pattern, amplit"
	.ascii	"ude is [0, half_size] */\r\n\tvec2 grid_domain = abs(mod(co "
	.ascii	"+ half_size, grid_size) - half_size);\r\n\t/* modulate by th"
	.ascii	"e absolute rate of change of the coordinates\r\n\t * (make l"
	.ascii	"ines have the same width under perspective) */\r\n\tgrid_dom"
	.ascii	"ain /= fwidthCos;\r\n\r\n\t/* collapse waves */\r\n\tfloat l"
	.ascii	"ine_dist = min(grid_domain.x, "
	.ascii	"grid_domain.y);\r\n\r\n\treturn 1.0 - smoothstep(GRID_LINE_S"
	.ascii	"MOOTH_START, GRID_LINE_SMOOTH_END, line_dist - lineKernel);\r"
	.ascii	"\n}\r\n\r\nvec3 get_axes(vec3 co, vec3 fwidthCos, float line"
	.ascii	"_size)\r\n{\r\n\tvec3 axes_domain = abs(co);\r\n\t/* modulat"
	.ascii	"e by the absolute rate of change of the coordinates\r\n\t * "
	.ascii	"(make line have the same width under perspective) */\r\n\tax"
	.ascii	"es_domain /= fwidthCos;\r\n\r\n\treturn 1.0 - smoothstep(GRI"
	.ascii	"D_LINE_SMOOTH_START, GRID_LINE_SMOOTH_END, axes_domain - (li"
	.ascii	"ne_size + lineKernel));\r\n}\r\n\r\nvoid main()\r\n{\r\n\tve"
	.ascii	"c3 wPos = local_pos * meshSize;\r\n\tvec3 fwidthPos = fwidth"
	.ascii	"(wPos);\r\n\twPos += cameraPos * planeAxes;\r\n\r\n\tfloat d"
	.ascii	"ist, fade;\r\n\t/* if persp */\r\n\tif (ProjectionMatrix[3]["
	.ascii	"3] == 0.0) {\r\n\t\tvec3 viewvec = cameraPos - wPos;\r\n\t\t"
	.ascii	"dist = length(viewvec);\r\n\t\tviewvec /= dist;\r\n\r\n\t\tf"
	.ascii	"loat angle;\r\n\t\tif ((gridFlag & PLANE_XZ) != 0) {\r\n\t\t"
	.ascii	"\tangle = viewvec.y;\r\n\t\t}\r\n\t\telse if ((gridFlag & PL"
	.ascii	"ANE_YZ) != 0) {\r\n\t\t\tangle = viewvec.x;\r\n\t\t}\r\n\t\t"
	.ascii	"else {\r\n\t\t\tangle = viewvec.z;\r\n\t\t}\r\n\r\n\t\tangle"
	.ascii	" = 1.0 - abs(angle);\r\n\t\tangle *= angle;\r\n\t\tfade = 1."
	.ascii	"0 - angle * angle;\r\n\t\tfade *= 1.0 - smoothstep(0.0, grid"
	.ascii	"Distance, dist - gridDistance);\r\n\t}\r\n\telse {\r\n\t\tdi"
	.ascii	"st = abs(gl_FragCoord.z * 2.0 - 1.0);\r\n\t\tfade = 1.0 - sm"
	.ascii	"oothstep(0.0, 0.5, dist - 0.5);\r\n\t\tdist = 1.0; /* avoid "
	.ascii	"branch after */\r\n\r\n\t\tif ((gridFlag & PLANE_XY) != 0) {"
	.ascii	"\r\n\t\t\tfloat angle = 1.0 - abs(eye.z);\r\n\t\t\tdist = 1."
	.ascii	"0 + angle * 2.0;\r\n\t\t\tangle *= angle;\r\n\t\t\tfade *= 1"
	.ascii	".0 - angle * angle;\r\n\t\t}\r\n\t}\r\n\r\n\tif ((gridFlag &"
	.ascii	" GRID) != 0) {\r\n\t\tfloat grid_res = log(dist * gridResolu"
	.ascii	"tion) * gridOneOverLogSubdiv;\r\n\r\n\t\tfloat blend = fract"
	.ascii	"(-max(grid_res, 0.0));\r\n\t\tfloat lvl = floor(grid_res);\r"
	.ascii	"\n\r\n\t\t/* from biggest to smallest */\r\n\t\tfloat scaleA"
	.ascii	" = gridScale * pow(gridSubdiv, max(lvl - 1.0, 0.0));\r\n\t\t"
	.ascii	"float scaleB = gridScale * pow(gridSubdiv, max(lvl + 0.0, 0."
	.ascii	"0));\r\n\t\tfloat scaleC = gridScale * pow(gridSubdiv, max(l"
	.ascii	"vl + 1.0, 1.0));\r\n\r\n\t\tvec2 grid_pos, grid_fwidth;\r\n\t"
	.ascii	"\tif ((gridFlag & PLANE_XZ) != 0) {\r\n\t\t\tgrid_pos = wPos"
	.ascii	".xz;\r\n\t\t\tgrid_fwidth = fwidthPos.xz;\r\n\t\t}\r\n\t\tel"
	.ascii	"se if ((gridFlag & PLANE_YZ"
	.ascii	") != 0) {\r\n\t\t\tgrid_pos = wPos.yz;\r\n\t\t\tgrid_fwidth "
	.ascii	"= fwidthPos.yz;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgrid_pos = w"
	.ascii	"Pos.xy;\r\n\t\t\tgrid_fwidth = fwidthPos.xy;\r\n\t\t}\r\n\r\n"
	.ascii	"\t\tfloat gridA = get_grid(grid_pos, grid_fwidth, scaleA);\r"
	.ascii	"\n\t\tfloat gridB = get_grid(grid_pos, grid_fwidth, scaleB);"
	.ascii	"\r\n\t\tfloat gridC = get_grid(grid_pos, grid_fwidth, scaleC"
	.ascii	");\r\n\r\n\t\tFragColor = colorGrid;\r\n\t\tFragColor.a *= g"
	.ascii	"ridA * blend;\r\n\t\tFragColor = mix(FragColor, mix(colorGri"
	.ascii	"d, colorGridEmphasise, blend), gridB);\r\n\t\tFragColor = mi"
	.ascii	"x(FragColor, colorGridEmphasise, gridC);\r\n\t}\r\n\telse {\r"
	.ascii	"\n\t\tFragColor = vec4(colorGrid.rgb, 0.0);\r\n\t}\r\n\r\n\t"
	.ascii	"if ((gridFlag & (AXIS_X | AXIS_Y | AXIS_Z)) != 0) {\r\n\t\t/"
	.ascii	"* Setup axes 'domains' */\r\n\t\tvec3 axes_dist, axes_fwidth"
	.ascii	";\r\n\r\n\t\tif ((gridFlag & AXIS_X) != 0) {\r\n\t\t\taxes_d"
	.ascii	"ist.x = dot(wPos.yz, planeAxes.yz);\r\n\t\t\taxes_fwidth.x ="
	.ascii	" dot(fwidthPos.yz, planeAxes.yz);\r\n\t\t}\r\n\t\tif ((gridF"
	.ascii	"lag & AXIS_Y) != 0) {\r\n\t\t\taxes_dist.y = dot(wPos.xz, pl"
	.ascii	"aneAxes.xz);\r\n\t\t\taxes_fwidth.y = dot(fwidthPos.xz, plan"
	.ascii	"eAxes.xz);\r\n\t\t}\r\n\t\tif ((gridFlag & AXIS_Z) != 0) {\r"
	.ascii	"\n\t\t\taxes_dist.z = dot(wPos.xy, planeAxes.xy);\r\n\t\t\ta"
	.ascii	"xes_fwidth.z = dot(fwidthPos.xy, planeAxes.xy);\r\n\t\t}\r\n"
	.ascii	"\r\n\t\t/* Computing all axes at once using vec3 */\r\n\t\tv"
	.ascii	"ec3 axes = get_axes(axes_dist, axes_fwidth, 0.1);\r\n\r\n\t\t"
	.ascii	"if ((gridFlag & AXIS_X) != 0) {\r\n\t\t\tFragColor.a = max(F"
	.ascii	"ragColor.a, axes.x);\r\n\t\t\tFragColor.rgb = (axes.x < 1e-8"
	.ascii	") ? FragColor.rgb : colorGridAxisX.rgb;\r\n\t\t}\r\n\t\tif ("
	.ascii	"(gridFlag & AXIS_Y) != 0) {\r\n\t\t\tFragColor.a = max(FragC"
	.ascii	"olor.a, axes.y);\r\n\t\t\tFragColor.rgb = (axes.y < 1e-8) ? "
	.ascii	"FragColor.rgb : colorGridAxisY.rgb;\r\n\t\t}\r\n\t\tif ((gri"
	.ascii	"dFlag & AXIS_Z) != 0) {\r\n\t\t\tFragColor.a = max(FragColor"
	.ascii	".a, axes.z);\r\n\t\t\tFragColor.rgb = (axes.z < 1e-8) ? Frag"
	.ascii	"Color.rgb : colorGridAxisZ.rgb;\r\n\t\t}\r\n\t}\r\n\r\n\t/* "
	.ascii	"Add a small bias so the grid will always\r\n\t * be on top o"
	.ascii	"f a mesh with the same depth. */\r\n\tfloat grid_depth = gl_"
	.ascii	"FragCoord.z - 6e-8 - fwidth(gl_FragCoord.z);\r\n\tfloat scen"
	.ascii	"e_depth = texelFetch(depthBuffer, ivec2(gl_FragCoord.xy), 0)"
	.ascii	".r;\r\n\tif ((gridFlag & GRID_BACK) != 0) {\r\n\t\tfade *= ("
	.ascii	"scene_depth ="
	.ascii	"= 1.0) ? 1.0 : 0.0;\r\n\t}\r\n\telse {\r\n\t\t/* Manual, non"
	.ascii	" hard, depth test:\r\n\t\t * Progressively fade the grid bel"
	.ascii	"ow occluders\r\n\t\t * (avoids popping visuals due to depth "
	.ascii	"buffe"
	.string	"r precision) */\r\n\t\t/* Harder settings tend to flicker more,\r\n\t\t * but have less \"see through\" appearance. */\r\n\t\tconst float test_hardness = 1e7;\r\n\t\tfade *= 1.0 - clamp((grid_depth - scene_depth) * test_hardness, 0.0, 1.0);\r\n\t}\r\n\r\n\tFragColor.a *= fade;\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	"330470.c"
	.text
	.global	datatoc_object_grid_frag_glsl_size
	.data
	.align	2
	.type	datatoc_object_grid_frag_glsl_size, %object
	.size	datatoc_object_grid_frag_glsl_size, 4
datatoc_object_grid_frag_glsl_size:
	.word	6423
	.global	datatoc_object_grid_frag_glsl
	.align	2
	.type	datatoc_object_grid_frag_glsl, %object
	.size	datatoc_object_grid_frag_glsl, 6424
datatoc_object_grid_frag_glsl:
	.ascii	"\015\012/* Infinite grid\015\012 * Author: Cl\303\251"
	.ascii	"ment Foucault */\015\012\015\012/* We use the norma"
	.ascii	"lized local position to avoid precision\015\012 * l"
	.ascii	"oss during interpolation. */\015\012in vec3 local_p"
	.ascii	"os;\015\012\015\012out vec4 FragColor;\015\012\015\012"
	.ascii	"uniform mat4 ProjectionMatrix;\015\012uniform vec3 "
	.ascii	"cameraPos;\015\012uniform vec3 planeAxes;\015\012un"
	.ascii	"iform vec3 eye;\015\012uniform vec4 gridSettings;\015"
	.ascii	"\012uniform float meshSize;\015\012uniform float li"
	.ascii	"neKernel = 0.0;\015\012uniform float gridOneOverLog"
	.ascii	"Subdiv;\015\012uniform sampler2D depthBuffer;\015\012"
	.ascii	"\015\012#define gridDistance      gridSettings.x\015"
	.ascii	"\012#define gridResolution    gridSettings.y\015\012"
	.ascii	"#define gridScale         gridSettings.z\015\012#de"
	.ascii	"fine gridSubdiv        gridSettings.w\015\012\015\012"
	.ascii	"uniform int gridFlag;\015\012\015\012#define AXIS_X"
	.ascii	"    (1 << 0)\015\012#define AXIS_Y    (1 << 1)\015\012"
	.ascii	"#define AXIS_Z    (1 << 2)\015\012#define GRID     "
	.ascii	" (1 << 3)\015\012#define PLANE_XY  (1 << 4)\015\012"
	.ascii	"#define PLANE_XZ  (1 << 5)\015\012#define PLANE_YZ "
	.ascii	" (1 << 6)\015\012#define GRID_BACK (1 << 9) /* grid"
	.ascii	" is behind objects */\015\012\015\012#define M_1_SQ"
	.ascii	"RTPI   0.5641895835477563    /* 1/sqrt(pi) */\015\012"
	.ascii	"\015\012/**\015\012 * We want to know how much a pi"
	.ascii	"xel is covered by a line.\015\012 * We replace the "
	.ascii	"square pixel with acircle of the same area and try "
	.ascii	"to find the intersection area.\015\012 * The area w"
	.ascii	"e search is the circular segment. https://en.wikipe"
	.ascii	"dia.org/wiki/Circular_segment\015\012 * The formula"
	.ascii	" for the area uses inverse trig function and is qui"
	.ascii	"te complexe.\015\012 * Instead, we approximate it b"
	.ascii	"y using the smoothstep function and a 1.05 factor t"
	.ascii	"o the disc radius.\015\012 **/\015\012#define DISC_"
	.ascii	"RADIUS (M_1_SQRTPI * 1.05)\015\012#define GRID_LINE"
	.ascii	"_SMOOTH_START (0.5 - DISC_RADIUS)\015\012#define GR"
	.ascii	"ID_LINE_SMOOTH_END (0.5 + DISC_RADIUS)\015\012\015\012"
	.ascii	"float get_grid(vec2 co, vec2 fwidthCos, float grid_"
	.ascii	"size)\015\012{\015\012\011float half_size = grid_si"
	.ascii	"ze / 2.0;\015\012\011/* triangular wave pattern, am"
	.ascii	"plitude is [0, half_size] */\015\012\011vec2 grid_d"
	.ascii	"omain = abs(mod(co + half_size, grid_size) - half_s"
	.ascii	"ize);\015\012\011/* modulate by the absolute rate o"
	.ascii	"f change of the coordinates\015\012\011 * (make lin"
	.ascii	"es have the same width under perspective) */\015\012"
	.ascii	"\011grid_domain /= fwidthCos;\015\012\015\012\011/*"
	.ascii	" collapse waves */\015\012\011float line_dist = min"
	.ascii	"(grid_domain.x, "
	.ascii	"grid_domain.y);\015\012\015\012\011return 1.0 - smo"
	.ascii	"othstep(GRID_LINE_SMOOTH_START, GRID_LINE_SMOOTH_EN"
	.ascii	"D, line_dist - lineKernel);\015\012}\015\012\015\012"
	.ascii	"vec3 get_axes(vec3 co, vec3 fwidthCos, float line_s"
	.ascii	"ize)\015\012{\015\012\011vec3 axes_domain = abs(co)"
	.ascii	";\015\012\011/* modulate by the absolute rate of ch"
	.ascii	"ange of the coordinates\015\012\011 * (make line ha"
	.ascii	"ve the same width under perspective) */\015\012\011"
	.ascii	"axes_domain /= fwidthCos;\015\012\015\012\011return"
	.ascii	" 1.0 - smoothstep(GRID_LINE_SMOOTH_START, GRID_LINE"
	.ascii	"_SMOOTH_END, axes_domain - (line_size + lineKernel)"
	.ascii	");\015\012}\015\012\015\012void main()\015\012{\015"
	.ascii	"\012\011vec3 wPos = local_pos * meshSize;\015\012\011"
	.ascii	"vec3 fwidthPos = fwidth(wPos);\015\012\011wPos += c"
	.ascii	"ameraPos * planeAxes;\015\012\015\012\011float dist"
	.ascii	", fade;\015\012\011/* if persp */\015\012\011if (Pr"
	.ascii	"ojectionMatrix[3][3] == 0.0) {\015\012\011\011vec3 "
	.ascii	"viewvec = cameraPos - wPos;\015\012\011\011dist = l"
	.ascii	"ength(viewvec);\015\012\011\011viewvec /= dist;\015"
	.ascii	"\012\015\012\011\011float angle;\015\012\011\011if "
	.ascii	"((gridFlag & PLANE_XZ) != 0) {\015\012\011\011\011a"
	.ascii	"ngle = viewvec.y;\015\012\011\011}\015\012\011\011e"
	.ascii	"lse if ((gridFlag & PLANE_YZ) != 0) {\015\012\011\011"
	.ascii	"\011angle = viewvec.x;\015\012\011\011}\015\012\011"
	.ascii	"\011else {\015\012\011\011\011angle = viewvec.z;\015"
	.ascii	"\012\011\011}\015\012\015\012\011\011angle = 1.0 - "
	.ascii	"abs(angle);\015\012\011\011angle *= angle;\015\012\011"
	.ascii	"\011fade = 1.0 - angle * angle;\015\012\011\011fade"
	.ascii	" *= 1.0 - smoothstep(0.0, gridDistance, dist - grid"
	.ascii	"Distance);\015\012\011}\015\012\011else {\015\012\011"
	.ascii	"\011dist = abs(gl_FragCoord.z * 2.0 - 1.0);\015\012"
	.ascii	"\011\011fade = 1.0 - smoothstep(0.0, 0.5, dist - 0."
	.ascii	"5);\015\012\011\011dist = 1.0; /* avoid branch afte"
	.ascii	"r */\015\012\015\012\011\011if ((gridFlag & PLANE_X"
	.ascii	"Y) != 0) {\015\012\011\011\011float angle = 1.0 - a"
	.ascii	"bs(eye.z);\015\012\011\011\011dist = 1.0 + angle * "
	.ascii	"2.0;\015\012\011\011\011angle *= angle;\015\012\011"
	.ascii	"\011\011fade *= 1.0 - angle * angle;\015\012\011\011"
	.ascii	"}\015\012\011}\015\012\015\012\011if ((gridFlag & G"
	.ascii	"RID) != 0) {\015\012\011\011float grid_res = log(di"
	.ascii	"st * gridResolution) * gridOneOverLogSubdiv;\015\012"
	.ascii	"\015\012\011\011float blend = fract(-max(grid_res, "
	.ascii	"0.0));\015\012\011\011float lvl = floor(grid_res);\015"
	.ascii	"\012\015\012\011\011/* from biggest to smallest */\015"
	.ascii	"\012\011\011float scaleA = gridScale * pow(gridSubd"
	.ascii	"iv, max(lvl - 1.0, 0.0));\015\012\011\011float scal"
	.ascii	"eB = gridScale * pow(gridSubdiv, max(lvl + 0.0, 0.0"
	.ascii	"));\015\012\011\011float scaleC = gridScale * pow(g"
	.ascii	"ridSubdiv, max(lvl + 1.0, 1.0));\015\012\015\012\011"
	.ascii	"\011vec2 grid_pos, grid_fwidth;\015\012\011\011if ("
	.ascii	"(gridFlag & PLANE_XZ) != 0) {\015\012\011\011\011gr"
	.ascii	"id_pos = wPos.xz;\015\012\011\011\011grid_fwidth = "
	.ascii	"fwidthPos.xz;\015\012\011\011}\015\012\011\011else "
	.ascii	"if ((gridFlag & PLANE_YZ"
	.ascii	") != 0) {\015\012\011\011\011grid_pos = wPos.yz;\015"
	.ascii	"\012\011\011\011grid_fwidth = fwidthPos.yz;\015\012"
	.ascii	"\011\011}\015\012\011\011else {\015\012\011\011\011"
	.ascii	"grid_pos = wPos.xy;\015\012\011\011\011grid_fwidth "
	.ascii	"= fwidthPos.xy;\015\012\011\011}\015\012\015\012\011"
	.ascii	"\011float gridA = get_grid(grid_pos, grid_fwidth, s"
	.ascii	"caleA);\015\012\011\011float gridB = get_grid(grid_"
	.ascii	"pos, grid_fwidth, scaleB);\015\012\011\011float gri"
	.ascii	"dC = get_grid(grid_pos, grid_fwidth, scaleC);\015\012"
	.ascii	"\015\012\011\011FragColor = colorGrid;\015\012\011\011"
	.ascii	"FragColor.a *= gridA * blend;\015\012\011\011FragCo"
	.ascii	"lor = mix(FragColor, mix(colorGrid, colorGridEmphas"
	.ascii	"ise, blend), gridB);\015\012\011\011FragColor = mix"
	.ascii	"(FragColor, colorGridEmphasise, gridC);\015\012\011"
	.ascii	"}\015\012\011else {\015\012\011\011FragColor = vec4"
	.ascii	"(colorGrid.rgb, 0.0);\015\012\011}\015\012\015\012\011"
	.ascii	"if ((gridFlag & (AXIS_X | AXIS_Y | AXIS_Z)) != 0) {"
	.ascii	"\015\012\011\011/* Setup axes 'domains' */\015\012\011"
	.ascii	"\011vec3 axes_dist, axes_fwidth;\015\012\015\012\011"
	.ascii	"\011if ((gridFlag & AXIS_X) != 0) {\015\012\011\011"
	.ascii	"\011axes_dist.x = dot(wPos.yz, planeAxes.yz);\015\012"
	.ascii	"\011\011\011axes_fwidth.x = dot(fwidthPos.yz, plane"
	.ascii	"Axes.yz);\015\012\011\011}\015\012\011\011if ((grid"
	.ascii	"Flag & AXIS_Y) != 0) {\015\012\011\011\011axes_dist"
	.ascii	".y = dot(wPos.xz, planeAxes.xz);\015\012\011\011\011"
	.ascii	"axes_fwidth.y = dot(fwidthPos.xz, planeAxes.xz);\015"
	.ascii	"\012\011\011}\015\012\011\011if ((gridFlag & AXIS_Z"
	.ascii	") != 0) {\015\012\011\011\011axes_dist.z = dot(wPos"
	.ascii	".xy, planeAxes.xy);\015\012\011\011\011axes_fwidth."
	.ascii	"z = dot(fwidthPos.xy, planeAxes.xy);\015\012\011\011"
	.ascii	"}\015\012\015\012\011\011/* Computing all axes at o"
	.ascii	"nce using vec3 */\015\012\011\011vec3 axes = get_ax"
	.ascii	"es(axes_dist, axes_fwidth, 0.1);\015\012\015\012\011"
	.ascii	"\011if ((gridFlag & AXIS_X) != 0) {\015\012\011\011"
	.ascii	"\011FragColor.a = max(FragColor.a, axes.x);\015\012"
	.ascii	"\011\011\011FragColor.rgb = (axes.x < 1e-8) ? FragC"
	.ascii	"olor.rgb : colorGridAxisX.rgb;\015\012\011\011}\015"
	.ascii	"\012\011\011if ((gridFlag & AXIS_Y) != 0) {\015\012"
	.ascii	"\011\011\011FragColor.a = max(FragColor.a, axes.y);"
	.ascii	"\015\012\011\011\011FragColor.rgb = (axes.y < 1e-8)"
	.ascii	" ? FragColor.rgb : colorGridAxisY.rgb;\015\012\011\011"
	.ascii	"}\015\012\011\011if ((gridFlag & AXIS_Z) != 0) {\015"
	.ascii	"\012\011\011\011FragColor.a = max(FragColor.a, axes"
	.ascii	".z);\015\012\011\011\011FragColor.rgb = (axes.z < 1"
	.ascii	"e-8) ? FragColor.rgb : colorGridAxisZ.rgb;\015\012\011"
	.ascii	"\011}\015\012\011}\015\012\015\012\011/* Add a smal"
	.ascii	"l bias so the grid will always\015\012\011 * be on "
	.ascii	"top of a mesh with the same depth. */\015\012\011fl"
	.ascii	"oat grid_depth = gl_FragCoord.z - 6e-8 - fwidth(gl_"
	.ascii	"FragCoord.z);\015\012\011float scene_depth = texelF"
	.ascii	"etch(depthBuffer, ivec2(gl_FragCoord.xy), 0).r;\015"
	.ascii	"\012\011if ((gridFlag & GRID_BACK) != 0) {\015\012\011"
	.ascii	"\011fade *= (scene_depth ="
	.ascii	"= 1.0) ? 1.0 : 0.0;\015\012\011}\015\012\011else {\015"
	.ascii	"\012\011\011/* Manual, non hard, depth test:\015\012"
	.ascii	"\011\011 * Progressively fade the grid below occlud"
	.ascii	"ers\015\012\011\011 * (avoids popping visuals due t"
	.ascii	"o depth buffer precision) */\015\012\011\011/* Hard"
	.ascii	"er settings tend to flicker more,\015\012\011\011 *"
	.ascii	" but have less \"see through\" appearance. */\015\012"
	.ascii	"\011\011const float test_hardness = 1e7;\015\012\011"
	.ascii	"\011fade *= 1.0 - clamp((grid_depth - scene_depth) "
	.ascii	"* test_hardness, 0.0, 1.0);\015\012\011}\015\012\015"
	.ascii	"\012\011FragColor.a *= fade;\015\012}\015\012\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
