blob: f74638ff10252cda1b59175b2a37110b0be8ef81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#include <metal_stdlib>
using namespace metal;
struct xlatMtlShaderInput {
float4 uv;
};
struct xlatMtlShaderOutput {
half4 _fragData [[color(0)]];
};
struct xlatMtlShaderUniform {
};
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]
, texture2d_array<half> myarr [[texture(0)]], sampler _mtlsmp_myarr [[sampler(0)]])
{
xlatMtlShaderOutput _mtl_o;
half4 tmpvar_1;
float4 slod_2;
half4 tmpvar_3;
tmpvar_3 = myarr.sample(_mtlsmp_myarr, (float2)((_mtl_i.uv.xyz).xy), (uint)((_mtl_i.uv.xyz).z));
float4 tmpvar_4;
tmpvar_4 = float4(tmpvar_3);
half4 tmpvar_5;
tmpvar_5 = myarr.sample(_mtlsmp_myarr, (float2)((_mtl_i.uv.xyw).xy), (uint)((_mtl_i.uv.xyw).z));
float4 tmpvar_6;
tmpvar_6 = float4(tmpvar_5);
half4 tmpvar_7;
tmpvar_7 = myarr.sample(_mtlsmp_myarr, (float2)((_mtl_i.uv.xyz).xy), (uint)((_mtl_i.uv.xyz).z), bias(1.5));
float4 tmpvar_8;
tmpvar_8 = float4(tmpvar_7);
half4 tmpvar_9;
tmpvar_9 = myarr.sample(_mtlsmp_myarr, (float2)((_mtl_i.uv.xyz).xy), (uint)((_mtl_i.uv.xyz).z), level(2.5));
slod_2 = float4(tmpvar_9);
tmpvar_1 = half4(((tmpvar_4 + tmpvar_6) + (tmpvar_8 + slod_2)));
_mtl_o._fragData = tmpvar_1;
return _mtl_o;
}
// stats: 3 alu 4 tex 0 flow
// inputs: 1
// #0: uv (high float) 4x1 [-1]
// textures: 1
// #0: myarr (low 2darray) 0x0 [-1] loc 0
|