WebGL筆記
|
|
N=N1+N2
WebGL
model數個參數
例如color和texture
webgl
buffer種類
1.attribute
2.uniform
3.varying
shader有兩種
vertex
shader和fragment
shader
lights
material → uniform
Normal
attribute → vertex normal
vertex
attribute → vertex coordinate
|
|
Shading
& lighting是interchanged
ambiguous
相關連的
用physical
principle of light reflection
光的反射物理準則
Lambertian
reflection model
Phong
reflection model
|
|
Lambertian
reflectance
Specular
reflection
attribute
用於vertex
shader和application之間
uniform的值value在object
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
vec4有3個與4個element元素
Goraud
shading with Lambertian reflection
|
|






沒有留言:
張貼留言