#include #pragma clang diagnostic ignored "-Wparentheses-equality" using namespace metal; struct xlatMtlShaderInput { float4 _glesVertex [[attribute(0)]]; }; struct xlatMtlShaderOutput { float4 gl_Position [[position]]; half3 xlv_TEXCOORD2; }; struct xlatMtlShaderUniform { float4x4 glstate_matrix_mvp; float4x4 _Object2World; half2 _DynLampInfo_bufferSize; }; vertex xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]] , texture2d _DynLampInfo [[texture(0)]], sampler _mtlsmp__DynLampInfo [[sampler(0)]]) { xlatMtlShaderOutput _mtl_o; half3 tmpvar_1 = 0; float3 tmpvar_2 = 0; tmpvar_2 = (_mtl_u._Object2World * _mtl_i._glesVertex).xyz; float3 tmpvar_3 = 0; half3 hybridCol_4 = 0; int4 tmpvar_5 = 0; tmpvar_5.xyz = int3(tmpvar_2); tmpvar_5.w = int(-(tmpvar_2.x)); float2 tmpvar_6 = 0; tmpvar_6.y = 1.0; tmpvar_6.x = float(tmpvar_5.x); half2 coord_7 = 0; coord_7 = half2(tmpvar_6); half4 tmpvar_8 = 0; tmpvar_8.zw = half2(float2(0.0, 0.0)); tmpvar_8.xy = (coord_7 / _mtl_u._DynLampInfo_bufferSize); half4 tmpvar_9 = 0; half4 tmpvar_10 = 0; tmpvar_10 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_8.xy), level(0.0)); tmpvar_9 = tmpvar_10; float2 tmpvar_11 = 0; tmpvar_11.y = 2.0; tmpvar_11.x = float(tmpvar_5.x); half2 coord_12 = 0; coord_12 = half2(tmpvar_11); half4 tmpvar_13 = 0; tmpvar_13.zw = half2(float2(0.0, 0.0)); tmpvar_13.xy = (coord_12 / _mtl_u._DynLampInfo_bufferSize); half4 tmpvar_14 = 0; half4 tmpvar_15 = 0; tmpvar_15 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_13.xy), level(0.0)); tmpvar_14 = tmpvar_15; float2 tmpvar_16 = 0; tmpvar_16.y = 1.0; tmpvar_16.x = float(tmpvar_5.y); half2 coord_17 = 0; coord_17 = half2(tmpvar_16); half4 tmpvar_18 = 0; tmpvar_18.zw = half2(float2(0.0, 0.0)); tmpvar_18.xy = (coord_17 / _mtl_u._DynLampInfo_bufferSize); half4 tmpvar_19 = 0; half4 tmpvar_20 = 0; tmpvar_20 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_18.xy), level(0.0)); tmpvar_19 = tmpvar_20; float2 tmpvar_21 = 0; tmpvar_21.y = 2.0; tmpvar_21.x = float(tmpvar_5.y); half2 coord_22 = 0; coord_22 = half2(tmpvar_21); half4 tmpvar_23 = 0; tmpvar_23.zw = half2(float2(0.0, 0.0)); tmpvar_23.xy = (coord_22 / _mtl_u._DynLampInfo_bufferSize); half4 tmpvar_24 = 0; half4 tmpvar_25 = 0; tmpvar_25 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_23.xy), level(0.0)); tmpvar_24 = tmpvar_25; float2 tmpvar_26 = 0; tmpvar_26.y = 1.0; tmpvar_26.x = float(tmpvar_5.z); half2 coord_27 = 0; coord_27 = half2(tmpvar_26); half4 tmpvar_28 = 0; tmpvar_28.zw = half2(float2(0.0, 0.0)); tmpvar_28.xy = (coord_27 / _mtl_u._DynLampInfo_bufferSize); half4 tmpvar_29 = 0; half4 tmpvar_30 = 0; tmpvar_30 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_28.xy), level(0.0)); tmpvar_29 = tmpvar_30; float2 tmpvar_31 = 0; tmpvar_31.y = 2.0; tmpvar_31.x = float(tmpvar_5.z); half2 coord_32 = 0; coord_32 = half2(tmpvar_31); half4 tmpvar_33 = 0; tmpvar_33.zw = half2(float2(0.0, 0.0)); tmpvar_33.xy = (coord_32 / _mtl_u._DynLampInfo_bufferSize); half4 tmpvar_34 = 0; half4 tmpvar_35 = 0; tmpvar_35 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_33.xy), level(0.0)); tmpvar_34 = tmpvar_35; float2 tmpvar_36 = 0; tmpvar_36.y = 1.0; tmpvar_36.x = float(tmpvar_5.w); half2 coord_37 = 0; coord_37 = half2(tmpvar_36); half4 tmpvar_38 = 0; tmpvar_38.zw = half2(float2(0.0, 0.0)); tmpvar_38.xy = (coord_37 / _mtl_u._DynLampInfo_bufferSize); half4 tmpvar_39 = 0; half4 tmpvar_40 = 0; tmpvar_40 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_38.xy), level(0.0)); tmpvar_39 = tmpvar_40; float2 tmpvar_41 = 0; tmpvar_41.y = 2.0; tmpvar_41.x = float(tmpvar_5.w); half2 coord_42 = 0; coord_42 = half2(tmpvar_41); half4 tmpvar_43 = 0; tmpvar_43.zw = half2(float2(0.0, 0.0)); tmpvar_43.xy = (coord_42 / _mtl_u._DynLampInfo_bufferSize); half4 tmpvar_44 = 0; half4 tmpvar_45 = 0; tmpvar_45 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_43.xy), level(0.0)); tmpvar_44 = tmpvar_45; half3 hybridCol_46 = 0; half4 atten_47 = 0; float3 tmpvar_48 = 0; tmpvar_48 = ((float3)(tmpvar_9.xyz) - tmpvar_2); float tmpvar_49 = 0; tmpvar_49 = dot (tmpvar_48, tmpvar_48); half4 tmpvar_50 = 0; tmpvar_50.yzw = atten_47.yzw; tmpvar_50.x = half((tmpvar_49 * (float)(tmpvar_9.w))); float3 tmpvar_51 = 0; tmpvar_51 = ((float3)(tmpvar_19.xyz) - tmpvar_2); float tmpvar_52 = 0; tmpvar_52 = dot (tmpvar_51, tmpvar_51); half4 tmpvar_53 = 0; tmpvar_53.xzw = tmpvar_50.xzw; tmpvar_53.y = half((tmpvar_52 * (float)(tmpvar_19.w))); float3 tmpvar_54 = 0; tmpvar_54 = ((float3)(tmpvar_29.xyz) - tmpvar_2); float tmpvar_55 = 0; tmpvar_55 = dot (tmpvar_54, tmpvar_54); half4 tmpvar_56 = 0; tmpvar_56.xyw = tmpvar_53.xyw; tmpvar_56.z = half((tmpvar_55 * (float)(tmpvar_29.w))); float3 tmpvar_57 = 0; tmpvar_57 = ((float3)(tmpvar_39.xyz) - tmpvar_2); float tmpvar_58 = 0; tmpvar_58 = dot (tmpvar_57, tmpvar_57); half4 tmpvar_59 = 0; tmpvar_59.xyz = tmpvar_56.xyz; tmpvar_59.w = half((tmpvar_58 * (float)(tmpvar_39.w))); atten_47 = tmpvar_59; hybridCol_46 = (hybridCol_4 + (tmpvar_14.xyz * tmpvar_50.x)); hybridCol_46 = (hybridCol_46 + (tmpvar_24.xyz * tmpvar_53.y)); hybridCol_46 = (hybridCol_46 + (tmpvar_34.xyz * tmpvar_56.z)); hybridCol_46 = (hybridCol_46 + (tmpvar_44.xyz * tmpvar_59.w)); tmpvar_3 = float3(hybridCol_46); tmpvar_1 = half3(tmpvar_3); _mtl_o.gl_Position = (_mtl_u.glstate_matrix_mvp * _mtl_i._glesVertex); _mtl_o.xlv_TEXCOORD2 = tmpvar_1; return _mtl_o; } // stats: 57 alu 8 tex 0 flow // inputs: 1 // #0: _glesVertex (high float) 4x1 [-1] loc 0 // uniforms: 3 (total size: 132) // #0: glstate_matrix_mvp (high float) 4x4 [-1] loc 0 // #1: _Object2World (high float) 4x4 [-1] loc 64 // #2: _DynLampInfo_bufferSize (medium float) 2x1 [-1] loc 128 // textures: 1 // #0: _DynLampInfo (low 2d) 0x0 [-1] loc 0