Files
UnrealEngineUWP/Engine/Shaders/PostProcessBusyWait.usf
2014-03-14 14:13:41 -04:00

26 lines
721 B
Plaintext

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
PostProcessBusyWait.usf: Post processing busy wait implementation. For Debugging GPU timing.
=============================================================================*/
#include "Common.usf"
#include "PostProcessCommon.usf"
// >0, from the console variable r.GPUBusyWait, multiplied with some factor
uint GPUBusyWait;
void MainPS(float4 UVAndScreenPos : TEXCOORD0, out float4 OutColor : SV_Target0)
{
float2 UV = UVAndScreenPos.xy;
float Value = UV.x;
for(uint i = 0; i < GPUBusyWait; ++i)
{
Value = Value * Value - 2.0f;
}
OutColor = Value * 0.000000001f;
}