• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            腳踏實(shí)地

            心 勿噪

            please please please, make it smaller!

            http://www.iquilezles.org/blog/?p=2828

            I think size matters. However, unlike in real life, when programming the smaller the better. Generally. Also, the less branches the better, at least when programming for parallel systems. And also, the more compact and regular, the prettier (but this is my personal opinion only).
            Related to this, in the last 6 months I have pointed out / proposed this same optimization to at least five different people. Basically, it seems most people make this same “mistake” over and over again, which is to write this horrifying thing
            vec3 color = vec3(0.0);
            if (theta < 1.0) {
            color.r = 1.0;
            color.g = theta;
            }
            else if (theta < 2.0) {
            color.r = 2.0 - theta;
            color.g = 1.0;
            }
            else if (theta < 3.0) {
            color.g = 1.0;
            color.b = theta - 2.0;
            }
            else if (theta < 4.0) {
            color.g = 4.0 - theta;
            color.b = 1.0;
            }
            else if (theta < 5.0) {
            color.r = theta - 4.0;
            color.b = 1.0;
            }
            else {
            color.r = 1.0;
            color.b = 6.0 - theta;
            }
            return color;
            instead of this equivalent line:
            vec3 color = clamp( abs(mod(theta+vec3(0.,4.,2.),6.)-3.)-1., 0., 1. );

            posted on 2015-01-05 14:22 LSH 閱讀(303) 評論(0)  編輯 收藏 引用


            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            国产精品久久久久AV福利动漫 | 久久亚洲精品国产亚洲老地址| 老色鬼久久亚洲AV综合| 精品久久久久香蕉网| 久久综合九色欧美综合狠狠| 久久这里的只有是精品23| 久久婷婷人人澡人人| 777午夜精品久久av蜜臀| www.久久99| 精品久久久久久久国产潘金莲| 精品久久久久久无码专区不卡| 国产三级观看久久| 亚洲午夜久久久久久久久久| 狠狠人妻久久久久久综合| 久久天天躁狠狠躁夜夜96流白浆| 国产三级精品久久| 色偷偷888欧美精品久久久| 亚洲AV无码1区2区久久| 办公室久久精品| 久久久青草青青亚洲国产免观| 色综合久久无码中文字幕| 亚洲精品美女久久久久99小说| 99久久无码一区人妻| 无码久久精品国产亚洲Av影片| 三级片免费观看久久| 狠狠精品久久久无码中文字幕 | 色8激情欧美成人久久综合电| 国产精品视频久久久| 亚洲精品午夜国产VA久久成人| 久久久久亚洲精品中文字幕| 国产三级观看久久| 久久久久久国产精品无码下载| 欧美精品一区二区精品久久| 国产精品久久波多野结衣| 久久97精品久久久久久久不卡| 久久久久久亚洲精品成人| 久久久久女人精品毛片| AV无码久久久久不卡网站下载 | 亚洲中文久久精品无码ww16| 四虎国产精品成人免费久久| 久久99热这里只有精品国产|