Files
UnrealEngineUWP/Engine/Shaders/Private/OcclusionQueryVertexShader.usf
Wei Liu 06c9a5c84e 1. Remove all flip-y completely and only flip y at the end on androidl GL with a native window api, no need to handle flip-y on high level.
2. Supports CustomDepth in translucency pass on mobile LDR.

#jira none

#rb Dmitriy.Dyomin
#preflight 62be9894d94b57687c68aed1

[CL 20911586 by Wei Liu in ue5-main branch]
2022-07-01 03:38:17 -04:00

41 lines
1.2 KiB
Plaintext

// Copyright Epic Games, Inc. All Rights Reserved.
/*=============================================================================
OcclusionQueryVertexShader.usf: Vertex shader for drawing occlusion queries.
=============================================================================*/
#include "Common.ush"
float4 StencilingGeometryPosAndScale;
#if MOBILE_MULTI_VIEW
uint ViewId;
#endif
void Main(
in float4 InPosition : ATTRIBUTE0,
out float4 OutPosition : SV_POSITION
#if MOBILE_MULTI_VIEW && !INSTANCED_STEREO
, in uint InViewId : SV_ViewID
, out uint OutViewId : VIEW_ID
#endif
)
{
#if MOBILE_MULTI_VIEW && !INSTANCED_STEREO
OutViewId = InViewId;
// Make the triangles degenerate if we're not targeting this view.
// We don't need to resolve the view info, since we already set the
// primary view with the data for the view we're interested in.
// TODO: Support targetting a single view properly.
if (InViewId != ViewId)
{
OutPosition = float4(0, 0, 0, 1);
return;
}
#endif
float3 TransformedPosition = InPosition.xyz * StencilingGeometryPosAndScale.w + StencilingGeometryPosAndScale.xyz;
OutPosition = mul(float4(TransformedPosition, 1), View.TranslatedWorldToClip);
}