Files
UnrealEngineUWP/Engine/Shaders/PostProcessBusyWait.usf
Ben Marsh 149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00

26 lines
721 B
Plaintext

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