You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
-Add a new define to wrap the output semantic that we want to be post declare as precise. -Modify DXC-SIRV to add the NoContraction decorator on precise output semantics. -Modify spirv_glsl to post declare as precise output semantics -Example: out precise float4 gl_positon; will add precise gl_position; post declaration. [REVIEW] [at]laura.hermanns [CL 29338529 by serge bernier in ue5-main branch]
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
PositionOnlyDepthOnlyVertexShader.hlsl: Depth-only vertex shader.
|
|
=============================================================================*/
|
|
|
|
#include "Common.ush"
|
|
#include "/Engine/Generated/Material.ush"
|
|
#include "/Engine/Generated/VertexFactory.ush"
|
|
|
|
void Main(
|
|
FPositionOnlyVertexFactoryInput Input,
|
|
out INVARIANT_OUTPUT float4 OutPosition : SV_POSITION
|
|
#if USE_GLOBAL_CLIP_PLANE
|
|
, out float OutGlobalClipPlaneDistance : SV_ClipDistance
|
|
#endif
|
|
#if INSTANCED_STEREO
|
|
, out uint ViewportIndex : SV_ViewPortArrayIndex
|
|
#endif
|
|
)
|
|
{
|
|
#if INSTANCED_STEREO
|
|
const uint EyeIndex = GetEyeIndexFromVF(Input);
|
|
ViewportIndex = EyeIndex;
|
|
#endif
|
|
ResolvedView = ResolveViewFromVF(Input);
|
|
|
|
float4 WorldPos = VertexFactoryGetWorldPosition(Input);
|
|
|
|
{
|
|
OutPosition = INVARIANT(mul(WorldPos, ResolvedView.TranslatedWorldToClip));
|
|
}
|
|
|
|
#if USE_GLOBAL_CLIP_PLANE
|
|
OutGlobalClipPlaneDistance = dot(ResolvedView.GlobalClippingPlane, float4(WorldPos.xyz, 1));
|
|
#endif
|
|
}
|