https://www.cnblogs.com/wanbo/p/9100962.html
http://tgideas.qq.com/2018/brucewan/gpgpu.html
webgl
2014 Nick Desaulniers 主講的WebGL 基礎(chǔ)知識(shí)
assets: Shaders(vertex shader, gregment shader) Buffers Textures
mention direct3d (directX) 為什么是webGL 是因?yàn)閜ortability
使用三角型是因?yàn)槿S中不在同一直線上的任意三點(diǎn)能且只能處在一個(gè)平面霹抛,通過這點(diǎn)可以用線性代數(shù)去做很快的運(yùn)算
Homogeneous Coordinates 同質(zhì)坐標(biāo) p(x, y, z, w) allows us to represent infinite dist as (x/w, y/w, z/w) w -> 0
Viewing Frustum 透視
vertex shader --feed--> gregment shader
canvas 3D 只有 +- 1 的值宵溅,所以顯示不出來(2.0, 0上炎, 0) 之類的數(shù)據(jù)
Texture S(橫)T(豎)只有 1恃逻,1
GLSL
Uniform Attributes are inputs to shaders
Uniform are the same with all vert
Attrs are unique per vert and only inputs to vert shaders
Vert shaders can output to frag shaders via varyings