Files
UnrealEngine/Engine/Shaders/Private/ParticleSimulationCommon.ush
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05: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;
}