Files
UnrealEngine/Engine/Shaders/Private/ParticleSimulationCommon.ush
2025-05-18 13:04:45 +08:00

22 lines
551 B
HLSL

// Copyright Epic Games, Inc. All Rights Reserved.
/*=============================================================================
ParticleSimulationCommon.usf: Particle Simulation shared functions and defines.
=============================================================================*/
#pragma once
#include "MortonCode.ush"
float2 GetTilePageOffset(float ZTileIndex, float2 PageScale, bool bResize = true)
{
float2 UV = 0.0f;
if(bResize)
{
uint2 PageOffset = MortonDecode(ZTileIndex);
UV = PageOffset * PageScale;
}
return UV;
}