	.file	"149587.c"
	.intel_syntax noprefix
	.text
	.globl	datatoc_volumetric_scatter_frag_glsl_size
	.data
	.align 4
	.type	datatoc_volumetric_scatter_frag_glsl_size, @object
	.size	datatoc_volumetric_scatter_frag_glsl_size, 4
datatoc_volumetric_scatter_frag_glsl_size:
	.long	2902
	.globl	datatoc_volumetric_scatter_frag_glsl
	.align 32
	.type	datatoc_volumetric_scatter_frag_glsl, @object
	.size	datatoc_volumetric_scatter_frag_glsl, 2903
datatoc_volumetric_scatter_frag_glsl:
	.ascii	"\r\n/* Based on Frosbite Unified Volumetric.\r\n * https://w"
	.ascii	"ww.ea.com/frostbite/news/physically-based-unified-volumetric"
	.ascii	"-rendering-in-frostbite */\r\n\r\n/* Step 2 : Evaluate all l"
	.ascii	"ight scattering for each froxels.\r\n * Also do the temporal"
	.ascii	" reprojection to fight aliasing artifacts. */\r\n\r\nuniform"
	.ascii	" sampler3D volumeScattering;\r\nuniform sampler3D volumeExti"
	.ascii	"nction;\r\nuniform sampler3D volumeEmission;\r\nuniform samp"
	.ascii	"ler3D volumePhase;\r\n\r\nuniform sampler3D historyScatterin"
	.ascii	"g;\r\nuniform sampler3D historyTransmittance;\r\n\r\nflat in"
	.ascii	" int slice;\r\n\r\nlayout(location = 0) out vec4 outScatteri"
	.ascii	"ng;\r\nlayout(location = 1) out vec4 outTransmittance;\r\n\r"
	.ascii	"\nvoid main()\r\n{\r\n\tivec3 volume_cell = ivec3(gl_FragCoo"
	.ascii	"rd.xy, slice);\r\n\r\n\t/* Emission */\r\n\toutScattering = "
	.ascii	"texelFetch(volumeEmission, volume_cell, 0);\r\n\toutTransmit"
	.ascii	"tance = texelFetch(volumeExtinction, volume_cell, 0);\r\n\tv"
	.ascii	"ec3 s_scattering = texelFetch(volumeScattering, volume_cell,"
	.ascii	" 0).rgb;\r\n\tvec3 volume_ndc = volume_to_ndc((vec3(volume_c"
	.ascii	"ell) + volJitter.xyz) * volInvTexSize.xyz);\r\n\tvec3 worldP"
	.ascii	"osition = get_world_space_from_depth(volume_ndc.xy, volume_n"
	.ascii	"dc.z);\r\n\tvec3 wdir = cameraVec;\r\n\r\n\tvec2 phase = tex"
	.ascii	"elFetch(volumePhase, volume_cell, 0).rg;\r\n\tfloat s_anisot"
	.ascii	"ropy = phase.x / max(1.0, phase.y);\r\n\r\n\t/* Environment "
	.ascii	": Average color. */\r\n\toutScattering.rgb += irradiance_vol"
	.ascii	"umetric(worldPosition) * s_scattering * phase_function_isotr"
	.ascii	"opic();\r\n\r\n#ifdef VOLUME_LIGHTING /* Lights */\r\n\tfor "
	.ascii	"(int i = 0; i < MAX_LIGHT && i < laNumLight; ++i) {\r\n\r\n\t"
	.ascii	"\tLightData ld = lights_data[i];\r\n\r\n\t\tvec4 l_vector;\r"
	.ascii	"\n\t\tl_vector.xyz = (ld.l_type == SUN) ? -ld.l_forward : ld"
	.ascii	".l_position - worldPosition;\r\n\t\tl_vector.w = length(l_ve"
	.ascii	"ctor.xyz);\r\n\r\n\t\tfloat Vis = light_visibility(ld, world"
	.ascii	"Position, l_vector);\r\n\r\n\t\tvec3 Li = light_volume(ld, l"
	.ascii	"_vector) * light_volume_shadow(ld, worldPosition, l_vector, "
	.ascii	"volumeExtinction);\r\n\r\n\t\toutScattering.rgb += Li * Vis "
	.ascii	"* s_scattering * phase_function(-wdir, l_vector.xyz / l_vect"
	.ascii	"or.w, s_anisotropy);\r\n\t}\r\n#endif\r\n\r\n\t/* Temporal s"
	.ascii	"upersampling */\r\n\t/* Note : this uses "
	.ascii	"the cell non-jittered position (texel center). */\r\n\tvec3 "
	.ascii	"curr_ndc = volume_to_ndc(vec3(gl_FragCoord.xy, float(slice) "
	.ascii	"+ 0.5) * volInvTexSize.xyz);\r\n\tvec3 wpos = get_world_spac"
	.ascii	"e_from_depth(curr_ndc.xy, curr_ndc.z);\r\n\tvec3 prev_ndc = "
	.ascii	"project_point(pastViewProjectionMatrix, wpos);\r\n\tvec3 pre"
	.ascii	"v_volume = ndc_to_volume(prev_ndc * 0.5 + 0.5);\r\n\r\n\tif "
	.ascii	"((volHistoryAlpha > 0.0) && all(greaterThan(prev_volume, vec"
	.ascii	"3(0.0))) && all(lessThan(prev_volume, vec3(1.0)))) {\r\n\t\t"
	.ascii	"vec4 h_Scattering = texture(historyScattering, prev_volume);"
	.ascii	"\r\n\t\tvec4 h_Transmittance = texture(historyTransmittance,"
	.ascii	" prev_volume);\r\n\t\toutScattering = mix(outScattering, h_S"
	.ascii	"cattering, volH"
	.string	"istoryAlpha);\r\n\t\toutTransmittance = mix(outTransmittance, h_Transmittance, volHistoryAlpha);\r\n\t}\r\n\r\n\t/* Catch NaNs */\r\n\tif (any(isnan(outScattering)) || any(isnan(outTransmittance))) {\r\n\t\toutScattering = vec4(0.0);\r\n\t\toutTransmittance = vec4(1.0);\r\n\t}\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	"149587.c"
	.text
	.global	datatoc_volumetric_scatter_frag_glsl_size
	.data
	.align	2
	.type	datatoc_volumetric_scatter_frag_glsl_size, %object
	.size	datatoc_volumetric_scatter_frag_glsl_size, 4
