You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
31 lines
938 B
Plaintext
31 lines
938 B
Plaintext
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
ShadowProjectionVertexShader.usf: Vertex shader for projecting a shadow depth buffer onto the scene.
|
|
=============================================================================*/
|
|
|
|
#include "Common.usf"
|
|
|
|
#ifndef USE_TRANSFORM
|
|
#define USE_TRANSFORM 1
|
|
#endif
|
|
|
|
#if USE_TRANSFORM
|
|
float4 StencilingGeometryPosAndScale;
|
|
#endif
|
|
|
|
void Main(
|
|
in float4 InPosition : ATTRIBUTE0,
|
|
out float4 OutPosition : SV_POSITION
|
|
)
|
|
{
|
|
#if USE_TRANSFORM
|
|
// Transform geometry to clip space
|
|
float3 WorldPosition = InPosition * StencilingGeometryPosAndScale.w + StencilingGeometryPosAndScale.xyz;
|
|
OutPosition = mul(float4(WorldPosition,1),View.TranslatedWorldToClip);
|
|
#else
|
|
// Pass position straight through, as geometry is defined in clip space already.
|
|
OutPosition = float4(InPosition.xyz, 1);
|
|
#endif
|
|
}
|