2012年12月11日 星期二

WebGL筆記(1)

-->
WebGL筆記
N=N1+N2
WebGL model數個參數
例如colortexture
webgl buffer種類
1.attribute
2.uniform
3.varying
shader有兩種
vertex shaderfragment shader
lights material → uniform
Normal attribute → vertex normal
vertex attribute → vertex coordinate
Shading & lightinginterchanged ambiguous
相關連的
physical principle of light reflection
光的反射物理準則
Lambertian reflection model
Phong reflection model
Lambertian reflectance
Specular reflection
attribute 用於vertex shaderapplication之間
uniform的值valueobject being processed物件處理中不改變其值
varying linkage a vertex shader a fragment shader
const->compile time constant
alpha透明度
vFinalColor[3]=1.0
vFinalColor.a=1.0
vFinalColor.w=1.0
vec3 vec43個與4element元素
Goraud shading with Lambertian reflection

沒有留言:

張貼留言