webgl学习路线总结


API: https://developer.mozilla.org/zh-CN/docs/Web/API/WebGL_API WebGL 3D Perspective: https://webglfundamentals.org/webgl/lessons/zh_cn/webgl-3d-orthographic.html#toc https://webglfundamentals.org/webgl/lessons/webgl-3d-perspective.html webgl-examples: https://github.com/mdn/webgl-examples/ 一个使用方便的JavaScript处理向量和矩阵运算的库。sylvester: http://sylvester.jcoglan.com/docs.html 性能监视器(监视FPS): https://github.com/mrdoob/stats.js 动画引擎 https://github.com/tweenjs/tween.js 顶点着色器根据需要, 也可以完成其他工作。例如,决定哪个包含texel面部纹理的坐标,可以应用于顶点;通过法线来确定应用到顶点的光照因子等。依此类推,这些信息可以存储在变化(varying)属性(attributes)属性中,以便与片段着色器共享
<script id="shader-vs" type="x-shader/x-vertex">
      attribute vec3 aVertexPosition;
      attribute vec4 aVertexColor;
    
      uniform mat4 uMVMatrix;
      uniform mat4 uPMatrix;
      
      varying lowp vec4 vColor;
    
      void main(void) {
        gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);
        vColor = aVertexColor;
      }
    </script>

  等价于:

`
      attribute vec3 aVertexPosition;
      attribute vec4 aVertexColor;
    
      uniform mat4 uMVMatrix;
      uniform mat4 uPMatrix;
      
      varying lowp vec4 vColor;
    
      void main(void) {
        gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);
        vColor = aVertexColor;
      }
    `

  等价于:

[
 "attribute vec3 aVertexPosition;",
 "attribute vec4 aVertexColor;",
 "uniform mat4 uMVMatrix;",
 "uniform mat4 uPMatrix;",
 "varying lowp vec4 vColor;",
 "void main(void) {",
  "gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);",
  "vColor = aVertexColor;",
 "}"
].join( "\n" );

  

优质内容筛选与推荐>>
1、DeriveParameters的缺陷
2、[导入]如何使用C#调用非托管DLL函数
3、针对搜狗网址导航评论
4、JavaSe总结--数据结构-链表
5、使用properties和SPContext时须小心


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号





    联系我们

    欢迎来到TinyMind。

    关于TinyMind的内容或商务合作、网站建议,举报不良信息等均可联系我们。

    TinyMind客服邮箱:support@tinymind.net.cn