51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
#include <metal_stdlib>
|
|
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
|
using namespace metal;
|
|
struct xlatMtlShaderInput {
|
|
float4 varUV;
|
|
};
|
|
struct xlatMtlShaderOutput {
|
|
half4 _fragData [[color(0)]];
|
|
};
|
|
struct xlatMtlShaderUniform {
|
|
};
|
|
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]
|
|
, texture2d<half> texlow [[texture(0)]], sampler _mtlsmp_texlow [[sampler(0)]]
|
|
, texture2d<half> texmed [[texture(1)]], sampler _mtlsmp_texmed [[sampler(1)]]
|
|
, texture2d<float> texhigh [[texture(2)]], sampler _mtlsmp_texhigh [[sampler(2)]]
|
|
, texturecube<half> cubelow [[texture(3)]], sampler _mtlsmp_cubelow [[sampler(3)]]
|
|
, texturecube<half> cubemed [[texture(4)]], sampler _mtlsmp_cubemed [[sampler(4)]]
|
|
, texturecube<float> cubehigh [[texture(5)]], sampler _mtlsmp_cubehigh [[sampler(5)]])
|
|
{
|
|
xlatMtlShaderOutput _mtl_o;
|
|
half4 c_1 = 0;
|
|
half4 tmpvar_2 = 0;
|
|
tmpvar_2 = texlow.sample(_mtlsmp_texlow, (float2)(_mtl_i.varUV.xy));
|
|
c_1 = tmpvar_2;
|
|
c_1 = (c_1 + texmed.sample(_mtlsmp_texmed, (float2)(_mtl_i.varUV.xy)));
|
|
float4 tmpvar_3 = 0;
|
|
tmpvar_3 = texhigh.sample(_mtlsmp_texhigh, (float2)(_mtl_i.varUV.xy));
|
|
c_1 = half4(((float4)(c_1) + tmpvar_3));
|
|
half4 tmpvar_4 = 0;
|
|
tmpvar_4 = cubelow.sample(_mtlsmp_cubelow, (float3)(_mtl_i.varUV.xyz));
|
|
c_1 = (c_1 + tmpvar_4);
|
|
c_1 = (c_1 + cubemed.sample(_mtlsmp_cubemed, (float3)(_mtl_i.varUV.xyz)));
|
|
float4 tmpvar_5 = 0;
|
|
tmpvar_5 = cubehigh.sample(_mtlsmp_cubehigh, (float3)(_mtl_i.varUV.xyz));
|
|
c_1 = half4(((float4)(c_1) + tmpvar_5));
|
|
_mtl_o._fragData = c_1;
|
|
return _mtl_o;
|
|
}
|
|
|
|
|
|
// stats: 5 alu 6 tex 0 flow
|
|
// inputs: 1
|
|
// #0: varUV (high float) 4x1 [-1]
|
|
// textures: 6
|
|
// #0: texlow (low 2d) 0x0 [-1] loc 0
|
|
// #1: texmed (medium 2d) 0x0 [-1] loc 1
|
|
// #2: texhigh (high 2d) 0x0 [-1] loc 2
|
|
// #3: cubelow (low cube) 0x0 [-1] loc 3
|
|
// #4: cubemed (medium cube) 0x0 [-1] loc 4
|
|
// #5: cubehigh (high cube) 0x0 [-1] loc 5
|