Files
UnrealEngineUWP/Engine/Shaders/PostProcessBusyWait.usf
Matthew Griffin bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00

26 lines
721 B
Plaintext

// Copyright 1998-2016 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;
}