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

            四虎影视久久久免费| 国产成人精品久久免费动漫| 久久久久国产一级毛片高清版| 漂亮人妻被黑人久久精品| 久久九九精品99国产精品| 色8久久人人97超碰香蕉987| 久久精品一区二区国产| 久久精品视频网| 久久久久久久久波多野高潮| 亚洲国产欧洲综合997久久| 精品无码久久久久国产| 秋霞久久国产精品电影院| 久久久久久久免费视频| 国产精品久久久久久吹潮| 国产高潮国产高潮久久久91| 伊人久久综合无码成人网| 久久夜色精品国产亚洲| 久久人人爽人人爽人人爽 | 国产精品久久久久国产A级| 久久精品一区二区三区中文字幕| 一本色道久久88—综合亚洲精品| 99久久精品九九亚洲精品| 久久久无码一区二区三区| 亚洲国产高清精品线久久| 久久91精品久久91综合| 久久天天躁狠狠躁夜夜2020一| 伊人丁香狠狠色综合久久| 久久综合给合久久狠狠狠97色69| 国产精品成人精品久久久| 久久99精品久久只有精品| 久久综合亚洲色HEZYO社区| 精品久久久久一区二区三区| av无码久久久久久不卡网站| 色诱久久久久综合网ywww| 久久经典免费视频| 热综合一本伊人久久精品 | 久久国产精品偷99| 99久久亚洲综合精品成人| 久久精品国产亚洲av麻豆小说| 久久精品中文字幕一区| 亚洲精品国产综合久久一线|