You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#include "Common.usf"
|
|
|
|
float4x4 ViewProjection;
|
|
|
|
float SwitchVerticalAxisMultiplier;
|
|
|
|
struct VertexOut
|
|
{
|
|
float4 Position : SV_POSITION;
|
|
float4 Color : COLOR0;
|
|
float4 TextureCoordinates : TEXCOORD0;
|
|
float4 ClipOriginAndPos : TEXCOORD1;
|
|
float4 ClipExtents : TEXCOORD2;
|
|
float2 MaterialTexCoords : TEXCOORD3;
|
|
};
|
|
|
|
|
|
VertexOut Main(
|
|
in float4 InTextureCoordinates : ATTRIBUTE0,
|
|
in float2 InMaterialTextureCoordinates : ATTRIBUTE1,
|
|
in float2 InPosition : ATTRIBUTE2,
|
|
in float2 InClipOrigin : ATTRIBUTE3,
|
|
in float4 InClipExtents : ATTRIBUTE4,
|
|
in float4 InColor : ATTRIBUTE5
|
|
)
|
|
{
|
|
VertexOut VOut;
|
|
VOut.Position = mul(float4(InPosition.xy,0,1), ViewProjection);
|
|
|
|
#if ES2_PROFILE && COMPILER_GLSL_ES2
|
|
// @todo-mobile: Fix this in the projection matrix
|
|
VOut.Position.y *= SwitchVerticalAxisMultiplier;
|
|
#endif
|
|
|
|
// TextureCoordinates contains both the first and second texture coordinates in xy and zw respectively.
|
|
VOut.TextureCoordinates = InTextureCoordinates;
|
|
VOut.MaterialTexCoords = InMaterialTextureCoordinates;
|
|
VOut.ClipOriginAndPos = float4(InClipOrigin, InPosition.xy);
|
|
VOut.ClipExtents = InClipExtents;
|
|
|
|
VOut.Color = InColor FCOLOR_COMPONENT_SWIZZLE;
|
|
|
|
return VOut;
|
|
}
|