|
||||||||
Chapter 8 Effective FiltersExtract feDiffuseLighting primitiveThis filter primitive feDiffuseLighting
lights a source graphic using the alpha channel as a bump map.The resulting
image is an RGBA opaque image based on the light color with alpha = 1.0
everywhere, it's opaque image. This is syntax for feDiffuseLighting
element : <feDiffuseLighting
id="name" We can put several lighting sources as
children of feDiffuseLighting element. For feDiffuseLighting attributes are in, result and surfaceScale
: height of surface when Ain = 1. ( 1 by default )
Diagram 8-8. Chart for 'feDiffuseLighting' syntax Here example of code : <filter id="MyFilter"
filterUnits='objectBoundingBox' x='0%' y='0%' width='100%'
height='100%'> Figure 8-6 show effect for values of attribute surfaceScale. We use lighting on feTurbulence.
Figure 8-6. Different values for surfaceScale attribute Figure 8-7 show some nice effects on raster. We use feColorMatrix with type="luminanceToAlpha" to get new picture, we light this picture and composite lighting with original picture.
Figure 8-7. Some effects using feColorMatrix and feDiffuseLighting chapters: intro toc intro sample svg elements toc svg elements sample |
|
|||||||
|
| Rainbow Seeker | SVG PHP
Learn SVG: Contact Learn SVG
©2002-2008 Learn SVG. All Rights Reserved. Questions and comments to: learnsvg@gmail.com |
||||||||