datatoc_volumetric_scatter_frag_glsl_size:
	.word	2902
	.global	datatoc_volumetric_scatter_frag_glsl
	.align	2
	.type	datatoc_volumetric_scatter_frag_glsl, %object
	.size	datatoc_volumetric_scatter_frag_glsl, 2903
datatoc_volumetric_scatter_frag_glsl:
	.ascii	"\015\012/* Based on Frosbite Unified Volumetric.\015"
	.ascii	"\012 * https://www.ea.com/frostbite/news/physically"
	.ascii	"-based-unified-volumetric-rendering-in-frostbite */"
	.ascii	"\015\012\015\012/* Step 2 : Evaluate all light scat"
	.ascii	"tering for each froxels.\015\012 * Also do the temp"
	.ascii	"oral reprojection to fight aliasing artifacts. */\015"
	.ascii	"\012\015\012uniform sampler3D volumeScattering;\015"
	.ascii	"\012uniform sampler3D volumeExtinction;\015\012unif"
	.ascii	"orm sampler3D volumeEmission;\015\012uniform sample"
	.ascii	"r3D volumePhase;\015\012\015\012uniform sampler3D h"
	.ascii	"istoryScattering;\015\012uniform sampler3D historyT"
	.ascii	"ransmittance;\015\012\015\012flat in int slice;\015"
	.ascii	"\012\015\012layout(location = 0) out vec4 outScatte"
	.ascii	"ring;\015\012layout(location = 1) out vec4 outTrans"
	.ascii	"mittance;\015\012\015\012void main()\015\012{\015\012"
	.ascii	"\011ivec3 volume_cell = ivec3(gl_FragCoord.xy, slic"
	.ascii	"e);\015\012\015\012\011/* Emission */\015\012\011ou"
	.ascii	"tScattering = texelFetch(volumeEmission, volume_cel"
	.ascii	"l, 0);\015\012\011outTransmittance = texelFetch(vol"
	.ascii	"umeExtinction, volume_cell, 0);\015\012\011vec3 s_s"
	.ascii	"cattering = texelFetch(volumeScattering, volume_cel"
	.ascii	"l, 0).rgb;\015\012\011vec3 volume_ndc = volume_to_n"
	.ascii	"dc((vec3(volume_cell) + volJitter.xyz) * volInvTexS"
	.ascii	"ize.xyz);\015\012\011vec3 worldPosition = get_world"
	.ascii	"_space_from_depth(volume_ndc.xy, volume_ndc.z);\015"
	.ascii	"\012\011vec3 wdir = cameraVec;\015\012\015\012\011v"
	.ascii	"ec2 phase = texelFetch(volumePhase, volume_cell, 0)"
	.ascii	".rg;\015\012\011float s_anisotropy = phase.x / max("
	.ascii	"1.0, phase.y);\015\012\015\012\011/* Environment : "
	.ascii	"Average color. */\015\012\011outScattering.rgb += i"
	.ascii	"rradiance_volumetric(worldPosition) * s_scattering "
	.ascii	"* phase_function_isotropic();\015\012\015\012#ifdef"
	.ascii	" VOLUME_LIGHTING /* Lights */\015\012\011for (int i"
	.ascii	" = 0; i < MAX_LIGHT && i < laNumLight; ++i) {\015\012"
	.ascii	"\015\012\011\011LightData ld = lights_data[i];\015\012"
	.ascii	"\015\012\011\011vec4 l_vector;\015\012\011\011l_vec"
	.ascii	"tor.xyz = (ld.l_type == SUN) ? -ld.l_forward : ld.l"
	.ascii	"_position - worldPosition;\015\012\011\011l_vector."
	.ascii	"w = length(l_vector.xyz);\015\012\015\012\011\011fl"
	.ascii	"oat Vis = light_visibility(ld, worldPosition, l_vec"
	.ascii	"tor);\015\012\015\012\011\011vec3 Li = light_volume"
	.ascii	"(ld, l_vector) * light_volume_shadow(ld, worldPosit"
	.ascii	"ion, l_vector, volumeExtinction);\015\012\015\012\011"
	.ascii	"\011outScattering.rgb += Li * Vis * s_scattering * "
	.ascii	"phase_function(-wdir, l_vector.xyz / l_vector.w, s_"
	.ascii	"anisotropy);\015\012\011}\015\012#endif\015\012\015"
	.ascii	"\012\011/* Temporal supersampling */\015\012\011/* "
	.ascii	"Note : this uses "
	.ascii	"the cell non-jittered position (texel center). */\015"
	.ascii	"\012\011vec3 curr_ndc = volume_to_ndc(vec3(gl_FragC"
	.ascii	"oord.xy, float(slice) + 0.5) * volInvTexSize.xyz);\015"
	.ascii	"\012\011vec3 wpos = get_world_space_from_depth(curr"
	.ascii	"_ndc.xy, curr_ndc.z);\015\012\011vec3 prev_ndc = pr"
	.ascii	"oject_point(pastViewProjectionMatrix, wpos);\015\012"
	.ascii	"\011vec3 prev_volume = ndc_to_volume(prev_ndc * 0.5"
	.ascii	" + 0.5);\015\012\015\012\011if ((volHistoryAlpha > "
	.ascii	"0.0) && all(greaterThan(prev_volume, vec3(0.0))) &&"
	.ascii	" all(lessThan(prev_volume, vec3(1.0)))) {\015\012\011"
	.ascii	"\011vec4 h_Scattering = texture(historyScattering, "
	.ascii	"prev_volume);\015\012\011\011vec4 h_Transmittance ="
	.ascii	" texture(historyTransmittance, prev_volume);\015\012"
	.ascii	"\011\011outScattering = mix(outScattering, h_Scatte"
	.ascii	"ring, volHistoryAlpha);\015\012\011\011outTransmitt"
	.ascii	"ance = mix(outTransmittance, h_Transmittance, volHi"
	.ascii	"storyAlpha);\015\012\011}\015\012\015\012\011/* Cat"
	.ascii	"ch NaNs */\015\012\011if (any(isnan(outScattering))"
	.ascii	" || any(isnan(outTransmittance))) {\015\012\011\011"
	.ascii	"outScattering = vec4(0.0);\015\012\011\011outTransm"
	.ascii	"ittance = vec4(1.0);\015\012\011}\015\012}\015\012\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
