fePointLight (and other filters) are incorrect if the page is zoomed. As an example, visit the following url and zoom in: http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObjectApproved/filters-light-01-f.html Expected: light sources zoom consistently. Actual: light sources change in intensity and position. (Original bug: crbug.com/130945)
I thought we already have a bug report for that? IIRC Reni or Zoltan were working on that but seem to be busy yet. Sadly the search engine
http://www.w3.org/TR/SVG/filters.html#feDiffuseLightingElement Because they operate on pixels, such filters are inherently resolution-dependent. To make ‘feDiffuseLighting’ produce resolution-independent results, an explicit value should be provided for either the ‘filterRes’ attribute on the ‘filter’ element and/or attribute ‘kernelUnitLength’. The testsuite test doesn't set these attributes so zooming in is likely to result in at least an intensity change depending on how it's implemented in Webkit.
(In reply to comment #2) > http://www.w3.org/TR/SVG/filters.html#feDiffuseLightingElement Because they operate on pixels, such filters are inherently resolution-dependent. To make ‘feDiffuseLighting’ produce resolution-independent results, an explicit value should be provided for either the ‘filterRes’ attribute on the ‘filter’ element and/or attribute ‘kernelUnitLength’. > > The testsuite test doesn't set these attributes so zooming in is likely to result in at least an intensity change depending on how it's implemented in Webkit. At the moment the light source position is transformed by using wrong transformations. That causes the issue. This is a known bug, that we have since filters render pixel perfect. FF handles this case correctly.
(In reply to comment #3) the issue. This is a known bug, that we have since filters render pixel perfect. s/pixel-perfect/resolution-independent/ :)
I remember this bug very well, and I think we should fix it sometimes.
A couple of problems I found (related to the original bug report - http://crbug.com/13094): 1) light source positioning: currently we're not transforming the light source *at all* (zoom or no zoom) 2) FELighting is applied in unmultiplied space, but the alpha channel is calculated as if in premultiplied space (spec says Sa = max(Sr, Sg, Sb), premultiplied RGBA implied). Then when the image is converted to premultiplied for compositing, the RGB values are scaled down resulting in a darker light effect. I'll open a separate bug for #2.
Fixed via bug 181147 and bug 181197