ããã©ãŒãã³ã¹ãããã¡ã€ã©ãŒã®éçºãéå§ãããšããã»ãšãã©ãã¹ãŠã®UIã¬ã³ããªã³ã°ãèªåã§è¡ãããšãããã£ãŠããŸããã ããã«ããã©ã³ãã®ã¬ã³ããªã³ã°ã«ã©ã®ã¢ãããŒããéžæãããã決å®ããå¿ èŠããããŸããã 次ã®èŠä»¶ããããŸããã
- WindowsãŠãŒã¶ãŒãéžæããã·ã¹ãã ãã©ã³ããšãã®ãµã€ãºã«é©å¿ããããã«ãä»»æã®ãµã€ãºã®ãã©ã³ãããªã¢ã«ã¿ã€ã ã§ã¬ã³ããªã³ã°ã§ããå¿ èŠããããŸãã
- ãã©ã³ãã®ã¬ã³ããªã³ã°ã¯éåžžã«é«éã§ããå¿ èŠãããããã©ã³ãã®ã¬ã³ããªã³ã°æã«ãã¬ãŒãããããããšã¯ã§ããŸããã
- UIã«ã¯å€æ°ã®æ»ãããªã¢ãã¡ãŒã·ã§ã³ããããããããã¹ãã¯ç»é¢äžãã¹ã ãŒãºã«ç§»åã§ããå¿ èŠããããŸãã
- å°ããªãã©ã³ããµã€ãºã§èªã¿ãããã¯ãã§ãã
åœæã¯å°é家ã§ã¯ãªãã£ããããã€ã³ã¿ãŒãããã§æ å ±ãæ€çŽ¢ãããã©ã³ãã®ã¬ã³ããªã³ã°ã«äœ¿çšãããå€ãã®ææ³ãèŠã€ããŸããã ãŸããã²ãªã©ã²ãŒã ãºã®ãã¯ãã«ã«ãã£ã¬ã¯ã¿ãŒãããã€ã«ã»ãã¡ã³ã»ãã«ã»ã«ãŒãšè©±ãããŸããã ãã®äŒç€Ÿã¯ããŸããŸãªãã©ã³ãã¬ã³ããªã³ã°æ¹æ³ãè©Šãããã®ã¬ã³ããªã³ã°ãšã³ãžã³ã¯äžçã§ãæé«ã®ãã®ã®1ã€ã§ããã Mihilã¯ãæ°ãããã©ã³ãã¬ã³ããªã³ã°ææ³ã®ã¢ã€ãã¢ãç°¡åã«èª¬æããŸããã ãã§ã«ååãªãã¯ããã¯ãå©çšã§ããã¯ãã§ããããã®ã¢ã€ãã¢ã¯ç§ãé äºããç§ã«éãããçŽ æŽããããã©ã³ãã¬ã³ããªã³ã°ã®äžçã«æ³šæãæããã«ããããå®è£ ãå§ããŸããã
ãã®äžé£ã®èšäºã§ã¯ã䜿çšããææ³ã詳现ã«èª¬æãã説æã3ã€ã®éšåã«åããŸãã
- æåã®éšåã§ã¯ãåäžãªã°ãªãããããµã³ããªã³ã°ããã16xAAã䜿çšããŠãã°ãªãããªã¢ã«ã¿ã€ã ã§ã¬ã³ããªã³ã°ããæ¹æ³ãåŠç¿ããŸãã
- 2çªç®ã®éšåã§ã¯ãå転ããã°ãªããã«ç§»åããŠãæ°Žå¹³ãšããžãšåçŽãšããžã®ã¢ã³ããšã€ãªã¢ã¹ãçŸããå®è¡ããŸãã ãŸããå®æããã·ã§ãŒããŒãã»ãŒå®å šã«1ã€ã®ãã¯ã¹ãã£ãšã«ãã¯ã¢ããããŒãã«ã«åæžãããæ§åã確èªããŸãã
- 3çªç®ã®éšåã§ã¯ã ComputeãšCPUã䜿çšããŠãã°ãªãããªã¢ã«ã¿ã€ã ã§ã©ã¹ã¿ã©ã€ãºããæ¹æ³ãåŠç¿ããŸãã
ãããã¡ã€ã©ãŒã§å®æããçµæã確èªããããšãã§ããŸããã以äžã¯ãã©ã³ãã¬ã³ãã©ãŒã䜿çšããŠã¬ã³ããªã³ã°ãããSegoe UIãã©ã³ãã®ç»é¢ã®äŸã§ãã
ããã¯ãæåSã®å¢å ã§ãã©ã¹ã¿ã©ã€ãºããããµã€ãºã¯ããã6x9ãã¯ã»ã«ã§ãã å ã®ãã¯ã¿ãŒããŒã¿ã¯ãã¹ãšããŠã¬ã³ããªã³ã°ãããå転ãããµã³ãã«ãã¿ãŒã³ã¯ç·ãšèµ€ã®é·æ¹åœ¢ããã¬ã³ããªã³ã°ãããŸãã 6Ã9ãããã¯ããã«é«ã解å床ã§ã¬ã³ããªã³ã°ããããããã°ã¬ãŒã®ã·ã§ãŒãã¯æçµçãªãã¯ã»ã«ã®ã·ã§ãŒãã§ã¯è¡šçŸãããããµããã¯ã»ã«ã®è²çžã衚瀺ãããŸãã ããã¯ããµããã¯ã»ã«ã¬ãã«ã§ã®ãã¹ãŠã®èšç®ãæ£ããæ©èœããŠããããšã確èªããããã®éåžžã«äŸ¿å©ãªãããã°èŠèŠåã§ãã
ã¢ã€ãã¢ïŒã·ã§ãŒãã®ä»£ããã«ã³ãŒãã£ã³ã°ãä¿åãã
ãã©ã³ãã¬ã³ãã©ãŒã察åŠããå¿ èŠãããäž»ãªåé¡ã¯ãã¹ã±ãŒã©ãã«ãªãã¯ã¿ãŒãã©ã³ãããŒã¿ãåºå®ãã¯ã»ã«ã°ãªããã«è¡šç€ºããããšã§ãã ããŸããŸãªææ³ã§ãã¯ãã«ç©ºéããå®æãããã¯ã»ã«ã«ç§»è¡ããæ¹æ³ã¯éåžžã«ç°ãªããŸãã ãããã®ææ³ã®ã»ãšãã©ã§ã¯ãç¹å®ã®ãµã€ãºïŒãã¯ã»ã«åäœïŒãååŸããããã«ãäžæçãªã¹ãã¬ãŒãžïŒãã¯ã¹ãã£ãªã©ïŒã«ã¬ã³ããªã³ã°ããåã«æ²ç·ããŒã¿ãã©ã¹ã¿ã©ã€ãºãããŸãã äžæã¹ãã¬ãŒãžã¯ã°ãªããã£ãã·ã¥ãšããŠäœ¿çšãããŸããåãã°ãªããè€æ°åã¬ã³ããªã³ã°ããããšãã°ãªãããã£ãã·ã¥ããååŸãããåã©ã¹ã¿ã©ã€ãºãåé¿ããããã«åå©çšãããŸãã
ææ³ã®éãã¯ãããŒã¿ãäžéããŒã¿åœ¢åŒã§ä¿åãããæ¹æ³ã«ã¯ã£ãããšçŸããŠããŸãã ããšãã°ãWindowsãã©ã³ãã·ã¹ãã ã¯ãã°ãªããç¹å®ã®ãµã€ãºïŒãã¯ã»ã«åäœïŒã«ã©ã¹ã¿ã©ã€ãºããŸãã ããŒã¿ã¯ãã¯ã»ã«ããšã®è²çžãšããŠä¿åãããŸãã ã·ã§ãŒãã¯ããã®ãã¯ã»ã«ã®ã°ãªãã«ããã«ãã¬ããžã®æé©ãªè¿äŒŒãè¡šããŸãã ã¬ã³ããªã³ã°ãããšãããã¯ã»ã«ã¯åã«ã°ãªããã£ãã·ã¥ããã¿ãŒã²ãããã¯ã»ã«ã°ãªããã«ã³ããŒãããŸãã ããŒã¿ããã¯ã»ã«åœ¢åŒã«å€æãããšãã¹ã±ãŒãªã³ã°ãããŸãè¡ãããªãããããºãŒã ã¢ãŠããããšãã¡ãžãŒã°ãªãã衚瀺ããããºãŒã ã€ã³ãããšãããã¯ãã¯ã£ãããšèŠããã°ãªãã衚瀺ãããŸãã ãããã£ãŠãæçµãµã€ãºããšã«ãã°ãªãã¯ã°ãªããã£ãã·ã¥ã«ã¬ã³ããªã³ã°ãããŸãã
笊å·ä»ãè·é¢ãã£ãŒã«ãã¯ãç°ãªãã¢ãããŒãã䜿çšããŸãã ãã¯ã»ã«ã®è²çžã®ä»£ããã«ãã°ãªãã®æãè¿ã端ãŸã§ã®è·é¢ãç¶æãããŸãã ãã®æ¹æ³ã®å©ç¹ã¯ã湟æ²ãããšããžã®å Žåãã·ã§ãŒããããããŒã¿ã¹ã±ãŒã«ãã¯ããã«åªããŠããããšã§ãã ã°ãªãããºãŒã ã€ã³ããŠããæ²ç·ã¯æ»ãããªãŸãŸã§ãã ãã®ã¢ãããŒãã®æ¬ ç¹ã¯ããŸã£ããã§éããšããžãæ»ããã«ãªãããšã§ãã SDFãããã¯ããã«åªããŠããã®ã¯ãã«ã©ãŒããŒã¿ãä¿åããFreeTypeãªã©ã®é«åºŠãªãœãªã¥ãŒã·ã§ã³ã§ãã
ãã¯ã»ã«ã®è²çžãä¿æãããŠããå ŽåããŸããã®ã«ãã¬ããžãèšç®ããå¿ èŠããããŸãã ããšãã°ãstb_truetypeã«ã¯ãã«ãã¬ããžãšè²çžã®èšç®æ¹æ³ã®è¯ãäŸããããŸãã ã«ãã¬ããžãæŠç®ããå¥ã®äžè¬çãªæ¹æ³ã¯ãæçµè§£å床ãããé«ãåšæ³¢æ°ã§ã°ãªãããµã³ããªã³ã°ããããšã§ãã ããã¯ãã¿ãŒã²ãããã¯ã»ã«é åã®ã°ãªãã«åãŸããµã³ãã«ã®æ°ãã«ãŠã³ãããŸãã ãããæ°ãå¯èœãªãµã³ãã«ã®æ倧æ°ã§å²ãããšã«ãããè²çžã決ãŸããŸãã ã«ãã¬ããžã¯æ¢ã«ç¹å®ã®ãã¯ã»ã«ã°ãªãã解å床ãšé 眮ã®è²çžã«å€æãããŠãããããã¿ãŒã²ãããã¯ã»ã«éã«ã°ãªããé 眮ããããšã¯ã§ããŸãããã¿ãŒã²ãããã¯ã»ã«ãŠã£ã³ããŠã®ãµã³ãã«ã§ãè²çžã¯çã®ã«ãã¬ããžãæ£ããåæ ã§ããŸããã ãã®ããããŸãåŸã§æ€èšããä»ã®çç±ãšåæ§ã«ããã®ãããªã·ã¹ãã ã¯ãµããã¯ã»ã«ã®ç§»åããµããŒãããŠããŸããã
ããããã°ãªãããã¯ã»ã«éã§èªç±ã«ç§»åããå¿ èŠãããå Žåã¯ã©ãã§ããããïŒ è²çžãäºåã«èšç®ãããŠããå Žåãã¿ãŒã²ãããã¯ã»ã«é åå ã®ãã¯ã»ã«éã移åãããšãã«è²çžãã©ãããã¹ãããç¥ãããšãã§ããŸããã ãã ããã¬ã³ããªã³ã°æã«ã«ãã¬ããžããè²çžãžã®å€æãé ãããããšãã§ããŸãã ãããè¡ãããã«ãæ¥é°ã§ã¯ãªãã³ãŒãã£ã³ã°ãä¿åããŸãã 16åã®ã¿ãŒã²ãã解å床ã®é »åºŠã§ã°ãªãããµã³ããªã³ã°ããåãµã³ãã«ã«å¯ŸããŠ1ããããä¿åããŸãã 4Ã4ã°ãªããã§ãµã³ããªã³ã°ããå Žåããã¯ã»ã«ããã16ãããã®ã¿ãä¿åããã°ååã§ãã ãããã«ããŒãã¹ã¯ã«ãªããŸãã ã¬ã³ããªã³ã°äžã«ããã¯ã»ã«ãªããžããªãšåã解å床ãæã¡ãªããç©ççã«ã¢ã¿ãããããŠããªãã¿ãŒã²ãããã¯ã»ã«ãŠã£ã³ããŠã«å°éãããããæ°ãã«ãŠã³ãããå¿ èŠããããŸãã 以äžã®ã¢ãã¡ãŒã·ã§ã³ã¯ã4ã€ã®ãã¯ã»ã«ã§ã©ã¹ã¿ã©ã€ãºãããã°ãªãïŒéïŒã®äžéšã瀺ããŠããŸãã åãã¯ã»ã«ã¯4Ã4ã»ã«ã®ã°ãªããã«åå²ãããŸãã ç°è²ã®é·æ¹åœ¢ã¯ãã°ãªããåçã«ç§»åãããã¯ã»ã«ãŠã£ã³ããŠã瀺ããŸãã å®è¡æã«ããã¯ã»ã«ãŠã£ã³ããŠã«å ¥ããµã³ãã«ã®æ°ãã«ãŠã³ããããè²çžã決å®ãããŸãã
åºæ¬çãªãã©ã³ãã¬ã³ããªã³ã°ææ³ã«ã€ããŠç°¡åã«èª¬æããŸã
ãã©ã³ãã¬ã³ããªã³ã°ã·ã¹ãã ã®å®è£ ã«ã€ããŠèª¬æããåã«ããã®ããã»ã¹ã§äœ¿çšãããäž»ãªææ³ã§ãããã©ã³ããã³ããšãµããã¯ã»ã«ã¬ã³ããªã³ã°ïŒãã®ææ³ã¯Windowsã§ã¯ClearTypeãšåŒã°ããŸãïŒã«ã€ããŠç°¡åã«èª¬æããŸãã ã¢ã³ããšã€ãªã¢ã¹æè¡ã®ã¿ã«é¢å¿ãããå Žåã¯ããã®ã»ã¯ã·ã§ã³ãã¹ãããã§ããŸãã
ã¬ã³ãã©ãŒãå®è£ ããéçšã§ããã©ã³ãã¬ã³ããªã³ã°ã®éçºã®é·ãæŽå²ã«ã€ããŠããå€ãã®ããšãåŠã³ãŸããã ç 究ã§ã¯ããã©ã³ãã¬ã³ããªã³ã°ã®å¯äžã®åŽé¢ã§ããå°ããªãµã€ãºã§ã®èªã¿ãããã«çŠç¹ãåœãŠãŠããŸãã 倧ããªãã©ã³ãçšã«åªããã¬ã³ãã©ãŒãäœæããããšã¯éåžžã«ç°¡åã§ãããå°ããªãµã€ãºã§èªã¿ããããç¶æããã·ã¹ãã ãäœæããããšã¯éåžžã«å°é£ã§ãã ãã©ã³ãã¬ã³ããªã³ã°ã®ç 究ã«ã¯é·ãæŽå²ãããããã®æ·±ãã«ã¯ç®ãèŠåŒµããã®ããããŸãã ããšãã°ã ã©ã¹ã¿ãŒã®æ²åã«ã€ããŠèªãã§ãã ããã ã³ã³ãã¥ãŒã¿ãŒã®åæ段éã§ã¯ç»é¢ã®è§£å床ãéåžžã«äœãã£ãããããããã³ã³ãã¥ãŒã¿ãŒã®å°é家ã«ãšã£ãŠäž»èŠãªåé¡ã§ãã£ãããšã¯è«ççã§ãã ããã¯ãOSéçºè ã察åŠããªããã°ãªããªãã£ãæåã®ã¿ã¹ã¯ã®1ã€ã§ãã£ãã«éããããŸãããäœç»é¢è§£å床ã®ããã€ã¹ã§ããã¹ããèªã¿ãããããæ¹æ³ã§ããã é©ããããšã«ãé«å質ã®ãã©ã³ãã¬ã³ããªã³ã°ã·ã¹ãã ã¯éåžžã«ãã¯ã»ã«æåã§ãã ããšãã°ãã°ãªãã¯ããã¯ã»ã«ã®å¢çããå§ãŸããå¹ ããã¯ã»ã«æ°ã®åæ°ã«ãªãããã«æ§ç¯ãããã³ã³ãã³ãã¯ãã¯ã»ã«ã«åãããŠèª¿æŽãããŸãã ãã®ææ³ã¯ãã¡ãã·ã¥äœæãšåŒã°ããŸãã ç§ã¯ã³ã³ãã¥ãŒã¿ãŒã²ãŒã ã3Dã°ã©ãã£ãã¯ã¹ã§äœæ¥ããããšã«æ £ããŠããŸããäžçã¯ãŠãããããæ§ç¯ããããã¯ã»ã«ã«æ圱ãããŠããã®ã§ãå°ãé©ããŸããã ãã©ã³ãã¬ã³ããªã³ã°ã®åéã§ã¯ããããéåžžã«éèŠãªéžæã§ããããšãããããŸããã
ã¡ãã·ã¥äœæã®éèŠæ§ã瀺ãããã«ãã°ãªãã©ã¹ã¿ã©ã€ãºã®å¯èœãªã·ããªãªãèŠãŠã¿ãŸãããã ã°ãªãããã¯ã»ã«ã°ãªããã«ã©ã¹ã¿ã©ã€ãºãããŠããããã°ãªãã®åœ¢ç¶ãã°ãªããæ§é ãšå®å šã«äžèŽããŠããªããšæ³åããŠãã ããã
ã¢ã³ããšã€ãªã¢ã¹ã¯ãã°ãªãã®å·Šå³ã®ãã¯ã»ã«ãçããã°ã¬ãŒã«ããŸãã ã°ãªãããã¯ã»ã«ã®å¢çã«ããããäžèŽããããã«ãããã«ã·ããããããšã1ã€ã®ãã¯ã»ã«ã®ã¿ãè²ä»ããããå®å šã«é»ã«ãªããŸãã
ã°ãªãããã¯ã»ã«ã«ããäžèŽããããã«ãªã£ããããè²ã®ãŒãããå°ãªããªããŸããã ã·ã£ãŒããã¹ã®éãã¯éåžžã«å€§ããã§ãã 西æŽã®ãã©ã³ãã«ã¯ãæ°Žå¹³ç·ãšåçŽç·ã®ä»ããå€ãã®ã°ãªããããããã¯ã»ã«ã°ãªãããšããŸãäžèŽããªãå Žåãã°ã¬ãŒã®é°åœ±ã«ãã£ãŠãã©ã³ãããŒãããŸãã æé«ã®ã¢ã³ããšã€ãªã¢ã¹æè¡ã§ããããã®åé¡ã«å¯ŸåŠããããšã¯ã§ããŸããã
ãœãªã¥ãŒã·ã§ã³ãšããŠãã©ã³ããã³ããææ¡ãããŸããã ãã©ã³ãäœæè ã¯ãã°ãªããå®å šã«åãŸããªãå Žåã«ã°ãªãããã¯ã»ã«ã«ã¹ãããããæ¹æ³ã«é¢ããæ å ±ããã©ã³ãã«è¿œå ããå¿ èŠããããŸãã ãã©ã³ãã¬ã³ããªã³ã°ã·ã¹ãã ã¯ããããã®æ²ç·ãæªãŸããŠãã¯ã»ã«ã°ãªããã«ã¹ãããããŸãã ããã«ããããã©ã³ãã®æçããå€§å¹ ã«åäžããŸããã代åã䌎ããŸãã
- ãã©ã³ãããããã«æªã ã ãã©ã³ãã¯æå³ãããšããã«ã¯èŠããŸããã
- ãã¹ãŠã®ã°ãªãã¯ããã¯ã»ã«ã°ãªããïŒã°ãªãã®å é ãšã°ãªãã®å¹ ïŒã«ã¢ã¿ããããå¿ èŠããããŸãã ãããã£ãŠããã¯ã»ã«éã§ã¢ãã¡ãŒã·ã§ã³åããããšã¯ã§ããŸããã
èå³æ·±ãããšã«ããã®åé¡ã解決ããããã«ãAppleãšMicrosoftã¯ç°ãªãæ¹æ³ã§åãçµã¿ãŸããã Microsoftã¯çµ¶å¯Ÿçãªæå¿«ããå æããAppleã¯ãã©ã³ããããæ£ç¢ºã«è¡šç€ºããããšãç®æããŠããŸãã ã€ã³ã¿ãŒãããã§ã¯ãAppleãã·ã³ã§ãŒããããã©ã³ãã«ã€ããŠäžæºãèšã人ãããŸãããå€ãã®äººã¯Appleã§èŠããã®ã奜ãã§ãã ããã¯éšåçã«å¥œã¿ã®åé¡ã§ãã ãœãããŠã§ã¢ã«é¢ããJoelã®æçš¿ãšããã®ãããã¯ã«é¢ããPeter Bilakã®æçš¿ããããŸãã ãã€ã³ã¿ãŒããããæ€çŽ¢ãããšãããã«å€ãã®æ å ±ãèŠã€ããããšãã§ããŸãã
çŸä»£ã®ç»é¢ã®DPI解å床ã¯æ¥éã«åäžããŠãããããçŸåšãšåæ§ã«ãå°æ¥ãã©ã³ããã³ãã£ã³ã°ãå¿ èŠãã©ããã«ã€ããŠçåãçããŸãã ç§ã®çŸåšã®ç¶æ ã§ã¯ããã©ã³ãã®ãã³ãã¯ããã©ã³ããæ確ã«ã¬ã³ããªã³ã°ããããã®éåžžã«äŸ¡å€ã®ããææ³ã§ããããšãããããŸãã ãã ããã°ãªãã¯ãããããšãªããã£ã³ãã¹ã«èªç±ã«é 眮ã§ãããããç§ã®èšäºã§èª¬æãããŠããææ³ã¯å°æ¥ãèå³æ·±ã代æ¿æ段ã«ãªãå¯èœæ§ããããŸãã ãŸããããã¯æ¬è³ªçã«ã¢ã³ããšã€ãªã¢ã·ã³ã°ææ³ã§ããããããã©ã³ãã®ã¬ã³ããªã³ã°ã ãã§ãªããããããç®çã«äœ¿çšã§ããŸãã
æåŸã«ã ãµããã¯ã»ã«ã¬ã³ããªã³ã°ã«ã€ããŠç°¡åã«èª¬æããŸã ã éå»ã«ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãã¿ãŒã®åã ã®èµ€ãç·ãéã®å ç·ã䜿çšããããšã§ãç»é¢ã®æ°Žå¹³è§£å床ã3åã«ã§ããããšã«æ°ä»ããŸããã åãã¯ã»ã«ã¯ãç©ççã«åé¢ããããããã®å ç·ããæ§ç¯ãããŸãã ç§ãã¡ã®ç®ã¯ããããã®å€ãæ··åããŠãåäžã®ãã¯ã»ã«è²ãäœæããŸãã ã°ãªãããã¯ã»ã«ã®äžéšã®ã¿ãã«ããŒããå Žåãã°ãªãã«éç³ãããŠããã¬ã€ã®ã¿ããªã³ã«ãªãã氎平解å床ã3åã«ãªããŸãã ClearTypeãªã©ã®ææ³ã䜿çšããŠç»é¢ã€ã¡ãŒãžãæ¡å€§ãããšãã°ãªãã®ç«¯ã®åšãã®è²ãèŠãããšãã§ããŸãã
èå³æ·±ãããšã«ããã®èšäºã§èª¬æããã¢ãããŒãã¯ããµããã¯ã»ã«ã¬ã³ããªã³ã°ã«æ¡åŒµã§ããŸãã ãã§ã«ãããã¿ã€ããå®è£ ããŠããŸãã å¯äžã®æ¬ ç¹ã¯ãClearTypeãªã©ã®ææ³ã«ãã£ã«ã¿ãªã³ã°ãè¿œå ããããããããå€ãã®ãã¯ã¹ãã£ãµã³ãã«ãååŸããå¿ èŠãããããšã§ãã ããããç§ã¯å°æ¥ãããæ€èšããã§ãããã
åäžãªã°ãªããã䜿çšããã°ãªãã¬ã³ããªã³ã°
ã¿ãŒã²ããã®16åã®è§£å床ã§ã°ãªãããµã³ããªã³ã°ãããã¯ã¹ãã£ã«ä¿åãããšããŸãã ãããã©ã®ããã«è¡ããããã«ã€ããŠã¯ãèšäºã®ç¬¬3éšã§èª¬æããŸãã ãµã³ããªã³ã°ãã¿ãŒã³ã¯åäžãªã°ãªããã§ããã€ãŸãã16åã®ãµã³ããªã³ã°ãã€ã³ãããã¯ã»ã«å šäœã«åçã«ååžããŠããŸãã åã°ãªãã¯ã¿ãŒã²ãã解å床ãšåã解å床ã§ã¬ã³ããªã³ã°ããããã¯ã»ã«ããšã«16ããããæ ŒçŽããåãããã¯ãµã³ãã«ã«å¯Ÿå¿ããŸãã ã«ãã¬ããžãã¹ã¯ã®èšç®ããã»ã¹ã§èŠãããã«ããµã³ãã«ã®ä¿åé åºã¯éèŠã§ãã äžè¬ã«ã1ã€ã®ãã¯ã»ã«ã®ãµã³ããªã³ã°ãã€ã³ããšãã®äœçœ®ã¯æ¬¡ã®ããã«ãªããŸãã
ãã¯ã»ã«ãååŸãã
ãã¯ã»ã«ã«ä¿åãããŠããã«ãã¬ããžãããã ããã¯ã»ã«ãŠã£ã³ããŠãã·ããããŸãã 次ã®è³ªåã«çããå¿ èŠããããŸãïŒãã¯ã»ã«ãŠã£ã³ããŠã«ããã€ã®ãµã³ãã«ãå ¥ããïŒ æ¬¡ã®å³ã«ç€ºãããŠããŸãã
ããã«ã¯ãã°ãªããéšåçã«éãããã4ã€ã®ãã¯ã»ã«ããããŸãã 1ã€ã®ãã¯ã»ã«ïŒéã§ããŒã¯ïŒããã¯ã»ã«ã®äžéšãã«ããŒããŸãã ãã¯ã»ã«ãŠã£ã³ããŠã亀差ãããµã³ãã«æ°ã決å®ããå¿ èŠããããŸãã ãŸãã次ã®ãã®ãå¿ èŠã§ãã
- 4ã€ã®ãã¯ã»ã«ãšæ¯èŒãããã¯ã»ã«ãŠã£ã³ããŠã®çžå¯Ÿäœçœ®ãèšç®ããŸãã
- ãã¯ã»ã«ãŠã£ã³ããŠã亀差ãããã¯ã»ã«ãååŸããŸãã
å®è£ ã¯OpenGLã«åºã¥ããŠããããããã¯ã¹ãã£ç©ºéã®åç¹ã¯å·Šäžããå§ãŸããŸãã ãã¯ã»ã«ãŠã£ã³ããŠã®çžå¯Ÿäœçœ®ãèšç®ããããšããå§ããŸãããã ãã¯ã»ã«ã·ã§ãŒããŒã«æž¡ãããUV座æšã¯ããã¯ã»ã«ã®äžå¿ã®UV座æšã§ãã UVãæ£èŠåãããŠãããšä»®å®ãããšããŸãUVã«ãã¯ã¹ãã£ã®ãµã€ãºãæããŠãã¯ã»ã«ç©ºéã«å€æã§ããŸãã ãã¯ã»ã«ã®äžå¿ãã0.5ãåŒããšããã¯ã»ã«ãŠã£ã³ããŠã®å·Šäžé ãåŸãããŸãã ãã®å€ãåãæšãŠãŠïŒåºïŒãå·Šäžã®ãã¯ã»ã«ã®å·Šäžã®äœçœ®ãèšç®ããŸãã ãã®ç»åã¯ããã¯ã»ã«ç©ºéã®ãããã®3ã€ã®ãã€ã³ãã®äŸã瀺ããŠããŸãã
ãã¯ã»ã«ã®å·Šäžé ãšãã¯ã»ã«ã°ãªããã®å·Šäžé ã®éãã¯ãæ£èŠåããã座æšã§ã®ãã¯ã»ã«ãŠã£ã³ããŠã®çžå¯Ÿäœçœ®ã§ãã ãã®ç»åã§ã¯ããã¯ã»ã«ãŠã£ã³ããŠã®äœçœ®ã¯[0.69ã0.37]ã«ãªããŸãã ã³ãŒãå ïŒ
vec2 bottomLeftPixelPos = uv * size -0.5;
vec2 bottomLeftTexelPos = floor(bottomLeftPixelPos);
vec2 weigth = bottomLeftPixelPos - bottomLeftTexelPos;
textureGatheråœä»€ã䜿çšããŠãäžåºŠã«4ã€ã®ãã¯ã»ã«ãååŸã§ããŸãã OpenGL 4.0以éã§ã®ã¿äœ¿çšã§ããããã代ããã«4ã€ã®texelFetchãå®è¡ã§ããŸãã textureGather UV座æšãæž¡ãã ãã§ããã¯ã»ã«ãŠã£ã³ããŠãšãã¯ã»ã«ãå®å šã«äžèŽãããšãåé¡ãçºçããŸãã
ããã§ã¯ãäžå€®ã®ãã¯ã»ã«ã«æ£ç¢ºã«äžèŽãããã¯ã»ã«ãŠã£ã³ããŠïŒéã§è¡šç€ºïŒãæã€3ã€ã®æ°Žå¹³ãã¯ã»ã«ã衚瀺ãããŸãã èšç®ããããŠã§ã€ãã¯1.0ã«è¿ãã§ãããtextureGatherã¯ä»£ããã«äžå€®ãšå³ã®ãã¯ã»ã«ãéžæããŸããã ãã®çç±ã¯ãtextureGatherã«ãã£ãŠå®è¡ãããèšç®ããæµ®åå°æ°ç¹ã®éã¿ã®èšç®ãšãããã«ç°ãªãå Žåãããããã§ãã GPUèšç®ãšæµ®åå°æ°ç¹ã®éã¿èšç®ã®åæšäºå ¥ã®éãã«ããããã¯ã»ã«ã®äžå¿ä»è¿ã§ã°ãªãããçºçããŸãã
ãã®åé¡ã解決ããã«ã¯ãweightGatherã®ãµã³ããªã³ã°ãšäžèŽãããŠã§ã€ãèšç®ãä¿èšŒãããŠããããšã確èªããå¿ èŠããããŸãã ãããè¡ãããã«ããã¯ã»ã«ã®äžå¿ããµã³ããªã³ã°ããã®ã§ã¯ãªããåžžã«2Ã2ãã¯ã»ã«ã°ãªããã®äžå¿ã§ãµã³ããªã³ã°ããŸãã èšç®ããããã§ã«åãæšãŠãããå·Šã®ãã¯ã»ã«ã®äžéšäœçœ®ãããå®å šãªãã¯ã»ã«ãè¿œå ããŠãã¯ã»ã«ã°ãªããã®äžå¿ã«å°éããŸãã
ãã®ç»åã¯ããã¯ã»ã«ã°ãªããã®äžå¿ã䜿çšããŠãtextureGatherã«ãã£ãŠååŸããã4ã€ã®ãµã³ããªã³ã°ãã€ã³ããåžžã«ãã¯ã»ã«ã®äžå¿ã«ããããšã瀺ããŠããŸãã ã³ãŒãå ïŒ
vec2 centerTexelPos = (bottomLeftTexelPos + vec2(1.0, 1.0)) / size;
uvec4 result = textureGather(fontSampler, centerTexelPos, 0);
ãã¯ã»ã«ãŠã£ã³ããŠã®æ°Žå¹³ãã¹ã¯
4ã€ã®ãã¯ã»ã«ãååŸããããããäžç·ã«ãªã£ãŠ8Ã8ã«ãã¬ããžãããã®ã°ãªããã圢æããŸãã ãã¯ã»ã«ãŠã£ã³ããŠå ã®ããããã«ãŠã³ãããã«ã¯ããŸããã¯ã»ã«ãŠã£ã³ããŠå€ã®ãããããªã»ããããå¿ èŠããããŸãã ãããè¡ãã«ã¯ããã¯ã»ã«ãŠã£ã³ããŠãã¹ã¯ãäœæãããã¯ã»ã«ãã¹ã¯ãšãã¯ã»ã«ã«ãã¬ããžãã¹ã¯ã®éã§ãããåäœã®ANDãå®è¡ããŸãã æ°Žå¹³ãã¹ãã³ã°ãšåçŽãã¹ãã³ã°ã¯å¥ã ã«å®è¡ãããŸãã
ãã®ã¢ãã¡ãŒã·ã§ã³ã«ç€ºãããã«ãæ°Žå¹³æ¹åã®ãã¯ã»ã«ãã¹ã¯ã¯æ°Žå¹³æ¹åã®ãŠã§ã€ãã«æ²¿ã£ãŠç§»åããå¿ èŠããããŸãã
ãã®ç»åã¯ãå€0x0F0ãå³ã«ã·ãããã8ãããã®ãã¹ã¯ã瀺ããŠããŸãïŒå·ŠåŽã«ãŒããæ¿å ¥ãããŠããŸãïŒã ã¢ãã¡ãŒã·ã§ã³ã§ã¯ããã¹ã¯ã¯éã¿ä»ãã§çŽç·çã«ã¢ãã¡ãŒã·ã§ã³åãããŸãããå®éã«ã¯ããããã·ããã¯æ®µéçãªæäœã§ãã ãã¯ã»ã«ãŠã£ã³ããŠããµã³ãã«ã®å¢çãè¶ãããšããã¹ã¯ã®å€ãå€ãããŸãã 次ã®ã¢ãã¡ãŒã·ã§ã³ã§ã¯ããããèµ€ãšç·ã®åã§ç€ºãã段éçã«ã¢ãã¡ãŒã·ã§ã³åããŸãã å€ã¯ããµã³ãã«ã®äžå¿ã亀差ããå Žåã«ã®ã¿å€åããŸãã
ãã¹ã¯ãã»ã«ã®äžå€®ã§ã®ã¿ç§»åãããšããžã§ã¯ç§»åããªãããã«ããã«ã¯ãåçŽãªäžžãã§ååã§ãã
unsigned int pixelMask = 0x0F0 >> int(round(weight.x * 4.0));
ããã§ã2ã€ã®ãã¯ã»ã«ã«ãŸãããå®å šãª8ãããæååã®ãã¯ã»ã«ãã¹ã¯ãã§ããŸããã 16ãããã«ãã¬ããžãã¹ã¯ã§é©åãªã¿ã€ãã®ã¹ãã¬ãŒãžãéžæããå Žåãå·Šå³ã®ãã¯ã»ã«ãçµã¿åãããŠãäžåºŠã«å®å šãª8ãããã©ã€ã³ã®æ°Žå¹³ãã¯ã»ã«ãã¹ãã³ã°ãå®è¡ããæ¹æ³ããããŸãã ãã ããããã¯ãå転ããã°ãªããã«ç§»åãããšãã®åçŽãã¹ãã³ã°ã§ã¯åé¡ã«ãªããŸãã ãããã£ãŠã代ããã«ã2ã€ã®å·Šãã¯ã»ã«ãš2ã€ã®å³ãã¯ã»ã«ãäºãã«çµã¿åãããŠã2ã€ã®32ãããã«ãã¬ããžãã¹ã¯ãäœæããŸãã å·Šå³ã®çµæãå¥ã ã«ãã¹ã¯ããŸãã
å·Šãã¯ã»ã«ã®ãã¹ã¯ã¯ãã¯ã»ã«ãã¹ã¯ã®äžäœ4ãããã䜿çšããå³ãã¯ã»ã«ã®ãã¹ã¯ã¯äžäœ4ãããã䜿çšããŸãã åäžãªã°ãªããã§ã¯ãåã©ã€ã³ã¯åãæ°Žå¹³ãã¹ã¯ãæã£ãŠãããããåã©ã€ã³ã®ãã¹ã¯ãã³ããŒããã ãã§ããã®åŸæ°Žå¹³ãã¹ã¯ã®æºåãæŽããŸãã
unsigned int leftRowMask = pixelMask >> 4;
unsigned int rightRowMask = pixelMask & 0xF;
unsigned int leftMask = (leftRowMask << 12) | (leftRowMask << 8) | (leftRowMask << 4) | leftRowMask;
unsigned int rightMask = (rightRowMask << 12) | (rightRowMask << 8) | (rightRowMask << 4) | rightRowMask;
ãã¹ã¯ããã«ã¯ã2ã€ã®å·Šãã¯ã»ã«ãš2ã€ã®å³ãã¯ã»ã«ãçµã¿åãããŠãæ°Žå¹³ç·ããã¹ã¯ããŸãã
unsigned int left = ((topLeft & leftMask) << 16) | (bottomLeft & leftMask);
unsigned int right = ((topRight & rightMask) << 16) | (bottomRight & rightMask);
çµæã¯æ¬¡ã®ããã«ãªããŸãã
bitCountåœä»€ã䜿çšããŠããã®çµæã®ãããããã§ã«ã«ãŠã³ãã§ããŸãã 16ã§ã¯ãªã32ã§é€ç®ããå¿ èŠããããŸããããã¯ãåçŽãã¹ãã³ã°ã®åŸã16ã§ã¯ãªã32ãããã®å¯èœæ§ãããããã§ãããã®æ®µéã§ã®ã°ãªãã®å®å šãªã¬ã³ããªã³ã°ã次ã«ç€ºããŸãã
ããã§ã¯ãå ã®ãã¯ã¿ãŒããŒã¿ïŒçœã茪éïŒã«åºã¥ããŠã¬ã³ããªã³ã°ãããæ¡å€§ãããæåSãšããµã³ããªã³ã°ãã€ã³ãã®èŠèŠåã衚瀺ãããŸãã ããããç·ã®å Žåã¯ã°ãªãã®å åŽã«ãããèµ€ã®å Žåã¯ããã§ã¯ãããŸããã ã°ã¬ãŒã¹ã±ãŒã«ã«ã¯ããã®æ®µéã§èšç®ãããè²çžã衚瀺ãããŸãã ãã©ã³ããã¬ã³ããªã³ã°ããããã»ã¹ã§ã¯ãã©ã¹ã¿ãŒåããã¯ã¹ãã£ã¢ãã©ã¹ãžã®ããŒã¿ã®ä¿åæ¹æ³ãæçµçãªè²çžã®èšç®ãªã©ããšã©ãŒã®å¯èœæ§ãå€ããããŸãã ãã®ãããªèŠèŠåã¯ãèšç®ã®æ€èšŒã«éåžžã«åœ¹ç«ã¡ãŸãã ãããã¯ããµããã¯ã»ã«ã¬ãã«ã§ã¢ãŒãã£ãã¡ã¯ãããããã°ããããã«ç¹ã«éèŠã§ãã
åçŽãã¹ãã³ã°
ããã§ãåçŽãããããã¹ã¯ããæºåãã§ããŸããã åçŽã«ãã¹ã¯ããã«ã¯ããããã«ç°ãªãæ¹æ³ã䜿çšããŸãã åçŽã·ããã«å¯ŸåŠããã«ã¯ãããããã©ã®ããã«ä¿åããããèŠããŠããããšãéèŠã§ãïŒè¡æ¹åã äžçªäžã®è¡ã¯4ã€ã®æäžäœãããã§ãäžçªäžã®è¡ã¯4ã€ã®æäžäœãããã§ãã ãã¯ã»ã«ãŠã£ã³ããŠã®åçŽäœçœ®ã«åºã¥ããŠããããã1ã€ãã€åçŽã«ã¯ãªãŒãã³ã°ã§ããŸãã
2ã€ã®ãã¯ã»ã«ã®é«ãå šäœãã«ããŒããåäžã®ãã¹ã¯ãäœæããŸãã ãã®çµæã4è¡ã®ãã¯ã»ã«ãä¿åããæ®ãããã¹ãŠãã¹ã¯ããŸããã€ãŸãããã¹ã¯ã¯4Ã4ãããã«ãªãã0xFFFFã«çãããªããŸãã ãã¯ã»ã«ãŠã£ã³ããŠã®äœçœ®ã«åºã¥ããŠãäžçªäžã®è¡ãã·ããããäžçªäžã®è¡ãã¯ãªã¢ããŸãã
int shiftDown = int(round(weightY * 4.0)) * 4;
left = (left >> shiftDown) & 0xFFFF;
right = (right >> shiftDown) & 0xFFFF;
ãã®çµæããã¯ã»ã«ãŠã£ã³ããŠã®å€åŽã®åçŽãããããã¹ã¯ããŸããã
ããã§ããã¯ã»ã«ã«æ®ã£ãŠããããããã«ãŠã³ãããã ãã§ååã§ããããã¯ãbitCountãªãã¬ãŒã·ã§ã³ã§å®è¡ã§ããçµæã16ã§é€ç®ããŠç®çã®ã·ã§ãŒããååŸã§ããŸãã
float shade = (bitCount(left) + bitCount(right)) / 16.0;
ããã§ãã¬ã¿ãŒã®å®å šãªã¬ã³ããªã³ã°ã¯æ¬¡ã®ããã«ãªããŸãã
ç¶ã...
2çªç®ã®éšåã§ã¯ã次ã®ã¹ãããã«é²ã¿ãå転ããã°ãªããã«ãã®ææ³ãé©çšããæ¹æ³ã確èªããŸãã 次ã®ã¹ããŒã ãèšç®ããŸãã
ãããŠããã®ã»ãšãã©ãã¹ãŠãããã€ãã®ããŒãã«ã«åæžã§ããããšãããããŸãã
textureGatheråé¡ã®è§£æ±ºã«ååããŠãããSebastian AaltonenïŒ @SebAaltonen ïŒããããŠãã¡ãããå€æ¹ã®ã¢ã€ãã¢ãšèå³æ·±ãäŒè©±ãããŠããã Michael van der LeuïŒ @MvdleeuwGG ïŒã«æè¬ããŸãã