New cpp folder structure

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-17 22:35:52 +03:00
committed by Konstantin Pastbin
parent c9cbb64f12
commit 76ffc99abd
2390 changed files with 345 additions and 339 deletions

View File

@@ -0,0 +1,17 @@
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
// Scale factor in shape's coordinates transformation from tile's coordinate
// system.
constant float kShapeCoordScalar = 1000.0;
// This function applies a 2D->3D transformation matrix.
float4 ApplyPivotTransform(float4 pivot, float4x4 pivotTransform, float pivotRealZ);
// This function applies a 2D->3D transformation matrix to billboards.
float4 ApplyBillboardPivotTransform(float4 pivot, float4x4 pivotTransform, float pivotRealZ, float2 offset);
// This function calculates transformed position on an axis for line shaders family.
float2 CalcLineTransformedAxisPos(float2 originalAxisPos, float2 shiftedPos, float4x4 modelView, float halfWidth);