// 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; }