summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/runtime/shaders/metal/cs_update.bin
blob: 27cd5584050b57e5f3724d3d4917979c1707fdd5 (plain)
ofshex dumpascii
0000 43 53 48 06 00 00 00 00 00 00 00 00 01 00 06 75 5f 74 69 6d 65 02 01 00 00 01 00 10 00 10 00 01 CSH............u_time...........
0020 00 fb 02 00 00 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 .....#include.<metal_stdlib>.#in
0040 63 6c 75 64 65 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 clude.<simd/simd.h>..using.names
0060 70 61 63 65 20 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 pace.metal;..struct._Global.{...
0080 20 20 66 6c 6f 61 74 34 20 75 5f 74 69 6d 65 3b 0a 7d 3b 0a 0a 63 6f 6e 73 74 61 6e 74 20 66 6c ..float4.u_time;.};..constant.fl
00a0 6f 61 74 33 20 5f 35 33 5b 36 5d 20 3d 20 7b 20 66 6c 6f 61 74 33 28 31 2e 30 2c 20 30 2e 30 2c oat3._53[6].=.{.float3(1.0,.0.0,
00c0 20 30 2e 30 29 2c 20 66 6c 6f 61 74 33 28 31 2e 30 2c 20 31 2e 30 2c 20 30 2e 30 29 2c 20 66 6c .0.0),.float3(1.0,.1.0,.0.0),.fl
00e0 6f 61 74 33 28 31 2e 30 2c 20 30 2e 30 2c 20 31 2e 30 29 2c 20 66 6c 6f 61 74 33 28 30 2e 30 2c oat3(1.0,.0.0,.1.0),.float3(0.0,
0100 20 31 2e 30 2c 20 30 2e 30 29 2c 20 66 6c 6f 61 74 33 28 30 2e 30 2c 20 31 2e 30 2c 20 31 2e 30 .1.0,.0.0),.float3(0.0,.1.0,.1.0
0120 29 2c 20 66 6c 6f 61 74 33 28 30 2e 30 2c 20 30 2e 30 2c 20 31 2e 30 29 20 7d 3b 0a 0a 6b 65 72 ),.float3(0.0,.0.0,.1.0).};..ker
0140 6e 65 6c 20 76 6f 69 64 20 78 6c 61 74 4d 74 6c 4d 61 69 6e 28 63 6f 6e 73 74 61 6e 74 20 5f 47 nel.void.xlatMtlMain(constant._G
0160 6c 6f 62 61 6c 26 20 5f 6d 74 6c 5f 75 20 5b 5b 62 75 66 66 65 72 28 30 29 5d 5d 2c 20 74 65 78 lobal&._mtl_u.[[buffer(0)]],.tex
0180 74 75 72 65 32 64 5f 61 72 72 61 79 3c 66 6c 6f 61 74 2c 20 61 63 63 65 73 73 3a 3a 77 72 69 74 ture2d_array<float,.access::writ
01a0 65 3e 20 73 5f 74 65 78 43 6f 6c 6f 72 54 65 78 74 75 72 65 20 5b 5b 74 65 78 74 75 72 65 28 30 e>.s_texColorTexture.[[texture(0
01c0 29 5d 5d 2c 20 75 69 6e 74 33 20 67 6c 5f 47 6c 6f 62 61 6c 49 6e 76 6f 63 61 74 69 6f 6e 49 44 )]],.uint3.gl_GlobalInvocationID
01e0 20 5b 5b 74 68 72 65 61 64 5f 70 6f 73 69 74 69 6f 6e 5f 69 6e 5f 67 72 69 64 5d 5d 29 0a 7b 0a .[[thread_position_in_grid]]).{.
0200 20 20 20 20 66 6f 72 20 28 69 6e 74 20 5f 31 38 32 20 3d 20 30 3b 20 5f 31 38 32 20 3c 20 36 3b ....for.(int._182.=.0;._182.<.6;
0220 20 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 69 6e 74 33 20 5f 31 36 33 20 3d 20 69 6e 74 .).....{.........int3._163.=.int
0240 33 28 69 6e 74 33 28 67 6c 5f 47 6c 6f 62 61 6c 49 6e 76 6f 63 61 74 69 6f 6e 49 44 29 2e 78 79 3(int3(gl_GlobalInvocationID).xy
0260 2c 20 5f 31 38 32 29 3b 0a 20 20 20 20 20 20 20 20 73 5f 74 65 78 43 6f 6c 6f 72 54 65 78 74 75 ,._182);.........s_texColorTextu
0280 72 65 2e 77 72 69 74 65 28 66 6c 6f 61 74 34 28 28 5f 35 33 5b 5f 31 38 32 5d 20 2a 20 30 2e 37 re.write(float4((_53[_182].*.0.7
02a0 35 29 20 2b 20 66 6c 6f 61 74 33 28 73 69 6e 28 5f 6d 74 6c 5f 75 2e 75 5f 74 69 6d 65 2e 78 20 5).+.float3(sin(_mtl_u.u_time.x.
02c0 2a 20 34 2e 30 29 20 2a 20 30 2e 32 35 29 2c 20 31 2e 30 29 2c 20 75 69 6e 74 32 28 5f 31 36 33 *.4.0).*.0.25),.1.0),.uint2(_163
02e0 2e 78 79 29 2c 20 75 69 6e 74 28 5f 31 36 33 2e 7a 29 29 3b 0a 20 20 20 20 20 20 20 20 5f 31 38 .xy),.uint(_163.z));........._18
0300 32 2b 2b 3b 0a 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0a 20 20 20 20 7d 0a 7d 0a 0a 2++;.........continue;.....}.}..
0320 00 00 10 00 ....