• <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   管理


            久久综合国产乱子伦精品免费| 东京热TOKYO综合久久精品| 久久久久国产精品嫩草影院| 欧美伊人久久大香线蕉综合69 | 日产久久强奸免费的看| 日本WV一本一道久久香蕉| 国产亚洲婷婷香蕉久久精品| 99久久免费国产精品特黄| 亚洲综合久久综合激情久久| 麻豆一区二区99久久久久| 久久久久久久久久久免费精品| 国产精品免费看久久久| 久久久亚洲AV波多野结衣| 欧美性猛交xxxx免费看久久久| 亚洲国产精品人久久| 77777亚洲午夜久久多喷| 久久午夜夜伦鲁鲁片免费无码影视| 国产A级毛片久久久精品毛片| 激情伊人五月天久久综合| 无码人妻精品一区二区三区久久 | 伊人久久综合无码成人网| 欧美久久亚洲精品| 久久久久久亚洲精品无码| 国产精品丝袜久久久久久不卡 | 无夜精品久久久久久| 久久久久免费视频| 久久人人超碰精品CAOPOREN| 久久久久亚洲?V成人无码| 国产精品女同一区二区久久| 久久精品国产半推半就| 久久婷婷久久一区二区三区| 久久九九有精品国产23百花影院| 久久夜色tv网站| 51久久夜色精品国产| 久久亚洲中文字幕精品一区| 日日狠狠久久偷偷色综合免费 | 久久久久人妻精品一区二区三区| 色狠狠久久AV五月综合| 久久久久久狠狠丁香| 国产国产成人久久精品| 久久成人小视频|