Files
UnrealEngineUWP/Engine/Shaders/SlateVertexShader.usf
Matt Kuhlenschmidt 375a2f18a6 Added support for materials to be used on Slate based fonts.
[CL 2588529 by Matt Kuhlenschmidt in Main branch]
2015-06-16 09:30:13 -04:00

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;
}