GLSL内置函数(便于查找)
来源:互联网 发布:淘宝抢购插件 编辑:程序博客网 时间:2024/05/17 11:07
float radians (float degrees)
result[1] = x[2] *y[0] - y[2] *x[0]
result[2] = x[0] *y[1] - y[0] *x[1]float normalize (float x)返回单位向量vec2 normalize (vec2 x)vec3 normalize (vec3 x)vec4 normalize (vec4 x)float faceforward (float N, float I,float Nref)如果dot(Nref,I)<0.0,返回N,否者返回-Nvec2 faceforward (vec2 N, vec2 I,vec2 Nref)vec3 faceforward (vec3 N, vec3 I,vec3 Nref)vec4 faceforward (vec4 N, vec4 I,vec4 Nref)float reflect (float I, float N)对于关联矢量I和表面方位N,返回反射方向:result=I-2.0*dot(N,I)*N 因该规范化Nvec2 reflect (vec2 I, vec2 N)vec3 reflect (vec3 I, vec3 N)vec4 reflect (vec4 I, vec4 N)float refract (float I, float N,float eta)vec2 refract (vec2 I, vec2 N,float eta)vec3 refract (vec3 I, vec3 N,float eta)vec4 refract (vec4 I, vec4 N,float eta)矩阵函数mat2 matrixCompMult (mat2 x, mat2 y)返回每个部分的乘积,result[i][j]=x[i][j]*y[i][j],不同于矩阵乘法mat3 matrixCompMult (mat3 x, mat3 y)mat4 matrixCompMult (mat4 x, mat4 y)mat2 transpose (mat2 m)转置矩阵mat3 transpose (mat3 m)mat4 transpose (mat4 m)mat2x3 transpose (mat3x2 m)mat3x2 transpose (mat2x3 m)mat2x4 transpose (mat4x2 m)mat4x2 transpose (mat2x4 m)mat3x4 transpose (mat4x3 m)mat4x3 transpose (mat3x4 m)mat2 inverse (mat2 m)逆矩阵mat3 inverse (mat3 m)mat4 inverse (mat4 m)mat2 outerProduct (vec2 c, vec2 r)矢量积mat3 outerProduct (vec3 c, vec3 r)mat4 outerProduct (vec4 c, vec4 r)mat2x3 outerProduct (vec2 c, vec3 r)mat3x2 outerProduct (vec3 c, vec2 r)mat2x4 outerProduct (vec2 c, vec4 r)mat4x2 outerProduct (vec4 c, vec2 r)mat3x4 outerProduct (vec3 c, vec4 r)mat4x3 outerProduct (vec4 c, vec3 r)矢量关系函数 bvec2 lessThan(vec2 x, vec2 y)返回对各个部分执行的x<y的比较结果bvec3 lessThan(vec3 x, vec3 y)bvec4 lessThan(vec4 x, vec4 y)bvec2 lessThan(ivec2 x, ivec2 y)bvec3 lessThan(ivec3 x, ivec3 y)bvec4 lessThan(ivec4 x, ivec4 y)bvec2 lessThanEqual(vec2 x, vec2 y)返回对各个部分执行的x<=y的比较结果bvec3 lessThanEqual(vec3 x, vec3 y)bvec4 lessThanEqual(vec4 x, vec4 y)bvec2 lessThanEqual(ivec2 x, ivec2 y)bvec3 lessThanEqual(ivec3 x, ivec3 y)bvec4 lessThanEqual(ivec4 x, ivec4 y)bvec2 greaterThan(vec2 x, vec2 y)返回对各个部分执行的x>y的比较结果bvec3 greaterThan(vec3 x, vec3 y)bvec4 greaterThan(vec4 x, vec4 y)bvec2 greaterThan(ivec2 x, ivec2 y)bvec3 greaterThan(ivec3 x, ivec3 y)bvec4 greaterThan(ivec4 x, ivec4 y)bvec2 greaterThanEqual(vec2 x, vec2 y)返回对各个部分执行的x=>y的比较结果bvec3 greaterThanEqual(vec3 x, vec3 y)bvec4 greaterThanEqual(vec4 x, vec4 y)bvec2 greaterThanEqual(ivec2 x, ivec2 y)bvec3 greaterThanEqual(ivec3 x, ivec3 y)bvec4 greaterThanEqual(ivec4 x, ivec4 y)bvec2 equal(vec2 x, vec2 y)返回对各个部分执行的x==y的比较结果bvec3 equal(vec3 x, vec3 y)bvec4 equal(vec4 x, vec4 y)bvec2 equal(ivec2 x, ivec2 y)bvec3 equal(ivec3 x, ivec3 y)bvec4 equal(ivec4 x, ivec4 y)bvec2 equal(bvec2 x, bvec2 y)bvec3 equal(bvec3 x, bvec3 y)bvec4 equal(bvec4 x, bvec4 y)bvec2 notEqual(vec2 x, vec2 y)返回对各个部分执行的x!=y的比较结果bvec3 notEqual(vec3 x, vec3 y)bvec4 notEqual(vec4 x, vec4 y)bvec2 notEqual(ivec2 x, ivec2 y)bvec3 notEqual(ivec3 x, ivec3 y)bvec4 notEqual(ivec4 x, ivec4 y)bvec2 notEqual(bvec2 x, bvec2 y)bvec3 notEqual(bvec3 x, bvec3 y)bvec4 notEqual(bvec4 x, bvec4 y)bool any(bvec2 x)如果x的任何部分为true,返回truebool any(bvec3 x)bool any(bvec4 x)bool all(bvec2 x)只有当x的所有部分都为true才返回truebool all(bvec3 x)bool all(bvec4 x)bvec2 not(bvec2 x)对各个部分取反bvec3 not(bvec3 x)bvec4 not(bvec4 x)纹理访问函数 vec4 texture (sampler1D sampler, float coord [, float bias] )自行百度或查书vec4 textureProj (sampler1D sampler, vec2 coord [, float bias] )vec4 textureProj (sampler1D sampler, vec4 coord [, float bias] )vec4 textureLod (sampler1D sampler, float coord, float lod )vec4 textureGrad (sampler1D sampler, float coord, float dPdx, float dPdy)vec4 textureOffset (sampler1D sampler, float coord, int offset, [, float bias] )vec4 texelFetch (sampler1D sampler, int coord, int lod )vec4 texelFetchOffset (sampler1D sampler, int coord, int lod, int offset )vec4 textureProjLod (sampler1D sampler, vec2 coord , float lod )vec4 textureProjLod (sampler1D sampler, vec4 coord , float lod )vec4 textureProjGrad (sampler1D sampler, vec2 coord, float dPdx,float dPdy)vec4 textureProjGrad (sampler1D sampler, vec4 coord, float dPdx,float dPdy)vec4 textureProjOffset (sampler1D sampler, vec2 coord, int offset[, float bias] )vec4 textureProjOffset (sampler1D sampler, vec4 coord, int offset[, float bias] )vec4 textureLodOffset (sampler1D sampler, float coord, float lod, int offset)vec4 textureGradOffset (sampler1D sampler, float coord, float dPdx,float dPdy, int offset)vec4 textureProjLodOffset (sampler1D sampler, vec2 coord, float lod,int offset)vec4 textureProjLodOffset (sampler1D sampler, vec4 coord, float lod,int offset)vec4 textureProjGradOffset (sampler1D sampler, vec2 coord, float dPdx,float dPdy, int offset)vec4 textureProjGradOffset (sampler1D sampler, vec4 coord, float dPdx,float dPdy, int offset)int textureSize (isampler1D sampler, int lod )片元处理函数 float dFdx (float p)返回输入参数p在x上的导数vec2 dFdx (vec2 p)vec3 dFdx (vec3 p)vec4 dFdx (vec4 p)float dFdy (float p)返回输入参数p在y上的导数vec2 dFdy (vec2 p)vec3 dFdy (vec3 p)vec4 dFdy (vec4 p)float fwidth (float p)返回p在x和y上的绝对导数的和return = abs (dFdx (p)) + abs (dFdy (p));vec2 fwidth (vec2 p)vec3 fwidth (vec3 p)vec4 fwidth (vec4 p)噪声函数 float noise1 (float x)根据输入值返回一个噪声float noise1 (vec2 x)float noise1 (vec3 x)float noise1 (vec4 x)vec2 noise2 (float x)vec2 noise2 (vec2 x)vec2 noise2 (vec3 x)vec2 noise2 (vec4 x)vec3 noise3 (float x)vec3 noise3 (vec2 x)vec3 noise3 (vec3 x)vec3 noise3 (vec4 x)vec4 noise4 (float x)vec4 noise4 (vec2 x)vec4 noise4 (vec3 x)vec4 noise4 (vec4 x)
0 0
- GLSL内置函数(便于查找)
- glsl 内置函数(仅记录用)
- GLSL常用内置函数汇总
- OpenGL(2)GLSL内置变量和函数
- HLSL内置函数,及HLSL与GLSL的对应函数
- 学习ShaderToy第一天: glsl语言内置函数gl_FragCoord
- GLSL语言内置变量
- GLSL语言内置变量
- GLSL语言内置变量
- GLSL 内置变量
- GLSL语言内置变量
- GLSL语言内置变量
- 对于表单控件属性的整理(便于查找)
- GLSL学习笔记---内置变量
- GLSL语言内置的变量
- 11 WebGL 着色器编程语言GLSL ES的内置函数
- 箭头函数几个模版例子(便于自己查询)
- 关于日期格式的书写及对应含义(便于查找)
- 条件表达式的嵌套
- 控制情绪8
- jQuery.noConflict() 函数详解
- Vold之CommandLinstener 4 模块分析
- 2015/4/21
- GLSL内置函数(便于查找)
- myeclipse 部署 tomcat web项目
- ADO学习(八)源码示例
- Web性能 自学
- JNI 数组传递
- 创建透明导航条、去掉导航条黑线
- Making Change
- Java Leetcode Add Two Numbers
- Linux目录文件命令