You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb michael.galetzka #jira none #preflight 6273ee308f7e356c032703cc [CL 20059140 by Stu McKenna in ue5-main branch]
21 lines
629 B
Plaintext
21 lines
629 B
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
// when using a template ush file, we need the _{ParameterName} appendix on global functions and parameters, because the template can be included multiple times for different data interfaces in a system.
|
|
float4 {ParameterName}_MousePosition;
|
|
|
|
void GetMousePosition_{ParameterName}(in bool In_Normalized, out float Out_PosX, out float Out_PosY)
|
|
{
|
|
float4 DIPosition = {ParameterName}_MousePosition;
|
|
if (In_Normalized)
|
|
{
|
|
Out_PosX = DIPosition.x / DIPosition.z;
|
|
Out_PosY = DIPosition.y / DIPosition.w;
|
|
}
|
|
else
|
|
{
|
|
Out_PosX = DIPosition.x;
|
|
Out_PosY = DIPosition.y;
|
|
}
|
|
}
|