quine golf surface: fix quine-ness, switch shading type; 2955B
This commit is contained in:
parent
f8c4ec05d3
commit
fdff82a752
3 changed files with 8 additions and 8 deletions
|
@ -1,2 +1,2 @@
|
|||
Shader"h"{Properties{_t("",2D)=""}SubShader{CGPROGRAM #pragma surface s Standard
|
||||
struct Input{float2 uv_t;};void s(Input u,inout SurfaceOutputStandard o){float2 p=u.uv_t*55;uint t[]={0x2f00576f,0x33f2daf7,0x3b3e892f,0x341ab0cd,0x39140cc6,0x3642f521,0x53b01103,0x5843a14b,0x22a54455,0x5d855ba6,0x607b6a2b,0x401f30ed,0x1adde055,0x276739b0,0x46cee37b,0x70bc799e,0x73a439b4,0x208fff2e,0x4095ea40,0x78656b73,0x011e2b7b,0x7d997ab9,0x44c9692f,0x7699f55b,0x011b0aee,0x3e24e313,0x5889a37d,0x25db0c8a,0x58b8d37b,0x70bc799e,0x00c69040,0x78656b73,0x00ce7d74,0x596d96a5,0x0ed9e65c,0x7120f8a6,0x8752ea02,0x60e249b7,0x02fdec45,0x114e19a7,0x16307b32,0x076b20e2,0x0ef5e343,0x1600e954,0x2c214599,0x2c30e687,0x027939a4,0x0528e8d4,0x056eec44,0x111f52a7,0x0ef46dd1,0x11a45131,0x02bfd142,0x076ad596,0x09ecd345,0x0288d9a7,0x0528a0a9,0x114e474a,0x02fe5131,0x052149a2,0x0c4d2181,0x13b0d341,0x04fa0892,0x1147a434,0x09cc8042,0x2c01bbd9,0x1601cfa7,0x0762bea4,0x0a037af1,0x2c195d33,0x18b06ea8,0x113e5ba5,0x0f32eb57,0x04f286a4,0x09d3ed38,0x0a5168f8,0x13b0d2a1,0x0c83d044,0x2c020543,0x0eaf9342,0x2c09a341,0x18a966a4,0x09d49a58,0x18f6d2a2,0x112ebcf2,0x076b6c31,0x02fdebf5,0x02a82e02,0x0ebe5342,0x1146c387,0x16317434,0x0a036249,0x2c11a4a3,0x1601cfa7,0x0ef4b8d8,0x1685ebf8,0x02a8ac92,0x0eece74a,0x0a50d2a6,0x04fa51a1,0x2c01ee23,0x09d469a2,0x04f29be4,0x2c30ff36,0x2c0a38f9,0x114f7485,0x02b031d8,0x2c11a6d3,0x11a436f9,0x07dfd342,0x075b20a4,0x07dfd437,0x0298f6a4,0x05217be6,0x0f3304f2,0x09e40b32,0x052883e8,0x18726ba6,0x1155fdf9,0x2c219185,0x078b7483,0x13bf96a8,0x051996a2,0x04f281f8,0x0a5168fa,0x0ed51521,0x2c195d31,0x188990aa,0x0ee49aea,0x07dfeba2,0x02905953,0x02fdd342,0x075aeea3,0x114e1456,0x2c30e686,0x1879d7a4,0x02a85f52,0x560522ba,0x7f7aa3f2,0x4115efbc,0x54bd4cb6,0x0e0f5b85,0x0ed6a643,0x44dc0ffd,0x0528ae9e,0x46487bf3,0x16fd1332,0x4c8f9ca9,0x0acc10a2,0x7cebe64f,0x0951db4f,0x99f95b72,0xa18aeca2,0x046d0512,0x4c873fcc,0x928c8261,0xa3a2e36d,0x95e00adf,0x2192158e,0x148efece,0x05142b72,0x7d95f66d,0x25557ee2,0x4c8fb5a9,0x0acafdf1,0x0c610f32,0x4393b0f6,0x87d707e5,0x4c900aa6,0x7d63e8c3,0x462ebd5d,0xa49d8183,0x21b454d1,0x7d9a0bbf,0x4115fcf9,0x522fcf28,0x53f6ca51,0x9434c997,0x7d4b7101,0x1dc295f2,0x4d6aa901,0x829afa47,0x96cca8bb,0x8cc7b08e,0x0673f085,0x4f44d113},R[]={0,234663,68679,2265159,3280003,5348,7376003,3185831,233604,6592806,6600966,2234534,34023,6182,8665390,6601774,4267074,301257,65,6330631,1088809,6210,337920,4262980,7642145,206118,3312673,72774,1049633,133250,31,2130978,3319079,1116225,229600,2240642,5286,6587686,6337838,3312809,6595878,2270697,585393,11512810,12923174,11953,7465,272866,7407687,33826,5282,131202,32,166048,3179555,3213379,18157905,567428,567426,72768,7168,1118273,72955190,4260932,9570592,211030020,131200,266305,7375911,306601},X=p.x,Y=p.y,i=X+(54-Y)*55,c;if(i>182&&i<2228){c=(i-183)%11;c=c<2?(c<<4)+1:c==10?18:(t[(i-183)/11]>>(7-(c-2)&7)*4&15)+1;}else{i-=(i>183)*2044;c=t[i/5];for(i%=5;i<4;i++)c/=80;c%=80;}Y=(p.y-Y)*6;X=(p.x-X)*6;o.Albedo=(X<5)*R[c]>>(X+Y*5)&1;}ENDCG}}
|
||||
Shader"h"{Properties{t("",2D)=""}SubShader{CGPROGRAM #pragma surface s Lambert
|
||||
struct Input{float2 uvt;};void s(Input u,inout SurfaceOutput o){float2 p=u.uvt*55;uint t[]={0x2f00576f,0x33f2daf7,0x3b3e892f,0x341ab0cd,0x38fce4f6,0x2c0c8121,0x36653813,0x1de2677e,0x25455a65,0x3bc4bab6,0x62e85d3a,0x339f30cb,0x00e601a0,0x1b42071d,0x0160b0cc,0x2545c17d,0x42927f2b,0x0173e843,0x42a04f69,0x1bae3b23,0x7ae9f5d3,0x7ad81060,0x47bc061a,0x5645fb02,0x45d57c0b,0x0097e1a0,0x1b421353,0x42b99370,0x3e054431,0x3d6193f0,0x407f4b63,0x7aea1ee6,0x7d973b1b,0x00d84751,0x39326e16,0x874b0f62,0x0772bf37,0x0a5151d7,0x13d7e2f3,0x114613ea,0x2c118dd1,0x027939a6,0x09ebf6a8,0x0a032f51,0x0a5104a9,0x0eecb4b2,0x0772a631,0x0cc250ea,0x07996b42,0x114dc95a,0x114f72f3,0x09eba745,0x2c11bd53,0x0a514fa9,0x07e08337,0x0ec63a62,0x114dc9a8,0x13b0d393,0x11559b85,0x2c1159a3,0x0ee64436,0x2c291541,0x113677a2,0x02b833d1,0x18f74ff2,0x02fe0548,0x18818ea5,0x0789fe29,0x02fe6a35,0x07631ef2,0x075b7fa2,0x16860542,0x078a7952,0x13a03a85,0x2c01ba9a,0x1136a9a2,0x09e38ce1,0x2c09a341,0x18a966a4,0x09d49a58,0x18f6d2a2,0x112ebcf2,0x076b6c31,0x02fdebf5,0x02a82e02,0x0ebe5342,0x1146c387,0x16317434,0x0a036249,0x2c11a4a3,0x1601cfa7,0x0ef4b8d8,0x1685ebf8,0x02a8ac92,0x0eece74a,0x0a50d2a6,0x04fa51a1,0x2c01ee23,0x09d469a2,0x04f29be4,0x2c11a6d4,0x056eed83,0x163064a8,0x0c3d9a39,0x14156997,0x0f330549,0x078b73e3,0x161232a4,0x04f98a02,0x09dd32a7,0x111f4fe2,0x09d46b26,0x0ed6a343,0x0501a68a,0x2c0281a6,0x13d63af2,0x0edd7993,0x16863838,0x0c4d24a8,0x079231e2,0x139851e2,0x04f1d4d3,0x13a90483,0x189976aa,0x02fe1df7,0x02bf8502,0x1899a856,0x188332f2,0x04ea3451,0x075c92a4,0x04f98962,0x078a6041,0x0f336948,0x0ef452b2,0x09cc8131,0x05ed73a1,0x4111eed9,0x51614632,0x45635a8e,0x0ed2fdf0,0x81947bad,0x7d5f597c,0x94fd688e,0x983ee7f3,0x02a3073d,0x517e2ec2,0x139ad402,0x0671bf5d,0x99ecd26d,0x9bbbb73b,0x06e6ef71,0x04f029a9,0xa20f13fe,0x4630f482,0x502ba2d7,0x96cc80bc,0x49a96d10,0x979fb095,0x976e403b,0x0673c6e1,0x474477fc,0x517e2f12,0x139ad093,0x0290ccfd,0x51693f03,0x1058b019,0x34323021,0x10373fb5,0x7d639590,0x21cbabd1,0x7ceeda59,0x0402d3f1,0x4a0e465c,0x8c282f63,0x89bcc654,0x2b5b4235,0x12a7f168,0x78003b79,0x5180ebb6,0x4fc1d6ed,0x88298e98,0x91cd7f00,0x9772a5e4,0xa96abfb2,0x53020000},R[]={0,234663,68679,2265159,3280003,5348,7376003,3185831,233604,6592806,6600966,2234534,34023,6182,8665390,6601774,4267074,301257,65,6330631,1088809,6210,337920,4262980,7642145,206118,3312673,72774,1049633,133250,2130978,3319079,1116225,229600,2240642,5286,6587686,6337838,3312809,6595878,2270697,585393,11512810,12923174,11953,33831,272866,7407687,7465,33826,5282,131202,32,166048,3179555,3213379,18157905,567428,567426,72768,7168,1118273,72955190,4260932,9570592,211030020,131200,266305,7375911,306601},X=p.x,Y=p.y,i=X+(54-Y)*55,c;if(i>170&&i<2205){c=(i-171)%11;c=c<2?(c<<4)+1:c==10?18:(t[(i-171)/11]>>(7-(c-2)&7)*4&15)+1;}else{i-=(i>171)*2034;c=t[i/5];for(i%=5;i<4;i++)c/=80;c%=80;}Y=(p.y-Y)*6;X=(p.x-X)*6;o.Albedo=(X<5)*R[c]>>(X+Y*5)&1;}ENDCG}}
|
|
@ -1,5 +1,5 @@
|
|||
const uint t[]={0x2f00576f,0x33f2daf7,0x3b3e892f,0x341ab0cd,0x39140cc6,0x3642f521,0x53b01103,0x5843a14b,0x22a54455,0x5d855ba6,0x607b6a2b,0x401f30ed,0x1adde055,0x276739b0,0x46cee37b,0x70bc799e,0x73a439b4,0x208fff2e,0x4095ea40,0x78656b73,0x011e2b7b,0x7d997ab9,0x44c9692f,0x7699f55b,0x011b0aee,0x3e24e313,0x5889a37d,0x25db0c8a,0x58b8d37b,0x70bc799e,0x00c69040,0x78656b73,0x00ce7d74,0x596d96a5,0x0ed9e65c,0x7120f8a6,0x8752ea02,0x60e249b7,0x02fdec45,0x114e19a7,0x16307b32,0x076b20e2,0x0ef5e343,0x1600e954,0x2c214599,0x2c30e687,0x027939a4,0x0528e8d4,0x056eec44,0x111f52a7,0x0ef46dd1,0x11a45131,0x02bfd142,0x076ad596,0x09ecd345,0x0288d9a7,0x0528a0a9,0x114e474a,0x02fe5131,0x052149a2,0x0c4d2181,0x13b0d341,0x04fa0892,0x1147a434,0x09cc8042,0x2c01bbd9,0x1601cfa7,0x0762bea4,0x0a037af1,0x2c195d33,0x18b06ea8,0x113e5ba5,0x0f32eb57,0x04f286a4,0x09d3ed38,0x0a5168f8,0x13b0d2a1,0x0c83d044,0x2c020543,0x0eaf9342,0x2c09a341,0x18a966a4,0x09d49a58,0x18f6d2a2,0x112ebcf2,0x076b6c31,0x02fdebf5,0x02a82e02,0x0ebe5342,0x1146c387,0x16317434,0x0a036249,0x2c11a4a3,0x1601cfa7,0x0ef4b8d8,0x1685ebf8,0x02a8ac92,0x0eece74a,0x0a50d2a6,0x04fa51a1,0x2c01ee23,0x09d469a2,0x04f29be4,0x2c30ff36,0x2c0a38f9,0x114f7485,0x02b031d8,0x2c11a6d3,0x11a436f9,0x07dfd342,0x075b20a4,0x07dfd437,0x0298f6a4,0x05217be6,0x0f3304f2,0x09e40b32,0x052883e8,0x18726ba6,0x1155fdf9,0x2c219185,0x078b7483,0x13bf96a8,0x051996a2,0x04f281f8,0x0a5168fa,0x0ed51521,0x2c195d31,0x188990aa,0x0ee49aea,0x07dfeba2,0x02905953,0x02fdd342,0x075aeea3,0x114e1456,0x2c30e686,0x1879d7a4,0x02a85f52,0x560522ba,0x7f7aa3f2,0x4115efbc,0x54bd4cb6,0x0e0f5b85,0x0ed6a643,0x44dc0ffd,0x0528ae9e,0x46487bf3,0x16fd1332,0x4c8f9ca9,0x0acc10a2,0x7cebe64f,0x0951db4f,0x99f95b72,0xa18aeca2,0x046d0512,0x4c873fcc,0x928c8261,0xa3a2e36d,0x95e00adf,0x2192158e,0x148efece,0x05142b72,0x7d95f66d,0x25557ee2,0x4c8fb5a9,0x0acafdf1,0x0c610f32,0x4393b0f6,0x87d707e5,0x4c900aa6,0x7d63e8c3,0x462ebd5d,0xa49d8183,0x21b454d1,0x7d9a0bbf,0x4115fcf9,0x522fcf28,0x53f6ca51,0x9434c997,0x7d4b7101,0x1dc295f2,0x4d6aa901,0x829afa47,0x96cca8bb,0x8cc7b08e,0x0673f085,0x4f44d113}
|
||||
b=183;
|
||||
uint magic_number_L_plus_b= 2228;
|
||||
uint magic_number_L= 2044;
|
||||
const uint R[]={0,234663,68679,2265159,3280003,5348,7376003,3185831,233604,6592806,6600966,2234534,34023,6182,8665390,6601774,4267074,301257,65,6330631,1088809,6210,337920,4262980,7642145,206118,3312673,72774,1049633,133250,31,2130978,3319079,1116225,229600,2240642,5286,6587686,6337838,3312809,6595878,2270697,585393,11512810,12923174,11953,7465,272866,7407687,33826,5282,131202,32,166048,3179555,3213379,18157905,567428,567426,72768,7168,1118273,72955190,4260932,9570592,211030020,131200,266305,7375911,306601};
|
||||
const uint t[]={0x2f00576f,0x33f2daf7,0x3b3e892f,0x341ab0cd,0x38fce4f6,0x2c0c8121,0x36653813,0x1de2677e,0x25455a65,0x3bc4bab6,0x62e85d3a,0x339f30cb,0x00e601a0,0x1b42071d,0x0160b0cc,0x2545c17d,0x42927f2b,0x0173e843,0x42a04f69,0x1bae3b23,0x7ae9f5d3,0x7ad81060,0x47bc061a,0x5645fb02,0x45d57c0b,0x0097e1a0,0x1b421353,0x42b99370,0x3e054431,0x3d6193f0,0x407f4b63,0x7aea1ee6,0x7d973b1b,0x00d84751,0x39326e16,0x874b0f62,0x0772bf37,0x0a5151d7,0x13d7e2f3,0x114613ea,0x2c118dd1,0x027939a6,0x09ebf6a8,0x0a032f51,0x0a5104a9,0x0eecb4b2,0x0772a631,0x0cc250ea,0x07996b42,0x114dc95a,0x114f72f3,0x09eba745,0x2c11bd53,0x0a514fa9,0x07e08337,0x0ec63a62,0x114dc9a8,0x13b0d393,0x11559b85,0x2c1159a3,0x0ee64436,0x2c291541,0x113677a2,0x02b833d1,0x18f74ff2,0x02fe0548,0x18818ea5,0x0789fe29,0x02fe6a35,0x07631ef2,0x075b7fa2,0x16860542,0x078a7952,0x13a03a85,0x2c01ba9a,0x1136a9a2,0x09e38ce1,0x2c09a341,0x18a966a4,0x09d49a58,0x18f6d2a2,0x112ebcf2,0x076b6c31,0x02fdebf5,0x02a82e02,0x0ebe5342,0x1146c387,0x16317434,0x0a036249,0x2c11a4a3,0x1601cfa7,0x0ef4b8d8,0x1685ebf8,0x02a8ac92,0x0eece74a,0x0a50d2a6,0x04fa51a1,0x2c01ee23,0x09d469a2,0x04f29be4,0x2c11a6d4,0x056eed83,0x163064a8,0x0c3d9a39,0x14156997,0x0f330549,0x078b73e3,0x161232a4,0x04f98a02,0x09dd32a7,0x111f4fe2,0x09d46b26,0x0ed6a343,0x0501a68a,0x2c0281a6,0x13d63af2,0x0edd7993,0x16863838,0x0c4d24a8,0x079231e2,0x139851e2,0x04f1d4d3,0x13a90483,0x189976aa,0x02fe1df7,0x02bf8502,0x1899a856,0x188332f2,0x04ea3451,0x075c92a4,0x04f98962,0x078a6041,0x0f336948,0x0ef452b2,0x09cc8131,0x05ed73a1,0x4111eed9,0x51614632,0x45635a8e,0x0ed2fdf0,0x81947bad,0x7d5f597c,0x94fd688e,0x983ee7f3,0x02a3073d,0x517e2ec2,0x139ad402,0x0671bf5d,0x99ecd26d,0x9bbbb73b,0x06e6ef71,0x04f029a9,0xa20f13fe,0x4630f482,0x502ba2d7,0x96cc80bc,0x49a96d10,0x979fb095,0x976e403b,0x0673c6e1,0x474477fc,0x517e2f12,0x139ad093,0x0290ccfd,0x51693f03,0x1058b019,0x34323021,0x10373fb5,0x7d639590,0x21cbabd1,0x7ceeda59,0x0402d3f1,0x4a0e465c,0x8c282f63,0x89bcc654,0x2b5b4235,0x12a7f168,0x78003b79,0x5180ebb6,0x4fc1d6ed,0x88298e98,0x91cd7f00,0x9772a5e4,0xa96abfb2,0x53020000}
|
||||
b=171;
|
||||
uint magic_number_L_plus_b= 2205;
|
||||
uint magic_number_L= 2034;
|
||||
const uint R[]={0,234663,68679,2265159,3280003,5348,7376003,3185831,233604,6592806,6600966,2234534,34023,6182,8665390,6601774,4267074,301257,65,6330631,1088809,6210,337920,4262980,7642145,206118,3312673,72774,1049633,133250,2130978,3319079,1116225,229600,2240642,5286,6587686,6337838,3312809,6595878,2270697,585393,11512810,12923174,11953,33831,272866,7407687,7465,33826,5282,131202,32,166048,3179555,3213379,18157905,567428,567426,72768,7168,1118273,72955190,4260932,9570592,211030020,131200,266305,7375911,306601};
|
||||
|
|
|
@ -128,7 +128,7 @@ fn golfed() {
|
|||
"uint magic_number_L_plus_b= {};\n",
|
||||
encoded_text.len() * 11 + blob_start - 1
|
||||
);
|
||||
out_string += &format!("uint magic_number_L= {};\n", encoded_text.len() * 11 - 2);
|
||||
out_string += &format!("uint magic_number_L= {};\n", encoded_text.len() * 11 - 1);
|
||||
|
||||
// font
|
||||
let img = ImageReader::open("6x6.png").unwrap().decode().unwrap();
|
||||
|
|
Loading…
Reference in a new issue