#line 1 "DumpShaderDefinesAsCommentedCode"
// #define __SHADER_TARGET_MAJOR 6
// #define __SHADER_TARGET_MINOR 6
// #define ALLOW_STATIC_LIGHTING 1
// #define AMPLIFICATIONSHADER 0
// #define CLEAR_COAT_BOTTOM_NORMAL 0
// #define COMPILE_SHADERS_FOR_DEVELOPMENT 1
// #define COMPILER_DEFINE #define
// #define COMPILER_DXC 1
// #define COMPUTESHADER 1
// #define DO_CHECK 1
// #define DO_GUARD_SLOW 0
// #define DXT5_NORMALMAPS 0
// #define EARLY_Z_PASS_ONLY_MATERIAL_MASKING 0
// #define FORWARD_SHADING 0
// #define GBUFFER_HAS_DIFFUSE_SAMPLE_OCCLUSION 0
// #define GBUFFER_HAS_VELOCITY 1
// #define GBUFFER_REFACTOR 1
// #define GEOMETRYSHADER 0
// #define GPU_SIMULATION 1
// #define GPU_SIMULATION_SHADER 1
// #define HAS_INVERTED_Z_BUFFER 1
// #define INSTANCED_STEREO 0
// #define IRIS_NORMAL 0
// #define LEGACY_MATERIAL_ENERGYCONSERVATION 0
// #define MATERIAL_ROUGHDIFFUSE 0
// #define MESHSHADER 0
// #define MOBILE_MULTI_VIEW 0
// #define MULTI_VIEW 0
// #define NIAGARA_COMPRESSED_ATTRIBUTES_ENABLED 0
// #define NIAGARA_DISPATCH_INDIRECT 0
// #define NIAGARA_DISPATCH_TYPE 0
// #define NIAGARA_MAX_GPU_SPAWN_INFOS 8
// #define PIXELSHADER 0
// #define PLATFORM_ALLOW_SCENE_DATA_COMPRESSED_TRANSFORMS 1
// #define PLATFORM_SUPPORTS_BINDLESS 0
// #define PLATFORM_SUPPORTS_CLIP_DISTANCE 1
// #define PLATFORM_SUPPORTS_DISTANCE_FIELDS 1
// #define PLATFORM_SUPPORTS_MESH_SHADERS_TIER0 1
// #define PLATFORM_SUPPORTS_MESH_SHADERS_TIER1 1
// #define PLATFORM_SUPPORTS_PER_PIXEL_DBUFFER_MASK 0
// #define PLATFORM_SUPPORTS_RENDERTARGET_WRITE_MASK 0
// #define PLATFORM_SUPPORTS_UB_STRUCT 1
// #define POST_PROCESS_ALPHA 0
// #define PROJECT_ALLOW_GLOBAL_CLIP_PLANE 0
// #define PROJECT_MOBILE_DISABLE_VERTEX_FOG 1
// #define PROJECT_OIT 0
// #define PROJECT_STRATA_BACKCOMPATIBILITY 0
// #define PROJECT_SUPPORT_SKY_ATMOSPHERE 1
// #define PROJECT_SUPPORT_SKY_ATMOSPHERE_AFFECTS_HEIGHFOG 1
// #define PROJECT_SUPPORTS_LUMEN 1
// #define PROJECT_VERTEX_FOGGING_FOR_OPAQUE 0
// #define RAYCALLABLESHADER 0
// #define RAYGENSHADER 0
// #define RAYHITGROUPSHADER 0
// #define RAYMISSSHADER 0
// #define SELECTIVE_BASEPASS_OUTPUTS 0
// #define SHADING_PATH_DEFERRED 1
// #define SimulationStageIndex 0
// #define SM6_PROFILE 1
// #define STRATA_ADVANCED_DEBUG_ENABLED 0
// #define STRATA_ENABLED 0
// #define STRATA_OPAQUE_ROUGH_REFRACTION_ENABLED 0
// #define STRATA_USE_ACCURATE_SRGB 0
// #define SUPPORT_CLOUD_SHADOW_ON_FORWARD_LIT_TRANSLUCENT 0
// #define SUPPORT_CLOUD_SHADOW_ON_SINGLE_LAYER_WATER 0
// #define SUPPORT_RECTLIGHT_ON_FORWARD_LIT_TRANSLUCENT 0
// #define SUPPORT_VSM_FOWARD_QUALITY 0
// #define THREADGROUP_SIZE 64
// #define THREADGROUP_SIZE_X 64
// #define THREADGROUP_SIZE_Y 1
// #define THREADGROUP_SIZE_Z 1
// #define UE_LWC_RENDER_TILE_SIZE 2097152.00f
// #define UE_LWC_RENDER_TILE_SIZE_FMOD_2PI 0.673652053f
// #define UE_LWC_RENDER_TILE_SIZE_FMOD_PI 0.673652053f
// #define UE_LWC_RENDER_TILE_SIZE_RCP 4.76837158e-07f
// #define UE_LWC_RENDER_TILE_SIZE_RSQRT 0.000690533954f
// #define UE_LWC_RENDER_TILE_SIZE_SQRT 1448.15466f
// #define USE_DBUFFER 1
// #define USE_WAVE_INTRINSICS 0
// #define VELOCITY_ENCODE_DEPTH 1
// #define VERTEXSHADER 0
// #define VIRTUAL_TEXTURE_ANISOTROPIC_FILTERING 0
// #define WORKING_COLOR_SPACE_IS_SRGB 1

#line   1 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"





#pragma warning(disable:4008)
#line   7 "/Engine/Public/Platform.ush"


#line   7 "/Engine/Public/FP16Math.ush"




















	
	
	
	
	
	
	










#line   9 "/Engine/Public/Platform.ush"



























	
#line  10 "/Engine/Public/Platform/D3D/D3DCommon.ush"

	
	


precise float MakePrecise(float v) { precise float pv = v; return pv; }
precise float2 MakePrecise(float2 v) { precise float2 pv = v; return pv; }
precise float3 MakePrecise(float3 v) { precise float3 pv = v; return pv; }
precise float4 MakePrecise(float4 v) { precise float4 pv = v; return pv; }





SamplerState D3DStaticPointWrappedSampler       : register(s0, space1000);
SamplerState D3DStaticPointClampedSampler       : register(s1, space1000);
SamplerState D3DStaticBilinearWrappedSampler    : register(s2, space1000);
SamplerState D3DStaticBilinearClampedSampler    : register(s3, space1000);
SamplerState D3DStaticTrilinearWrappedSampler   : register(s4, space1000);
SamplerState D3DStaticTrilinearClampedSampler   : register(s5, space1000);











RWStructuredBuffer<uint> UEDiagnosticBuffer : register(u0, space999);

void UEReportAssertWithPayload(uint AssertID, uint4 Payload)
{
	if (WaveIsFirstLane())
	{
		
		uint OldValue = 0;
		InterlockedAdd(UEDiagnosticBuffer[0], 1, OldValue);
		if (OldValue == 0)
		{
			UEDiagnosticBuffer[1] = AssertID;
			UEDiagnosticBuffer[2] = Payload.x;
			UEDiagnosticBuffer[3] = Payload.y;
			UEDiagnosticBuffer[4] = Payload.z;
			UEDiagnosticBuffer[5] = Payload.w;
		}
		
		
		for (;;)
		{
			InterlockedAdd(UEDiagnosticBuffer[0], 0, OldValue);
			if (OldValue == 0)
			{
				break;
			}
		}
	}
}












	
	

	
	

	
	
	

	
	
	



	

	






	
	

	
		

		uint64_t PackUlongType(uint2 Value)
		{
			return ((uint64_t)Value.y << 32) | Value.x;
		}

		uint2 UnpackUlongType(uint64_t Value)
		{
			return uint2(uint(Value), uint(Value >> 32));
		}
	

	
		void ImageInterlockedMaxUInt64(RWTexture2D<uint64_t> Dest, uint2 Coord, uint64_t Value)
		{
			InterlockedMax(Dest[Coord], Value);
		}
	







#line  36 "/Engine/Public/Platform.ush"



#line   3 "/Engine/Public/BindlessResources.ush"



















#line  43 "/Engine/Public/BindlessResources.ush"

	
	
	

	


#line  70 "/Engine/Public/BindlessResources.ush"

	
	
	

	

































#line  39 "/Engine/Public/Platform.ush"




#line   6 "/Engine/Public/ShaderVersion.ush"
#line  43 "/Engine/Public/Platform.ush"








































































































































































	











	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	















	
	

#line 322 "/Engine/Public/Platform.ush"














































	
	
	
	
	

















































	
















































































void ShaderYield()
{
	
}



















































































































































































































	

	void WriteDispatchIndirectArgs(RWBuffer<uint> RWIndirectDispatchArgsBuffer, in uint InIndex, in uint InIndirectArgX, in uint InIndirectArgY, in uint InIndirectArgZ)
	{
		RWIndirectDispatchArgsBuffer[3 * InIndex + 0] = InIndirectArgX;
		RWIndirectDispatchArgsBuffer[3 * InIndex + 1] = InIndirectArgY;
		RWIndirectDispatchArgsBuffer[3 * InIndex + 2] = InIndirectArgZ;
	}


void WriteDispatchIndirectArgs(RWBuffer<uint> RWIndirectDispatchArgsBuffer, in uint InIndex, in uint3 InIndirectArg)
{
	WriteDispatchIndirectArgs(RWIndirectDispatchArgsBuffer, InIndex, InIndirectArg.x, InIndirectArg.y, InIndirectArg.z);
}





























float min3( float a, float b, float c )
{
	return min( a, min( b, c ) );
}

float max3( float a, float b, float c )
{
	return max( a, max( b, c ) );
}

float2 min3( float2 a, float2 b, float2 c )
{
	return float2(
		min3( a.x, b.x, c.x ),
		min3( a.y, b.y, c.y )
	);
}

float2 max3( float2 a, float2 b, float2 c )
{
	return float2(
		max3( a.x, b.x, c.x ),
		max3( a.y, b.y, c.y )
	);
}

float3 max3( float3 a, float3 b, float3 c )
{
	return float3(
		max3( a.x, b.x, c.x ),
		max3( a.y, b.y, c.y ),
		max3( a.z, b.z, c.z )
	);
}

float3 min3( float3 a, float3 b, float3 c )
{
	return float3(
		min3( a.x, b.x, c.x ),
		min3( a.y, b.y, c.y ),
		min3( a.z, b.z, c.z )
	);
}

float4 min3( float4 a, float4 b, float4 c )
{
	return float4(
		min3( a.x, b.x, c.x ),
		min3( a.y, b.y, c.y ),
		min3( a.z, b.z, c.z ),
		min3( a.w, b.w, c.w )
	);
}

float4 max3( float4 a, float4 b, float4 c )
{
	return float4(
		max3( a.x, b.x, c.x ),
		max3( a.y, b.y, c.y ),
		max3( a.z, b.z, c.z ),
		max3( a.w, b.w, c.w )
	);
}

#line 891 "/Engine/Public/Platform.ush"








#line 925 "/Engine/Public/Platform.ush"

  bool select_internal(bool    c, bool a, bool b) { return bool (c   ? a.x : b.x); } bool2 select_internal(bool    c, bool a, bool2 b) { return bool2(c   ? a   : b.x, c   ? a   : b.y); } bool2 select_internal(bool    c, bool2 a, bool b) { return bool2(c   ? a.x : b  , c   ? a.y : b  ); } bool2 select_internal(bool    c, bool2 a, bool2 b) { return bool2(c   ? a.x : b.x, c   ? a.y : b.y); } bool2 select_internal(bool2   c, bool a, bool b) { return bool2(c.x ? a   : b  , c.y ? a   : b  ); } bool2 select_internal(bool2   c, bool a, bool2 b) { return bool2(c.x ? a   : b.x, c.y ? a   : b.y); } bool2 select_internal(bool2   c, bool2 a, bool b) { return bool2(c.x ? a.x : b  , c.y ? a.y : b  ); } bool2 select_internal(bool2   c, bool2 a, bool2 b) { return bool2(c.x ? a.x : b.x, c.y ? a.y : b.y); } bool3 select_internal(bool    c, bool a, bool3 b) { return bool3(c   ? a   : b.x, c   ? a   : b.y, c   ? a   : b.z); } bool3 select_internal(bool    c, bool3 a, bool b) { return bool3(c   ? a.x : b  , c   ? a.y : b  , c   ? a.z : b  ); } bool3 select_internal(bool    c, bool3 a, bool3 b) { return bool3(c   ? a.x : b.x, c   ? a.y : b.y, c   ? a.z : b.z); } bool3 select_internal(bool3   c, bool a, bool b) { return bool3(c.x ? a   : b  , c.y ? a   : b  , c.z ? a   : b  ); } bool3 select_internal(bool3   c, bool a, bool3 b) { return bool3(c.x ? a   : b.x, c.y ? a   : b.y, c.z ? a   : b.z); } bool3 select_internal(bool3   c, bool3 a, bool b) { return bool3(c.x ? a.x : b  , c.y ? a.y : b  , c.z ? a.z : b  ); } bool3 select_internal(bool3   c, bool3 a, bool3 b) { return bool3(c.x ? a.x : b.x, c.y ? a.y : b.y, c.z ? a.z : b.z); } bool4 select_internal(bool    c, bool a, bool4 b) { return bool4(c   ? a   : b.x, c   ? a   : b.y, c   ? a   : b.z, c   ? a   : b.w); } bool4 select_internal(bool    c, bool4 a, bool b) { return bool4(c   ? a.x : b  , c   ? a.y : b  , c   ? a.z : b  , c   ? a.w : b  ); } bool4 select_internal(bool    c, bool4 a, bool4 b) { return bool4(c   ? a.x : b.x, c   ? a.y : b.y, c   ? a.z : b.z, c   ? a.w : b.w); } bool4 select_internal(bool4   c, bool a, bool b) { return bool4(c.x ? a   : b  , c.y ? a   : b  , c.z ? a   : b  , c.w ? a   : b  ); } bool4 select_internal(bool4   c, bool a, bool4 b) { return bool4(c.x ? a   : b.x, c.y ? a   : b.y, c.z ? a   : b.z, c.w ? a   : b.w); } bool4 select_internal(bool4   c, bool4 a, bool b) { return bool4(c.x ? a.x : b  , c.y ? a.y : b  , c.z ? a.z : b  , c.w ? a.w : b  ); } bool4 select_internal(bool4   c, bool4 a, bool4 b) { return bool4(c.x ? a.x : b.x, c.y ? a.y : b.y, c.z ? a.z : b.z, c.w ? a.w : b.w); } 




  int select_internal(bool    c, int a, int b) { return int (c   ? a.x : b.x); } int2 select_internal(bool    c, int a, int2 b) { return int2(c   ? a   : b.x, c   ? a   : b.y); } int2 select_internal(bool    c, int2 a, int b) { return int2(c   ? a.x : b  , c   ? a.y : b  ); } int2 select_internal(bool    c, int2 a, int2 b) { return int2(c   ? a.x : b.x, c   ? a.y : b.y); } int2 select_internal(bool2   c, int a, int b) { return int2(c.x ? a   : b  , c.y ? a   : b  ); } int2 select_internal(bool2   c, int a, int2 b) { return int2(c.x ? a   : b.x, c.y ? a   : b.y); } int2 select_internal(bool2   c, int2 a, int b) { return int2(c.x ? a.x : b  , c.y ? a.y : b  ); } int2 select_internal(bool2   c, int2 a, int2 b) { return int2(c.x ? a.x : b.x, c.y ? a.y : b.y); } int3 select_internal(bool    c, int a, int3 b) { return int3(c   ? a   : b.x, c   ? a   : b.y, c   ? a   : b.z); } int3 select_internal(bool    c, int3 a, int b) { return int3(c   ? a.x : b  , c   ? a.y : b  , c   ? a.z : b  ); } int3 select_internal(bool    c, int3 a, int3 b) { return int3(c   ? a.x : b.x, c   ? a.y : b.y, c   ? a.z : b.z); } int3 select_internal(bool3   c, int a, int b) { return int3(c.x ? a   : b  , c.y ? a   : b  , c.z ? a   : b  ); } int3 select_internal(bool3   c, int a, int3 b) { return int3(c.x ? a   : b.x, c.y ? a   : b.y, c.z ? a   : b.z); } int3 select_internal(bool3   c, int3 a, int b) { return int3(c.x ? a.x : b  , c.y ? a.y : b  , c.z ? a.z : b  ); } int3 select_internal(bool3   c, int3 a, int3 b) { return int3(c.x ? a.x : b.x, c.y ? a.y : b.y, c.z ? a.z : b.z); } int4 select_internal(bool    c, int a, int4 b) { return int4(c   ? a   : b.x, c   ? a   : b.y, c   ? a   : b.z, c   ? a   : b.w); } int4 select_internal(bool    c, int4 a, int b) { return int4(c   ? a.x : b  , c   ? a.y : b  , c   ? a.z : b  , c   ? a.w : b  ); } int4 select_internal(bool    c, int4 a, int4 b) { return int4(c   ? a.x : b.x, c   ? a.y : b.y, c   ? a.z : b.z, c   ? a.w : b.w); } int4 select_internal(bool4   c, int a, int b) { return int4(c.x ? a   : b  , c.y ? a   : b  , c.z ? a   : b  , c.w ? a   : b  ); } int4 select_internal(bool4   c, int a, int4 b) { return int4(c.x ? a   : b.x, c.y ? a   : b.y, c.z ? a   : b.z, c.w ? a   : b.w); } int4 select_internal(bool4   c, int4 a, int b) { return int4(c.x ? a.x : b  , c.y ? a.y : b  , c.z ? a.z : b  , c.w ? a.w : b  ); } int4 select_internal(bool4   c, int4 a, int4 b) { return int4(c.x ? a.x : b.x, c.y ? a.y : b.y, c.z ? a.z : b.z, c.w ? a.w : b.w); } 
  float select_internal(bool    c, float a, float b) { return float (c   ? a.x : b.x); } float2 select_internal(bool    c, float a, float2 b) { return float2(c   ? a   : b.x, c   ? a   : b.y); } float2 select_internal(bool    c, float2 a, float b) { return float2(c   ? a.x : b  , c   ? a.y : b  ); } float2 select_internal(bool    c, float2 a, float2 b) { return float2(c   ? a.x : b.x, c   ? a.y : b.y); } float2 select_internal(bool2   c, float a, float b) { return float2(c.x ? a   : b  , c.y ? a   : b  ); } float2 select_internal(bool2   c, float a, float2 b) { return float2(c.x ? a   : b.x, c.y ? a   : b.y); } float2 select_internal(bool2   c, float2 a, float b) { return float2(c.x ? a.x : b  , c.y ? a.y : b  ); } float2 select_internal(bool2   c, float2 a, float2 b) { return float2(c.x ? a.x : b.x, c.y ? a.y : b.y); } float3 select_internal(bool    c, float a, float3 b) { return float3(c   ? a   : b.x, c   ? a   : b.y, c   ? a   : b.z); } float3 select_internal(bool    c, float3 a, float b) { return float3(c   ? a.x : b  , c   ? a.y : b  , c   ? a.z : b  ); } float3 select_internal(bool    c, float3 a, float3 b) { return float3(c   ? a.x : b.x, c   ? a.y : b.y, c   ? a.z : b.z); } float3 select_internal(bool3   c, float a, float b) { return float3(c.x ? a   : b  , c.y ? a   : b  , c.z ? a   : b  ); } float3 select_internal(bool3   c, float a, float3 b) { return float3(c.x ? a   : b.x, c.y ? a   : b.y, c.z ? a   : b.z); } float3 select_internal(bool3   c, float3 a, float b) { return float3(c.x ? a.x : b  , c.y ? a.y : b  , c.z ? a.z : b  ); } float3 select_internal(bool3   c, float3 a, float3 b) { return float3(c.x ? a.x : b.x, c.y ? a.y : b.y, c.z ? a.z : b.z); } float4 select_internal(bool    c, float a, float4 b) { return float4(c   ? a   : b.x, c   ? a   : b.y, c   ? a   : b.z, c   ? a   : b.w); } float4 select_internal(bool    c, float4 a, float b) { return float4(c   ? a.x : b  , c   ? a.y : b  , c   ? a.z : b  , c   ? a.w : b  ); } float4 select_internal(bool    c, float4 a, float4 b) { return float4(c   ? a.x : b.x, c   ? a.y : b.y, c   ? a.z : b.z, c   ? a.w : b.w); } float4 select_internal(bool4   c, float a, float b) { return float4(c.x ? a   : b  , c.y ? a   : b  , c.z ? a   : b  , c.w ? a   : b  ); } float4 select_internal(bool4   c, float a, float4 b) { return float4(c.x ? a   : b.x, c.y ? a   : b.y, c.z ? a   : b.z, c.w ? a   : b.w); } float4 select_internal(bool4   c, float4 a, float b) { return float4(c.x ? a.x : b  , c.y ? a.y : b  , c.z ? a.z : b  , c.w ? a.w : b  ); } float4 select_internal(bool4   c, float4 a, float4 b) { return float4(c.x ? a.x : b.x, c.y ? a.y : b.y, c.z ? a.z : b.z, c.w ? a.w : b.w); } 











bool  and_internal(bool  a, bool  b) { return bool(a && b); }
bool2 and_internal(bool2 a, bool2 b) { return bool2(a.x && b.x, a.y && b.y); }
bool3 and_internal(bool3 a, bool3 b) { return bool3(a.x && b.x, a.y && b.y, a.z && b.z); }
bool4 and_internal(bool4 a, bool4 b) { return bool4(a.x && b.x, a.y && b.y, a.z && b.z, a.w && b.w); }

bool  or_internal(bool  a, bool  b) { return bool(a || b); }
bool2 or_internal(bool2 a, bool2 b) { return bool2(a.x || b.x, a.y || b.y); }
bool3 or_internal(bool3 a, bool3 b) { return bool3(a.x || b.x, a.y || b.y, a.z || b.z); }
bool4 or_internal(bool4 a, bool4 b) { return bool4(a.x || b.x, a.y || b.y, a.z || b.z, a.w || b.w); }




#line 976 "/Engine/Public/Platform.ush"




float  CondMask(bool Cond, float  Src0, float  Src1) { return Cond ? Src0 : Src1; }
float2 CondMask(bool Cond, float2 Src0, float2 Src1) { return Cond ? Src0 : Src1; }
float3 CondMask(bool Cond, float3 Src0, float3 Src1) { return Cond ? Src0 : Src1; }
float4 CondMask(bool Cond, float4 Src0, float4 Src1) { return Cond ? Src0 : Src1; }

int  CondMask(bool Cond, int  Src0, int  Src1) { return Cond ? Src0 : Src1; }
int2 CondMask(bool Cond, int2 Src0, int2 Src1) { return Cond ? Src0 : Src1; }
int3 CondMask(bool Cond, int3 Src0, int3 Src1) { return Cond ? Src0 : Src1; }
int4 CondMask(bool Cond, int4 Src0, int4 Src1) { return Cond ? Src0 : Src1; }

uint  CondMask(bool Cond, uint  Src0, uint  Src1) { return Cond ? Src0 : Src1; }
uint2 CondMask(bool Cond, uint2 Src0, uint2 Src1) { return Cond ? Src0 : Src1; }
uint3 CondMask(bool Cond, uint3 Src0, uint3 Src1) { return Cond ? Src0 : Src1; }
uint4 CondMask(bool Cond, uint4 Src0, uint4 Src1) { return Cond ? Src0 : Src1; }




float UnpackByte0(uint v) { return float(v & 0xff); }
float UnpackByte1(uint v) { return float((v >> 8) & 0xff); }
float UnpackByte2(uint v) { return float((v >> 16) & 0xff); }
float UnpackByte3(uint v) { return float(v >> 24); }









uint BitFieldInsertU32(uint Mask, uint Preserve, uint Enable)
{
	return (Preserve & Mask) | (Enable & ~Mask);
}

uint BitFieldExtractU32(uint Data, uint Size, uint Offset)
{
	
	
	Size &= 31;
	Offset &= 31;
	return (Data >> Offset) & ((1u << Size) - 1u);
}

int BitFieldExtractI32(int Data, uint Size, uint Offset)
{
	Size &= 31u;
	Offset &= 31u;
	const uint Shift = (32u - Size) & 31u;
	const int Value = (Data >> Offset) & int((1u << Size) - 1u);
	return (Value << Shift) >> Shift;
}

uint BitFieldMaskU32(uint MaskWidth, uint MaskLocation)
{
	MaskWidth &= 31u;
	MaskLocation &= 31u;

	return ((1u << MaskWidth) - 1u) << MaskLocation;
}





int MulI24(int I1, int I2)
{
	
	return (I1 * I2);
}

uint MulU24(uint U1, uint U2)
{
	
	return U1 * U2;
}

int MadI24(int I1, int I2, int I3)
{
	
	return I1 * I2 + I3;
}

uint MadU24(uint U1, uint U2, uint U3)
{
	
	return U1 * U2 + U3;
}



uint Padding(uint Value, uint Pow2)
{
	return (Value + Pow2 - 1u) & ~(Pow2 - 1u);
}

uint CeilLog2(uint Value)
{
	return Value < 2u ? 0u : firstbithigh(Value - 1u) + 1u;
}

float BitFieldExtractFloat(uint Bits, uint Count, uint Offset)
{
	return BitFieldExtractU32(Bits, Count, Offset) / (float)BitFieldMaskU32(Count, 0u);
}



uint BitAlignU32(uint High, uint Low, uint Shift)
{
	Shift &= 31u;

	uint Result = Low >> Shift;
	Result |= Shift > 0u ? (High << (32u - Shift)) : 0u;
	return Result;
}




uint ByteAlignU32(uint High, uint Low, uint Shift)
{
	return BitAlignU32(High, Low, Shift * 8);
}







#line 1126 "/Engine/Public/Platform.ush"



uint MaskedBitCount( uint2 Bits, uint Index )
{
	bool bLow = Index < 32;

	uint Mask = 1u << ( Index - ( bLow ? 0 : 32 ) );
	Mask -= 1;

	uint Offset;
	Offset  = countbits( Bits.x & ( bLow ? Mask : ~0u ) );
	Offset += countbits( Bits.y & ( bLow ? 0 : Mask ) );
	return Offset;
}




















uint MaskedBitCount( uint2 Bits )
{
	return MaskedBitCount( Bits, WaveGetLaneIndex() );
}



uint2 WaveBallot( bool Expr )
{
	return WaveActiveBallot( Expr ).xy;
}



uint WaveGetActiveLaneIndexLast()
{
	uint2 ActiveMask = WaveActiveBallot( true ).xy;
	return firstbithigh( ActiveMask.y ? ActiveMask.y : ActiveMask.x ) + ( ActiveMask.y ? 32 : 0 );
}





















	
	




	


		
	




















#line   7 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"


#line   7 "/Plugin/FX/Niagara/Private/NiagaraShaderVersion.ush"
#line   9 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"



	


	



	
#line   7 "/Engine/Private/Common.ush"













	
	
	
	
	
	
	
	
	


struct FloatDeriv
{
	float Value;
	float Ddx;
	float Ddy;
};

struct FloatDeriv2
{
	float2 Value;
	float2 Ddx;
	float2 Ddy;
};

struct FloatDeriv3
{
	float3 Value;
	float3 Ddx;
	float3 Ddy;
};

struct FloatDeriv4
{
	float4 Value;
	float4 Ddx;
	float4 Ddy;
};

FloatDeriv ConstructFloatDeriv(float InValue, float InDdx, float InDdy)
{
	FloatDeriv Ret;
	Ret.Value = InValue;
	Ret.Ddx = InDdx;
	Ret.Ddy = InDdy;
	return Ret;
}

FloatDeriv2 ConstructFloatDeriv2(float2 InValue, float2 InDdx, float2 InDdy)
{
	FloatDeriv2 Ret;
	Ret.Value = InValue;
	Ret.Ddx = InDdx;
	Ret.Ddy = InDdy;
	return Ret;
}

FloatDeriv3 ConstructFloatDeriv3(float3 InValue, float3 InDdx, float3 InDdy)
{
	FloatDeriv3 Ret;
	Ret.Value = InValue;
	Ret.Ddx = InDdx;
	Ret.Ddy = InDdy;
	return Ret;
}

FloatDeriv4 ConstructFloatDeriv4(float4 InValue, float4 InDdx, float4 InDdy)
{
	FloatDeriv4 Ret;
	Ret.Value = InValue;
	Ret.Ddx = InDdx;
	Ret.Ddy = InDdy;
	return Ret;
}















const static float PI = 3.1415926535897932f;
const static float MaxHalfFloat = 65504.0f;
const static float Max11BitsFloat = 65024.0f;
const static float Max10BitsFloat = 64512.0f;
const static float3 Max111110BitsFloat3 = float3(Max11BitsFloat, Max11BitsFloat, Max10BitsFloat);


















	


		
	



















	





	



#line   3 "/Engine/Private/GeneratedUniformBufferTypes.ush"





#line   3 "/Engine/Private/Nanite/NanitePackedNaniteView.ush"


struct FPackedNaniteView
{
	float4x4	SVPositionToTranslatedWorld;
	float4x4	ViewToTranslatedWorld;

	float4x4	TranslatedWorldToView;
	float4x4	TranslatedWorldToClip;
	float4x4	TranslatedWorldToSubpixelClip;	
	float4x4	ViewToClip;
	float4x4	ClipToRelativeWorld;

	float4x4	PrevTranslatedWorldToView;
	float4x4	PrevTranslatedWorldToClip;
	float4x4	PrevViewToClip;
	float4x4	PrevClipToRelativeWorld;

	int4		ViewRect;
	float4		ViewSizeAndInvSize;
	float4		ClipSpaceScaleOffset;
	float3		RelativePreViewTranslation;
	float		ViewTilePositionX;
	float3		RelativePrevPreViewTranslation;
	float		ViewTilePositionY;
	float3		RelativeWorldCameraOrigin;
	float		ViewTilePositionZ;
	float3		DrawDistanceOriginTranslatedWorld;
	float		RangeBasedCullingDistance;
	float3		ViewForward;
	float 		NearPlane;

	float4		TranslatedGlobalClipPlane; 

	float3		MatrixTilePosition;
	float		Padding1;

	float2		LODScales;
	float		MinBoundsRadiusSq;
	uint		StreamingPriorityCategory_AndFlags;

	int4		TargetLayerIdX_AndMipLevelY_AndNumMipLevelsZ;

	int4		HZBTestViewRect;
};
#line   8 "/Engine/Private/GeneratedUniformBufferTypes.ush"



#line   3 "/Engine/Private/HairStrands/HairStrandsVisibilityCommonStruct.ush"


struct FPackedHairSample
{
	float Depth;
	uint  PrimitiveID_MacroGroupID;
	uint  Tangent_Coverage8bit;
	uint  BaseColor_Roughness;
	uint  Specular_LightChannels_Backlit;
};

struct FPackedHairVis
{
	uint Depth_Coverage8bit;
	uint PrimitiveID_MaterialID;
};

struct FPackedHairVisPPLL
{
	uint Depth_Coverage8bit;
	uint PrimitiveID_MaterialID;
	uint NextNodeIndex;
};
#line  11 "/Engine/Private/GeneratedUniformBufferTypes.ush"

#line   3 "/Engine/Private/HairStrands/HairStrandsVoxelPageCommonStruct.ush"


struct FPackedVirtualVoxelNodeDesc  
{
	float3	TranslatedWorldMinAABB;
	uint	PackedPageIndexResolution; 
	float3	TranslatedWorldMaxAABB;
	uint	PageIndexOffset_VoxelWorldSize;
}; 

struct FVoxelizationViewInfo
{
	float4x4 TranslatedWorldToClip;
	float3   ViewForward;
	float    Pad0;
	uint2    RasterResolution;
	float2   Pad1;
};  
#line  12 "/Engine/Private/GeneratedUniformBufferTypes.ush"

#line   3 "/Engine/Private/HairStrands/HairStrandsDeepShadowCommonStruct.ush"


struct FDeepShadowViewInfo
{
	float4x4 TranslatedWorldToClipScaledBiased; 
	float4x4 TranslatedWorldToClip;
	float4 AtlasScaleBias; 
	float3   ViewForward;
	float    MinRadiusAtDepth1;
};
#line  13 "/Engine/Private/GeneratedUniformBufferTypes.ush"
#line 166 "/Engine/Private/Common.ush"



#line   1 "/Engine/Generated/GeneratedUniformBuffers.ush"
#line   2 "/Engine/Generated/UniformBuffers/View.ush"

cbuffer  UniformBufferConstants_View 
{
	 float4x4  View_TranslatedWorldToClip;
	 float4x4  View_TranslatedWorldToSubpixelClip;
	 float4x4  View_RelativeWorldToClip;
	 float4x4  View_ClipToRelativeWorld;
	 float4x4  View_TranslatedWorldToView;
	 float4x4  View_ViewToTranslatedWorld;
	 float4x4  View_TranslatedWorldToCameraView;
	 float4x4  View_CameraViewToTranslatedWorld;
	 float4x4  View_ViewToClip;
	 float4x4  View_ViewToClipNoAA;
	 float4x4  View_ClipToView;
	 float4x4  View_ClipToTranslatedWorld;
	 float4x4  View_SVPositionToTranslatedWorld;
	 float4x4  View_ScreenToRelativeWorld;
	 float4x4  View_ScreenToTranslatedWorld;
	 float4x4  View_MobileMultiviewShadowTransform;
	 float3  View_ViewTilePosition;
	 float  PrePadding_View_1036;
	 float3  View_MatrixTilePosition;
	 float  PrePadding_View_1052;
	 float3  View_ViewForward;
	 float  PrePadding_View_1068;
	 float3  View_ViewUp;
	 float  PrePadding_View_1084;
	 float3  View_ViewRight;
	 float  PrePadding_View_1100;
	 float3  View_HMDViewNoRollUp;
	 float  PrePadding_View_1116;
	 float3  View_HMDViewNoRollRight;
	 float  PrePadding_View_1132;
	 float4  View_InvDeviceZToWorldZTransform;
	 float4  View_ScreenPositionScaleBias;
	 float3  View_RelativeWorldCameraOrigin;
	 float  PrePadding_View_1180;
	 float3  View_TranslatedWorldCameraOrigin;
	 float  PrePadding_View_1196;
	 float3  View_RelativeWorldViewOrigin;
	 float  PrePadding_View_1212;
	 float3  View_RelativePreViewTranslation;
	 float  PrePadding_View_1228;
	 float4x4  View_PrevViewToClip;
	 float4x4  View_PrevClipToView;
	 float4x4  View_PrevTranslatedWorldToClip;
	 float4x4  View_PrevTranslatedWorldToView;
	 float4x4  View_PrevViewToTranslatedWorld;
	 float4x4  View_PrevTranslatedWorldToCameraView;
	 float4x4  View_PrevCameraViewToTranslatedWorld;
	 float3  View_PrevTranslatedWorldCameraOrigin;
	 float  PrePadding_View_1692;
	 float3  View_PrevRelativeWorldCameraOrigin;
	 float  PrePadding_View_1708;
	 float3  View_PrevRelativeWorldViewOrigin;
	 float  PrePadding_View_1724;
	 float3  View_RelativePrevPreViewTranslation;
	 float  PrePadding_View_1740;
	 float4x4  View_PrevClipToRelativeWorld;
	 float4x4  View_PrevScreenToTranslatedWorld;
	 float4x4  View_ClipToPrevClip;
	 float4x4  View_ClipToPrevClipWithAA;
	 float4  View_TemporalAAJitter;
	 float4  View_GlobalClippingPlane;
	 float2  View_FieldOfViewWideAngles;
	 float2  View_PrevFieldOfViewWideAngles;
	 float4  View_ViewRectMin;
	 float4  View_ViewSizeAndInvSize;
	 uint4  View_ViewRectMinAndSize;
	 float4  View_LightProbeSizeRatioAndInvSizeRatio;
	 float4  View_BufferSizeAndInvSize;
	 float4  View_BufferBilinearUVMinMax;
	 float4  View_ScreenToViewSpace;
	 float2  View_BufferToSceneTextureScale;
	 float2  View_ResolutionFractionAndInv;
	 int  View_NumSceneColorMSAASamples;
	 float  View_PreExposure;
	 float  View_OneOverPreExposure;
	 float  PrePadding_View_2188;
	 float4  View_DiffuseOverrideParameter;
	 float4  View_SpecularOverrideParameter;
	 float4  View_NormalOverrideParameter;
	 float2  View_RoughnessOverrideParameter;
	 float  View_PrevFrameGameTime;
	 float  View_PrevFrameRealTime;
	 float  View_OutOfBoundsMask;
	 float  PrePadding_View_2260;
	 float  PrePadding_View_2264;
	 float  PrePadding_View_2268;
	 float3  View_WorldCameraMovementSinceLastFrame;
	 float  View_CullingSign;
	 float  View_NearPlane;
	 float  View_GameTime;
	 float  View_RealTime;
	 float  View_DeltaTime;
	 float  View_MaterialTextureMipBias;
	 float  View_MaterialTextureDerivativeMultiply;
	 uint  View_Random;
	 uint  View_FrameNumber;
	 uint  View_StateFrameIndexMod8;
	 uint  View_StateFrameIndex;
	 uint  View_DebugViewModeMask;
	 uint  View_WorldIsPaused;
	 float  View_CameraCut;
	 float  View_UnlitViewmodeMask;
	 float  PrePadding_View_2344;
	 float  PrePadding_View_2348;
	 float4  View_DirectionalLightColor;
	 float3  View_DirectionalLightDirection;
	 float  PrePadding_View_2380;
	 float4  View_TranslucencyLightingVolumeMin[2];
	 float4  View_TranslucencyLightingVolumeInvSize[2];
	 float4  View_TemporalAAParams;
	 float4  View_CircleDOFParams;
	 float  View_DepthOfFieldSensorWidth;
	 float  View_DepthOfFieldFocalDistance;
	 float  View_DepthOfFieldScale;
	 float  View_DepthOfFieldFocalLength;
	 float  View_DepthOfFieldFocalRegion;
	 float  View_DepthOfFieldNearTransitionRegion;
	 float  View_DepthOfFieldFarTransitionRegion;
	 float  View_MotionBlurNormalizedToPixel;
	 float  View_GeneralPurposeTweak;
	 float  View_GeneralPurposeTweak2;
	 float  View_DemosaicVposOffset;
	 float  View_DecalDepthBias;
	 float3  View_IndirectLightingColorScale;
	 float  PrePadding_View_2540;
	 float3  View_PrecomputedIndirectLightingColorScale;
	 float  PrePadding_View_2556;
	 float3  View_PrecomputedIndirectSpecularColorScale;
	 float  PrePadding_View_2572;
	 float4  View_AtmosphereLightDirection[2];
	 float4  View_AtmosphereLightIlluminanceOnGroundPostTransmittance[2];
	 float4  View_AtmosphereLightIlluminanceOuterSpace[2];
	 float4  View_AtmosphereLightDiscLuminance[2];
	 float4  View_AtmosphereLightDiscCosHalfApexAngle_PPTrans[2];
	 float4  View_SkyViewLutSizeAndInvSize;
	 float3  View_SkyCameraTranslatedWorldOrigin;
	 float  PrePadding_View_2764;
	 float4  View_SkyPlanetTranslatedWorldCenterAndViewHeight;
	 float4x4  View_SkyViewLutReferential;
	 float4  View_SkyAtmosphereSkyLuminanceFactor;
	 float  View_SkyAtmospherePresentInScene;
	 float  View_SkyAtmosphereHeightFogContribution;
	 float  View_SkyAtmosphereBottomRadiusKm;
	 float  View_SkyAtmosphereTopRadiusKm;
	 float4  View_SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize;
	 float  View_SkyAtmosphereAerialPerspectiveStartDepthKm;
	 float  View_SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution;
	 float  View_SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv;
	 float  View_SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm;
	 float  View_SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv;
	 float  View_SkyAtmosphereApplyCameraAerialPerspectiveVolume;
	 float  PrePadding_View_2920;
	 float  PrePadding_View_2924;
	 float3  View_NormalCurvatureToRoughnessScaleBias;
	 float  View_RenderingReflectionCaptureMask;
	 float  View_RealTimeReflectionCapture;
	 float  View_RealTimeReflectionCapturePreExposure;
	 float  PrePadding_View_2952;
	 float  PrePadding_View_2956;
	 float4  View_AmbientCubemapTint;
	 float  View_AmbientCubemapIntensity;
	 float  View_SkyLightApplyPrecomputedBentNormalShadowingFlag;
	 float  View_SkyLightAffectReflectionFlag;
	 float  View_SkyLightAffectGlobalIlluminationFlag;
	 float4  View_SkyLightColor;
	 float4  View_MobileSkyIrradianceEnvironmentMap[8];
	 float  View_MobilePreviewMode;
	 float  View_HMDEyePaddingOffset;
	 float  View_ReflectionCubemapMaxMip;
	 float  View_ShowDecalsMask;
	 uint  View_DistanceFieldAOSpecularOcclusionMode;
	 float  View_IndirectCapsuleSelfShadowingIntensity;
	 float  PrePadding_View_3160;
	 float  PrePadding_View_3164;
	 float3  View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
	 int  View_StereoPassIndex;
	 float4  View_GlobalVolumeTranslatedCenterAndExtent[6];
	 float4  View_GlobalVolumeTranslatedWorldToUVAddAndMul[6];
	 float4  View_GlobalDistanceFieldMipTranslatedWorldToUVScale[6];
	 float4  View_GlobalDistanceFieldMipTranslatedWorldToUVBias[6];
	 float  View_GlobalDistanceFieldMipFactor;
	 float  View_GlobalDistanceFieldMipTransition;
	 int  View_GlobalDistanceFieldClipmapSizeInPages;
	 int  PrePadding_View_3580;
	 float3  View_GlobalDistanceFieldInvPageAtlasSize;
	 float  PrePadding_View_3596;
	 float3  View_GlobalDistanceFieldInvCoverageAtlasSize;
	 float  View_GlobalVolumeDimension;
	 float  View_GlobalVolumeTexelSize;
	 float  View_MaxGlobalDFAOConeDistance;
	 uint  View_NumGlobalSDFClipmaps;
	 float  View_CoveredExpandSurfaceScale;
	 float  View_NotCoveredExpandSurfaceScale;
	 float  View_NotCoveredMinStepScale;
	 float  View_DitheredTransparencyStepThreshold;
	 float  View_DitheredTransparencyTraceThreshold;
	 int2  View_CursorPosition;
	 float  View_bCheckerboardSubsurfaceProfileRendering;
	 float  PrePadding_View_3660;
	 float3  View_VolumetricFogInvGridSize;
	 float  PrePadding_View_3676;
	 float3  View_VolumetricFogGridZParams;
	 float  PrePadding_View_3692;
	 float2  View_VolumetricFogSVPosToVolumeUV;
	 float2  View_VolumetricFogScreenUVToHistoryVolumeUV;
	 float  View_VolumetricFogMaxDistance;
	 float  PrePadding_View_3716;
	 float  PrePadding_View_3720;
	 float  PrePadding_View_3724;
	 float3  View_VolumetricLightmapWorldToUVScale;
	 float  PrePadding_View_3740;
	 float3  View_VolumetricLightmapWorldToUVAdd;
	 float  PrePadding_View_3756;
	 float3  View_VolumetricLightmapIndirectionTextureSize;
	 float  View_VolumetricLightmapBrickSize;
	 float3  View_VolumetricLightmapBrickTexelSize;
	 float  View_IndirectLightingCacheShowFlag;
	 float  View_EyeToPixelSpreadAngle;
	 float  PrePadding_View_3796;
	 float  PrePadding_View_3800;
	 float  PrePadding_View_3804;
	 float4  View_XRPassthroughCameraUVs[2];
	 float  View_GlobalVirtualTextureMipBias;
	 uint  View_VirtualTextureFeedbackShift;
	 uint  View_VirtualTextureFeedbackMask;
	 uint  View_VirtualTextureFeedbackStride;
	 uint  View_VirtualTextureFeedbackJitterOffset;
	 uint  View_VirtualTextureFeedbackSampleOffset;
	 uint  PrePadding_View_3864;
	 uint  PrePadding_View_3868;
	 float4  View_RuntimeVirtualTextureMipLevel;
	 float2  View_RuntimeVirtualTexturePackHeight;
	 float  PrePadding_View_3896;
	 float  PrePadding_View_3900;
	 float4  View_RuntimeVirtualTextureDebugParams;
	 float  View_OverrideLandscapeLOD;
	 int  View_FarShadowStaticMeshLODBias;
	 float  View_MinRoughness;
	 float  PrePadding_View_3932;
	 float4  View_HairRenderInfo;
	 uint  View_EnableSkyLight;
	 uint  View_HairRenderInfoBits;
	 uint  View_HairComponents;
	 float  View_bSubsurfacePostprocessEnabled;
	 float4  View_SSProfilesTextureSizeAndInvSize;
	 float4  View_SSProfilesPreIntegratedTextureSizeAndInvSize;
	 float3  View_PhysicsFieldClipmapCenter;
	 float  View_PhysicsFieldClipmapDistance;
	 int  View_PhysicsFieldClipmapResolution;
	 int  View_PhysicsFieldClipmapExponent;
	 int  View_PhysicsFieldClipmapCount;
	 int  View_PhysicsFieldTargetCount;
	 int4  View_PhysicsFieldTargets[32];
	 uint  View_InstanceSceneDataSOAStride;
	 uint  View_GPUSceneViewId;
	 float  View_ViewResolutionFraction;
	 float  View_SubSurfaceColorAsTransmittanceAtDistanceInMeters;
	 uint BindlessSampler_View_MaterialTextureBilinearWrapedSampler ;
	 uint  PrePadding_View_4564;
	 uint BindlessSampler_View_MaterialTextureBilinearClampedSampler ;
	 uint  PrePadding_View_4572;
	 uint BindlessResource_View_VolumetricLightmapIndirectionTexture ;
	 uint  PrePadding_View_4580;
	 uint BindlessResource_View_VolumetricLightmapBrickAmbientVector ;
	 uint  PrePadding_View_4588;
	 uint BindlessResource_View_VolumetricLightmapBrickSHCoefficients0 ;
	 uint  PrePadding_View_4596;
	 uint BindlessResource_View_VolumetricLightmapBrickSHCoefficients1 ;
	 uint  PrePadding_View_4604;
	 uint BindlessResource_View_VolumetricLightmapBrickSHCoefficients2 ;
	 uint  PrePadding_View_4612;
	 uint BindlessResource_View_VolumetricLightmapBrickSHCoefficients3 ;
	 uint  PrePadding_View_4620;
	 uint BindlessResource_View_VolumetricLightmapBrickSHCoefficients4 ;
	 uint  PrePadding_View_4628;
	 uint BindlessResource_View_VolumetricLightmapBrickSHCoefficients5 ;
	 uint  PrePadding_View_4636;
	 uint BindlessResource_View_SkyBentNormalBrickTexture ;
	 uint  PrePadding_View_4644;
	 uint BindlessResource_View_DirectionalLightShadowingBrickTexture ;
	 uint  PrePadding_View_4652;
	 uint BindlessSampler_View_VolumetricLightmapBrickAmbientVectorSampler ;
	 uint  PrePadding_View_4660;
	 uint BindlessSampler_View_VolumetricLightmapTextureSampler0 ;
	 uint  PrePadding_View_4668;
	 uint BindlessSampler_View_VolumetricLightmapTextureSampler1 ;
	 uint  PrePadding_View_4676;
	 uint BindlessSampler_View_VolumetricLightmapTextureSampler2 ;
	 uint  PrePadding_View_4684;
	 uint BindlessSampler_View_VolumetricLightmapTextureSampler3 ;
	 uint  PrePadding_View_4692;
	 uint BindlessSampler_View_VolumetricLightmapTextureSampler4 ;
	 uint  PrePadding_View_4700;
	 uint BindlessSampler_View_VolumetricLightmapTextureSampler5 ;
	 uint  PrePadding_View_4708;
	 uint BindlessSampler_View_SkyBentNormalTextureSampler ;
	 uint  PrePadding_View_4716;
	 uint BindlessSampler_View_DirectionalLightShadowingTextureSampler ;
	 uint  PrePadding_View_4724;
	 uint BindlessResource_View_GlobalDistanceFieldPageAtlasTexture ;
	 uint  PrePadding_View_4732;
	 uint BindlessResource_View_GlobalDistanceFieldCoverageAtlasTexture ;
	 uint  PrePadding_View_4740;
	 uint BindlessResource_View_GlobalDistanceFieldPageTableTexture ;
	 uint  PrePadding_View_4748;
	 uint BindlessResource_View_GlobalDistanceFieldMipTexture ;
	 uint  PrePadding_View_4756;
	 uint BindlessResource_View_AtmosphereTransmittanceTexture ;
	 uint  PrePadding_View_4764;
	 uint BindlessSampler_View_AtmosphereTransmittanceTextureSampler ;
	 uint  PrePadding_View_4772;
	 uint BindlessResource_View_AtmosphereIrradianceTexture ;
	 uint  PrePadding_View_4780;
	 uint BindlessSampler_View_AtmosphereIrradianceTextureSampler ;
	 uint  PrePadding_View_4788;
	 uint BindlessResource_View_AtmosphereInscatterTexture ;
	 uint  PrePadding_View_4796;
	 uint BindlessSampler_View_AtmosphereInscatterTextureSampler ;
	 uint  PrePadding_View_4804;
	 uint BindlessResource_View_PerlinNoiseGradientTexture ;
	 uint  PrePadding_View_4812;
	 uint BindlessSampler_View_PerlinNoiseGradientTextureSampler ;
	 uint  PrePadding_View_4820;
	 uint BindlessResource_View_PerlinNoise3DTexture ;
	 uint  PrePadding_View_4828;
	 uint BindlessSampler_View_PerlinNoise3DTextureSampler ;
	 uint  PrePadding_View_4836;
	 uint BindlessResource_View_SobolSamplingTexture ;
	 uint  PrePadding_View_4844;
	 uint BindlessSampler_View_SharedPointWrappedSampler ;
	 uint  PrePadding_View_4852;
	 uint BindlessSampler_View_SharedPointClampedSampler ;
	 uint  PrePadding_View_4860;
	 uint BindlessSampler_View_SharedBilinearWrappedSampler ;
	 uint  PrePadding_View_4868;
	 uint BindlessSampler_View_SharedBilinearClampedSampler ;
	 uint  PrePadding_View_4876;
	 uint BindlessSampler_View_SharedBilinearAnisoClampedSampler ;
	 uint  PrePadding_View_4884;
	 uint BindlessSampler_View_SharedTrilinearWrappedSampler ;
	 uint  PrePadding_View_4892;
	 uint BindlessSampler_View_SharedTrilinearClampedSampler ;
	 uint  PrePadding_View_4900;
	 uint BindlessResource_View_PreIntegratedBRDF ;
	 uint  PrePadding_View_4908;
	 uint BindlessSampler_View_PreIntegratedBRDFSampler ;
	 uint  PrePadding_View_4916;
	 uint BindlessResource_View_PrimitiveSceneData ;
	 uint  PrePadding_View_4924;
	 uint BindlessResource_View_InstanceSceneData ;
	 uint  PrePadding_View_4932;
	 uint BindlessResource_View_InstancePayloadData ;
	 uint  PrePadding_View_4940;
	 uint BindlessResource_View_LightmapSceneData ;
	 uint  PrePadding_View_4948;
	 uint BindlessResource_View_SkyIrradianceEnvironmentMap ;
	 uint  PrePadding_View_4956;
	 uint BindlessResource_View_TransmittanceLutTexture ;
	 uint  PrePadding_View_4964;
	 uint BindlessSampler_View_TransmittanceLutTextureSampler ;
	 uint  PrePadding_View_4972;
	 uint BindlessResource_View_SkyViewLutTexture ;
	 uint  PrePadding_View_4980;
	 uint BindlessSampler_View_SkyViewLutTextureSampler ;
	 uint  PrePadding_View_4988;
	 uint BindlessResource_View_DistantSkyLightLutTexture ;
	 uint  PrePadding_View_4996;
	 uint BindlessSampler_View_DistantSkyLightLutTextureSampler ;
	 uint  PrePadding_View_5004;
	 uint BindlessResource_View_CameraAerialPerspectiveVolume ;
	 uint  PrePadding_View_5012;
	 uint BindlessSampler_View_CameraAerialPerspectiveVolumeSampler ;
	 uint  PrePadding_View_5020;
	 uint BindlessResource_View_CameraAerialPerspectiveVolumeMieOnly ;
	 uint  PrePadding_View_5028;
	 uint BindlessSampler_View_CameraAerialPerspectiveVolumeMieOnlySampler ;
	 uint  PrePadding_View_5036;
	 uint BindlessResource_View_CameraAerialPerspectiveVolumeRayOnly ;
	 uint  PrePadding_View_5044;
	 uint BindlessSampler_View_CameraAerialPerspectiveVolumeRayOnlySampler ;
	 uint  PrePadding_View_5052;
	 uint BindlessResource_View_HairScatteringLUTTexture ;
	 uint  PrePadding_View_5060;
	 uint BindlessSampler_View_HairScatteringLUTSampler ;
	 uint  PrePadding_View_5068;
	 uint BindlessResource_View_LTCMatTexture ;
	 uint  PrePadding_View_5076;
	 uint BindlessSampler_View_LTCMatSampler ;
	 uint  PrePadding_View_5084;
	 uint BindlessResource_View_LTCAmpTexture ;
	 uint  PrePadding_View_5092;
	 uint BindlessSampler_View_LTCAmpSampler ;
	 uint  PrePadding_View_5100;
	 uint  View_bShadingEnergyConservation;
	 uint  View_bShadingEnergyPreservation;
	 uint BindlessResource_View_ShadingEnergyGGXSpecTexture ;
	 uint  PrePadding_View_5116;
	 uint BindlessResource_View_ShadingEnergyGGXGlassTexture ;
	 uint  PrePadding_View_5124;
	 uint BindlessResource_View_ShadingEnergyClothSpecTexture ;
	 uint  PrePadding_View_5132;
	 uint BindlessResource_View_ShadingEnergyDiffuseTexture ;
	 uint  PrePadding_View_5140;
	 uint BindlessSampler_View_ShadingEnergySampler ;
	 uint  PrePadding_View_5148;
	 uint BindlessResource_View_SSProfilesTexture ;
	 uint  PrePadding_View_5156;
	 uint BindlessSampler_View_SSProfilesSampler ;
	 uint  PrePadding_View_5164;
	 uint BindlessSampler_View_SSProfilesTransmissionSampler ;
	 uint  PrePadding_View_5172;
	 uint BindlessResource_View_SSProfilesPreIntegratedTexture ;
	 uint  PrePadding_View_5180;
	 uint BindlessSampler_View_SSProfilesPreIntegratedSampler ;
	 uint  PrePadding_View_5188;
	 uint BindlessResource_View_WaterIndirection ;
	 uint  PrePadding_View_5196;
	 uint BindlessResource_View_WaterData ;
	 uint  PrePadding_View_5204;
	 uint  PrePadding_View_5208;
	 uint  PrePadding_View_5212;
	 float4  View_RectLightAtlasSizeAndInvSize;
	 float  View_RectLightAtlasMaxMipLevel;
	 float  PrePadding_View_5236;
	 uint BindlessResource_View_RectLightAtlasTexture ;
	 uint  PrePadding_View_5244;
	 uint BindlessSampler_View_RectLightAtlasSampler ;
	 uint  PrePadding_View_5252;
	 uint  PrePadding_View_5256;
	 uint  PrePadding_View_5260;
	 float4  View_IESAtlasSizeAndInvSize;
	 uint BindlessResource_View_IESAtlasTexture ;
	 uint  PrePadding_View_5284;
	 uint BindlessSampler_View_IESAtlasSampler ;
	 uint  PrePadding_View_5292;
	 uint BindlessSampler_View_LandscapeWeightmapSampler ;
	 uint  PrePadding_View_5300;
	 uint BindlessResource_View_LandscapeIndirection ;
	 uint  PrePadding_View_5308;
	 uint BindlessResource_View_LandscapePerComponentData ;
	 uint  PrePadding_View_5316;
	 uint BindlessResource_View_VTFeedbackBuffer ;
	 uint  PrePadding_View_5324;
	 uint BindlessResource_View_EditorVisualizeLevelInstanceIds ;
	 uint  PrePadding_View_5332;
	 uint BindlessResource_View_EditorSelectedHitProxyIds ;
	 uint  PrePadding_View_5340;
	 uint BindlessResource_View_PhysicsFieldClipmapBuffer ;
	 uint  PrePadding_View_5348;
	 uint  PrePadding_View_5352;
	 uint  PrePadding_View_5356;
	 float3  View_TLASRelativePreViewTranslation;
	 float  PrePadding_View_5372;
	 float3  View_TLASViewTilePosition;
}
  SamplerState  View_MaterialTextureBilinearWrapedSampler ;
  SamplerState  View_MaterialTextureBilinearClampedSampler ;
  Texture3D<uint4>  View_VolumetricLightmapIndirectionTexture ;
  Texture3D  View_VolumetricLightmapBrickAmbientVector ;
  Texture3D  View_VolumetricLightmapBrickSHCoefficients0 ;
  Texture3D  View_VolumetricLightmapBrickSHCoefficients1 ;
  Texture3D  View_VolumetricLightmapBrickSHCoefficients2 ;
  Texture3D  View_VolumetricLightmapBrickSHCoefficients3 ;
  Texture3D  View_VolumetricLightmapBrickSHCoefficients4 ;
  Texture3D  View_VolumetricLightmapBrickSHCoefficients5 ;
  Texture3D  View_SkyBentNormalBrickTexture ;
  Texture3D  View_DirectionalLightShadowingBrickTexture ;
  SamplerState  View_VolumetricLightmapBrickAmbientVectorSampler ;
  SamplerState  View_VolumetricLightmapTextureSampler0 ;
  SamplerState  View_VolumetricLightmapTextureSampler1 ;
  SamplerState  View_VolumetricLightmapTextureSampler2 ;
  SamplerState  View_VolumetricLightmapTextureSampler3 ;
  SamplerState  View_VolumetricLightmapTextureSampler4 ;
  SamplerState  View_VolumetricLightmapTextureSampler5 ;
  SamplerState  View_SkyBentNormalTextureSampler ;
  SamplerState  View_DirectionalLightShadowingTextureSampler ;
  Texture3D  View_GlobalDistanceFieldPageAtlasTexture ;
  Texture3D  View_GlobalDistanceFieldCoverageAtlasTexture ;
  Texture3D<uint>  View_GlobalDistanceFieldPageTableTexture ;
  Texture3D  View_GlobalDistanceFieldMipTexture ;
  Texture2D  View_AtmosphereTransmittanceTexture ;
  SamplerState  View_AtmosphereTransmittanceTextureSampler ;
  Texture2D  View_AtmosphereIrradianceTexture ;
  SamplerState  View_AtmosphereIrradianceTextureSampler ;
  Texture3D  View_AtmosphereInscatterTexture ;
  SamplerState  View_AtmosphereInscatterTextureSampler ;
  Texture2D  View_PerlinNoiseGradientTexture ;
  SamplerState  View_PerlinNoiseGradientTextureSampler ;
  Texture3D  View_PerlinNoise3DTexture ;
  SamplerState  View_PerlinNoise3DTextureSampler ;
  Texture2D<uint>  View_SobolSamplingTexture ;
  SamplerState  View_SharedPointWrappedSampler ;
  SamplerState  View_SharedPointClampedSampler ;
  SamplerState  View_SharedBilinearWrappedSampler ;
  SamplerState  View_SharedBilinearClampedSampler ;
  SamplerState  View_SharedBilinearAnisoClampedSampler ;
  SamplerState  View_SharedTrilinearWrappedSampler ;
  SamplerState  View_SharedTrilinearClampedSampler ;
  Texture2D  View_PreIntegratedBRDF ;
  SamplerState  View_PreIntegratedBRDFSampler ;
  StructuredBuffer<float4>  View_PrimitiveSceneData ;
  StructuredBuffer<float4>  View_InstanceSceneData ;
  StructuredBuffer<float4>  View_InstancePayloadData ;
  StructuredBuffer<float4>  View_LightmapSceneData ;
  StructuredBuffer<float4>  View_SkyIrradianceEnvironmentMap ;
  Texture2D  View_TransmittanceLutTexture ;
  SamplerState  View_TransmittanceLutTextureSampler ;
  Texture2D  View_SkyViewLutTexture ;
  SamplerState  View_SkyViewLutTextureSampler ;
  Texture2D  View_DistantSkyLightLutTexture ;
  SamplerState  View_DistantSkyLightLutTextureSampler ;
  Texture3D  View_CameraAerialPerspectiveVolume ;
  SamplerState  View_CameraAerialPerspectiveVolumeSampler ;
  Texture3D  View_CameraAerialPerspectiveVolumeMieOnly ;
  SamplerState  View_CameraAerialPerspectiveVolumeMieOnlySampler ;
  Texture3D  View_CameraAerialPerspectiveVolumeRayOnly ;
  SamplerState  View_CameraAerialPerspectiveVolumeRayOnlySampler ;
  Texture3D  View_HairScatteringLUTTexture ;
  SamplerState  View_HairScatteringLUTSampler ;
  Texture2D  View_LTCMatTexture ;
  SamplerState  View_LTCMatSampler ;
  Texture2D  View_LTCAmpTexture ;
  SamplerState  View_LTCAmpSampler ;
  Texture2D<float2>  View_ShadingEnergyGGXSpecTexture ;
  Texture3D<float2>  View_ShadingEnergyGGXGlassTexture ;
  Texture2D<float2>  View_ShadingEnergyClothSpecTexture ;
  Texture2D<float>  View_ShadingEnergyDiffuseTexture ;
  SamplerState  View_ShadingEnergySampler ;
  Texture2D  View_SSProfilesTexture ;
  SamplerState  View_SSProfilesSampler ;
  SamplerState  View_SSProfilesTransmissionSampler ;
  Texture2DArray  View_SSProfilesPreIntegratedTexture ;
  SamplerState  View_SSProfilesPreIntegratedSampler ;
  Buffer<float4>  View_WaterIndirection ;
  Buffer<float4>  View_WaterData ;
  Texture2D<float4>  View_RectLightAtlasTexture ;
  SamplerState  View_RectLightAtlasSampler ;
  Texture2DArray<float>  View_IESAtlasTexture ;
  SamplerState  View_IESAtlasSampler ;
  SamplerState  View_LandscapeWeightmapSampler ;
  Buffer<uint>  View_LandscapeIndirection ;
  Buffer<float>  View_LandscapePerComponentData ;
  RWBuffer<uint>  View_VTFeedbackBuffer ;
  Buffer<uint>  View_EditorVisualizeLevelInstanceIds ;
  Buffer<uint>  View_EditorSelectedHitProxyIds ;
  Buffer<float>  View_PhysicsFieldClipmapBuffer ;
static const struct
{
	 float4x4  TranslatedWorldToClip;
	 float4x4  TranslatedWorldToSubpixelClip;
	 float4x4  RelativeWorldToClip;
	 float4x4  ClipToRelativeWorld;
	 float4x4  TranslatedWorldToView;
	 float4x4  ViewToTranslatedWorld;
	 float4x4  TranslatedWorldToCameraView;
	 float4x4  CameraViewToTranslatedWorld;
	 float4x4  ViewToClip;
	 float4x4  ViewToClipNoAA;
	 float4x4  ClipToView;
	 float4x4  ClipToTranslatedWorld;
	 float4x4  SVPositionToTranslatedWorld;
	 float4x4  ScreenToRelativeWorld;
	 float4x4  ScreenToTranslatedWorld;
	 float4x4  MobileMultiviewShadowTransform;
	 float3  ViewTilePosition;
	 float3  MatrixTilePosition;
	 float3  ViewForward;
	 float3  ViewUp;
	 float3  ViewRight;
	 float3  HMDViewNoRollUp;
	 float3  HMDViewNoRollRight;
	 float4  InvDeviceZToWorldZTransform;
	 float4  ScreenPositionScaleBias;
	 float3  RelativeWorldCameraOrigin;
	 float3  TranslatedWorldCameraOrigin;
	 float3  RelativeWorldViewOrigin;
	 float3  RelativePreViewTranslation;
	 float4x4  PrevViewToClip;
	 float4x4  PrevClipToView;
	 float4x4  PrevTranslatedWorldToClip;
	 float4x4  PrevTranslatedWorldToView;
	 float4x4  PrevViewToTranslatedWorld;
	 float4x4  PrevTranslatedWorldToCameraView;
	 float4x4  PrevCameraViewToTranslatedWorld;
	 float3  PrevTranslatedWorldCameraOrigin;
	 float3  PrevRelativeWorldCameraOrigin;
	 float3  PrevRelativeWorldViewOrigin;
	 float3  RelativePrevPreViewTranslation;
	 float4x4  PrevClipToRelativeWorld;
	 float4x4  PrevScreenToTranslatedWorld;
	 float4x4  ClipToPrevClip;
	 float4x4  ClipToPrevClipWithAA;
	 float4  TemporalAAJitter;
	 float4  GlobalClippingPlane;
	 float2  FieldOfViewWideAngles;
	 float2  PrevFieldOfViewWideAngles;
	 float4  ViewRectMin;
	 float4  ViewSizeAndInvSize;
	 uint4  ViewRectMinAndSize;
	 float4  LightProbeSizeRatioAndInvSizeRatio;
	 float4  BufferSizeAndInvSize;
	 float4  BufferBilinearUVMinMax;
	 float4  ScreenToViewSpace;
	 float2  BufferToSceneTextureScale;
	 float2  ResolutionFractionAndInv;
	 int  NumSceneColorMSAASamples;
	 float  PreExposure;
	 float  OneOverPreExposure;
	 float4  DiffuseOverrideParameter;
	 float4  SpecularOverrideParameter;
	 float4  NormalOverrideParameter;
	 float2  RoughnessOverrideParameter;
	 float  PrevFrameGameTime;
	 float  PrevFrameRealTime;
	 float  OutOfBoundsMask;
	 float3  WorldCameraMovementSinceLastFrame;
	 float  CullingSign;
	 float  NearPlane;
	 float  GameTime;
	 float  RealTime;
	 float  DeltaTime;
	 float  MaterialTextureMipBias;
	 float  MaterialTextureDerivativeMultiply;
	 uint  Random;
	 uint  FrameNumber;
	 uint  StateFrameIndexMod8;
	 uint  StateFrameIndex;
	 uint  DebugViewModeMask;
	 uint  WorldIsPaused;
	 float  CameraCut;
	 float  UnlitViewmodeMask;
	 float4  DirectionalLightColor;
	 float3  DirectionalLightDirection;
	 float4  TranslucencyLightingVolumeMin[2];
	 float4  TranslucencyLightingVolumeInvSize[2];
	 float4  TemporalAAParams;
	 float4  CircleDOFParams;
	 float  DepthOfFieldSensorWidth;
	 float  DepthOfFieldFocalDistance;
	 float  DepthOfFieldScale;
	 float  DepthOfFieldFocalLength;
	 float  DepthOfFieldFocalRegion;
	 float  DepthOfFieldNearTransitionRegion;
	 float  DepthOfFieldFarTransitionRegion;
	 float  MotionBlurNormalizedToPixel;
	 float  GeneralPurposeTweak;
	 float  GeneralPurposeTweak2;
	 float  DemosaicVposOffset;
	 float  DecalDepthBias;
	 float3  IndirectLightingColorScale;
	 float3  PrecomputedIndirectLightingColorScale;
	 float3  PrecomputedIndirectSpecularColorScale;
	 float4  AtmosphereLightDirection[2];
	 float4  AtmosphereLightIlluminanceOnGroundPostTransmittance[2];
	 float4  AtmosphereLightIlluminanceOuterSpace[2];
	 float4  AtmosphereLightDiscLuminance[2];
	 float4  AtmosphereLightDiscCosHalfApexAngle_PPTrans[2];
	 float4  SkyViewLutSizeAndInvSize;
	 float3  SkyCameraTranslatedWorldOrigin;
	 float4  SkyPlanetTranslatedWorldCenterAndViewHeight;
	 float4x4  SkyViewLutReferential;
	 float4  SkyAtmosphereSkyLuminanceFactor;
	 float  SkyAtmospherePresentInScene;
	 float  SkyAtmosphereHeightFogContribution;
	 float  SkyAtmosphereBottomRadiusKm;
	 float  SkyAtmosphereTopRadiusKm;
	 float4  SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize;
	 float  SkyAtmosphereAerialPerspectiveStartDepthKm;
	 float  SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution;
	 float  SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv;
	 float  SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm;
	 float  SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv;
	 float  SkyAtmosphereApplyCameraAerialPerspectiveVolume;
	 float3  NormalCurvatureToRoughnessScaleBias;
	 float  RenderingReflectionCaptureMask;
	 float  RealTimeReflectionCapture;
	 float  RealTimeReflectionCapturePreExposure;
	 float4  AmbientCubemapTint;
	 float  AmbientCubemapIntensity;
	 float  SkyLightApplyPrecomputedBentNormalShadowingFlag;
	 float  SkyLightAffectReflectionFlag;
	 float  SkyLightAffectGlobalIlluminationFlag;
	 float4  SkyLightColor;
	 float4  MobileSkyIrradianceEnvironmentMap[8];
	 float  MobilePreviewMode;
	 float  HMDEyePaddingOffset;
	 float  ReflectionCubemapMaxMip;
	 float  ShowDecalsMask;
	 uint  DistanceFieldAOSpecularOcclusionMode;
	 float  IndirectCapsuleSelfShadowingIntensity;
	 float3  ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
	 int  StereoPassIndex;
	 float4  GlobalVolumeTranslatedCenterAndExtent[6];
	 float4  GlobalVolumeTranslatedWorldToUVAddAndMul[6];
	 float4  GlobalDistanceFieldMipTranslatedWorldToUVScale[6];
	 float4  GlobalDistanceFieldMipTranslatedWorldToUVBias[6];
	 float  GlobalDistanceFieldMipFactor;
	 float  GlobalDistanceFieldMipTransition;
	 int  GlobalDistanceFieldClipmapSizeInPages;
	 float3  GlobalDistanceFieldInvPageAtlasSize;
	 float3  GlobalDistanceFieldInvCoverageAtlasSize;
	 float  GlobalVolumeDimension;
	 float  GlobalVolumeTexelSize;
	 float  MaxGlobalDFAOConeDistance;
	 uint  NumGlobalSDFClipmaps;
	 float  CoveredExpandSurfaceScale;
	 float  NotCoveredExpandSurfaceScale;
	 float  NotCoveredMinStepScale;
	 float  DitheredTransparencyStepThreshold;
	 float  DitheredTransparencyTraceThreshold;
	 int2  CursorPosition;
	 float  bCheckerboardSubsurfaceProfileRendering;
	 float3  VolumetricFogInvGridSize;
	 float3  VolumetricFogGridZParams;
	 float2  VolumetricFogSVPosToVolumeUV;
	 float2  VolumetricFogScreenUVToHistoryVolumeUV;
	 float  VolumetricFogMaxDistance;
	 float3  VolumetricLightmapWorldToUVScale;
	 float3  VolumetricLightmapWorldToUVAdd;
	 float3  VolumetricLightmapIndirectionTextureSize;
	 float  VolumetricLightmapBrickSize;
	 float3  VolumetricLightmapBrickTexelSize;
	 float  IndirectLightingCacheShowFlag;
	 float  EyeToPixelSpreadAngle;
	 float4  XRPassthroughCameraUVs[2];
	 float  GlobalVirtualTextureMipBias;
	 uint  VirtualTextureFeedbackShift;
	 uint  VirtualTextureFeedbackMask;
	 uint  VirtualTextureFeedbackStride;
	 uint  VirtualTextureFeedbackJitterOffset;
	 uint  VirtualTextureFeedbackSampleOffset;
	 float4  RuntimeVirtualTextureMipLevel;
	 float2  RuntimeVirtualTexturePackHeight;
	 float4  RuntimeVirtualTextureDebugParams;
	 float  OverrideLandscapeLOD;
	 int  FarShadowStaticMeshLODBias;
	 float  MinRoughness;
	 float4  HairRenderInfo;
	 uint  EnableSkyLight;
	 uint  HairRenderInfoBits;
	 uint  HairComponents;
	 float  bSubsurfacePostprocessEnabled;
	 float4  SSProfilesTextureSizeAndInvSize;
	 float4  SSProfilesPreIntegratedTextureSizeAndInvSize;
	 float3  PhysicsFieldClipmapCenter;
	 float  PhysicsFieldClipmapDistance;
	 int  PhysicsFieldClipmapResolution;
	 int  PhysicsFieldClipmapExponent;
	 int  PhysicsFieldClipmapCount;
	 int  PhysicsFieldTargetCount;
	 int4  PhysicsFieldTargets[32];
	 uint  InstanceSceneDataSOAStride;
	 uint  GPUSceneViewId;
	 float  ViewResolutionFraction;
	 float  SubSurfaceColorAsTransmittanceAtDistanceInMeters;
	 uint  bShadingEnergyConservation;
	 uint  bShadingEnergyPreservation;
	 float4  RectLightAtlasSizeAndInvSize;
	 float  RectLightAtlasMaxMipLevel;
	 float4  IESAtlasSizeAndInvSize;
	 float3  TLASRelativePreViewTranslation;
	 float3  TLASViewTilePosition;
	SamplerState MaterialTextureBilinearWrapedSampler;
	SamplerState MaterialTextureBilinearClampedSampler;
	Texture3D<uint4> VolumetricLightmapIndirectionTexture;
	Texture3D VolumetricLightmapBrickAmbientVector;
	Texture3D VolumetricLightmapBrickSHCoefficients0;
	Texture3D VolumetricLightmapBrickSHCoefficients1;
	Texture3D VolumetricLightmapBrickSHCoefficients2;
	Texture3D VolumetricLightmapBrickSHCoefficients3;
	Texture3D VolumetricLightmapBrickSHCoefficients4;
	Texture3D VolumetricLightmapBrickSHCoefficients5;
	Texture3D SkyBentNormalBrickTexture;
	Texture3D DirectionalLightShadowingBrickTexture;
	SamplerState VolumetricLightmapBrickAmbientVectorSampler;
	SamplerState VolumetricLightmapTextureSampler0;
	SamplerState VolumetricLightmapTextureSampler1;
	SamplerState VolumetricLightmapTextureSampler2;
	SamplerState VolumetricLightmapTextureSampler3;
	SamplerState VolumetricLightmapTextureSampler4;
	SamplerState VolumetricLightmapTextureSampler5;
	SamplerState SkyBentNormalTextureSampler;
	SamplerState DirectionalLightShadowingTextureSampler;
	Texture3D GlobalDistanceFieldPageAtlasTexture;
	Texture3D GlobalDistanceFieldCoverageAtlasTexture;
	Texture3D<uint> GlobalDistanceFieldPageTableTexture;
	Texture3D GlobalDistanceFieldMipTexture;
	Texture2D AtmosphereTransmittanceTexture;
	SamplerState AtmosphereTransmittanceTextureSampler;
	Texture2D AtmosphereIrradianceTexture;
	SamplerState AtmosphereIrradianceTextureSampler;
	Texture3D AtmosphereInscatterTexture;
	SamplerState AtmosphereInscatterTextureSampler;
	Texture2D PerlinNoiseGradientTexture;
	SamplerState PerlinNoiseGradientTextureSampler;
	Texture3D PerlinNoise3DTexture;
	SamplerState PerlinNoise3DTextureSampler;
	Texture2D<uint> SobolSamplingTexture;
	SamplerState SharedPointWrappedSampler;
	SamplerState SharedPointClampedSampler;
	SamplerState SharedBilinearWrappedSampler;
	SamplerState SharedBilinearClampedSampler;
	SamplerState SharedBilinearAnisoClampedSampler;
	SamplerState SharedTrilinearWrappedSampler;
	SamplerState SharedTrilinearClampedSampler;
	Texture2D PreIntegratedBRDF;
	SamplerState PreIntegratedBRDFSampler;
	StructuredBuffer<float4> PrimitiveSceneData;
	StructuredBuffer<float4> InstanceSceneData;
	StructuredBuffer<float4> InstancePayloadData;
	StructuredBuffer<float4> LightmapSceneData;
	StructuredBuffer<float4> SkyIrradianceEnvironmentMap;
	Texture2D TransmittanceLutTexture;
	SamplerState TransmittanceLutTextureSampler;
	Texture2D SkyViewLutTexture;
	SamplerState SkyViewLutTextureSampler;
	Texture2D DistantSkyLightLutTexture;
	SamplerState DistantSkyLightLutTextureSampler;
	Texture3D CameraAerialPerspectiveVolume;
	SamplerState CameraAerialPerspectiveVolumeSampler;
	Texture3D CameraAerialPerspectiveVolumeMieOnly;
	SamplerState CameraAerialPerspectiveVolumeMieOnlySampler;
	Texture3D CameraAerialPerspectiveVolumeRayOnly;
	SamplerState CameraAerialPerspectiveVolumeRayOnlySampler;
	Texture3D HairScatteringLUTTexture;
	SamplerState HairScatteringLUTSampler;
	Texture2D LTCMatTexture;
	SamplerState LTCMatSampler;
	Texture2D LTCAmpTexture;
	SamplerState LTCAmpSampler;
	Texture2D<float2> ShadingEnergyGGXSpecTexture;
	Texture3D<float2> ShadingEnergyGGXGlassTexture;
	Texture2D<float2> ShadingEnergyClothSpecTexture;
	Texture2D<float> ShadingEnergyDiffuseTexture;
	SamplerState ShadingEnergySampler;
	Texture2D SSProfilesTexture;
	SamplerState SSProfilesSampler;
	SamplerState SSProfilesTransmissionSampler;
	Texture2DArray SSProfilesPreIntegratedTexture;
	SamplerState SSProfilesPreIntegratedSampler;
	Buffer<float4> WaterIndirection;
	Buffer<float4> WaterData;
	Texture2D<float4> RectLightAtlasTexture;
	SamplerState RectLightAtlasSampler;
	Texture2DArray<float> IESAtlasTexture;
	SamplerState IESAtlasSampler;
	SamplerState LandscapeWeightmapSampler;
	Buffer<uint> LandscapeIndirection;
	Buffer<float> LandscapePerComponentData;
	RWBuffer<uint> VTFeedbackBuffer;
	Buffer<uint> EditorVisualizeLevelInstanceIds;
	Buffer<uint> EditorSelectedHitProxyIds;
	Buffer<float> PhysicsFieldClipmapBuffer;
} View = {View_TranslatedWorldToClip,View_TranslatedWorldToSubpixelClip,View_RelativeWorldToClip,View_ClipToRelativeWorld,View_TranslatedWorldToView,View_ViewToTranslatedWorld,View_TranslatedWorldToCameraView,View_CameraViewToTranslatedWorld,View_ViewToClip,View_ViewToClipNoAA,View_ClipToView,View_ClipToTranslatedWorld,View_SVPositionToTranslatedWorld,View_ScreenToRelativeWorld,View_ScreenToTranslatedWorld,View_MobileMultiviewShadowTransform,View_ViewTilePosition,View_MatrixTilePosition,View_ViewForward,View_ViewUp,View_ViewRight,View_HMDViewNoRollUp,View_HMDViewNoRollRight,View_InvDeviceZToWorldZTransform,View_ScreenPositionScaleBias,View_RelativeWorldCameraOrigin,View_TranslatedWorldCameraOrigin,View_RelativeWorldViewOrigin,View_RelativePreViewTranslation,View_PrevViewToClip,View_PrevClipToView,View_PrevTranslatedWorldToClip,View_PrevTranslatedWorldToView,View_PrevViewToTranslatedWorld,View_PrevTranslatedWorldToCameraView,View_PrevCameraViewToTranslatedWorld,View_PrevTranslatedWorldCameraOrigin,View_PrevRelativeWorldCameraOrigin,View_PrevRelativeWorldViewOrigin,View_RelativePrevPreViewTranslation,View_PrevClipToRelativeWorld,View_PrevScreenToTranslatedWorld,View_ClipToPrevClip,View_ClipToPrevClipWithAA,View_TemporalAAJitter,View_GlobalClippingPlane,View_FieldOfViewWideAngles,View_PrevFieldOfViewWideAngles,View_ViewRectMin,View_ViewSizeAndInvSize,View_ViewRectMinAndSize,View_LightProbeSizeRatioAndInvSizeRatio,View_BufferSizeAndInvSize,View_BufferBilinearUVMinMax,View_ScreenToViewSpace,View_BufferToSceneTextureScale,View_ResolutionFractionAndInv,View_NumSceneColorMSAASamples,View_PreExposure,View_OneOverPreExposure,View_DiffuseOverrideParameter,View_SpecularOverrideParameter,View_NormalOverrideParameter,View_RoughnessOverrideParameter,View_PrevFrameGameTime,View_PrevFrameRealTime,View_OutOfBoundsMask,View_WorldCameraMovementSinceLastFrame,View_CullingSign,View_NearPlane,View_GameTime,View_RealTime,View_DeltaTime,View_MaterialTextureMipBias,View_MaterialTextureDerivativeMultiply,View_Random,View_FrameNumber,View_StateFrameIndexMod8,View_StateFrameIndex,View_DebugViewModeMask,View_WorldIsPaused,View_CameraCut,View_UnlitViewmodeMask,View_DirectionalLightColor,View_DirectionalLightDirection,View_TranslucencyLightingVolumeMin,View_TranslucencyLightingVolumeInvSize,View_TemporalAAParams,View_CircleDOFParams,View_DepthOfFieldSensorWidth,View_DepthOfFieldFocalDistance,View_DepthOfFieldScale,View_DepthOfFieldFocalLength,View_DepthOfFieldFocalRegion,View_DepthOfFieldNearTransitionRegion,View_DepthOfFieldFarTransitionRegion,View_MotionBlurNormalizedToPixel,View_GeneralPurposeTweak,View_GeneralPurposeTweak2,View_DemosaicVposOffset,View_DecalDepthBias,View_IndirectLightingColorScale,View_PrecomputedIndirectLightingColorScale,View_PrecomputedIndirectSpecularColorScale,View_AtmosphereLightDirection,View_AtmosphereLightIlluminanceOnGroundPostTransmittance,View_AtmosphereLightIlluminanceOuterSpace,View_AtmosphereLightDiscLuminance,View_AtmosphereLightDiscCosHalfApexAngle_PPTrans,View_SkyViewLutSizeAndInvSize,View_SkyCameraTranslatedWorldOrigin,View_SkyPlanetTranslatedWorldCenterAndViewHeight,View_SkyViewLutReferential,View_SkyAtmosphereSkyLuminanceFactor,View_SkyAtmospherePresentInScene,View_SkyAtmosphereHeightFogContribution,View_SkyAtmosphereBottomRadiusKm,View_SkyAtmosphereTopRadiusKm,View_SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize,View_SkyAtmosphereAerialPerspectiveStartDepthKm,View_SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution,View_SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv,View_SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm,View_SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv,View_SkyAtmosphereApplyCameraAerialPerspectiveVolume,View_NormalCurvatureToRoughnessScaleBias,View_RenderingReflectionCaptureMask,View_RealTimeReflectionCapture,View_RealTimeReflectionCapturePreExposure,View_AmbientCubemapTint,View_AmbientCubemapIntensity,View_SkyLightApplyPrecomputedBentNormalShadowingFlag,View_SkyLightAffectReflectionFlag,View_SkyLightAffectGlobalIlluminationFlag,View_SkyLightColor,View_MobileSkyIrradianceEnvironmentMap,View_MobilePreviewMode,View_HMDEyePaddingOffset,View_ReflectionCubemapMaxMip,View_ShowDecalsMask,View_DistanceFieldAOSpecularOcclusionMode,View_IndirectCapsuleSelfShadowingIntensity,View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight,View_StereoPassIndex,View_GlobalVolumeTranslatedCenterAndExtent,View_GlobalVolumeTranslatedWorldToUVAddAndMul,View_GlobalDistanceFieldMipTranslatedWorldToUVScale,View_GlobalDistanceFieldMipTranslatedWorldToUVBias,View_GlobalDistanceFieldMipFactor,View_GlobalDistanceFieldMipTransition,View_GlobalDistanceFieldClipmapSizeInPages,View_GlobalDistanceFieldInvPageAtlasSize,View_GlobalDistanceFieldInvCoverageAtlasSize,View_GlobalVolumeDimension,View_GlobalVolumeTexelSize,View_MaxGlobalDFAOConeDistance,View_NumGlobalSDFClipmaps,View_CoveredExpandSurfaceScale,View_NotCoveredExpandSurfaceScale,View_NotCoveredMinStepScale,View_DitheredTransparencyStepThreshold,View_DitheredTransparencyTraceThreshold,View_CursorPosition,View_bCheckerboardSubsurfaceProfileRendering,View_VolumetricFogInvGridSize,View_VolumetricFogGridZParams,View_VolumetricFogSVPosToVolumeUV,View_VolumetricFogScreenUVToHistoryVolumeUV,View_VolumetricFogMaxDistance,View_VolumetricLightmapWorldToUVScale,View_VolumetricLightmapWorldToUVAdd,View_VolumetricLightmapIndirectionTextureSize,View_VolumetricLightmapBrickSize,View_VolumetricLightmapBrickTexelSize,View_IndirectLightingCacheShowFlag,View_EyeToPixelSpreadAngle,View_XRPassthroughCameraUVs,View_GlobalVirtualTextureMipBias,View_VirtualTextureFeedbackShift,View_VirtualTextureFeedbackMask,View_VirtualTextureFeedbackStride,View_VirtualTextureFeedbackJitterOffset,View_VirtualTextureFeedbackSampleOffset,View_RuntimeVirtualTextureMipLevel,View_RuntimeVirtualTexturePackHeight,View_RuntimeVirtualTextureDebugParams,View_OverrideLandscapeLOD,View_FarShadowStaticMeshLODBias,View_MinRoughness,View_HairRenderInfo,View_EnableSkyLight,View_HairRenderInfoBits,View_HairComponents,View_bSubsurfacePostprocessEnabled,View_SSProfilesTextureSizeAndInvSize,View_SSProfilesPreIntegratedTextureSizeAndInvSize,View_PhysicsFieldClipmapCenter,View_PhysicsFieldClipmapDistance,View_PhysicsFieldClipmapResolution,View_PhysicsFieldClipmapExponent,View_PhysicsFieldClipmapCount,View_PhysicsFieldTargetCount,View_PhysicsFieldTargets,View_InstanceSceneDataSOAStride,View_GPUSceneViewId,View_ViewResolutionFraction,View_SubSurfaceColorAsTransmittanceAtDistanceInMeters,View_bShadingEnergyConservation,View_bShadingEnergyPreservation,View_RectLightAtlasSizeAndInvSize,View_RectLightAtlasMaxMipLevel,View_IESAtlasSizeAndInvSize,View_TLASRelativePreViewTranslation,View_TLASViewTilePosition,View_MaterialTextureBilinearWrapedSampler,View_MaterialTextureBilinearClampedSampler,View_VolumetricLightmapIndirectionTexture,View_VolumetricLightmapBrickAmbientVector,View_VolumetricLightmapBrickSHCoefficients0,View_VolumetricLightmapBrickSHCoefficients1,View_VolumetricLightmapBrickSHCoefficients2,View_VolumetricLightmapBrickSHCoefficients3,View_VolumetricLightmapBrickSHCoefficients4,View_VolumetricLightmapBrickSHCoefficients5,View_SkyBentNormalBrickTexture,View_DirectionalLightShadowingBrickTexture,View_VolumetricLightmapBrickAmbientVectorSampler,View_VolumetricLightmapTextureSampler0,View_VolumetricLightmapTextureSampler1,View_VolumetricLightmapTextureSampler2,View_VolumetricLightmapTextureSampler3,View_VolumetricLightmapTextureSampler4,View_VolumetricLightmapTextureSampler5,View_SkyBentNormalTextureSampler,View_DirectionalLightShadowingTextureSampler,View_GlobalDistanceFieldPageAtlasTexture,View_GlobalDistanceFieldCoverageAtlasTexture,View_GlobalDistanceFieldPageTableTexture,View_GlobalDistanceFieldMipTexture,View_AtmosphereTransmittanceTexture,View_AtmosphereTransmittanceTextureSampler,View_AtmosphereIrradianceTexture,View_AtmosphereIrradianceTextureSampler,View_AtmosphereInscatterTexture,View_AtmosphereInscatterTextureSampler,View_PerlinNoiseGradientTexture,View_PerlinNoiseGradientTextureSampler,View_PerlinNoise3DTexture,View_PerlinNoise3DTextureSampler,View_SobolSamplingTexture,View_SharedPointWrappedSampler,View_SharedPointClampedSampler,View_SharedBilinearWrappedSampler,View_SharedBilinearClampedSampler,View_SharedBilinearAnisoClampedSampler,View_SharedTrilinearWrappedSampler,View_SharedTrilinearClampedSampler,View_PreIntegratedBRDF,View_PreIntegratedBRDFSampler,View_PrimitiveSceneData,View_InstanceSceneData,View_InstancePayloadData,View_LightmapSceneData,View_SkyIrradianceEnvironmentMap,View_TransmittanceLutTexture,View_TransmittanceLutTextureSampler,View_SkyViewLutTexture,View_SkyViewLutTextureSampler,View_DistantSkyLightLutTexture,View_DistantSkyLightLutTextureSampler,View_CameraAerialPerspectiveVolume,View_CameraAerialPerspectiveVolumeSampler,View_CameraAerialPerspectiveVolumeMieOnly,View_CameraAerialPerspectiveVolumeMieOnlySampler,View_CameraAerialPerspectiveVolumeRayOnly,View_CameraAerialPerspectiveVolumeRayOnlySampler,View_HairScatteringLUTTexture,View_HairScatteringLUTSampler,View_LTCMatTexture,View_LTCMatSampler,View_LTCAmpTexture,View_LTCAmpSampler,View_ShadingEnergyGGXSpecTexture,View_ShadingEnergyGGXGlassTexture,View_ShadingEnergyClothSpecTexture,View_ShadingEnergyDiffuseTexture,View_ShadingEnergySampler,View_SSProfilesTexture,View_SSProfilesSampler,View_SSProfilesTransmissionSampler,View_SSProfilesPreIntegratedTexture,View_SSProfilesPreIntegratedSampler,View_WaterIndirection,View_WaterData,View_RectLightAtlasTexture,View_RectLightAtlasSampler,View_IESAtlasTexture,View_IESAtlasSampler,View_LandscapeWeightmapSampler,View_LandscapeIndirection,View_LandscapePerComponentData,View_VTFeedbackBuffer,View_EditorVisualizeLevelInstanceIds,View_EditorSelectedHitProxyIds,View_PhysicsFieldClipmapBuffer,};

#line   1 "/Engine/Generated/GeneratedUniformBuffers.ush"

#line   2 "/Engine/Generated/UniformBuffers/Strata.ush"

cbuffer  UniformBufferConstants_Strata 
{
	 uint  Strata_MaxBytesPerPixel;
	 uint  Strata_bRoughDiffuse;
	 uint  Strata_PeelLayersAboveDepth;
	 uint  Strata_bRoughnessTracking;
	 int  Strata_SliceStoringDebugStrataTreeData;
	 int  Strata_FirstSliceStoringStrataSSSData;
	 uint  Strata_TileSize;
	 uint  Strata_TileSizeLog2;
	 int2  Strata_TileCount;
	 int2  Strata_TileOffset;
	 int2  Strata_OverflowTileCount;
	 int2  Strata_OverflowTileOffset;
	 uint BindlessResource_Strata_MaterialTextureArray ;
	 uint  PrePadding_Strata_68;
	 uint BindlessResource_Strata_TopLayerTexture ;
	 uint  PrePadding_Strata_76;
	 uint BindlessResource_Strata_OpaqueRoughRefractionTexture ;
	 uint  PrePadding_Strata_84;
	 uint BindlessResource_Strata_BSDFOffsetTexture ;
	 uint  PrePadding_Strata_92;
	 uint BindlessResource_Strata_BSDFTileTexture ;
	 uint  PrePadding_Strata_100;
	 uint BindlessResource_Strata_BSDFTileCountBuffer ;
}
  Texture2DArray<uint>  Strata_MaterialTextureArray ;
  Texture2D<uint2>  Strata_TopLayerTexture ;
  Texture2D<float3>  Strata_OpaqueRoughRefractionTexture ;
  Texture2D<uint>  Strata_BSDFOffsetTexture ;
  Texture2D<uint>  Strata_BSDFTileTexture ;
  Buffer<uint>  Strata_BSDFTileCountBuffer ;
static const struct
{
	 uint  MaxBytesPerPixel;
	 uint  bRoughDiffuse;
	 uint  PeelLayersAboveDepth;
	 uint  bRoughnessTracking;
	 int  SliceStoringDebugStrataTreeData;
	 int  FirstSliceStoringStrataSSSData;
	 uint  TileSize;
	 uint  TileSizeLog2;
	 int2  TileCount;
	 int2  TileOffset;
	 int2  OverflowTileCount;
	 int2  OverflowTileOffset;
	Texture2DArray<uint> MaterialTextureArray;
	Texture2D<uint2> TopLayerTexture;
	Texture2D<float3> OpaqueRoughRefractionTexture;
	Texture2D<uint> BSDFOffsetTexture;
	Texture2D<uint> BSDFTileTexture;
	Buffer<uint> BSDFTileCountBuffer;
} Strata = {Strata_MaxBytesPerPixel,Strata_bRoughDiffuse,Strata_PeelLayersAboveDepth,Strata_bRoughnessTracking,Strata_SliceStoringDebugStrataTreeData,Strata_FirstSliceStoringStrataSSSData,Strata_TileSize,Strata_TileSizeLog2,Strata_TileCount,Strata_TileOffset,Strata_OverflowTileCount,Strata_OverflowTileOffset,Strata_MaterialTextureArray,Strata_TopLayerTexture,Strata_OpaqueRoughRefractionTexture,Strata_BSDFOffsetTexture,Strata_BSDFTileTexture,Strata_BSDFTileCountBuffer,};

#line   2 "/Engine/Generated/GeneratedUniformBuffers.ush"

#line   2 "/Engine/Generated/UniformBuffers/DrawRectangleParameters.ush"

cbuffer  UniformBufferConstants_DrawRectangleParameters 
{
	 float4  DrawRectangleParameters_PosScaleBias;
	 float4  DrawRectangleParameters_UVScaleBias;
	 float4  DrawRectangleParameters_InvTargetSizeAndTextureSize;
}
static const struct
{
	 float4  PosScaleBias;
	 float4  UVScaleBias;
	 float4  InvTargetSizeAndTextureSize;
} DrawRectangleParameters = {DrawRectangleParameters_PosScaleBias,DrawRectangleParameters_UVScaleBias,DrawRectangleParameters_InvTargetSizeAndTextureSize,};

#line   3 "/Engine/Generated/GeneratedUniformBuffers.ush"

#line   2 "/Engine/Generated/UniformBuffers/InstancedView.ush"

cbuffer  UniformBufferConstants_InstancedView 
{
	 float4x4  InstancedView_TranslatedWorldToClip[2];
	 float4x4  InstancedView_TranslatedWorldToSubpixelClip[2];
	 float4x4  InstancedView_RelativeWorldToClip[2];
	 float4x4  InstancedView_ClipToRelativeWorld[2];
	 float4x4  InstancedView_TranslatedWorldToView[2];
	 float4x4  InstancedView_ViewToTranslatedWorld[2];
	 float4x4  InstancedView_TranslatedWorldToCameraView[2];
	 float4x4  InstancedView_CameraViewToTranslatedWorld[2];
	 float4x4  InstancedView_ViewToClip[2];
	 float4x4  InstancedView_ViewToClipNoAA[2];
	 float4x4  InstancedView_ClipToView[2];
	 float4x4  InstancedView_ClipToTranslatedWorld[2];
	 float4x4  InstancedView_SVPositionToTranslatedWorld[2];
	 float4x4  InstancedView_ScreenToRelativeWorld[2];
	 float4x4  InstancedView_ScreenToTranslatedWorld[2];
	 float4x4  InstancedView_MobileMultiviewShadowTransform[2];
	 float3  InstancedView_ViewTilePosition;
	 float  PrePadding_InstancedView_2060;
	 float3  InstancedView_MatrixTilePosition;
	 float  PrePadding_InstancedView_2076;
	 float3  InstancedView_ViewForward;
	 float  PrePadding_InstancedView_2092;
	 float3  InstancedView_ViewUp;
	 float  PrePadding_InstancedView_2108;
	 float3  InstancedView_ViewRight;
	 float  PrePadding_InstancedView_2124;
	 float4  InstancedView_HMDViewNoRollUp[2];
	 float4  InstancedView_HMDViewNoRollRight[2];
	 float4  InstancedView_InvDeviceZToWorldZTransform[2];
	 float4  InstancedView_ScreenPositionScaleBias[2];
	 float4  InstancedView_RelativeWorldCameraOrigin[2];
	 float4  InstancedView_TranslatedWorldCameraOrigin[2];
	 float4  InstancedView_RelativeWorldViewOrigin[2];
	 float4  InstancedView_RelativePreViewTranslation[2];
	 float4x4  InstancedView_PrevViewToClip[2];
	 float4x4  InstancedView_PrevClipToView[2];
	 float4x4  InstancedView_PrevTranslatedWorldToClip[2];
	 float4x4  InstancedView_PrevTranslatedWorldToView[2];
	 float4x4  InstancedView_PrevViewToTranslatedWorld[2];
	 float4x4  InstancedView_PrevTranslatedWorldToCameraView[2];
	 float4x4  InstancedView_PrevCameraViewToTranslatedWorld[2];
	 float4  InstancedView_PrevTranslatedWorldCameraOrigin[2];
	 float4  InstancedView_PrevRelativeWorldCameraOrigin[2];
	 float4  InstancedView_PrevRelativeWorldViewOrigin[2];
	 float4  InstancedView_RelativePrevPreViewTranslation[2];
	 float4x4  InstancedView_PrevClipToRelativeWorld[2];
	 float4x4  InstancedView_PrevScreenToTranslatedWorld[2];
	 float4x4  InstancedView_ClipToPrevClip[2];
	 float4x4  InstancedView_ClipToPrevClipWithAA[2];
	 float4  InstancedView_TemporalAAJitter[2];
	 float4  InstancedView_GlobalClippingPlane[2];
	 float4  InstancedView_FieldOfViewWideAngles[2];
	 float4  InstancedView_PrevFieldOfViewWideAngles[2];
	 float4  InstancedView_ViewRectMin[2];
	 float4  InstancedView_ViewSizeAndInvSize;
	 uint4  InstancedView_ViewRectMinAndSize;
	 float4  InstancedView_LightProbeSizeRatioAndInvSizeRatio;
	 float4  InstancedView_BufferSizeAndInvSize;
	 float4  InstancedView_BufferBilinearUVMinMax[2];
	 float4  InstancedView_ScreenToViewSpace[2];
	 float4  InstancedView_BufferToSceneTextureScale[2];
	 float2  InstancedView_ResolutionFractionAndInv;
	 int  InstancedView_NumSceneColorMSAASamples;
	 float  InstancedView_PreExposure;
	 float  InstancedView_OneOverPreExposure;
	 float  PrePadding_InstancedView_4260;
	 float  PrePadding_InstancedView_4264;
	 float  PrePadding_InstancedView_4268;
	 float4  InstancedView_DiffuseOverrideParameter;
	 float4  InstancedView_SpecularOverrideParameter;
	 float4  InstancedView_NormalOverrideParameter;
	 float2  InstancedView_RoughnessOverrideParameter;
	 float  InstancedView_PrevFrameGameTime;
	 float  InstancedView_PrevFrameRealTime;
	 float  InstancedView_OutOfBoundsMask;
	 float  PrePadding_InstancedView_4340;
	 float  PrePadding_InstancedView_4344;
	 float  PrePadding_InstancedView_4348;
	 float4  InstancedView_WorldCameraMovementSinceLastFrame[2];
	 float  InstancedView_CullingSign;
	 float  PrePadding_InstancedView_4388;
	 float  PrePadding_InstancedView_4392;
	 float  PrePadding_InstancedView_4396;
	 float4  InstancedView_NearPlane[2];
	 float  InstancedView_GameTime;
	 float  InstancedView_RealTime;
	 float  InstancedView_DeltaTime;
	 float  InstancedView_MaterialTextureMipBias;
	 float  InstancedView_MaterialTextureDerivativeMultiply;
	 uint  InstancedView_Random;
	 uint  InstancedView_FrameNumber;
	 uint  InstancedView_StateFrameIndexMod8;
	 uint  InstancedView_StateFrameIndex;
	 uint  InstancedView_DebugViewModeMask;
	 uint  InstancedView_WorldIsPaused;
	 float  InstancedView_CameraCut;
	 float  InstancedView_UnlitViewmodeMask;
	 float  PrePadding_InstancedView_4484;
	 float  PrePadding_InstancedView_4488;
	 float  PrePadding_InstancedView_4492;
	 float4  InstancedView_DirectionalLightColor;
	 float3  InstancedView_DirectionalLightDirection;
	 float  PrePadding_InstancedView_4524;
	 float4  InstancedView_TranslucencyLightingVolumeMin[2];
	 float4  InstancedView_TranslucencyLightingVolumeInvSize[2];
	 float4  InstancedView_TemporalAAParams;
	 float4  InstancedView_CircleDOFParams;
	 float  InstancedView_DepthOfFieldSensorWidth;
	 float  InstancedView_DepthOfFieldFocalDistance;
	 float  InstancedView_DepthOfFieldScale;
	 float  InstancedView_DepthOfFieldFocalLength;
	 float  InstancedView_DepthOfFieldFocalRegion;
	 float  InstancedView_DepthOfFieldNearTransitionRegion;
	 float  InstancedView_DepthOfFieldFarTransitionRegion;
	 float  InstancedView_MotionBlurNormalizedToPixel;
	 float  InstancedView_GeneralPurposeTweak;
	 float  InstancedView_GeneralPurposeTweak2;
	 float  InstancedView_DemosaicVposOffset;
	 float  InstancedView_DecalDepthBias;
	 float3  InstancedView_IndirectLightingColorScale;
	 float  PrePadding_InstancedView_4684;
	 float3  InstancedView_PrecomputedIndirectLightingColorScale;
	 float  PrePadding_InstancedView_4700;
	 float3  InstancedView_PrecomputedIndirectSpecularColorScale;
	 float  PrePadding_InstancedView_4716;
	 float4  InstancedView_AtmosphereLightDirection[2];
	 float4  InstancedView_AtmosphereLightIlluminanceOnGroundPostTransmittance[2];
	 float4  InstancedView_AtmosphereLightIlluminanceOuterSpace[2];
	 float4  InstancedView_AtmosphereLightDiscLuminance[2];
	 float4  InstancedView_AtmosphereLightDiscCosHalfApexAngle_PPTrans[2];
	 float4  InstancedView_SkyViewLutSizeAndInvSize;
	 float3  InstancedView_SkyCameraTranslatedWorldOrigin;
	 float  PrePadding_InstancedView_4908;
	 float4  InstancedView_SkyPlanetTranslatedWorldCenterAndViewHeight;
	 float4x4  InstancedView_SkyViewLutReferential;
	 float4  InstancedView_SkyAtmosphereSkyLuminanceFactor;
	 float  InstancedView_SkyAtmospherePresentInScene;
	 float  InstancedView_SkyAtmosphereHeightFogContribution;
	 float  InstancedView_SkyAtmosphereBottomRadiusKm;
	 float  InstancedView_SkyAtmosphereTopRadiusKm;
	 float4  InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize;
	 float  InstancedView_SkyAtmosphereAerialPerspectiveStartDepthKm;
	 float  InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution;
	 float  InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv;
	 float  InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm;
	 float  InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv;
	 float  InstancedView_SkyAtmosphereApplyCameraAerialPerspectiveVolume;
	 float  PrePadding_InstancedView_5064;
	 float  PrePadding_InstancedView_5068;
	 float3  InstancedView_NormalCurvatureToRoughnessScaleBias;
	 float  InstancedView_RenderingReflectionCaptureMask;
	 float  InstancedView_RealTimeReflectionCapture;
	 float  InstancedView_RealTimeReflectionCapturePreExposure;
	 float  PrePadding_InstancedView_5096;
	 float  PrePadding_InstancedView_5100;
	 float4  InstancedView_AmbientCubemapTint;
	 float  InstancedView_AmbientCubemapIntensity;
	 float  InstancedView_SkyLightApplyPrecomputedBentNormalShadowingFlag;
	 float  InstancedView_SkyLightAffectReflectionFlag;
	 float  InstancedView_SkyLightAffectGlobalIlluminationFlag;
	 float4  InstancedView_SkyLightColor;
	 float4  InstancedView_MobileSkyIrradianceEnvironmentMap[8];
	 float  InstancedView_MobilePreviewMode;
	 float  PrePadding_InstancedView_5284;
	 float  PrePadding_InstancedView_5288;
	 float  PrePadding_InstancedView_5292;
	 float4  InstancedView_HMDEyePaddingOffset[2];
	 float  InstancedView_ReflectionCubemapMaxMip;
	 float  InstancedView_ShowDecalsMask;
	 uint  InstancedView_DistanceFieldAOSpecularOcclusionMode;
	 float  InstancedView_IndirectCapsuleSelfShadowingIntensity;
	 float3  InstancedView_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
	 float  PrePadding_InstancedView_5356;
	 int4  InstancedView_StereoPassIndex[2];
	 float4  InstancedView_GlobalVolumeTranslatedCenterAndExtent[6];
	 float4  InstancedView_GlobalVolumeTranslatedWorldToUVAddAndMul[6];
	 float4  InstancedView_GlobalDistanceFieldMipTranslatedWorldToUVScale[6];
	 float4  InstancedView_GlobalDistanceFieldMipTranslatedWorldToUVBias[6];
	 float  InstancedView_GlobalDistanceFieldMipFactor;
	 float  InstancedView_GlobalDistanceFieldMipTransition;
	 int  InstancedView_GlobalDistanceFieldClipmapSizeInPages;
	 int  PrePadding_InstancedView_5788;
	 float3  InstancedView_GlobalDistanceFieldInvPageAtlasSize;
	 float  PrePadding_InstancedView_5804;
	 float3  InstancedView_GlobalDistanceFieldInvCoverageAtlasSize;
	 float  InstancedView_GlobalVolumeDimension;
	 float  InstancedView_GlobalVolumeTexelSize;
	 float  InstancedView_MaxGlobalDFAOConeDistance;
	 uint  InstancedView_NumGlobalSDFClipmaps;
	 float  InstancedView_CoveredExpandSurfaceScale;
	 float  InstancedView_NotCoveredExpandSurfaceScale;
	 float  InstancedView_NotCoveredMinStepScale;
	 float  InstancedView_DitheredTransparencyStepThreshold;
	 float  InstancedView_DitheredTransparencyTraceThreshold;
	 int2  InstancedView_CursorPosition;
	 float  InstancedView_bCheckerboardSubsurfaceProfileRendering;
	 float  PrePadding_InstancedView_5868;
	 float3  InstancedView_VolumetricFogInvGridSize;
	 float  PrePadding_InstancedView_5884;
	 float3  InstancedView_VolumetricFogGridZParams;
	 float  PrePadding_InstancedView_5900;
	 float2  InstancedView_VolumetricFogSVPosToVolumeUV;
	 float2  InstancedView_VolumetricFogScreenUVToHistoryVolumeUV;
	 float  InstancedView_VolumetricFogMaxDistance;
	 float  PrePadding_InstancedView_5924;
	 float  PrePadding_InstancedView_5928;
	 float  PrePadding_InstancedView_5932;
	 float3  InstancedView_VolumetricLightmapWorldToUVScale;
	 float  PrePadding_InstancedView_5948;
	 float3  InstancedView_VolumetricLightmapWorldToUVAdd;
	 float  PrePadding_InstancedView_5964;
	 float3  InstancedView_VolumetricLightmapIndirectionTextureSize;
	 float  InstancedView_VolumetricLightmapBrickSize;
	 float3  InstancedView_VolumetricLightmapBrickTexelSize;
	 float  InstancedView_IndirectLightingCacheShowFlag;
	 float  InstancedView_EyeToPixelSpreadAngle;
	 float  PrePadding_InstancedView_6004;
	 float  PrePadding_InstancedView_6008;
	 float  PrePadding_InstancedView_6012;
	 float4  InstancedView_XRPassthroughCameraUVs[2];
	 float  InstancedView_GlobalVirtualTextureMipBias;
	 uint  InstancedView_VirtualTextureFeedbackShift;
	 uint  InstancedView_VirtualTextureFeedbackMask;
	 uint  InstancedView_VirtualTextureFeedbackStride;
	 uint  InstancedView_VirtualTextureFeedbackJitterOffset;
	 uint  InstancedView_VirtualTextureFeedbackSampleOffset;
	 uint  PrePadding_InstancedView_6072;
	 uint  PrePadding_InstancedView_6076;
	 float4  InstancedView_RuntimeVirtualTextureMipLevel;
	 float2  InstancedView_RuntimeVirtualTexturePackHeight;
	 float  PrePadding_InstancedView_6104;
	 float  PrePadding_InstancedView_6108;
	 float4  InstancedView_RuntimeVirtualTextureDebugParams;
	 float  InstancedView_OverrideLandscapeLOD;
	 int  InstancedView_FarShadowStaticMeshLODBias;
	 float  InstancedView_MinRoughness;
	 float  PrePadding_InstancedView_6140;
	 float4  InstancedView_HairRenderInfo;
	 uint  InstancedView_EnableSkyLight;
	 uint  InstancedView_HairRenderInfoBits;
	 uint  InstancedView_HairComponents;
	 float  InstancedView_bSubsurfacePostprocessEnabled;
	 float4  InstancedView_SSProfilesTextureSizeAndInvSize;
	 float4  InstancedView_SSProfilesPreIntegratedTextureSizeAndInvSize;
	 float3  InstancedView_PhysicsFieldClipmapCenter;
	 float  InstancedView_PhysicsFieldClipmapDistance;
	 int  InstancedView_PhysicsFieldClipmapResolution;
	 int  InstancedView_PhysicsFieldClipmapExponent;
	 int  InstancedView_PhysicsFieldClipmapCount;
	 int  InstancedView_PhysicsFieldTargetCount;
	 int4  InstancedView_PhysicsFieldTargets[32];
	 uint  InstancedView_InstanceSceneDataSOAStride;
	 uint  PrePadding_InstancedView_6756;
	 uint  PrePadding_InstancedView_6760;
	 uint  PrePadding_InstancedView_6764;
	 uint4  InstancedView_GPUSceneViewId[2];
	 float  InstancedView_ViewResolutionFraction;
	 float  InstancedView_SubSurfaceColorAsTransmittanceAtDistanceInMeters;
}
static const struct
{
	 float4x4  TranslatedWorldToClip[2];
	 float4x4  TranslatedWorldToSubpixelClip[2];
	 float4x4  RelativeWorldToClip[2];
	 float4x4  ClipToRelativeWorld[2];
	 float4x4  TranslatedWorldToView[2];
	 float4x4  ViewToTranslatedWorld[2];
	 float4x4  TranslatedWorldToCameraView[2];
	 float4x4  CameraViewToTranslatedWorld[2];
	 float4x4  ViewToClip[2];
	 float4x4  ViewToClipNoAA[2];
	 float4x4  ClipToView[2];
	 float4x4  ClipToTranslatedWorld[2];
	 float4x4  SVPositionToTranslatedWorld[2];
	 float4x4  ScreenToRelativeWorld[2];
	 float4x4  ScreenToTranslatedWorld[2];
	 float4x4  MobileMultiviewShadowTransform[2];
	 float3  ViewTilePosition;
	 float3  MatrixTilePosition;
	 float3  ViewForward;
	 float3  ViewUp;
	 float3  ViewRight;
	 float4  HMDViewNoRollUp[2];
	 float4  HMDViewNoRollRight[2];
	 float4  InvDeviceZToWorldZTransform[2];
	 float4  ScreenPositionScaleBias[2];
	 float4  RelativeWorldCameraOrigin[2];
	 float4  TranslatedWorldCameraOrigin[2];
	 float4  RelativeWorldViewOrigin[2];
	 float4  RelativePreViewTranslation[2];
	 float4x4  PrevViewToClip[2];
	 float4x4  PrevClipToView[2];
	 float4x4  PrevTranslatedWorldToClip[2];
	 float4x4  PrevTranslatedWorldToView[2];
	 float4x4  PrevViewToTranslatedWorld[2];
	 float4x4  PrevTranslatedWorldToCameraView[2];
	 float4x4  PrevCameraViewToTranslatedWorld[2];
	 float4  PrevTranslatedWorldCameraOrigin[2];
	 float4  PrevRelativeWorldCameraOrigin[2];
	 float4  PrevRelativeWorldViewOrigin[2];
	 float4  RelativePrevPreViewTranslation[2];
	 float4x4  PrevClipToRelativeWorld[2];
	 float4x4  PrevScreenToTranslatedWorld[2];
	 float4x4  ClipToPrevClip[2];
	 float4x4  ClipToPrevClipWithAA[2];
	 float4  TemporalAAJitter[2];
	 float4  GlobalClippingPlane[2];
	 float4  FieldOfViewWideAngles[2];
	 float4  PrevFieldOfViewWideAngles[2];
	 float4  ViewRectMin[2];
	 float4  ViewSizeAndInvSize;
	 uint4  ViewRectMinAndSize;
	 float4  LightProbeSizeRatioAndInvSizeRatio;
	 float4  BufferSizeAndInvSize;
	 float4  BufferBilinearUVMinMax[2];
	 float4  ScreenToViewSpace[2];
	 float4  BufferToSceneTextureScale[2];
	 float2  ResolutionFractionAndInv;
	 int  NumSceneColorMSAASamples;
	 float  PreExposure;
	 float  OneOverPreExposure;
	 float4  DiffuseOverrideParameter;
	 float4  SpecularOverrideParameter;
	 float4  NormalOverrideParameter;
	 float2  RoughnessOverrideParameter;
	 float  PrevFrameGameTime;
	 float  PrevFrameRealTime;
	 float  OutOfBoundsMask;
	 float4  WorldCameraMovementSinceLastFrame[2];
	 float  CullingSign;
	 float4  NearPlane[2];
	 float  GameTime;
	 float  RealTime;
	 float  DeltaTime;
	 float  MaterialTextureMipBias;
	 float  MaterialTextureDerivativeMultiply;
	 uint  Random;
	 uint  FrameNumber;
	 uint  StateFrameIndexMod8;
	 uint  StateFrameIndex;
	 uint  DebugViewModeMask;
	 uint  WorldIsPaused;
	 float  CameraCut;
	 float  UnlitViewmodeMask;
	 float4  DirectionalLightColor;
	 float3  DirectionalLightDirection;
	 float4  TranslucencyLightingVolumeMin[2];
	 float4  TranslucencyLightingVolumeInvSize[2];
	 float4  TemporalAAParams;
	 float4  CircleDOFParams;
	 float  DepthOfFieldSensorWidth;
	 float  DepthOfFieldFocalDistance;
	 float  DepthOfFieldScale;
	 float  DepthOfFieldFocalLength;
	 float  DepthOfFieldFocalRegion;
	 float  DepthOfFieldNearTransitionRegion;
	 float  DepthOfFieldFarTransitionRegion;
	 float  MotionBlurNormalizedToPixel;
	 float  GeneralPurposeTweak;
	 float  GeneralPurposeTweak2;
	 float  DemosaicVposOffset;
	 float  DecalDepthBias;
	 float3  IndirectLightingColorScale;
	 float3  PrecomputedIndirectLightingColorScale;
	 float3  PrecomputedIndirectSpecularColorScale;
	 float4  AtmosphereLightDirection[2];
	 float4  AtmosphereLightIlluminanceOnGroundPostTransmittance[2];
	 float4  AtmosphereLightIlluminanceOuterSpace[2];
	 float4  AtmosphereLightDiscLuminance[2];
	 float4  AtmosphereLightDiscCosHalfApexAngle_PPTrans[2];
	 float4  SkyViewLutSizeAndInvSize;
	 float3  SkyCameraTranslatedWorldOrigin;
	 float4  SkyPlanetTranslatedWorldCenterAndViewHeight;
	 float4x4  SkyViewLutReferential;
	 float4  SkyAtmosphereSkyLuminanceFactor;
	 float  SkyAtmospherePresentInScene;
	 float  SkyAtmosphereHeightFogContribution;
	 float  SkyAtmosphereBottomRadiusKm;
	 float  SkyAtmosphereTopRadiusKm;
	 float4  SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize;
	 float  SkyAtmosphereAerialPerspectiveStartDepthKm;
	 float  SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution;
	 float  SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv;
	 float  SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm;
	 float  SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv;
	 float  SkyAtmosphereApplyCameraAerialPerspectiveVolume;
	 float3  NormalCurvatureToRoughnessScaleBias;
	 float  RenderingReflectionCaptureMask;
	 float  RealTimeReflectionCapture;
	 float  RealTimeReflectionCapturePreExposure;
	 float4  AmbientCubemapTint;
	 float  AmbientCubemapIntensity;
	 float  SkyLightApplyPrecomputedBentNormalShadowingFlag;
	 float  SkyLightAffectReflectionFlag;
	 float  SkyLightAffectGlobalIlluminationFlag;
	 float4  SkyLightColor;
	 float4  MobileSkyIrradianceEnvironmentMap[8];
	 float  MobilePreviewMode;
	 float4  HMDEyePaddingOffset[2];
	 float  ReflectionCubemapMaxMip;
	 float  ShowDecalsMask;
	 uint  DistanceFieldAOSpecularOcclusionMode;
	 float  IndirectCapsuleSelfShadowingIntensity;
	 float3  ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
	 int4  StereoPassIndex[2];
	 float4  GlobalVolumeTranslatedCenterAndExtent[6];
	 float4  GlobalVolumeTranslatedWorldToUVAddAndMul[6];
	 float4  GlobalDistanceFieldMipTranslatedWorldToUVScale[6];
	 float4  GlobalDistanceFieldMipTranslatedWorldToUVBias[6];
	 float  GlobalDistanceFieldMipFactor;
	 float  GlobalDistanceFieldMipTransition;
	 int  GlobalDistanceFieldClipmapSizeInPages;
	 float3  GlobalDistanceFieldInvPageAtlasSize;
	 float3  GlobalDistanceFieldInvCoverageAtlasSize;
	 float  GlobalVolumeDimension;
	 float  GlobalVolumeTexelSize;
	 float  MaxGlobalDFAOConeDistance;
	 uint  NumGlobalSDFClipmaps;
	 float  CoveredExpandSurfaceScale;
	 float  NotCoveredExpandSurfaceScale;
	 float  NotCoveredMinStepScale;
	 float  DitheredTransparencyStepThreshold;
	 float  DitheredTransparencyTraceThreshold;
	 int2  CursorPosition;
	 float  bCheckerboardSubsurfaceProfileRendering;
	 float3  VolumetricFogInvGridSize;
	 float3  VolumetricFogGridZParams;
	 float2  VolumetricFogSVPosToVolumeUV;
	 float2  VolumetricFogScreenUVToHistoryVolumeUV;
	 float  VolumetricFogMaxDistance;
	 float3  VolumetricLightmapWorldToUVScale;
	 float3  VolumetricLightmapWorldToUVAdd;
	 float3  VolumetricLightmapIndirectionTextureSize;
	 float  VolumetricLightmapBrickSize;
	 float3  VolumetricLightmapBrickTexelSize;
	 float  IndirectLightingCacheShowFlag;
	 float  EyeToPixelSpreadAngle;
	 float4  XRPassthroughCameraUVs[2];
	 float  GlobalVirtualTextureMipBias;
	 uint  VirtualTextureFeedbackShift;
	 uint  VirtualTextureFeedbackMask;
	 uint  VirtualTextureFeedbackStride;
	 uint  VirtualTextureFeedbackJitterOffset;
	 uint  VirtualTextureFeedbackSampleOffset;
	 float4  RuntimeVirtualTextureMipLevel;
	 float2  RuntimeVirtualTexturePackHeight;
	 float4  RuntimeVirtualTextureDebugParams;
	 float  OverrideLandscapeLOD;
	 int  FarShadowStaticMeshLODBias;
	 float  MinRoughness;
	 float4  HairRenderInfo;
	 uint  EnableSkyLight;
	 uint  HairRenderInfoBits;
	 uint  HairComponents;
	 float  bSubsurfacePostprocessEnabled;
	 float4  SSProfilesTextureSizeAndInvSize;
	 float4  SSProfilesPreIntegratedTextureSizeAndInvSize;
	 float3  PhysicsFieldClipmapCenter;
	 float  PhysicsFieldClipmapDistance;
	 int  PhysicsFieldClipmapResolution;
	 int  PhysicsFieldClipmapExponent;
	 int  PhysicsFieldClipmapCount;
	 int  PhysicsFieldTargetCount;
	 int4  PhysicsFieldTargets[32];
	 uint  InstanceSceneDataSOAStride;
	 uint4  GPUSceneViewId[2];
	 float  ViewResolutionFraction;
	 float  SubSurfaceColorAsTransmittanceAtDistanceInMeters;
} InstancedView = {InstancedView_TranslatedWorldToClip,InstancedView_TranslatedWorldToSubpixelClip,InstancedView_RelativeWorldToClip,InstancedView_ClipToRelativeWorld,InstancedView_TranslatedWorldToView,InstancedView_ViewToTranslatedWorld,InstancedView_TranslatedWorldToCameraView,InstancedView_CameraViewToTranslatedWorld,InstancedView_ViewToClip,InstancedView_ViewToClipNoAA,InstancedView_ClipToView,InstancedView_ClipToTranslatedWorld,InstancedView_SVPositionToTranslatedWorld,InstancedView_ScreenToRelativeWorld,InstancedView_ScreenToTranslatedWorld,InstancedView_MobileMultiviewShadowTransform,InstancedView_ViewTilePosition,InstancedView_MatrixTilePosition,InstancedView_ViewForward,InstancedView_ViewUp,InstancedView_ViewRight,InstancedView_HMDViewNoRollUp,InstancedView_HMDViewNoRollRight,InstancedView_InvDeviceZToWorldZTransform,InstancedView_ScreenPositionScaleBias,InstancedView_RelativeWorldCameraOrigin,InstancedView_TranslatedWorldCameraOrigin,InstancedView_RelativeWorldViewOrigin,InstancedView_RelativePreViewTranslation,InstancedView_PrevViewToClip,InstancedView_PrevClipToView,InstancedView_PrevTranslatedWorldToClip,InstancedView_PrevTranslatedWorldToView,InstancedView_PrevViewToTranslatedWorld,InstancedView_PrevTranslatedWorldToCameraView,InstancedView_PrevCameraViewToTranslatedWorld,InstancedView_PrevTranslatedWorldCameraOrigin,InstancedView_PrevRelativeWorldCameraOrigin,InstancedView_PrevRelativeWorldViewOrigin,InstancedView_RelativePrevPreViewTranslation,InstancedView_PrevClipToRelativeWorld,InstancedView_PrevScreenToTranslatedWorld,InstancedView_ClipToPrevClip,InstancedView_ClipToPrevClipWithAA,InstancedView_TemporalAAJitter,InstancedView_GlobalClippingPlane,InstancedView_FieldOfViewWideAngles,InstancedView_PrevFieldOfViewWideAngles,InstancedView_ViewRectMin,InstancedView_ViewSizeAndInvSize,InstancedView_ViewRectMinAndSize,InstancedView_LightProbeSizeRatioAndInvSizeRatio,InstancedView_BufferSizeAndInvSize,InstancedView_BufferBilinearUVMinMax,InstancedView_ScreenToViewSpace,InstancedView_BufferToSceneTextureScale,InstancedView_ResolutionFractionAndInv,InstancedView_NumSceneColorMSAASamples,InstancedView_PreExposure,InstancedView_OneOverPreExposure,InstancedView_DiffuseOverrideParameter,InstancedView_SpecularOverrideParameter,InstancedView_NormalOverrideParameter,InstancedView_RoughnessOverrideParameter,InstancedView_PrevFrameGameTime,InstancedView_PrevFrameRealTime,InstancedView_OutOfBoundsMask,InstancedView_WorldCameraMovementSinceLastFrame,InstancedView_CullingSign,InstancedView_NearPlane,InstancedView_GameTime,InstancedView_RealTime,InstancedView_DeltaTime,InstancedView_MaterialTextureMipBias,InstancedView_MaterialTextureDerivativeMultiply,InstancedView_Random,InstancedView_FrameNumber,InstancedView_StateFrameIndexMod8,InstancedView_StateFrameIndex,InstancedView_DebugViewModeMask,InstancedView_WorldIsPaused,InstancedView_CameraCut,InstancedView_UnlitViewmodeMask,InstancedView_DirectionalLightColor,InstancedView_DirectionalLightDirection,InstancedView_TranslucencyLightingVolumeMin,InstancedView_TranslucencyLightingVolumeInvSize,InstancedView_TemporalAAParams,InstancedView_CircleDOFParams,InstancedView_DepthOfFieldSensorWidth,InstancedView_DepthOfFieldFocalDistance,InstancedView_DepthOfFieldScale,InstancedView_DepthOfFieldFocalLength,InstancedView_DepthOfFieldFocalRegion,InstancedView_DepthOfFieldNearTransitionRegion,InstancedView_DepthOfFieldFarTransitionRegion,InstancedView_MotionBlurNormalizedToPixel,InstancedView_GeneralPurposeTweak,InstancedView_GeneralPurposeTweak2,InstancedView_DemosaicVposOffset,InstancedView_DecalDepthBias,InstancedView_IndirectLightingColorScale,InstancedView_PrecomputedIndirectLightingColorScale,InstancedView_PrecomputedIndirectSpecularColorScale,InstancedView_AtmosphereLightDirection,InstancedView_AtmosphereLightIlluminanceOnGroundPostTransmittance,InstancedView_AtmosphereLightIlluminanceOuterSpace,InstancedView_AtmosphereLightDiscLuminance,InstancedView_AtmosphereLightDiscCosHalfApexAngle_PPTrans,InstancedView_SkyViewLutSizeAndInvSize,InstancedView_SkyCameraTranslatedWorldOrigin,InstancedView_SkyPlanetTranslatedWorldCenterAndViewHeight,InstancedView_SkyViewLutReferential,InstancedView_SkyAtmosphereSkyLuminanceFactor,InstancedView_SkyAtmospherePresentInScene,InstancedView_SkyAtmosphereHeightFogContribution,InstancedView_SkyAtmosphereBottomRadiusKm,InstancedView_SkyAtmosphereTopRadiusKm,InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize,InstancedView_SkyAtmosphereAerialPerspectiveStartDepthKm,InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution,InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv,InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm,InstancedView_SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv,InstancedView_SkyAtmosphereApplyCameraAerialPerspectiveVolume,InstancedView_NormalCurvatureToRoughnessScaleBias,InstancedView_RenderingReflectionCaptureMask,InstancedView_RealTimeReflectionCapture,InstancedView_RealTimeReflectionCapturePreExposure,InstancedView_AmbientCubemapTint,InstancedView_AmbientCubemapIntensity,InstancedView_SkyLightApplyPrecomputedBentNormalShadowingFlag,InstancedView_SkyLightAffectReflectionFlag,InstancedView_SkyLightAffectGlobalIlluminationFlag,InstancedView_SkyLightColor,InstancedView_MobileSkyIrradianceEnvironmentMap,InstancedView_MobilePreviewMode,InstancedView_HMDEyePaddingOffset,InstancedView_ReflectionCubemapMaxMip,InstancedView_ShowDecalsMask,InstancedView_DistanceFieldAOSpecularOcclusionMode,InstancedView_IndirectCapsuleSelfShadowingIntensity,InstancedView_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight,InstancedView_StereoPassIndex,InstancedView_GlobalVolumeTranslatedCenterAndExtent,InstancedView_GlobalVolumeTranslatedWorldToUVAddAndMul,InstancedView_GlobalDistanceFieldMipTranslatedWorldToUVScale,InstancedView_GlobalDistanceFieldMipTranslatedWorldToUVBias,InstancedView_GlobalDistanceFieldMipFactor,InstancedView_GlobalDistanceFieldMipTransition,InstancedView_GlobalDistanceFieldClipmapSizeInPages,InstancedView_GlobalDistanceFieldInvPageAtlasSize,InstancedView_GlobalDistanceFieldInvCoverageAtlasSize,InstancedView_GlobalVolumeDimension,InstancedView_GlobalVolumeTexelSize,InstancedView_MaxGlobalDFAOConeDistance,InstancedView_NumGlobalSDFClipmaps,InstancedView_CoveredExpandSurfaceScale,InstancedView_NotCoveredExpandSurfaceScale,InstancedView_NotCoveredMinStepScale,InstancedView_DitheredTransparencyStepThreshold,InstancedView_DitheredTransparencyTraceThreshold,InstancedView_CursorPosition,InstancedView_bCheckerboardSubsurfaceProfileRendering,InstancedView_VolumetricFogInvGridSize,InstancedView_VolumetricFogGridZParams,InstancedView_VolumetricFogSVPosToVolumeUV,InstancedView_VolumetricFogScreenUVToHistoryVolumeUV,InstancedView_VolumetricFogMaxDistance,InstancedView_VolumetricLightmapWorldToUVScale,InstancedView_VolumetricLightmapWorldToUVAdd,InstancedView_VolumetricLightmapIndirectionTextureSize,InstancedView_VolumetricLightmapBrickSize,InstancedView_VolumetricLightmapBrickTexelSize,InstancedView_IndirectLightingCacheShowFlag,InstancedView_EyeToPixelSpreadAngle,InstancedView_XRPassthroughCameraUVs,InstancedView_GlobalVirtualTextureMipBias,InstancedView_VirtualTextureFeedbackShift,InstancedView_VirtualTextureFeedbackMask,InstancedView_VirtualTextureFeedbackStride,InstancedView_VirtualTextureFeedbackJitterOffset,InstancedView_VirtualTextureFeedbackSampleOffset,InstancedView_RuntimeVirtualTextureMipLevel,InstancedView_RuntimeVirtualTexturePackHeight,InstancedView_RuntimeVirtualTextureDebugParams,InstancedView_OverrideLandscapeLOD,InstancedView_FarShadowStaticMeshLODBias,InstancedView_MinRoughness,InstancedView_HairRenderInfo,InstancedView_EnableSkyLight,InstancedView_HairRenderInfoBits,InstancedView_HairComponents,InstancedView_bSubsurfacePostprocessEnabled,InstancedView_SSProfilesTextureSizeAndInvSize,InstancedView_SSProfilesPreIntegratedTextureSizeAndInvSize,InstancedView_PhysicsFieldClipmapCenter,InstancedView_PhysicsFieldClipmapDistance,InstancedView_PhysicsFieldClipmapResolution,InstancedView_PhysicsFieldClipmapExponent,InstancedView_PhysicsFieldClipmapCount,InstancedView_PhysicsFieldTargetCount,InstancedView_PhysicsFieldTargets,InstancedView_InstanceSceneDataSOAStride,InstancedView_GPUSceneViewId,InstancedView_ViewResolutionFraction,InstancedView_SubSurfaceColorAsTransmittanceAtDistanceInMeters,};

#line   4 "/Engine/Generated/GeneratedUniformBuffers.ush"

#line   2 "/Engine/Generated/UniformBuffers/MobileSceneTextures.ush"

cbuffer  UniformBufferConstants_MobileSceneTextures 
{
	 uint BindlessResource_MobileSceneTextures_SceneColorTexture ;
	 uint  PrePadding_MobileSceneTextures_4;
	 uint BindlessSampler_MobileSceneTextures_SceneColorTextureSampler ;
	 uint  PrePadding_MobileSceneTextures_12;
	 uint BindlessResource_MobileSceneTextures_SceneDepthTexture ;
	 uint  PrePadding_MobileSceneTextures_20;
	 uint BindlessSampler_MobileSceneTextures_SceneDepthTextureSampler ;
	 uint  PrePadding_MobileSceneTextures_28;
	 uint BindlessResource_MobileSceneTextures_CustomDepthTexture ;
	 uint  PrePadding_MobileSceneTextures_36;
	 uint BindlessSampler_MobileSceneTextures_CustomDepthTextureSampler ;
	 uint  PrePadding_MobileSceneTextures_44;
	 uint BindlessResource_MobileSceneTextures_CustomStencilTexture ;
	 uint  PrePadding_MobileSceneTextures_52;
	 uint BindlessResource_MobileSceneTextures_SceneVelocityTexture ;
	 uint  PrePadding_MobileSceneTextures_60;
	 uint BindlessSampler_MobileSceneTextures_SceneVelocityTextureSampler ;
	 uint  PrePadding_MobileSceneTextures_68;
	 uint BindlessResource_MobileSceneTextures_GBufferATexture ;
	 uint  PrePadding_MobileSceneTextures_76;
	 uint BindlessResource_MobileSceneTextures_GBufferBTexture ;
	 uint  PrePadding_MobileSceneTextures_84;
	 uint BindlessResource_MobileSceneTextures_GBufferCTexture ;
	 uint  PrePadding_MobileSceneTextures_92;
	 uint BindlessResource_MobileSceneTextures_GBufferDTexture ;
	 uint  PrePadding_MobileSceneTextures_100;
	 uint BindlessResource_MobileSceneTextures_SceneDepthAuxTexture ;
	 uint  PrePadding_MobileSceneTextures_108;
	 uint BindlessSampler_MobileSceneTextures_GBufferATextureSampler ;
	 uint  PrePadding_MobileSceneTextures_116;
	 uint BindlessSampler_MobileSceneTextures_GBufferBTextureSampler ;
	 uint  PrePadding_MobileSceneTextures_124;
	 uint BindlessSampler_MobileSceneTextures_GBufferCTextureSampler ;
	 uint  PrePadding_MobileSceneTextures_132;
	 uint BindlessSampler_MobileSceneTextures_GBufferDTextureSampler ;
	 uint  PrePadding_MobileSceneTextures_140;
	 uint BindlessSampler_MobileSceneTextures_SceneDepthAuxTextureSampler ;
}
  Texture2D  MobileSceneTextures_SceneColorTexture ;
  SamplerState  MobileSceneTextures_SceneColorTextureSampler ;
  Texture2D  MobileSceneTextures_SceneDepthTexture ;
  SamplerState  MobileSceneTextures_SceneDepthTextureSampler ;
  Texture2D  MobileSceneTextures_CustomDepthTexture ;
  SamplerState  MobileSceneTextures_CustomDepthTextureSampler ;
  Texture2D<uint2>  MobileSceneTextures_CustomStencilTexture ;
  Texture2D  MobileSceneTextures_SceneVelocityTexture ;
  SamplerState  MobileSceneTextures_SceneVelocityTextureSampler ;
  Texture2D  MobileSceneTextures_GBufferATexture ;
  Texture2D  MobileSceneTextures_GBufferBTexture ;
  Texture2D  MobileSceneTextures_GBufferCTexture ;
  Texture2D  MobileSceneTextures_GBufferDTexture ;
  Texture2D  MobileSceneTextures_SceneDepthAuxTexture ;
  SamplerState  MobileSceneTextures_GBufferATextureSampler ;
  SamplerState  MobileSceneTextures_GBufferBTextureSampler ;
  SamplerState  MobileSceneTextures_GBufferCTextureSampler ;
  SamplerState  MobileSceneTextures_GBufferDTextureSampler ;
  SamplerState  MobileSceneTextures_SceneDepthAuxTextureSampler ;
static const struct
{
	Texture2D SceneColorTexture;
	SamplerState SceneColorTextureSampler;
	Texture2D SceneDepthTexture;
	SamplerState SceneDepthTextureSampler;
	Texture2D CustomDepthTexture;
	SamplerState CustomDepthTextureSampler;
	Texture2D<uint2> CustomStencilTexture;
	Texture2D SceneVelocityTexture;
	SamplerState SceneVelocityTextureSampler;
	Texture2D GBufferATexture;
	Texture2D GBufferBTexture;
	Texture2D GBufferCTexture;
	Texture2D GBufferDTexture;
	Texture2D SceneDepthAuxTexture;
	SamplerState GBufferATextureSampler;
	SamplerState GBufferBTextureSampler;
	SamplerState GBufferCTextureSampler;
	SamplerState GBufferDTextureSampler;
	SamplerState SceneDepthAuxTextureSampler;
} MobileSceneTextures = {MobileSceneTextures_SceneColorTexture,MobileSceneTextures_SceneColorTextureSampler,MobileSceneTextures_SceneDepthTexture,MobileSceneTextures_SceneDepthTextureSampler,MobileSceneTextures_CustomDepthTexture,MobileSceneTextures_CustomDepthTextureSampler,MobileSceneTextures_CustomStencilTexture,MobileSceneTextures_SceneVelocityTexture,MobileSceneTextures_SceneVelocityTextureSampler,MobileSceneTextures_GBufferATexture,MobileSceneTextures_GBufferBTexture,MobileSceneTextures_GBufferCTexture,MobileSceneTextures_GBufferDTexture,MobileSceneTextures_SceneDepthAuxTexture,MobileSceneTextures_GBufferATextureSampler,MobileSceneTextures_GBufferBTextureSampler,MobileSceneTextures_GBufferCTextureSampler,MobileSceneTextures_GBufferDTextureSampler,MobileSceneTextures_SceneDepthAuxTextureSampler,};

#line   5 "/Engine/Generated/GeneratedUniformBuffers.ush"

#line   2 "/Engine/Generated/UniformBuffers/SceneTexturesStruct.ush"

cbuffer  UniformBufferConstants_SceneTexturesStruct 
{
	 uint BindlessResource_SceneTexturesStruct_SceneColorTexture ;
	 uint  PrePadding_SceneTexturesStruct_4;
	 uint BindlessResource_SceneTexturesStruct_SceneDepthTexture ;
	 uint  PrePadding_SceneTexturesStruct_12;
	 uint BindlessResource_SceneTexturesStruct_GBufferATexture ;
	 uint  PrePadding_SceneTexturesStruct_20;
	 uint BindlessResource_SceneTexturesStruct_GBufferBTexture ;
	 uint  PrePadding_SceneTexturesStruct_28;
	 uint BindlessResource_SceneTexturesStruct_GBufferCTexture ;
	 uint  PrePadding_SceneTexturesStruct_36;
	 uint BindlessResource_SceneTexturesStruct_GBufferDTexture ;
	 uint  PrePadding_SceneTexturesStruct_44;
	 uint BindlessResource_SceneTexturesStruct_GBufferETexture ;
	 uint  PrePadding_SceneTexturesStruct_52;
	 uint BindlessResource_SceneTexturesStruct_GBufferFTexture ;
	 uint  PrePadding_SceneTexturesStruct_60;
	 uint BindlessResource_SceneTexturesStruct_GBufferVelocityTexture ;
	 uint  PrePadding_SceneTexturesStruct_68;
	 uint BindlessResource_SceneTexturesStruct_ScreenSpaceAOTexture ;
	 uint  PrePadding_SceneTexturesStruct_76;
	 uint BindlessResource_SceneTexturesStruct_CustomDepthTexture ;
	 uint  PrePadding_SceneTexturesStruct_84;
	 uint BindlessResource_SceneTexturesStruct_CustomStencilTexture ;
	 uint  PrePadding_SceneTexturesStruct_92;
	 uint BindlessSampler_SceneTexturesStruct_PointClampSampler ;
}
  Texture2D  SceneTexturesStruct_SceneColorTexture ;
  Texture2D  SceneTexturesStruct_SceneDepthTexture ;
  Texture2D  SceneTexturesStruct_GBufferATexture ;
  Texture2D  SceneTexturesStruct_GBufferBTexture ;
  Texture2D  SceneTexturesStruct_GBufferCTexture ;
  Texture2D  SceneTexturesStruct_GBufferDTexture ;
  Texture2D  SceneTexturesStruct_GBufferETexture ;
  Texture2D  SceneTexturesStruct_GBufferFTexture ;
  Texture2D  SceneTexturesStruct_GBufferVelocityTexture ;
  Texture2D  SceneTexturesStruct_ScreenSpaceAOTexture ;
  Texture2D  SceneTexturesStruct_CustomDepthTexture ;
  Texture2D<uint2>  SceneTexturesStruct_CustomStencilTexture ;
  SamplerState  SceneTexturesStruct_PointClampSampler ;
static const struct
{
	Texture2D SceneColorTexture;
	Texture2D SceneDepthTexture;
	Texture2D GBufferATexture;
	Texture2D GBufferBTexture;
	Texture2D GBufferCTexture;
	Texture2D GBufferDTexture;
	Texture2D GBufferETexture;
	Texture2D GBufferFTexture;
	Texture2D GBufferVelocityTexture;
	Texture2D ScreenSpaceAOTexture;
	Texture2D CustomDepthTexture;
	Texture2D<uint2> CustomStencilTexture;
	SamplerState PointClampSampler;
} SceneTexturesStruct = {SceneTexturesStruct_SceneColorTexture,SceneTexturesStruct_SceneDepthTexture,SceneTexturesStruct_GBufferATexture,SceneTexturesStruct_GBufferBTexture,SceneTexturesStruct_GBufferCTexture,SceneTexturesStruct_GBufferDTexture,SceneTexturesStruct_GBufferETexture,SceneTexturesStruct_GBufferFTexture,SceneTexturesStruct_GBufferVelocityTexture,SceneTexturesStruct_ScreenSpaceAOTexture,SceneTexturesStruct_CustomDepthTexture,SceneTexturesStruct_CustomStencilTexture,SceneTexturesStruct_PointClampSampler,};

#line   6 "/Engine/Generated/GeneratedUniformBuffers.ush"

#line   2 "/Engine/Generated/UniformBuffers/StrataPublic.ush"

cbuffer  UniformBufferConstants_StrataPublic 
{
	 uint BindlessResource_StrataPublic_TopLayerTexture ;
}
  Texture2D<uint2>  StrataPublic_TopLayerTexture ;
static const struct
{
	Texture2D<uint2> TopLayerTexture;
} StrataPublic = {StrataPublic_TopLayerTexture,};

#line   7 "/Engine/Generated/GeneratedUniformBuffers.ush"








#line 169 "/Engine/Private/Common.ush"



#line   7 "/Engine/Private/CommonViewUniformBuffer.ush"





float2 GetTanHalfFieldOfView()
{
	return float2(View.ClipToView[0][0], View.ClipToView[1][1]);
}

float2 GetPrevTanHalfFieldOfView()
{
	return float2(View.PrevClipToView[0][0], View.PrevClipToView[1][1]);
}



float2 GetCotanHalfFieldOfView()
{
	return float2(View.ViewToClip[0][0], View.ViewToClip[1][1]);
}



float2 GetPrevCotanHalfFieldOfView()
{
	return float2(View.PrevViewToClip[0][0], View.PrevViewToClip[1][1]);
}


uint GetPowerOfTwoModulatedFrameIndex(uint Pow2Modulus)
{
	
	return View.StateFrameIndex & uint(Pow2Modulus - 1);
}
#line 172 "/Engine/Private/Common.ush"




float FmodFloor(float Lhs, float Rhs)
{
	return Lhs - floor(Lhs / Rhs) * Rhs;
}

float2 FmodFloor(float2 Lhs, float2 Rhs)
{
	return Lhs - floor(Lhs / Rhs) * Rhs;
}

float3 FmodFloor(float3 Lhs, float3 Rhs)
{
	return Lhs - floor(Lhs / Rhs) * Rhs;
}

float4 FmodFloor(float4 Lhs, float4 Rhs)
{
	return Lhs - floor(Lhs / Rhs) * Rhs;
}

float VectorSum(float V) { return V; }
float VectorSum(float2 V) { return V.x + V.y; }
float VectorSum(float3 V) { return V.x + V.y + V.z; }
float VectorSum(float4 V) { return V.x + V.y + V.z + V.w; }

#line   3 "/Engine/Private/LargeWorldCoordinates.ush"


struct FLWCScalar
{
	float Tile;
	float Offset;
};

struct FLWCVector2
{
	float2 Tile;
	float2 Offset;
};

struct FLWCVector3
{
	float3 Tile;
	float3 Offset;
};

struct FLWCVector4
{
	float4 Tile;
	float4 Offset;
};

struct FLWCScalarDeriv
{
	FLWCScalar Value;
	float Ddx;
	float Ddy;
};

struct FLWCVector2Deriv
{
	FLWCVector2 Value;
	float2 Ddx;
	float2 Ddy;
};

struct FLWCVector3Deriv
{
	FLWCVector3 Value;
	float3 Ddx;
	float3 Ddy;
};

struct FLWCVector4Deriv
{
	FLWCVector4 Value;
	float4 Ddx;
	float4 Ddy;
};


struct FLWCMatrix
{
	float4x4 M;
	float3 Tile; 
};


struct FLWCInverseMatrix
{
	float4x4 M;
	float3 Tile; 
	int Dummy; 
};




float LWCGetTileOffset(FLWCScalar V) { return  (( V ).Tile) * 2097152.00f; }
float2 LWCGetTileOffset(FLWCVector2 V) { return  (( V ).Tile) * 2097152.00f; }
float3 LWCGetTileOffset(FLWCVector3 V) { return  (( V ).Tile) * 2097152.00f; }
float4 LWCGetTileOffset(FLWCVector4 V) { return  (( V ).Tile) * 2097152.00f; }
float3 LWCGetTileOffset(FLWCMatrix V) { return  (( V ).Tile) * 2097152.00f; }
float3 LWCGetTileOffset(FLWCInverseMatrix V) { return  (( V ).Tile) * 2097152.00f; }

float4x4 Make4x3Matrix(float4x4 M)
{
	
	float4x4 Result;
	Result[0] = float4(M[0].xyz, 0.0f);
	Result[1] = float4(M[1].xyz, 0.0f);
	Result[2] = float4(M[2].xyz, 0.0f);
	Result[3] = float4(M[3].xyz, 1.0f);
	return Result;
}

float4x4 MakeTranslationMatrix(float3 Offset)
{
	float4x4 Result;
	Result[0] = float4(1.0f, 0.0f, 0.0f, 0.0f);
	Result[1] = float4(0.0f, 1.0f, 0.0f, 0.0f);
	Result[2] = float4(0.0f, 0.0f, 1.0f, 0.0f);
	Result[3] = float4(Offset, 1.0f);
	return Result;
}

FLWCScalar MakeLWCScalar(float Tile, float Offset)
{
	FLWCScalar Result;
	 ( Result ).Tile = ( Tile );
	Result.Offset = Offset;
	return Result;
}

FLWCVector2 MakeLWCVector2(float2 Tile, float2 Offset)
{
	FLWCVector2 Result;
	 ( Result ).Tile = ( Tile );
	Result.Offset = Offset;
	return Result;
}

FLWCVector3 MakeLWCVector3(float3 Tile, float3 Offset)
{
	FLWCVector3 Result;
	 ( Result ).Tile = ( Tile );
	Result.Offset = Offset;
	return Result;
}

FLWCVector4 MakeLWCVector4(float4 Tile, float4 Offset)
{
	FLWCVector4 Result;
	 ( Result ).Tile = ( Tile );
	Result.Offset = Offset;
	return Result;
}

FLWCVector4 MakeLWCVector4(float3 Tile, float4 Offset)
{
	return MakeLWCVector4(float4(Tile, 0), Offset);
}

FLWCVector4 MakeLWCVector4(FLWCVector3 XYZ, float W)
{
	return MakeLWCVector4( (( XYZ ).Tile), float4(XYZ.Offset, W));
}

FLWCScalar MakeLWCVector(FLWCScalar X) { return X; }

FLWCVector2 MakeLWCVector(FLWCScalar X, FLWCScalar Y) { return MakeLWCVector2(float2( (( X ).Tile),  (( Y ).Tile)), float2(X.Offset, Y.Offset)); }

FLWCVector3 MakeLWCVector(FLWCScalar X, FLWCScalar Y, FLWCScalar Z) { return MakeLWCVector3(float3( (( X ).Tile),  (( Y ).Tile),  (( Z ).Tile)), float3(X.Offset, Y.Offset, Z.Offset)); }
FLWCVector3 MakeLWCVector(FLWCScalar X, FLWCVector2 YZ) { return MakeLWCVector3(float3( (( X ).Tile),  (( YZ ).Tile)), float3(X.Offset, YZ.Offset)); }
FLWCVector3 MakeLWCVector(FLWCVector2 XY, FLWCScalar Z) { return MakeLWCVector3(float3( (( XY ).Tile),  (( Z ).Tile)), float3(XY.Offset, Z.Offset)); }

FLWCVector4 MakeLWCVector(FLWCScalar X, FLWCScalar Y, FLWCScalar Z, FLWCScalar W) { return MakeLWCVector4(float4( (( X ).Tile),  (( Y ).Tile),  (( Z ).Tile),  (( W ).Tile)), float4(X.Offset, Y.Offset, Z.Offset, W.Offset)); }
FLWCVector4 MakeLWCVector(FLWCScalar X, FLWCScalar Y, FLWCVector2 ZW) { return MakeLWCVector4(float4( (( X ).Tile),  (( Y ).Tile),  (( ZW ).Tile)), float4(X.Offset, Y.Offset, ZW.Offset)); }
FLWCVector4 MakeLWCVector(FLWCScalar X, FLWCVector2 YZ, FLWCScalar W) { return MakeLWCVector4(float4( (( X ).Tile),  (( YZ ).Tile),  (( W ).Tile)), float4(X.Offset, YZ.Offset, W.Offset)); }
FLWCVector4 MakeLWCVector(FLWCVector2 XY, FLWCScalar Z, FLWCScalar W) { return MakeLWCVector4(float4( (( XY ).Tile),  (( Z ).Tile),  (( W ).Tile)), float4(XY.Offset, Z.Offset, W.Offset)); }
FLWCVector4 MakeLWCVector(FLWCVector2 XY, FLWCVector2 ZW) { return MakeLWCVector4(float4( (( XY ).Tile),  (( ZW ).Tile)), float4(XY.Offset, ZW.Offset)); }
FLWCVector4 MakeLWCVector(FLWCScalar X, FLWCVector3 YZW) { return MakeLWCVector4(float4( (( X ).Tile),  (( YZW ).Tile)), float4(X.Offset, YZW.Offset)); }
FLWCVector4 MakeLWCVector(FLWCVector3 XYZ, FLWCScalar W) { return MakeLWCVector4(float4( (( XYZ ).Tile),  (( W ).Tile)), float4(XYZ.Offset, W.Offset)); }

FLWCMatrix MakeLWCMatrix(float3 Tile, float4x4 InMatrix)
{
	FLWCMatrix Result;
	 ( Result ).Tile = ( Tile );
	Result.M = InMatrix;
	return Result;
}

FLWCMatrix MakeLWCMatrix4x3(float3 Tile, float4x4 InMatrix)
{
	FLWCMatrix Result;
	 ( Result ).Tile = ( Tile );
	Result.M = Make4x3Matrix(InMatrix);
	return Result;
}

FLWCInverseMatrix MakeLWCInverseMatrix(float3 Tile, float4x4 InMatrix)
{
	FLWCInverseMatrix Result;
	 ( Result ).Tile = ( -Tile );
	Result.M = InMatrix;
	Result.Dummy = 0;
	return Result;
}

FLWCInverseMatrix MakeLWCInverseMatrix4x3(float3 Tile, float4x4 InMatrix)
{
	FLWCInverseMatrix Result;
	 ( Result ).Tile = ( -Tile );
	Result.M = Make4x3Matrix(InMatrix);
	Result.Dummy = 0;
	return Result;
}



FLWCScalar LWCGetComponent(FLWCScalar V, int C) { return V; }
FLWCScalar LWCGetComponent(FLWCVector2 V, int C) { return MakeLWCScalar( (( V ).Tile)[C], V.Offset[C]); }
FLWCScalar LWCGetComponent(FLWCVector3 V, int C) { return MakeLWCScalar( (( V ).Tile)[C], V.Offset[C]); }
FLWCScalar LWCGetComponent(FLWCVector4 V, int C) { return MakeLWCScalar( (( V ).Tile)[C], V.Offset[C]); }






FLWCScalar LWCSwizzle(FLWCScalar V, int C0) { return V; }
FLWCScalar LWCSwizzle(FLWCVector2 V, int C0) { return LWCGetComponent(V, C0); }
FLWCScalar LWCSwizzle(FLWCVector3 V, int C0) { return LWCGetComponent(V, C0); }
FLWCScalar LWCSwizzle(FLWCVector4 V, int C0) { return LWCGetComponent(V, C0); }

FLWCVector2 LWCSwizzle(FLWCScalar V, int C0, int C1) { return MakeLWCVector(V, V); }
FLWCVector2 LWCSwizzle(FLWCVector2 V, int C0, int C1) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1)); }
FLWCVector2 LWCSwizzle(FLWCVector3 V, int C0, int C1) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1)); }
FLWCVector2 LWCSwizzle(FLWCVector4 V, int C0, int C1) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1)); }

FLWCVector3 LWCSwizzle(FLWCScalar V, int C0, int C1, int C2) { return MakeLWCVector(V, V, V); }
FLWCVector3 LWCSwizzle(FLWCVector2 V, int C0, int C1, int C2) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1), LWCGetComponent(V, C2)); }
FLWCVector3 LWCSwizzle(FLWCVector3 V, int C0, int C1, int C2) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1), LWCGetComponent(V, C2)); }
FLWCVector3 LWCSwizzle(FLWCVector4 V, int C0, int C1, int C2) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1), LWCGetComponent(V, C2)); }

FLWCVector4 LWCSwizzle(FLWCScalar V, int C0, int C1, int C2, int C3) { return MakeLWCVector(V, V, V, V); }
FLWCVector4 LWCSwizzle(FLWCVector2 V, int C0, int C1, int C2, int C3) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1), LWCGetComponent(V, C2), LWCGetComponent(V, C3)); }
FLWCVector4 LWCSwizzle(FLWCVector3 V, int C0, int C1, int C2, int C3) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1), LWCGetComponent(V, C2), LWCGetComponent(V, C3)); }
FLWCVector4 LWCSwizzle(FLWCVector4 V, int C0, int C1, int C2, int C3) { return MakeLWCVector(LWCGetComponent(V, C0), LWCGetComponent(V, C1), LWCGetComponent(V, C2), LWCGetComponent(V, C3)); }

float LWCToFloat(FLWCScalar Value)   { return LWCGetTileOffset(Value) + Value.Offset; }
float2 LWCToFloat(FLWCVector2 Value) { return LWCGetTileOffset(Value) + Value.Offset; }
float3 LWCToFloat(FLWCVector3 Value) { return LWCGetTileOffset(Value) + Value.Offset; }
float4 LWCToFloat(FLWCVector4 Value) { return LWCGetTileOffset(Value) + Value.Offset; }

float4x4 LWCToFloat(FLWCMatrix Value)
{
	float4x4 Result = Value.M;
	Result[3].xyz = LWCGetTileOffset(Value) + Result[3].xyz;
	return Result;
}

float4x4 LWCToFloat(FLWCInverseMatrix Value)
{
	float4x4 TileOffset = MakeTranslationMatrix(LWCGetTileOffset(Value));
	return mul(TileOffset, Value.M);
}

float3x3 LWCToFloat3x3(FLWCMatrix Value)
{
	return (float3x3)Value.M;
}

float3x3 LWCToFloat3x3(FLWCInverseMatrix Value)
{
	return (float3x3)Value.M;
}


float LWCToFloat(float Value) { return Value; }
float2 LWCToFloat(float2 Value) { return Value; }
float3 LWCToFloat(float3 Value) { return Value; }
float4 LWCToFloat(float4 Value) { return Value; }
float4x4 LWCToFloat(float4x4 Value) { return Value; }


FLWCScalar LWCPromote(FLWCScalar Value) { return Value; }
FLWCVector2 LWCPromote(FLWCVector2 Value) { return Value; }
FLWCVector3 LWCPromote(FLWCVector3 Value) { return Value; }
FLWCVector4 LWCPromote(FLWCVector4 Value) { return Value; }
FLWCMatrix LWCPromote(FLWCMatrix Value) { return Value; }
FLWCInverseMatrix LWCPromote(FLWCInverseMatrix Value) { return Value; }

FLWCScalar LWCPromote(float Value) { return MakeLWCScalar(0, Value); }
FLWCVector2 LWCPromote(float2 Value) { return MakeLWCVector2((float2)0, Value); }
FLWCVector3 LWCPromote(float3 Value) { return MakeLWCVector3((float3)0, Value); }
FLWCVector4 LWCPromote(float4 Value) { return MakeLWCVector4((float4)0, Value); }
FLWCMatrix LWCPromote(float4x4 Value) { return MakeLWCMatrix((float3)0, Value); }
FLWCInverseMatrix LWCPromoteInverse(float4x4 Value) { return MakeLWCInverseMatrix((float3)0, Value); }

FLWCVector3 LWCMultiply(float3 Position, FLWCMatrix InMatrix)
{
	
	float3 Offset = (Position.xxx * InMatrix.M[0].xyz + Position.yyy * InMatrix.M[1].xyz + Position.zzz * InMatrix.M[2].xyz) + InMatrix.M[3].xyz;
	return MakeLWCVector3( (( InMatrix ).Tile), Offset);
}

FLWCVector4 LWCMultiply(float4 Position, FLWCMatrix InMatrix)
{
	float4 Offset = mul(Position, InMatrix.M);
	return MakeLWCVector4( (( InMatrix ).Tile), Offset);
}

float3 LWCMultiply(FLWCVector3 Position, FLWCInverseMatrix InMatrix)
{
	float3 LocalPosition = LWCToFloat(MakeLWCVector3( (( Position ).Tile) +  (( InMatrix ).Tile), Position.Offset));
	return (LocalPosition.xxx * InMatrix.M[0].xyz + LocalPosition.yyy * InMatrix.M[1].xyz + LocalPosition.zzz * InMatrix.M[2].xyz) + InMatrix.M[3].xyz;
}

float4 LWCMultiply(FLWCVector4 Position, FLWCInverseMatrix InMatrix)
{
	float4 LocalPosition = LWCToFloat(MakeLWCVector4( (( Position ).Tile) + float4( (( InMatrix ).Tile), 0), Position.Offset));
	return mul(LocalPosition, InMatrix.M);
}

float3 LWCMultiplyVector(float3 Vector, FLWCMatrix InMatrix)
{
	return mul(Vector, (float3x3)InMatrix.M);
}

float3 LWCMultiplyVector(float3 Vector, FLWCInverseMatrix InMatrix)
{
	return mul(Vector, (float3x3)InMatrix.M);
}

FLWCMatrix LWCMultiply(float4x4 Lhs, FLWCMatrix Rhs)
{
	float4x4 ResultMatrix = mul(Lhs, Rhs.M);
	return MakeLWCMatrix( (( Rhs ).Tile), ResultMatrix);
}

FLWCInverseMatrix LWCMultiply(FLWCInverseMatrix Lhs, float4x4 Rhs)
{
	float4x4 ResultMatrix = mul(Lhs.M, Rhs);
	return MakeLWCInverseMatrix(- (( Lhs ).Tile), ResultMatrix);
}

float4x4 LWCMultiply(FLWCMatrix Lhs, FLWCInverseMatrix Rhs)
{
	
	float4x4 Result = Lhs.M;
	Result = mul(Result, MakeTranslationMatrix(( (( Lhs ).Tile) +  (( Rhs ).Tile)) * 2097152.00f));
	Result = mul(Result, Rhs.M);
	return Result;
}

float4x4 LWCMultiplyTranslation(FLWCMatrix Lhs, FLWCVector3 Rhs)
{
	float4x4 Result = Lhs.M;
	Result[3].xyz += ( (( Lhs ).Tile) +  (( Rhs ).Tile)) * 2097152.00f;
	Result[3].xyz += Rhs.Offset;
	return Result;
}

FLWCMatrix LWCMultiplyTranslation(float4x4 Lhs, FLWCVector3 Rhs)
{
	FLWCMatrix Result = MakeLWCMatrix( (( Rhs ).Tile), Lhs);
	Result.M[3].xyz += Rhs.Offset;
	return Result;
}

float4x4 LWCMultiplyTranslation(FLWCVector3 Lhs, FLWCInverseMatrix Rhs)
{
	float3 Offset = ( (( Lhs ).Tile) +  (( Rhs ).Tile)) * 2097152.00f + Lhs.Offset;
	return mul(MakeTranslationMatrix(Offset), Rhs.M);
}

FLWCInverseMatrix LWCMultiplyTranslation(FLWCVector3 Lhs, float4x4 Rhs)
{
	FLWCInverseMatrix Result = MakeLWCInverseMatrix(- (( Lhs ).Tile), Rhs);
	Result.M = mul(MakeTranslationMatrix(Lhs.Offset), Result.M);
	return Result;
}

FLWCVector3 LWCGetOrigin(FLWCMatrix InMatrix)
{
	return MakeLWCVector3( (( InMatrix ).Tile), InMatrix.M[3].xyz);
}

void LWCSetOrigin(inout FLWCMatrix InOutMatrix, FLWCVector3 Origin)
{
	 ( InOutMatrix ).Tile = (  (( Origin ).Tile) );
	InOutMatrix.M[3].xyz = Origin.Offset;
}





#line   5 "/Engine/Private/LWCOperations.ush"
FLWCScalar LWCNormalizeTile(FLWCScalar V)
{
	float IntTile = floor(V.Tile + (V.Offset * 4.76837158e-07f + 0.5f));
	return MakeLWCScalar(IntTile, (V.Tile - IntTile) * 2097152.00f + V.Offset);
}


FLWCScalar LWCMakeIntTile(FLWCScalar V)
{
	float IntTile = floor(V.Tile);
	return MakeLWCScalar(IntTile, (V.Tile - IntTile) * 2097152.00f + V.Offset);
}

float LWCSqrtUnscaled(FLWCScalar V) { return sqrt(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float LWCRsqrtUnscaled(FLWCScalar V) { return rsqrt(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float LWCRcpUnscaled(FLWCScalar V) { return rcp(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float LWCSqrtScaled(FLWCScalar V, float Scale) { return LWCSqrtUnscaled(V) * Scale; }
float LWCRsqrtScaled(FLWCScalar V, float Scale) { return LWCRsqrtUnscaled(V) * Scale; }
float LWCRcpScaled(FLWCScalar V, float Scale) { return LWCRcpUnscaled(V) * Scale; }
float LWCSqrt(FLWCScalar V) { return LWCSqrtScaled(V, 1448.15466f); }
float LWCRsqrt(FLWCScalar V) { return LWCRsqrtScaled(V, 0.000690533954f); }
float LWCRcp(FLWCScalar V) { return LWCRcpScaled(V, 4.76837158e-07f); }









  bool  LWCGreater ( FLWCScalar Lhs, FLWCScalar Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f > Rhs.Offset - Lhs.Offset; } bool  LWCGreater ( float Lhs, FLWCScalar Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f > Rhs.Offset - Lhs; } bool  LWCGreater ( FLWCScalar Lhs, float Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f > Rhs - Lhs.Offset; }
  bool  LWCGreaterEqual ( FLWCScalar Lhs, FLWCScalar Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f >= Rhs.Offset - Lhs.Offset; } bool  LWCGreaterEqual ( float Lhs, FLWCScalar Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f >= Rhs.Offset - Lhs; } bool  LWCGreaterEqual ( FLWCScalar Lhs, float Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f >= Rhs - Lhs.Offset; }
  bool  LWCLess ( FLWCScalar Lhs, FLWCScalar Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f < Rhs.Offset - Lhs.Offset; } bool  LWCLess ( float Lhs, FLWCScalar Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f < Rhs.Offset - Lhs; } bool  LWCLess ( FLWCScalar Lhs, float Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f < Rhs - Lhs.Offset; }
  bool  LWCLessEqual ( FLWCScalar Lhs, FLWCScalar Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f <= Rhs.Offset - Lhs.Offset; } bool  LWCLessEqual ( float Lhs, FLWCScalar Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f <= Rhs.Offset - Lhs; } bool  LWCLessEqual ( FLWCScalar Lhs, float Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f <= Rhs - Lhs.Offset; }





float LWCDdx(FLWCScalar V) { return (float)0; }
float LWCDdy(FLWCScalar V) { return (float)0; }





FLWCScalar LWCAdd(FLWCScalar Lhs, FLWCScalar Rhs) { return MakeLWCScalar( (( Lhs ).Tile) +  (( Rhs ).Tile), Lhs.Offset + Rhs.Offset); }
FLWCScalar LWCAdd(float Lhs, FLWCScalar Rhs) { return MakeLWCScalar( (( Rhs ).Tile), Lhs + Rhs.Offset); }
FLWCScalar LWCAdd(FLWCScalar Lhs, float Rhs) { return MakeLWCScalar( (( Lhs ).Tile), Lhs.Offset + Rhs); }

FLWCScalar LWCSubtract(FLWCScalar Lhs, FLWCScalar Rhs) { return MakeLWCScalar( (( Lhs ).Tile) -  (( Rhs ).Tile), Lhs.Offset - Rhs.Offset); }
FLWCScalar LWCSubtract(float Lhs, FLWCScalar Rhs) { return MakeLWCScalar(- (( Rhs ).Tile), Lhs - Rhs.Offset); }
FLWCScalar LWCSubtract(FLWCScalar Lhs, float Rhs) { return MakeLWCScalar( (( Lhs ).Tile), Lhs.Offset - Rhs); }

bool LWCEquals(FLWCScalar Lhs, FLWCScalar Rhs)
{
	return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f == Rhs.Offset - Lhs.Offset;
}
bool LWCEquals(float Lhs, FLWCScalar Rhs)
{
	return - (( Rhs ).Tile) * 2097152.00f == Rhs.Offset - Lhs;
} 
bool LWCEquals(FLWCScalar Lhs, float Rhs)
{
	return  (( Lhs ).Tile) * 2097152.00f == Rhs - Lhs.Offset;
}
bool LWCEqualsApprox(FLWCScalar Lhs, FLWCScalar Rhs, float Threshold)
{
	return abs(( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f + (Lhs.Offset - Rhs.Offset)) < (float)Threshold;
}
bool LWCEqualsApprox(float Lhs, FLWCScalar Rhs, float Threshold)
{
	return abs(- (( Rhs ).Tile) * 2097152.00f + (Lhs - Rhs.Offset)) < (float)Threshold;
}
bool LWCEqualsApprox(FLWCScalar Lhs, float Rhs, float Threshold)
{
	return abs( (( Lhs ).Tile) * 2097152.00f + (Lhs.Offset - Rhs)) < (float)Threshold;
}

FLWCScalar LWCSelect(bool S, FLWCScalar Lhs, FLWCScalar Rhs) { return MakeLWCScalar( select_internal( S ,  (( Lhs ).Tile) ,  (( Rhs ).Tile) ),  select_internal( S , Lhs.Offset , Rhs.Offset )); }
FLWCScalar LWCSelect(bool S, float Lhs, FLWCScalar Rhs) { return MakeLWCScalar( select_internal( S , (float)0 ,  (( Rhs ).Tile) ),  select_internal( S , Lhs , Rhs.Offset )); }
FLWCScalar LWCSelect(bool S, FLWCScalar Lhs, float Rhs) { return MakeLWCScalar( select_internal( S ,  (( Lhs ).Tile) , (float)0 ),  select_internal( S , Lhs.Offset , Rhs )); }

FLWCScalar LWCNegate(FLWCScalar V) { return MakeLWCScalar(- (( V ).Tile), -V.Offset); }

float LWCFrac(FLWCScalar V)
{
	float FracTile = frac( (( V ).Tile) * 2097152.00f);
	return frac(FracTile + V.Offset);
}

FLWCScalar LWCFloor(FLWCScalar V) { FLWCScalar VN = LWCMakeIntTile(V); return MakeLWCScalar( (( VN ).Tile), floor(VN.Offset)); }
FLWCScalar LWCCeil(FLWCScalar V) { FLWCScalar VN = LWCMakeIntTile(V); return MakeLWCScalar( (( VN ).Tile), ceil(VN.Offset)); }
FLWCScalar LWCRound(FLWCScalar V) { FLWCScalar VN = LWCMakeIntTile(V); return MakeLWCScalar( (( VN ).Tile), round(VN.Offset)); }
FLWCScalar LWCTrunc(FLWCScalar V) { FLWCScalar VN = LWCMakeIntTile(V); return MakeLWCScalar( (( VN ).Tile), trunc(VN.Offset)); }


float LWCSign(FLWCScalar V) { return float(sign(LWCToFloat(V))); }
float LWCSaturate(FLWCScalar V) { return saturate(LWCToFloat(V)); }
float LWCClampScalar(FLWCScalar V, float Low, float High) { return clamp(LWCToFloat(V), Low, High); }

FLWCScalar LWCMultiply(FLWCScalar Lhs, FLWCScalar Rhs)
{
	return MakeLWCScalar( (( Lhs ).Tile) * ( (( Rhs ).Tile) * 2097152.00f + Rhs.Offset) +  (( Rhs ).Tile) * Lhs.Offset, Lhs.Offset * Rhs.Offset);
}
FLWCScalar LWCMultiply(float Lhs, FLWCScalar Rhs) { return MakeLWCScalar( (( Rhs ).Tile) * Lhs, Lhs * Rhs.Offset); }
FLWCScalar LWCMultiply(FLWCScalar Lhs, float Rhs) { return MakeLWCScalar( (( Lhs ).Tile) * Rhs, Lhs.Offset * Rhs); }

FLWCScalar LWCDivide(FLWCScalar Lhs, FLWCScalar Rhs) { return LWCMultiply(Lhs, LWCRcp(Rhs)); }
FLWCScalar LWCDivide(FLWCScalar Lhs, float Rhs) { return LWCMultiply(Lhs, rcp(Rhs)); }
FLWCScalar LWCDivide(float Lhs, FLWCScalar Rhs) { return MakeLWCScalar((float)0, Lhs * LWCRcp(Rhs)); }


FLWCScalar LWCLerp(FLWCScalar Lhs, FLWCScalar Rhs, float S)
{
	return MakeLWCScalar(lerp( (( Lhs ).Tile),  (( Rhs ).Tile), S), lerp(Lhs.Offset, Rhs.Offset, S));
}

float LWCFmod(FLWCScalar Lhs, float Rhs)
{
	return LWCToFloat(LWCSubtract(Lhs, LWCMultiply(LWCTrunc(LWCDivide(Lhs, Rhs)), Rhs)));
	
	
}
float LWCFmodFloor(FLWCScalar Lhs, float Rhs)
{
	return LWCToFloat(LWCSubtract(Lhs, LWCMultiply(LWCFloor(LWCDivide(Lhs, Rhs)), Rhs)));
	
	
}
float LWCFmodFloorPI(FLWCScalar V)
{
	return LWCFmodFloor(V, PI);
	
}
float LWCFmodFloor2PI(FLWCScalar V)
{
	return LWCFmodFloor(V, 2.0f * PI);
	
}

float LWCSin(FLWCScalar V) { return sin(LWCFmodFloor2PI(V)); }
float LWCCos(FLWCScalar V) { return cos(LWCFmodFloor2PI(V)); }
float LWCTan(FLWCScalar V) { return tan(LWCFmodFloorPI(V)); }
float LWCASin(FLWCScalar V) { return asin(LWCClampScalar(V, -1.0f, 1.0f)); }
float LWCACos(FLWCScalar V) { return acos(LWCClampScalar(V, -1.0f, 1.0f)); }
float LWCATan(FLWCScalar V) { return atan(LWCClampScalar(V, -0.5f*PI, 0.5f*PI)); }

float LWCSmoothStep(FLWCScalar Lhs, FLWCScalar Rhs, FLWCScalar S)
{
	float t = LWCSaturate(LWCDivide(LWCSubtract(S, Lhs), LWCSubtract(Rhs, Lhs)));
	return t*t*(3.0f - (2.0f*t));
}

FLWCScalar LWCMin(FLWCScalar Lhs, FLWCScalar Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCScalar LWCMin(float Lhs, FLWCScalar Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCScalar LWCMin(FLWCScalar Lhs, float Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCScalar LWCMax(FLWCScalar Lhs, FLWCScalar Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }
FLWCScalar LWCMax(float Lhs, FLWCScalar Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }
FLWCScalar LWCMax(FLWCScalar Lhs, float Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }

FLWCScalar LWCAbs(FLWCScalar V) { return LWCSelect(LWCLess(V, (float)0), LWCNegate(V), V); }

float LWCStep(FLWCScalar Lhs, FLWCScalar Rhs)   { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float)1.0f , (float)0.0f ); }
float LWCStep(FLWCScalar Lhs, float Rhs) { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float)1.0f , (float)0.0f ); }
float LWCStep(float Lhs, FLWCScalar Rhs) { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float)1.0f , (float)0.0f ); }


FLWCScalar LWCSquareScaled(FLWCScalar V)
{
	float OffsetScaled = V.Offset * 4.76837158e-07f;
	return MakeLWCScalar( (( V ).Tile) * ( (( V ).Tile) + OffsetScaled * 2.0f), V.Offset * OffsetScaled);
}
#line 376 "/Engine/Private/LargeWorldCoordinates.ush"










#line   5 "/Engine/Private/LWCOperations.ush"
FLWCVector2 LWCNormalizeTile(FLWCVector2 V)
{
	float2 IntTile = floor(V.Tile + (V.Offset * 4.76837158e-07f + 0.5f));
	return MakeLWCVector2(IntTile, (V.Tile - IntTile) * 2097152.00f + V.Offset);
}


FLWCVector2 LWCMakeIntTile(FLWCVector2 V)
{
	float2 IntTile = floor(V.Tile);
	return MakeLWCVector2(IntTile, (V.Tile - IntTile) * 2097152.00f + V.Offset);
}

float2 LWCSqrtUnscaled(FLWCVector2 V) { return sqrt(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float2 LWCRsqrtUnscaled(FLWCVector2 V) { return rsqrt(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float2 LWCRcpUnscaled(FLWCVector2 V) { return rcp(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float2 LWCSqrtScaled(FLWCVector2 V, float Scale) { return LWCSqrtUnscaled(V) * Scale; }
float2 LWCRsqrtScaled(FLWCVector2 V, float Scale) { return LWCRsqrtUnscaled(V) * Scale; }
float2 LWCRcpScaled(FLWCVector2 V, float Scale) { return LWCRcpUnscaled(V) * Scale; }
float2 LWCSqrt(FLWCVector2 V) { return LWCSqrtScaled(V, 1448.15466f); }
float2 LWCRsqrt(FLWCVector2 V) { return LWCRsqrtScaled(V, 0.000690533954f); }
float2 LWCRcp(FLWCVector2 V) { return LWCRcpScaled(V, 4.76837158e-07f); }









  bool2  LWCGreater ( FLWCVector2 Lhs, FLWCVector2 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f > Rhs.Offset - Lhs.Offset; } bool2  LWCGreater ( float2 Lhs, FLWCVector2 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f > Rhs.Offset - Lhs; } bool2  LWCGreater ( FLWCVector2 Lhs, float2 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f > Rhs - Lhs.Offset; }
  bool2  LWCGreaterEqual ( FLWCVector2 Lhs, FLWCVector2 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f >= Rhs.Offset - Lhs.Offset; } bool2  LWCGreaterEqual ( float2 Lhs, FLWCVector2 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f >= Rhs.Offset - Lhs; } bool2  LWCGreaterEqual ( FLWCVector2 Lhs, float2 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f >= Rhs - Lhs.Offset; }
  bool2  LWCLess ( FLWCVector2 Lhs, FLWCVector2 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f < Rhs.Offset - Lhs.Offset; } bool2  LWCLess ( float2 Lhs, FLWCVector2 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f < Rhs.Offset - Lhs; } bool2  LWCLess ( FLWCVector2 Lhs, float2 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f < Rhs - Lhs.Offset; }
  bool2  LWCLessEqual ( FLWCVector2 Lhs, FLWCVector2 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f <= Rhs.Offset - Lhs.Offset; } bool2  LWCLessEqual ( float2 Lhs, FLWCVector2 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f <= Rhs.Offset - Lhs; } bool2  LWCLessEqual ( FLWCVector2 Lhs, float2 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f <= Rhs - Lhs.Offset; }





float2 LWCDdx(FLWCVector2 V) { return (float2)0; }
float2 LWCDdy(FLWCVector2 V) { return (float2)0; }





FLWCVector2 LWCAdd(FLWCVector2 Lhs, FLWCVector2 Rhs) { return MakeLWCVector2( (( Lhs ).Tile) +  (( Rhs ).Tile), Lhs.Offset + Rhs.Offset); }
FLWCVector2 LWCAdd(float2 Lhs, FLWCVector2 Rhs) { return MakeLWCVector2( (( Rhs ).Tile), Lhs + Rhs.Offset); }
FLWCVector2 LWCAdd(FLWCVector2 Lhs, float2 Rhs) { return MakeLWCVector2( (( Lhs ).Tile), Lhs.Offset + Rhs); }

FLWCVector2 LWCSubtract(FLWCVector2 Lhs, FLWCVector2 Rhs) { return MakeLWCVector2( (( Lhs ).Tile) -  (( Rhs ).Tile), Lhs.Offset - Rhs.Offset); }
FLWCVector2 LWCSubtract(float2 Lhs, FLWCVector2 Rhs) { return MakeLWCVector2(- (( Rhs ).Tile), Lhs - Rhs.Offset); }
FLWCVector2 LWCSubtract(FLWCVector2 Lhs, float2 Rhs) { return MakeLWCVector2( (( Lhs ).Tile), Lhs.Offset - Rhs); }

bool2 LWCEquals(FLWCVector2 Lhs, FLWCVector2 Rhs)
{
	return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f == Rhs.Offset - Lhs.Offset;
}
bool2 LWCEquals(float2 Lhs, FLWCVector2 Rhs)
{
	return - (( Rhs ).Tile) * 2097152.00f == Rhs.Offset - Lhs;
} 
bool2 LWCEquals(FLWCVector2 Lhs, float2 Rhs)
{
	return  (( Lhs ).Tile) * 2097152.00f == Rhs - Lhs.Offset;
}
bool2 LWCEqualsApprox(FLWCVector2 Lhs, FLWCVector2 Rhs, float Threshold)
{
	return abs(( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f + (Lhs.Offset - Rhs.Offset)) < (float2)Threshold;
}
bool2 LWCEqualsApprox(float2 Lhs, FLWCVector2 Rhs, float Threshold)
{
	return abs(- (( Rhs ).Tile) * 2097152.00f + (Lhs - Rhs.Offset)) < (float2)Threshold;
}
bool2 LWCEqualsApprox(FLWCVector2 Lhs, float2 Rhs, float Threshold)
{
	return abs( (( Lhs ).Tile) * 2097152.00f + (Lhs.Offset - Rhs)) < (float2)Threshold;
}

FLWCVector2 LWCSelect(bool2 S, FLWCVector2 Lhs, FLWCVector2 Rhs) { return MakeLWCVector2( select_internal( S ,  (( Lhs ).Tile) ,  (( Rhs ).Tile) ),  select_internal( S , Lhs.Offset , Rhs.Offset )); }
FLWCVector2 LWCSelect(bool2 S, float2 Lhs, FLWCVector2 Rhs) { return MakeLWCVector2( select_internal( S , (float2)0 ,  (( Rhs ).Tile) ),  select_internal( S , Lhs , Rhs.Offset )); }
FLWCVector2 LWCSelect(bool2 S, FLWCVector2 Lhs, float2 Rhs) { return MakeLWCVector2( select_internal( S ,  (( Lhs ).Tile) , (float2)0 ),  select_internal( S , Lhs.Offset , Rhs )); }

FLWCVector2 LWCNegate(FLWCVector2 V) { return MakeLWCVector2(- (( V ).Tile), -V.Offset); }

float2 LWCFrac(FLWCVector2 V)
{
	float2 FracTile = frac( (( V ).Tile) * 2097152.00f);
	return frac(FracTile + V.Offset);
}

FLWCVector2 LWCFloor(FLWCVector2 V) { FLWCVector2 VN = LWCMakeIntTile(V); return MakeLWCVector2( (( VN ).Tile), floor(VN.Offset)); }
FLWCVector2 LWCCeil(FLWCVector2 V) { FLWCVector2 VN = LWCMakeIntTile(V); return MakeLWCVector2( (( VN ).Tile), ceil(VN.Offset)); }
FLWCVector2 LWCRound(FLWCVector2 V) { FLWCVector2 VN = LWCMakeIntTile(V); return MakeLWCVector2( (( VN ).Tile), round(VN.Offset)); }
FLWCVector2 LWCTrunc(FLWCVector2 V) { FLWCVector2 VN = LWCMakeIntTile(V); return MakeLWCVector2( (( VN ).Tile), trunc(VN.Offset)); }


float2 LWCSign(FLWCVector2 V) { return float2(sign(LWCToFloat(V))); }
float2 LWCSaturate(FLWCVector2 V) { return saturate(LWCToFloat(V)); }
float2 LWCClampScalar(FLWCVector2 V, float Low, float High) { return clamp(LWCToFloat(V), Low, High); }

FLWCVector2 LWCMultiply(FLWCVector2 Lhs, FLWCVector2 Rhs)
{
	return MakeLWCVector2( (( Lhs ).Tile) * ( (( Rhs ).Tile) * 2097152.00f + Rhs.Offset) +  (( Rhs ).Tile) * Lhs.Offset, Lhs.Offset * Rhs.Offset);
}
FLWCVector2 LWCMultiply(float2 Lhs, FLWCVector2 Rhs) { return MakeLWCVector2( (( Rhs ).Tile) * Lhs, Lhs * Rhs.Offset); }
FLWCVector2 LWCMultiply(FLWCVector2 Lhs, float2 Rhs) { return MakeLWCVector2( (( Lhs ).Tile) * Rhs, Lhs.Offset * Rhs); }

FLWCVector2 LWCDivide(FLWCVector2 Lhs, FLWCVector2 Rhs) { return LWCMultiply(Lhs, LWCRcp(Rhs)); }
FLWCVector2 LWCDivide(FLWCVector2 Lhs, float2 Rhs) { return LWCMultiply(Lhs, rcp(Rhs)); }
FLWCVector2 LWCDivide(float2 Lhs, FLWCVector2 Rhs) { return MakeLWCVector2((float2)0, Lhs * LWCRcp(Rhs)); }


FLWCVector2 LWCLerp(FLWCVector2 Lhs, FLWCVector2 Rhs, float2 S)
{
	return MakeLWCVector2(lerp( (( Lhs ).Tile),  (( Rhs ).Tile), S), lerp(Lhs.Offset, Rhs.Offset, S));
}

float2 LWCFmod(FLWCVector2 Lhs, float2 Rhs)
{
	return LWCToFloat(LWCSubtract(Lhs, LWCMultiply(LWCTrunc(LWCDivide(Lhs, Rhs)), Rhs)));
	
	
}
float2 LWCFmodFloor(FLWCVector2 Lhs, float2 Rhs)
{
	return LWCToFloat(LWCSubtract(Lhs, LWCMultiply(LWCFloor(LWCDivide(Lhs, Rhs)), Rhs)));
	
	
}
float2 LWCFmodFloorPI(FLWCVector2 V)
{
	return LWCFmodFloor(V, PI);
	
}
float2 LWCFmodFloor2PI(FLWCVector2 V)
{
	return LWCFmodFloor(V, 2.0f * PI);
	
}

float2 LWCSin(FLWCVector2 V) { return sin(LWCFmodFloor2PI(V)); }
float2 LWCCos(FLWCVector2 V) { return cos(LWCFmodFloor2PI(V)); }
float2 LWCTan(FLWCVector2 V) { return tan(LWCFmodFloorPI(V)); }
float2 LWCASin(FLWCVector2 V) { return asin(LWCClampScalar(V, -1.0f, 1.0f)); }
float2 LWCACos(FLWCVector2 V) { return acos(LWCClampScalar(V, -1.0f, 1.0f)); }
float2 LWCATan(FLWCVector2 V) { return atan(LWCClampScalar(V, -0.5f*PI, 0.5f*PI)); }

float2 LWCSmoothStep(FLWCVector2 Lhs, FLWCVector2 Rhs, FLWCVector2 S)
{
	float2 t = LWCSaturate(LWCDivide(LWCSubtract(S, Lhs), LWCSubtract(Rhs, Lhs)));
	return t*t*(3.0f - (2.0f*t));
}

FLWCVector2 LWCMin(FLWCVector2 Lhs, FLWCVector2 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector2 LWCMin(float2 Lhs, FLWCVector2 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector2 LWCMin(FLWCVector2 Lhs, float2 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector2 LWCMax(FLWCVector2 Lhs, FLWCVector2 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }
FLWCVector2 LWCMax(float2 Lhs, FLWCVector2 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }
FLWCVector2 LWCMax(FLWCVector2 Lhs, float2 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }

FLWCVector2 LWCAbs(FLWCVector2 V) { return LWCSelect(LWCLess(V, (float2)0), LWCNegate(V), V); }

float2 LWCStep(FLWCVector2 Lhs, FLWCVector2 Rhs)   { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float2)1.0f , (float2)0.0f ); }
float2 LWCStep(FLWCVector2 Lhs, float2 Rhs) { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float2)1.0f , (float2)0.0f ); }
float2 LWCStep(float2 Lhs, FLWCVector2 Rhs) { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float2)1.0f , (float2)0.0f ); }


FLWCVector2 LWCSquareScaled(FLWCVector2 V)
{
	float2 OffsetScaled = V.Offset * 4.76837158e-07f;
	return MakeLWCVector2( (( V ).Tile) * ( (( V ).Tile) + OffsetScaled * 2.0f), V.Offset * OffsetScaled);
}
#line 386 "/Engine/Private/LargeWorldCoordinates.ush"










#line   5 "/Engine/Private/LWCOperations.ush"
FLWCVector3 LWCNormalizeTile(FLWCVector3 V)
{
	float3 IntTile = floor(V.Tile + (V.Offset * 4.76837158e-07f + 0.5f));
	return MakeLWCVector3(IntTile, (V.Tile - IntTile) * 2097152.00f + V.Offset);
}


FLWCVector3 LWCMakeIntTile(FLWCVector3 V)
{
	float3 IntTile = floor(V.Tile);
	return MakeLWCVector3(IntTile, (V.Tile - IntTile) * 2097152.00f + V.Offset);
}

float3 LWCSqrtUnscaled(FLWCVector3 V) { return sqrt(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float3 LWCRsqrtUnscaled(FLWCVector3 V) { return rsqrt(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float3 LWCRcpUnscaled(FLWCVector3 V) { return rcp(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float3 LWCSqrtScaled(FLWCVector3 V, float Scale) { return LWCSqrtUnscaled(V) * Scale; }
float3 LWCRsqrtScaled(FLWCVector3 V, float Scale) { return LWCRsqrtUnscaled(V) * Scale; }
float3 LWCRcpScaled(FLWCVector3 V, float Scale) { return LWCRcpUnscaled(V) * Scale; }
float3 LWCSqrt(FLWCVector3 V) { return LWCSqrtScaled(V, 1448.15466f); }
float3 LWCRsqrt(FLWCVector3 V) { return LWCRsqrtScaled(V, 0.000690533954f); }
float3 LWCRcp(FLWCVector3 V) { return LWCRcpScaled(V, 4.76837158e-07f); }









  bool3  LWCGreater ( FLWCVector3 Lhs, FLWCVector3 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f > Rhs.Offset - Lhs.Offset; } bool3  LWCGreater ( float3 Lhs, FLWCVector3 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f > Rhs.Offset - Lhs; } bool3  LWCGreater ( FLWCVector3 Lhs, float3 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f > Rhs - Lhs.Offset; }
  bool3  LWCGreaterEqual ( FLWCVector3 Lhs, FLWCVector3 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f >= Rhs.Offset - Lhs.Offset; } bool3  LWCGreaterEqual ( float3 Lhs, FLWCVector3 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f >= Rhs.Offset - Lhs; } bool3  LWCGreaterEqual ( FLWCVector3 Lhs, float3 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f >= Rhs - Lhs.Offset; }
  bool3  LWCLess ( FLWCVector3 Lhs, FLWCVector3 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f < Rhs.Offset - Lhs.Offset; } bool3  LWCLess ( float3 Lhs, FLWCVector3 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f < Rhs.Offset - Lhs; } bool3  LWCLess ( FLWCVector3 Lhs, float3 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f < Rhs - Lhs.Offset; }
  bool3  LWCLessEqual ( FLWCVector3 Lhs, FLWCVector3 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f <= Rhs.Offset - Lhs.Offset; } bool3  LWCLessEqual ( float3 Lhs, FLWCVector3 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f <= Rhs.Offset - Lhs; } bool3  LWCLessEqual ( FLWCVector3 Lhs, float3 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f <= Rhs - Lhs.Offset; }





float3 LWCDdx(FLWCVector3 V) { return (float3)0; }
float3 LWCDdy(FLWCVector3 V) { return (float3)0; }





FLWCVector3 LWCAdd(FLWCVector3 Lhs, FLWCVector3 Rhs) { return MakeLWCVector3( (( Lhs ).Tile) +  (( Rhs ).Tile), Lhs.Offset + Rhs.Offset); }
FLWCVector3 LWCAdd(float3 Lhs, FLWCVector3 Rhs) { return MakeLWCVector3( (( Rhs ).Tile), Lhs + Rhs.Offset); }
FLWCVector3 LWCAdd(FLWCVector3 Lhs, float3 Rhs) { return MakeLWCVector3( (( Lhs ).Tile), Lhs.Offset + Rhs); }

FLWCVector3 LWCSubtract(FLWCVector3 Lhs, FLWCVector3 Rhs) { return MakeLWCVector3( (( Lhs ).Tile) -  (( Rhs ).Tile), Lhs.Offset - Rhs.Offset); }
FLWCVector3 LWCSubtract(float3 Lhs, FLWCVector3 Rhs) { return MakeLWCVector3(- (( Rhs ).Tile), Lhs - Rhs.Offset); }
FLWCVector3 LWCSubtract(FLWCVector3 Lhs, float3 Rhs) { return MakeLWCVector3( (( Lhs ).Tile), Lhs.Offset - Rhs); }

bool3 LWCEquals(FLWCVector3 Lhs, FLWCVector3 Rhs)
{
	return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f == Rhs.Offset - Lhs.Offset;
}
bool3 LWCEquals(float3 Lhs, FLWCVector3 Rhs)
{
	return - (( Rhs ).Tile) * 2097152.00f == Rhs.Offset - Lhs;
} 
bool3 LWCEquals(FLWCVector3 Lhs, float3 Rhs)
{
	return  (( Lhs ).Tile) * 2097152.00f == Rhs - Lhs.Offset;
}
bool3 LWCEqualsApprox(FLWCVector3 Lhs, FLWCVector3 Rhs, float Threshold)
{
	return abs(( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f + (Lhs.Offset - Rhs.Offset)) < (float3)Threshold;
}
bool3 LWCEqualsApprox(float3 Lhs, FLWCVector3 Rhs, float Threshold)
{
	return abs(- (( Rhs ).Tile) * 2097152.00f + (Lhs - Rhs.Offset)) < (float3)Threshold;
}
bool3 LWCEqualsApprox(FLWCVector3 Lhs, float3 Rhs, float Threshold)
{
	return abs( (( Lhs ).Tile) * 2097152.00f + (Lhs.Offset - Rhs)) < (float3)Threshold;
}

FLWCVector3 LWCSelect(bool3 S, FLWCVector3 Lhs, FLWCVector3 Rhs) { return MakeLWCVector3( select_internal( S ,  (( Lhs ).Tile) ,  (( Rhs ).Tile) ),  select_internal( S , Lhs.Offset , Rhs.Offset )); }
FLWCVector3 LWCSelect(bool3 S, float3 Lhs, FLWCVector3 Rhs) { return MakeLWCVector3( select_internal( S , (float3)0 ,  (( Rhs ).Tile) ),  select_internal( S , Lhs , Rhs.Offset )); }
FLWCVector3 LWCSelect(bool3 S, FLWCVector3 Lhs, float3 Rhs) { return MakeLWCVector3( select_internal( S ,  (( Lhs ).Tile) , (float3)0 ),  select_internal( S , Lhs.Offset , Rhs )); }

FLWCVector3 LWCNegate(FLWCVector3 V) { return MakeLWCVector3(- (( V ).Tile), -V.Offset); }

float3 LWCFrac(FLWCVector3 V)
{
	float3 FracTile = frac( (( V ).Tile) * 2097152.00f);
	return frac(FracTile + V.Offset);
}

FLWCVector3 LWCFloor(FLWCVector3 V) { FLWCVector3 VN = LWCMakeIntTile(V); return MakeLWCVector3( (( VN ).Tile), floor(VN.Offset)); }
FLWCVector3 LWCCeil(FLWCVector3 V) { FLWCVector3 VN = LWCMakeIntTile(V); return MakeLWCVector3( (( VN ).Tile), ceil(VN.Offset)); }
FLWCVector3 LWCRound(FLWCVector3 V) { FLWCVector3 VN = LWCMakeIntTile(V); return MakeLWCVector3( (( VN ).Tile), round(VN.Offset)); }
FLWCVector3 LWCTrunc(FLWCVector3 V) { FLWCVector3 VN = LWCMakeIntTile(V); return MakeLWCVector3( (( VN ).Tile), trunc(VN.Offset)); }


float3 LWCSign(FLWCVector3 V) { return float3(sign(LWCToFloat(V))); }
float3 LWCSaturate(FLWCVector3 V) { return saturate(LWCToFloat(V)); }
float3 LWCClampScalar(FLWCVector3 V, float Low, float High) { return clamp(LWCToFloat(V), Low, High); }

FLWCVector3 LWCMultiply(FLWCVector3 Lhs, FLWCVector3 Rhs)
{
	return MakeLWCVector3( (( Lhs ).Tile) * ( (( Rhs ).Tile) * 2097152.00f + Rhs.Offset) +  (( Rhs ).Tile) * Lhs.Offset, Lhs.Offset * Rhs.Offset);
}
FLWCVector3 LWCMultiply(float3 Lhs, FLWCVector3 Rhs) { return MakeLWCVector3( (( Rhs ).Tile) * Lhs, Lhs * Rhs.Offset); }
FLWCVector3 LWCMultiply(FLWCVector3 Lhs, float3 Rhs) { return MakeLWCVector3( (( Lhs ).Tile) * Rhs, Lhs.Offset * Rhs); }

FLWCVector3 LWCDivide(FLWCVector3 Lhs, FLWCVector3 Rhs) { return LWCMultiply(Lhs, LWCRcp(Rhs)); }
FLWCVector3 LWCDivide(FLWCVector3 Lhs, float3 Rhs) { return LWCMultiply(Lhs, rcp(Rhs)); }
FLWCVector3 LWCDivide(float3 Lhs, FLWCVector3 Rhs) { return MakeLWCVector3((float3)0, Lhs * LWCRcp(Rhs)); }


FLWCVector3 LWCLerp(FLWCVector3 Lhs, FLWCVector3 Rhs, float3 S)
{
	return MakeLWCVector3(lerp( (( Lhs ).Tile),  (( Rhs ).Tile), S), lerp(Lhs.Offset, Rhs.Offset, S));
}

float3 LWCFmod(FLWCVector3 Lhs, float3 Rhs)
{
	return LWCToFloat(LWCSubtract(Lhs, LWCMultiply(LWCTrunc(LWCDivide(Lhs, Rhs)), Rhs)));
	
	
}
float3 LWCFmodFloor(FLWCVector3 Lhs, float3 Rhs)
{
	return LWCToFloat(LWCSubtract(Lhs, LWCMultiply(LWCFloor(LWCDivide(Lhs, Rhs)), Rhs)));
	
	
}
float3 LWCFmodFloorPI(FLWCVector3 V)
{
	return LWCFmodFloor(V, PI);
	
}
float3 LWCFmodFloor2PI(FLWCVector3 V)
{
	return LWCFmodFloor(V, 2.0f * PI);
	
}

float3 LWCSin(FLWCVector3 V) { return sin(LWCFmodFloor2PI(V)); }
float3 LWCCos(FLWCVector3 V) { return cos(LWCFmodFloor2PI(V)); }
float3 LWCTan(FLWCVector3 V) { return tan(LWCFmodFloorPI(V)); }
float3 LWCASin(FLWCVector3 V) { return asin(LWCClampScalar(V, -1.0f, 1.0f)); }
float3 LWCACos(FLWCVector3 V) { return acos(LWCClampScalar(V, -1.0f, 1.0f)); }
float3 LWCATan(FLWCVector3 V) { return atan(LWCClampScalar(V, -0.5f*PI, 0.5f*PI)); }

float3 LWCSmoothStep(FLWCVector3 Lhs, FLWCVector3 Rhs, FLWCVector3 S)
{
	float3 t = LWCSaturate(LWCDivide(LWCSubtract(S, Lhs), LWCSubtract(Rhs, Lhs)));
	return t*t*(3.0f - (2.0f*t));
}

FLWCVector3 LWCMin(FLWCVector3 Lhs, FLWCVector3 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector3 LWCMin(float3 Lhs, FLWCVector3 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector3 LWCMin(FLWCVector3 Lhs, float3 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector3 LWCMax(FLWCVector3 Lhs, FLWCVector3 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }
FLWCVector3 LWCMax(float3 Lhs, FLWCVector3 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }
FLWCVector3 LWCMax(FLWCVector3 Lhs, float3 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }

FLWCVector3 LWCAbs(FLWCVector3 V) { return LWCSelect(LWCLess(V, (float3)0), LWCNegate(V), V); }

float3 LWCStep(FLWCVector3 Lhs, FLWCVector3 Rhs)   { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float3)1.0f , (float3)0.0f ); }
float3 LWCStep(FLWCVector3 Lhs, float3 Rhs) { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float3)1.0f , (float3)0.0f ); }
float3 LWCStep(float3 Lhs, FLWCVector3 Rhs) { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float3)1.0f , (float3)0.0f ); }


FLWCVector3 LWCSquareScaled(FLWCVector3 V)
{
	float3 OffsetScaled = V.Offset * 4.76837158e-07f;
	return MakeLWCVector3( (( V ).Tile) * ( (( V ).Tile) + OffsetScaled * 2.0f), V.Offset * OffsetScaled);
}
#line 396 "/Engine/Private/LargeWorldCoordinates.ush"










#line   5 "/Engine/Private/LWCOperations.ush"
FLWCVector4 LWCNormalizeTile(FLWCVector4 V)
{
	float4 IntTile = floor(V.Tile + (V.Offset * 4.76837158e-07f + 0.5f));
	return MakeLWCVector4(IntTile, (V.Tile - IntTile) * 2097152.00f + V.Offset);
}


FLWCVector4 LWCMakeIntTile(FLWCVector4 V)
{
	float4 IntTile = floor(V.Tile);
	return MakeLWCVector4(IntTile, (V.Tile - IntTile) * 2097152.00f + V.Offset);
}

float4 LWCSqrtUnscaled(FLWCVector4 V) { return sqrt(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float4 LWCRsqrtUnscaled(FLWCVector4 V) { return rsqrt(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float4 LWCRcpUnscaled(FLWCVector4 V) { return rcp(V.Offset * 4.76837158e-07f +  (( V ).Tile)); }
float4 LWCSqrtScaled(FLWCVector4 V, float Scale) { return LWCSqrtUnscaled(V) * Scale; }
float4 LWCRsqrtScaled(FLWCVector4 V, float Scale) { return LWCRsqrtUnscaled(V) * Scale; }
float4 LWCRcpScaled(FLWCVector4 V, float Scale) { return LWCRcpUnscaled(V) * Scale; }
float4 LWCSqrt(FLWCVector4 V) { return LWCSqrtScaled(V, 1448.15466f); }
float4 LWCRsqrt(FLWCVector4 V) { return LWCRsqrtScaled(V, 0.000690533954f); }
float4 LWCRcp(FLWCVector4 V) { return LWCRcpScaled(V, 4.76837158e-07f); }









  bool4  LWCGreater ( FLWCVector4 Lhs, FLWCVector4 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f > Rhs.Offset - Lhs.Offset; } bool4  LWCGreater ( float4 Lhs, FLWCVector4 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f > Rhs.Offset - Lhs; } bool4  LWCGreater ( FLWCVector4 Lhs, float4 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f > Rhs - Lhs.Offset; }
  bool4  LWCGreaterEqual ( FLWCVector4 Lhs, FLWCVector4 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f >= Rhs.Offset - Lhs.Offset; } bool4  LWCGreaterEqual ( float4 Lhs, FLWCVector4 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f >= Rhs.Offset - Lhs; } bool4  LWCGreaterEqual ( FLWCVector4 Lhs, float4 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f >= Rhs - Lhs.Offset; }
  bool4  LWCLess ( FLWCVector4 Lhs, FLWCVector4 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f < Rhs.Offset - Lhs.Offset; } bool4  LWCLess ( float4 Lhs, FLWCVector4 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f < Rhs.Offset - Lhs; } bool4  LWCLess ( FLWCVector4 Lhs, float4 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f < Rhs - Lhs.Offset; }
  bool4  LWCLessEqual ( FLWCVector4 Lhs, FLWCVector4 Rhs) { 		return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f <= Rhs.Offset - Lhs.Offset; } bool4  LWCLessEqual ( float4 Lhs, FLWCVector4 Rhs) { 		return - (( Rhs ).Tile) * 2097152.00f <= Rhs.Offset - Lhs; } bool4  LWCLessEqual ( FLWCVector4 Lhs, float4 Rhs) { 		return  (( Lhs ).Tile) * 2097152.00f <= Rhs - Lhs.Offset; }





float4 LWCDdx(FLWCVector4 V) { return (float4)0; }
float4 LWCDdy(FLWCVector4 V) { return (float4)0; }





FLWCVector4 LWCAdd(FLWCVector4 Lhs, FLWCVector4 Rhs) { return MakeLWCVector4( (( Lhs ).Tile) +  (( Rhs ).Tile), Lhs.Offset + Rhs.Offset); }
FLWCVector4 LWCAdd(float4 Lhs, FLWCVector4 Rhs) { return MakeLWCVector4( (( Rhs ).Tile), Lhs + Rhs.Offset); }
FLWCVector4 LWCAdd(FLWCVector4 Lhs, float4 Rhs) { return MakeLWCVector4( (( Lhs ).Tile), Lhs.Offset + Rhs); }

FLWCVector4 LWCSubtract(FLWCVector4 Lhs, FLWCVector4 Rhs) { return MakeLWCVector4( (( Lhs ).Tile) -  (( Rhs ).Tile), Lhs.Offset - Rhs.Offset); }
FLWCVector4 LWCSubtract(float4 Lhs, FLWCVector4 Rhs) { return MakeLWCVector4(- (( Rhs ).Tile), Lhs - Rhs.Offset); }
FLWCVector4 LWCSubtract(FLWCVector4 Lhs, float4 Rhs) { return MakeLWCVector4( (( Lhs ).Tile), Lhs.Offset - Rhs); }

bool4 LWCEquals(FLWCVector4 Lhs, FLWCVector4 Rhs)
{
	return ( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f == Rhs.Offset - Lhs.Offset;
}
bool4 LWCEquals(float4 Lhs, FLWCVector4 Rhs)
{
	return - (( Rhs ).Tile) * 2097152.00f == Rhs.Offset - Lhs;
} 
bool4 LWCEquals(FLWCVector4 Lhs, float4 Rhs)
{
	return  (( Lhs ).Tile) * 2097152.00f == Rhs - Lhs.Offset;
}
bool4 LWCEqualsApprox(FLWCVector4 Lhs, FLWCVector4 Rhs, float Threshold)
{
	return abs(( (( Lhs ).Tile) -  (( Rhs ).Tile)) * 2097152.00f + (Lhs.Offset - Rhs.Offset)) < (float4)Threshold;
}
bool4 LWCEqualsApprox(float4 Lhs, FLWCVector4 Rhs, float Threshold)
{
	return abs(- (( Rhs ).Tile) * 2097152.00f + (Lhs - Rhs.Offset)) < (float4)Threshold;
}
bool4 LWCEqualsApprox(FLWCVector4 Lhs, float4 Rhs, float Threshold)
{
	return abs( (( Lhs ).Tile) * 2097152.00f + (Lhs.Offset - Rhs)) < (float4)Threshold;
}

FLWCVector4 LWCSelect(bool4 S, FLWCVector4 Lhs, FLWCVector4 Rhs) { return MakeLWCVector4( select_internal( S ,  (( Lhs ).Tile) ,  (( Rhs ).Tile) ),  select_internal( S , Lhs.Offset , Rhs.Offset )); }
FLWCVector4 LWCSelect(bool4 S, float4 Lhs, FLWCVector4 Rhs) { return MakeLWCVector4( select_internal( S , (float4)0 ,  (( Rhs ).Tile) ),  select_internal( S , Lhs , Rhs.Offset )); }
FLWCVector4 LWCSelect(bool4 S, FLWCVector4 Lhs, float4 Rhs) { return MakeLWCVector4( select_internal( S ,  (( Lhs ).Tile) , (float4)0 ),  select_internal( S , Lhs.Offset , Rhs )); }

FLWCVector4 LWCNegate(FLWCVector4 V) { return MakeLWCVector4(- (( V ).Tile), -V.Offset); }

float4 LWCFrac(FLWCVector4 V)
{
	float4 FracTile = frac( (( V ).Tile) * 2097152.00f);
	return frac(FracTile + V.Offset);
}

FLWCVector4 LWCFloor(FLWCVector4 V) { FLWCVector4 VN = LWCMakeIntTile(V); return MakeLWCVector4( (( VN ).Tile), floor(VN.Offset)); }
FLWCVector4 LWCCeil(FLWCVector4 V) { FLWCVector4 VN = LWCMakeIntTile(V); return MakeLWCVector4( (( VN ).Tile), ceil(VN.Offset)); }
FLWCVector4 LWCRound(FLWCVector4 V) { FLWCVector4 VN = LWCMakeIntTile(V); return MakeLWCVector4( (( VN ).Tile), round(VN.Offset)); }
FLWCVector4 LWCTrunc(FLWCVector4 V) { FLWCVector4 VN = LWCMakeIntTile(V); return MakeLWCVector4( (( VN ).Tile), trunc(VN.Offset)); }


float4 LWCSign(FLWCVector4 V) { return float4(sign(LWCToFloat(V))); }
float4 LWCSaturate(FLWCVector4 V) { return saturate(LWCToFloat(V)); }
float4 LWCClampScalar(FLWCVector4 V, float Low, float High) { return clamp(LWCToFloat(V), Low, High); }

FLWCVector4 LWCMultiply(FLWCVector4 Lhs, FLWCVector4 Rhs)
{
	return MakeLWCVector4( (( Lhs ).Tile) * ( (( Rhs ).Tile) * 2097152.00f + Rhs.Offset) +  (( Rhs ).Tile) * Lhs.Offset, Lhs.Offset * Rhs.Offset);
}
FLWCVector4 LWCMultiply(float4 Lhs, FLWCVector4 Rhs) { return MakeLWCVector4( (( Rhs ).Tile) * Lhs, Lhs * Rhs.Offset); }
FLWCVector4 LWCMultiply(FLWCVector4 Lhs, float4 Rhs) { return MakeLWCVector4( (( Lhs ).Tile) * Rhs, Lhs.Offset * Rhs); }

FLWCVector4 LWCDivide(FLWCVector4 Lhs, FLWCVector4 Rhs) { return LWCMultiply(Lhs, LWCRcp(Rhs)); }
FLWCVector4 LWCDivide(FLWCVector4 Lhs, float4 Rhs) { return LWCMultiply(Lhs, rcp(Rhs)); }
FLWCVector4 LWCDivide(float4 Lhs, FLWCVector4 Rhs) { return MakeLWCVector4((float4)0, Lhs * LWCRcp(Rhs)); }


FLWCVector4 LWCLerp(FLWCVector4 Lhs, FLWCVector4 Rhs, float4 S)
{
	return MakeLWCVector4(lerp( (( Lhs ).Tile),  (( Rhs ).Tile), S), lerp(Lhs.Offset, Rhs.Offset, S));
}

float4 LWCFmod(FLWCVector4 Lhs, float4 Rhs)
{
	return LWCToFloat(LWCSubtract(Lhs, LWCMultiply(LWCTrunc(LWCDivide(Lhs, Rhs)), Rhs)));
	
	
}
float4 LWCFmodFloor(FLWCVector4 Lhs, float4 Rhs)
{
	return LWCToFloat(LWCSubtract(Lhs, LWCMultiply(LWCFloor(LWCDivide(Lhs, Rhs)), Rhs)));
	
	
}
float4 LWCFmodFloorPI(FLWCVector4 V)
{
	return LWCFmodFloor(V, PI);
	
}
float4 LWCFmodFloor2PI(FLWCVector4 V)
{
	return LWCFmodFloor(V, 2.0f * PI);
	
}

float4 LWCSin(FLWCVector4 V) { return sin(LWCFmodFloor2PI(V)); }
float4 LWCCos(FLWCVector4 V) { return cos(LWCFmodFloor2PI(V)); }
float4 LWCTan(FLWCVector4 V) { return tan(LWCFmodFloorPI(V)); }
float4 LWCASin(FLWCVector4 V) { return asin(LWCClampScalar(V, -1.0f, 1.0f)); }
float4 LWCACos(FLWCVector4 V) { return acos(LWCClampScalar(V, -1.0f, 1.0f)); }
float4 LWCATan(FLWCVector4 V) { return atan(LWCClampScalar(V, -0.5f*PI, 0.5f*PI)); }

float4 LWCSmoothStep(FLWCVector4 Lhs, FLWCVector4 Rhs, FLWCVector4 S)
{
	float4 t = LWCSaturate(LWCDivide(LWCSubtract(S, Lhs), LWCSubtract(Rhs, Lhs)));
	return t*t*(3.0f - (2.0f*t));
}

FLWCVector4 LWCMin(FLWCVector4 Lhs, FLWCVector4 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector4 LWCMin(float4 Lhs, FLWCVector4 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector4 LWCMin(FLWCVector4 Lhs, float4 Rhs) { return LWCSelect(LWCLess(Lhs, Rhs), Lhs, Rhs); }
FLWCVector4 LWCMax(FLWCVector4 Lhs, FLWCVector4 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }
FLWCVector4 LWCMax(float4 Lhs, FLWCVector4 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }
FLWCVector4 LWCMax(FLWCVector4 Lhs, float4 Rhs) { return LWCSelect(LWCGreater(Lhs, Rhs), Lhs, Rhs); }

FLWCVector4 LWCAbs(FLWCVector4 V) { return LWCSelect(LWCLess(V, (float4)0), LWCNegate(V), V); }

float4 LWCStep(FLWCVector4 Lhs, FLWCVector4 Rhs)   { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float4)1.0f , (float4)0.0f ); }
float4 LWCStep(FLWCVector4 Lhs, float4 Rhs) { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float4)1.0f , (float4)0.0f ); }
float4 LWCStep(float4 Lhs, FLWCVector4 Rhs) { return  select_internal( LWCGreaterEqual(Rhs, Lhs) , (float4)1.0f , (float4)0.0f ); }


FLWCVector4 LWCSquareScaled(FLWCVector4 V)
{
	float4 OffsetScaled = V.Offset * 4.76837158e-07f;
	return MakeLWCVector4( (( V ).Tile) * ( (( V ).Tile) + OffsetScaled * 2.0f), V.Offset * OffsetScaled);
}
#line 406 "/Engine/Private/LargeWorldCoordinates.ush"







FLWCScalar LWCMakeRelativeToTile(FLWCScalar V, float NewTile) { return MakeLWCScalar(NewTile, LWCToFloat(LWCSubtract(V, MakeLWCScalar(NewTile, (float)0.0f)))); }
FLWCVector2 LWCMakeRelativeToTile(FLWCVector2 V, float2 NewTile) { return MakeLWCVector2(NewTile, LWCToFloat(LWCSubtract(V, MakeLWCVector2(NewTile, (float2)0.0f)))); }
FLWCVector3 LWCMakeRelativeToTile(FLWCVector3 V, float3 NewTile) { return MakeLWCVector3(NewTile, LWCToFloat(LWCSubtract(V, MakeLWCVector3(NewTile, (float3)0.0f)))); }
FLWCVector4 LWCMakeRelativeToTile(FLWCVector4 V, float4 NewTile) { return MakeLWCVector4(NewTile, LWCToFloat(LWCSubtract(V, MakeLWCVector4(NewTile, (float4)0.0f)))); }
FLWCMatrix LWCMakeRelativeToTile(FLWCMatrix M, float3 NewTile)
{
	LWCSetOrigin(M, LWCMakeRelativeToTile(LWCGetOrigin(M), NewTile));
	return M;
}

FLWCScalar LWCVectorSum(FLWCScalar V) { return V; }
FLWCScalar LWCVectorSum(FLWCVector2 V) { return LWCAdd( LWCGetComponent( V , 0),  LWCGetComponent( V , 1)); }
FLWCScalar LWCVectorSum(FLWCVector3 V) { return LWCAdd(LWCAdd( LWCGetComponent( V , 0),  LWCGetComponent( V , 1)),  LWCGetComponent( V , 2)); }
FLWCScalar LWCVectorSum(FLWCVector4 V) { return LWCAdd(LWCAdd(LWCAdd( LWCGetComponent( V , 0),  LWCGetComponent( V , 1)),  LWCGetComponent( V , 2)),  LWCGetComponent( V , 3)); }

FLWCScalar LWCDot(FLWCScalar Lhs, FLWCScalar Rhs) { return LWCMultiply(Lhs, Rhs); }
FLWCScalar LWCDot(FLWCScalar Lhs, float Rhs) { return LWCMultiply(Lhs, Rhs); }
FLWCScalar LWCDot(FLWCVector2 Lhs, FLWCVector2 Rhs) { return LWCVectorSum(LWCMultiply(Lhs, Rhs)); }
FLWCScalar LWCDot(FLWCVector2 Lhs, float2 Rhs) { return LWCVectorSum(LWCMultiply(Lhs, Rhs)); }
FLWCScalar LWCDot(FLWCVector3 Lhs, FLWCVector3 Rhs) { return LWCVectorSum(LWCMultiply(Lhs, Rhs)); }
FLWCScalar LWCDot(FLWCVector3 Lhs, float3 Rhs) { return LWCVectorSum(LWCMultiply(Lhs, Rhs)); }
FLWCScalar LWCDot(FLWCVector4 Lhs, FLWCVector4 Rhs) { return LWCVectorSum(LWCMultiply(Lhs, Rhs)); }
FLWCScalar LWCDot(FLWCVector4 Lhs, float4 Rhs) { return LWCVectorSum(LWCMultiply(Lhs, Rhs)); }


FLWCScalar LWCLength2Scaled(FLWCScalar V)
{
	return LWCSquareScaled(V);
}

FLWCScalar LWCLength2Scaled(FLWCVector2 V)
{
	FLWCScalar X2 = LWCSquareScaled( LWCGetComponent( V , 0));
	FLWCScalar Y2 = LWCSquareScaled( LWCGetComponent( V , 1));
	return LWCAdd(X2, Y2);
}

FLWCScalar LWCLength2Scaled(FLWCVector3 V)
{
	FLWCScalar X2 = LWCSquareScaled( LWCGetComponent( V , 0));
	FLWCScalar Y2 = LWCSquareScaled( LWCGetComponent( V , 1));
	FLWCScalar Z2 = LWCSquareScaled( LWCGetComponent( V , 2));
	return LWCAdd(LWCAdd(X2, Y2), Z2);
}

FLWCScalar LWCLength2Scaled(FLWCVector4 V)
{
	FLWCScalar X2 = LWCSquareScaled( LWCGetComponent( V , 0));
	FLWCScalar Y2 = LWCSquareScaled( LWCGetComponent( V , 1));
	FLWCScalar Z2 = LWCSquareScaled( LWCGetComponent( V , 2));
	FLWCScalar W2 = LWCSquareScaled( LWCGetComponent( V , 3));
	return LWCAdd(LWCAdd(LWCAdd(X2, Y2), Z2), W2);
}



FLWCScalar LWCLength(FLWCScalar V) { return MakeLWCScalar(LWCSqrtUnscaled(LWCLength2Scaled(V)), 0.0f); }
FLWCScalar LWCLength(FLWCVector2 V) { return MakeLWCScalar(LWCSqrtUnscaled(LWCLength2Scaled(V)), 0.0f); }
FLWCScalar LWCLength(FLWCVector3 V) { return MakeLWCScalar(LWCSqrtUnscaled(LWCLength2Scaled(V)), 0.0f); }
FLWCScalar LWCLength(FLWCVector4 V) { return MakeLWCScalar(LWCSqrtUnscaled(LWCLength2Scaled(V)), 0.0f); }

float LWCRcpLength(FLWCScalar V) { return LWCRsqrtScaled(LWCLength2Scaled(V), 4.76837158e-07f); }
float LWCRcpLength(FLWCVector2 V) { return LWCRsqrtScaled(LWCLength2Scaled(V), 4.76837158e-07f); }
float LWCRcpLength(FLWCVector3 V) { return LWCRsqrtScaled(LWCLength2Scaled(V), 4.76837158e-07f); }
float LWCRcpLength(FLWCVector4 V) { return LWCRsqrtScaled(LWCLength2Scaled(V), 4.76837158e-07f); }

float LWCNormalize(FLWCScalar V) { return 1.0f; } 
float2 LWCNormalize(FLWCVector2 V) { return LWCToFloat(LWCMultiply(V, LWCRcpLength(V))); }
float3 LWCNormalize(FLWCVector3 V) { return LWCToFloat(LWCMultiply(V, LWCRcpLength(V))); }
float4 LWCNormalize(FLWCVector4 V) { return LWCToFloat(LWCMultiply(V, LWCRcpLength(V))); }












#line 201 "/Engine/Private/Common.ush"


#line   7 "/Engine/Private/InstancedStereo.ush"








#line   1 "/Engine/Generated/GeneratedInstancedStereo.ush"
struct ViewState
{
	float4x4 TranslatedWorldToClip;
	float4x4 TranslatedWorldToSubpixelClip;
	float4x4 RelativeWorldToClip;
	float4x4 ClipToRelativeWorld;
	float4x4 TranslatedWorldToView;
	float4x4 ViewToTranslatedWorld;
	float4x4 TranslatedWorldToCameraView;
	float4x4 CameraViewToTranslatedWorld;
	float4x4 ViewToClip;
	float4x4 ViewToClipNoAA;
	float4x4 ClipToView;
	float4x4 ClipToTranslatedWorld;
	float4x4 SVPositionToTranslatedWorld;
	float4x4 ScreenToRelativeWorld;
	float4x4 ScreenToTranslatedWorld;
	float4x4 MobileMultiviewShadowTransform;
	float3 ViewTilePosition;
	float3 MatrixTilePosition;
	float3 ViewForward;
	float3 ViewUp;
	float3 ViewRight;
	float3 HMDViewNoRollUp;
	float3 HMDViewNoRollRight;
	float4 InvDeviceZToWorldZTransform;
	float4 ScreenPositionScaleBias;
	float3 RelativeWorldCameraOrigin;
	float3 TranslatedWorldCameraOrigin;
	float3 RelativeWorldViewOrigin;
	float3 RelativePreViewTranslation;
	float4x4 PrevViewToClip;
	float4x4 PrevClipToView;
	float4x4 PrevTranslatedWorldToClip;
	float4x4 PrevTranslatedWorldToView;
	float4x4 PrevViewToTranslatedWorld;
	float4x4 PrevTranslatedWorldToCameraView;
	float4x4 PrevCameraViewToTranslatedWorld;
	float3 PrevTranslatedWorldCameraOrigin;
	float3 PrevRelativeWorldCameraOrigin;
	float3 PrevRelativeWorldViewOrigin;
	float3 RelativePrevPreViewTranslation;
	float4x4 PrevClipToRelativeWorld;
	float4x4 PrevScreenToTranslatedWorld;
	float4x4 ClipToPrevClip;
	float4x4 ClipToPrevClipWithAA;
	float4 TemporalAAJitter;
	float4 GlobalClippingPlane;
	float2 FieldOfViewWideAngles;
	float2 PrevFieldOfViewWideAngles;
	float4 ViewRectMin;
	float4 ViewSizeAndInvSize;
	uint4 ViewRectMinAndSize;
	float4 LightProbeSizeRatioAndInvSizeRatio;
	float4 BufferSizeAndInvSize;
	float4 BufferBilinearUVMinMax;
	float4 ScreenToViewSpace;
	float2 BufferToSceneTextureScale;
	float2 ResolutionFractionAndInv;
	int NumSceneColorMSAASamples;
	float PreExposure;
	float OneOverPreExposure;
	float4 DiffuseOverrideParameter;
	float4 SpecularOverrideParameter;
	float4 NormalOverrideParameter;
	float2 RoughnessOverrideParameter;
	float PrevFrameGameTime;
	float PrevFrameRealTime;
	float OutOfBoundsMask;
	float3 WorldCameraMovementSinceLastFrame;
	float CullingSign;
	float NearPlane;
	float GameTime;
	float RealTime;
	float DeltaTime;
	float MaterialTextureMipBias;
	float MaterialTextureDerivativeMultiply;
	uint Random;
	uint FrameNumber;
	uint StateFrameIndexMod8;
	uint StateFrameIndex;
	uint DebugViewModeMask;
	uint WorldIsPaused;
	float CameraCut;
	float UnlitViewmodeMask;
	float4 DirectionalLightColor;
	float3 DirectionalLightDirection;
	float4 TranslucencyLightingVolumeMin[2];
	float4 TranslucencyLightingVolumeInvSize[2];
	float4 TemporalAAParams;
	float4 CircleDOFParams;
	float DepthOfFieldSensorWidth;
	float DepthOfFieldFocalDistance;
	float DepthOfFieldScale;
	float DepthOfFieldFocalLength;
	float DepthOfFieldFocalRegion;
	float DepthOfFieldNearTransitionRegion;
	float DepthOfFieldFarTransitionRegion;
	float MotionBlurNormalizedToPixel;
	float GeneralPurposeTweak;
	float GeneralPurposeTweak2;
	float DemosaicVposOffset;
	float DecalDepthBias;
	float3 IndirectLightingColorScale;
	float3 PrecomputedIndirectLightingColorScale;
	float3 PrecomputedIndirectSpecularColorScale;
	float4 AtmosphereLightDirection[2];
	float4 AtmosphereLightIlluminanceOnGroundPostTransmittance[2];
	float4 AtmosphereLightIlluminanceOuterSpace[2];
	float4 AtmosphereLightDiscLuminance[2];
	float4 AtmosphereLightDiscCosHalfApexAngle_PPTrans[2];
	float4 SkyViewLutSizeAndInvSize;
	float3 SkyCameraTranslatedWorldOrigin;
	float4 SkyPlanetTranslatedWorldCenterAndViewHeight;
	float4x4 SkyViewLutReferential;
	float4 SkyAtmosphereSkyLuminanceFactor;
	float SkyAtmospherePresentInScene;
	float SkyAtmosphereHeightFogContribution;
	float SkyAtmosphereBottomRadiusKm;
	float SkyAtmosphereTopRadiusKm;
	float4 SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize;
	float SkyAtmosphereAerialPerspectiveStartDepthKm;
	float SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution;
	float SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv;
	float SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm;
	float SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv;
	float SkyAtmosphereApplyCameraAerialPerspectiveVolume;
	float3 NormalCurvatureToRoughnessScaleBias;
	float RenderingReflectionCaptureMask;
	float RealTimeReflectionCapture;
	float RealTimeReflectionCapturePreExposure;
	float4 AmbientCubemapTint;
	float AmbientCubemapIntensity;
	float SkyLightApplyPrecomputedBentNormalShadowingFlag;
	float SkyLightAffectReflectionFlag;
	float SkyLightAffectGlobalIlluminationFlag;
	float4 SkyLightColor;
	float4 MobileSkyIrradianceEnvironmentMap[8];
	float MobilePreviewMode;
	float HMDEyePaddingOffset;
	float ReflectionCubemapMaxMip;
	float ShowDecalsMask;
	uint DistanceFieldAOSpecularOcclusionMode;
	float IndirectCapsuleSelfShadowingIntensity;
	float3 ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
	int StereoPassIndex;
	float4 GlobalVolumeTranslatedCenterAndExtent[6];
	float4 GlobalVolumeTranslatedWorldToUVAddAndMul[6];
	float4 GlobalDistanceFieldMipTranslatedWorldToUVScale[6];
	float4 GlobalDistanceFieldMipTranslatedWorldToUVBias[6];
	float GlobalDistanceFieldMipFactor;
	float GlobalDistanceFieldMipTransition;
	int GlobalDistanceFieldClipmapSizeInPages;
	float3 GlobalDistanceFieldInvPageAtlasSize;
	float3 GlobalDistanceFieldInvCoverageAtlasSize;
	float GlobalVolumeDimension;
	float GlobalVolumeTexelSize;
	float MaxGlobalDFAOConeDistance;
	uint NumGlobalSDFClipmaps;
	float CoveredExpandSurfaceScale;
	float NotCoveredExpandSurfaceScale;
	float NotCoveredMinStepScale;
	float DitheredTransparencyStepThreshold;
	float DitheredTransparencyTraceThreshold;
	int2 CursorPosition;
	float bCheckerboardSubsurfaceProfileRendering;
	float3 VolumetricFogInvGridSize;
	float3 VolumetricFogGridZParams;
	float2 VolumetricFogSVPosToVolumeUV;
	float2 VolumetricFogScreenUVToHistoryVolumeUV;
	float VolumetricFogMaxDistance;
	float3 VolumetricLightmapWorldToUVScale;
	float3 VolumetricLightmapWorldToUVAdd;
	float3 VolumetricLightmapIndirectionTextureSize;
	float VolumetricLightmapBrickSize;
	float3 VolumetricLightmapBrickTexelSize;
	float IndirectLightingCacheShowFlag;
	float EyeToPixelSpreadAngle;
	float4 XRPassthroughCameraUVs[2];
	float GlobalVirtualTextureMipBias;
	uint VirtualTextureFeedbackShift;
	uint VirtualTextureFeedbackMask;
	uint VirtualTextureFeedbackStride;
	uint VirtualTextureFeedbackJitterOffset;
	uint VirtualTextureFeedbackSampleOffset;
	float4 RuntimeVirtualTextureMipLevel;
	float2 RuntimeVirtualTexturePackHeight;
	float4 RuntimeVirtualTextureDebugParams;
	float OverrideLandscapeLOD;
	int FarShadowStaticMeshLODBias;
	float MinRoughness;
	float4 HairRenderInfo;
	uint EnableSkyLight;
	uint HairRenderInfoBits;
	uint HairComponents;
	float bSubsurfacePostprocessEnabled;
	float4 SSProfilesTextureSizeAndInvSize;
	float4 SSProfilesPreIntegratedTextureSizeAndInvSize;
	float3 PhysicsFieldClipmapCenter;
	float PhysicsFieldClipmapDistance;
	int PhysicsFieldClipmapResolution;
	int PhysicsFieldClipmapExponent;
	int PhysicsFieldClipmapCount;
	int PhysicsFieldTargetCount;
	int4 PhysicsFieldTargets[32];
	uint InstanceSceneDataSOAStride;
	uint GPUSceneViewId;
	float ViewResolutionFraction;
	float SubSurfaceColorAsTransmittanceAtDistanceInMeters;
	FLWCInverseMatrix WorldToClip;
	FLWCMatrix ClipToWorld;
	FLWCMatrix ScreenToWorld;
	FLWCMatrix PrevClipToWorld;
	FLWCVector3 WorldCameraOrigin;
	FLWCVector3 WorldViewOrigin;
	FLWCVector3 PrevWorldCameraOrigin;
	FLWCVector3 PrevWorldViewOrigin;
	FLWCVector3 PreViewTranslation;
	FLWCVector3 PrevPreViewTranslation;
};
	void FinalizeViewState(inout ViewState InOutView);
ViewState GetPrimaryView()
{
	ViewState Result;
	Result.TranslatedWorldToClip = View.TranslatedWorldToClip;
	Result.TranslatedWorldToSubpixelClip = View.TranslatedWorldToSubpixelClip;
	Result.RelativeWorldToClip = View.RelativeWorldToClip;
	Result.ClipToRelativeWorld = View.ClipToRelativeWorld;
	Result.TranslatedWorldToView = View.TranslatedWorldToView;
	Result.ViewToTranslatedWorld = View.ViewToTranslatedWorld;
	Result.TranslatedWorldToCameraView = View.TranslatedWorldToCameraView;
	Result.CameraViewToTranslatedWorld = View.CameraViewToTranslatedWorld;
	Result.ViewToClip = View.ViewToClip;
	Result.ViewToClipNoAA = View.ViewToClipNoAA;
	Result.ClipToView = View.ClipToView;
	Result.ClipToTranslatedWorld = View.ClipToTranslatedWorld;
	Result.SVPositionToTranslatedWorld = View.SVPositionToTranslatedWorld;
	Result.ScreenToRelativeWorld = View.ScreenToRelativeWorld;
	Result.ScreenToTranslatedWorld = View.ScreenToTranslatedWorld;
	Result.MobileMultiviewShadowTransform = View.MobileMultiviewShadowTransform;
	Result.ViewTilePosition = View.ViewTilePosition;
	Result.MatrixTilePosition = View.MatrixTilePosition;
	Result.ViewForward = View.ViewForward;
	Result.ViewUp = View.ViewUp;
	Result.ViewRight = View.ViewRight;
	Result.HMDViewNoRollUp = View.HMDViewNoRollUp;
	Result.HMDViewNoRollRight = View.HMDViewNoRollRight;
	Result.InvDeviceZToWorldZTransform = View.InvDeviceZToWorldZTransform;
	Result.ScreenPositionScaleBias = View.ScreenPositionScaleBias;
	Result.RelativeWorldCameraOrigin = View.RelativeWorldCameraOrigin;
	Result.TranslatedWorldCameraOrigin = View.TranslatedWorldCameraOrigin;
	Result.RelativeWorldViewOrigin = View.RelativeWorldViewOrigin;
	Result.RelativePreViewTranslation = View.RelativePreViewTranslation;
	Result.PrevViewToClip = View.PrevViewToClip;
	Result.PrevClipToView = View.PrevClipToView;
	Result.PrevTranslatedWorldToClip = View.PrevTranslatedWorldToClip;
	Result.PrevTranslatedWorldToView = View.PrevTranslatedWorldToView;
	Result.PrevViewToTranslatedWorld = View.PrevViewToTranslatedWorld;
	Result.PrevTranslatedWorldToCameraView = View.PrevTranslatedWorldToCameraView;
	Result.PrevCameraViewToTranslatedWorld = View.PrevCameraViewToTranslatedWorld;
	Result.PrevTranslatedWorldCameraOrigin = View.PrevTranslatedWorldCameraOrigin;
	Result.PrevRelativeWorldCameraOrigin = View.PrevRelativeWorldCameraOrigin;
	Result.PrevRelativeWorldViewOrigin = View.PrevRelativeWorldViewOrigin;
	Result.RelativePrevPreViewTranslation = View.RelativePrevPreViewTranslation;
	Result.PrevClipToRelativeWorld = View.PrevClipToRelativeWorld;
	Result.PrevScreenToTranslatedWorld = View.PrevScreenToTranslatedWorld;
	Result.ClipToPrevClip = View.ClipToPrevClip;
	Result.ClipToPrevClipWithAA = View.ClipToPrevClipWithAA;
	Result.TemporalAAJitter = View.TemporalAAJitter;
	Result.GlobalClippingPlane = View.GlobalClippingPlane;
	Result.FieldOfViewWideAngles = View.FieldOfViewWideAngles;
	Result.PrevFieldOfViewWideAngles = View.PrevFieldOfViewWideAngles;
	Result.ViewRectMin = View.ViewRectMin;
	Result.ViewSizeAndInvSize = View.ViewSizeAndInvSize;
	Result.ViewRectMinAndSize = View.ViewRectMinAndSize;
	Result.LightProbeSizeRatioAndInvSizeRatio = View.LightProbeSizeRatioAndInvSizeRatio;
	Result.BufferSizeAndInvSize = View.BufferSizeAndInvSize;
	Result.BufferBilinearUVMinMax = View.BufferBilinearUVMinMax;
	Result.ScreenToViewSpace = View.ScreenToViewSpace;
	Result.BufferToSceneTextureScale = View.BufferToSceneTextureScale;
	Result.ResolutionFractionAndInv = View.ResolutionFractionAndInv;
	Result.NumSceneColorMSAASamples = View.NumSceneColorMSAASamples;
	Result.PreExposure = View.PreExposure;
	Result.OneOverPreExposure = View.OneOverPreExposure;
	Result.DiffuseOverrideParameter = View.DiffuseOverrideParameter;
	Result.SpecularOverrideParameter = View.SpecularOverrideParameter;
	Result.NormalOverrideParameter = View.NormalOverrideParameter;
	Result.RoughnessOverrideParameter = View.RoughnessOverrideParameter;
	Result.PrevFrameGameTime = View.PrevFrameGameTime;
	Result.PrevFrameRealTime = View.PrevFrameRealTime;
	Result.OutOfBoundsMask = View.OutOfBoundsMask;
	Result.WorldCameraMovementSinceLastFrame = View.WorldCameraMovementSinceLastFrame;
	Result.CullingSign = View.CullingSign;
	Result.NearPlane = View.NearPlane;
	Result.GameTime = View.GameTime;
	Result.RealTime = View.RealTime;
	Result.DeltaTime = View.DeltaTime;
	Result.MaterialTextureMipBias = View.MaterialTextureMipBias;
	Result.MaterialTextureDerivativeMultiply = View.MaterialTextureDerivativeMultiply;
	Result.Random = View.Random;
	Result.FrameNumber = View.FrameNumber;
	Result.StateFrameIndexMod8 = View.StateFrameIndexMod8;
	Result.StateFrameIndex = View.StateFrameIndex;
	Result.DebugViewModeMask = View.DebugViewModeMask;
	Result.WorldIsPaused = View.WorldIsPaused;
	Result.CameraCut = View.CameraCut;
	Result.UnlitViewmodeMask = View.UnlitViewmodeMask;
	Result.DirectionalLightColor = View.DirectionalLightColor;
	Result.DirectionalLightDirection = View.DirectionalLightDirection;
	Result.TranslucencyLightingVolumeMin = View.TranslucencyLightingVolumeMin;
	Result.TranslucencyLightingVolumeInvSize = View.TranslucencyLightingVolumeInvSize;
	Result.TemporalAAParams = View.TemporalAAParams;
	Result.CircleDOFParams = View.CircleDOFParams;
	Result.DepthOfFieldSensorWidth = View.DepthOfFieldSensorWidth;
	Result.DepthOfFieldFocalDistance = View.DepthOfFieldFocalDistance;
	Result.DepthOfFieldScale = View.DepthOfFieldScale;
	Result.DepthOfFieldFocalLength = View.DepthOfFieldFocalLength;
	Result.DepthOfFieldFocalRegion = View.DepthOfFieldFocalRegion;
	Result.DepthOfFieldNearTransitionRegion = View.DepthOfFieldNearTransitionRegion;
	Result.DepthOfFieldFarTransitionRegion = View.DepthOfFieldFarTransitionRegion;
	Result.MotionBlurNormalizedToPixel = View.MotionBlurNormalizedToPixel;
	Result.GeneralPurposeTweak = View.GeneralPurposeTweak;
	Result.GeneralPurposeTweak2 = View.GeneralPurposeTweak2;
	Result.DemosaicVposOffset = View.DemosaicVposOffset;
	Result.DecalDepthBias = View.DecalDepthBias;
	Result.IndirectLightingColorScale = View.IndirectLightingColorScale;
	Result.PrecomputedIndirectLightingColorScale = View.PrecomputedIndirectLightingColorScale;
	Result.PrecomputedIndirectSpecularColorScale = View.PrecomputedIndirectSpecularColorScale;
	Result.AtmosphereLightDirection = View.AtmosphereLightDirection;
	Result.AtmosphereLightIlluminanceOnGroundPostTransmittance = View.AtmosphereLightIlluminanceOnGroundPostTransmittance;
	Result.AtmosphereLightIlluminanceOuterSpace = View.AtmosphereLightIlluminanceOuterSpace;
	Result.AtmosphereLightDiscLuminance = View.AtmosphereLightDiscLuminance;
	Result.AtmosphereLightDiscCosHalfApexAngle_PPTrans = View.AtmosphereLightDiscCosHalfApexAngle_PPTrans;
	Result.SkyViewLutSizeAndInvSize = View.SkyViewLutSizeAndInvSize;
	Result.SkyCameraTranslatedWorldOrigin = View.SkyCameraTranslatedWorldOrigin;
	Result.SkyPlanetTranslatedWorldCenterAndViewHeight = View.SkyPlanetTranslatedWorldCenterAndViewHeight;
	Result.SkyViewLutReferential = View.SkyViewLutReferential;
	Result.SkyAtmosphereSkyLuminanceFactor = View.SkyAtmosphereSkyLuminanceFactor;
	Result.SkyAtmospherePresentInScene = View.SkyAtmospherePresentInScene;
	Result.SkyAtmosphereHeightFogContribution = View.SkyAtmosphereHeightFogContribution;
	Result.SkyAtmosphereBottomRadiusKm = View.SkyAtmosphereBottomRadiusKm;
	Result.SkyAtmosphereTopRadiusKm = View.SkyAtmosphereTopRadiusKm;
	Result.SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize = View.SkyAtmosphereCameraAerialPerspectiveVolumeSizeAndInvSize;
	Result.SkyAtmosphereAerialPerspectiveStartDepthKm = View.SkyAtmosphereAerialPerspectiveStartDepthKm;
	Result.SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution = View.SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolution;
	Result.SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv = View.SkyAtmosphereCameraAerialPerspectiveVolumeDepthResolutionInv;
	Result.SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm = View.SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKm;
	Result.SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv = View.SkyAtmosphereCameraAerialPerspectiveVolumeDepthSliceLengthKmInv;
	Result.SkyAtmosphereApplyCameraAerialPerspectiveVolume = View.SkyAtmosphereApplyCameraAerialPerspectiveVolume;
	Result.NormalCurvatureToRoughnessScaleBias = View.NormalCurvatureToRoughnessScaleBias;
	Result.RenderingReflectionCaptureMask = View.RenderingReflectionCaptureMask;
	Result.RealTimeReflectionCapture = View.RealTimeReflectionCapture;
	Result.RealTimeReflectionCapturePreExposure = View.RealTimeReflectionCapturePreExposure;
	Result.AmbientCubemapTint = View.AmbientCubemapTint;
	Result.AmbientCubemapIntensity = View.AmbientCubemapIntensity;
	Result.SkyLightApplyPrecomputedBentNormalShadowingFlag = View.SkyLightApplyPrecomputedBentNormalShadowingFlag;
	Result.SkyLightAffectReflectionFlag = View.SkyLightAffectReflectionFlag;
	Result.SkyLightAffectGlobalIlluminationFlag = View.SkyLightAffectGlobalIlluminationFlag;
	Result.SkyLightColor = View.SkyLightColor;
	Result.MobileSkyIrradianceEnvironmentMap = View.MobileSkyIrradianceEnvironmentMap;
	Result.MobilePreviewMode = View.MobilePreviewMode;
	Result.HMDEyePaddingOffset = View.HMDEyePaddingOffset;
	Result.ReflectionCubemapMaxMip = View.ReflectionCubemapMaxMip;
	Result.ShowDecalsMask = View.ShowDecalsMask;
	Result.DistanceFieldAOSpecularOcclusionMode = View.DistanceFieldAOSpecularOcclusionMode;
	Result.IndirectCapsuleSelfShadowingIntensity = View.IndirectCapsuleSelfShadowingIntensity;
	Result.ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight = View.ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
	Result.StereoPassIndex = View.StereoPassIndex;
	Result.GlobalVolumeTranslatedCenterAndExtent = View.GlobalVolumeTranslatedCenterAndExtent;
	Result.GlobalVolumeTranslatedWorldToUVAddAndMul = View.GlobalVolumeTranslatedWorldToUVAddAndMul;
	Result.GlobalDistanceFieldMipTranslatedWorldToUVScale = View.GlobalDistanceFieldMipTranslatedWorldToUVScale;
	Result.GlobalDistanceFieldMipTranslatedWorldToUVBias = View.GlobalDistanceFieldMipTranslatedWorldToUVBias;
	Result.GlobalDistanceFieldMipFactor = View.GlobalDistanceFieldMipFactor;
	Result.GlobalDistanceFieldMipTransition = View.GlobalDistanceFieldMipTransition;
	Result.GlobalDistanceFieldClipmapSizeInPages = View.GlobalDistanceFieldClipmapSizeInPages;
	Result.GlobalDistanceFieldInvPageAtlasSize = View.GlobalDistanceFieldInvPageAtlasSize;
	Result.GlobalDistanceFieldInvCoverageAtlasSize = View.GlobalDistanceFieldInvCoverageAtlasSize;
	Result.GlobalVolumeDimension = View.GlobalVolumeDimension;
	Result.GlobalVolumeTexelSize = View.GlobalVolumeTexelSize;
	Result.MaxGlobalDFAOConeDistance = View.MaxGlobalDFAOConeDistance;
	Result.NumGlobalSDFClipmaps = View.NumGlobalSDFClipmaps;
	Result.CoveredExpandSurfaceScale = View.CoveredExpandSurfaceScale;
	Result.NotCoveredExpandSurfaceScale = View.NotCoveredExpandSurfaceScale;
	Result.NotCoveredMinStepScale = View.NotCoveredMinStepScale;
	Result.DitheredTransparencyStepThreshold = View.DitheredTransparencyStepThreshold;
	Result.DitheredTransparencyTraceThreshold = View.DitheredTransparencyTraceThreshold;
	Result.CursorPosition = View.CursorPosition;
	Result.bCheckerboardSubsurfaceProfileRendering = View.bCheckerboardSubsurfaceProfileRendering;
	Result.VolumetricFogInvGridSize = View.VolumetricFogInvGridSize;
	Result.VolumetricFogGridZParams = View.VolumetricFogGridZParams;
	Result.VolumetricFogSVPosToVolumeUV = View.VolumetricFogSVPosToVolumeUV;
	Result.VolumetricFogScreenUVToHistoryVolumeUV = View.VolumetricFogScreenUVToHistoryVolumeUV;
	Result.VolumetricFogMaxDistance = View.VolumetricFogMaxDistance;
	Result.VolumetricLightmapWorldToUVScale = View.VolumetricLightmapWorldToUVScale;
	Result.VolumetricLightmapWorldToUVAdd = View.VolumetricLightmapWorldToUVAdd;
	Result.VolumetricLightmapIndirectionTextureSize = View.VolumetricLightmapIndirectionTextureSize;
	Result.VolumetricLightmapBrickSize = View.VolumetricLightmapBrickSize;
	Result.VolumetricLightmapBrickTexelSize = View.VolumetricLightmapBrickTexelSize;
	Result.IndirectLightingCacheShowFlag = View.IndirectLightingCacheShowFlag;
	Result.EyeToPixelSpreadAngle = View.EyeToPixelSpreadAngle;
	Result.XRPassthroughCameraUVs = View.XRPassthroughCameraUVs;
	Result.GlobalVirtualTextureMipBias = View.GlobalVirtualTextureMipBias;
	Result.VirtualTextureFeedbackShift = View.VirtualTextureFeedbackShift;
	Result.VirtualTextureFeedbackMask = View.VirtualTextureFeedbackMask;
	Result.VirtualTextureFeedbackStride = View.VirtualTextureFeedbackStride;
	Result.VirtualTextureFeedbackJitterOffset = View.VirtualTextureFeedbackJitterOffset;
	Result.VirtualTextureFeedbackSampleOffset = View.VirtualTextureFeedbackSampleOffset;
	Result.RuntimeVirtualTextureMipLevel = View.RuntimeVirtualTextureMipLevel;
	Result.RuntimeVirtualTexturePackHeight = View.RuntimeVirtualTexturePackHeight;
	Result.RuntimeVirtualTextureDebugParams = View.RuntimeVirtualTextureDebugParams;
	Result.OverrideLandscapeLOD = View.OverrideLandscapeLOD;
	Result.FarShadowStaticMeshLODBias = View.FarShadowStaticMeshLODBias;
	Result.MinRoughness = View.MinRoughness;
	Result.HairRenderInfo = View.HairRenderInfo;
	Result.EnableSkyLight = View.EnableSkyLight;
	Result.HairRenderInfoBits = View.HairRenderInfoBits;
	Result.HairComponents = View.HairComponents;
	Result.bSubsurfacePostprocessEnabled = View.bSubsurfacePostprocessEnabled;
	Result.SSProfilesTextureSizeAndInvSize = View.SSProfilesTextureSizeAndInvSize;
	Result.SSProfilesPreIntegratedTextureSizeAndInvSize = View.SSProfilesPreIntegratedTextureSizeAndInvSize;
	Result.PhysicsFieldClipmapCenter = View.PhysicsFieldClipmapCenter;
	Result.PhysicsFieldClipmapDistance = View.PhysicsFieldClipmapDistance;
	Result.PhysicsFieldClipmapResolution = View.PhysicsFieldClipmapResolution;
	Result.PhysicsFieldClipmapExponent = View.PhysicsFieldClipmapExponent;
	Result.PhysicsFieldClipmapCount = View.PhysicsFieldClipmapCount;
	Result.PhysicsFieldTargetCount = View.PhysicsFieldTargetCount;
	Result.PhysicsFieldTargets = View.PhysicsFieldTargets;
	Result.InstanceSceneDataSOAStride = View.InstanceSceneDataSOAStride;
	Result.GPUSceneViewId = View.GPUSceneViewId;
	Result.ViewResolutionFraction = View.ViewResolutionFraction;
	Result.SubSurfaceColorAsTransmittanceAtDistanceInMeters = View.SubSurfaceColorAsTransmittanceAtDistanceInMeters;
	FinalizeViewState(Result);
	return Result;
}
#line 649 "/Engine/Generated/GeneratedInstancedStereo.ush"

#line  15 "/Engine/Private/InstancedStereo.ush"


void FinalizeViewState(inout ViewState InOutView)
{
	InOutView.WorldToClip = MakeLWCInverseMatrix(InOutView.MatrixTilePosition, InOutView.RelativeWorldToClip);
	InOutView.ClipToWorld = MakeLWCMatrix(InOutView.MatrixTilePosition, InOutView.ClipToRelativeWorld);
	InOutView.ScreenToWorld = MakeLWCMatrix(InOutView.MatrixTilePosition, InOutView.ScreenToRelativeWorld);
	InOutView.PrevClipToWorld = MakeLWCMatrix(InOutView.MatrixTilePosition, InOutView.PrevClipToRelativeWorld);

	InOutView.WorldCameraOrigin = MakeLWCVector3(InOutView.ViewTilePosition, InOutView.RelativeWorldCameraOrigin);
	InOutView.WorldViewOrigin = MakeLWCVector3(InOutView.ViewTilePosition, InOutView.RelativeWorldViewOrigin);
	InOutView.PrevWorldCameraOrigin = MakeLWCVector3(InOutView.ViewTilePosition, InOutView.PrevRelativeWorldCameraOrigin);
	InOutView.PrevWorldViewOrigin = MakeLWCVector3(InOutView.ViewTilePosition, InOutView.PrevRelativeWorldViewOrigin);
	InOutView.PreViewTranslation = MakeLWCVector3(-InOutView.ViewTilePosition, InOutView.RelativePreViewTranslation);
	InOutView.PrevPreViewTranslation = MakeLWCVector3(-InOutView.ViewTilePosition, InOutView.RelativePrevPreViewTranslation);
}



static ViewState ResolvedView = (ViewState)0.0f;

ViewState ResolveView()
{
	return GetPrimaryView();
}













bool IsInstancedStereo()
{



	return false;

}

uint GetEyeIndex(uint InstanceId)
{



	return 0;

}

uint GetInstanceId(uint InstanceId)
{



	return InstanceId;

}
#line 203 "/Engine/Private/Common.ush"


#line   7 "/Engine/Private/Definitions.usf"























































































































































































































































































#line 205 "/Engine/Private/Common.ush"


#line   7 "/Engine/Private/AssertionMacros.ush"

















	









	









	







	





















	

	
	

#line 207 "/Engine/Private/Common.ush"







	







	























static float GlobalTextureMipBias = 0;
static float GlobalRayCone_TexArea = 0;
float ComputeRayConeLod(Texture2D Tex)
{






    return 0.0f;

}

float  ClampToHalfFloatRange(float  X) { return clamp(X, float(0), MaxHalfFloat); }
float2 ClampToHalfFloatRange(float2 X) { return clamp(X, float(0).xx, MaxHalfFloat.xx); }
float3 ClampToHalfFloatRange(float3 X) { return clamp(X, float(0).xxx, MaxHalfFloat.xxx); }
float4 ClampToHalfFloatRange(float4 X) { return clamp(X, float(0).xxxx, MaxHalfFloat.xxxx); }



float4 Texture1DSample(Texture1D Tex, SamplerState Sampler, float UV)
{

	return Tex.SampleLevel(Sampler, UV, 0);



}
float4 Texture2DSample(Texture2D Tex, SamplerState Sampler, float2 UV)
{

	return Tex.SampleLevel(Sampler, UV, ComputeRayConeLod(Tex) + GlobalTextureMipBias);



}
float4 Texture2DSample(Texture2D Tex, SamplerState Sampler, FloatDeriv2 UV)
{

	return Tex.SampleLevel(Sampler, UV.Value, ComputeRayConeLod(Tex) + GlobalTextureMipBias);



}
float Texture2DSample_A8(Texture2D Tex, SamplerState Sampler, float2 UV)
{

	return Tex.SampleLevel(Sampler, UV, ComputeRayConeLod(Tex) + GlobalTextureMipBias) .a;



}
float4 Texture3DSample(Texture3D Tex, SamplerState Sampler, float3 UV)
{

	return Tex.SampleLevel(Sampler, UV, 0);



}
float4 TextureCubeSample(TextureCube Tex, SamplerState Sampler, float3 UV)
{

	return Tex.SampleLevel(Sampler, UV, 0);



}
float4 Texture2DArraySample(Texture2DArray Tex, SamplerState Sampler, float3 UV)
{

	return Tex.SampleLevel(Sampler, UV, 0);



}
float4 Texture1DSampleLevel(Texture1D Tex, SamplerState Sampler, float UV, float Mip)
{
	return Tex.SampleLevel(Sampler, UV, Mip);
}
float4 Texture2DSampleLevel(Texture2D Tex, SamplerState Sampler, float2 UV, float Mip)
{
	return Tex.SampleLevel(Sampler, UV, Mip);
}
float4 Texture2DSampleBias(Texture2D Tex, SamplerState Sampler, float2 UV, float MipBias)
{

	return Tex.SampleLevel(Sampler, UV, ComputeRayConeLod(Tex) + MipBias + GlobalTextureMipBias);



}
float4 Texture2DSampleGrad(Texture2D Tex, SamplerState Sampler, float2 UV, float2 DDX, float2 DDY)
{
	return Tex.SampleGrad(Sampler, UV, DDX, DDY);
}
float4 Texture3DSampleLevel(Texture3D Tex, SamplerState Sampler, float3 UV, float Mip)
{
	return Tex.SampleLevel(Sampler, UV, Mip);
}
float4 Texture3DSampleBias(Texture3D Tex, SamplerState Sampler, float3 UV, float MipBias)
{

	return Tex.SampleLevel(Sampler, UV, 0);



}
float4 Texture3DSampleGrad(Texture3D Tex, SamplerState Sampler, float3 UV, float3 DDX, float3 DDY)
{
	return Tex.SampleGrad(Sampler, UV, DDX, DDY);
}
float4 TextureCubeSampleLevel(TextureCube Tex, SamplerState Sampler, float3 UV, float Mip)
{
	return Tex.SampleLevel(Sampler, UV, Mip);
}
float TextureCubeSampleDepthLevel(TextureCube TexDepth, SamplerState Sampler, float3 UV, float Mip)
{
	return TexDepth.SampleLevel(Sampler, UV, Mip).x;
}
float4 TextureCubeSampleBias(TextureCube Tex, SamplerState Sampler, float3 UV, float MipBias)
{

	return Tex.SampleLevel(Sampler, UV, 0);



}
float4 TextureCubeSampleGrad(TextureCube Tex, SamplerState Sampler, float3 UV, float3 DDX, float3 DDY)
{
	return Tex.SampleGrad(Sampler, UV, DDX, DDY);
}
float4 TextureExternalSample(Texture2D Tex, SamplerState Sampler, float2 UV)
{

	


		return Tex.SampleLevel(Sampler, UV, ComputeRayConeLod(Tex) + GlobalTextureMipBias);
	



}
float4 TextureExternalSampleGrad(Texture2D Tex, SamplerState Sampler, float2 UV, float2 DDX, float2 DDY)
{
	return Tex.SampleGrad(Sampler, UV, DDX, DDY);
}
float4 TextureExternalSampleLevel(Texture2D Tex, SamplerState Sampler, float2 UV, float Mip)
{
	return Tex.SampleLevel(Sampler, UV, Mip);
}




float4 Texture1DSample_Decal(Texture1D Tex, SamplerState Sampler, float UV)
{



	return Texture1DSample(Tex, Sampler, UV);

}
float4 Texture2DSample_Decal(Texture2D Tex, SamplerState Sampler, float2 UV)
{



	return Texture2DSample(Tex, Sampler, UV);

}
float4 Texture3DSample_Decal(Texture3D Tex, SamplerState Sampler, float3 UV)
{



	return Texture3DSample(Tex, Sampler, UV);

}
float4 TextureCubeSample_Decal(TextureCube Tex, SamplerState Sampler, float3 UV)
{



	return TextureCubeSample(Tex, Sampler, UV);

}
float4 TextureExternalSample_Decal(Texture2D Tex, SamplerState Sampler, float2 UV)
{



	return TextureExternalSample(Tex, Sampler, UV);

}

float4 Texture2DArraySampleLevel(Texture2DArray Tex, SamplerState Sampler, float3 UV, float Mip)
{
	return Tex.SampleLevel(Sampler, UV, Mip);
}
float4 Texture2DArraySampleBias(Texture2DArray Tex, SamplerState Sampler, float3 UV, float MipBias)
{

	return Tex.SampleLevel(Sampler, UV, 0);



}
float4 Texture2DArraySampleGrad(Texture2DArray Tex, SamplerState Sampler, float3 UV, float2 DDX, float2 DDY)
{
	return Tex.SampleGrad(Sampler, UV, DDX, DDY);
}


float2 Tile1Dto2D(float xsize, float idx)
{
	float2 xyidx = 0;
	xyidx.y = floor(idx / xsize);
	xyidx.x = idx - xsize * xyidx.y;

	return xyidx;
}












float4 PseudoVolumeTexture(Texture2D Tex, SamplerState TexSampler, float3 inPos, float2 xysize, float numframes,
	uint mipmode = 0, float miplevel = 0, float2 InDDX = 0, float2 InDDY = 0)
{
	float z = inPos.z - 0.5f / numframes;	
	float zframe = floor(z * numframes);
	float zphase = frac(z * numframes);

	float2 uv = frac(inPos.xy) / xysize;

	float2 curframe = Tile1Dto2D(xysize.x, zframe) / xysize;
	float2 nextframe = Tile1Dto2D(xysize.x, zframe + 1) / xysize;

	float2 uvCurFrame = uv + curframe;
	float2 uvNextFrame = uv + nextframe;

	




	float4 sampleA = 0, sampleB = 0;
	switch (mipmode)
	{
	case 0: 
		sampleA = Tex.SampleLevel(TexSampler, uvCurFrame, miplevel);
		sampleB = Tex.SampleLevel(TexSampler, uvNextFrame, miplevel);
		break;
	case 1: 
		sampleA = Texture2DSample(Tex, TexSampler, uvCurFrame);
		sampleB = Texture2DSample(Tex, TexSampler, uvNextFrame);
		break;
	case 2: 
		sampleA = Tex.SampleGrad(TexSampler, uvCurFrame,  InDDX, InDDY);
		sampleB = Tex.SampleGrad(TexSampler, uvNextFrame, InDDX, InDDY);
		break;
	default:
		break;
	}

	return lerp(sampleA, sampleB, zphase);
}


float4 TextureCubeArraySample(TextureCubeArray Tex, SamplerState Sampler, float4 UV)
{
	return Tex.Sample(Sampler, UV);
}

float4 TextureCubeArraySampleLevel(TextureCubeArray Tex, SamplerState Sampler, float4 UV, float Mip)
{
	return Tex.SampleLevel(Sampler, UV, Mip);
}

float4 TextureCubeArraySampleBias(TextureCubeArray Tex, SamplerState Sampler, float4 UV, float MipBias)
{

	return Tex.SampleLevel(Sampler, UV, 0);



}

float4 TextureCubeArraySampleGrad(TextureCubeArray Tex, SamplerState Sampler, float4 UV, float3 DDX, float3 DDY)
{
	return Tex.SampleGrad(Sampler, UV, DDX, DDY);
}


float4 TextureCubeArraySampleLevel(TextureCubeArray Tex, SamplerState Sampler, float3 UV, float ArrayIndex, float Mip)
{
	return TextureCubeArraySampleLevel(Tex, Sampler, float4(UV, ArrayIndex), Mip);
}




	






	
	

	

	
	




	








float Luminance( float3 LinearColor )
{
	return dot( LinearColor, float3( 0.3, 0.59, 0.11 ) );
}

float length2(float2 v)
{
	return dot(v, v);
}
float length2(float3 v)
{
	return dot(v, v);
}
float length2(float4 v)
{
	return dot(v, v);
}

uint Mod(uint a, uint b)
{

	return a % b;



}

uint2 Mod(uint2 a, uint2 b)
{

	return a % b;



}

uint3 Mod(uint3 a, uint3 b)
{

	return a % b;



}




float ClampedPow(float X,float Y)
{
	return pow(max(abs(X),0.000001f),Y);
}
float2 ClampedPow(float2 X,float2 Y)
{
	return pow(max(abs(X),float2(0.000001f,0.000001f)),Y);
}
float3 ClampedPow(float3 X,float3 Y)
{
	return pow(max(abs(X),float3(0.000001f,0.000001f,0.000001f)),Y);
}  
float4 ClampedPow(float4 X,float4 Y)
{
	return pow(max(abs(X),float4(0.000001f,0.000001f,0.000001f,0.000001f)),Y);
} 


float PositiveClampedPow(float Base, float Exponent)
{
	return (Base <= 0.0f) ? 0.0f : pow(Base, Exponent);
}
float2 PositiveClampedPow(float2 Base, float2 Exponent)
{
	return float2(PositiveClampedPow(Base.x, Exponent.x), PositiveClampedPow(Base.y, Exponent.y)); 
}
float3 PositiveClampedPow(float3 Base, float3 Exponent)
{
	return float3(PositiveClampedPow(Base.xy, Exponent.xy), PositiveClampedPow(Base.z, Exponent.z)); 
}  
float4 PositiveClampedPow(float4 Base, float4 Exponent)
{
	return float4(PositiveClampedPow(Base.xy, Exponent.xy), PositiveClampedPow(Base.zw, Exponent.zw)); 
} 

float DDX(float Input)
{

	return 0;



}

float2 DDX(float2 Input)
{

	return 0;



}

float3 DDX(float3 Input)
{

	return 0;



}

float4 DDX(float4 Input)
{

	return 0;



}

float DDY(float Input)
{

	return 0;



}

float2 DDY(float2 Input)
{

	return 0;



}

float3 DDY(float3 Input)
{

	return 0;



}

float4 DDY(float4 Input)
{

	return 0;



}

#line   7 "/Engine/Private/FastMath.ush"


#line   3 "/Engine/Private/FastMathThirdParty.ush"







































float rsqrtFast( float x )
{
	int i = asint(x);
	i = 0x5f3759df - (i >> 1);
	return asfloat(i);
}




float sqrtFast( float x )
{
	int i = asint(x);
	i = 0x1FBD1DF5 + (i >> 1);
	return asfloat(i);
}




float rcpFast( float x )
{
	int i = asint(x);
	i = 0x7EF311C2 - i;
	return asfloat(i);
}





float rcpFastNR1( float x )
{
	int i = asint(x);
	i = 0x7EF311C3 - i;
	float xRcp = asfloat(i);
	xRcp = xRcp * (-xRcp * x + 2.0f);
	return xRcp;
}

float lengthFast( float3 v )
{
	float LengthSqr = dot(v,v);
	return sqrtFast( LengthSqr );
}

float3 normalizeFast( float3 v )
{
	float LengthSqr = dot(v,v);
	return v * rsqrtFast( LengthSqr );
}

float4 fastClamp(float4 x, float4 Min, float4 Max)
{




	return clamp(x, Min, Max);

}

float3 fastClamp(float3 x, float3 Min, float3 Max)
{




	return clamp(x, Min, Max);

}

float2 fastClamp(float2 x, float2 Min, float2 Max)
{




	return clamp(x, Min, Max);

}

float fastClamp(float x, float Min, float Max)
{




	return clamp(x, Min, Max);

}

int4 fastClamp(int4 x, int4 Min, int4 Max)
{




	return clamp(x, Min, Max);

}

int3 fastClamp(int3 x, int3 Min, int3 Max)
{




	return clamp(x, Min, Max);

}

int2 fastClamp(int2 x, int2 Min, int2 Max)
{




	return clamp(x, Min, Max);

}

int fastClamp(int x, int Min, int Max)
{




	return clamp(x, Min, Max);

}









float acosFast(float inX) 
{
    float x = abs(inX);
    float res = -0.156583f * x + (0.5 * PI);
    res *= sqrt(1.0f - x);
    return (inX >= 0) ? res : PI - res;
}

float2 acosFast( float2 x )
{
	return float2( acosFast(x.x), acosFast(x.y) );
}

float3 acosFast( float3 x )
{
	return float3( acosFast(x.x), acosFast(x.y), acosFast(x.z) );
}

float4 acosFast( float4 x )
{
	return float4( acosFast(x.x), acosFast(x.y), acosFast(x.z), acosFast(x.w) );
}




float asinFast( float x )
{
    return (0.5 * PI) - acosFast(x);
}

float2 asinFast( float2 x)
{
	return float2( asinFast(x.x), asinFast(x.y) );
}

float3 asinFast( float3 x)
{
	return float3( asinFast(x.x), asinFast(x.y), asinFast(x.z) );
}

float4 asinFast( float4 x )
{
	return float4( asinFast(x.x), asinFast(x.y), asinFast(x.z), asinFast(x.w) );
}





float atanFastPos( float x ) 
{ 
    float t0 = (x < 1.0f) ? x : 1.0f / x;
    float t1 = t0 * t0;
    float poly = 0.0872929f;
    poly = -0.301895f + poly * t1;
    poly = 1.0f + poly * t1;
    poly = poly * t0;
    return (x < 1.0f) ? poly : (0.5 * PI) - poly;
}



float atanFast( float x )
{
    float t0 = atanFastPos( abs(x) );
    return (x < 0) ? -t0: t0;
}

float2 atanFast( float2 x )
{
	return float2( atanFast(x.x), atanFast(x.y) );
}

float3 atanFast( float3 x )
{
	return float3( atanFast(x.x), atanFast(x.y), atanFast(x.z) );
}

float4 atanFast( float4 x )
{
	return float4( atanFast(x.x), atanFast(x.y), atanFast(x.z), atanFast(x.w) );
}

float atan2Fast( float y, float x )
{
	float t0 = max( abs(x), abs(y) );
	float t1 = min( abs(x), abs(y) );
	float t3 = t1 / t0;
	float t4 = t3 * t3;

	
	t0 =         + 0.0872929;
	t0 = t0 * t4 - 0.301895;
	t0 = t0 * t4 + 1.0;
	t3 = t0 * t3;

	t3 = abs(y) > abs(x) ? (0.5 * PI) - t3 : t3;
	t3 = x < 0 ? PI - t3 : t3;
	t3 = y < 0 ? -t3 : t3;

	return t3;
}

float2 atan2Fast( float2 y, float2 x )
{
	return float2( atan2Fast(y.x, x.x), atan2Fast(y.y, x.y) );
}

float3 atan2Fast( float3 y, float3 x )
{
	return float3( atan2Fast(y.x, x.x), atan2Fast(y.y, x.y), atan2Fast(y.z, x.z) );
}

float4 atan2Fast( float4 y, float4 x )
{
	return float4( atan2Fast(y.x, x.x), atan2Fast(y.y, x.y), atan2Fast(y.z, x.z), atan2Fast(y.w, x.w) );
}





float acosFast4(float inX)
{
	float x1 = abs(inX);
	float x2 = x1 * x1;
	float x3 = x2 * x1;
	float s;

	s = -0.2121144f * x1 + 1.5707288f;
	s = 0.0742610f * x2 + s;
	s = -0.0187293f * x3 + s;
	s = sqrt(1.0f - x1) * s;

	
	
	return inX >= 0.0f ? s : PI - s;
}




float asinFast4( float x )
{
	return (0.5 * PI) - acosFast4(x);
}




float CosBetweenVectors(float3 A, float3 B)
{
	
	return dot(A, B) * rsqrt(length2(A) * length2(B));
}



float AngleBetweenVectors(float3 A, float3 B)
{
	return acos(CosBetweenVectors(A, B));
}


float AngleBetweenVectorsFast(float3 A, float3 B)
{
	return acosFast(CosBetweenVectors(A, B));
}


int SignFastInt(float v)
{
	return 1 - int((asuint(v) & 0x80000000) >> 30);
}

int2 SignFastInt(float2 v)
{
	return int2(SignFastInt(v.x), SignFastInt(v.y));
}
#line   9 "/Engine/Private/FastMath.ush"




  float FastExp( float x) { return exp2(1.442695f * x); }
  float2 FastExp( float2 x) { return exp2(1.442695f * x); }
  float3 FastExp( float3 x) { return exp2(1.442695f * x); }
  float4 FastExp( float4 x) { return exp2(1.442695f * x); }




  float FastLog( float x) { return log2(0.693147f * x); }
  float2 FastLog( float2 x) { return log2(0.693147f * x); }
  float3 FastLog( float3 x) { return log2(0.693147f * x); }
  float4 FastLog( float4 x) { return log2(0.693147f * x); }
#line 740 "/Engine/Private/Common.ush"

#line   7 "/Engine/Private/Random.ush"





float PseudoRandom(float2 xy)
{
	float2 pos = frac(xy / 128.0f) * 128.0f + float2(-64.340622f, -72.465622f);
	
	
	return frac(dot(pos.xyx * pos.xyy, float3(20.390625f, 60.703125f, 2.4281209f)));
}







float InterleavedGradientNoise( float2 uv, float FrameId )
{
	
	uv += FrameId * (float2(47, 17) * 0.695f);

    const float3 magic = float3( 0.06711056f, 0.00583715f, 52.9829189f );
    return frac(magic.z * frac(dot(uv, magic.xy)));
}



float RandFast( uint2 PixelPos, float Magic = 3571.0 )
{
	float2 Random2 = ( 1.0 / 4320.0 ) * PixelPos + float2( 0.25, 0.0 );
	float Random = frac( dot( Random2 * Random2, Magic ) );
	Random = frac( Random * Random * (2 * Magic) );
	return Random;
}












float RandBBSfloat(float seed)
{
	float s = frac(seed / 4093);
	s = frac(s * s * 4093);
	s = frac(s * s * 4093);
	return s;
}








uint3 Rand3DPCG16(int3 p)
{
	
	uint3 v = uint3(p);

	
	
	
	v = v * 1664525u + 1013904223u;

	
	
	
	
	
	
	
	
	
	
	
	
	
	v.x += v.y*v.z;
	v.y += v.z*v.x;
	v.z += v.x*v.y;
	v.x += v.y*v.z;
	v.y += v.z*v.x;
	v.z += v.x*v.y;

	
	return v >> 16u;
}






uint3 Rand3DPCG32(int3 p)
{
	
	uint3 v = uint3(p);

	
	v = v * 1664525u + 1013904223u;

	
	v.x += v.y*v.z;
	v.y += v.z*v.x;
	v.z += v.x*v.y;

	
	v ^= v >> 16u;

	
	v.x += v.y*v.z;
	v.y += v.z*v.x;
	v.z += v.x*v.y;

	return v;
}








uint4 Rand4DPCG32(int4 p)
{
	
	uint4 v = uint4(p);

	
	v = v * 1664525u + 1013904223u;

	
	v.x += v.y*v.w;
	v.y += v.z*v.x;
	v.z += v.x*v.y;
	v.w += v.y*v.z;

	
	v ^= (v >> 16u);

	
	v.x += v.y*v.w;
	v.y += v.z*v.x;
	v.z += v.x*v.y;
	v.w += v.y*v.z;

	return v;
}








void FindBestAxisVectors(float3 In, out float3 Axis1, out float3 Axis2 )
{
	const float3 N = abs(In);

	
	if( N.z > N.x && N.z > N.y )
	{
		Axis1 = float3(1, 0, 0);
	}
	else
	{
		Axis1 = float3(0, 0, 1);
	}

	Axis1 = normalize(Axis1 - In * dot(Axis1, In));
	Axis2 = cross(Axis1, In);
}
























uint2 ScrambleTEA(uint2 v, uint IterationCount = 3)
{
	
	uint k[4] ={ 0xA341316Cu , 0xC8013EA4u , 0xAD90777Du , 0x7E95761Eu };
	
	uint y = v[0];
	uint z = v[1];
	uint sum = 0;
	
	[unroll] for(uint i = 0; i < IterationCount; ++i)
	{
		sum += 0x9e3779b9;
		y += ((z << 4u) + k[0]) ^ (z + sum) ^ ((z >> 5u) + k[1]);
		z += ((y << 4u) + k[2]) ^ (y + sum) ^ ((y >> 5u) + k[3]);
	}

	return uint2(y, z);
}






float3 NoiseTileWrap(float3 v,  bool bTiling, float RepeatSize)
{
	return bTiling ? (frac(v / RepeatSize) * RepeatSize) : v;
}




float4 PerlinRamp(float4 t)
{
	return t * t * t * (t * (t * 6 - 15) + 10); 
}




float4 PerlinRampDerivative(float4 t)
{
	return t * t * (t * (t * 30 - 60) + 30);
}







float4 MGradient(int seed, float3 offset)
{
	uint rand = Rand3DPCG16(int3(seed,0,0)).x;
	float3 direction = float3(rand.xxx & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	return float4(direction, dot(direction, offset));
}







float3 NoiseSeeds(float3 v, bool bTiling, float RepeatSize,
	out float seed000, out float seed001, out float seed010, out float seed011,
	out float seed100, out float seed101, out float seed110, out float seed111)
{
	float3 fv = frac(v);
	float3 iv = floor(v);

	const float3 primes = float3(19, 47, 101);

	if (bTiling)
	{	
		seed000 = dot(primes, NoiseTileWrap(iv, true, RepeatSize));
		seed100 = dot(primes, NoiseTileWrap(iv + float3(1, 0, 0), true, RepeatSize));
		seed010 = dot(primes, NoiseTileWrap(iv + float3(0, 1, 0), true, RepeatSize));
		seed110 = dot(primes, NoiseTileWrap(iv + float3(1, 1, 0), true, RepeatSize));
		seed001 = dot(primes, NoiseTileWrap(iv + float3(0, 0, 1), true, RepeatSize));
		seed101 = dot(primes, NoiseTileWrap(iv + float3(1, 0, 1), true, RepeatSize));
		seed011 = dot(primes, NoiseTileWrap(iv + float3(0, 1, 1), true, RepeatSize));
		seed111 = dot(primes, NoiseTileWrap(iv + float3(1, 1, 1), true, RepeatSize));
	}
	else
	{	
		seed000 = dot(iv, primes);
		seed100 = seed000 + primes.x;
		seed010 = seed000 + primes.y;
		seed110 = seed100 + primes.y;
		seed001 = seed000 + primes.z;
		seed101 = seed100 + primes.z;
		seed011 = seed010 + primes.z;
		seed111 = seed110 + primes.z;
	}

	return fv;
}







float GradientNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
{
	float seed000, seed001, seed010, seed011, seed100, seed101, seed110, seed111;
	float3 fv = NoiseSeeds(v, bTiling, RepeatSize, seed000, seed001, seed010, seed011, seed100, seed101, seed110, seed111);

	float rand000 = MGradient(int(seed000), fv - float3(0, 0, 0)).w;
	float rand100 = MGradient(int(seed100), fv - float3(1, 0, 0)).w;
	float rand010 = MGradient(int(seed010), fv - float3(0, 1, 0)).w;
	float rand110 = MGradient(int(seed110), fv - float3(1, 1, 0)).w;
	float rand001 = MGradient(int(seed001), fv - float3(0, 0, 1)).w;
	float rand101 = MGradient(int(seed101), fv - float3(1, 0, 1)).w;
	float rand011 = MGradient(int(seed011), fv - float3(0, 1, 1)).w;
	float rand111 = MGradient(int(seed111), fv - float3(1, 1, 1)).w;

	float3 Weights = PerlinRamp(float4(fv, 0)).xyz;

	float i = lerp(lerp(rand000, rand100, Weights.x), lerp(rand010, rand110, Weights.x), Weights.y);
	float j = lerp(lerp(rand001, rand101, Weights.x), lerp(rand011, rand111, Weights.x), Weights.y);
	return lerp(i, j, Weights.z).x;
}





float4x3 SimplexCorners(float3 v)
{
	
	float3 tet = floor(v + v.x/3 + v.y/3 + v.z/3);
	float3 base = tet - tet.x/6 - tet.y/6 - tet.z/6;
	float3 f = v - base;

	
	
	float3 g = step(f.yzx, f.xyz), h = 1 - g.zxy;
	float3 a1 = min(g, h) - 1. / 6., a2 = max(g, h) - 1. / 3.;

	
	return float4x3(base, base + a1, base + a2, base + 0.5);
}




float4 SimplexSmooth(float4x3 f)
{
	const float scale = 1024. / 375.;	
	float4 d = float4(dot(f[0], f[0]), dot(f[1], f[1]), dot(f[2], f[2]), dot(f[3], f[3]));
	float4 s = saturate(2 * d);
	return (1 * scale + s*(-3 * scale + s*(3 * scale - s*scale)));
}




float3x4 SimplexDSmooth(float4x3 f)
{
	const float scale = 1024. / 375.;	
	float4 d = float4(dot(f[0], f[0]), dot(f[1], f[1]), dot(f[2], f[2]), dot(f[3], f[3]));
	float4 s = saturate(2 * d);
	s = -12 * scale + s*(24 * scale - s * 12 * scale);

	return float3x4(
		s * float4(f[0][0], f[1][0], f[2][0], f[3][0]),
		s * float4(f[0][1], f[1][1], f[2][1], f[3][1]),
		s * float4(f[0][2], f[1][2], f[2][2], f[3][2]));
}
















float3x4 JacobianSimplex_ALU(float3 v, bool bTiling, float RepeatSize)
{
	
	float4x3 T = SimplexCorners(v);
	uint3 rand;
	float4x3 gvec[3], fv;
	float3x4 grad;

	
	
	fv[0] = v - T[0];
	rand = Rand3DPCG16(int3(floor(NoiseTileWrap(6 * T[0] + 0.5, bTiling, RepeatSize))));
	gvec[0][0] = float3(rand.xxx & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	gvec[1][0] = float3(rand.yyy & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	gvec[2][0] = float3(rand.zzz & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	grad[0][0] = dot(gvec[0][0], fv[0]);
	grad[1][0] = dot(gvec[1][0], fv[0]);
	grad[2][0] = dot(gvec[2][0], fv[0]);

	fv[1] = v - T[1];
	rand = Rand3DPCG16(int3(floor(NoiseTileWrap(6 * T[1] + 0.5, bTiling, RepeatSize))));
	gvec[0][1] = float3(rand.xxx & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	gvec[1][1] = float3(rand.yyy & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	gvec[2][1] = float3(rand.zzz & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	grad[0][1] = dot(gvec[0][1], fv[1]);
	grad[1][1] = dot(gvec[1][1], fv[1]);
	grad[2][1] = dot(gvec[2][1], fv[1]);

	fv[2] = v - T[2];
	rand = Rand3DPCG16(int3(floor(NoiseTileWrap(6 * T[2] + 0.5, bTiling, RepeatSize))));
	gvec[0][2] = float3(rand.xxx & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	gvec[1][2] = float3(rand.yyy & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	gvec[2][2] = float3(rand.zzz & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	grad[0][2] = dot(gvec[0][2], fv[2]);
	grad[1][2] = dot(gvec[1][2], fv[2]);
	grad[2][2] = dot(gvec[2][2], fv[2]);

	fv[3] = v - T[3];
	rand = Rand3DPCG16(int3(floor(NoiseTileWrap(6 * T[3] + 0.5, bTiling, RepeatSize))));
	gvec[0][3] = float3(rand.xxx & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	gvec[1][3] = float3(rand.yyy & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	gvec[2][3] = float3(rand.zzz & int3(0x8000, 0x4000, 0x2000)) * float3(1. / 0x4000, 1. / 0x2000, 1. / 0x1000) - 1;
	grad[0][3] = dot(gvec[0][3], fv[3]);
	grad[1][3] = dot(gvec[1][3], fv[3]);
	grad[2][3] = dot(gvec[2][3], fv[3]);

	
	float4 sv = SimplexSmooth(fv);
	float3x4 ds = SimplexDSmooth(fv);

	float3x4 jacobian;
	jacobian[0] = float4(mul(sv, gvec[0]) + mul(ds, grad[0]), dot(sv, grad[0]));
	jacobian[1] = float4(mul(sv, gvec[1]) + mul(ds, grad[1]), dot(sv, grad[1]));
	jacobian[2] = float4(mul(sv, gvec[2]) + mul(ds, grad[2]), dot(sv, grad[2]));

	return jacobian;
}






float ValueNoise3D_ALU(float3 v, bool bTiling, float RepeatSize)
{
	float seed000, seed001, seed010, seed011, seed100, seed101, seed110, seed111;
	float3 fv = NoiseSeeds(v, bTiling, RepeatSize, seed000, seed001, seed010, seed011, seed100, seed101, seed110, seed111);

	float rand000 = RandBBSfloat(seed000) * 2 - 1;
	float rand100 = RandBBSfloat(seed100) * 2 - 1;
	float rand010 = RandBBSfloat(seed010) * 2 - 1;
	float rand110 = RandBBSfloat(seed110) * 2 - 1;
	float rand001 = RandBBSfloat(seed001) * 2 - 1;
	float rand101 = RandBBSfloat(seed101) * 2 - 1;
	float rand011 = RandBBSfloat(seed011) * 2 - 1;
	float rand111 = RandBBSfloat(seed111) * 2 - 1;
	
	float3 Weights = PerlinRamp(float4(fv, 0)).xyz;
	
	float i = lerp(lerp(rand000, rand100, Weights.x), lerp(rand010, rand110, Weights.x), Weights.y);
	float j = lerp(lerp(rand001, rand101, Weights.x), lerp(rand011, rand111, Weights.x), Weights.y);
	return lerp(i, j, Weights.z).x;
}









float GradientNoise3D_TEX(float3 v, bool bTiling, float RepeatSize)
{
	bTiling = true;
	float3 fv = frac(v);
	float3 iv0 = NoiseTileWrap(floor(v), bTiling, RepeatSize);
	float3 iv1 = NoiseTileWrap(iv0 + 1, bTiling, RepeatSize);

	const int2 ZShear = int2(17, 89);
	
	float2 OffsetA = iv0.z * ZShear;
	float2 OffsetB = OffsetA + ZShear;	
	if (bTiling)						
	{
		OffsetB = iv1.z * ZShear;
	}

	
	float ts = 1 / 128.0f;

	
	float2 TexA0 = (iv0.xy + OffsetA + 0.5f) * ts;
	float2 TexB0 = (iv0.xy + OffsetB + 0.5f) * ts;

	
	float2 TexA1 = TexA0 + ts;	
	float2 TexB1 = TexB0 + ts;
	if (bTiling)				
	{
		TexA1 = (iv1.xy + OffsetA + 0.5f) * ts;
		TexB1 = (iv1.xy + OffsetB + 0.5f) * ts;
	}


	
	float3 A = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, float2(TexA0.x, TexA0.y), 0).xyz * 2 - 1;
	float3 B = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, float2(TexA1.x, TexA0.y), 0).xyz * 2 - 1;
	float3 C = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, float2(TexA0.x, TexA1.y), 0).xyz * 2 - 1;
	float3 D = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, float2(TexA1.x, TexA1.y), 0).xyz * 2 - 1;
	float3 E = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, float2(TexB0.x, TexB0.y), 0).xyz * 2 - 1;
	float3 F = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, float2(TexB1.x, TexB0.y), 0).xyz * 2 - 1;
	float3 G = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, float2(TexB0.x, TexB1.y), 0).xyz * 2 - 1;
	float3 H = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, float2(TexB1.x, TexB1.y), 0).xyz * 2 - 1;

	float a = dot(A, fv - float3(0, 0, 0));
	float b = dot(B, fv - float3(1, 0, 0));
	float c = dot(C, fv - float3(0, 1, 0));
	float d = dot(D, fv - float3(1, 1, 0));
	float e = dot(E, fv - float3(0, 0, 1));
	float f = dot(F, fv - float3(1, 0, 1));
	float g = dot(G, fv - float3(0, 1, 1));
	float h = dot(H, fv - float3(1, 1, 1));

	float3 Weights = PerlinRamp(frac(float4(fv, 0))).xyz;
	
	float i = lerp(lerp(a, b, Weights.x), lerp(c, d, Weights.x), Weights.y);
	float j = lerp(lerp(e, f, Weights.x), lerp(g, h, Weights.x), Weights.y);

	return lerp(i, j, Weights.z);
}



float FastGradientPerlinNoise3D_TEX(float3 xyz)
{
	
	float Extent = 16;

	
	
	xyz = frac(xyz / (Extent - 1)) * (Extent - 1);

	
	float3 uvw = frac(xyz);
	
	
	float3 p0 = xyz - uvw;

	
	float3 f = PerlinRamp(float4(uvw, 0)).xyz;	
	
	float3 p = p0 + f;
	
	float4 NoiseSample = Texture3DSampleLevel(View.PerlinNoise3DTexture, View.PerlinNoise3DTextureSampler, p / Extent + 0.5f / Extent, 0);		

	
	
	float3 n = NoiseSample.xyz * 255.0f / 127.0f - 1.0f;
	float d = NoiseSample.w * 255.f - 127;
	return dot(xyz, n) - d;
}





float3 VoronoiCornerSample(float3 pos, int Quality)
{
	
	float3 noise = float3(Rand3DPCG16(int3(pos))) / 0xffff - 0.5;

	
	
	if (Quality <= 2)
	{
		return normalize(noise) * 0.2588;
	}

	
	
	if (Quality == 3)
	{
		return normalize(noise) * 0.3090;
	}

	
	return noise;
}








float4 VoronoiCompare(float4 minval, float3 candidate, float3 offset, bool bDistanceOnly)
{
	if (bDistanceOnly)
	{
		return float4(0, 0, 0, min(minval.w, dot(offset, offset)));
	}
	else
	{
		float newdist = dot(offset, offset);
		return newdist > minval.w ? minval : float4(candidate, newdist);
	}
}


float4 VoronoiNoise3D_ALU(float3 v, int Quality, bool bTiling, float RepeatSize, bool bDistanceOnly)
{
	float3 fv = frac(v),  fv2 = frac(v + 0.5);
	float3 iv = floor(v), iv2 = floor(v + 0.5);

	
	float4 mindist = float4(0,0,0,100);
	float3 p, offset;

	
	if (Quality == 3)
	{
		 [unroll( 3 )] for (offset.x = -1; offset.x <= 1; ++offset.x)
		{
			 [unroll( 3 )] for (offset.y = -1; offset.y <= 1; ++offset.y)
			{
				 [unroll( 3 )] for (offset.z = -1; offset.z <= 1; ++offset.z)
				{
					p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize), Quality);
					mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
				}
			}
		}
	}

	
	else
	{
		 [unroll( 2 )] for (offset.x = 0; offset.x <= 1; ++offset.x)
		{
			 [unroll( 2 )] for (offset.y = 0; offset.y <= 1; ++offset.y)
			{
				 [unroll( 2 )] for (offset.z = 0; offset.z <= 1; ++offset.z)
				{
					p = offset + VoronoiCornerSample(NoiseTileWrap(iv + offset, bTiling, RepeatSize), Quality);
					mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);

					
					if (Quality == 2)
					{
						
						p = offset + VoronoiCornerSample(NoiseTileWrap(iv2 + offset, bTiling, RepeatSize) + 467, Quality);
						mindist = VoronoiCompare(mindist, iv2 + p, fv2 - p, bDistanceOnly);
					}
				}
			}
		}
	}

	
	if (Quality >= 4)
	{
		 [unroll( 2 )] for (offset.x = -1; offset.x <= 2; offset.x += 3)
		{
			 [unroll( 2 )] for (offset.y = 0; offset.y <= 1; ++offset.y)
			{
				 [unroll( 2 )] for (offset.z = 0; offset.z <= 1; ++offset.z)
				{
					
					p = offset.xyz + VoronoiCornerSample(NoiseTileWrap(iv + offset.xyz, bTiling, RepeatSize), Quality);
					mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);

					
					p = offset.yzx + VoronoiCornerSample(NoiseTileWrap(iv + offset.yzx, bTiling, RepeatSize), Quality);
					mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);

					
					p = offset.zxy + VoronoiCornerSample(NoiseTileWrap(iv + offset.zxy, bTiling, RepeatSize), Quality);
					mindist = VoronoiCompare(mindist, iv + p, fv - p, bDistanceOnly);
				}
			}
		}
	}

	
	return float4(mindist.xyz, sqrt(mindist.w));
}







float3 ComputeSimplexWeights2D(float2 OrthogonalPos, out float2 PosA, out float2 PosB, out float2 PosC)
{
	float2 OrthogonalPosFloor = floor(OrthogonalPos); 
	PosA = OrthogonalPosFloor;
	PosB = PosA + float2(1, 1); 

	float2 LocalPos = OrthogonalPos - OrthogonalPosFloor;

	PosC = PosA + ((LocalPos.x > LocalPos.y) ? float2(1,0) : float2(0,1));

	float b = min(LocalPos.x, LocalPos.y);
	float c = abs(LocalPos.y - LocalPos.x);
	float a = 1.0f - b - c;

	return float3(a, b, c);
}



float4 ComputeSimplexWeights3D(float3 OrthogonalPos, out float3 PosA, out float3 PosB, out float3 PosC, out float3 PosD)
{
	float3 OrthogonalPosFloor = floor(OrthogonalPos);

	PosA = OrthogonalPosFloor;
	PosB = PosA + float3(1, 1, 1);

	OrthogonalPos -= OrthogonalPosFloor;

	float Largest = max(OrthogonalPos.x, max(OrthogonalPos.y, OrthogonalPos.z));
	float Smallest = min(OrthogonalPos.x, min(OrthogonalPos.y, OrthogonalPos.z));

	PosC = PosA + float3(Largest == OrthogonalPos.x, Largest == OrthogonalPos.y, Largest == OrthogonalPos.z);
	PosD = PosA + float3(Smallest != OrthogonalPos.x, Smallest != OrthogonalPos.y, Smallest != OrthogonalPos.z);

	float4 ret;

	float RG = OrthogonalPos.x - OrthogonalPos.y;
	float RB = OrthogonalPos.x - OrthogonalPos.z;
	float GB = OrthogonalPos.y - OrthogonalPos.z;

	ret.b = 
		  min(max(0, RG), max(0, RB))		
		+ min(max(0, -RG), max(0, GB))		
		+ min(max(0, -RB), max(0, -GB));	
	
	ret.a = 
		  min(max(0, -RG), max(0, -RB))		
		+ min(max(0, RG), max(0, -GB))		
		+ min(max(0, RB), max(0, GB));		

	ret.g = Smallest;
	ret.r = 1.0f - ret.g - ret.b - ret.a;

	return ret;
}

float2 GetPerlinNoiseGradientTextureAt(float2 v)
{
	float2 TexA = (v.xy + 0.5f) / 128.0f;

	
	float3 p = Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, TexA, 0).xyz * 2 - 1;
	return normalize(p.xy + p.z * 0.33f);
}

float3 GetPerlinNoiseGradientTextureAt(float3 v)
{
	const float2 ZShear = float2(17.0f, 89.0f);

	float2 OffsetA = v.z * ZShear;
	float2 TexA = (v.xy + OffsetA + 0.5f) / 128.0f;

	return Texture2DSampleLevel(View.PerlinNoiseGradientTexture, View.PerlinNoiseGradientTextureSampler, TexA , 0).xyz * 2 - 1;
}

float2 SkewSimplex(float2 In)
{
	return In + dot(In, (sqrt(3.0f) - 1.0f) * 0.5f );
}
float2 UnSkewSimplex(float2 In)
{
	return In - dot(In, (3.0f - sqrt(3.0f)) / 6.0f );
}
float3 SkewSimplex(float3 In)
{
	return In + dot(In, 1.0 / 3.0f );
}
float3 UnSkewSimplex(float3 In)
{
	return In - dot(In, 1.0 / 6.0f );
}




float GradientSimplexNoise2D_TEX(float2 EvalPos)
{
	float2 OrthogonalPos = SkewSimplex(EvalPos);

	float2 PosA, PosB, PosC, PosD;
	float3 Weights = ComputeSimplexWeights2D(OrthogonalPos, PosA, PosB, PosC);

	
	float2 A = GetPerlinNoiseGradientTextureAt(PosA);
	float2 B = GetPerlinNoiseGradientTextureAt(PosB);
	float2 C = GetPerlinNoiseGradientTextureAt(PosC);

	PosA = UnSkewSimplex(PosA);
	PosB = UnSkewSimplex(PosB);
	PosC = UnSkewSimplex(PosC);

	float DistanceWeight;

	DistanceWeight = saturate(0.5f - length2(EvalPos - PosA));	DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
	float a = dot(A, EvalPos - PosA) * DistanceWeight;
	DistanceWeight = saturate(0.5f - length2(EvalPos - PosB));	DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
	float b = dot(B, EvalPos - PosB) * DistanceWeight;
	DistanceWeight = saturate(0.5f - length2(EvalPos - PosC));	DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
	float c = dot(C, EvalPos - PosC) * DistanceWeight;
	
	return 70 * (a + b + c);
}






float SimplexNoise3D_TEX(float3 EvalPos)
{
	float3 OrthogonalPos = SkewSimplex(EvalPos);

	float3 PosA, PosB, PosC, PosD;
	float4 Weights = ComputeSimplexWeights3D(OrthogonalPos, PosA, PosB, PosC, PosD);

	
	float3 A = GetPerlinNoiseGradientTextureAt(PosA);
	float3 B = GetPerlinNoiseGradientTextureAt(PosB);
	float3 C = GetPerlinNoiseGradientTextureAt(PosC);
	float3 D = GetPerlinNoiseGradientTextureAt(PosD);
	
	PosA = UnSkewSimplex(PosA);
	PosB = UnSkewSimplex(PosB);
	PosC = UnSkewSimplex(PosC);
	PosD = UnSkewSimplex(PosD);

	float DistanceWeight;

	DistanceWeight = saturate(0.6f - length2(EvalPos - PosA));	DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
	float a = dot(A, EvalPos - PosA) * DistanceWeight;
	DistanceWeight = saturate(0.6f - length2(EvalPos - PosB));	DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
	float b = dot(B, EvalPos - PosB) * DistanceWeight;
	DistanceWeight = saturate(0.6f - length2(EvalPos - PosC));	DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
	float c = dot(C, EvalPos - PosC) * DistanceWeight;
	DistanceWeight = saturate(0.6f - length2(EvalPos - PosD));	DistanceWeight *= DistanceWeight; DistanceWeight *= DistanceWeight;
	float d = dot(D, EvalPos - PosD) * DistanceWeight;

	return 32 * (a + b + c + d);
}


float VolumeRaymarch(float3 posPixelWS, float3 posCameraWS)
{
	float ret = 0;
	int cnt = 60;

	[loop] for(int i=0; i < cnt; ++i)
	{
		ret += saturate(FastGradientPerlinNoise3D_TEX(lerp(posPixelWS, posCameraWS, i/(float)cnt) * 0.01) - 0.2f);
	}

	return ret / cnt * (length(posPixelWS - posCameraWS) * 0.001f );
}


#line 741 "/Engine/Private/Common.ush"

  




float PhongShadingPow(float X, float Y)
{
	
	

	

	

	
	
	

	

	
	

	return ClampedPow(X, Y);
}












	



	



Texture2D		LightAttenuationTexture;
SamplerState	LightAttenuationTextureSampler;





float ConvertTangentUnormToSnorm8(float Input)
{
	int IntVal = int(round(Input * 255.0f));
	
	IntVal =  select_internal( IntVal > 127 , IntVal | 0xFFFFFF80 , IntVal );
	return clamp(IntVal / 127.0f, -1, 1);
}
float2 ConvertTangentUnormToSnorm8(float2 Input)
{
	int2 IntVal = int2(round(Input * 255.0f));
	
	IntVal =  select_internal( IntVal > 127 , IntVal | 0xFFFFFF80 , IntVal );
	return clamp(IntVal / 127.0f, -1, 1);
}
float3 ConvertTangentUnormToSnorm8(float3 Input)
{
	int3 IntVal = int3(round(Input * 255.0f));
	IntVal =  select_internal( IntVal > 127 , IntVal | 0xFFFFFF80 , IntVal );
	return clamp(IntVal / 127.0f, -1, 1);
}
float4 ConvertTangentUnormToSnorm8(float4 Input)
{
	int4 IntVal = int4(round(Input * 255.0f));
	
	IntVal =  select_internal( IntVal > 127 , IntVal | 0xFFFFFF80 , IntVal );
	return clamp(IntVal / 127.0f, -1, 1);
}
float ConvertTangentUnormToSnorm16(float Input)
{
	int IntVal = int(round(Input * 65535.0f));
	
	IntVal =  select_internal( IntVal > 32767 , IntVal | 0xFFFF8000 , IntVal );
	return clamp(IntVal / 32767.0f, -1, 1);
}
float2 ConvertTangentUnormToSnorm16(float2 Input)
{
	int2 IntVal = int2(round(Input * 65535.0f));
	
	IntVal =  select_internal( IntVal > 32767 , IntVal | 0xFFFFFF80 , IntVal );
	return clamp(IntVal / 32767.0f, -1, 1);
}
float3 ConvertTangentUnormToSnorm16(float3 Input)
{
	int3 IntVal = int3(round(Input * 65535.0f));
	IntVal =  select_internal( IntVal > 32767 , IntVal | 0xFFFFFF80 , IntVal );
	return clamp(IntVal / 32767.0f, -1, 1);
}
float4 ConvertTangentUnormToSnorm16(float4 Input)
{
	int4 IntVal = int4(round(Input * 65535.0f));
	
	IntVal =  select_internal( IntVal > 32767 , IntVal | 0xFFFFFF80 , IntVal );
	return clamp(IntVal / 32767.0f, -1, 1);
}
float ConvertTangentSnormToUnorm8(float Input)
{
	float Res =  select_internal( Input >= 0.0f , Input * 127 , ((Input + 1.0) * 127) + 128 );
	return clamp(Res / 255, 0.0f, 0.99f);
}
float2 ConvertTangentSnormToUnorm8(float2 Input)
{
	float2 Res =  select_internal( Input >= 0.0f , Input * 127 , ((Input + 1.0) * 127) + 128 );
	return clamp(Res / 255, 0.0f, 0.99f);
}
float3 ConvertTangentSnormToUnorm8(float3 Input)
{
	float3 Res =  select_internal( Input >= 0.0f , Input * 127 , ((Input + 1.0) * 127) + 128 );
	return clamp(Res / 255, 0.0f, 0.99f);
}
float4 ConvertTangentSnormToUnorm8(float4 Input)
{
	float4 Res =  select_internal( Input >= 0.0f , Input * 127 , ((Input + 1.0) * 127) + 128 );
	return clamp(Res / 255, 0.0f, 0.99f);
}
float ConvertTangentSnormToUnorm16(float Input)
{
	float Res =  select_internal( Input >= 0.0f , Input * 32767 , ((Input + 1.0) * 32767) + 32768 );
	return clamp(Res / 65535, 0.0f, 0.99f);
}
float2 ConvertTangentSnormToUnorm16(float2 Input)
{
	float2 Res =  select_internal( Input >= 0.0f , Input * 32767 , ((Input + 1.0) * 32767) + 32768 );
	return clamp(Res / 65535, 0.0f, 0.99f);
}
float3 ConvertTangentSnormToUnorm16(float3 Input)
{
	float3 Res =  select_internal( Input >= 0.0f , Input * 32767 , ((Input + 1.0) * 32767) + 32768 );
	return clamp(Res / 65535, 0.0f, 0.99f);
}
float4 ConvertTangentSnormToUnorm16(float4 Input)
{
	float4 Res =  select_internal( Input >= 0.0f , Input * 32767 , ((Input + 1.0) * 32767) + 32768 );
	return clamp(Res / 65535, 0.0f, 0.99f);
}






uint PackUnorm2x16(float2 v)
{
	uint2 sv = uint2(round(clamp(v, 0.0, 1.0) * 65535.0));
	return (sv.x | (sv.y << 16u));
}

uint PackSnorm2x16(float2 v)
{
	uint2 sv = uint2(round(clamp(v, -1.0, 1.0) * 32767.0) + 32767.0);
	return (sv.x | (sv.y << 16u));
}

float2 UnpackUnorm2x16(uint p)
{
	float2 Ret;
	Ret.x = (p & 0xffff) * rcp(65535.0f);
	Ret.y = (p >> 16u) * rcp(65535.0f);
	return Ret;
}

float2 UnpackSnorm2x16(uint p)
{
	float2 Ret;
	Ret.x = clamp((float(p & 0xffff) - 32767.0f) * rcp(32767.0f), -1.0, 1.0);
	Ret.y = clamp((float(p >> 16u) - 32767.0f) * rcp(32767.0f), -1.0, 1.0);
	return Ret;
}

float Square( float x )
{
	return x*x;
}

float2 Square( float2 x )
{
	return x*x;
}

float3 Square( float3 x )
{
	return x*x;
}

float4 Square( float4 x )
{
	return x*x;
}

float Pow2( float x )
{
	return x*x;
}

float2 Pow2( float2 x )
{
	return x*x;
}

float3 Pow2( float3 x )
{
	return x*x;
}

float4 Pow2( float4 x )
{
	return x*x;
}

float Pow3( float x )
{
	return x*x*x;
}

float2 Pow3( float2 x )
{
	return x*x*x;
}

float3 Pow3( float3 x )
{
	return x*x*x;
}

float4 Pow3( float4 x )
{
	return x*x*x;
}

float Pow4( float x )
{
	float xx = x*x;
	return xx * xx;
}

float2 Pow4( float2 x )
{
	float2 xx = x*x;
	return xx * xx;
}

float3 Pow4( float3 x )
{
	float3 xx = x*x;
	return xx * xx;
}

float4 Pow4( float4 x )
{
	float4 xx = x*x;
	return xx * xx;
}

float Pow5( float x )
{
	float xx = x*x;
	return xx * xx * x;
}

float2 Pow5( float2 x )
{
	float2 xx = x*x;
	return xx * xx * x;
}

float3 Pow5( float3 x )
{
	float3 xx = x*x;
	return xx * xx * x;
}

float4 Pow5( float4 x )
{
	float4 xx = x*x;
	return xx * xx * x;
}

float Pow6( float x )
{
	float xx = x*x;
	return xx * xx * xx;
}

float2 Pow6( float2 x )
{
	float2 xx = x*x;
	return xx * xx * xx;
}

float3 Pow6( float3 x )
{
	float3 xx = x*x;
	return xx * xx * xx;
}

float4 Pow6( float4 x )
{
	float4 xx = x*x;
	return xx * xx * xx;
}


float AtanFast( float x )
{
	
	float3 A = x < 1 ? float3( x, 0, 1 ) : float3( 1/x, 0.5 * PI, -1 );
	return A.y + A.z * ( ( ( -0.130234 * A.x - 0.0954105 ) * A.x + 1.00712 ) * A.x - 0.00001203333 );
}


float EncodeLightAttenuation(float InColor)
{
	
	
	return sqrt(InColor);
}


float4 EncodeLightAttenuation(float4 InColor)
{
	return sqrt(InColor);
}


float DecodeLightAttenuation(float InColor)
{
	return Square(InColor);
}


float4 DecodeLightAttenuation(float4 InColor)
{
	return Square(InColor);
}


float4 RGBTEncode(float3 Color)
{
	float4 RGBT;
	float Max = max(max(Color.r, Color.g), max(Color.b, 1e-6));
	float RcpMax = rcp(Max);
	RGBT.rgb = Color.rgb * RcpMax;
	RGBT.a = Max * rcp(1.0 + Max);
	return RGBT;
}

float3 RGBTDecode(float4 RGBT)
{
	RGBT.a = RGBT.a * rcp(1.0 - RGBT.a);
	return RGBT.rgb * RGBT.a;
}



float4 RGBMEncode( float3 Color )
{
	Color *= 1.0 / 64.0;
	
	float4 rgbm;
	rgbm.a = saturate( max( max( Color.r, Color.g ), max( Color.b, 1e-6 ) ) );
	rgbm.a = ceil( rgbm.a * 255.0 ) / 255.0;
	rgbm.rgb = Color / rgbm.a;
	return rgbm;
}

float4 RGBMEncodeFast( float3 Color )
{
	
	float4 rgbm;
	rgbm.a = dot( Color, 255.0 / 64.0 );
	rgbm.a = ceil( rgbm.a );
	rgbm.rgb = Color / rgbm.a;
	rgbm *= float4( 255.0 / 64.0, 255.0 / 64.0, 255.0 / 64.0, 1.0 / 255.0 );
	return rgbm;
}

float3 RGBMDecode( float4 rgbm, float MaxValue )
{
	return rgbm.rgb * (rgbm.a * MaxValue);
}

float3 RGBMDecode( float4 rgbm )
{
	return rgbm.rgb * (rgbm.a * 64.0f);
}

float4 RGBTEncode8BPC(float3 Color, float Range)
{
	float Max = max(max(Color.r, Color.g), max(Color.b, 1e-6));
	Max = min(Max, Range);

	float4 RGBT;
	RGBT.a = (Range + 1) / Range *  Max / (1 + Max);

	
	RGBT.a = ceil(RGBT.a*255.0) / 255.0;
	Max = RGBT.a / (1 + 1 / Range - RGBT.a);

	float RcpMax = rcp(Max);
	RGBT.rgb = Color.rgb * RcpMax;
	return RGBT;
}

float3 RGBTDecode8BPC(float4 RGBT, float Range)
{
	RGBT.a = RGBT.a / (1 + 1 / Range - RGBT.a);
	return RGBT.rgb * RGBT.a;
}


















float2 CalcScreenUVFromOffsetFraction(float4 ScreenPosition, float2 OffsetFraction)
{
	float2 NDC = ScreenPosition.xy / ScreenPosition.w;
	
	
	
	float2 OffsetNDC = clamp(NDC + OffsetFraction * float2(2, -2), -.999f, .999f);
	return float2(OffsetNDC * ResolvedView.ScreenPositionScaleBias.xy + ResolvedView.ScreenPositionScaleBias.wz);
}

float4 GetPerPixelLightAttenuation(float2 UV)
{
	return DecodeLightAttenuation(Texture2DSampleLevel(LightAttenuationTexture, LightAttenuationTextureSampler, UV, 0));
}




float ConvertFromDeviceZ(float DeviceZ)
{
	
	return DeviceZ * View.InvDeviceZToWorldZTransform[0] + View.InvDeviceZToWorldZTransform[1] + 1.0f / (DeviceZ * View.InvDeviceZToWorldZTransform[2] - View.InvDeviceZToWorldZTransform[3]);
}


bool IsOrthoProjection(float4x4 ViewToClip)
{
	return ViewToClip[3][3] >= 1.0f;
}




float ConvertToDeviceZ(float SceneDepth)
{
	[flatten]
	if (IsOrthoProjection(View.ViewToClip))
	{
		
		return SceneDepth * View.ViewToClip[2][2] + View.ViewToClip[3][2];
	}
	else
	{
		
		return 1.0f / ((SceneDepth + View.InvDeviceZToWorldZTransform[3]) * View.InvDeviceZToWorldZTransform[2]);
	}
}

float2 ScreenPositionToBufferUV(float4 ScreenPosition)
{
	return float2(ScreenPosition.xy / ScreenPosition.w * ResolvedView.ScreenPositionScaleBias.xy + ResolvedView.ScreenPositionScaleBias.wz);
}

float2 SvPositionToBufferUV(float4 SvPosition)
{
	return SvPosition.xy * View.BufferSizeAndInvSize.zw;
}


float3 SvPositionToTranslatedWorld(float4 SvPosition)
{
	float4 HomWorldPos = mul(float4(SvPosition.xyz, 1), View.SVPositionToTranslatedWorld);

	return HomWorldPos.xyz / HomWorldPos.w;
}


float3 SvPositionToResolvedTranslatedWorld(float4 SvPosition)
{
	float4 HomWorldPos = mul(float4(SvPosition.xyz, 1), ResolvedView.SVPositionToTranslatedWorld);

	return HomWorldPos.xyz / HomWorldPos.w;
}


FLWCVector3 SvPositionToWorld(float4 SvPosition)
{
	float3 TranslatedWorldPosition = SvPositionToTranslatedWorld(SvPosition);
	return LWCSubtract(TranslatedWorldPosition, GetPrimaryView().PreViewTranslation);
}


float4 SvPositionToScreenPosition(float4 SvPosition)
{
	


	float2 PixelPos = SvPosition.xy - View.ViewRectMin.xy;	

	
	float3 NDCPos = float3( (PixelPos * View.ViewSizeAndInvSize.zw - 0.5f) * float2(2, -2), SvPosition.z);

	
	return float4(NDCPos.xyz, 1) * SvPosition.w;
}


float4 SvPositionToResolvedScreenPosition(float4 SvPosition)
{
	float2 PixelPos = SvPosition.xy - ResolvedView.ViewRectMin.xy;	

	
	float3 NDCPos = float3( (PixelPos * ResolvedView.ViewSizeAndInvSize.zw - 0.5f) * float2(2, -2), SvPosition.z);

	
	return float4(NDCPos.xyz, 1) * SvPosition.w;
}

void SvPositionToResolvedScreenPositionDeriv(float4 SvPosition, float2 PPZ_DDX_DDY, float2 W_DDX_DDY, inout float4 ScreenPosition, inout float4 ScreenPositionDDX, inout float4 ScreenPositionDDY)
{
	float2 PixelPos = SvPosition.xy - ResolvedView.ViewRectMin.xy;

	
	float4 NDCPos = float4((PixelPos * ResolvedView.ViewSizeAndInvSize.zw - 0.5f) * float2(2, -2), SvPosition.z, 1.0f);
	float4 NDCPosDDX = float4(ResolvedView.ViewSizeAndInvSize.z * 2.0f, 0.0f, PPZ_DDX_DDY.x, 0.0f);
	float4 NDCPosDDY = float4(ResolvedView.ViewSizeAndInvSize.w * 2.0f, 0.0f, PPZ_DDX_DDY.y, 0.0f);

	ScreenPosition = NDCPos * SvPosition.w;
	ScreenPositionDDX = NDCPos * W_DDX_DDY.x + NDCPosDDX * SvPosition.w;
	ScreenPositionDDY = NDCPos * W_DDX_DDY.y + NDCPosDDY * SvPosition.w;
}

float2 SvPositionToViewportUV(float4 SvPosition)
{
	
	float2 PixelPos = SvPosition.xy - View.ViewRectMin.xy;	

	return PixelPos.xy * View.ViewSizeAndInvSize.zw;
}

float2 BufferUVToViewportUV(float2 BufferUV)
{
	float2 PixelPos = BufferUV.xy * View.BufferSizeAndInvSize.xy - View.ViewRectMin.xy;
	return PixelPos.xy * View.ViewSizeAndInvSize.zw;
}

float2 ViewportUVToBufferUV(float2 ViewportUV)
{
	float2 PixelPos = ViewportUV * View.ViewSizeAndInvSize.xy;
	return (PixelPos + View.ViewRectMin.xy) * View.BufferSizeAndInvSize.zw;
}


float2 ViewportUVToScreenPos(float2 ViewportUV)
{
	return float2(2 * ViewportUV.x - 1, 1 - 2 * ViewportUV.y);
}

float2 ScreenPosToViewportUV(float2 ScreenPos)
{
	return float2(0.5 + 0.5 * ScreenPos.x, 0.5 - 0.5 * ScreenPos.y);
}



float3 ScreenToViewPos(float2 ViewportUV, float SceneDepth)
{
	float2 ProjViewPos;

	ProjViewPos.x =  ViewportUV.x * View.ScreenToViewSpace.x  + View.ScreenToViewSpace.z;
	ProjViewPos.y =  ViewportUV.y * View.ScreenToViewSpace.y  + View.ScreenToViewSpace.w;
	return float3(ProjViewPos * SceneDepth, SceneDepth);
}







float2 ScreenAlignedPosition( float4 ScreenPosition )
{
	return float2(ScreenPositionToBufferUV(ScreenPosition));
}




float2 ScreenAlignedUV( float2 UV )
{
	return (UV*float2(2,-2) + float2(-1,1))*View.ScreenPositionScaleBias.xy + View.ScreenPositionScaleBias.wz;
}




float2 GetViewportCoordinates(float2 InFragmentCoordinates)
{
	return InFragmentCoordinates;
}




float4 UnpackNormalMap( float4 TextureSample )
{
	


		float2 NormalXY = TextureSample.rg;
	

	NormalXY = NormalXY * float2(2.0f,2.0f) - float2(1.0f,1.0f);
	float NormalZ = sqrt( saturate( 1.0f - dot( NormalXY, NormalXY ) ) );
	return float4( NormalXY.xy, NormalZ, 1.0f );
}


float AntialiasedTextureMask( Texture2D Tex, SamplerState Sampler, float2 UV, float ThresholdConst, int Channel )
{
	
	float4 MaskConst = float4(Channel == 0, Channel == 1, Channel == 2, Channel == 3);

	
	const float WidthConst = 1.0f;			
	float InvWidthConst = 1 / WidthConst;

	

	
	
	
	

	

	
	
	
	
	
	
	
	
	

	
	
	float Result;
	{
		
		float Sample1 = dot(MaskConst, Texture2DSample(Tex, Sampler, UV));

		
		float2 TexDD = float2(DDX(Sample1), DDY(Sample1));

		float TexDDLength = max(abs(TexDD.x), abs(TexDD.y)); 
		float Top = InvWidthConst * (Sample1 - ThresholdConst);
		Result = Top / TexDDLength + ThresholdConst;
	}

	Result = saturate(Result);	

	return Result;
}



float Noise3D_Multiplexer(int Function, float3 Position, int Quality, bool bTiling, float RepeatSize)
{
	
	switch(Function)
	{
		case 0:
			return SimplexNoise3D_TEX(Position);
		case 1:
			return GradientNoise3D_TEX(Position, bTiling, RepeatSize);
		case 2:
			return FastGradientPerlinNoise3D_TEX(Position);
		case 3:
			return GradientNoise3D_ALU(Position, bTiling, RepeatSize);
		case 4:
			return ValueNoise3D_ALU(Position, bTiling, RepeatSize);
		default:
			return VoronoiNoise3D_ALU(Position, Quality, bTiling, RepeatSize, true).w * 2. - 1.;
	}
	return 0;
}



float MaterialExpressionNoise(float3 Position, float Scale, int Quality, int Function, bool bTurbulence, uint Levels, float OutputMin, float OutputMax, float LevelScale, float FilterWidth, bool bTiling, float RepeatSize)
{
	Position *= Scale;
	FilterWidth *= Scale;

	float Out = 0.0f;
	float OutScale = 1.0f;
	float InvLevelScale = 1.0f / LevelScale;
	
	[loop] for(uint i = 0; i < Levels; ++i)
	{
		
		OutScale *= saturate(1.0 - FilterWidth);

		if(bTurbulence)
		{
			Out += abs(Noise3D_Multiplexer(Function, Position, Quality, bTiling, RepeatSize)) * OutScale;
		}
		else
		{
			Out += Noise3D_Multiplexer(Function, Position, Quality, bTiling, RepeatSize) * OutScale;
		}

		Position *= LevelScale;
		RepeatSize *= LevelScale;
		OutScale *= InvLevelScale;
		FilterWidth *= LevelScale;
	}

	if(!bTurbulence)
	{
		
		Out = Out * 0.5f + 0.5f;
	}

	
	return lerp(OutputMin, OutputMax, Out);
}





float4 MaterialExpressionVectorNoise(float3 Position, int Quality, int Function, bool bTiling, float TileSize)
{
	float4 result = float4(0,0,0,1);
	float3x4 Jacobian = JacobianSimplex_ALU(Position, bTiling, TileSize);	

	
	switch (Function)
	{
	case 0:	
		result.xyz = float3(Rand3DPCG16(int3(floor(NoiseTileWrap(Position, bTiling, TileSize))))) / 0xffff;
		break;
	case 1: 
		result.xyz = float3(Jacobian[0].w, Jacobian[1].w, Jacobian[2].w);
		break;
	case 2: 
		result = Jacobian[0];
		break;
	case 3: 
		result.xyz = float3(Jacobian[2][1] - Jacobian[1][2], Jacobian[0][2] - Jacobian[2][0], Jacobian[1][0] - Jacobian[0][1]);
		break;
	default: 
		result = VoronoiNoise3D_ALU(Position, Quality, bTiling, TileSize, false);
		break;
	}
	return result;
}















float2 LineBoxIntersect(float3 RayOrigin, float3 RayEnd, float3 BoxMin, float3 BoxMax)
{
	float3 InvRayDir = 1.0f / (RayEnd - RayOrigin);
	
	
	float3 FirstPlaneIntersections = (BoxMin - RayOrigin) * InvRayDir;
	
	float3 SecondPlaneIntersections = (BoxMax - RayOrigin) * InvRayDir;
	
	float3 ClosestPlaneIntersections = min(FirstPlaneIntersections, SecondPlaneIntersections);
	
	float3 FurthestPlaneIntersections = max(FirstPlaneIntersections, SecondPlaneIntersections);

	float2 BoxIntersections;
	
	BoxIntersections.x = max(ClosestPlaneIntersections.x, max(ClosestPlaneIntersections.y, ClosestPlaneIntersections.z));
	
	BoxIntersections.y = min(FurthestPlaneIntersections.x, min(FurthestPlaneIntersections.y, FurthestPlaneIntersections.z));
	
	return saturate(BoxIntersections);
}


float ComputeDistanceFromBoxToPoint(float3 Mins, float3 Maxs, float3 InPoint)
{
	float3 DistancesToMin =  select_internal( InPoint < Mins , abs(InPoint - Mins) , float(0.0) );
	float3 DistancesToMax =  select_internal( InPoint > Maxs , abs(InPoint - Maxs) , float(0.0) );

	
	float Distance = dot(DistancesToMin, 1);
	Distance += dot(DistancesToMax, 1);
	return Distance;
}


float ComputeSquaredDistanceFromBoxToPoint(float3 BoxCenter, float3 BoxExtent, float3 InPoint)
{
	float3 AxisDistances = max(abs(InPoint - BoxCenter) - BoxExtent, 0);
	return dot(AxisDistances, AxisDistances);
}


float ComputeDistanceFromBoxToPointInside(float3 BoxCenter, float3 BoxExtent, float3 InPoint)
{
	float3 DistancesToMin = max(InPoint - BoxCenter + BoxExtent, 0);
	float3 DistancesToMax = max(BoxCenter + BoxExtent - InPoint, 0);
	float3 ClosestDistances = min(DistancesToMin, DistancesToMax);
	return min(ClosestDistances.x, min(ClosestDistances.y, ClosestDistances.z));
}

bool RayHitSphere(float3 RayOrigin, float3 UnitRayDirection, float3 SphereCenter, float SphereRadius)
{
	float3 ClosestPointOnRay = max(0, dot(SphereCenter - RayOrigin, UnitRayDirection)) * UnitRayDirection;
	float3 CenterToRay = RayOrigin + ClosestPointOnRay - SphereCenter;
	return dot(CenterToRay, CenterToRay) <= Square(SphereRadius);
}

bool RaySegmentHitSphere(float3 RayOrigin, float3 UnitRayDirection, float RayLength, float3 SphereCenter, float SphereRadius)
{
	float DistanceAlongRay = dot(SphereCenter - RayOrigin, UnitRayDirection);
	float3 ClosestPointOnRay = DistanceAlongRay * UnitRayDirection;
	float3 CenterToRay = RayOrigin + ClosestPointOnRay - SphereCenter;
	return dot(CenterToRay, CenterToRay) <= Square(SphereRadius) && DistanceAlongRay > -SphereRadius && DistanceAlongRay - SphereRadius < RayLength;
}





float2 RayIntersectSphere(float3 RayOrigin, float3 RayDirection, float4 Sphere)
{
	float3 LocalPosition = RayOrigin - Sphere.xyz;
	float LocalPositionSqr = dot(LocalPosition, LocalPosition);

	float3 QuadraticCoef;
	QuadraticCoef.x = dot(RayDirection, RayDirection);
	QuadraticCoef.y = 2 * dot(RayDirection, LocalPosition);
	QuadraticCoef.z = LocalPositionSqr - Sphere.w * Sphere.w;

	float Discriminant = QuadraticCoef.y * QuadraticCoef.y - 4 * QuadraticCoef.x * QuadraticCoef.z;

	float2 Intersections = -1;

	
	[flatten]
	if (Discriminant >= 0)
	{
		float SqrtDiscriminant = sqrt(Discriminant);
		Intersections = (-QuadraticCoef.y + float2(-1, 1) * SqrtDiscriminant) / (2 * QuadraticCoef.x);
	}

	return Intersections;
}


float3 TransformTangentVectorToWorld(float3x3 TangentToWorld, float3 InTangentVector)
{
	
	
	return mul(InTangentVector, TangentToWorld);
}


float3 TransformWorldVectorToTangent(float3x3 TangentToWorld, float3 InWorldVector)
{
	
	
	return mul(TangentToWorld, InWorldVector);
}

float3 TransformWorldVectorToView(float3 InTangentVector)
{
	
	return mul(InTangentVector, (float3x3)ResolvedView.TranslatedWorldToView);
}


float GetBoxPushout(float3 Normal,float3 Extent)
{
	return dot(abs(Normal * Extent), float3(1.0f, 1.0f, 1.0f));
}


void GenerateCoordinateSystem(float3 ZAxis, out float3 XAxis, out float3 YAxis)
{
	if (abs(ZAxis.x) > abs(ZAxis.y))
	{
		float InverseLength = 1.0f / sqrt(dot(ZAxis.xz, ZAxis.xz));
		XAxis = float3(-ZAxis.z * InverseLength, 0.0f, ZAxis.x * InverseLength);
	}
	else
	{
		float InverseLength = 1.0f / sqrt(dot(ZAxis.yz, ZAxis.yz));
		XAxis = float3(0.0f, ZAxis.z * InverseLength, -ZAxis.y * InverseLength);
	}

	YAxis = cross(ZAxis, XAxis);
}










struct FScreenVertexOutput
{
	noperspective float2 UV : TEXCOORD0;
	float4 Position : SV_POSITION;
};




float4 EncodeVelocityToTexture(float3 V)
{
	
		V.xy = sign(V.xy) * sqrt(abs(V.xy)) * (2.0 / sqrt(2.0));
	

	
	
	float4 EncodedV;
	EncodedV.xy = V.xy * (0.499f * 0.5f) + 32767.0f / 65535.0f;

	
		uint Vz = asuint(V.z);

		EncodedV.z = saturate(float((Vz >> 16) & 0xFFFF) * rcp(65535.0f) + (0.1 / 65535.0f));
		EncodedV.w = saturate(float((Vz >>  0) & 0xFFFF) * rcp(65535.0f) + (0.1 / 65535.0f));
	






	return EncodedV;

}

float3 DecodeVelocityFromTexture(float4 InEncodedV)
{



	float4 EncodedV = InEncodedV;

	const float InvDiv = 1.0f / (0.499f * 0.5f);

	float3 V;
	V.xy = EncodedV.xy * InvDiv - 32767.0f / 65535.0f * InvDiv;

	
		V.z = asfloat((uint(round(EncodedV.z * 65535.0f)) << 16) | uint(round(EncodedV.w * 65535.0f)));
	



	
		V.xy = (V.xy * abs(V.xy)) * 0.5;
	

	return V;
}


bool GetGIReplaceState()
{



	return false;

}


bool GetNaniteReplaceState()
{



	return false;

}

bool GetRayTracingQualitySwitch()
{



	return false;

}




bool GetPathTracingQualitySwitch() { return false;  }
bool GetPathTracingIsShadow() { return false; }
bool GetPathTracingIsIndirectDiffuse() { return false; }
bool GetPathTracingIsIndirectSpecular() { return false; }
bool GetPathTracingIsIndirectVolume() { return false; }


bool GetLightmassReplaceState()
{



	return false;

}



bool GetRuntimeVirtualTextureOutputSwitch()
{



	return false;

}

struct FWriteToSliceGeometryOutput
{
	FScreenVertexOutput Vertex;
	uint LayerIndex : SV_RenderTargetArrayIndex;
};







void DrawRectangle(
	in float4 InPosition,
	in float2 InTexCoord,
	out float4 OutPosition,
	out float2 OutTexCoord)
{
	OutPosition = InPosition;
	OutPosition.xy = -1.0f + 2.0f * (DrawRectangleParameters.PosScaleBias.zw + (InPosition.xy * DrawRectangleParameters.PosScaleBias.xy)) * DrawRectangleParameters.InvTargetSizeAndTextureSize.xy;
	OutPosition.xy *= float2( 1, -1 );
	OutTexCoord.xy = (DrawRectangleParameters.UVScaleBias.zw + (InTexCoord.xy * DrawRectangleParameters.UVScaleBias.xy)) * DrawRectangleParameters.InvTargetSizeAndTextureSize.zw;
}


void DrawRectangle(
	in float4 InPosition,
	in float2 InTexCoord,
	out float4 OutPosition,
	out float4 OutUVAndScreenPos)
{
	DrawRectangle(InPosition, InTexCoord, OutPosition, OutUVAndScreenPos.xy);
	OutUVAndScreenPos.zw = OutPosition.xy;
}


void DrawRectangle(in float4 InPosition, out float4 OutPosition)
{
	OutPosition = InPosition;
	OutPosition.xy = -1.0f + 2.0f * (DrawRectangleParameters.PosScaleBias.zw + (InPosition.xy * DrawRectangleParameters.PosScaleBias.xy)) * DrawRectangleParameters.InvTargetSizeAndTextureSize.xy;
	OutPosition.xy *= float2( 1, -1 );
}












  float SafeSaturate( float In) {	return saturate(In);}
  float2 SafeSaturate( float2 In) {	return saturate(In);}
  float3 SafeSaturate( float3 In) {	return saturate(In);}
  float4 SafeSaturate( float4 In) {	return saturate(In);}







#line 1893 "/Engine/Private/Common.ush"


  bool IsFinite( float In) {	return (asuint(In) & 0x7F800000) != 0x7F800000; } bool IsPositiveFinite( float In) {	return asuint(In) < 0x7F800000; } float MakeFinite( float In) {    return  select_internal( !IsFinite(In) , 0.0 , In ); } float MakePositiveFinite( float In) {    return  select_internal( !IsPositiveFinite(In) , 0.0 , In ); }
  bool2 IsFinite( float2 In) {	return (asuint(In) & 0x7F800000) != 0x7F800000; } bool2 IsPositiveFinite( float2 In) {	return asuint(In) < 0x7F800000; } float2 MakeFinite( float2 In) {    return  select_internal( !IsFinite(In) , 0.0 , In ); } float2 MakePositiveFinite( float2 In) {    return  select_internal( !IsPositiveFinite(In) , 0.0 , In ); }
  bool3 IsFinite( float3 In) {	return (asuint(In) & 0x7F800000) != 0x7F800000; } bool3 IsPositiveFinite( float3 In) {	return asuint(In) < 0x7F800000; } float3 MakeFinite( float3 In) {    return  select_internal( !IsFinite(In) , 0.0 , In ); } float3 MakePositiveFinite( float3 In) {    return  select_internal( !IsPositiveFinite(In) , 0.0 , In ); }
  bool4 IsFinite( float4 In) {	return (asuint(In) & 0x7F800000) != 0x7F800000; } bool4 IsPositiveFinite( float4 In) {	return asuint(In) < 0x7F800000; } float4 MakeFinite( float4 In) {    return  select_internal( !IsFinite(In) , 0.0 , In ); } float4 MakePositiveFinite( float4 In) {    return  select_internal( !IsPositiveFinite(In) , 0.0 , In ); }





bool GetShadowReplaceState()
{



	return false;

}

bool GetReflectionCapturePassSwitchState()
{
	return View.RenderingReflectionCaptureMask > 0.0f;
}

float IsShadowDepthShader()
{
	return GetShadowReplaceState() ? 1.0f : 0.0f;
}




float DecodePackedTwoChannelValue(float2 PackedHeight)
{
	return PackedHeight.x * 255.0 * 256.0 + PackedHeight.y * 255.0;
}

float DecodeHeightValue(float InValue)
{
	return (InValue - 32768.0) * (1.0f/128.0f);
}

float DecodePackedHeight(float2 PackedHeight)
{
	return DecodeHeightValue(DecodePackedTwoChannelValue(PackedHeight));
}


uint ReverseBitsN(uint Bitfield, const uint BitCount)
{
	return reversebits(Bitfield) >> (32 - BitCount);
}


inline uint Flatten2D(uint2 Coord, uint2 Dim)
{
	return Coord.x + Coord.y * Dim.x;
}


inline uint2 Unflatten2D(uint Index, uint2 Dim)
{
	return uint2(Index % Dim.x, Index / Dim.x);
}

uint2 ZOrder2D(uint Index, const uint SizeLog2)
{
	uint2 Coord = 0; 

	[unroll]
	for (uint i = 0; i < SizeLog2; i++)
	{
		Coord.x |= ((Index >> (2 * i + 0)) & 0x1) << i;
		Coord.y |= ((Index >> (2 * i + 1)) & 0x1) << i;
	}

	return Coord;
}

uint3 ZOrder3D(uint Index, const uint SizeLog2)
{
    uint3 Coord = 0;
    
    [unroll]
    for (uint i = 0; i < SizeLog2; i++)
    {
        Coord.x |= ((Index >> (3 * i + 0)) & 0x1) << i;
        Coord.y |= ((Index >> (3 * i + 1)) & 0x1) << i;
        Coord.z |= ((Index >> (3 * i + 2)) & 0x1) << i;
    }

    return Coord;
}

uint ZOrder3DEncode(uint3 Coord, const uint SizeLog2)
{
    uint Index = 0;
    
    [unroll]
    for (uint i = 0; i < SizeLog2; i++)
    {
        Index |= ((Coord.x >> i) & 0x1) << (3 * i + 0);
        Index |= ((Coord.y >> i) & 0x1) << (3 * i + 1);
        Index |= ((Coord.z >> i) & 0x1) << (3 * i + 2);
    }

    return Index;
}

uint DivideAndRoundUp(uint Dividend, uint Divisor)
{
	return (Dividend + Divisor - 1) / Divisor;
}


uint DivideAndRoundUp(uint Dividend, uint Divisor, uint DivisorAsBitShift)
{
	return (Dividend + Divisor - 1) >> DivisorAsBitShift;
}


struct FPixelShaderIn
{
	
	float4 SvPosition;

	
	uint Coverage;

	
	bool bIsFrontFace;
};

struct FPixelShaderOut
{
	
	float4 MRT[8];
	
	
	uint StrataOutput[3];
	uint StrataTopLayerData;

	
	uint Coverage;

	
	float Depth;
};





























float4 GatherDepth(Texture2D Texture, float2 UV)
{
	
	float4 DeviceZ = Texture.GatherRed( D3DStaticBilinearClampedSampler, UV);

	return float4(
		ConvertFromDeviceZ(DeviceZ.x),
		ConvertFromDeviceZ(DeviceZ.y),
		ConvertFromDeviceZ(DeviceZ.z),
		ConvertFromDeviceZ(DeviceZ.w));
}




#line  19 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"

	
#line   3 "/Engine/Private/DistanceField/GlobalDistanceFieldShared.ush"











	float MaxGlobalDFAOConeDistance;








#line  49 "/Engine/Private/DistanceField/GlobalDistanceFieldShared.ush"

	
	Texture3D GlobalDistanceFieldPageAtlasTexture;
	Texture3D GlobalDistanceFieldCoverageAtlasTexture;
	Texture3D<uint> GlobalDistanceFieldPageTableTexture;
	Texture3D GlobalDistanceFieldMipTexture;
	float4 GlobalVolumeTranslatedCenterAndExtent[6];
	float4 GlobalVolumeTranslatedWorldToUVAddAndMul[6];
	float4 GlobalDistanceFieldMipTranslatedWorldToUVScale[6];
	float4 GlobalDistanceFieldMipTranslatedWorldToUVBias[6];
	float GlobalDistanceFieldMipFactor;
	float GlobalDistanceFieldMipTransition;
	float3 GlobalDistanceFieldInvPageAtlasSize;
	float3 GlobalDistanceFieldInvCoverageAtlasSize;
	uint GlobalDistanceFieldClipmapSizeInPages;
	float GlobalVolumeDimension;
	float GlobalVolumeTexelSize;
	uint NumGlobalSDFClipmaps;
	float CoveredExpandSurfaceScale;
	float NotCoveredExpandSurfaceScale;
	float NotCoveredMinStepScale;
	float DitheredTransparencyStepThreshold;
	float DitheredTransparencyTraceThreshold;


















struct FGlobalDistanceFieldPage
{
	uint PageIndex;
	bool bValid;
	bool bCoverage;
};

uint3 GlobalDistanceFieldPageLinearIndexToPageAtlasOffset(FGlobalDistanceFieldPage Page)
{
	uint3 PageAtlasOffset;
	
	
	

	
	PageAtlasOffset.x = Page.PageIndex & 0x7F;
	PageAtlasOffset.y = (Page.PageIndex >> 7) & 0x7F;
	PageAtlasOffset.z = Page.PageIndex >> 14;

	return PageAtlasOffset;
}

uint PackGlobalDistanceFieldPage(FGlobalDistanceFieldPage Page)
{
	uint PackedPage = 0xFFFFFFFF;
	if (Page.bValid)
	{
		PackedPage = Page.PageIndex & 0x00FFFFFF;
		PackedPage |= Page.bCoverage ? 0x80000000 : 0;
	}
	return PackedPage;
}

FGlobalDistanceFieldPage UnpackGlobalDistanceFieldPage(uint PackedPage)
{
	FGlobalDistanceFieldPage Page;
	Page.PageIndex = PackedPage & 0x00FFFFFF;
	Page.bCoverage = PackedPage & 0x80000000;
	Page.bValid = PackedPage < 0xFFFFFFFF;
	return Page;
}

FGlobalDistanceFieldPage GetGlobalDistanceFieldPage(float3 VolumeUV, uint ClipmapIndex)
{
	int4 PageTableCoord = int4(saturate(VolumeUV) * GlobalDistanceFieldClipmapSizeInPages + int3(0, 0, ClipmapIndex * GlobalDistanceFieldClipmapSizeInPages), 0);
	uint PackedPage = GlobalDistanceFieldPageTableTexture.Load(PageTableCoord);
	return UnpackGlobalDistanceFieldPage(PackedPage);
}

void ComputeGlobalDistanceFieldPageUV(float3 VolumeUV, FGlobalDistanceFieldPage Page, out float3 OutPageUV, out float3 OutCoveragePageUV)
{
	uint3 PageAtlasOffset = GlobalDistanceFieldPageLinearIndexToPageAtlasOffset(Page);
	float3 VolumePageUV = frac(VolumeUV * GlobalDistanceFieldClipmapSizeInPages);

	float3 PageAtlasCoord = PageAtlasOffset * 8 + VolumePageUV * (8 - 1) + 0.5f;
	OutPageUV = PageAtlasCoord * GlobalDistanceFieldInvPageAtlasSize;

	float3 CoveragePageAtlasCoord = PageAtlasOffset * 4 + VolumePageUV * (4 - 1) + 0.5f;
	OutCoveragePageUV = CoveragePageAtlasCoord * GlobalDistanceFieldInvCoverageAtlasSize;
}

float3 ComputeGlobalDistanceFieldPageUV(float3 VolumeUV, FGlobalDistanceFieldPage Page)
{
	uint3 PageAtlasOffset = GlobalDistanceFieldPageLinearIndexToPageAtlasOffset(Page);
	float3 VolumePageUV = frac(VolumeUV * GlobalDistanceFieldClipmapSizeInPages);
	float3 PageAtlasCoord = PageAtlasOffset * 8 + VolumePageUV * (8 - 1) + 0.5f;
	float3 PageUV = PageAtlasCoord * GlobalDistanceFieldInvPageAtlasSize;
	return PageUV;
}

float3 ComputeGlobalDistanceFieldCoveragePageUV(float3 VolumeUV, FGlobalDistanceFieldPage Page)
{
	uint3 PageAtlasOffset = GlobalDistanceFieldPageLinearIndexToPageAtlasOffset(Page);
	float3 VolumePageUV = frac(VolumeUV * GlobalDistanceFieldClipmapSizeInPages);
	float3 CoveragePageAtlasCoord = PageAtlasOffset * 4 + VolumePageUV * (4 - 1) + 0.5f;
	float3 CoveragePageUV = CoveragePageAtlasCoord * GlobalDistanceFieldInvCoverageAtlasSize;
	return CoveragePageUV;
}

float EncodeGlobalDistanceFieldPageDistance(float Distance, float ClipmapInfluenceRange)
{
	return saturate(Distance / (2.0f * ClipmapInfluenceRange) + 0.5f);
}

float DecodeGlobalDistanceFieldPageDistance(float EncodedDistance, float ClipmapInfluenceRange)
{
	return (EncodedDistance * 2.0f - 1.0f) * ClipmapInfluenceRange;
}

float3 ComputeGlobalUV(float3 TranslatedWorldPosition, uint ClipmapIndex)
{
	
	float4 TranslatedWorldToUVAddAndMul = GlobalVolumeTranslatedWorldToUVAddAndMul[ClipmapIndex];
	float3 UV = frac(TranslatedWorldPosition * TranslatedWorldToUVAddAndMul.www + TranslatedWorldToUVAddAndMul.xyz); 
	UV = frac(UV); 
	return UV;
}

float3 ComputeGlobalMipUV(float3 TranslatedWorldPosition, uint ClipmapIndex)
{
	float3 MipUV = saturate(TranslatedWorldPosition * GlobalDistanceFieldMipTranslatedWorldToUVScale[ClipmapIndex].xyz + GlobalDistanceFieldMipTranslatedWorldToUVBias[ClipmapIndex].xyz);

	
	float MipUVMinZ = GlobalDistanceFieldMipTranslatedWorldToUVScale[ClipmapIndex].w;
	float MipUVMaxZ = GlobalDistanceFieldMipTranslatedWorldToUVBias[ClipmapIndex].w;
	MipUV.z = clamp(MipUV.z, MipUVMinZ, MipUVMaxZ);

	return MipUV;
}

float GetDistanceToNearestSurfaceGlobal(float3 TranslatedWorldPosition)
{
	float Distance = 0.0f;

	for (uint ClipmapIndex = 0; ClipmapIndex < NumGlobalSDFClipmaps; ClipmapIndex++)
	{
		float DistanceFromClipmap = ComputeDistanceFromBoxToPointInside(GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].xyz, GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].www, TranslatedWorldPosition);
		const float ClipmapVoxelExtent = GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].w * GlobalVolumeTexelSize;
		const float ClipmapInfluenceRange = 2.0f * 4 * ClipmapVoxelExtent;

		Distance = ClipmapInfluenceRange;

		if (DistanceFromClipmap > ClipmapVoxelExtent)
		{
			float3 ClipmapVolumeUV = ComputeGlobalUV(TranslatedWorldPosition, ClipmapIndex);

			FGlobalDistanceFieldPage Page = GetGlobalDistanceFieldPage(ClipmapVolumeUV, ClipmapIndex);
			if (Page.bValid)
			{
				float3 PageUV = ComputeGlobalDistanceFieldPageUV(ClipmapVolumeUV, Page);

				float DistanceFieldValue = Texture3DSampleLevel(GlobalDistanceFieldPageAtlasTexture,  D3DStaticTrilinearWrappedSampler, PageUV, 0).x;

				if (DistanceFieldValue < 1.0f)
				{
					Distance = DecodeGlobalDistanceFieldPageDistance(DistanceFieldValue, ClipmapInfluenceRange);
					break;
				}
			}
		}
	}

	return Distance;
}

float SampleGlobalDistanceField(float3 TranslatedWorldPosition, float MaxDistance, int MinClipmapIndex)
{
	float Distance = MaxDistance;

	for (uint ClipmapIndex = MinClipmapIndex; Distance <= MaxDistance && ClipmapIndex < NumGlobalSDFClipmaps; ++ClipmapIndex)
	{
		const float ClipmapInfluenceRange = 4 * 2.0f * GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].w * GlobalVolumeTexelSize;
		
		float3 ClipmapVolumeUV = ComputeGlobalUV(TranslatedWorldPosition, ClipmapIndex);
		FGlobalDistanceFieldPage Page = GetGlobalDistanceFieldPage(ClipmapVolumeUV, ClipmapIndex);

		if (Page.bValid)
		{
			float3 PageUV = ComputeGlobalDistanceFieldPageUV(ClipmapVolumeUV, Page);

			float DistanceFieldValue = Texture3DSampleLevel(GlobalDistanceFieldPageAtlasTexture,  D3DStaticTrilinearWrappedSampler, PageUV, 0).x;

			if (DistanceFieldValue < 1.0f)
			{
				Distance = DecodeGlobalDistanceFieldPageDistance(DistanceFieldValue, ClipmapInfluenceRange);
				break;
			}
		}
	}

	return Distance;
}

float GlobalDistanceFieldSampleClipmap(float3 ClipmapVolumeUV, uint ClipmapIndex)
{
	float DistanceFieldValue = 1.0f;

	
	ClipmapVolumeUV = frac(ClipmapVolumeUV);

	FGlobalDistanceFieldPage Page = GetGlobalDistanceFieldPage(ClipmapVolumeUV, ClipmapIndex);
	if (Page.bValid)
	{
		float3 PageUV = ComputeGlobalDistanceFieldPageUV(ClipmapVolumeUV, Page);
		DistanceFieldValue = Texture3DSampleLevel(GlobalDistanceFieldPageAtlasTexture,  D3DStaticTrilinearWrappedSampler, PageUV, 0).x;
	}

	return DistanceFieldValue;
}

float3 GlobalDistanceFieldPageCentralDiff(float3 ClipmapVolumeUV, uint ClipmapIndex)
{
	float3 TexelOffset = 0.5f * GlobalVolumeTexelSize;

	float R = GlobalDistanceFieldSampleClipmap(ClipmapVolumeUV + float3(+TexelOffset.x, 0, 0), ClipmapIndex);
	float L = GlobalDistanceFieldSampleClipmap(ClipmapVolumeUV + float3(-TexelOffset.x, 0, 0), ClipmapIndex);
	float F = GlobalDistanceFieldSampleClipmap(ClipmapVolumeUV + float3(0, +TexelOffset.y, 0), ClipmapIndex);
	float B = GlobalDistanceFieldSampleClipmap(ClipmapVolumeUV + float3(0, -TexelOffset.y, 0), ClipmapIndex);
	float U = GlobalDistanceFieldSampleClipmap(ClipmapVolumeUV + float3(0, 0, +TexelOffset.z), ClipmapIndex);
	float D = GlobalDistanceFieldSampleClipmap(ClipmapVolumeUV + float3(0, 0, -TexelOffset.z), ClipmapIndex);

	return float3(R - L, F - B, U - D);
}

float3 ComputeGlobalDistanceFieldNormal(float3 SampleTranslatedWorldPosition, uint ClipmapIndex, float3 FallbackNormal)
{
	float3 ClipmapVolumeUV = ComputeGlobalUV(SampleTranslatedWorldPosition, ClipmapIndex);
	float3 DistanceFieldGradient = GlobalDistanceFieldPageCentralDiff(ClipmapVolumeUV, ClipmapIndex);
	float DistanceFieldGradientLength = length(DistanceFieldGradient);
	float3 DistanceFieldNormal = DistanceFieldGradientLength > 0.001f ? DistanceFieldGradient / DistanceFieldGradientLength : FallbackNormal;
	return DistanceFieldNormal;
}



float3 GetDistanceFieldGradientGlobal(float3 TranslatedWorldPosition)
{
	float3 Gradient = float3(0, 0, 0.001f);

	for (uint ClipmapIndex = 0; ClipmapIndex < NumGlobalSDFClipmaps; ClipmapIndex++)
	{
		const float ClipmapVoxelExtent = GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].w * GlobalVolumeTexelSize;
		const float DistanceFromClipmap = ComputeDistanceFromBoxToPointInside(GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].xyz, GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].www, TranslatedWorldPosition);

		if (DistanceFromClipmap >= ClipmapVoxelExtent)
		{
			const float3 ClipmapVolumeUV = ComputeGlobalUV(TranslatedWorldPosition, ClipmapIndex);
			FGlobalDistanceFieldPage Page = GetGlobalDistanceFieldPage(ClipmapVolumeUV, ClipmapIndex);

			if (Page.bValid)
			{
				float3 PageUV = ComputeGlobalDistanceFieldPageUV(ClipmapVolumeUV, Page);

				float DistanceFieldValue = Texture3DSampleLevel(GlobalDistanceFieldPageAtlasTexture,  D3DStaticTrilinearWrappedSampler, PageUV, 0).x;

				
				if (DistanceFieldValue < 0.9f)
				{
					float3 PageCentralDiff = GlobalDistanceFieldPageCentralDiff(ClipmapVolumeUV, ClipmapIndex);

					const float ClipmapInfluenceRange = 4 * 2.0f * ClipmapVoxelExtent;
					const float PageDistanceDecodeFactor = 2.0f * ClipmapInfluenceRange;
					float ClipmapExtent = GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].w;

					
					const float BackwardsCompatibilityFactor = 128.0f * GlobalVolumeTexelSize;
					Gradient = PageDistanceDecodeFactor * PageCentralDiff / (ClipmapExtent * BackwardsCompatibilityFactor);

					break;
				}
			}
		}
	}

	return Gradient;
}

float CalculateDistanceFieldApproxAO(FLWCVector3 WorldPosition, float3 WorldNormal, uint NumSteps, float StepDistance, float StepScale, float DistanceBias, float MaxDistance)
{
	const float3 TranslatedWorldPosition = LWCToFloat(LWCAdd(WorldPosition, ResolvedView.PreViewTranslation));

	
	int MinClipmapIndex = -1;

	for (uint ClipmapIndex = 0; ClipmapIndex < NumGlobalSDFClipmaps; ++ClipmapIndex)
	{
		float DistanceFromClipmap = ComputeDistanceFromBoxToPointInside(GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].xyz, GlobalVolumeTranslatedCenterAndExtent[ClipmapIndex].www, TranslatedWorldPosition);
		if (DistanceFromClipmap > MaxDistance)
		{
			MinClipmapIndex = ClipmapIndex;
			break;
		}
	}

	if (MinClipmapIndex < 0)
	{
		return 1.0f;
	}

	float Occlusion = 0.0f;
	float W = 0.5f;
	float TotalW = 0.0f;

	for (uint StepIndex = 0; StepIndex < NumSteps; ++StepIndex)
	{
		const float CurrentDistance = StepDistance + DistanceBias;
		const float Dist = max(0.0f, SampleGlobalDistanceField(TranslatedWorldPosition + WorldNormal * CurrentDistance, CurrentDistance, MinClipmapIndex));

		Occlusion += W * Dist / CurrentDistance;
		TotalW += W;
		W *= 0.5f;

		StepDistance *= StepScale;
	}

	return saturate(Occlusion / TotalW);
}

#line 405 "/Engine/Private/DistanceField/GlobalDistanceFieldShared.ush"


float GetDistanceToNearestSurfaceGlobal(FLWCVector3 WorldPosition)
{
	const float3 TranslatedWorldPosition = LWCToFloat(LWCAdd(WorldPosition, ResolvedView.PreViewTranslation));

	return GetDistanceToNearestSurfaceGlobal(TranslatedWorldPosition);
}

float3 GetDistanceFieldGradientGlobal(FLWCVector3 WorldPosition)
{
	const float3 TranslatedWorldPosition = LWCToFloat(LWCAdd(WorldPosition, ResolvedView.PreViewTranslation));

	return GetDistanceFieldGradientGlobal(TranslatedWorldPosition);
}


#line  20 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"

	



	const static float TWO_PI = 3.1415926535897932f*2.0f;




float4 ModuloPrecise(float4 x, float4 y){ return x - y * trunc(x/y); }
float3 ModuloPrecise(float3 x, float3 y){ return x - y * trunc(x/y); }
float2 ModuloPrecise(float2 x, float2 y){ return x - y * trunc(x/y);}
float ModuloPrecise(float x, float y){ return x - y * trunc(x/y); }
int ModuloPrecise(int x, int y){ return x - y * (x/y); }
int Modulo(int x, int y){  return x - y * (x/y);  }

	

float4 Reciprocal(float4 x){ return 1.0f/x;}
float3 Reciprocal(float3 x){ return 1.0f/x; }
float2 Reciprocal(float2 x){ return 1.0f/x;}
float Reciprocal(float x){ return 1.0f/x; }



bool NiagaraAll(bool b) { return b; }
bool NiagaraAny(bool b) { return b; }

bool NiagaraAll(bool2 b) { return all(b); }
bool NiagaraAll(bool3 b) { return all(b); }
bool NiagaraAll(bool4 b) { return all(b); }
bool NiagaraAny(bool2 b) { return any(b); }
bool NiagaraAny(bool3 b) { return any(b); }
bool NiagaraAny(bool4 b) { return any(b); }















	
		
	

	
	
	
	
	
	



	




		uint3 DispatchThreadIdBounds;			
		uint3 DispatchThreadIdToLinear;			
	

	static uint3 GDispatchThreadId;		
	static uint3 GGroupId;				
	static uint3 GGroupThreadId;		
	static uint  GGroupIndex;			
	static uint GLinearThreadId;
	static uint GEmitterTickCounter;
	static uint GRandomSeedOffset = 0;

	
	
#line   7 "/Engine/Private/SceneTexturesCommon.ush"


























float3 CalcSceneColor(float2 ScreenUV)
{



	return Texture2DSampleLevel(SceneTexturesStruct.SceneColorTexture, SceneTexturesStruct.PointClampSampler, ScreenUV, 0).rgb;

}

float4 CalcFullSceneColor(float2 ScreenUV)
{



	return Texture2DSample(SceneTexturesStruct.SceneColorTexture, SceneTexturesStruct.PointClampSampler,ScreenUV);

}


float CalcSceneDepth(float2 ScreenUV)
{



	return ConvertFromDeviceZ(Texture2DSampleLevel(SceneTexturesStruct.SceneDepthTexture, SceneTexturesStruct.PointClampSampler, ScreenUV, 0).r);

}


float4 CalcSceneColorAndDepth( float2 ScreenUV )
{
	return float4(CalcSceneColor(ScreenUV), CalcSceneDepth(ScreenUV));
}


float LookupDeviceZ( float2 ScreenUV )
{



	
	return Texture2DSampleLevel(SceneTexturesStruct.SceneDepthTexture, SceneTexturesStruct.PointClampSampler, ScreenUV, 0).r;

}


float LookupDeviceZ(uint2 PixelPos)
{



	return SceneTexturesStruct.SceneDepthTexture.Load(int3(PixelPos, 0)).r;

}


float CalcSceneDepth(uint2 PixelPos)
{



	float DeviceZ = SceneTexturesStruct.SceneDepthTexture.Load(int3(PixelPos, 0)).r;

	
	return ConvertFromDeviceZ(DeviceZ);

}


float4 GatherSceneDepth(float2 UV, float2 InvBufferSize)
{



	return GatherDepth(SceneTexturesStruct.SceneDepthTexture, UV);

}


float CalcSceneCustomDepth(float2 ScreenUV)
{



	return ConvertFromDeviceZ(Texture2DSampleLevel(SceneTexturesStruct.CustomDepthTexture, SceneTexturesStruct.PointClampSampler, ScreenUV, 0).r);

}

uint CalcSceneCustomStencil(uint2 PixelPos)
{



	return SceneTexturesStruct.CustomStencilTexture.Load(uint3(PixelPos, 0)) .g;

}

float CalcSceneAO(float2 ScreenUV)
{



	return Texture2DSampleLevel(SceneTexturesStruct.ScreenSpaceAOTexture, SceneTexturesStruct.PointClampSampler, ScreenUV, 0).r;

}




#line 223 "/Engine/Private/SceneTexturesCommon.ush"

#line 101 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"


	
	
	
#line  12 "/Plugin/FX/Niagara/Private/NiagaraPhysicsCommon.ush"
groupshared float3 SharedNodePosition[64];
groupshared float4 SharedNodeOrientation[64];

groupshared float SharedInverseMass[64];
groupshared float SharedInverseInertia[64];

groupshared float3 SharedPreviousPosition[64];
groupshared float4 SharedPreviousOrientation[64];
#line 105 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"


	uint EmitterTickCounter;

	float4 Modulo(float4 x, float4 y){ return fmod(x,y); }
	float3 Modulo(float3 x, float3 y){ return fmod(x,y); }
	float2 Modulo(float2 x, float2 y){ return fmod(x,y); }
	float Modulo(float x, float y){ return fmod(x,y); }

	
	FLWCVector3 WorldPositionFromSceneDepth(float2 ScreenPosition, float SceneDepth)
	{
		FLWCVector4 HomogeneousWorldPosition = LWCMultiply(float4(ScreenPosition * SceneDepth, SceneDepth, 1), GetPrimaryView().ScreenToWorld);
		FLWCVector3 WorldPosition = MakeLWCVector3( (( HomogeneousWorldPosition ).Tile).xyz, HomogeneousWorldPosition.Offset.xyz);
		FLWCScalar Scale = MakeLWCScalar( (( HomogeneousWorldPosition ).Tile).w, HomogeneousWorldPosition.Offset.w);
		return LWCDivide(WorldPosition, LWCToFloat(Scale));
	}

	
	
	
	
	float NiagaraInternalNoise(uint u, uint v, uint s)
	{
		uint Seed = (u * 1664525u + v) + s + GRandomSeedOffset;
		GRandomSeedOffset += Seed;
		return float(Rand3DPCG32(int3(u,v,Seed)).x) / 4294967296.0f;
	}

	
	

	int4	EmitterSpawnInfoOffsets[((8 + 3) / 4)];
	float4	EmitterSpawnInfoParams[8];			

	static int GInterpSpawnIndex;
	static float Emitter_SpawnInterval;
	static float Emitter_InterpSpawnStartDt;
	static int Emitter_SpawnGroup;

	static int Engine_ExecutionCount;
	static int GGPUExecIndex;

	static uint GSpawnStartInstance;
	uint NumSpawnedInstances;

	void SetupExecIndexForGPU()
	{
		GGPUExecIndex = GLinearThreadId;
		Engine_ExecutionCount = GSpawnStartInstance;
	}

	void SetupExecIndexAndSpawnInfoForGPU()
	{
		GGPUExecIndex = GLinearThreadId - GSpawnStartInstance;

		int SpawnInfoIndex = 0;
		[unroll]
		for (int i = 0; i < ((8 + 3) / 4); ++i)
		{
			
			
			int4 CompareResults = GGPUExecIndex >= EmitterSpawnInfoOffsets[i];
			CompareResults = CompareResults & int4(1, 1, 1, 1);
			SpawnInfoIndex += CompareResults.x + CompareResults.y + CompareResults.z + CompareResults.w;
		}

		Emitter_SpawnInterval		= EmitterSpawnInfoParams[SpawnInfoIndex].x;
		Emitter_InterpSpawnStartDt	= EmitterSpawnInfoParams[SpawnInfoIndex].y;
		Emitter_SpawnGroup			= asint(EmitterSpawnInfoParams[SpawnInfoIndex].z);

		int GroupSpawnStartIndex    = asint(EmitterSpawnInfoParams[SpawnInfoIndex].w);
		GGPUExecIndex		        = GGPUExecIndex - GroupSpawnStartIndex;
		if ( SpawnInfoIndex == (8 - 1) )
		{
			Engine_ExecutionCount   = int(NumSpawnedInstances) - GroupSpawnStartIndex;
		}
		else
		{
			int NextGroupSpawnStartIndex = asint(EmitterSpawnInfoParams[SpawnInfoIndex + 1].w);
			Engine_ExecutionCount       = NextGroupSpawnStartIndex - GroupSpawnStartIndex;
		}
	}

	

	int ExecIndex()
	{
		return GGPUExecIndex;
	}

	float4 NiagaraGPU_QuatMul(float4 Q1, float4 Q2)
	{
		float4 QOut;
		QOut.x = Q1.w*Q2.x + Q1.x*Q2.w + Q1.y*Q2.z - Q1.z*Q2.y;
		QOut.y = Q1.w*Q2.y - Q1.x*Q2.z + Q1.y*Q2.w + Q1.z*Q2.x;
		QOut.z = Q1.w*Q2.z + Q1.x*Q2.y - Q1.y*Q2.x + Q1.z*Q2.w;
		QOut.w = Q1.w*Q2.w - Q1.x*Q2.x - Q1.y*Q2.y - Q1.z*Q2.z;
		return QOut;
	}























float4 rand4(int Seed1, int Seed2, int Seed3, int Seed4)
{
	int4 v = int4(Seed4, Seed1, Seed2, Seed3) * 1664525 + 1013904223;

	v.x += v.y*v.w;
	v.y += v.z*v.x;
	v.z += v.x*v.y;
	v.w += v.y*v.z;
	v.x += v.y*v.w;
	v.y += v.z*v.x;
	v.z += v.x*v.y;
	v.w += v.y*v.z;

	
	
	

	
	return float4((v >> 8) & 0x00ffffff) / 16777216.0; 
	
}







float3 rand3(int Seed1, int Seed2, int Seed3, int Seed4)
{
	int3 v = int3(Seed1, Seed2, Seed4 | (Seed3 << 16)) * 1664525 + 1013904223;

	v.x += v.y*v.z;
	v.y += v.z*v.x;
	v.z += v.x*v.y;
	v.x += v.y*v.z;
	v.y += v.z*v.x;
	v.z += v.x*v.y;

	return float3((v >> 8) & 0x00ffffff) / 16777216.0; 
}


static int RandomCounterDeterministic = 0;


float rand(float x, int Seed1, int Seed2, int Seed3)
{
	RandomCounterDeterministic += 1;
	return rand3(Seed1, Seed2, Seed3, RandomCounterDeterministic).x * x;
}


float2 rand(float2 x, int Seed1, int Seed2, int Seed3)
{
	RandomCounterDeterministic += 1;
	return rand3(Seed1, Seed2, Seed3, RandomCounterDeterministic).xy * x;
}


float3 rand(float3 x, int Seed1, int Seed2, int Seed3)
{
	RandomCounterDeterministic += 1;
	return rand3(Seed1, Seed2, Seed3, RandomCounterDeterministic).xyz * x;
}


float4 rand(float4 x, int Seed1, int Seed2, int Seed3) 
{
	RandomCounterDeterministic += 1;
	return rand4(Seed1, Seed2, Seed3, RandomCounterDeterministic).xyzw * x;
}


int rand(int x, int Seed1, int Seed2, int Seed3)
{
	
	
	RandomCounterDeterministic += 1;
	return int(rand3(Seed1, Seed2, Seed3, RandomCounterDeterministic).x * (x+1));
}






	
	

	
	
	
	
	
	static int RandomCounterNonDeterministic = -1;

	float rand(float x)
	{
		RandomCounterNonDeterministic -= 1;
		return rand4(GLinearThreadId, EmitterTickCounter, GLinearThreadId, RandomCounterNonDeterministic).x * x;
	}

	float2 rand(float2 x)
	{
		RandomCounterNonDeterministic -= 1;
		return rand4(GLinearThreadId, EmitterTickCounter, GLinearThreadId, RandomCounterNonDeterministic).xy * x;
	}

	float3 rand(float3 x)
	{
		RandomCounterNonDeterministic -= 1;
		return rand4(GLinearThreadId, EmitterTickCounter, GLinearThreadId, RandomCounterNonDeterministic).xyz * x;
	}

	float4 rand(float4 x) 
	{
		RandomCounterNonDeterministic -= 1;
		return rand4(GLinearThreadId, EmitterTickCounter, GLinearThreadId, RandomCounterNonDeterministic).xyzw * x;
	}

	
	int rand(int x)
	{
		RandomCounterNonDeterministic -= 1;
		return int(rand4(GLinearThreadId, EmitterTickCounter, GLinearThreadId, RandomCounterNonDeterministic).x * (x+1));
	}
#line 376 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"




int hash_single(int a)
{
    int x = (a ^ 61) ^ (a >> 16);
	x += x << 3;
	x ^= x >> 4;
	x *= 0x27d4eb2d;
	x ^= x >> 15;
	return x;
}

int hash(int a, int b)
{
	return hash_single(a) ^ hash_single(b * 31);
}

float hash_float(int a, int b)
{
	return (hash(a, b) & 0x00ffffff) / 16777216.0;
}


float hash_float(float a, int b)
{
	return (hash(a * 16777216.0, b) & 0x00ffffff) / 16777216.0;
}


float rand_float(float x)
{
	return rand(x.x);
}

float2 rand_float(float2 x)
{
	return float2(rand_float(x.x), rand_float(x.y));
}

float3 rand_float(float3 x)
{
	return float3(rand_float(x.x), rand_float(x.y), rand_float(x.z));
}

float4 rand_float(float4 x) 
{
	return float4(rand_float(x.x), rand_float(x.y), rand_float(x.z), rand_float(x.w));
}

int rand_int(int x)
{
	
	
	
	return (int) rand_float(x.x);
}


float rand_float(float x, int Seed1, int Seed2, int Seed3)
{
	return rand(x.x, Seed1, Seed2, Seed3);
}

float2 rand_float(float2 x, int Seed1, int Seed2, int Seed3)
{
	return rand(x, Seed1, Seed2, Seed3);
}

float3 rand_float(float3 x, int Seed1, int Seed2, int Seed3)
{
	return rand(x, Seed1, Seed2, Seed3);
}

float4 rand_float(float4 x, int Seed1, int Seed2, int Seed3) 
{
	return rand(x, Seed1, Seed2, Seed3);
}

int rand_int(int x, int Seed1, int Seed2, int Seed3)
{
	
	
	return rand(x.x-1, Seed1, Seed2, Seed3);
}





#line 502 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"










	uint ComponentBufferSizeRead;
	uint ComponentBufferSizeWrite;
	uint SimStart;

	

	
		Buffer<float> InputFloat;
		Buffer<int> InputInt;
		Buffer<float> InputHalf;
	
	RWBuffer<int> RWOutputInt;
	RWBuffer<float> RWOutputFloat;
	RWBuffer<float> RWOutputHalf;

	Buffer<float> StaticInputFloat;

	RWBuffer<uint> RWInstanceCounts;
	uint ReadInstanceCountOffset;
	uint WriteInstanceCountOffset;

	Buffer<int> FreeIDList;
	RWBuffer<int> RWIDToIndexTable;
	
	
	
	
	
	int4 SimulationStageIterationInfo;
	float SimulationStageNormalizedIterationIndex;

	
	


		int SimulationStage_GetInstanceCount() { return SimulationStageIterationInfo.x == -1 ? SimulationStageIterationInfo.y : RWInstanceCounts[SimulationStageIterationInfo.x]; }
	
	int SimulationStage_GetIterationIndex() { return SimulationStageIterationInfo.z; }
	int SimulationStage_GetNumIterations() { return SimulationStageIterationInfo.w; }
	float SimulationStage_GetNormalizedIterationIndex() { return SimulationStageNormalizedIterationIndex; }

	
	uint3 ParticleIterationStateInfo;

	void AcquireID(int DataSetID, out int IDIndex, out int IDAcquireTag)
	{
		
		int MustBe0[1];
		MustBe0[DataSetID] = 0;
		

		
		
		int SpawnIndex = GLinearThreadId - GSpawnStartInstance;
		IDIndex = FreeIDList[SpawnIndex];
		IDAcquireTag = EmitterTickCounter;
	}

 	void UpdateID(int DataSetID, int IDIndex, int InstanceIndex)
	{
		
		int MustBe0[1];
		MustBe0[DataSetID] = 0;
		

		RWIDToIndexTable[IDIndex] = InstanceIndex;
	}




	
		groupshared uint GroupSharedIndex[64];
		groupshared uint GroupSharedIndex4[16];
		groupshared uint GroupSharedIndex16[4];
		groupshared uint GroupSharedIndex64;
	







	


	int AcquireIndex(uniform int DataSetID, bool bDoAcquire)
	{
		
		int MustBe0[1];
		MustBe0[DataSetID] = 0;
		

		int PrevIdx = GSpawnStartInstance + NumSpawnedInstances;	

		
#line 628 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"


			GroupSharedIndex[GGroupThreadId.x] = bDoAcquire ? 1 : 0;
			GroupMemoryBarrierWithGroupSync(); 

			
			if ((GGroupThreadId.x & 0x3) == 0)
			{
				const uint Index = GGroupThreadId.x;

				const uint ActiveCount1 = GroupSharedIndex[Index];
				const uint ActiveCount2 = ActiveCount1 + GroupSharedIndex[Index + 1];
				const uint ActiveCount3 = ActiveCount2 + GroupSharedIndex[Index + 2];
				const uint ActiveCount4 = ActiveCount3 + GroupSharedIndex[Index + 3];
				
				GroupSharedIndex[Index] = 0;
				GroupSharedIndex[Index + 1] = ActiveCount1;
				GroupSharedIndex[Index + 2] = ActiveCount2;
				GroupSharedIndex[Index + 3] = ActiveCount3;
				GroupSharedIndex4[Index / 4] = ActiveCount4;
			}
			GroupMemoryBarrierWithGroupSync(); 

			
			if ((GGroupThreadId.x & 0xF) == 0)
			{
				const uint Index = GGroupThreadId.x / 4;

				const uint ActiveCount1 = GroupSharedIndex4[Index];
				const uint ActiveCount2 = ActiveCount1 + GroupSharedIndex4[Index + 1];
				const uint ActiveCount3 = ActiveCount2 + GroupSharedIndex4[Index + 2];
				const uint ActiveCount4 = ActiveCount3 + GroupSharedIndex4[Index + 3];

				GroupSharedIndex4[Index] = 0;
				GroupSharedIndex4[Index + 1] = ActiveCount1;
				GroupSharedIndex4[Index + 2] = ActiveCount2;
				GroupSharedIndex4[Index + 3] = ActiveCount3;
				GroupSharedIndex16[Index / 4] = ActiveCount4;
			}
			GroupMemoryBarrierWithGroupSync(); 

			
			if ((GGroupThreadId.x & 0x3F) == 0)
			{
				const uint Index = GGroupThreadId.x / 16;
				uint RetPrevIdx = 0;
		
				const uint ActiveCount1 = GroupSharedIndex16[Index];
				const uint ActiveCount2 = ActiveCount1 + GroupSharedIndex16[Index + 1];
		
				const uint ActiveCount3 = ActiveCount2 + GroupSharedIndex16[Index + 2];
				const uint ActiveCount4 = ActiveCount3 + GroupSharedIndex16[Index + 3];
		

				GroupSharedIndex16[Index] = 0;
				GroupSharedIndex16[Index + 1] = ActiveCount1;
		
				GroupSharedIndex16[Index + 2] = ActiveCount2;
				GroupSharedIndex16[Index + 3] = ActiveCount3;

				InterlockedAdd(RWInstanceCounts[WriteInstanceCountOffset], ActiveCount4, RetPrevIdx);
		


				GroupSharedIndex64 = RetPrevIdx;
			}
			GroupMemoryBarrierWithGroupSync(); 

			PrevIdx = GroupSharedIndex64 + GroupSharedIndex16[GGroupThreadId.x / 16] + GroupSharedIndex4[GGroupThreadId.x / 4] + GroupSharedIndex[GGroupThreadId.x];

		












		return PrevIdx;
	}

	



	float InputDataFloat(int DataSetIndex, int RegisterIdx, int InstanceIdx)
	{
		


			return InputFloat[RegisterIdx*ComponentBufferSizeRead + InstanceIdx];
		
	}

	int InputDataInt(int DataSetIndex, int RegisterIdx, int InstanceIdx)
	{
		


			return InputInt[RegisterIdx*ComponentBufferSizeRead + InstanceIdx];
		
	}
	
	bool InputDataBool(int DataSetIndex, int RegisterIdx, int InstanceIdx)
	{
		


			return InputInt[RegisterIdx*ComponentBufferSizeRead + InstanceIdx] == -1;
		
	}

	float InputDataHalf(int DataSetIndex, int RegisterIdx, int InstanceIdx)
	{
		


			return InputHalf[RegisterIdx*ComponentBufferSizeRead + InstanceIdx];
		
	}

	



	void OutputDataFloat(int DataSetIndex, int RegisterIndex, int InstanceIndex, float Value)
	{
		RWOutputFloat[RegisterIndex*ComponentBufferSizeWrite + InstanceIndex] = Value;
	}

	void OutputDataInt(int DataSetIndex, int RegisterIndex, int InstanceIndex, int Value)
	{
		RWOutputInt[RegisterIndex*ComponentBufferSizeWrite + InstanceIndex] = Value;
	}

	void OutputDataBool(int DataSetIndex, int RegisterIndex, int InstanceIndex, bool Value)
	{
		RWOutputInt[RegisterIndex*ComponentBufferSizeWrite + InstanceIndex] = Value ? -1 : 0;
	}

	void OutputDataHalf(int DataSetIndex, int RegisterIndex, int InstanceIndex, float Value)
	{
		RWOutputHalf[RegisterIndex*ComponentBufferSizeWrite + InstanceIndex] = Value;
	}

	void EnterStatScope(int ID)	{}
	void ExitStatScope()	{}


	


	int OutputIndex(const int DataSetID, const bool bStageKillsParticles, const bool bIsValid)
	{
	
		
		
		
		
		
		if (!bStageKillsParticles)
		{
			return GLinearThreadId;
		}
	

		return AcquireIndex(DataSetID, bIsValid);
	}



struct NiagaraRandInfo
{
	int Seed1;
	int Seed2;
	int Seed3;
};


NiagaraRandInfo MakeRandInfo()
{
	GRandomSeedOffset += 1664525u;

	NiagaraRandInfo RandInfo;
	RandInfo.Seed1 = GLinearThreadId;
	RandInfo.Seed2 = GRandomSeedOffset;
	RandInfo.Seed3 = GEmitterTickCounter;
	return RandInfo;
}

float NiagaraRandomFloat(NiagaraRandInfo RandInfo)
{
	return uint(RandInfo.Seed3) == 0xffffffff ? NiagaraInternalNoise(uint(RandInfo.Seed1), uint(RandInfo.Seed2), uint(RandInfo.Seed3)) : rand(1.0f, uint(RandInfo.Seed1), uint(RandInfo.Seed2), uint(RandInfo.Seed3));
}

int NiagaraRandomInt(NiagaraRandInfo RandInfo, int Range)
{
	float T = NiagaraRandomFloat(RandInfo);
	return int(floor(float(Range) * T));
}

float3 NiagaraRandomBaryCoord(NiagaraRandInfo RandInfo)
{
	float2 r = float2(NiagaraRandomFloat(RandInfo), NiagaraRandomFloat(RandInfo));
	float sqrt0 = sqrt(r.x);
	float sqrt1 = sqrt(r.y);
	return float3(1.0f - sqrt0, sqrt0 * (1.0 - r.y), r.y * sqrt0);
}




#line  26 "/Engine/Generated/NiagaraEmitterInstance.ush"
struct NiagaraID
{
	int Index;
	int AcquireTag;
};

	float Engine_WorldDeltaTime;
	float Engine_DeltaTime;
	float Engine_InverseDeltaTime;
	float Engine_Time;
	float Engine_RealTime;
	int Engine_QualityLevel;
	int Engine_PaddingInt32_0;
	int Engine_PaddingInt32_1;
	float PREV_Engine_WorldDeltaTime;
	float PREV_Engine_DeltaTime;
	float PREV_Engine_InverseDeltaTime;
	float PREV_Engine_Time;
	float PREV_Engine_RealTime;
	int PREV_Engine_QualityLevel;
	int PREV_Engine_PaddingInt32_0;
	int PREV_Engine_PaddingInt32_1;
	float Engine_Owner_TimeSinceRendered;
	float Engine_Owner_LODDistance;
	float Engine_Owner_LODDistanceFraction;
	float Engine_System_Age;
	int Engine_Owner_ExecutionState;
	int Engine_System_TickCount;
	int Engine_System_NumEmitters;
	int Engine_System_NumEmittersAlive;
	int Engine_System_SignificanceIndex;
	int Engine_System_RandomSeed;
	int Engine_System_CurrentTimeStep;
	int Engine_System_NumTimeSteps;
	float Engine_System_TimeStepFraction;
	int Engine_System_PaddingInt32_0;
	int Engine_System_PaddingInt32_1;
	int Engine_System_PaddingInt32_2;
	float PREV_Engine_Owner_TimeSinceRendered;
	float PREV_Engine_Owner_LODDistance;
	float PREV_Engine_Owner_LODDistanceFraction;
	float PREV_Engine_System_Age;
	int PREV_Engine_Owner_ExecutionState;
	int PREV_Engine_System_TickCount;
	int PREV_Engine_System_NumEmitters;
	int PREV_Engine_System_NumEmittersAlive;
	int PREV_Engine_System_SignificanceIndex;
	int PREV_Engine_System_RandomSeed;
	int PREV_Engine_System_CurrentTimeStep;
	int PREV_Engine_System_NumTimeSteps;
	float PREV_Engine_System_TimeStepFraction;
	int PREV_Engine_System_PaddingInt32_0;
	int PREV_Engine_System_PaddingInt32_1;
	int PREV_Engine_System_PaddingInt32_2;
	float4x4 Engine_Owner_SystemLocalToWorld;
	float4x4 Engine_Owner_SystemWorldToLocal;
	float4x4 Engine_Owner_SystemLocalToWorldTransposed;
	float4x4 Engine_Owner_SystemWorldToLocalTransposed;
	float4x4 Engine_Owner_SystemLocalToWorldNoScale;
	float4x4 Engine_Owner_SystemWorldToLocalNoScale;
	float4 Engine_Owner_Rotation;
	float3 Engine_Owner_Position;
	int Engine_Owner_PaddingInt32_0;
	float3 Engine_Owner_Velocity;
	int Engine_Owner_PaddingInt32_1;
	float3 Engine_Owner_SystemXAxis;
	int Engine_Owner_PaddingInt32_2;
	float3 Engine_Owner_SystemYAxis;
	int Engine_Owner_PaddingInt32_3;
	float3 Engine_Owner_SystemZAxis;
	int Engine_Owner_PaddingInt32_4;
	float3 Engine_Owner_Scale;
	int Engine_Owner_PaddingInt32_5;
	float4 Engine_Owner_LWCTile;
	float4x4 PREV_Engine_Owner_SystemLocalToWorld;
	float4x4 PREV_Engine_Owner_SystemWorldToLocal;
	float4x4 PREV_Engine_Owner_SystemLocalToWorldTransposed;
	float4x4 PREV_Engine_Owner_SystemWorldToLocalTransposed;
	float4x4 PREV_Engine_Owner_SystemLocalToWorldNoScale;
	float4x4 PREV_Engine_Owner_SystemWorldToLocalNoScale;
	float4 PREV_Engine_Owner_Rotation;
	float3 PREV_Engine_Owner_Position;
	int PREV_Engine_Owner_PaddingInt32_0;
	float3 PREV_Engine_Owner_Velocity;
	int PREV_Engine_Owner_PaddingInt32_1;
	float3 PREV_Engine_Owner_SystemXAxis;
	int PREV_Engine_Owner_PaddingInt32_2;
	float3 PREV_Engine_Owner_SystemYAxis;
	int PREV_Engine_Owner_PaddingInt32_3;
	float3 PREV_Engine_Owner_SystemZAxis;
	int PREV_Engine_Owner_PaddingInt32_4;
	float3 PREV_Engine_Owner_Scale;
	int PREV_Engine_Owner_PaddingInt32_5;
	float4 PREV_Engine_Owner_LWCTile;
	int Engine_Emitter_NumParticles;
	int Engine_Emitter_TotalSpawnedParticles;
	float Engine_Emitter_SpawnCountScale;
	float Emitter_Age;
	int Emitter_RandomSeed;
	int Engine_Emitter_InstanceSeed;
	int Engine_Emitter_PaddingInt32_0;
	int Engine_Emitter_PaddingInt32_1;
	int PREV_Engine_Emitter_NumParticles;
	int PREV_Engine_Emitter_TotalSpawnedParticles;
	float PREV_Engine_Emitter_SpawnCountScale;
	float PREV_Emitter_Age;
	int PREV_Emitter_RandomSeed;
	int PREV_Engine_Emitter_InstanceSeed;
	int PREV_Engine_Emitter_PaddingInt32_0;
	int PREV_Engine_Emitter_PaddingInt32_1;
cbuffer FNiagaraExternalParameters
{
	float Constants_Emitter_InitializeParticle_Lifetime;
	float4 Constants_Emitter_InitializeParticle_Color;
	float Constants_Emitter_InitializeParticle_Mass;
	float4 Constants_Emitter_InitializeParticle_SpriteSize;
	float4 Constants_Emitter_InitializeParticle_PositionOffset;
	float Emitter_DistanceTraveled;
	float Constants_Emitter_Multiply_FloatByInt_FLOAT_VAR;
	float Constants_Emitter_ShapeLocation_VPosition;
	float Constants_Emitter_ShapeLocation_HandleRadius;
	float Constants_Emitter_ShapeLocation_LargeRadius;
	float4 Constants_Emitter_ShapeLocation_NonUniformScale;
	float4 Constants_Emitter_ShapeLocation_Offset;
	float4 Constants_Emitter_ShapeLocation_YawASC47PitchASC47Roll;
	float4 Constants_Emitter_ShapeLocation_RotationAxis;
	float Constants_Emitter_ShapeLocation_RotationAngle;
	float4 Constants_Emitter_ShapeLocation_AdditionalYawASC47PitchASC47Roll;
	int Constants_Emitter_ShapeLocation_SpawnGroupMask;
	float Emitter_SpawnRate_SpawnRemainder;
	float Constants_Emitter_ScaleSpriteSize_UniformCurveScale;
	float Constants_Emitter_FloatFromCurve_ScaleCurve;
	float4 Constants_Emitter_ScaleColor_ScaleRGB;
	float Constants_Emitter_SolveForcesAndVelocity_SpeedLimit;
	float Constants_Emitter_SolveForcesAndVelocity_AccelerationLimit;
	float Emitter_SpawnRate;
}

cbuffer PREV_FNiagaraExternalParameters
{
	float PREV_Constants_Emitter_InitializeParticle_Lifetime;
	float4 PREV_Constants_Emitter_InitializeParticle_Color;
	float PREV_Constants_Emitter_InitializeParticle_Mass;
	float4 PREV_Constants_Emitter_InitializeParticle_SpriteSize;
	float4 PREV_Constants_Emitter_InitializeParticle_PositionOffset;
	float PREV_Emitter_DistanceTraveled;
	float PREV_Constants_Emitter_Multiply_FloatByInt_FLOAT_VAR;
	float PREV_Constants_Emitter_ShapeLocation_VPosition;
	float PREV_Constants_Emitter_ShapeLocation_HandleRadius;
	float PREV_Constants_Emitter_ShapeLocation_LargeRadius;
	float4 PREV_Constants_Emitter_ShapeLocation_NonUniformScale;
	float4 PREV_Constants_Emitter_ShapeLocation_Offset;
	float4 PREV_Constants_Emitter_ShapeLocation_YawASC47PitchASC47Roll;
	float4 PREV_Constants_Emitter_ShapeLocation_RotationAxis;
	float PREV_Constants_Emitter_ShapeLocation_RotationAngle;
	float4 PREV_Constants_Emitter_ShapeLocation_AdditionalYawASC47PitchASC47Roll;
	int PREV_Constants_Emitter_ShapeLocation_SpawnGroupMask;
	float PREV_Emitter_SpawnRate_SpawnRemainder;
	float PREV_Constants_Emitter_ScaleSpriteSize_UniformCurveScale;
	float PREV_Constants_Emitter_FloatFromCurve_ScaleCurve;
	float4 PREV_Constants_Emitter_ScaleColor_ScaleRGB;
	float PREV_Constants_Emitter_SolveForcesAndVelocity_SpeedLimit;
	float PREV_Constants_Emitter_SolveForcesAndVelocity_AccelerationLimit;
	float PREV_Emitter_SpawnRate;
}

struct FParamMap0_Transient
{
	float3 AdvectionVelocity;
	bool DragIgnoreMass;
	bool FirstFrame;
	float4 ParticleColorScaleFactor;
	float PhysicsDeltaTime;
	float PhysicsDrag;
	float3 PhysicsForce;
	float2 SpriteSizeScaleFactor;
};

struct FParamMap0_SolveForcesAndVelocity
{
	float DeltaTime;
	float3 Force;
	float Mass;
	float3 Position;
	float3 PreviousVelocity;
	float3 Velocity;
	bool WritetoIntrinsicProperties;
};

struct FParamMap0_ShapeLocation
{
	float3 ApplyOwnerScale;
	bool InvertRotationQuaternion;
	int OffsetCoordinateSpace;
	int RotationCoordinateSpace;
	float4x4 RotationMatrix;
	float4 RotationQuaternion;
	float3 ShapeOrigin;
	float UPosition;
};

struct FParamMap0_ScaleSpriteSize
{
	float2 InitialSpriteSize;
	float UniformCurveIndex;
};

struct FParamMap0_ScaleColor
{
	float4 ColorValueToScale;
	float ScaleAlpha;
};

struct FParamMap0_ParticleState
{
	float DeltaTime;
	float Lifetime;
};

struct FParamMap0_Particles_ShapeLocation
{
	float3 ShapeBitangent;
	float3 ShapeNormal;
	float3 ShapePosition;
	float3 ShapeTangent;
	float3 ShapeVector;
};

struct FParamMap0_Particles_Previous
{
	float3 Position;
	float2 SpriteSize;
	float3 Velocity;
};

struct FParamMap0_Particles_Presolve
{
	float3 PhysicsForce;
	float3 Position;
	float3 Velocity;
};

struct FParamMap0_Particles_Initial
{
	float4 Color;
	float2 SpriteSize;
};

struct FParamMap0_Particles
{
	float Age;
	float4 Color;
	float DistanceTraveled;
	FParamMap0_Particles_Initial Initial;
	float Lifetime;
	float Mass;
	float MaterialRandom;
	float NormalizedAge;
	float3 Position;
	FParamMap0_Particles_Presolve Presolve;
	FParamMap0_Particles_Previous Previous;
	float RibbonUVDistance;
	FParamMap0_Particles_ShapeLocation ShapeLocation;
	float2 SpriteSize;
	int UniqueID;
	float3 Velocity;
};

struct FParamMap0_OUTPUT_VAR_SolveForcesAndVelocity
{
	float IncomingPhysicsDrag;
	float3 IncomingPhysicsForce;
	float3 Position;
	float3 Velocity;
};

struct FParamMap0_OUTPUT_VAR_ParticleState
{
	bool FirstFrame;
};

struct FParamMap0_OUTPUT_VAR
{
	FParamMap0_OUTPUT_VAR_ParticleState ParticleState;
	FParamMap0_OUTPUT_VAR_SolveForcesAndVelocity SolveForcesAndVelocity;
};

struct FParamMap0_Multiply_FloatByInt
{
	int Integer;
};

struct FParamMap0_Local_SolveForcesAndVelocity
{
	float3 AdvectionVelocity;
	float DeltaTime;
	bool DragIgnoreMass;
	float3 DragVelocity;
	float InverseDeltaTime;
	float InverseMass;
	float Mass;
	float PhysicsDrag;
	float3 PhysicsForce;
};

struct FParamMap0_Local_ShapeLocation_TransformStack_Rotation
{
	float3 LocalTransformBitangent;
	float3 LocalTransformNormal;
	float3 LocalTransformTangent;
	float3 LocalTransformVector;
};

struct FParamMap0_Local_ShapeLocation
{
	float3 InverseScaleFactor;
	float3 OffsetVector;
	float RandomRadius;
	float RandomU;
	float RandomV;
	float3 ScaleFactor;
	float3 ShapeBitangent;
	float3 ShapeNormal;
	float3 ShapePosition;
	float3 ShapeTangent;
	float3 ShapeVector;
	float3 TorusBitangent;
	float3 TorusNormal;
	float3 TorusTangent;
	float3 TorusVector;
	FParamMap0_Local_ShapeLocation_TransformStack_Rotation TransformStack_Rotation;
};

struct FParamMap0_Local_ScaleSpriteSize
{
	float2 InitialSpriteSize;
};

struct FParamMap0_Local_InitializeParticle
{
	float InitRIbbonDistance;
};

struct FParamMap0_Local
{
	FParamMap0_Local_InitializeParticle InitializeParticle;
	FParamMap0_Local_ScaleSpriteSize ScaleSpriteSize;
	FParamMap0_Local_ShapeLocation ShapeLocation;
	FParamMap0_Local_SolveForcesAndVelocity SolveForcesAndVelocity;
};

struct FParamMap0_Interpolation
{
	float Emitter_InterpSpawnStartDt;
	int Emitter_SpawnGroup;
	float Emitter_SpawnInterval;
	int InterpSpawn_Index;
	float InterpSpawn_InvSpawnTime;
	float InterpSpawn_InvUpdateTime;
	float InterpSpawn_SpawnTime;
	float InterpSpawn_UpdateTime;
	float SpawnInterp;
};

struct FParamMap0_InitializeParticle
{
	float MaterialRandom;
	int PositionOffsetCoordinateSpace;
};

struct FParamMap0_FloatFromCurve
{
	float CurveIndex;
};

struct FParamMap0_Engine_System
{
	float Age;
	int CurrentTimeStep;
	int NumEmitters;
	int NumEmittersAlive;
	int NumTimeSteps;
	int PaddingInt32_0;
	int PaddingInt32_1;
	int PaddingInt32_2;
	int RandomSeed;
	int SignificanceIndex;
	int TickCount;
	float TimeStepFraction;
};

struct FParamMap0_Engine_Owner
{
	int ExecutionState;
	float LODDistance;
	float LODDistanceFraction;
	float4 LWCTile;
	int PaddingInt32_0;
	int PaddingInt32_1;
	int PaddingInt32_2;
	int PaddingInt32_3;
	int PaddingInt32_4;
	int PaddingInt32_5;
	float3 Position;
	float4 Rotation;
	float3 Scale;
	float4x4 SystemLocalToWorld;
	float4x4 SystemLocalToWorldNoScale;
	float4x4 SystemLocalToWorldTransposed;
	float4x4 SystemWorldToLocal;
	float4x4 SystemWorldToLocalNoScale;
	float4x4 SystemWorldToLocalTransposed;
	float3 SystemXAxis;
	float3 SystemYAxis;
	float3 SystemZAxis;
	float TimeSinceRendered;
	float3 Velocity;
};

struct FParamMap0_Engine_Emitter
{
	int InstanceSeed;
	int NumParticles;
	int PaddingInt32_0;
	int PaddingInt32_1;
	float SpawnCountScale;
	int TotalSpawnedParticles;
};

struct FParamMap0_Engine
{
	float DeltaTime;
	FParamMap0_Engine_Emitter Emitter;
	int ExecutionCount;
	float InverseDeltaTime;
	FParamMap0_Engine_Owner Owner;
	int PaddingInt32_0;
	int PaddingInt32_1;
	int QualityLevel;
	float RealTime;
	FParamMap0_Engine_System System;
	float Time;
	float WorldDeltaTime;
};

struct FParamMap0_Emitter_SpawnRate
{
	float SpawnRemainder;
};

struct FParamMap0_Emitter
{
	float Age;
	float DistanceTraveled;
	int RandomSeed;
	float SpawnRate;
	FParamMap0_Emitter_SpawnRate SpawnRate;
};

struct FParamMap0_DataInstance
{
	bool Alive;
};

struct FParamMap0_Array_ShapeLocation
{
	int ShapeBitangent;
	int ShapeNormal;
	int ShapePosition;
	int ShapeTangent;
	int ShapeVector;
};

struct FParamMap0_Array_Previous
{
	int Position;
	int SpriteSize;
	int Velocity;
};

struct FParamMap0_Array_Presolve
{
	int PhysicsForce;
	int Position;
	int Velocity;
};

struct FParamMap0_Array_Initial
{
	int Color;
	int SpriteSize;
};

struct FParamMap0_Array
{
	int Age;
	int Color;
	int DistanceTraveled;
	FParamMap0_Array_Initial Initial;
	int Lifetime;
	int Mass;
	int MaterialRandom;
	int NormalizedAge;
	int Position;
	FParamMap0_Array_Presolve Presolve;
	FParamMap0_Array_Previous Previous;
	int RibbonUVDistance;
	FParamMap0_Array_ShapeLocation ShapeLocation;
	int SpriteSize;
	int UniqueID;
	int Velocity;
};

struct FParamMap0
{
	FParamMap0_Array Array;
	FParamMap0_DataInstance DataInstance;
	FParamMap0_Emitter Emitter;
	FParamMap0_Engine Engine;
	FParamMap0_FloatFromCurve FloatFromCurve;
	FParamMap0_InitializeParticle InitializeParticle;
	FParamMap0_Interpolation Interpolation;
	FParamMap0_Local Local;
	FParamMap0_Multiply_FloatByInt Multiply_FloatByInt;
	FParamMap0_OUTPUT_VAR OUTPUT_VAR;
	FParamMap0_Particles Particles;
	FParamMap0_ParticleState ParticleState;
	FParamMap0_ScaleColor ScaleColor;
	FParamMap0_ScaleSpriteSize ScaleSpriteSize;
	FParamMap0_ShapeLocation ShapeLocation;
	FParamMap0_SolveForcesAndVelocity SolveForcesAndVelocity;
	FParamMap0_Transient Transient;
};

struct FSimulationContext
{

	FParamMap0 MapSpawn;


	FParamMap0 MapUpdate;

};

static float HackSpawnInterp = 1.0;
void NiagaraScript_230_Particle_Particle_ScriptUsage4_EvaluationType_NewEnumerator0_FixedRandomSeed_false_OverrideSeed_false_RandomnessMode_NewEnumerator0_Func_(int In_Engine_System_RandomSeed, float In_FloatMin, float In_FloatMax, int In_Seed, int In_Engine_System_TickCount, int In_Particles_UniqueID, int In_Emitter_RandomSeed, int In_Engine_Emitter_InstanceSeed, out float Out_RandomFloat, out bool Out_IsDeterministic, inout FSimulationContext Context);
void NiagaraScript_266_Particle_Func_(float3 In_Engine_Owner_Position, out float3 Out_SimulationPosition, inout FSimulationContext Context);
void InitializeParticle_Emitter_Func_(inout FSimulationContext Context);
void ReturnParticleIDAttributes_Emitter_Func_(out int Out_INT, inout FSimulationContext Context);
void Multiply_FloatByInt_Emitter_Func_(out float Out_Result, inout FSimulationContext Context);
void CustomHlslE548EF1441649C36D35230847F667303_Func_(float In_a, float In_c, float In_cosu, float In_sinu, float In_cosv, float In_sinv, out float3 Out_Torus, out float3 Out_TorusTangent, out float3 Out_TorusBitangent, out float3 Out_TorusNormal);
void NiagaraScript_248_Func_(float In_HandleRadius, float In_LargeRadius, float In_U, float In_V, out float3 Out_TorusVector, out float3 Out_TorusTangent, out float3 Out_TorusBitangent, out float3 Out_TorusNormal, inout FSimulationContext Context);
void NiagaraScript_253_Func_(int In_SourceSpace, int In_DestinationSpace, float4x4 In_LocalToWorldTransform, float4x4 In_WorldToLocalTransform, bool In_bLocalSpace, out bool Out_bUseOriginal, out float4x4 Out_OutTransform, out bool Out_LocalToWorld, inout FSimulationContext Context);
void ShapeLocation_TransformVector007_Emitter_Func_(float3 In_InVector, int In_SourceSpace, int In_DestinationSpace, bool In_ApplyScale, out float3 Out_OutVector, inout FSimulationContext Context);
void FastMatrixToQuaternion_FastPathLibrary(float4x4 In_Mat, out float4 Out_Quat);
void NiagaraScript_259_Func_(float4x4 In_NewInput, out float4 Out_Quat, inout FSimulationContext Context);
void NiagaraScript_258_Func_(float3 In_XVector, float3 In_YVector, float3 In_ZVector, out float4 Out_Quat, inout FSimulationContext Context);
void NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_(float In_Angle, out float Out_ConvertedAngle, inout FSimulationContext Context);
void CustomHlslE4749C3F466E2F628A8C8D8EC6986A01_Func_(float In_Roll, float In_Pitch, float In_Yaw, out float4 Out_RotationQuat);
void NiagaraScript_260_Func_(float In_X, float In_Y, float In_Z, out float4 Out_Quaternion, inout FSimulationContext Context);
void CustomHlsl001624D816540ECD5F976902A85E139007C_Func_(float4 In_Quat1, float4 In_Quat2, out float4 Out_Result);
void NiagaraScript_255_Func_(float4 In_QuaternionA, float4 In_QuaternionB, out float4 Out_Quaternion, inout FSimulationContext Context);
void NiagaraScript_229_Func_(float3 In_VECTOR_VAR, float4 In_Quaternion, out float3 Out_Vector, inout FSimulationContext Context);
void ShapeLocation_TransformStack_Rotation_Emitter_Func_(float3 In_InputVector, int In_RotationCoordinateSpace, float3 In_YawASC47PitchASC47Roll, float3 In_RotationAxis, float In_RotationAngle, float4 In_RotationQuaternion, bool In_InvertRotationQuaternion, float3 In_AdditionalYawASC47PitchASC47Roll, float4x4 In_RotationMatrix, float3 In_InputNormal, float3 In_InputTangent, float3 In_InputBitangent, out float3 Out_TransformedVector, out float3 Out_TransformedNormal, out float3 Out_TransformedTangent, out float3 Out_TransformedBitangent, inout FSimulationContext Context);
void ShapeLocation_Emitter_Func_(inout FSimulationContext Context);
void CustomHlsl04C64086480DA644FCC88485B815E918_Func_(float In_InFloat, out float Out_OutFloat);
void NiagaraScript_241_Particle_Func_(float In_Value, out float Out_ClampedValue, inout FSimulationContext Context);
void ParticleState_Emitter_Func_(inout FSimulationContext Context);
void SampleCurve_Emitter_ScaleSpriteSize_UniformCurveSpriteScale(float In_X, out float Out_Value);
void ScaleSpriteSize_Emitter_Func_(inout FSimulationContext Context);
void SampleCurve_Emitter_ScaleAlpha_FloatCurve(float In_X, out float Out_Value);
void FloatFromCurve_Emitter_Func_(out float Out_Value, inout FSimulationContext Context);
void ScaleColor_Emitter_Func_(inout FSimulationContext Context);
void NiagaraScript_270_Particle_Func_(float3 In_Velocity, float3 In_AdvectionVelocity, float In_InverseMass, float In_Drag, float In_DeltaTime, bool In_IgnoreMass, out float3 Out_Output, inout FSimulationContext Context);
void SolveForcesAndVelocity_Emitter_Func_(inout FSimulationContext Context);
float GetSpawnInterpolation();

void NiagaraScript_230_Particle_Particle_ScriptUsage4_EvaluationType_NewEnumerator0_FixedRandomSeed_false_OverrideSeed_false_RandomnessMode_NewEnumerator0_Func_(int In_Engine_System_RandomSeed, float In_FloatMin, float In_FloatMax, int In_Seed, int In_Engine_System_TickCount, int In_Particles_UniqueID, int In_Emitter_RandomSeed, int In_Engine_Emitter_InstanceSeed, out float Out_RandomFloat, out bool Out_IsDeterministic, inout FSimulationContext Context)
{
	bool Constant23 = false;
	float Result = In_FloatMax - In_FloatMin;
	float Result1 = rand_float(Result);
	float Result2 = In_FloatMin + Result1;
	Out_RandomFloat = Result2;
	Out_IsDeterministic = Constant23;
}



void NiagaraScript_266_Particle_Func_(float3 In_Engine_Owner_Position, out float3 Out_SimulationPosition, inout FSimulationContext Context)
{
	Out_SimulationPosition = Context.MapSpawn.Engine.Owner.Position;
}



void InitializeParticle_Emitter_Func_(inout FSimulationContext Context)
{
	Context.MapSpawn.Particles.MaterialRandom = Context.MapSpawn.InitializeParticle.MaterialRandom;
	Context.MapSpawn.Particles.Lifetime = Constants_Emitter_InitializeParticle_Lifetime;
	Context.MapSpawn.Particles.Color = Constants_Emitter_InitializeParticle_Color;
	Context.MapSpawn.Particles.Mass = Constants_Emitter_InitializeParticle_Mass;
	Context.MapSpawn.Particles.SpriteSize = Constants_Emitter_InitializeParticle_SpriteSize.xy;
	float3 Constant25 = float3(0,0,0);
	float3 NiagaraScript_266_Particle_Func_Output_SimulationPosition;
	NiagaraScript_266_Particle_Func_(Constant25, NiagaraScript_266_Particle_Func_Output_SimulationPosition, Context);
	float Constant26 = 0;
	float3 Result3 = Constants_Emitter_InitializeParticle_PositionOffset.xyz * Constant26;
	float3 Result4 = NiagaraScript_266_Particle_Func_Output_SimulationPosition + Result3;
	Context.MapSpawn.Particles.Position = Result4;
	Context.MapSpawn.Local.InitializeParticle.InitRIbbonDistance = Context.MapSpawn.Particles.RibbonUVDistance;
}



void ReturnParticleIDAttributes_Emitter_Func_(out int Out_INT, inout FSimulationContext Context)
{
	Out_INT = Context.MapSpawn.Particles.UniqueID;
}



void Multiply_FloatByInt_Emitter_Func_(out float Out_Result, inout FSimulationContext Context)
{
	float Result5 = Constants_Emitter_Multiply_FloatByInt_FLOAT_VAR * Context.MapSpawn.Multiply_FloatByInt.Integer;
	Out_Result = Result5;
}



void CustomHlslE548EF1441649C36D35230847F667303_Func_(float In_a, float In_c, float In_cosu, float In_sinu, float In_cosv, float In_sinv, out float3 Out_Torus, out float3 Out_TorusTangent, out float3 Out_TorusBitangent, out float3 Out_TorusNormal)
{


	
	float c_add_a_mul_cosv = float(In_c + In_a * In_cosv);
	
	Out_Torus.x = c_add_a_mul_cosv * In_cosu;
	Out_Torus.y = c_add_a_mul_cosv * In_sinu;
	Out_Torus.z = In_a * In_sinv;
	
	Out_TorusTangent = normalize(float3(1 + 1 * In_cosv, 1 + 1 * In_cosv, 1 + 1 * In_cosv) * float3(-In_sinu, In_cosu, 0));
	
	Out_TorusBitangent = normalize(float3(-In_sinv * In_cosu, -In_sinv * In_sinu, In_cosv));
	
	Out_TorusNormal = cross(Out_TorusTangent, Out_TorusBitangent); 
}



void NiagaraScript_248_Func_(float In_HandleRadius, float In_LargeRadius, float In_U, float In_V, out float3 Out_TorusVector, out float3 Out_TorusTangent, out float3 Out_TorusBitangent, out float3 Out_TorusNormal, inout FSimulationContext Context)
{
	float Constant32 = 1;
	float Result8 = cos(In_U*(TWO_PI/Constant32));
	float Constant33 = 1;
	float Result9 = sin(In_U*(TWO_PI/Constant33));
	float Constant34 = 1;
	float Result10 = cos(In_V*(TWO_PI/Constant34));
	float Constant35 = 1;
	float Result11 = sin(In_V*(TWO_PI/Constant35));
	float3 CustomHlslE548EF1441649C36D35230847F667303_Func_Output_Torus;
	float3 CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusTangent;
	float3 CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusBitangent;
	float3 CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusNormal;
	CustomHlslE548EF1441649C36D35230847F667303_Func_(In_HandleRadius, In_LargeRadius, Result8, Result9, Result10, Result11, CustomHlslE548EF1441649C36D35230847F667303_Func_Output_Torus, CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusTangent, CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusBitangent, CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusNormal);
	Out_TorusVector = CustomHlslE548EF1441649C36D35230847F667303_Func_Output_Torus;
	Out_TorusTangent = CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusTangent;
	Out_TorusBitangent = CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusBitangent;
	Out_TorusNormal = CustomHlslE548EF1441649C36D35230847F667303_Func_Output_TorusNormal;
}



void NiagaraScript_253_Func_(int In_SourceSpace, int In_DestinationSpace, float4x4 In_LocalToWorldTransform, float4x4 In_WorldToLocalTransform, bool In_bLocalSpace, out bool Out_bUseOriginal, out float4x4 Out_OutTransform, out bool Out_LocalToWorld, inout FSimulationContext Context)
{
	int Constant40 = 0;
	bool Result21 = NiagaraAll(In_SourceSpace == Constant40);
	int Constant41 = 0;
	bool Result22 = NiagaraAll(In_DestinationSpace == Constant41);
	bool Result23 = Result21 && Result22;
	int Constant42 = 1;
	bool Result24 = NiagaraAll(In_SourceSpace == Constant42);
	int Constant43 = 1;
	bool Result25 = NiagaraAll(In_DestinationSpace == Constant43);
	bool Result26 = Result24 && Result25;
	bool Result27 = Result23 || Result26;
	int Constant44 = 2;
	bool Result28 = NiagaraAll(In_SourceSpace == Constant44);
	int Constant45 = 2;
	bool Result29 = NiagaraAll(In_DestinationSpace == Constant45);
	bool Result30 = Result28 && Result29;
	bool Result31 = Result27 || Result30;
	bool Result32 = Result21 && Result29;
	bool Result33 = Result28 && Result22;
	bool Result34 = Result32 || Result33;
	bool Result35 = In_bLocalSpace && Result34;
	bool Result36 = Result31 || Result35;
	bool Result37 = !In_bLocalSpace;
	bool Result38 = Result21 && Result25;
	bool Result39 = Result24 && Result22;
	bool Result40 = Result38 || Result39;
	bool Result41 = Result37 && Result40;
	bool Result42 = Result36 || Result41;
	bool Result43 = In_bLocalSpace && Result38;
	bool Result44 = Result28 && Result25;
	bool Result45 = Result43 || Result44;
	bool Result46 = Result37 && Result33;
	bool Result47 = Result45 || Result46;
	float4x4 Matrix_IfResult1;
	if(Result47)
	{
	Matrix_IfResult1 = In_LocalToWorldTransform;
	}
	else
	{
	Matrix_IfResult1 = In_WorldToLocalTransform;
	}
	Out_bUseOriginal = Result42;
	Out_OutTransform = Matrix_IfResult1;
	Out_LocalToWorld = Result47;
}



void ShapeLocation_TransformVector007_Emitter_Func_(float3 In_InVector, int In_SourceSpace, int In_DestinationSpace, bool In_ApplyScale, out float3 Out_OutVector, inout FSimulationContext Context)
{
	bool Constant39 = false;
	float4x4 Matrix_IfResult;
	float4x4 Matrix001_IfResult;
	if(In_ApplyScale)
	{
	Matrix_IfResult = Context.MapSpawn.Engine.Owner.SystemLocalToWorld;
	Matrix001_IfResult = Context.MapSpawn.Engine.Owner.SystemWorldToLocal;
	}
	else
	{
	Matrix_IfResult = Context.MapSpawn.Engine.Owner.SystemLocalToWorldNoScale;
	Matrix001_IfResult = Context.MapSpawn.Engine.Owner.SystemWorldToLocalNoScale;
	}
	bool NiagaraScript_253_Func_Output_bUseOriginal;
	float4x4 NiagaraScript_253_Func_Output_OutTransform;
	bool NiagaraScript_253_Func_Output_LocalToWorld;
	NiagaraScript_253_Func_(In_SourceSpace, In_DestinationSpace, Matrix_IfResult, Matrix001_IfResult, Constant39, NiagaraScript_253_Func_Output_bUseOriginal, NiagaraScript_253_Func_Output_OutTransform, NiagaraScript_253_Func_Output_LocalToWorld, Context);
	float3 Result48 = mul(float4(In_InVector,0.0),NiagaraScript_253_Func_Output_OutTransform).xyz;
	float3 Vector_IfResult;
	if(NiagaraScript_253_Func_Output_bUseOriginal)
	{
	Vector_IfResult = In_InVector;
	}
	else
	{
	Vector_IfResult = Result48;
	}
	Out_OutVector = Vector_IfResult;
}



void NiagaraScript_259_Func_(float4x4 In_NewInput, out float4 Out_Quat, inout FSimulationContext Context)
{
	float4 FastMatrixToQuaternion_FastPathLibraryOutput_Quat;
	FastMatrixToQuaternion_FastPathLibrary(In_NewInput, FastMatrixToQuaternion_FastPathLibraryOutput_Quat);
	Out_Quat = FastMatrixToQuaternion_FastPathLibraryOutput_Quat;
}



void NiagaraScript_258_Func_(float3 In_XVector, float3 In_YVector, float3 In_ZVector, out float4 Out_Quat, inout FSimulationContext Context)
{
	float Constant58 = 0;
	float4 Output13;
	Output13.x = In_XVector.x;
	Output13.y = In_XVector.y;
	Output13.z = In_XVector.z;
	Output13.w = Constant58;
	float Constant59 = 0;
	float4 Output14;
	Output14.x = In_YVector.x;
	Output14.y = In_YVector.y;
	Output14.z = In_YVector.z;
	Output14.w = Constant59;
	float Constant60 = 0;
	float4 Output15;
	Output15.x = In_ZVector.x;
	Output15.y = In_ZVector.y;
	Output15.z = In_ZVector.z;
	Output15.w = Constant60;
	float4 Constant61 = float4(0,0,0,0);
	float4x4 Output16;
	Output16[0] = Output13;
	Output16[1] = Output14;
	Output16[2] = Output15;
	Output16[3] = Constant61;
	float4 NiagaraScript_259_Func_Output_Quat;
	NiagaraScript_259_Func_(Output16, NiagaraScript_259_Func_Output_Quat, Context);
	Out_Quat = NiagaraScript_259_Func_Output_Quat;
}



void NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_(float In_Angle, out float Out_ConvertedAngle, inout FSimulationContext Context)
{
	Out_ConvertedAngle = In_Angle;
}



void CustomHlslE4749C3F466E2F628A8C8D8EC6986A01_Func_(float In_Roll, float In_Pitch, float In_Yaw, out float4 Out_RotationQuat)
{

	float ModulationValue = 3.1415927;
	
		float SP = sin(In_Pitch*ModulationValue);
		float SY = sin(In_Yaw*ModulationValue);
		float SR = sin(In_Roll*ModulationValue);
		float CP = cos(In_Pitch*ModulationValue);
		float CY = cos(In_Yaw*ModulationValue);
		float CR = cos(In_Roll*ModulationValue);
	
		Out_RotationQuat.x =  CR*SP*SY - SR*CP*CY;
		Out_RotationQuat.y = -CR*SP*CY - SR*CP*SY;
		Out_RotationQuat.z =  CR*CP*SY - SR*SP*CY;
		Out_RotationQuat.w =  CR*CP*CY + SR*SP*SY;
	
}



void NiagaraScript_260_Func_(float In_X, float In_Y, float In_Z, out float4 Out_Quaternion, inout FSimulationContext Context)
{
	float4 CustomHlslE4749C3F466E2F628A8C8D8EC6986A01_Func_Output_RotationQuat;
	CustomHlslE4749C3F466E2F628A8C8D8EC6986A01_Func_(In_X, In_Y, In_Z, CustomHlslE4749C3F466E2F628A8C8D8EC6986A01_Func_Output_RotationQuat);
	Out_Quaternion = CustomHlslE4749C3F466E2F628A8C8D8EC6986A01_Func_Output_RotationQuat;
}



void CustomHlsl001624D816540ECD5F976902A85E139007C_Func_(float4 In_Quat1, float4 In_Quat2, out float4 Out_Result)
{

float4 SIGN_MASK0 = float4( 1.f, -1.f, 1.f, -1.f );
	float4 SIGN_MASK1 = float4( 1.f, 1.f, -1.f, -1.f );
	float4 SIGN_MASK2 = float4( -1.f, 1.f, 1.f, -1.f );
	Out_Result = (In_Quat1.wwww * In_Quat2);
	Out_Result = ((In_Quat1.xxxx * In_Quat2.wzyx) * SIGN_MASK0) + Out_Result;
	Out_Result = ((In_Quat1.yyyy * In_Quat2.zwxy)* SIGN_MASK1) + Out_Result;
	Out_Result = ((In_Quat1.zzzz * In_Quat2.yxwz)* SIGN_MASK2) + Out_Result;
}



void NiagaraScript_255_Func_(float4 In_QuaternionA, float4 In_QuaternionB, out float4 Out_Quaternion, inout FSimulationContext Context)
{
	float4 CustomHlsl001624D816540ECD5F976902A85E139007C_Func_Output_Result;
	CustomHlsl001624D816540ECD5F976902A85E139007C_Func_(In_QuaternionA, In_QuaternionB, CustomHlsl001624D816540ECD5F976902A85E139007C_Func_Output_Result);
	Out_Quaternion = CustomHlsl001624D816540ECD5F976902A85E139007C_Func_Output_Result;
}



void NiagaraScript_229_Func_(float3 In_VECTOR_VAR, float4 In_Quaternion, out float3 Out_Vector, inout FSimulationContext Context)
{
	float3 Output0;
	float Output17;
	Output0.x = In_Quaternion.x;
	Output0.y = In_Quaternion.y;
	Output0.z = In_Quaternion.z;
	Output17 = In_Quaternion.w;
	float Result49 = dot(Output0,In_VECTOR_VAR);
	float Constant62 = 2;
	float Result50 = Result49 * Constant62;
	float3 Result51 = Output0 * Result50;
	float Result52 = Output17 * Output17;
	float Result53 = dot(Output0,Output0);
	float Result54 = Result52 - Result53;
	float3 Result55 = Result54 * In_VECTOR_VAR;
	float3 Result56 = Result51 + Result55;
	float3 Result57 = cross(Output0,In_VECTOR_VAR);
	float Constant63 = 2;
	float Result58 = Output17 * Constant63;
	float3 Result59 = Result57 * Result58;
	float3 Result60 = Result56 + Result59;
	Out_Vector = Result60;
}



void ShapeLocation_TransformStack_Rotation_Emitter_Func_(float3 In_InputVector, int In_RotationCoordinateSpace, float3 In_YawASC47PitchASC47Roll, float3 In_RotationAxis, float In_RotationAngle, float4 In_RotationQuaternion, bool In_InvertRotationQuaternion, float3 In_AdditionalYawASC47PitchASC47Roll, float4x4 In_RotationMatrix, float3 In_InputNormal, float3 In_InputTangent, float3 In_InputBitangent, out float3 Out_TransformedVector, out float3 Out_TransformedNormal, out float3 Out_TransformedTangent, out float3 Out_TransformedBitangent, inout FSimulationContext Context)
{
	Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformVector = In_InputVector;
	Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformNormal = In_InputNormal;
	Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformTangent = In_InputTangent;
	Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformBitangent = In_InputBitangent;
	float Constant46 = 1;
	float Constant47 = 0;
	float Constant48 = 0;
	float3 Output1;
	Output1.x = Constant46;
	Output1.y = Constant47;
	Output1.z = Constant48;
	float3 Constant49 = float3(0.0, 0.0, 0.0);
	float3 X_SelectResult = Constant49;
	X_SelectResult = Output1;
	if(In_RotationCoordinateSpace == 1)
	{ 
	X_SelectResult = Output1;
	}
	if(In_RotationCoordinateSpace == 2)
	{ 
	X_SelectResult = Context.MapSpawn.Engine.Owner.SystemXAxis;
	}
	float Constant50 = 0;
	float Constant51 = 1;
	float Constant52 = 0;
	float3 Output11;
	Output11.x = Constant50;
	Output11.y = Constant51;
	Output11.z = Constant52;
	float3 Constant53 = float3(0.0, 0.0, 0.0);
	float3 Y_SelectResult1 = Constant53;
	Y_SelectResult1 = Output11;
	if(In_RotationCoordinateSpace == 1)
	{ 
	Y_SelectResult1 = Output11;
	}
	if(In_RotationCoordinateSpace == 2)
	{ 
	Y_SelectResult1 = Context.MapSpawn.Engine.Owner.SystemYAxis;
	}
	float Constant54 = 0;
	float Constant55 = 0;
	float Constant56 = 1;
	float3 Output12;
	Output12.x = Constant54;
	Output12.y = Constant55;
	Output12.z = Constant56;
	float3 Constant57 = float3(0.0, 0.0, 0.0);
	float3 Z_SelectResult2 = Constant57;
	Z_SelectResult2 = Output12;
	if(In_RotationCoordinateSpace == 1)
	{ 
	Z_SelectResult2 = Output12;
	}
	if(In_RotationCoordinateSpace == 2)
	{ 
	Z_SelectResult2 = Context.MapSpawn.Engine.Owner.SystemZAxis;
	}
	float4 NiagaraScript_258_Func_Output_Quat;
	NiagaraScript_258_Func_(X_SelectResult, Y_SelectResult1, Z_SelectResult2, NiagaraScript_258_Func_Output_Quat, Context);
	float X;
	float Y;
	float Z;
	X = In_YawASC47PitchASC47Roll.x;
	Y = In_YawASC47PitchASC47Roll.y;
	Z = In_YawASC47PitchASC47Roll.z;
	float NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle;
	NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_(Z, NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle, Context);
	float NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle1;
	NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_(Y, NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle1, Context);
	float NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle2;
	NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_(X, NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle2, Context);
	float4 NiagaraScript_260_Func_Output_Quaternion;
	NiagaraScript_260_Func_(NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle, NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle1, NiagaraScript_231_Particle_AngleInput_NewEnumerator1_AngleOutput_NewEnumerator1_Func_Output_ConvertedAngle2, NiagaraScript_260_Func_Output_Quaternion, Context);
	float4 NiagaraScript_255_Func_Output_Quaternion;
	NiagaraScript_255_Func_(NiagaraScript_258_Func_Output_Quat, NiagaraScript_260_Func_Output_Quaternion, NiagaraScript_255_Func_Output_Quaternion, Context);
	float3 NiagaraScript_229_Func_Output_Vector;
	NiagaraScript_229_Func_(Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformVector, NiagaraScript_255_Func_Output_Quaternion, NiagaraScript_229_Func_Output_Vector, Context);
	float3 NiagaraScript_229_Func_Output_Vector1;
	NiagaraScript_229_Func_(Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformNormal, NiagaraScript_255_Func_Output_Quaternion, NiagaraScript_229_Func_Output_Vector1, Context);
	float3 NiagaraScript_229_Func_Output_Vector2;
	NiagaraScript_229_Func_(Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformTangent, NiagaraScript_255_Func_Output_Quaternion, NiagaraScript_229_Func_Output_Vector2, Context);
	float3 NiagaraScript_229_Func_Output_Vector3;
	NiagaraScript_229_Func_(Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformBitangent, NiagaraScript_255_Func_Output_Quaternion, NiagaraScript_229_Func_Output_Vector3, Context);
	Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformVector = NiagaraScript_229_Func_Output_Vector;
	Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformNormal = NiagaraScript_229_Func_Output_Vector1;
	Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformTangent = NiagaraScript_229_Func_Output_Vector2;
	Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformBitangent = NiagaraScript_229_Func_Output_Vector3;
	Out_TransformedVector = Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformVector;
	Out_TransformedNormal = Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformNormal;
	Out_TransformedTangent = Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformTangent;
	Out_TransformedBitangent = Context.MapSpawn.Local.ShapeLocation.TransformStack_Rotation.LocalTransformBitangent;
}



void ShapeLocation_Emitter_Func_(inout FSimulationContext Context)
{
	float Constant31 = 1;
	Context.MapSpawn.Local.ShapeLocation.RandomRadius = Constant31;
	Context.MapSpawn.Local.ShapeLocation.RandomU = Context.MapSpawn.ShapeLocation.UPosition;
	Context.MapSpawn.Local.ShapeLocation.RandomV = Constants_Emitter_ShapeLocation_VPosition;
	float Result6 = sqrt(Context.MapSpawn.Local.ShapeLocation.RandomRadius);
	float Result7 = Result6 * Constants_Emitter_ShapeLocation_HandleRadius;
	float3 NiagaraScript_248_Func_Output_TorusVector;
	float3 NiagaraScript_248_Func_Output_TorusTangent;
	float3 NiagaraScript_248_Func_Output_TorusBitangent;
	float3 NiagaraScript_248_Func_Output_TorusNormal;
	NiagaraScript_248_Func_(Result7, Constants_Emitter_ShapeLocation_LargeRadius, Context.MapSpawn.Local.ShapeLocation.RandomU, Context.MapSpawn.Local.ShapeLocation.RandomV, NiagaraScript_248_Func_Output_TorusVector, NiagaraScript_248_Func_Output_TorusTangent, NiagaraScript_248_Func_Output_TorusBitangent, NiagaraScript_248_Func_Output_TorusNormal, Context);
	Context.MapSpawn.Local.ShapeLocation.TorusVector = NiagaraScript_248_Func_Output_TorusVector;
	Context.MapSpawn.Local.ShapeLocation.TorusTangent = NiagaraScript_248_Func_Output_TorusTangent;
	Context.MapSpawn.Local.ShapeLocation.TorusBitangent = NiagaraScript_248_Func_Output_TorusBitangent;
	Context.MapSpawn.Local.ShapeLocation.TorusNormal = NiagaraScript_248_Func_Output_TorusNormal;
	Context.MapSpawn.Local.ShapeLocation.ShapeVector = Context.MapSpawn.Local.ShapeLocation.TorusVector;
	Context.MapSpawn.Local.ShapeLocation.ShapeNormal = Context.MapSpawn.Local.ShapeLocation.TorusNormal;
	Context.MapSpawn.Local.ShapeLocation.ShapeTangent = Context.MapSpawn.Local.ShapeLocation.TorusBitangent;
	Context.MapSpawn.Local.ShapeLocation.ShapeBitangent = Context.MapSpawn.Local.ShapeLocation.TorusTangent;
	float3 Result12 = Constants_Emitter_ShapeLocation_NonUniformScale.xyz * Context.MapSpawn.ShapeLocation.ApplyOwnerScale;
	float3 Result13 = Context.MapSpawn.Local.ShapeLocation.ShapeVector * Result12;
	float3 Result14 = abs(Result12);
	float3 Constant36 = float3(0.0001,0.0001,0.0001);
	float3 Result15 = max(Result14, Constant36);
	float3 Result16 = rcp(Result15);
	Context.MapSpawn.Local.ShapeLocation.ShapeVector = Result13;
	Context.MapSpawn.Local.ShapeLocation.ScaleFactor = Result12;
	Context.MapSpawn.Local.ShapeLocation.InverseScaleFactor = Result16;
	float3 Result17 = Context.MapSpawn.Local.ShapeLocation.ShapeNormal * Context.MapSpawn.Local.ShapeLocation.InverseScaleFactor;
	float3 Result18 = normalize(Result17);
	float3 Result19 = Context.MapSpawn.Local.ShapeLocation.InverseScaleFactor * Context.MapSpawn.Local.ShapeLocation.ShapeTangent;
	float3 Result20 = normalize(Result19);
	Context.MapSpawn.Local.ShapeLocation.ShapeNormal = Result18;
	Context.MapSpawn.Local.ShapeLocation.ShapeTangent = Result20;
	int Constant37 = 0;
	bool Constant38 = false;
	float3 ShapeLocation_TransformVector007_Emitter_Func_Output_OutVector;
	ShapeLocation_TransformVector007_Emitter_Func_(Constants_Emitter_ShapeLocation_Offset.xyz, Context.MapSpawn.ShapeLocation.OffsetCoordinateSpace, Constant37, Constant38, ShapeLocation_TransformVector007_Emitter_Func_Output_OutVector, Context);
	Context.MapSpawn.Local.ShapeLocation.OffsetVector = ShapeLocation_TransformVector007_Emitter_Func_Output_OutVector;
	float3 ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedVector;
	float3 ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedNormal;
	float3 ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedTangent;
	float3 ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedBitangent;
	ShapeLocation_TransformStack_Rotation_Emitter_Func_(Context.MapSpawn.Local.ShapeLocation.ShapeVector, Context.MapSpawn.ShapeLocation.RotationCoordinateSpace, Constants_Emitter_ShapeLocation_YawASC47PitchASC47Roll.xyz, Constants_Emitter_ShapeLocation_RotationAxis.xyz, Constants_Emitter_ShapeLocation_RotationAngle, Context.MapSpawn.ShapeLocation.RotationQuaternion, Context.MapSpawn.ShapeLocation.InvertRotationQuaternion, Constants_Emitter_ShapeLocation_AdditionalYawASC47PitchASC47Roll.xyz, Context.MapSpawn.ShapeLocation.RotationMatrix, Context.MapSpawn.Local.ShapeLocation.ShapeNormal, Context.MapSpawn.Local.ShapeLocation.ShapeTangent, Context.MapSpawn.Local.ShapeLocation.ShapeBitangent, ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedVector, ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedNormal, ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedTangent, ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedBitangent, Context);
	Context.MapSpawn.Local.ShapeLocation.ShapeVector = ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedVector;
	Context.MapSpawn.Local.ShapeLocation.ShapeNormal = ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedNormal;
	Context.MapSpawn.Local.ShapeLocation.ShapeTangent = ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedTangent;
	Context.MapSpawn.Local.ShapeLocation.ShapeBitangent = ShapeLocation_TransformStack_Rotation_Emitter_Func_Output_TransformedBitangent;
	float3 Result61 = Context.MapSpawn.Local.ShapeLocation.ShapeVector + Context.MapSpawn.Local.ShapeLocation.OffsetVector;
	Context.MapSpawn.Local.ShapeLocation.ShapeVector = Result61;
	float3 Result62 = Context.MapSpawn.ShapeLocation.ShapeOrigin + Context.MapSpawn.Local.ShapeLocation.ShapeVector;
	Context.MapSpawn.Local.ShapeLocation.ShapePosition = Result62;
	Context.MapSpawn.Particles.ShapeLocation.ShapeVector = Context.MapSpawn.Local.ShapeLocation.ShapeVector;
	Context.MapSpawn.Particles.ShapeLocation.ShapePosition = Context.MapSpawn.Local.ShapeLocation.ShapePosition;
	Context.MapSpawn.Particles.Position = Context.MapSpawn.Local.ShapeLocation.ShapePosition;
	float3 Result63 = cross(Context.MapSpawn.Local.ShapeLocation.ShapeNormal,Context.MapSpawn.Local.ShapeLocation.ShapeTangent);
	Context.MapSpawn.Particles.ShapeLocation.ShapeNormal = Context.MapSpawn.Local.ShapeLocation.ShapeNormal;
	Context.MapSpawn.Particles.ShapeLocation.ShapeTangent = Context.MapSpawn.Local.ShapeLocation.ShapeTangent;
	Context.MapSpawn.Particles.ShapeLocation.ShapeBitangent = Result63;
}



void CustomHlsl04C64086480DA644FCC88485B815E918_Func_(float In_InFloat, out float Out_OutFloat)
{

Out_OutFloat = saturate (In_InFloat);
}



void NiagaraScript_241_Particle_Func_(float In_Value, out float Out_ClampedValue, inout FSimulationContext Context)
{
	float CustomHlsl04C64086480DA644FCC88485B815E918_Func_Output_OutFloat;
	CustomHlsl04C64086480DA644FCC88485B815E918_Func_(In_Value, CustomHlsl04C64086480DA644FCC88485B815E918_Func_Output_OutFloat);
	Out_ClampedValue = CustomHlsl04C64086480DA644FCC88485B815E918_Func_Output_OutFloat;
}



void ParticleState_Emitter_Func_(inout FSimulationContext Context)
{
	bool Result64 = NiagaraAll(Context.MapUpdate.Particles.Age <= Context.MapUpdate.Engine.DeltaTime);
	Context.MapUpdate.OUTPUT_VAR.ParticleState.FirstFrame = Result64;
	Context.MapUpdate.Transient.FirstFrame = Result64;
	float Constant65 = 1e-06;
	bool Result65 = NiagaraAll(Context.MapUpdate.ParticleState.Lifetime > Constant65);
	bool Result66 = Context.MapUpdate.Transient.FirstFrame && Result65;
	float Result67 = Context.MapUpdate.Particles.Age + Context.MapUpdate.ParticleState.DeltaTime;
	float Constant66 = 1e-05;
	float Result68 = max(Context.MapUpdate.ParticleState.Lifetime, Constant66);
	bool Result69 = NiagaraAll(Result67 < Result68);
	bool Result70 = Result66 || Result69;
	bool Result71 = Context.MapUpdate.DataInstance.Alive && Result70;
	float Result72 = Result67 / Result68;
	float NiagaraScript_241_Particle_Func_Output_ClampedValue;
	NiagaraScript_241_Particle_Func_(Result72, NiagaraScript_241_Particle_Func_Output_ClampedValue, Context);
	Context.MapUpdate.DataInstance.Alive = Result71;
	Context.MapUpdate.Particles.Age = Result67;
	Context.MapUpdate.Particles.NormalizedAge = NiagaraScript_241_Particle_Func_Output_ClampedValue;
	bool Constant67 = false;
	bool Constant68 = true;
}



void ScaleSpriteSize_Emitter_Func_(inout FSimulationContext Context)
{
	Context.MapUpdate.Local.ScaleSpriteSize.InitialSpriteSize = Context.MapUpdate.ScaleSpriteSize.InitialSpriteSize;
	float SampleCurve_Emitter_ScaleSpriteSize_UniformCurveSpriteScaleOutput_Value;
	SampleCurve_Emitter_ScaleSpriteSize_UniformCurveSpriteScale(Context.MapUpdate.ScaleSpriteSize.UniformCurveIndex, SampleCurve_Emitter_ScaleSpriteSize_UniformCurveSpriteScaleOutput_Value);
	float Result73 = SampleCurve_Emitter_ScaleSpriteSize_UniformCurveSpriteScaleOutput_Value * Constants_Emitter_ScaleSpriteSize_UniformCurveScale;
	float2 Result74 = Context.MapUpdate.Transient.SpriteSizeScaleFactor * Result73;
	float2 Result75 = Context.MapUpdate.Local.ScaleSpriteSize.InitialSpriteSize * Result74;
	Context.MapUpdate.Particles.SpriteSize = Result75;
	Context.MapUpdate.Transient.SpriteSizeScaleFactor = Result74;
}



void FloatFromCurve_Emitter_Func_(out float Out_Value, inout FSimulationContext Context)
{
	float SampleCurve_Emitter_ScaleAlpha_FloatCurveOutput_Value;
	SampleCurve_Emitter_ScaleAlpha_FloatCurve(Context.MapUpdate.FloatFromCurve.CurveIndex, SampleCurve_Emitter_ScaleAlpha_FloatCurveOutput_Value);
	float Result76 = SampleCurve_Emitter_ScaleAlpha_FloatCurveOutput_Value * Constants_Emitter_FloatFromCurve_ScaleCurve;
	Out_Value = Result76;
}



void ScaleColor_Emitter_Func_(inout FSimulationContext Context)
{
	float4 Output01;
	Output01.r = Constants_Emitter_ScaleColor_ScaleRGB.xyz.x;
	Output01.g = Constants_Emitter_ScaleColor_ScaleRGB.xyz.y;
	Output01.b = Constants_Emitter_ScaleColor_ScaleRGB.xyz.z;
	Output01.a = Context.MapUpdate.ScaleColor.ScaleAlpha;
	float4 Result77 = Context.MapUpdate.Transient.ParticleColorScaleFactor * Output01;
	float4 Result78 = Context.MapUpdate.ScaleColor.ColorValueToScale * Result77;
	Context.MapUpdate.Particles.Color = Result78;
	Context.MapUpdate.Transient.ParticleColorScaleFactor = Result77;
}



void NiagaraScript_270_Particle_Func_(float3 In_Velocity, float3 In_AdvectionVelocity, float In_InverseMass, float In_Drag, float In_DeltaTime, bool In_IgnoreMass, out float3 Out_Output, inout FSimulationContext Context)
{
	float3 Result85 = In_Velocity - In_AdvectionVelocity;
	float Result86 = In_Drag * In_InverseMass;
	float Constant78 = (0.0);
	float NiagaraFloat_SelectResult3 = Constant78;
	NiagaraFloat_SelectResult3 = In_Drag;
	if(In_IgnoreMass == 0)
	{ 
	NiagaraFloat_SelectResult3 = Result86;
	}
	float Constant79 = 0;
	float Result87 = max(NiagaraFloat_SelectResult3, Constant79);
	float Result88 = Result87 * In_DeltaTime;
	float Constant80 = 1;
	float Result89 = Result88 + Constant80;
	float3 Result90 = Result85 / Result89;
	float3 Result91 = Result90 + In_AdvectionVelocity;
	Out_Output = Result91;
}



void SolveForcesAndVelocity_Emitter_Func_(inout FSimulationContext Context)
{
	Context.MapUpdate.Local.SolveForcesAndVelocity.DeltaTime = Context.MapUpdate.SolveForcesAndVelocity.DeltaTime;
	float Constant76 = 1e-05;
	float Result79 = max(Context.MapUpdate.Local.SolveForcesAndVelocity.DeltaTime, Constant76);
	float Result80 = Reciprocal(Result79);
	Context.MapUpdate.Local.SolveForcesAndVelocity.InverseDeltaTime = Result80;
	Context.MapUpdate.Local.SolveForcesAndVelocity.PhysicsForce = Context.MapUpdate.SolveForcesAndVelocity.Force;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.IncomingPhysicsForce = Context.MapUpdate.SolveForcesAndVelocity.Force;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity = Context.MapUpdate.SolveForcesAndVelocity.Velocity;
	Context.MapUpdate.Local.SolveForcesAndVelocity.Mass = Context.MapUpdate.SolveForcesAndVelocity.Mass;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Position = Context.MapUpdate.SolveForcesAndVelocity.Position;
	Context.MapUpdate.Particles.Presolve.Velocity = Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity;
	Context.MapUpdate.Particles.Presolve.Position = Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Position;
	Context.MapUpdate.Particles.Presolve.PhysicsForce = Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.IncomingPhysicsForce;
	float Constant77 = 1e-06;
	float Result81 = max(Context.MapUpdate.Local.SolveForcesAndVelocity.Mass, Constant77);
	float Result82 = Reciprocal(Result81);
	float3 Result83 = Result82 * Context.MapUpdate.Local.SolveForcesAndVelocity.PhysicsForce;
	Context.MapUpdate.Local.SolveForcesAndVelocity.PhysicsForce = Result83;
	Context.MapUpdate.Local.SolveForcesAndVelocity.InverseMass = Result82;
	float3 Result84 = Context.MapUpdate.Local.SolveForcesAndVelocity.PhysicsForce * Context.MapUpdate.Local.SolveForcesAndVelocity.DeltaTime + Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity = Result84;
	Context.MapUpdate.Local.SolveForcesAndVelocity.AdvectionVelocity = Context.MapUpdate.Transient.AdvectionVelocity;
	Context.MapUpdate.Local.SolveForcesAndVelocity.PhysicsDrag = Context.MapUpdate.Transient.PhysicsDrag;
	Context.MapUpdate.Local.SolveForcesAndVelocity.DragIgnoreMass = Context.MapUpdate.Transient.DragIgnoreMass;
	float3 NiagaraScript_270_Particle_Func_Output_Output;
	NiagaraScript_270_Particle_Func_(Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity, Context.MapUpdate.Local.SolveForcesAndVelocity.AdvectionVelocity, Context.MapUpdate.Local.SolveForcesAndVelocity.InverseMass, Context.MapUpdate.Local.SolveForcesAndVelocity.PhysicsDrag, Context.MapUpdate.Local.SolveForcesAndVelocity.DeltaTime, Context.MapUpdate.Local.SolveForcesAndVelocity.DragIgnoreMass, NiagaraScript_270_Particle_Func_Output_Output, Context);
	float3 Result92 = NiagaraScript_270_Particle_Func_Output_Output - Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity = NiagaraScript_270_Particle_Func_Output_Output;
	Context.MapUpdate.Local.SolveForcesAndVelocity.DragVelocity = Result92;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.IncomingPhysicsDrag = Context.MapUpdate.Local.SolveForcesAndVelocity.PhysicsDrag;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity = Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity = Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity;
	float3 Result93 = Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity * Context.MapUpdate.Local.SolveForcesAndVelocity.DeltaTime;
	float3 Result94 = Result93 + Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Position;
	Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Position = Result94;
	float3 Position_IfResult;
	float3 Velocity_IfResult;
	if(Context.MapUpdate.SolveForcesAndVelocity.WritetoIntrinsicProperties)
	{
	Position_IfResult = Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Position;
	Velocity_IfResult = Context.MapUpdate.OUTPUT_VAR.SolveForcesAndVelocity.Velocity;
	}
	else
	{
	Position_IfResult = Context.MapUpdate.Particles.Position;
	Velocity_IfResult = Context.MapUpdate.Particles.Velocity;
	}
	Context.MapUpdate.Particles.Position = Position_IfResult;
	Context.MapUpdate.Particles.Velocity = Velocity_IfResult;
	float3 Constant81 = float3(0,0,0);
	float Constant82 = 0;
	float3 ForceVector_IfResult;
	float Drag_IfResult;
	if(Context.MapUpdate.SolveForcesAndVelocity.WritetoIntrinsicProperties)
	{
	ForceVector_IfResult = Constant81;
	Drag_IfResult = Constant82;
	}
	else
	{
	ForceVector_IfResult = Context.MapUpdate.Transient.PhysicsForce;
	Drag_IfResult = Context.MapUpdate.Transient.PhysicsDrag;
	}
	Context.MapUpdate.Transient.PhysicsForce = ForceVector_IfResult;
	Context.MapUpdate.Transient.PhysicsDrag = Drag_IfResult;
	float3 Result95 = Context.MapUpdate.Particles.Position - Context.MapUpdate.Particles.Previous.Position;
	float Result96 = length(Result95);
	float Constant83 = 0.3333;
	float Result97 = Result96 * Constant83;
	float Constant84 = 1e+08;
	float Result98 = Modulo(Context.MapUpdate.Particles.DistanceTraveled, Constant84);
	float Result99 = Result97 + Result98;
	Context.MapUpdate.Particles.DistanceTraveled = Result99;
	
	int Constant85 = 0;
	
	int Constant86 = 0;
	
	int Constant87 = 0;
}


float GetSpawnInterpolation()
{
	return HackSpawnInterp;
}


void InterpolateParameters(inout FSimulationContext Context)
{

	int InterpSpawn_Index = ExecIndex();
	float InterpSpawn_SpawnTime = Emitter_InterpSpawnStartDt + (Emitter_SpawnInterval * InterpSpawn_Index);
	float InterpSpawn_UpdateTime = Engine_DeltaTime - InterpSpawn_SpawnTime;
	float InterpSpawn_InvSpawnTime = 1.0 / InterpSpawn_SpawnTime;
	float InterpSpawn_InvUpdateTime = 1.0 / InterpSpawn_UpdateTime;
	float SpawnInterp = InterpSpawn_SpawnTime * Engine_InverseDeltaTime ;
	HackSpawnInterp = SpawnInterp;
	Context.MapSpawn.Interpolation.InterpSpawn_Index = InterpSpawn_Index;
	Context.MapSpawn.Interpolation.InterpSpawn_SpawnTime = InterpSpawn_SpawnTime;
	Context.MapSpawn.Interpolation.InterpSpawn_UpdateTime = InterpSpawn_UpdateTime;
	Context.MapSpawn.Interpolation.InterpSpawn_InvSpawnTime = InterpSpawn_InvSpawnTime;
	Context.MapSpawn.Interpolation.InterpSpawn_InvUpdateTime = InterpSpawn_InvUpdateTime;
	Context.MapSpawn.Interpolation.SpawnInterp = SpawnInterp;
	Context.MapSpawn.Interpolation.Emitter_SpawnInterval = Emitter_SpawnInterval;
	Context.MapSpawn.Interpolation.Emitter_InterpSpawnStartDt = Emitter_InterpSpawnStartDt;
	Context.MapSpawn.Interpolation.Emitter_SpawnGroup = Emitter_SpawnGroup;
	Context.MapSpawn.Engine.Time = lerp(PREV_Engine_Time, Engine_Time, SpawnInterp);
	Context.MapSpawn.Engine.RealTime = lerp(PREV_Engine_RealTime, Engine_RealTime, SpawnInterp);
	Context.MapSpawn.Engine.Owner.TimeSinceRendered = lerp(PREV_Engine_Owner_TimeSinceRendered, Engine_Owner_TimeSinceRendered, SpawnInterp);
	Context.MapSpawn.Engine.Owner.LODDistance = lerp(PREV_Engine_Owner_LODDistance, Engine_Owner_LODDistance, SpawnInterp);
	Context.MapSpawn.Engine.Owner.LODDistanceFraction = lerp(PREV_Engine_Owner_LODDistanceFraction, Engine_Owner_LODDistanceFraction, SpawnInterp);
	Context.MapSpawn.Engine.System.Age = lerp(PREV_Engine_System_Age, Engine_System_Age, SpawnInterp);
	Context.MapSpawn.Engine.Owner.Rotation = lerp(PREV_Engine_Owner_Rotation, Engine_Owner_Rotation, SpawnInterp);
	Context.MapSpawn.Engine.Owner.Position = lerp(PREV_Engine_Owner_Position, Engine_Owner_Position, SpawnInterp);
	Context.MapSpawn.Engine.Owner.Velocity = lerp(PREV_Engine_Owner_Velocity, Engine_Owner_Velocity, SpawnInterp);
	Context.MapSpawn.Engine.Owner.SystemXAxis = lerp(PREV_Engine_Owner_SystemXAxis, Engine_Owner_SystemXAxis, SpawnInterp);
	Context.MapSpawn.Engine.Owner.SystemYAxis = lerp(PREV_Engine_Owner_SystemYAxis, Engine_Owner_SystemYAxis, SpawnInterp);
	Context.MapSpawn.Engine.Owner.SystemZAxis = lerp(PREV_Engine_Owner_SystemZAxis, Engine_Owner_SystemZAxis, SpawnInterp);
	Context.MapSpawn.Engine.Owner.Scale = lerp(PREV_Engine_Owner_Scale, Engine_Owner_Scale, SpawnInterp);
	Context.MapSpawn.Engine.Owner.LWCTile = lerp(PREV_Engine_Owner_LWCTile, Engine_Owner_LWCTile, SpawnInterp);
	Context.MapSpawn.Emitter.Age = lerp(PREV_Emitter_Age, Emitter_Age, SpawnInterp);
	Context.MapSpawn.Emitter.DistanceTraveled = lerp(PREV_Emitter_DistanceTraveled, Emitter_DistanceTraveled, SpawnInterp);
	Context.MapSpawn.Emitter.SpawnRate.SpawnRemainder = lerp(PREV_Emitter_SpawnRate_SpawnRemainder, Emitter_SpawnRate_SpawnRemainder, SpawnInterp);
	Context.MapUpdate.Engine.DeltaTime = InterpSpawn_UpdateTime;
	Context.MapUpdate.Engine.InverseDeltaTime = InterpSpawn_InvUpdateTime;

}


void HandlePreviousValuesForSpawn(inout FSimulationContext Context)
{
Context.MapSpawn.Particles.Previous.Position = Context.MapSpawn.Particles.Position;

Context.MapSpawn.Particles.Previous.SpriteSize = Context.MapSpawn.Particles.SpriteSize;

Context.MapSpawn.Particles.Previous.Velocity = Context.MapSpawn.Particles.Velocity;

}


void ReadDataSets(inout FSimulationContext Context)
{
}

void WriteDataSets(inout FSimulationContext Context)
{
}


void SimulateMapSpawn(inout FSimulationContext Context)
{
	
	
	float Constant = (0.0);
	Context.MapSpawn.Particles.MaterialRandom = Constant;
	float Constant1 = (0.0);
	Context.MapSpawn.Particles.Lifetime = Constant1;
	float4 Constant2 = float4(1.0, 1.0, 1.0, 1.0);
	Context.MapSpawn.Particles.Color = Constant2;
	float Constant3 = (0.0);
	Context.MapSpawn.Particles.Mass = Constant3;
	float2 Constant4 = float2(0.0, 0.0);
	Context.MapSpawn.Particles.SpriteSize = Constant4;
	float3 Constant5 = float3(0.0, 0.0, 0.0);
	Context.MapSpawn.Particles.Position = Constant5;
	float Constant6 = 0;
	Context.MapSpawn.Particles.Age = Constant6;
	float Constant7 = (0.0);
	Context.MapSpawn.Particles.NormalizedAge = Constant7;
	float3 Constant8 = float3(0,0,0);
	Context.MapSpawn.Particles.Velocity = Constant8;
	float3 Constant9 = float3(0.0, 0.0, 0.0);
	Context.MapSpawn.Particles.Presolve.Velocity = Constant9;
	float3 Constant10 = float3(0.0, 0.0, 0.0);
	Context.MapSpawn.Particles.Presolve.Position = Constant10;
	float3 Constant11 = float3(0.0, 0.0, 0.0);
	Context.MapSpawn.Particles.Presolve.PhysicsForce = Constant11;
	float3 Constant12 = float3(0,0,0);
	Context.MapSpawn.Particles.Previous.Velocity = Constant12;
	float3 Constant13 = float3(0,0,0);
	Context.MapSpawn.Particles.Previous.Position = Constant13;
	float Constant14 = 0;
	Context.MapSpawn.Particles.DistanceTraveled = Constant14;
	
	int Constant15 = (0);
	float Constant16 = 0;
	float Constant17 = 1;
	int Constant18 = -1;
	int Constant19 = (0);
	int Constant20 = 0;
	int Constant21 = (0);
	int Constant22 = (0);
	float NiagaraScript_230_Particle_Particle_ScriptUsage4_EvaluationType_NewEnumerator0_FixedRandomSeed_false_OverrideSeed_false_RandomnessMode_NewEnumerator0_Func_Output_RandomFloat;
	bool NiagaraScript_230_Particle_Particle_ScriptUsage4_EvaluationType_NewEnumerator0_FixedRandomSeed_false_OverrideSeed_false_RandomnessMode_NewEnumerator0_Func_Output_IsDeterministic;
	NiagaraScript_230_Particle_Particle_ScriptUsage4_EvaluationType_NewEnumerator0_FixedRandomSeed_false_OverrideSeed_false_RandomnessMode_NewEnumerator0_Func_(Constant15, Constant16, Constant17, Constant18, Constant19, Constant20, Constant21, Constant22, NiagaraScript_230_Particle_Particle_ScriptUsage4_EvaluationType_NewEnumerator0_FixedRandomSeed_false_OverrideSeed_false_RandomnessMode_NewEnumerator0_Func_Output_RandomFloat, NiagaraScript_230_Particle_Particle_ScriptUsage4_EvaluationType_NewEnumerator0_FixedRandomSeed_false_OverrideSeed_false_RandomnessMode_NewEnumerator0_Func_Output_IsDeterministic, Context);
	Context.MapSpawn.InitializeParticle.MaterialRandom = NiagaraScript_230_Particle_Particle_ScriptUsage4_EvaluationType_NewEnumerator0_FixedRandomSeed_false_OverrideSeed_false_RandomnessMode_NewEnumerator0_Func_Output_RandomFloat;
	int Constant24 = 0;
	Context.MapSpawn.InitializeParticle.PositionOffsetCoordinateSpace = Constant24;
	Context.MapSpawn.Particles.RibbonUVDistance = Context.MapSpawn.Emitter.DistanceTraveled;
	EnterStatScope(1 );
	InitializeParticle_Emitter_Func_(Context);
	ExitStatScope();
	int ReturnParticleIDAttributes_Emitter_Func_Output_INT;
	ReturnParticleIDAttributes_Emitter_Func_(ReturnParticleIDAttributes_Emitter_Func_Output_INT, Context);
	Context.MapSpawn.Multiply_FloatByInt.Integer = ReturnParticleIDAttributes_Emitter_Func_Output_INT;
	float Multiply_FloatByInt_Emitter_Func_Output_Result;
	Multiply_FloatByInt_Emitter_Func_(Multiply_FloatByInt_Emitter_Func_Output_Result, Context);
	Context.MapSpawn.ShapeLocation.UPosition = Multiply_FloatByInt_Emitter_Func_Output_Result;
	Context.MapSpawn.ShapeLocation.ApplyOwnerScale = Context.MapSpawn.Engine.Owner.Scale;
	int Constant27 = 0;
	Context.MapSpawn.ShapeLocation.OffsetCoordinateSpace = Constant27;
	bool Constant28 = false;
	int Constant29 = 2;
	Context.MapSpawn.ShapeLocation.RotationCoordinateSpace = Constant29;
	Context.MapSpawn.ShapeLocation.RotationQuaternion = Context.MapSpawn.Engine.Owner.Rotation;
	bool Constant30 = false;
	Context.MapSpawn.ShapeLocation.InvertRotationQuaternion = Constant30;
	Context.MapSpawn.ShapeLocation.RotationMatrix = Context.MapSpawn.Engine.Owner.SystemLocalToWorldNoScale;
	Context.MapSpawn.ShapeLocation.ShapeOrigin = Context.MapSpawn.Particles.Position;
	EnterStatScope(2 );
	ShapeLocation_Emitter_Func_(Context);
	ExitStatScope();
	


	
	HandlePreviousValuesForSpawn(Context);
	
	Context.MapSpawn.Particles.Initial.SpriteSize = Context.MapSpawn.Particles.SpriteSize;

	Context.MapSpawn.Particles.Initial.Color = Context.MapSpawn.Particles.Color;

	


}


void SimulateMapUpdate(inout FSimulationContext Context)
{
	
	RandomCounterDeterministic = 0;
	bool Constant64 = true;
	Context.MapUpdate.DataInstance.Alive = Constant64;
	Context.MapUpdate.ParticleState.DeltaTime = Context.MapUpdate.Engine.DeltaTime;
	Context.MapUpdate.ParticleState.Lifetime = Context.MapUpdate.Particles.Lifetime;
	EnterStatScope(3 );
	ParticleState_Emitter_Func_(Context);
	ExitStatScope();
	Context.MapUpdate.ScaleSpriteSize.UniformCurveIndex = Context.MapUpdate.Emitter.SpawnRate.SpawnRemainder;
	Context.MapUpdate.ScaleSpriteSize.InitialSpriteSize = Context.MapUpdate.Particles.Initial.SpriteSize;
	float2 Constant69 = float2(1,1);
	Context.MapUpdate.Transient.SpriteSizeScaleFactor = Constant69;
	EnterStatScope(4 );
	ScaleSpriteSize_Emitter_Func_(Context);
	ExitStatScope();
	Context.MapUpdate.FloatFromCurve.CurveIndex = Context.MapUpdate.Particles.NormalizedAge;
	float FloatFromCurve_Emitter_Func_Output_Value;
	FloatFromCurve_Emitter_Func_(FloatFromCurve_Emitter_Func_Output_Value, Context);
	Context.MapUpdate.ScaleColor.ScaleAlpha = FloatFromCurve_Emitter_Func_Output_Value;
	Context.MapUpdate.ScaleColor.ColorValueToScale = Context.MapUpdate.Particles.Initial.Color;
	float4 Constant70 = float4(1,1,1,1);
	Context.MapUpdate.Transient.ParticleColorScaleFactor = Constant70;
	EnterStatScope(5 );
	ScaleColor_Emitter_Func_(Context);
	ExitStatScope();
	Context.MapUpdate.Transient.PhysicsDeltaTime = Context.MapUpdate.Engine.DeltaTime;
	Context.MapUpdate.SolveForcesAndVelocity.DeltaTime = Context.MapUpdate.Transient.PhysicsDeltaTime;
	float3 Constant71 = float3(0,0,0);
	Context.MapUpdate.Transient.PhysicsForce = Constant71;
	Context.MapUpdate.SolveForcesAndVelocity.Force = Context.MapUpdate.Transient.PhysicsForce;
	Context.MapUpdate.SolveForcesAndVelocity.Velocity = Context.MapUpdate.Particles.Velocity;
	Context.MapUpdate.SolveForcesAndVelocity.Mass = Context.MapUpdate.Particles.Mass;
	Context.MapUpdate.SolveForcesAndVelocity.Position = Context.MapUpdate.Particles.Position;
	float3 Constant72 = float3(0,0,0);
	Context.MapUpdate.Transient.AdvectionVelocity = Constant72;
	float Constant73 = 0;
	Context.MapUpdate.Transient.PhysicsDrag = Constant73;
	bool Constant74 = true;
	Context.MapUpdate.Transient.DragIgnoreMass = Constant74;
	Context.MapUpdate.SolveForcesAndVelocity.PreviousVelocity = Context.MapUpdate.Particles.Previous.Velocity;
	bool Constant75 = true;
	Context.MapUpdate.SolveForcesAndVelocity.WritetoIntrinsicProperties = Constant75;
	EnterStatScope(6 );
	SolveForcesAndVelocity_Emitter_Func_(Context);
	ExitStatScope();
	


}



float			Emitter_ScaleSpriteSize_UniformCurveSpriteScale_MinTime;
float			Emitter_ScaleSpriteSize_UniformCurveSpriteScale_MaxTime;
float			Emitter_ScaleSpriteSize_UniformCurveSpriteScale_InvTimeRange;
uint			Emitter_ScaleSpriteSize_UniformCurveSpriteScale_CurveLUTNumMinusOne;
uint			Emitter_ScaleSpriteSize_UniformCurveSpriteScale_LUTOffset;
Buffer<float>	Emitter_ScaleSpriteSize_UniformCurveSpriteScale_CurveLUT;

void GetCurveLUTIndices_Emitter_ScaleSpriteSize_UniformCurveSpriteScale(float Time, out uint IndexA, out uint IndexB, out float Fraction)
{
	float RemappedTime = saturate((Time - Emitter_ScaleSpriteSize_UniformCurveSpriteScale_MinTime) * Emitter_ScaleSpriteSize_UniformCurveSpriteScale_InvTimeRange) * float(Emitter_ScaleSpriteSize_UniformCurveSpriteScale_CurveLUTNumMinusOne);
	IndexA = floor(RemappedTime);
	IndexB = min(IndexA + 1, Emitter_ScaleSpriteSize_UniformCurveSpriteScale_CurveLUTNumMinusOne);
	Fraction = frac(RemappedTime);
}

float SampleCurveLUT_Emitter_ScaleSpriteSize_UniformCurveSpriteScale(uint index)
{



	return StaticInputFloat[Emitter_ScaleSpriteSize_UniformCurveSpriteScale_LUTOffset + index];

}


void SampleCurve_Emitter_ScaleSpriteSize_UniformCurveSpriteScale(float Time, out float Value)
{
	uint IndexA, IndexB;
	float Fraction;
	GetCurveLUTIndices_Emitter_ScaleSpriteSize_UniformCurveSpriteScale(Time, IndexA, IndexB, Fraction);

	IndexA *= 1;
	IndexB *= 1;

	[unroll]
	for ( int i=0; i < 1; ++i )
	{
		Value = lerp(SampleCurveLUT_Emitter_ScaleSpriteSize_UniformCurveSpriteScale(IndexA + i), SampleCurveLUT_Emitter_ScaleSpriteSize_UniformCurveSpriteScale(IndexB + i), Fraction);
	}
}
#line 1533 "/Engine/Generated/NiagaraEmitterInstance.ush"




float			Emitter_ScaleAlpha_FloatCurve_MinTime;
float			Emitter_ScaleAlpha_FloatCurve_MaxTime;
float			Emitter_ScaleAlpha_FloatCurve_InvTimeRange;
uint			Emitter_ScaleAlpha_FloatCurve_CurveLUTNumMinusOne;
uint			Emitter_ScaleAlpha_FloatCurve_LUTOffset;
Buffer<float>	Emitter_ScaleAlpha_FloatCurve_CurveLUT;

void GetCurveLUTIndices_Emitter_ScaleAlpha_FloatCurve(float Time, out uint IndexA, out uint IndexB, out float Fraction)
{
	float RemappedTime = saturate((Time - Emitter_ScaleAlpha_FloatCurve_MinTime) * Emitter_ScaleAlpha_FloatCurve_InvTimeRange) * float(Emitter_ScaleAlpha_FloatCurve_CurveLUTNumMinusOne);
	IndexA = floor(RemappedTime);
	IndexB = min(IndexA + 1, Emitter_ScaleAlpha_FloatCurve_CurveLUTNumMinusOne);
	Fraction = frac(RemappedTime);
}

float SampleCurveLUT_Emitter_ScaleAlpha_FloatCurve(uint index)
{



	return StaticInputFloat[Emitter_ScaleAlpha_FloatCurve_LUTOffset + index];

}


void SampleCurve_Emitter_ScaleAlpha_FloatCurve(float Time, out float Value)
{
	uint IndexA, IndexB;
	float Fraction;
	GetCurveLUTIndices_Emitter_ScaleAlpha_FloatCurve(Time, IndexA, IndexB, Fraction);

	IndexA *= 1;
	IndexB *= 1;

	[unroll]
	for ( int i=0; i < 1; ++i )
	{
		Value = lerp(SampleCurveLUT_Emitter_ScaleAlpha_FloatCurve(IndexA + i), SampleCurveLUT_Emitter_ScaleAlpha_FloatCurve(IndexB + i), Fraction);
	}
}
#line 1593 "/Engine/Generated/NiagaraEmitterInstance.ush"



	void FastMatrixToQuaternion_FastPathLibrary(float4x4 Mat, out float4 Quat)
	{
		float tr = Mat[0][0] + Mat[1][1] + Mat[2][2];
		if (tr > 0.0f)
		{
			float InvS = rsqrt(tr + 1.f);
			float s = 0.5f * InvS;

			Quat.x = (Mat[1][2] - Mat[2][1]) * s;
			Quat.y = (Mat[2][0] - Mat[0][2]) * s;
			Quat.z = (Mat[0][1] - Mat[1][0]) * s;
			Quat.w = 0.5f * rcp(InvS);
		}
		else if ( (Mat[0][0] > Mat[1][1]) && (Mat[0][0] > Mat[2][2]) )
		{
			float s = Mat[0][0] - Mat[1][1] - Mat[2][2] + 1.0f;
			float InvS = rsqrt(s);
			s = 0.5f * InvS;

			Quat.x = 0.5f * rcp(InvS);
			Quat.y = (Mat[0][1] + Mat[1][0]) * s;
			Quat.z = (Mat[0][2] + Mat[2][0]) * s;
			Quat.w = (Mat[1][2] - Mat[2][1]) * s;
		}
		else if ( Mat[1][1] > Mat[2][2] )
		{
			float s = Mat[1][1] - Mat[2][2] - Mat[0][0] + 1.0f;
			float InvS = rsqrt(s);
			s = 0.5f * InvS;

			Quat.x = (Mat[1][0] + Mat[0][1]) * s;
			Quat.y = 0.5f * rcp(InvS);
			Quat.z = (Mat[1][2] + Mat[2][1]) * s;
			Quat.w = (Mat[2][0] - Mat[0][2]) * s;

		}
		else
		{
			float s = Mat[2][2] - Mat[0][0] - Mat[1][1] + 1.0f;
			float InvS = rsqrt(s);
			s = 0.5f * InvS;

			Quat.x = (Mat[2][0] + Mat[0][2]) * s;
			Quat.y = (Mat[2][1] + Mat[1][2]) * s;
			Quat.z = 0.5f * rcp(InvS);
			Quat.w = (Mat[0][1] - Mat[1][0]) * s;
		}
	}
void InitConstants(inout FSimulationContext Context)
{

	Context.MapSpawn.Emitter.DistanceTraveled = Emitter_DistanceTraveled;
	Context.MapSpawn.Engine.Owner.Position = Engine_Owner_Position;
	Context.MapSpawn.Engine.Owner.Scale = Engine_Owner_Scale;
	Context.MapSpawn.Engine.Owner.SystemLocalToWorld = Engine_Owner_SystemLocalToWorld;
	Context.MapSpawn.Engine.Owner.SystemWorldToLocal = Engine_Owner_SystemWorldToLocal;
	Context.MapSpawn.Engine.Owner.SystemLocalToWorldNoScale = Engine_Owner_SystemLocalToWorldNoScale;
	Context.MapSpawn.Engine.Owner.SystemWorldToLocalNoScale = Engine_Owner_SystemWorldToLocalNoScale;
	Context.MapSpawn.Engine.Owner.Rotation = Engine_Owner_Rotation;
	Context.MapSpawn.Engine.Owner.SystemXAxis = Engine_Owner_SystemXAxis;
	Context.MapSpawn.Engine.Owner.SystemYAxis = Engine_Owner_SystemYAxis;
	Context.MapSpawn.Engine.Owner.SystemZAxis = Engine_Owner_SystemZAxis;


	Context.MapUpdate.Engine.DeltaTime = Engine_DeltaTime;
	Context.MapUpdate.Emitter.SpawnRate.SpawnRemainder = Emitter_SpawnRate_SpawnRemainder;
	Context.MapUpdate.Engine.Owner.Position = Engine_Owner_Position;
	Context.MapUpdate.Engine.Time = Engine_Time;
	Context.MapUpdate.Engine.WorldDeltaTime = Engine_WorldDeltaTime;
	Context.MapUpdate.Engine.InverseDeltaTime = Engine_InverseDeltaTime;
	Context.MapUpdate.Engine.ExecutionCount = Engine_ExecutionCount;
	Context.MapUpdate.Emitter.SpawnRate = Emitter_SpawnRate;
	Context.MapUpdate.Engine.Emitter.TotalSpawnedParticles = Engine_Emitter_TotalSpawnedParticles;
	Context.MapUpdate.Emitter.RandomSeed = Emitter_RandomSeed;
	Context.MapUpdate.Engine.Emitter.InstanceSeed = Engine_Emitter_InstanceSeed;
	Context.MapUpdate.Engine.System.RandomSeed = Engine_System_RandomSeed;

}

void InitSpawnVariables(inout FSimulationContext Context)
{

	Context.MapSpawn.Particles.Age = 0.0f;
	Context.MapSpawn.Particles.Color.r = 0.0f;
	Context.MapSpawn.Particles.Color.g = 0.0f;
	Context.MapSpawn.Particles.Color.b = 0.0f;
	Context.MapSpawn.Particles.Color.a = 0.0f;
	Context.MapSpawn.Particles.DistanceTraveled = 0.0f;
	Context.MapSpawn.Particles.Initial.Color.r = 0.0f;
	Context.MapSpawn.Particles.Initial.Color.g = 0.0f;
	Context.MapSpawn.Particles.Initial.Color.b = 0.0f;
	Context.MapSpawn.Particles.Initial.Color.a = 0.0f;
	Context.MapSpawn.Particles.Initial.SpriteSize.x = 0.0f;
	Context.MapSpawn.Particles.Initial.SpriteSize.y = 0.0f;
	Context.MapSpawn.Particles.Lifetime = 0.0f;
	Context.MapSpawn.Particles.Mass = 0.0f;
	Context.MapSpawn.Particles.MaterialRandom = 0.0f;
	Context.MapSpawn.Particles.NormalizedAge = 0.0f;
	Context.MapSpawn.Particles.Position.x = 0.0f;
	Context.MapSpawn.Particles.Position.y = 0.0f;
	Context.MapSpawn.Particles.Position.z = 0.0f;
	Context.MapSpawn.Particles.Presolve.PhysicsForce.x = 0.0f;
	Context.MapSpawn.Particles.Presolve.PhysicsForce.y = 0.0f;
	Context.MapSpawn.Particles.Presolve.PhysicsForce.z = 0.0f;
	Context.MapSpawn.Particles.Presolve.Position.x = 0.0f;
	Context.MapSpawn.Particles.Presolve.Position.y = 0.0f;
	Context.MapSpawn.Particles.Presolve.Position.z = 0.0f;
	Context.MapSpawn.Particles.Presolve.Velocity.x = 0.0f;
	Context.MapSpawn.Particles.Presolve.Velocity.y = 0.0f;
	Context.MapSpawn.Particles.Presolve.Velocity.z = 0.0f;
	Context.MapSpawn.Particles.Previous.Position.x = 0.0f;
	Context.MapSpawn.Particles.Previous.Position.y = 0.0f;
	Context.MapSpawn.Particles.Previous.Position.z = 0.0f;
	Context.MapSpawn.Particles.Previous.SpriteSize.x = 0.0f;
	Context.MapSpawn.Particles.Previous.SpriteSize.y = 0.0f;
	Context.MapSpawn.Particles.Previous.Velocity.x = 0.0f;
	Context.MapSpawn.Particles.Previous.Velocity.y = 0.0f;
	Context.MapSpawn.Particles.Previous.Velocity.z = 0.0f;
	Context.MapSpawn.Particles.RibbonUVDistance = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeBitangent.x = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeBitangent.y = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeBitangent.z = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeNormal.x = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeNormal.y = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeNormal.z = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapePosition.x = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapePosition.y = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapePosition.z = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeTangent.x = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeTangent.y = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeTangent.z = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeVector.x = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeVector.y = 0.0f;
	Context.MapSpawn.Particles.ShapeLocation.ShapeVector.z = 0.0f;
	Context.MapSpawn.Particles.SpriteSize.x = 0.0f;
	Context.MapSpawn.Particles.SpriteSize.y = 0.0f;
	Context.MapSpawn.Particles.UniqueID = 0;
	Context.MapSpawn.Particles.Velocity.x = 0.0f;
	Context.MapSpawn.Particles.Velocity.y = 0.0f;
	Context.MapSpawn.Particles.Velocity.z = 0.0f;

	Context.MapSpawn.DataInstance.Alive=true;

}

void LoadUpdateVariables(inout FSimulationContext Context, int InstanceIdx)
{

		Context.MapUpdate.Array.Age = 0;
		Context.MapUpdate.Particles.Age = InputDataFloat(0, 0, InstanceIdx);
		Context.MapUpdate.Array.Color = 1;
		Context.MapUpdate.Particles.Color.r = InputDataFloat(0, 1, InstanceIdx);
		Context.MapUpdate.Particles.Color.g = InputDataFloat(0, 2, InstanceIdx);
		Context.MapUpdate.Particles.Color.b = InputDataFloat(0, 3, InstanceIdx);
		Context.MapUpdate.Particles.Color.a = InputDataFloat(0, 4, InstanceIdx);
		Context.MapUpdate.Array.DistanceTraveled = 5;
		Context.MapUpdate.Particles.DistanceTraveled = InputDataFloat(0, 5, InstanceIdx);
		Context.MapUpdate.Array.Initial.Color = 6;
		Context.MapUpdate.Particles.Initial.Color.r = InputDataFloat(0, 6, InstanceIdx);
		Context.MapUpdate.Particles.Initial.Color.g = InputDataFloat(0, 7, InstanceIdx);
		Context.MapUpdate.Particles.Initial.Color.b = InputDataFloat(0, 8, InstanceIdx);
		Context.MapUpdate.Particles.Initial.Color.a = InputDataFloat(0, 9, InstanceIdx);
		Context.MapUpdate.Array.Initial.SpriteSize = 10;
		Context.MapUpdate.Particles.Initial.SpriteSize.x = InputDataFloat(0, 10, InstanceIdx);
		Context.MapUpdate.Particles.Initial.SpriteSize.y = InputDataFloat(0, 11, InstanceIdx);
		Context.MapUpdate.Array.Lifetime = 12;
		Context.MapUpdate.Particles.Lifetime = InputDataFloat(0, 12, InstanceIdx);
		Context.MapUpdate.Array.Mass = 13;
		Context.MapUpdate.Particles.Mass = InputDataFloat(0, 13, InstanceIdx);
		Context.MapUpdate.Array.MaterialRandom = 14;
		Context.MapUpdate.Particles.MaterialRandom = InputDataFloat(0, 14, InstanceIdx);
		Context.MapUpdate.Array.NormalizedAge = 15;
		Context.MapUpdate.Particles.NormalizedAge = InputDataFloat(0, 15, InstanceIdx);
		Context.MapUpdate.Array.Position = 16;
		Context.MapUpdate.Particles.Position.x = InputDataFloat(0, 16, InstanceIdx);
		Context.MapUpdate.Particles.Position.y = InputDataFloat(0, 17, InstanceIdx);
		Context.MapUpdate.Particles.Position.z = InputDataFloat(0, 18, InstanceIdx);
		Context.MapUpdate.Array.Presolve.PhysicsForce = 19;
		Context.MapUpdate.Particles.Presolve.PhysicsForce.x = InputDataFloat(0, 19, InstanceIdx);
		Context.MapUpdate.Particles.Presolve.PhysicsForce.y = InputDataFloat(0, 20, InstanceIdx);
		Context.MapUpdate.Particles.Presolve.PhysicsForce.z = InputDataFloat(0, 21, InstanceIdx);
		Context.MapUpdate.Array.Presolve.Position = 22;
		Context.MapUpdate.Particles.Presolve.Position.x = InputDataFloat(0, 22, InstanceIdx);
		Context.MapUpdate.Particles.Presolve.Position.y = InputDataFloat(0, 23, InstanceIdx);
		Context.MapUpdate.Particles.Presolve.Position.z = InputDataFloat(0, 24, InstanceIdx);
		Context.MapUpdate.Array.Presolve.Velocity = 25;
		Context.MapUpdate.Particles.Presolve.Velocity.x = InputDataFloat(0, 25, InstanceIdx);
		Context.MapUpdate.Particles.Presolve.Velocity.y = InputDataFloat(0, 26, InstanceIdx);
		Context.MapUpdate.Particles.Presolve.Velocity.z = InputDataFloat(0, 27, InstanceIdx);
		Context.MapUpdate.Array.RibbonUVDistance = 36;
		Context.MapUpdate.Particles.RibbonUVDistance = InputDataFloat(0, 36, InstanceIdx);
		Context.MapUpdate.Array.ShapeLocation.ShapeBitangent = 37;
		Context.MapUpdate.Particles.ShapeLocation.ShapeBitangent.x = InputDataFloat(0, 37, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapeBitangent.y = InputDataFloat(0, 38, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapeBitangent.z = InputDataFloat(0, 39, InstanceIdx);
		Context.MapUpdate.Array.ShapeLocation.ShapeNormal = 40;
		Context.MapUpdate.Particles.ShapeLocation.ShapeNormal.x = InputDataFloat(0, 40, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapeNormal.y = InputDataFloat(0, 41, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapeNormal.z = InputDataFloat(0, 42, InstanceIdx);
		Context.MapUpdate.Array.ShapeLocation.ShapePosition = 43;
		Context.MapUpdate.Particles.ShapeLocation.ShapePosition.x = InputDataFloat(0, 43, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapePosition.y = InputDataFloat(0, 44, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapePosition.z = InputDataFloat(0, 45, InstanceIdx);
		Context.MapUpdate.Array.ShapeLocation.ShapeTangent = 46;
		Context.MapUpdate.Particles.ShapeLocation.ShapeTangent.x = InputDataFloat(0, 46, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapeTangent.y = InputDataFloat(0, 47, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapeTangent.z = InputDataFloat(0, 48, InstanceIdx);
		Context.MapUpdate.Array.ShapeLocation.ShapeVector = 49;
		Context.MapUpdate.Particles.ShapeLocation.ShapeVector.x = InputDataFloat(0, 49, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapeVector.y = InputDataFloat(0, 50, InstanceIdx);
		Context.MapUpdate.Particles.ShapeLocation.ShapeVector.z = InputDataFloat(0, 51, InstanceIdx);
		Context.MapUpdate.Array.SpriteSize = 52;
		Context.MapUpdate.Particles.SpriteSize.x = InputDataFloat(0, 52, InstanceIdx);
		Context.MapUpdate.Particles.SpriteSize.y = InputDataFloat(0, 53, InstanceIdx);
		Context.MapUpdate.Array.UniqueID = 0;
		Context.MapUpdate.Particles.UniqueID = InputDataInt(0, 0, InstanceIdx);
		Context.MapUpdate.Array.Velocity = 54;
		Context.MapUpdate.Particles.Velocity.x = InputDataFloat(0, 54, InstanceIdx);
		Context.MapUpdate.Particles.Velocity.y = InputDataFloat(0, 55, InstanceIdx);
		Context.MapUpdate.Particles.Velocity.z = InputDataFloat(0, 56, InstanceIdx);
		Context.MapUpdate.Particles.Previous.Position = 		Context.MapUpdate.Particles.Position;
		Context.MapUpdate.Particles.Previous.SpriteSize = 		Context.MapUpdate.Particles.SpriteSize;
		Context.MapUpdate.Particles.Previous.Velocity = 		Context.MapUpdate.Particles.Velocity;
		Context.MapUpdate.DataInstance.Alive=true;

}

void ConditionalInterpolateParameters(inout FSimulationContext Context)
{
	InterpolateParameters(Context);
}

void TransferAttributes(inout FSimulationContext Context)
{

		Context.MapUpdate.Particles = Context.MapSpawn.Particles;
		Context.MapUpdate.DataInstance.Alive = true;
		Context.MapUpdate.Particles.Previous.Velocity = Context.MapSpawn.Particles.Velocity;
		Context.MapUpdate.Particles.Previous.Position = Context.MapSpawn.Particles.Position;

}

void StoreUpdateVariables(in FSimulationContext Context, bool bIsValidInstance)
{

		const bool bValid = bIsValidInstance && Context.MapUpdate.DataInstance.Alive;
		const int WriteIndex = OutputIndex(0, true, bValid);
		if (bValid)
		{
			OutputDataFloat(0, 0, WriteIndex, Context.MapUpdate.Particles.Age);
			OutputDataFloat(0, 1, WriteIndex, Context.MapUpdate.Particles.Color.r);
			OutputDataFloat(0, 2, WriteIndex, Context.MapUpdate.Particles.Color.g);
			OutputDataFloat(0, 3, WriteIndex, Context.MapUpdate.Particles.Color.b);
			OutputDataFloat(0, 4, WriteIndex, Context.MapUpdate.Particles.Color.a);
			OutputDataFloat(0, 5, WriteIndex, Context.MapUpdate.Particles.DistanceTraveled);
			OutputDataFloat(0, 6, WriteIndex, Context.MapUpdate.Particles.Initial.Color.r);
			OutputDataFloat(0, 7, WriteIndex, Context.MapUpdate.Particles.Initial.Color.g);
			OutputDataFloat(0, 8, WriteIndex, Context.MapUpdate.Particles.Initial.Color.b);
			OutputDataFloat(0, 9, WriteIndex, Context.MapUpdate.Particles.Initial.Color.a);
			OutputDataFloat(0, 10, WriteIndex, Context.MapUpdate.Particles.Initial.SpriteSize.x);
			OutputDataFloat(0, 11, WriteIndex, Context.MapUpdate.Particles.Initial.SpriteSize.y);
			OutputDataFloat(0, 12, WriteIndex, Context.MapUpdate.Particles.Lifetime);
			OutputDataFloat(0, 13, WriteIndex, Context.MapUpdate.Particles.Mass);
			OutputDataFloat(0, 14, WriteIndex, Context.MapUpdate.Particles.MaterialRandom);
			OutputDataFloat(0, 15, WriteIndex, Context.MapUpdate.Particles.NormalizedAge);
			OutputDataFloat(0, 16, WriteIndex, Context.MapUpdate.Particles.Position.x);
			OutputDataFloat(0, 17, WriteIndex, Context.MapUpdate.Particles.Position.y);
			OutputDataFloat(0, 18, WriteIndex, Context.MapUpdate.Particles.Position.z);
			OutputDataFloat(0, 19, WriteIndex, Context.MapUpdate.Particles.Presolve.PhysicsForce.x);
			OutputDataFloat(0, 20, WriteIndex, Context.MapUpdate.Particles.Presolve.PhysicsForce.y);
			OutputDataFloat(0, 21, WriteIndex, Context.MapUpdate.Particles.Presolve.PhysicsForce.z);
			OutputDataFloat(0, 22, WriteIndex, Context.MapUpdate.Particles.Presolve.Position.x);
			OutputDataFloat(0, 23, WriteIndex, Context.MapUpdate.Particles.Presolve.Position.y);
			OutputDataFloat(0, 24, WriteIndex, Context.MapUpdate.Particles.Presolve.Position.z);
			OutputDataFloat(0, 25, WriteIndex, Context.MapUpdate.Particles.Presolve.Velocity.x);
			OutputDataFloat(0, 26, WriteIndex, Context.MapUpdate.Particles.Presolve.Velocity.y);
			OutputDataFloat(0, 27, WriteIndex, Context.MapUpdate.Particles.Presolve.Velocity.z);
			OutputDataFloat(0, 28, WriteIndex, Context.MapUpdate.Particles.Previous.Position.x);
			OutputDataFloat(0, 29, WriteIndex, Context.MapUpdate.Particles.Previous.Position.y);
			OutputDataFloat(0, 30, WriteIndex, Context.MapUpdate.Particles.Previous.Position.z);
			OutputDataFloat(0, 31, WriteIndex, Context.MapUpdate.Particles.Previous.SpriteSize.x);
			OutputDataFloat(0, 32, WriteIndex, Context.MapUpdate.Particles.Previous.SpriteSize.y);
			OutputDataFloat(0, 33, WriteIndex, Context.MapUpdate.Particles.Previous.Velocity.x);
			OutputDataFloat(0, 34, WriteIndex, Context.MapUpdate.Particles.Previous.Velocity.y);
			OutputDataFloat(0, 35, WriteIndex, Context.MapUpdate.Particles.Previous.Velocity.z);
			OutputDataFloat(0, 36, WriteIndex, Context.MapUpdate.Particles.RibbonUVDistance);
			OutputDataFloat(0, 37, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeBitangent.x);
			OutputDataFloat(0, 38, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeBitangent.y);
			OutputDataFloat(0, 39, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeBitangent.z);
			OutputDataFloat(0, 40, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeNormal.x);
			OutputDataFloat(0, 41, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeNormal.y);
			OutputDataFloat(0, 42, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeNormal.z);
			OutputDataFloat(0, 43, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapePosition.x);
			OutputDataFloat(0, 44, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapePosition.y);
			OutputDataFloat(0, 45, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapePosition.z);
			OutputDataFloat(0, 46, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeTangent.x);
			OutputDataFloat(0, 47, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeTangent.y);
			OutputDataFloat(0, 48, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeTangent.z);
			OutputDataFloat(0, 49, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeVector.x);
			OutputDataFloat(0, 50, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeVector.y);
			OutputDataFloat(0, 51, WriteIndex, Context.MapUpdate.Particles.ShapeLocation.ShapeVector.z);
			OutputDataFloat(0, 52, WriteIndex, Context.MapUpdate.Particles.SpriteSize.x);
			OutputDataFloat(0, 53, WriteIndex, Context.MapUpdate.Particles.SpriteSize.y);
			OutputDataInt(0, 0, WriteIndex, Context.MapUpdate.Particles.UniqueID);
			OutputDataFloat(0, 54, WriteIndex, Context.MapUpdate.Particles.Velocity.x);
			OutputDataFloat(0, 55, WriteIndex, Context.MapUpdate.Particles.Velocity.y);
			OutputDataFloat(0, 56, WriteIndex, Context.MapUpdate.Particles.Velocity.z);
		}


}

void CopyInstance(in int InstanceIdx)
{
	
}






[numthreads(64, 1, 1)]
void SimulateMainComputeCS(
	uint3 InDispatchThreadId	: SV_DispatchThreadID,
	uint3 InGroupId				: SV_GroupID,
	uint3 InGroupThreadId		: SV_GroupThreadID,
	uint  InGroupIndex			: SV_GroupIndex)
{
	GDispatchThreadId	= InDispatchThreadId;
	GGroupId			= InGroupId;
	GGroupThreadId		= InGroupThreadId;
	GGroupIndex			= InGroupIndex;
	GEmitterTickCounter = EmitterTickCounter;
	GRandomSeedOffset = 0;











	GLinearThreadId		= GDispatchThreadId.x + (GDispatchThreadId.y * DispatchThreadIdToLinear.y);
	




	bool bRunSpawnUpdateLogic = true;
	if (ReadInstanceCountOffset == 0xFFFFFFFF)
	{
		GSpawnStartInstance = 0;
	}
	else
	{
		GSpawnStartInstance = RWInstanceCounts[ReadInstanceCountOffset];
	}
	const uint MaxInstances = GSpawnStartInstance + NumSpawnedInstances;
	const bool bRunUpdateLogic = bRunSpawnUpdateLogic && GLinearThreadId < GSpawnStartInstance && GLinearThreadId < MaxInstances;
	const bool bRunSpawnLogic = bRunSpawnUpdateLogic && GLinearThreadId >= GSpawnStartInstance && GLinearThreadId < MaxInstances;
	
	const float RandomSeedInitialisation = NiagaraInternalNoise(GLinearThreadId * 16384, 0 * 8196, (bRunUpdateLogic ? 4096 : 0) + EmitterTickCounter);	
	
	FSimulationContext Context = (FSimulationContext)0;
	[branch]
	if (bRunUpdateLogic)
	{
		SetupExecIndexForGPU();
		InitConstants(Context);
		LoadUpdateVariables(Context, GLinearThreadId);
		ReadDataSets(Context);
	}
	else if (bRunSpawnLogic)
	{
		SetupExecIndexAndSpawnInfoForGPU();
		InitConstants(Context);
		InitSpawnVariables(Context);
		ReadDataSets(Context);
		Context.MapSpawn.Particles.UniqueID = Engine_Emitter_TotalSpawnedParticles + ExecIndex();
		ConditionalInterpolateParameters(Context);
		SimulateMapSpawn(Context);
		TransferAttributes(Context);
	}

	if (bRunUpdateLogic || bRunSpawnLogic)
	{
		SimulateMapUpdate(Context);
		WriteDataSets(Context);
	}

	StoreUpdateVariables(Context, bRunUpdateLogic || bRunSpawnLogic);


}
#line 845 "/Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.usf"



#if 0 /*BEGIN_RESOURCE_TABLES*/
View, 387453108
Strata, 158337041
DrawRectangleParameters, 3145984
InstancedView, 446694145
MobileSceneTextures, 11010716
SceneTexturesStruct, 158928480
StrataPublic, 1048841
NULL, 0
View_MaterialTextureBilinearWrapedSampler, View, 8, 0
View_MaterialTextureBilinearClampedSampler, View, 8, 1
View_VolumetricLightmapIndirectionTexture, View, 5, 2
View_VolumetricLightmapBrickAmbientVector, View, 5, 3
View_VolumetricLightmapBrickSHCoefficients0, View, 5, 4
View_VolumetricLightmapBrickSHCoefficients1, View, 5, 5
View_VolumetricLightmapBrickSHCoefficients2, View, 5, 6
View_VolumetricLightmapBrickSHCoefficients3, View, 5, 7
View_VolumetricLightmapBrickSHCoefficients4, View, 5, 8
View_VolumetricLightmapBrickSHCoefficients5, View, 5, 9
View_SkyBentNormalBrickTexture, View, 5, 10
View_DirectionalLightShadowingBrickTexture, View, 5, 11
View_VolumetricLightmapBrickAmbientVectorSampler, View, 8, 12
View_VolumetricLightmapTextureSampler0, View, 8, 13
View_VolumetricLightmapTextureSampler1, View, 8, 14
View_VolumetricLightmapTextureSampler2, View, 8, 15
View_VolumetricLightmapTextureSampler3, View, 8, 16
View_VolumetricLightmapTextureSampler4, View, 8, 17
View_VolumetricLightmapTextureSampler5, View, 8, 18
View_SkyBentNormalTextureSampler, View, 8, 19
View_DirectionalLightShadowingTextureSampler, View, 8, 20
View_GlobalDistanceFieldPageAtlasTexture, View, 5, 21
View_GlobalDistanceFieldCoverageAtlasTexture, View, 5, 22
View_GlobalDistanceFieldPageTableTexture, View, 5, 23
View_GlobalDistanceFieldMipTexture, View, 5, 24
View_AtmosphereTransmittanceTexture, View, 5, 25
View_AtmosphereTransmittanceTextureSampler, View, 8, 26
View_AtmosphereIrradianceTexture, View, 5, 27
View_AtmosphereIrradianceTextureSampler, View, 8, 28
View_AtmosphereInscatterTexture, View, 5, 29
View_AtmosphereInscatterTextureSampler, View, 8, 30
View_PerlinNoiseGradientTexture, View, 5, 31
View_PerlinNoiseGradientTextureSampler, View, 8, 32
View_PerlinNoise3DTexture, View, 5, 33
View_PerlinNoise3DTextureSampler, View, 8, 34
View_SobolSamplingTexture, View, 5, 35
View_SharedPointWrappedSampler, View, 8, 36
View_SharedPointClampedSampler, View, 8, 37
View_SharedBilinearWrappedSampler, View, 8, 38
View_SharedBilinearClampedSampler, View, 8, 39
View_SharedBilinearAnisoClampedSampler, View, 8, 40
View_SharedTrilinearWrappedSampler, View, 8, 41
View_SharedTrilinearClampedSampler, View, 8, 42
View_PreIntegratedBRDF, View, 5, 43
View_PreIntegratedBRDFSampler, View, 8, 44
View_PrimitiveSceneData, View, 6, 45
View_InstanceSceneData, View, 6, 46
View_InstancePayloadData, View, 6, 47
View_LightmapSceneData, View, 6, 48
View_SkyIrradianceEnvironmentMap, View, 6, 49
View_TransmittanceLutTexture, View, 5, 50
View_TransmittanceLutTextureSampler, View, 8, 51
View_SkyViewLutTexture, View, 5, 52
View_SkyViewLutTextureSampler, View, 8, 53
View_DistantSkyLightLutTexture, View, 5, 54
View_DistantSkyLightLutTextureSampler, View, 8, 55
View_CameraAerialPerspectiveVolume, View, 5, 56
View_CameraAerialPerspectiveVolumeSampler, View, 8, 57
View_CameraAerialPerspectiveVolumeMieOnly, View, 5, 58
View_CameraAerialPerspectiveVolumeMieOnlySampler, View, 8, 59
View_CameraAerialPerspectiveVolumeRayOnly, View, 5, 60
View_CameraAerialPerspectiveVolumeRayOnlySampler, View, 8, 61
View_HairScatteringLUTTexture, View, 5, 62
View_HairScatteringLUTSampler, View, 8, 63
View_LTCMatTexture, View, 5, 64
View_LTCMatSampler, View, 8, 65
View_LTCAmpTexture, View, 5, 66
View_LTCAmpSampler, View, 8, 67
View_ShadingEnergyGGXSpecTexture, View, 5, 68
View_ShadingEnergyGGXGlassTexture, View, 5, 69
View_ShadingEnergyClothSpecTexture, View, 5, 70
View_ShadingEnergyDiffuseTexture, View, 5, 71
View_ShadingEnergySampler, View, 8, 72
View_SSProfilesTexture, View, 5, 73
View_SSProfilesSampler, View, 8, 74
View_SSProfilesTransmissionSampler, View, 8, 75
View_SSProfilesPreIntegratedTexture, View, 5, 76
View_SSProfilesPreIntegratedSampler, View, 8, 77
View_WaterIndirection, View, 6, 78
View_WaterData, View, 6, 79
View_RectLightAtlasTexture, View, 5, 80
View_RectLightAtlasSampler, View, 8, 81
View_IESAtlasTexture, View, 5, 82
View_IESAtlasSampler, View, 8, 83
View_LandscapeWeightmapSampler, View, 8, 84
View_LandscapeIndirection, View, 6, 85
View_LandscapePerComponentData, View, 6, 86
View_VTFeedbackBuffer, View, 7, 87
View_EditorVisualizeLevelInstanceIds, View, 6, 88
View_EditorSelectedHitProxyIds, View, 6, 89
View_PhysicsFieldClipmapBuffer, View, 6, 90
Strata_MaterialTextureArray, Strata, 9, 0
Strata_TopLayerTexture, Strata, 9, 1
Strata_OpaqueRoughRefractionTexture, Strata, 9, 2
Strata_BSDFOffsetTexture, Strata, 9, 3
Strata_BSDFTileTexture, Strata, 9, 4
Strata_BSDFTileCountBuffer, Strata, 16, 5
MobileSceneTextures_SceneColorTexture, MobileSceneTextures, 9, 0
MobileSceneTextures_SceneColorTextureSampler, MobileSceneTextures, 8, 1
MobileSceneTextures_SceneDepthTexture, MobileSceneTextures, 9, 2
MobileSceneTextures_SceneDepthTextureSampler, MobileSceneTextures, 8, 3
MobileSceneTextures_CustomDepthTexture, MobileSceneTextures, 9, 4
MobileSceneTextures_CustomDepthTextureSampler, MobileSceneTextures, 8, 5
MobileSceneTextures_CustomStencilTexture, MobileSceneTextures, 12, 6
MobileSceneTextures_SceneVelocityTexture, MobileSceneTextures, 9, 7
MobileSceneTextures_SceneVelocityTextureSampler, MobileSceneTextures, 8, 8
MobileSceneTextures_GBufferATexture, MobileSceneTextures, 9, 9
MobileSceneTextures_GBufferBTexture, MobileSceneTextures, 9, 10
MobileSceneTextures_GBufferCTexture, MobileSceneTextures, 9, 11
MobileSceneTextures_GBufferDTexture, MobileSceneTextures, 9, 12
MobileSceneTextures_SceneDepthAuxTexture, MobileSceneTextures, 9, 13
MobileSceneTextures_GBufferATextureSampler, MobileSceneTextures, 8, 14
MobileSceneTextures_GBufferBTextureSampler, MobileSceneTextures, 8, 15
MobileSceneTextures_GBufferCTextureSampler, MobileSceneTextures, 8, 16
MobileSceneTextures_GBufferDTextureSampler, MobileSceneTextures, 8, 17
MobileSceneTextures_SceneDepthAuxTextureSampler, MobileSceneTextures, 8, 18
SceneTexturesStruct_SceneColorTexture, SceneTexturesStruct, 9, 0
SceneTexturesStruct_SceneDepthTexture, SceneTexturesStruct, 9, 1
SceneTexturesStruct_GBufferATexture, SceneTexturesStruct, 9, 2
SceneTexturesStruct_GBufferBTexture, SceneTexturesStruct, 9, 3
SceneTexturesStruct_GBufferCTexture, SceneTexturesStruct, 9, 4
SceneTexturesStruct_GBufferDTexture, SceneTexturesStruct, 9, 5
SceneTexturesStruct_GBufferETexture, SceneTexturesStruct, 9, 6
SceneTexturesStruct_GBufferFTexture, SceneTexturesStruct, 9, 7
SceneTexturesStruct_GBufferVelocityTexture, SceneTexturesStruct, 9, 8
SceneTexturesStruct_ScreenSpaceAOTexture, SceneTexturesStruct, 9, 9
SceneTexturesStruct_CustomDepthTexture, SceneTexturesStruct, 9, 10
SceneTexturesStruct_CustomStencilTexture, SceneTexturesStruct, 12, 11
SceneTexturesStruct_PointClampSampler, SceneTexturesStruct, 8, 12
StrataPublic_TopLayerTexture, StrataPublic, 9, 0
NULL, NULL, 0, 0
#endif /*END_RESOURCE_TABLES*/
#if 0 /*DIRECT COMPILE*/
-directcompile -format=PCD3D_SM6 -entry=SimulateMainComputeCS -shaderPlatformName=PCD3D_SM6 -cs D:/User/lkjhg/Desktop/particle_test/Saved/ShaderDebugInfo/PCD3D_SM6/Alium_W/Fountain001/ParticleGPUComputeScript/FNiagaraShader/0/NiagaraEmitterInstanceShader.usf -cflags=1052672 -nocrashreports
#endif /*DIRECT COMPILE*/


#if 0 /*BEGIN_RESOURCE_TABLES*/
View, 387453108
Strata, 158337041
DrawRectangleParameters, 3145984
InstancedView, 446694145
MobileSceneTextures, 11010716
SceneTexturesStruct, 158928480
StrataPublic, 1048841
NULL, 0
View_MaterialTextureBilinearWrapedSampler, View, 8, 0
View_MaterialTextureBilinearClampedSampler, View, 8, 1
View_VolumetricLightmapIndirectionTexture, View, 5, 2
View_VolumetricLightmapBrickAmbientVector, View, 5, 3
View_VolumetricLightmapBrickSHCoefficients0, View, 5, 4
View_VolumetricLightmapBrickSHCoefficients1, View, 5, 5
View_VolumetricLightmapBrickSHCoefficients2, View, 5, 6
View_VolumetricLightmapBrickSHCoefficients3, View, 5, 7
View_VolumetricLightmapBrickSHCoefficients4, View, 5, 8
View_VolumetricLightmapBrickSHCoefficients5, View, 5, 9
View_SkyBentNormalBrickTexture, View, 5, 10
View_DirectionalLightShadowingBrickTexture, View, 5, 11
View_VolumetricLightmapBrickAmbientVectorSampler, View, 8, 12
View_VolumetricLightmapTextureSampler0, View, 8, 13
View_VolumetricLightmapTextureSampler1, View, 8, 14
View_VolumetricLightmapTextureSampler2, View, 8, 15
View_VolumetricLightmapTextureSampler3, View, 8, 16
View_VolumetricLightmapTextureSampler4, View, 8, 17
View_VolumetricLightmapTextureSampler5, View, 8, 18
View_SkyBentNormalTextureSampler, View, 8, 19
View_DirectionalLightShadowingTextureSampler, View, 8, 20
View_GlobalDistanceFieldPageAtlasTexture, View, 5, 21
View_GlobalDistanceFieldCoverageAtlasTexture, View, 5, 22
View_GlobalDistanceFieldPageTableTexture, View, 5, 23
View_GlobalDistanceFieldMipTexture, View, 5, 24
View_AtmosphereTransmittanceTexture, View, 5, 25
View_AtmosphereTransmittanceTextureSampler, View, 8, 26
View_AtmosphereIrradianceTexture, View, 5, 27
View_AtmosphereIrradianceTextureSampler, View, 8, 28
View_AtmosphereInscatterTexture, View, 5, 29
View_AtmosphereInscatterTextureSampler, View, 8, 30
View_PerlinNoiseGradientTexture, View, 5, 31
View_PerlinNoiseGradientTextureSampler, View, 8, 32
View_PerlinNoise3DTexture, View, 5, 33
View_PerlinNoise3DTextureSampler, View, 8, 34
View_SobolSamplingTexture, View, 5, 35
View_SharedPointWrappedSampler, View, 8, 36
View_SharedPointClampedSampler, View, 8, 37
View_SharedBilinearWrappedSampler, View, 8, 38
View_SharedBilinearClampedSampler, View, 8, 39
View_SharedBilinearAnisoClampedSampler, View, 8, 40
View_SharedTrilinearWrappedSampler, View, 8, 41
View_SharedTrilinearClampedSampler, View, 8, 42
View_PreIntegratedBRDF, View, 5, 43
View_PreIntegratedBRDFSampler, View, 8, 44
View_PrimitiveSceneData, View, 6, 45
View_InstanceSceneData, View, 6, 46
View_InstancePayloadData, View, 6, 47
View_LightmapSceneData, View, 6, 48
View_SkyIrradianceEnvironmentMap, View, 6, 49
View_TransmittanceLutTexture, View, 5, 50
View_TransmittanceLutTextureSampler, View, 8, 51
View_SkyViewLutTexture, View, 5, 52
View_SkyViewLutTextureSampler, View, 8, 53
View_DistantSkyLightLutTexture, View, 5, 54
View_DistantSkyLightLutTextureSampler, View, 8, 55
View_CameraAerialPerspectiveVolume, View, 5, 56
View_CameraAerialPerspectiveVolumeSampler, View, 8, 57
View_CameraAerialPerspectiveVolumeMieOnly, View, 5, 58
View_CameraAerialPerspectiveVolumeMieOnlySampler, View, 8, 59
View_CameraAerialPerspectiveVolumeRayOnly, View, 5, 60
View_CameraAerialPerspectiveVolumeRayOnlySampler, View, 8, 61
View_HairScatteringLUTTexture, View, 5, 62
View_HairScatteringLUTSampler, View, 8, 63
View_LTCMatTexture, View, 5, 64
View_LTCMatSampler, View, 8, 65
View_LTCAmpTexture, View, 5, 66
View_LTCAmpSampler, View, 8, 67
View_ShadingEnergyGGXSpecTexture, View, 5, 68
View_ShadingEnergyGGXGlassTexture, View, 5, 69
View_ShadingEnergyClothSpecTexture, View, 5, 70
View_ShadingEnergyDiffuseTexture, View, 5, 71
View_ShadingEnergySampler, View, 8, 72
View_SSProfilesTexture, View, 5, 73
View_SSProfilesSampler, View, 8, 74
View_SSProfilesTransmissionSampler, View, 8, 75
View_SSProfilesPreIntegratedTexture, View, 5, 76
View_SSProfilesPreIntegratedSampler, View, 8, 77
View_WaterIndirection, View, 6, 78
View_WaterData, View, 6, 79
View_RectLightAtlasTexture, View, 5, 80
View_RectLightAtlasSampler, View, 8, 81
View_IESAtlasTexture, View, 5, 82
View_IESAtlasSampler, View, 8, 83
View_LandscapeWeightmapSampler, View, 8, 84
View_LandscapeIndirection, View, 6, 85
View_LandscapePerComponentData, View, 6, 86
View_VTFeedbackBuffer, View, 7, 87
View_EditorVisualizeLevelInstanceIds, View, 6, 88
View_EditorSelectedHitProxyIds, View, 6, 89
View_PhysicsFieldClipmapBuffer, View, 6, 90
Strata_MaterialTextureArray, Strata, 9, 0
Strata_TopLayerTexture, Strata, 9, 1
Strata_OpaqueRoughRefractionTexture, Strata, 9, 2
Strata_BSDFOffsetTexture, Strata, 9, 3
Strata_BSDFTileTexture, Strata, 9, 4
Strata_BSDFTileCountBuffer, Strata, 16, 5
MobileSceneTextures_SceneColorTexture, MobileSceneTextures, 9, 0
MobileSceneTextures_SceneColorTextureSampler, MobileSceneTextures, 8, 1
MobileSceneTextures_SceneDepthTexture, MobileSceneTextures, 9, 2
MobileSceneTextures_SceneDepthTextureSampler, MobileSceneTextures, 8, 3
MobileSceneTextures_CustomDepthTexture, MobileSceneTextures, 9, 4
MobileSceneTextures_CustomDepthTextureSampler, MobileSceneTextures, 8, 5
MobileSceneTextures_CustomStencilTexture, MobileSceneTextures, 12, 6
MobileSceneTextures_SceneVelocityTexture, MobileSceneTextures, 9, 7
MobileSceneTextures_SceneVelocityTextureSampler, MobileSceneTextures, 8, 8
MobileSceneTextures_GBufferATexture, MobileSceneTextures, 9, 9
MobileSceneTextures_GBufferBTexture, MobileSceneTextures, 9, 10
MobileSceneTextures_GBufferCTexture, MobileSceneTextures, 9, 11
MobileSceneTextures_GBufferDTexture, MobileSceneTextures, 9, 12
MobileSceneTextures_SceneDepthAuxTexture, MobileSceneTextures, 9, 13
MobileSceneTextures_GBufferATextureSampler, MobileSceneTextures, 8, 14
MobileSceneTextures_GBufferBTextureSampler, MobileSceneTextures, 8, 15
MobileSceneTextures_GBufferCTextureSampler, MobileSceneTextures, 8, 16
MobileSceneTextures_GBufferDTextureSampler, MobileSceneTextures, 8, 17
MobileSceneTextures_SceneDepthAuxTextureSampler, MobileSceneTextures, 8, 18
SceneTexturesStruct_SceneColorTexture, SceneTexturesStruct, 9, 0
SceneTexturesStruct_SceneDepthTexture, SceneTexturesStruct, 9, 1
SceneTexturesStruct_GBufferATexture, SceneTexturesStruct, 9, 2
SceneTexturesStruct_GBufferBTexture, SceneTexturesStruct, 9, 3
SceneTexturesStruct_GBufferCTexture, SceneTexturesStruct, 9, 4
SceneTexturesStruct_GBufferDTexture, SceneTexturesStruct, 9, 5
SceneTexturesStruct_GBufferETexture, SceneTexturesStruct, 9, 6
SceneTexturesStruct_GBufferFTexture, SceneTexturesStruct, 9, 7
SceneTexturesStruct_GBufferVelocityTexture, SceneTexturesStruct, 9, 8
SceneTexturesStruct_ScreenSpaceAOTexture, SceneTexturesStruct, 9, 9
SceneTexturesStruct_CustomDepthTexture, SceneTexturesStruct, 9, 10
SceneTexturesStruct_CustomStencilTexture, SceneTexturesStruct, 12, 11
SceneTexturesStruct_PointClampSampler, SceneTexturesStruct, 8, 12
StrataPublic_TopLayerTexture, StrataPublic, 9, 0
NULL, NULL, 0, 0
#endif /*END_RESOURCE_TABLES*/
#if 0 /*DIRECT COMPILE*/
-directcompile -format=PCD3D_SM6 -entry=SimulateMainComputeCS -shaderPlatformName=PCD3D_SM6 -cs D:/User/lkjhg/Desktop/particle_test/Saved/ShaderDebugInfo/PCD3D_SM6/Alium_W/Fountain001/ParticleGPUComputeScript/FNiagaraShader/0/NiagaraEmitterInstanceShader.usf -cflags=1052672 -nocrashreports
#endif /*DIRECT COMPILE*/
