• <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 閱讀(302) 評論(0)  編輯 收藏 引用

            狠狠色丁香久久综合婷婷| 久久久精品国产Sm最大网站| 欧美激情精品久久久久久| 久久强奷乱码老熟女| 污污内射久久一区二区欧美日韩 | 狠狠色狠狠色综合久久| 久久亚洲美女精品国产精品| 国内精品久久九九国产精品| 精品久久久久久无码免费| 日本WV一本一道久久香蕉| 久久精品天天中文字幕人妻| 久久中文精品无码中文字幕| 99久久精品国产一区二区| 国产精品热久久无码av| 亚洲精品美女久久777777| 国产午夜电影久久| 色欲av伊人久久大香线蕉影院| 久久亚洲精品中文字幕三区| 一级做a爰片久久毛片看看 | 伊人久久大香线蕉综合网站| 91久久婷婷国产综合精品青草 | 亚洲а∨天堂久久精品9966| 精品久久久噜噜噜久久久 | 91精品国产色综久久| 久久精品国产久精国产一老狼| 欧美亚洲国产精品久久蜜芽| 亚洲精品无码久久久久久| 香蕉久久永久视频| 久久久亚洲精品蜜桃臀| 国产成人久久精品一区二区三区| 亚洲人成无码久久电影网站| 中文字幕一区二区三区久久网站| 久久精品一本到99热免费| 欧美日韩精品久久免费| 国内精品久久久久影院老司| 久久最新免费视频| 手机看片久久高清国产日韩| 久久久久久久亚洲精品| 久久人人爽人人爽AV片| 久久久人妻精品无码一区| 人人狠狠综合88综合久久|