ofs | hex dump | ascii |
---|
0000 | 46 53 48 06 01 83 f2 e1 00 00 00 00 03 00 0f 75 5f 69 6e 76 5f 74 65 78 5f 73 69 7a 65 31 12 01 | FSH............u_inv_tex_size1.. |
0020 | 00 00 01 00 05 73 5f 74 65 78 10 00 00 00 00 00 05 73 5f 70 61 6c 10 00 00 00 00 00 df 03 00 00 | .....s_tex.......s_pal.......... |
0040 | 23 69 6e 63 6c 75 64 65 20 3c 6d 65 74 61 6c 5f 73 74 64 6c 69 62 3e 0a 23 69 6e 63 6c 75 64 65 | #include.<metal_stdlib>.#include |
0060 | 20 3c 73 69 6d 64 2f 73 69 6d 64 2e 68 3e 0a 0a 75 73 69 6e 67 20 6e 61 6d 65 73 70 61 63 65 20 | .<simd/simd.h>..using.namespace. |
0080 | 6d 65 74 61 6c 3b 0a 0a 73 74 72 75 63 74 20 5f 47 6c 6f 62 61 6c 0a 7b 0a 20 20 20 20 66 6c 6f | metal;..struct._Global.{.....flo |
00a0 | 61 74 34 20 75 5f 69 6e 76 5f 74 65 78 5f 73 69 7a 65 31 3b 0a 7d 3b 0a 0a 73 74 72 75 63 74 20 | at4.u_inv_tex_size1;.};..struct. |
00c0 | 78 6c 61 74 4d 74 6c 4d 61 69 6e 5f 6f 75 74 0a 7b 0a 20 20 20 20 66 6c 6f 61 74 34 20 62 67 66 | xlatMtlMain_out.{.....float4.bgf |
00e0 | 78 5f 46 72 61 67 44 61 74 61 30 20 5b 5b 63 6f 6c 6f 72 28 30 29 5d 5d 3b 0a 7d 3b 0a 0a 73 74 | x_FragData0.[[color(0)]];.};..st |
0100 | 72 75 63 74 20 78 6c 61 74 4d 74 6c 4d 61 69 6e 5f 69 6e 0a 7b 0a 20 20 20 20 66 6c 6f 61 74 34 | ruct.xlatMtlMain_in.{.....float4 |
0120 | 20 76 5f 63 6f 6c 6f 72 30 20 5b 5b 75 73 65 72 28 6c 6f 63 6e 30 29 5d 5d 3b 0a 20 20 20 20 66 | .v_color0.[[user(locn0)]];.....f |
0140 | 6c 6f 61 74 32 20 76 5f 74 65 78 63 6f 6f 72 64 30 20 5b 5b 75 73 65 72 28 6c 6f 63 6e 31 29 5d | loat2.v_texcoord0.[[user(locn1)] |
0160 | 5d 3b 0a 7d 3b 0a 0a 66 72 61 67 6d 65 6e 74 20 78 6c 61 74 4d 74 6c 4d 61 69 6e 5f 6f 75 74 20 | ];.};..fragment.xlatMtlMain_out. |
0180 | 78 6c 61 74 4d 74 6c 4d 61 69 6e 28 78 6c 61 74 4d 74 6c 4d 61 69 6e 5f 69 6e 20 69 6e 20 5b 5b | xlatMtlMain(xlatMtlMain_in.in.[[ |
01a0 | 73 74 61 67 65 5f 69 6e 5d 5d 2c 20 63 6f 6e 73 74 61 6e 74 20 5f 47 6c 6f 62 61 6c 26 20 5f 6d | stage_in]],.constant._Global&._m |
01c0 | 74 6c 5f 75 20 5b 5b 62 75 66 66 65 72 28 30 29 5d 5d 2c 20 74 65 78 74 75 72 65 32 64 3c 66 6c | tl_u.[[buffer(0)]],.texture2d<fl |
01e0 | 6f 61 74 3e 20 73 5f 74 65 78 20 5b 5b 74 65 78 74 75 72 65 28 30 29 5d 5d 2c 20 74 65 78 74 75 | oat>.s_tex.[[texture(0)]],.textu |
0200 | 72 65 32 64 3c 66 6c 6f 61 74 3e 20 73 5f 70 61 6c 20 5b 5b 74 65 78 74 75 72 65 28 31 29 5d 5d | re2d<float>.s_pal.[[texture(1)]] |
0220 | 2c 20 73 61 6d 70 6c 65 72 20 73 5f 74 65 78 53 61 6d 70 6c 65 72 20 5b 5b 73 61 6d 70 6c 65 72 | ,.sampler.s_texSampler.[[sampler |
0240 | 28 30 29 5d 5d 2c 20 73 61 6d 70 6c 65 72 20 73 5f 70 61 6c 53 61 6d 70 6c 65 72 20 5b 5b 73 61 | (0)]],.sampler.s_palSampler.[[sa |
0260 | 6d 70 6c 65 72 28 31 29 5d 5d 29 0a 7b 0a 20 20 20 20 78 6c 61 74 4d 74 6c 4d 61 69 6e 5f 6f 75 | mpler(1)]]).{.....xlatMtlMain_ou |
0280 | 74 20 6f 75 74 20 3d 20 7b 7d 3b 0a 20 20 20 20 66 6c 6f 61 74 34 20 5f 32 36 31 20 3d 20 73 5f | t.out.=.{};.....float4._261.=.s_ |
02a0 | 74 65 78 2e 73 61 6d 70 6c 65 28 73 5f 74 65 78 53 61 6d 70 6c 65 72 2c 20 69 6e 2e 76 5f 74 65 | tex.sample(s_texSampler,.in.v_te |
02c0 | 78 63 6f 6f 72 64 30 29 3b 0a 20 20 20 20 6f 75 74 2e 62 67 66 78 5f 46 72 61 67 44 61 74 61 30 | xcoord0);.....out.bgfx_FragData0 |
02e0 | 20 3d 20 66 6c 6f 61 74 34 28 73 5f 70 61 6c 2e 73 61 6d 70 6c 65 28 73 5f 70 61 6c 53 61 6d 70 | .=.float4(s_pal.sample(s_palSamp |
0300 | 6c 65 72 2c 20 28 66 6c 6f 61 74 32 28 5f 32 36 31 2e 78 20 2a 20 32 35 36 2e 30 2c 20 32 2e 30 | ler,.(float2(_261.x.*.256.0,.2.0 |
0320 | 29 20 2a 20 5f 6d 74 6c 5f 75 2e 75 5f 69 6e 76 5f 74 65 78 5f 73 69 7a 65 31 2e 78 79 29 29 2e | ).*._mtl_u.u_inv_tex_size1.xy)). |
0340 | 78 2c 20 73 5f 70 61 6c 2e 73 61 6d 70 6c 65 28 73 5f 70 61 6c 53 61 6d 70 6c 65 72 2c 20 28 66 | x,.s_pal.sample(s_palSampler,.(f |
0360 | 6c 6f 61 74 32 28 5f 32 36 31 2e 79 20 2a 20 32 35 36 2e 30 2c 20 31 2e 30 29 20 2a 20 5f 6d 74 | loat2(_261.y.*.256.0,.1.0).*._mt |
0380 | 6c 5f 75 2e 75 5f 69 6e 76 5f 74 65 78 5f 73 69 7a 65 31 2e 78 79 29 29 2e 79 2c 20 73 5f 70 61 | l_u.u_inv_tex_size1.xy)).y,.s_pa |
03a0 | 6c 2e 73 61 6d 70 6c 65 28 73 5f 70 61 6c 53 61 6d 70 6c 65 72 2c 20 28 66 6c 6f 61 74 32 28 5f | l.sample(s_palSampler,.(float2(_ |
03c0 | 32 36 31 2e 7a 20 2a 20 32 35 36 2e 30 2c 20 30 2e 30 29 20 2a 20 5f 6d 74 6c 5f 75 2e 75 5f 69 | 261.z.*.256.0,.0.0).*._mtl_u.u_i |
03e0 | 6e 76 5f 74 65 78 5f 73 69 7a 65 31 2e 78 79 29 29 2e 7a 2c 20 5f 32 36 31 2e 77 29 20 2a 20 69 | nv_tex_size1.xy)).z,._261.w).*.i |
0400 | 6e 2e 76 5f 63 6f 6c 6f 72 30 3b 0a 20 20 20 20 72 65 74 75 72 6e 20 6f 75 74 3b 0a 7d 0a 0a 00 | n.v_color0;.....return.out;.}... |
0420 | 00 10 00 | ... |