Files
UnrealEngineUWP/Engine/Shaders/CommonViewUniformBuffer.usf
Guillaume Abadie 127d951967 Cleans up experimental code for panini projection.
#code_review: Martin.Mittring

[CL 2594183 by Guillaume Abadie in Main branch]
2015-06-19 15:52:57 -04:00

22 lines
597 B
Plaintext

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
CommonViewUniformBuffer.usf: Common view uniform buffer specifics
=============================================================================*/
/*
* @return tan(View.FieldOfViewWideAngles * .5)
*/
float2 GetTanHalfFieldOfView()
{
return float2(View.ClipToView[0][0], View.ClipToView[1][1]);
}
/*
* @return 1 / tan(View.FieldOfViewWideAngles * .5)
*/
float2 GetCotanHalfFieldOfView()
{
return float2(View.ViewToClip[0][0], View.ViewToClip[1][1]);
}