You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#codereview jeff.campeau,nick.penwarden,rolando.caloca [CL 2108642 by Josh Adams in Main branch]
13 lines
611 B
Plaintext
13 lines
611 B
Plaintext
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Common.usf"
|
|
|
|
float4 TransformLocalToTranslatedWorld(float3 LocalPosition)
|
|
{
|
|
//expand the matrix multiply to avoid a code-gen bug on PS4.
|
|
//float3 RotatedPosition = mul(LocalPosition.xyz, (float3x3)Primitive.LocalToWorld);
|
|
float3 RotatedPosition = Primitive.LocalToWorld[0].xyz * LocalPosition.xxx + Primitive.LocalToWorld[1].xyz * LocalPosition.yyy + Primitive.LocalToWorld[2].xyz * LocalPosition.zzz;
|
|
float3 Translation = Primitive.LocalToWorld[3].xyz + View.PreViewTranslation.xyz;
|
|
return float4(RotatedPosition + Translation,1);
|
|
}
|