Blender Git Loki
Git Commits -> Revision 4ec75ba
Revision 4ec75ba by Tamito Kajiyama (master) February 8, 2010, 02:19 (GMT) |
Added support for transparent stroke colors. In Freestyle, strokes are represented with triangle strips, and stroke colors are realized using vertex colors in order to enable variable stroke colors (i.e., each triangle has a different color). Stroke colors in Freestyle are in the RGBA format, while vertex colors in Blender do not have an alpha component. Therefore, we here employ a 2-pass rendering approach as follows. First, the alpha component of an image is rendered by using the red component of vertex colors as the alpha component of stroke colors (1st pass). The render result is saved into a temporary buffer. Then, the vertex colors of stroke meshes are replaced with RGB values, and the RGB components of the image is rendered (2nd pass). Finally, the RGB and alpha components are merged to produce the render result in the RGBA format. |
Commit Details:
Full Hash: 4ec75badf8a0ed6bb2b00b26947792ddc629a164
SVN Revision: 26695
Parent Commit: 3f1920f
Lines Changed: +94, -12
1 Modified Path:
/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp (+94, -12) (Diff)