WebGL Lesson 8 – the depth buffer, transparency and blending
WebGL rendering process:
- Runs the vertex shader on all of the vertices to work out where everything is.
- 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.
- For each fragment, run the fragment shader on it to work out its colour.
- 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