• <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
            久久精品国产国产精品四凭| 亚洲AV无码久久| 久久99国产一区二区三区| 9191精品国产免费久久| 国产成人精品久久亚洲| 精品久久久久久无码免费| 中文字幕日本人妻久久久免费| 久久国产成人午夜aⅴ影院| 精品国产婷婷久久久| 天天做夜夜做久久做狠狠| 久久99久国产麻精品66| 精品999久久久久久中文字幕| 久久精品18| 性色欲网站人妻丰满中文久久不卡| 久久久无码精品亚洲日韩蜜臀浪潮| 久久se精品一区二区| 性做久久久久久久久浪潮| 精品久久久久久无码专区| 天天做夜夜做久久做狠狠| 91亚洲国产成人久久精品| 久久AV高潮AV无码AV| 日本精品一区二区久久久| 久久夜色精品国产噜噜麻豆| 久久精品国产亚洲av瑜伽| 色综合久久综合中文综合网| 久久亚洲中文字幕精品一区| 韩国免费A级毛片久久| 久久天天躁狠狠躁夜夜avapp| 国产999精品久久久久久| 久久激情五月丁香伊人| 色欲综合久久躁天天躁蜜桃| 久久精品国产亚洲7777| 色综合久久中文综合网| 日本欧美久久久久免费播放网| 香蕉99久久国产综合精品宅男自 | 久久这里有精品视频| 国产精品久久网| 久久久久久久97| 国产A级毛片久久久精品毛片| 欧美久久天天综合香蕉伊| 久久精品一区二区影院|