Learning WebGL

该博客介绍WebGL Lesson 8,涉及深度缓冲、透明度和混合内容。阐述了WebGL渲染过程,包括运行顶点着色器确定位置、线性插值确定需绘制的片段、运行片段着色器确定颜色并写入帧缓冲区。还给出详细代码查看地址及Canvas和WebGL的规范链接。

WebGL Lesson 8 – the depth buffer, transparency and blending

 

WebGL rendering process:

  1. Runs the vertex shader on all of the vertices to work out where everything is.
  2. Linearly interpolates between the vertices, which tells it which fragments (which for the moment you can treat as being the same as pixels) need to be painted.
  3. For each fragment, run the fragment shader on it to work out its colour.
  4. Write it to the frame buffer(color buffer).

 

For detail,  check the source code at http://learningwebgl.com/lessons/lesson08/index.html.

Canvas SPEC

http://www.w3.org/TR/html5/the-canvas-element.html

WebGL SPEC

http://www.khronos.org/registry/webgl/specs/latest/

 

转载于:https://www.cnblogs.com/jalenwang/archive/2012/09/05/webgl-blending.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值