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

            逛奔的蝸牛

            我不聰明,但我會很努力

               ::  :: 新隨筆 ::  ::  :: 管理 ::
            vec4 v, u; mat4 m; v * u component-wise v * m v is row vector m * v v is column vector m * m linear-algebraic matrix multiplication Inverse 求逆 Transpose 轉置 gl_ModelViewMatrixInverse; gl_ModelViewProjectionMatrixInverseTranspose gl_NormalMatrix is the transpose of the inverse of the gl_ModelViewMatrix. function prototype: vec4 fract(vec4 x); == x - floor(x); <- [0, 1) // fract 片斷 vec4 clamp(float x, float minVal, float maxVal); returns min(max(x, minVal), maxVal); vec4 mix(vec4 x, vec4 y, vec4 a); return x * (1.0 - a) + y * a; vec4 step(vec4 edge, vec4 x); returns 0 if x < edge, otherwise returns 1. vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x); returns if x <= edge0, returns 1 if x >= edge1, perform hermite interpolation between 0 and 1 when edge0 < x < edge1 0到1之間的Hermite插值算法 equal to t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); return t * t * (3 - 2 * t); vec3 cross(vec3 x, vec3 y); // 只有這種形式,即只有三個component的向量才行 dot(N, L); result[0] = x[1] * y[2] - x[2] * y[1]; result[1] = x[2] * y[0] - x[0] * y[2]; result[2] = x[0] * y[1] - x[1] * y[0]; float dot(vec4 x, vec4 y); result = x[0] * y[0] + x[1] * y[1] + ...; vec4 reflect(vec4 I, vec4 N); // 反射光線向量 For the incident vector I and surface orientation N, returns the reflection direction result = I - 2.0 * dot(N, I) * N; vec3 ecPosition = vec3 (gl_ModelViewMatrix * gl_Vertex); vec3 tnorm = normalize(gl_NormalMatrix * gl_Normal); vec3 lightVec = normalize(LightPosition - ecPosition); vec3 reflectVec = reflect(-lightVec, tnorm); vec3 viewVec = normalize(-ecPosition); vec4 refract(vec4 I, vec4 N, float eta); // 折射光線向量 For the incident vector I and surface normal N and the ratio(比率) of refraction eta, returns the refraction vector. The returned result is computed as k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I)); if (k < 0.0) { result = 0.0; // the return type is float of vec2/3/4 } else { result = eta * I - (eta * dot(N, I) *sqrt(k)) * N; } mat4 matrixComMult(mat4 x, mat4 y); component-wise to get linear-algebraic multiplication, use the multiply operator (*) mat4 x, y; x * y;
            posted on 2010-12-17 17:23 逛奔的蝸牛 閱讀(1486) 評論(0)  編輯 收藏 引用 所屬分類: OpenGL
            久久久这里有精品| 色综合久久久久综合99| 国产V综合V亚洲欧美久久| 无码人妻久久一区二区三区蜜桃| 久久免费精品视频| 久久婷婷五月综合97色直播| 中文成人无码精品久久久不卡| 久久91精品国产91久| 国产精品久久久久天天影视| 性做久久久久久久久久久| 久久亚洲日韩看片无码| 99国产精品久久| 国内精品久久国产| 97久久精品午夜一区二区| 久久久受www免费人成| 色欲综合久久躁天天躁蜜桃| 久久久久女教师免费一区| 久久成人国产精品| 久久成人国产精品免费软件| 一本久久a久久精品综合香蕉| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 伊人久久成人成综合网222| 无码伊人66久久大杳蕉网站谷歌 | 亚洲国产精品一区二区三区久久| 久久永久免费人妻精品下载| 久久精品国产亚洲5555| 国产精品对白刺激久久久| 久久伊人五月丁香狠狠色| 久久99精品久久久久久齐齐| 久久91精品久久91综合| 激情伊人五月天久久综合| 久久一区二区三区免费| 99热成人精品免费久久| 国产视频久久| 久久综合中文字幕| 伊人色综合久久| 久久国产成人午夜AV影院| 久久777国产线看观看精品| A狠狠久久蜜臀婷色中文网| 色妞色综合久久夜夜| 久久无码AV中文出轨人妻|