Learning 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

猜你喜欢

转载自blog.csdn.net/weixin_34037173/article/details/93414816