mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
35 lines
907 B
Text
35 lines
907 B
Text
|
#include <metal_stdlib>
|
||
|
using namespace metal;
|
||
|
struct xlatMtlShaderInput {
|
||
|
half3 inNormal;
|
||
|
};
|
||
|
struct xlatMtlShaderOutput {
|
||
|
half4 _glesFragData [[color(0)]];
|
||
|
};
|
||
|
struct xlatMtlShaderUniform {
|
||
|
};
|
||
|
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]])
|
||
|
{
|
||
|
xlatMtlShaderOutput _mtl_o;
|
||
|
half4 c_1;
|
||
|
half3x3 tmpvar_2;
|
||
|
tmpvar_2[0].x = half(0.8164966);
|
||
|
tmpvar_2[0].y = half(-0.4082483);
|
||
|
tmpvar_2[0].z = half(-0.4082483);
|
||
|
tmpvar_2[1].x = half(0.0);
|
||
|
tmpvar_2[1].y = half(0.7071068);
|
||
|
tmpvar_2[1].z = half(-0.7071068);
|
||
|
tmpvar_2[2].x = half(0.5773503);
|
||
|
tmpvar_2[2].y = half(0.5773503);
|
||
|
tmpvar_2[2].z = half(0.5773503);
|
||
|
c_1.xyz = (tmpvar_2 * _mtl_i.inNormal);
|
||
|
c_1.w = half(0.0);
|
||
|
_mtl_o._glesFragData = c_1;
|
||
|
return _mtl_o;
|
||
|
}
|
||
|
|
||
|
|
||
|
// stats: 11 alu 0 tex 0 flow
|
||
|
// inputs: 1
|
||
|
// #0: inNormal (medium float) 3x1 [-1]
|