utkuatlastuzcu/tst / Engine /Shaders /DirectionalLightVertexShader.usf
utkuatlastuzcu's picture
download
raw
1.54 kB
/*=============================================================================
DirectionalLightVertexShader.hlsl: Directional light vertex shader.
Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
=============================================================================*/
#define NEEDS_LIGHTMAP_COORDINATE STATICLIGHTING_TEXTUREMASK
#include "Common.usf"
#include "Material.usf"
#include "VertexFactory.usf"
float3 LightDirection;
void Main(
FVertexFactoryInput Input,
#if STATICLIGHTING_VERTEXMASK
float LightMask : BLENDWEIGHT0,
#endif
out FVertexFactoryInterpolants OutFactoryInterpolants,
out float3 OutTangentLightVector : TEXCOORD4,
out float4 OutWorldLightVector : TEXCOORD5,
out float3 OutCameraVector : TEXCOORD6,
out float4 OutPixelPosition : TEXCOORD7,
out float4 OutPosition : POSITION
)
{
float4 WorldPosition = VertexFactoryGetWorldPosition(Input);
OutPosition = MulMatrix(ViewProjectionMatrix,WorldPosition);
OutFactoryInterpolants = VertexFactoryGetInterpolants(Input);
#if WORLD_POS
OutPixelPosition = WorldPosition;
#else
OutPixelPosition = OutPosition;
#endif
float3x3 TangentBasis = VertexFactoryGetTangentBasis(Input);
OutCameraVector = VertexFactoryWorldToTangentSpace(Input,TangentBasis,CameraPosition.xyz - WorldPosition.xyz * CameraPosition.w);
OutTangentLightVector = VertexFactoryWorldToTangentSpace(Input,TangentBasis,LightDirection);
OutWorldLightVector = 0;
#if STATICLIGHTING_VERTEXMASK
OutWorldLightVector.w = LightMask;
#endif
}

Xet Storage Details

Size:
1.54 kB
·
Xet hash:
7291e33313d02cd90e17857318c2c2e98054c99c7a5028d66bb713d42a1e773d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.