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

            腳踏實地

            心 勿噪

            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)  編輯 收藏 引用

            久久久黄色大片| 精品人妻伦九区久久AAA片69| 无码国内精品久久综合88| 久久精品国产亚洲av麻豆图片 | 国产综合久久久久| 久久精品国产精品亚洲| 少妇高潮惨叫久久久久久| 狠狠色综合久久久久尤物| 日本欧美久久久久免费播放网| 久久青青草原精品国产软件 | 亚洲成人精品久久| 中文国产成人精品久久不卡| 久久精品国产精品亜洲毛片| 日韩av无码久久精品免费| 综合久久精品色| 很黄很污的网站久久mimi色| 亚洲嫩草影院久久精品| 国产成人久久精品激情| 国内精品久久久久久久久电影网| 久久精品18| 久久精品免费大片国产大片| 狠狠久久亚洲欧美专区| 久久精品视频网| 2021久久国自产拍精品| 久久久av波多野一区二区| 亚洲精品无码成人片久久| 亚洲精品美女久久久久99| 97久久国产综合精品女不卡 | 伊人精品久久久久7777| 久久久久久青草大香综合精品| 99久久99久久精品国产片果冻| 97久久国产亚洲精品超碰热| 国产精品对白刺激久久久| 久久国产免费观看精品3| 大伊人青草狠狠久久| 青青草原综合久久| 国内精品欧美久久精品| 久久香综合精品久久伊人| 久久久免费精品re6| 狠狠干狠狠久久| 色综合久久天天综线观看|