Created attachment 8659041 [details] windowsAngleTest.svg D2D1 only accepts filter light source angles in a limited range, but we're not doing any checking (and svg allows any angle), so in out of range cases we're getting the default angle. azimuth and elevation on feDistantLight are affected, since D2D1 only accepts angles between 0 and 360: https://msdn.microsoft.com/en-us/library/windows/desktop/dn934239%28v=vs.85%29.aspx I guess limitingConeAngle on feSpotLight is also affected (I haven't tested yet), and in that case D2D1 only accepts angles between 0 and 90: https://msdn.microsoft.com/en-us/library/windows/desktop/hh706326%28v=vs.85%29.aspx In the test case an feDistantLight source is applied with an azimuth="-45", but the filter renders with an azimuth="0" (the default value).
Created attachment 8702434 [details] [diff] [review] Patch v1 The patch does a couple things: * Puts elevation and azimuth angles for diffuse and specular distant lighting filters in the range 0 to 360 for D2D - anything outside that range gets set to 0 by D2D. Current ff software filters, Chrome, and IE correctly support values outside 0 to 360. * Clamps limitingConeAngle for diffuse and specular spot lighting filters to the range -90 to 90, which is what D2D and other browsers do (so as far as I know ff software filters were the only case where that angle wasn't being clamped). Also further folds that angle into 0 to 90 since that's what the D2D docs say is required (even though functionally they do the right thing with an angle between -90 and 0).
11 months ago
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.