Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
17
libs/shaders/Metal/shaders_lib.h
Normal file
17
libs/shaders/Metal/shaders_lib.h
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue