Skip to content

Commit

Permalink
Fixed brick tangent basis being broken because of absent FPackedNorma…
Browse files Browse the repository at this point in the history
…l(FVector4) constructor.
  • Loading branch information
AndrewScheidecker committed Jun 23, 2015
1 parent 3d35b0c commit aafcaa1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class FBrickChunkTangentBuffer : public FVertexBuffer
const FVector UnprojectedTangentY(-1,-1,-1);
const FVector FaceNormal = FaceNormals[FaceIndex].ToFloat();
const FVector ProjectedFaceTangentX = (UnprojectedTangentX - FaceNormal * (UnprojectedTangentX | FaceNormal)).GetSafeNormal();
*TangentBufferData++ = FPackedNormal(ProjectedFaceTangentX);
*TangentBufferData++ = FPackedNormal(FVector4(FaceNormal, FMath::Sign(UnprojectedTangentY | (FaceNormal ^ ProjectedFaceTangentX))));
*TangentBufferData++ = ProjectedFaceTangentX;
*TangentBufferData++ = FVector4(FaceNormal, FMath::Sign(UnprojectedTangentY | (FaceNormal ^ ProjectedFaceTangentX)));
}
RHIUnlockVertexBuffer(VertexBufferRHI);
}
Expand Down

0 comments on commit aafcaa1

Please sign in to comment.