WebGL Learning Route Summary

Source: Internet
Author: User

API:HTTPS://DEVELOPER.MOZILLA.ORG/ZH-CN/DOCS/WEB/API/WEBGL_APIWEBGL 3D perspective:https://webglfundamentals.org /webgl/lessons/zh_cn/webgl-3d-orthographic.html#tochttps://webglfundamentals.org/webgl/lessons/ Webgl-3d-perspective.htmlwebgl-examples:https://github.com/mdn/webgl-examples/A library of easy-to-use javascript processing vectors and matrix operations. Sylvester:http://sylvester.jcoglan.com/docs.html Performance Monitor (monitor fps): Https://github.com/mrdoob/stats.js animation engine https:// The github.com/tweenjs/tween.js vertex shader can do other work as needed. For example, decide which coordinates that contain the texel face texture, which can be applied to vertices, and normals to determine the illumination factor applied to the vertex. And so on, this information can be stored in the change (varying) or attribute (attributes) property to share with the fragment shader
<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>

Equivalent to:

'      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;      }    `

Equivalent to:

["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);", c1/> "vcolor = Avertexcolor;", "}"].join ("\ n");

  

WebGL Learning Route Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.