You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Rob.Srinivasiah #review @Jules.Blok, @Rob.Srinivasiah #jira UE-162054 #preflight 63d979a7cf52968117d174c4 [CL 23944314 by Arciel Rekman in ue5-main branch]
33 lines
923 B
Plaintext
33 lines
923 B
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
FullscreenVertexShader.usf: Most basic multi platform full screen vertex shader
|
|
=============================================================================*/
|
|
|
|
#include "../Common.ush"
|
|
|
|
#ifndef SCREEN_VS_FOR_INSTANCED_VIEWS
|
|
#define SCREEN_VS_FOR_INSTANCED_VIEWS 0
|
|
#endif
|
|
|
|
void MainVS(
|
|
float2 ViewportUV : ATTRIBUTE0,
|
|
float2 UV : ATTRIBUTE1, // TODO: kill
|
|
#if !SCREEN_VS_FOR_INSTANCED_VIEWS
|
|
out float4 OutPosition : SV_POSITION
|
|
#else
|
|
uint InstanceId : SV_InstanceID,
|
|
out float4 OutPosition : SV_POSITION,
|
|
out uint OutViewportId : SV_ViewportArrayIndex,
|
|
out nointerpolation uint OutViewId : VIEW_ID
|
|
#endif
|
|
)
|
|
{
|
|
OutPosition = float4(ViewportUVToScreenPos(ViewportUV), 0, 1);
|
|
|
|
#if SCREEN_VS_FOR_INSTANCED_VIEWS
|
|
OutViewportId = InstanceId;
|
|
OutViewId = InstanceId;
|
|
#endif
|
|
}
|