Compare commits

...

3 commits

3 changed files with 39 additions and 36 deletions

View file

@ -1,25 +1,23 @@
Shader"Q"{SubShader{Pass{CGPROGRAM#pragma vertex v1
#pragma fragment f1
Shader"S"{SubShader{Pass{CGPROGRAM#pragma vertex a
#pragma fragment f
#include"UnityCG.cginc"
#define w const uint
struct A{float4 v:POSITION;float2 u:TEXCOORD0;UNITY_VERTEX_INPUT_INSTANCE_ID};
struct V{float2 u:TEXCOORD0;float4 v:SV_POSITION;UNITY_VERTEX_OUTPUT_STEREO};
V v1(A v){V o;UNITY_SETUP_INSTANCE_ID(v);UNITY_INITIALIZE_OUTPUT(V, o);UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);o.v=UnityObjectToClipPos(v.v);o.u=v.u;return o;}
float3 f1(V U):SV_Target{
w t[]={0x13140b0e,0x0f151617,0x16181319,0x0c13140b,0x0e0f1518,0x1a0b1b1b,0x181c1d1a,0x1e1f1d1e,0x20212223,0x150b2425,0x0b00260f,0x15270f11,0x00260228,0x2223150b,0x24250b00,0x10150b24,0x250f2927,0x00100228,0x222a290d,0x2b190e0f,0x162c292a,0x272d1c1d,0x2e0d242a,0x290d1628,0x220e0f10,0x2a290f00,0x2f000d30,0x291b2700,0x192a2927,0x281b2715,0x190d2700,0x2018102b,0x300b2705,0x0026311a,0x1f133233,0x321f3435,0x102b300b,0x27030019,0x31333637,0x1c1f1f1e,0x3801352c,0x34323339,0x3a3b361e,0x3336373a,0x32341a2c,0x333a3234,0x13332034,0x1c363a32,0x383c3528,0x1b271519,0x0d27003b,0x18102b30,0x0b270300,0x19313336,0x371c1f1f,0x1e380135,0x102b300b,0x27050026,0x31133b3a,0x1a1f1332,0x33321f34,0x352c3432,0x33393a3b,0x361e3336,0x373a1f2c,0x331a2c33,0x3a133336,0x1e361f3c,0x35283b00,0x26023d20,0x00263e18,0x3b003035,0x2c343233,0x393a1336,0x332c1a3a,0x32341333,0x20341c36,0x3a32383d,0x263e352c,0x34323339,0x3a323432,0x3332203f,0x3240363a,0x1f2c331a,0x2c333d3b,0x1200303e,0x352c3432,0x33393a32,0x34323332,0x203f3240,0x363a3b36,0x1e333637,0x3a1f2c33,0x1a2c333a,0x1333361e,0x361f3d30,0x3e35302e,0x26412c29,0x2a272d1f,0x0c420f0d,0x2733301c,0x2b2a231a,0x301b3d26,0x2e263e35,0x302e1941,0x262e1935,0x150f2719,0x15290030,0x353c2810,0x2b300b27,0x04001002,0x3d3b002c,0x3e31133b,0x3a330b15,0x240f2718,0x282f0027,0x43444118,0x453c3528,0x2f003f41,0x05020306,0x35282f00,0x0c410507,0x0935282f,0x00464344,0x41180112,0x050a0104,0x0a0a0207,0x09120205,0x01070505,0x09010112,0x03050405,0x07080805,0x05120305,0x04050805,0x07060712,0x0402020a,0x03080105,0x01120601,0x05070103,0x09050912,0x03010307,0x02040a06,0x03120602,0x02090409,0x03080312,0x03050506,0x03050303,0x05120302,0x02030401,0x0a020312,0x03020102,0x09040702,0x07120405,0x09050209,0x03051207,0x04030605,0x05011203,0x0808030a,0x03050901,0x12030202,0x03060708,0x07091205,0x03020806,0x0a010501,0x120a0705,0x01030305,0x12020405,0x12050802,0x01020607,0x05091204,0x05090502,0x09090912,0x020a0908,0x03011204,0x05070104,0x01010901,0x12060302,0x08030604,0x0a031202,0x04070502,0x06040701,0x120a0805,0x02080701,0x12030505,0x06050907,0x05011207,0x04040107,0x04011205,0x09080704,0x09050705,0x12050802,0x03050703,0x08031203,0x05050606,0x08010909,0x12050909,0x02070308,0x06031203,0x02020108,0x05040407,0x12060a0a,0x0505030a,0x08071204,0x07090501,0x0a0a0301,0x12040402,0x03070804,0x1202030a,0x03040208,0x05120409,0x03070305,0x12060708,0x05030512,0x08050602,0x07070109,0x12030808,0x010a070a,0x04011203,0x04090909,0x01120204,0x05050209,0x09090112,0x03010607,0x06070602,0x03120402,0x02080402,0x040a0312,0x06070805,0x03071202,0x03091206,0x08090909,0x01120706,0x0a060808,0x07120502,0x0a050504,0x03120508,0x05010a02,0x0a070912,0x02010505,0x0602070a,0x0a031206,0x0a020107,0x03060701,0x1205020a,0x05050409,0x12060105,0x060a060a,0x04071206,0x09020106,0x030a0701,0x12020107,0x03020106,0x03091206,0x09090609,0x04010501,0x12050901,0x12060909,0x09020906,0x07011208,0x02080101,0x06050512,0x05010509,0x02090401,0x05120301,0x0a0a0906,0x08030912,0x04050704,0x08030901,0x12020105,0x09080201,0x02020312,0x0205070a,0x05050101,0x12030709,0x08010702,0x03051203,0x0104050a,0x02060301,0x12030106,0x07060703,0x06071202,0x01070308,0x01080312,0x06010506,0x0a060509,0x09120507,0x06080206,0x0312050a,0x02060301,0x12080206,0x070a0508,0x03120803,0x0a060602,0x0a011202,0x04070405,0x0a090305,0x120a0608,0x01060a03,0x12060506,0x040a0307,0x0803123c,0x3528102b,0x300b2700,0x11122d41,0x2c2e192e,0x2d450806,0x3511412c,0x2e192e11,0x45080635,0x28192a29,0x27000d12,0x2a120e12,0x39123741,0x11353941,0x2d352a41,0x37473d08,0x0548393e,0x45080635,0x282a103d,0x2a49410c,0x4a4a2a4b,0x0c473f3e,0x18280e41,0x3d2a480c,0x3e4c0202,0x35282a10,0x3d0e4b03,0x3e0d413d,0x0e4b4b05,0x3e470235,0x280f2b1b,0x0f002a10,0x3d0e4141,0x02013e0d,0x41020935,0x280f2b1b,0x0f000d41,0x3d27433d,0x2a480c3e,0x4d020244,0x49493d3d,0x08483d3d,0x0e48033e,0x4a083e3e,0x45053e4a,0x02063e47,0x0235283c,0x0f2b1b0f,0x18282a10,0x3d2a490c,0x3e2a4841,0x3f480235,0x280d4127,0x432a4d05,0x4449493d,0x3d04483d,0x2a4a043e,0x3e45093e,0x4a030606,0x353c2839,0x413d2d48,0x393e4507,0x3537413d,0x1148373e,0x45073528,0x150f2719,0x15290046,0x430d4449,0x493d3747,0x3945063e,0x4a02453d,0x374b063e,0x35283c36,0x34381c1d,0x3c3c3c00,};
w L=4125;
w b=468;
w F[]={0,490399168,140644800,243467744,243474656,311927040,504602848,202613952,511838272,244524224,211230912,210183616,34841824,6325440,277292480,211256768,421759040,9640224,134,471015648,34841888,198720,346030080,521725392,136415360,9741760,244548640,6330630,487638464,471246272,244557088,488162752,211074336,599442976,368409920,3312673,12923174,382624,567424,74516608,277096930,238880,134418880,205656512,311731392,567426,128,578880,6595776,4194432,474091968,1044516992,591062560,4194438,504595936,581052960,106210528,588583040,480,588818560,71700544,404818304,209985728,34637280,1048710112,14694400,268706124,203491520,205656256,10627072,504595488,4657152,491520,71569472,72955190,136349824,9570592,545392672,};
float x,y=U.u.y*75;x=U.u.x*75;
uint c,i,d,Y,X=x;Y=y;i=X+(74-Y)*75;
if(i>=b&&i<b+L){
struct A{float4 v:POSITION;float2 u:TEXCOORD0;UNITY_VERTEX_INPUT_INSTANCE_ID};struct V{float2 u:TEXCOORD0;float4 v:SV_POSITION;UNITY_VERTEX_OUTPUT_STEREO};
V a(A v){V o;UNITY_SETUP_INSTANCE_ID(v);UNITY_INITIALIZE_OUTPUT(V,o);UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);o.v=UnityObjectToClipPos(v.v);o.u=v.u;return o;}
float3 f(V U):SV_Target{
w t[]={0x2f00576f,0x33f2c1f7,0x2f1fb204,0x1b49dda7,0x3d618237,0x42c83a2e,0x4541a121,0x53a72e14,0x1adea1c5,0x5d3cd90b,0x603c289b,0x568d5310,0x339e664f,0x62d0e527,0x51d53c3a,0x3b06de0b,0x62ec13db,0x45bce019,0x620fc251,0x22a4ccf8,0x24a37e0d,0x73fa15e0,0x3bdc4407,0x40a4f48d,0x5cc90e40,0x67fa4ee5,0x0125c7ee,0x2fe6c16e,0x7e1add4f,0x1c042b18,0x76bbddfb,0x4a2b4631,0x8048fa82,0x8a7b0aad,0x7bb56801,0x7d4a92d9,0x79315abf,0x7d5b2f01,0x88190c46,0x3401d0e0,0x8e4f4d4f,0x1c042b18,0x76bbddfb,0x4a2b4631,0x7f7528bb,0x5ced1bc0,0x302db8ee,0x2fe6c16e,0x7e1d8321,0x7bcd2355,0x4858de19,0x4a92d9fb,0x7bd13ad5,0x486e10a4,0x60fc23ac,0x4bb2b027,0x8d9ea76b,0x7e06c3b9,0x3005ff89,0x8cacd122,0x4d4023c9,0x795497cd,0x8048fa82,0x8a7a2921,0x7b93ea91,0x9b72aa8b,0x7ad992dc,0x8e2b4a44,0x6a8e48d8,0x8cacda82,0x78994d8f,0x83280aad,0x7bb567ee,0x6a841ea2,0x8bc262ad,0x82554aed,0x8067a0d0,0x6a378d0c,0x49a21dbd,0x5e513f9a,0x65251fca,0x93a180cd,0x80679cc0,0x5bb6f855,0x25ca3eb8,0x01745697,0x285cba96,0x09c5a2fa,0x0155f413,0x8f5c3585,0x55ebed57,0x7051cae3,0x9cf98367,0x704f4005,0x1133905e,0x0219c730,0x3830939a,0x02913d22,0x115f12a5,0x02a82e99,0x027a92f5,0x09ebc188,0x0c5dd2f5,0x09ebd997,0x0ede7342,0x05306d81,0x0c3e93e1,0x0c6bc9f9,0x0c7d12f1,0x0789e34a,0x0ebf33e2,0x0528b6d3,0x13a132f5,0x0c642c93,0x077bd2f2,0x04f9d45a,0x04fb32f2,0x02818247,0x051a7345,0x162044d3,0x0cc25043,0x0ecd8d62,0x079248fa,0x077af162,0x0762d2f6,0x115631e2,0x0c4ca486,0x18724d62,0x18a12d53,0x077bd2a4,0x0cc21f82,0x02813835,0x16860599,0x0c4583d9,0x2c029cd8,0x075c9345,0x111f3451,0x160292a4,0x113e43e4,0x11209528,0x0c456a31,0x2c09ee96,0x0c7c0091,0x2c291541,0x11365ea5,0x16383049,0x0c6c32a5,0x1397ec97,0x0791d0a3,0x0c5ca7e8,0x02b836a5,0x163f8433,0x13b730a3,0x04f1bb85,0x09e3f4a6,0x18b89e93,0x18a934a4,0x115dcd5a,0x18818ea4,0x09d3ed38,0x0a50d2fa,0x07727485,0x2c1221f7,0x077bd3e7,0x13af5ca2,0x13afa6a7,0x111fb6a3,0x13c69c27,0x18895ea3,0x0a0b33d1,0x2c020595,0x052933d1,0x2c098ae7,0x0edd46a3,0x2c1172a8,0x09d40723,0x2c219185,0x078b72a3,0x16863889,0x163f6ea7,0x0ef4b888,0x11a41daa,0x0c5c7502,0x0c73fd5a,0x0530d1e2,0x04ea4e96,0x0519ad23,0x2c21daa1,0x112f0831,0x2c194525,0x0c5526a6,0x0298a926,0x1889f4a6,0x1608bae3,0x18a0cea2,0x02a7fba1,0x0ebe56a6,0x163fe8d4,0x02982ea5,0x160293e9,0x163f84d6,0x11209482,0x138feae5,0x0cc21d55,0x16098241,0x0cc1eb5a,0x18b0e883,0x16860597,0x0a02cdd1,0x2c01ba99,0x1397b9a2,0x07dfd397,0x18918d51,0x2c0a21d8,0x02a7e2f5,0x2c098a45,0x187a36f1,0x2c098ae7,0x0edcfce7,0x2c20fa96,0x18995fd9,0x2c01bb33,0x13909902,0x0c6c4882,0x0ebf339a,0x05112b62,0x1398383a,0x0c73d0a8,0x07a1b7e2,0x187392a4,0x1136c029,0x077bd526,0x13906923,0x2c215ee4,0x18822183,0x2dc41040,0x67fa4ee0,0x2a12002b,0x6e9cf305,0x116a3990,0x6a5cf621,0xa8acba67,0x3bdc43e0,0x204da6ae,0x2da95320,0x2b1ccc2c,0x803aa126,0x92b3a768,0x9708c254,0x6078f2e9,0xb1bd4319,0x665b8683,0x1a48db3e,0x9e18d73c,0x973722d4,0x6078f2ce,0xb4c76950,0x92f0b125,0x97102267,0x25e9aeb0,0x649be0a0,0x9c4fcc1d,0x9c509167,0x25e9aeb0,0x21b6e822,0x93c342fd,0xb99be738,0xb1a29ec7,0x94523433,0x97282b4d,0xa8a21bd2,0x108966d4,0x6105743a,0x25568be0,0x93c35bfd,0x6649f143,0x115aa03d,0x9d6f5f1c,0x10b6892f,0x351dd8b0,0x10405825,0x803b3c1d,0x221502d1,0x7f60f709,0x040d0f68,0x9e192268,0x9708cf76,0x9e167f66,0x9708cf67,0x33bded95,0x61aeb8ad,0xa5cc9af6,0xaca23f1d,0xb24f6ff6,0xb4dee567,0x91ae1c4b,0x462ec570,};
w b=462;
w F[]={0,490399168,140644800,243467744,243474656,311927040,504602848,202613952,511838272,244524224,211230912,210183616,34841824,6325440,277292480,211256768,421759040,9640224,134,471015648,34841888,198720,346030080,136415360,9741760,244548640,6330630,487638464,471246272,244557088,488162752,211074336,599442976,368409920,3312673,12923174,382624,567424,74516608,277096930,238880,134418880,205656512,311731392,567426,128,578880,6595776,4194432,474091968,1044516992,591062560,4194438,504595936,581052960,106210528,588583040,480,588818560,71700544,404818304,209985728,34637280,1048710112,14694400,268706124,203491520,205656256,504595488,10627072,4657152,491520,71569472,72955190,136349824,9570592,545392672,};
float x,y=U.u.y*69;x=U.u.x*69;
uint c,i,d,Y,X=x;Y=y;i=X+(68-Y)*69;
if(i>=b&&i<3729){
d=(i-b)%11;
if(d<2)c=(d<<4)+1;
else if(d==10)c=18;
else c=(t[(i-b)/11]>>((7-((d-2)&7))*4)&15)+1;
}else{
if(i>b)i-=L-1;
c=t[i/4]>>((3-(i&3))*8)&255;}
if(i>b)i-=3267;
c=t[i/5];for(i%=5;i<4;i++)c/=80;c%=80;}
Y=(y-Y)*6;X=(x-X)*6;
return F[c]>>(X+Y*5)&1*(X<5);
}ENDCG}}}

View file

@ -1,4 +1,5 @@
w t[]={0x13140b0e,0x0f151617,0x16181319,0x0c13140b,0x0e0f1518,0x1a0b1b1b,0x181c1d1a,0x1e1f1d1e,0x20212223,0x150b2425,0x0b00260f,0x15270f11,0x00260228,0x2223150b,0x24250b00,0x10150b24,0x250f2927,0x00100228,0x222a290d,0x2b190e0f,0x162c292a,0x272d1c1d,0x2e0d242a,0x290d1628,0x220e0f10,0x2a290f00,0x2f000d30,0x291b2700,0x192a2927,0x281b2715,0x190d2700,0x2018102b,0x300b2705,0x0026311a,0x1f133233,0x321f3435,0x102b300b,0x27030019,0x31333637,0x1c1f1f1e,0x3801352c,0x34323339,0x3a3b361e,0x3336373a,0x32341a2c,0x333a3234,0x13332034,0x1c363a32,0x383c3528,0x1b271519,0x0d27003b,0x18102b30,0x0b270300,0x19313336,0x371c1f1f,0x1e380135,0x102b300b,0x27050026,0x31133b3a,0x1a1f1332,0x33321f34,0x352c3432,0x33393a3b,0x361e3336,0x373a1f2c,0x331a2c33,0x3a133336,0x1e361f3c,0x35283b00,0x26023d20,0x00263e18,0x3b003035,0x2c343233,0x393a1336,0x332c1a3a,0x32341333,0x20341c36,0x3a32383d,0x263e352c,0x34323339,0x3a323432,0x3332203f,0x3240363a,0x1f2c331a,0x2c333d3b,0x1200303e,0x352c3432,0x33393a32,0x34323332,0x203f3240,0x363a3b36,0x1e333637,0x3a1f2c33,0x1a2c333a,0x1333361e,0x361f3d30,0x3e35302e,0x26412c29,0x2a272d1f,0x0c420f0d,0x2733301c,0x2b2a231a,0x301b3d26,0x2e263e35,0x302e1941,0x262e1935,0x150f2719,0x15290030,0x353c2810,0x2b300b27,0x04001002,0x3d3b002c,0x3e31133b,0x3a330b15,0x240f2718,0x282f0027,0x43444118,0x453c3528,0x2f003f41,0x05020306,0x35282f00,0x0c410507,0x0935282f,0x00464344,0x41180112,0x050a0104,0x0a0a0207,0x09120205,0x01070505,0x09010112,0x03050405,0x07080805,0x05120305,0x04050805,0x07060712,0x0402020a,0x03080105,0x01120601,0x05070103,0x09050912,0x03010307,0x02040a06,0x03120602,0x02090409,0x03080312,0x03050506,0x03050303,0x05120302,0x02030401,0x0a020312,0x03020102,0x09040702,0x07120405,0x09050209,0x03051207,0x04030605,0x05011203,0x0808030a,0x03050901,0x12030202,0x03060708,0x07091205,0x03020806,0x0a010501,0x120a0705,0x01030305,0x12020405,0x12050802,0x01020607,0x05091204,0x05090502,0x09090912,0x020a0908,0x03011204,0x05070104,0x01010901,0x12060302,0x08030604,0x0a031202,0x04070502,0x06040701,0x120a0805,0x02080701,0x12030505,0x06050907,0x05011207,0x04040107,0x04011205,0x09080704,0x09050705,0x12050802,0x03050703,0x08031203,0x05050606,0x08010909,0x12050909,0x02070308,0x06031203,0x02020108,0x05040407,0x12060a0a,0x0505030a,0x08071204,0x07090501,0x0a0a0301,0x12040402,0x03070804,0x1202030a,0x03040208,0x05120409,0x03070305,0x12060708,0x05030512,0x08050602,0x07070109,0x12030808,0x010a070a,0x04011203,0x04090909,0x01120204,0x05050209,0x09090112,0x03010607,0x06070602,0x03120402,0x02080402,0x040a0312,0x06070805,0x03071202,0x03091206,0x08090909,0x01120706,0x0a060808,0x07120502,0x0a050504,0x03120508,0x05010a02,0x0a070912,0x02010505,0x0602070a,0x0a031206,0x0a020107,0x03060701,0x1205020a,0x05050409,0x12060105,0x060a060a,0x04071206,0x09020106,0x030a0701,0x12020107,0x03020106,0x03091206,0x09090609,0x04010501,0x12050901,0x12060909,0x09020906,0x07011208,0x02080101,0x06050512,0x05010509,0x02090401,0x05120301,0x0a0a0906,0x08030912,0x04050704,0x08030901,0x12020105,0x09080201,0x02020312,0x0205070a,0x05050101,0x12030709,0x08010702,0x03051203,0x0104050a,0x02060301,0x12030106,0x07060703,0x06071202,0x01070308,0x01080312,0x06010506,0x0a060509,0x09120507,0x06080206,0x0312050a,0x02060301,0x12080206,0x070a0508,0x03120803,0x0a060602,0x0a011202,0x04070405,0x0a090305,0x120a0608,0x01060a03,0x12060506,0x040a0307,0x0803123c,0x3528102b,0x300b2700,0x11122d41,0x2c2e192e,0x2d450806,0x3511412c,0x2e192e11,0x45080635,0x28192a29,0x27000d12,0x2a120e12,0x39123741,0x11353941,0x2d352a41,0x37473d08,0x0548393e,0x45080635,0x282a103d,0x2a49410c,0x4a4a2a4b,0x0c473f3e,0x18280e41,0x3d2a480c,0x3e4c0202,0x35282a10,0x3d0e4b03,0x3e0d413d,0x0e4b4b05,0x3e470235,0x280f2b1b,0x0f002a10,0x3d0e4141,0x02013e0d,0x41020935,0x280f2b1b,0x0f000d41,0x3d27433d,0x2a480c3e,0x4d020244,0x49493d3d,0x08483d3d,0x0e48033e,0x4a083e3e,0x45053e4a,0x02063e47,0x0235283c,0x0f2b1b0f,0x18282a10,0x3d2a490c,0x3e2a4841,0x3f480235,0x280d4127,0x432a4d05,0x4449493d,0x3d04483d,0x2a4a043e,0x3e45093e,0x4a030606,0x353c2839,0x413d2d48,0x393e4507,0x3537413d,0x1148373e,0x45073528,0x150f2719,0x15290046,0x430d4449,0x493d3747,0x3945063e,0x4a02453d,0x374b063e,0x35283c36,0x34381c1d,0x3c3c3c00,};
w L=4125;
w b=468;
w F[]={0,490399168,140644800,243467744,243474656,311927040,504602848,202613952,511838272,244524224,211230912,210183616,34841824,6325440,277292480,211256768,421759040,9640224,134,471015648,34841888,198720,346030080,521725392,136415360,9741760,244548640,6330630,487638464,471246272,244557088,488162752,211074336,599442976,368409920,3312673,12923174,382624,567424,74516608,277096930,238880,134418880,205656512,311731392,567426,128,578880,6595776,4194432,474091968,1044516992,591062560,4194438,504595936,581052960,106210528,588583040,480,588818560,71700544,404818304,209985728,34637280,1048710112,14694400,268706124,203491520,205656256,10627072,504595488,4657152,491520,71569472,72955190,136349824,9570592,545392672,};
w t[]={0x2f00576f,0x33f2c1f7,0x2f1fb204,0x1b49dda7,0x3d618237,0x42c83a2e,0x4541a121,0x53a72e14,0x1adea1c5,0x5d3cd90b,0x603c289b,0x568d5310,0x339e664f,0x62d0e527,0x51d53c3a,0x3b06de0b,0x62ec13db,0x45bce019,0x620fc251,0x22a4ccf8,0x24a37e0d,0x73fa15e0,0x3bdc4407,0x40a4f48d,0x5cc90e40,0x67fa4ee5,0x0125c7ee,0x2fe6c16e,0x7e1add4f,0x1c042b18,0x76bbddfb,0x4a2b4631,0x8048fa82,0x8a7b0aad,0x7bb56801,0x7d4a92d9,0x79315abf,0x7d5b2f01,0x88190c46,0x3401d0e0,0x8e4f4d4f,0x1c042b18,0x76bbddfb,0x4a2b4631,0x7f7528bb,0x5ced1bc0,0x302db8ee,0x2fe6c16e,0x7e1d8321,0x7bcd2355,0x4858de19,0x4a92d9fb,0x7bd13ad5,0x486e10a4,0x60fc23ac,0x4bb2b027,0x8d9ea76b,0x7e06c3b9,0x3005ff89,0x8cacd122,0x4d4023c9,0x795497cd,0x8048fa82,0x8a7a2921,0x7b93ea91,0x9b72aa8b,0x7ad992dc,0x8e2b4a44,0x6a8e48d8,0x8cacda82,0x78994d8f,0x83280aad,0x7bb567ee,0x6a841ea2,0x8bc262ad,0x82554aed,0x8067a0d0,0x6a378d0c,0x49a21dbd,0x5e513f9a,0x65251fca,0x93a180cd,0x80679cc0,0x5bb6f855,0x25ca3eb8,0x01745697,0x285cba96,0x09c5a2fa,0x0155f413,0x8f5c3585,0x55ebed57,0x7051cae3,0x9cf98367,0x704f4005,0x1133905e,0x0219c730,0x3830939a,0x02913d22,0x115f12a5,0x02a82e99,0x027a92f5,0x09ebc188,0x0c5dd2f5,0x09ebd997,0x0ede7342,0x05306d81,0x0c3e93e1,0x0c6bc9f9,0x0c7d12f1,0x0789e34a,0x0ebf33e2,0x0528b6d3,0x13a132f5,0x0c642c93,0x077bd2f2,0x04f9d45a,0x04fb32f2,0x02818247,0x051a7345,0x162044d3,0x0cc25043,0x0ecd8d62,0x079248fa,0x077af162,0x0762d2f6,0x115631e2,0x0c4ca486,0x18724d62,0x18a12d53,0x077bd2a4,0x0cc21f82,0x02813835,0x16860599,0x0c4583d9,0x2c029cd8,0x075c9345,0x111f3451,0x160292a4,0x113e43e4,0x11209528,0x0c456a31,0x2c09ee96,0x0c7c0091,0x2c291541,0x11365ea5,0x16383049,0x0c6c32a5,0x1397ec97,0x0791d0a3,0x0c5ca7e8,0x02b836a5,0x163f8433,0x13b730a3,0x04f1bb85,0x09e3f4a6,0x18b89e93,0x18a934a4,0x115dcd5a,0x18818ea4,0x09d3ed38,0x0a50d2fa,0x07727485,0x2c1221f7,0x077bd3e7,0x13af5ca2,0x13afa6a7,0x111fb6a3,0x13c69c27,0x18895ea3,0x0a0b33d1,0x2c020595,0x052933d1,0x2c098ae7,0x0edd46a3,0x2c1172a8,0x09d40723,0x2c219185,0x078b72a3,0x16863889,0x163f6ea7,0x0ef4b888,0x11a41daa,0x0c5c7502,0x0c73fd5a,0x0530d1e2,0x04ea4e96,0x0519ad23,0x2c21daa1,0x112f0831,0x2c194525,0x0c5526a6,0x0298a926,0x1889f4a6,0x1608bae3,0x18a0cea2,0x02a7fba1,0x0ebe56a6,0x163fe8d4,0x02982ea5,0x160293e9,0x163f84d6,0x11209482,0x138feae5,0x0cc21d55,0x16098241,0x0cc1eb5a,0x18b0e883,0x16860597,0x0a02cdd1,0x2c01ba99,0x1397b9a2,0x07dfd397,0x18918d51,0x2c0a21d8,0x02a7e2f5,0x2c098a45,0x187a36f1,0x2c098ae7,0x0edcfce7,0x2c20fa96,0x18995fd9,0x2c01bb33,0x13909902,0x0c6c4882,0x0ebf339a,0x05112b62,0x1398383a,0x0c73d0a8,0x07a1b7e2,0x187392a4,0x1136c029,0x077bd526,0x13906923,0x2c215ee4,0x18822183,0x2dc41040,0x67fa4ee0,0x2a12002b,0x6e9cf305,0x116a3990,0x6a5cf621,0xa8acba67,0x3bdc43e0,0x204da6ae,0x2da95320,0x2b1ccc2c,0x803aa126,0x92b3a768,0x9708c254,0x6078f2e9,0xb1bd4319,0x665b8683,0x1a48db3e,0x9e18d73c,0x973722d4,0x6078f2ce,0xb4c76950,0x92f0b125,0x97102267,0x25e9aeb0,0x649be0a0,0x9c4fcc1d,0x9c509167,0x25e9aeb0,0x21b6e822,0x93c342fd,0xb99be738,0xb1a29ec7,0x94523433,0x97282b4d,0xa8a21bd2,0x108966d4,0x6105743a,0x25568be0,0x93c35bfd,0x6649f143,0x115aa03d,0x9d6f5f1c,0x10b6892f,0x351dd8b0,0x10405825,0x803b3c1d,0x221502d1,0x7f60f709,0x040d0f68,0x9e192268,0x9708cf76,0x9e167f66,0x9708cf67,0x33bded95,0x61aeb8ad,0xa5cc9af6,0xaca23f1d,0xb24f6ff6,0xb4dee567,0x91ae1c4b,0x462ec570,};
w b=462;
uint magic_number_L_plus_b= 3729;
uint magic_number_L= 3267;
w F[]={0,490399168,140644800,243467744,243474656,311927040,504602848,202613952,511838272,244524224,211230912,210183616,34841824,6325440,277292480,211256768,421759040,9640224,134,471015648,34841888,198720,346030080,136415360,9741760,244548640,6330630,487638464,471246272,244557088,488162752,211074336,599442976,368409920,3312673,12923174,382624,567424,74516608,277096930,238880,134418880,205656512,311731392,567426,128,578880,6595776,4194432,474091968,1044516992,591062560,4194438,504595936,581052960,106210528,588583040,480,588818560,71700544,404818304,209985728,34637280,1048710112,14694400,268706124,203491520,205656256,504595488,10627072,4657152,491520,71569472,72955190,136349824,9570592,545392672,};

View file

@ -36,8 +36,8 @@ fn main() {
temp = 0;
}
}
if i > 0{
temp <<= (4-i)*8;
if i > 0 {
temp <<= (4 - i) * 8;
encoded_text.push(temp);
}
let mut out_string = String::new();
@ -82,7 +82,6 @@ fn main() {
file.write_all(out_string.as_bytes()).unwrap();
}
fn golfed() {
// source code conversion
let source_text = read_to_string("../Assets/test/quine_golf.shader").unwrap();
@ -90,12 +89,13 @@ fn golfed() {
let mut temp = 0;
let mut i = 0;
let mut blob_start = 0;
let mut used_charset:Vec<_> = " 0123456789abcdefx,".chars().collect();
let mut used_charset: Vec<_> = " 0123456789abcdefx,".chars().collect();
for (index, char) in source_text.chars().enumerate() {
if char == '*' && blob_start==0 {
if char == '?' && blob_start == 0 {
blob_start = index;
continue;
}
temp <<= 8;
temp *= 80;
let char_index = used_charset
.iter()
.position(|&c| c == char)
@ -103,16 +103,18 @@ fn golfed() {
used_charset.push(char);
used_charset.len() - 1
});
temp |= (char_index as u32) & 0xff;
temp += char_index as u32;
i += 1;
if i == 4 {
if i == 5 {
i = 0;
encoded_text.push(temp);
temp = 0;
}
}
if i > 0{
temp <<= (4-i)*8;
if i > 0 {
for _ in 0..(5 - i) {
temp *= 80;
}
encoded_text.push(temp);
}
let mut out_string = String::new();
@ -121,8 +123,12 @@ fn golfed() {
out_string += &format!("{t:#010x},");
}
out_string += "};\n";
out_string += &format!("w L={};\n", encoded_text.len()*11);
out_string += &format!("w b={blob_start};\n");
out_string += &format!(
"uint magic_number_L_plus_b= {};\n",
encoded_text.len() * 11 + blob_start
);
out_string += &format!("uint magic_number_L= {};\n", encoded_text.len() * 11);
// font
let img = ImageReader::open("6x6.png").unwrap().decode().unwrap();
@ -130,16 +136,14 @@ fn golfed() {
for c in used_charset {
let col = c as u32 & 0b1_1111;
let row = (c as u32 >> 5) & 0b111;
let mut encoded=0u32;
let mut encoded = 0u32;
for y in 0..6 {
for x in 0..5 {
let px = col * 6 + x;
let py = row * 6 + 5 - y;
let pixel = (img.get_pixel(px, py).0[0] >40) as u32;
let pixel = (img.get_pixel(px, py).0[0] > 40) as u32;
let offset = x + y * 5;
// if offset < 32{
encoded |= pixel << offset;
// }
encoded |= pixel << offset;
}
}
out.push(encoded);
@ -152,4 +156,4 @@ fn golfed() {
out_string += "};\n";
let mut file = File::create("out_golfed.h").unwrap();
file.write_all(out_string.as_bytes()).unwrap();
}
}