Lighting filter normal formulae

Hello WG.

The surface normal calculation formulae in the feDiffuseLighting section
of both 1.1 and the 1.2 Filters module appear to be wrong.  Currently
they say:

Nx(x,y) = -surfaceScale * FACTORx *
  (Kx(0,0)*I(x-dx,y-dy) + Kx(1,0)*I(x,y-dy) + Kx(2,0)*I(x+dx,y-dy) +
   Kx(0,1)*I(x-dx,y)    + Kx(1,1)*I(x,y)    + Kx(2,1)*I(x+dx,y)    +
   Kx(0,2)*I(x-dx,y+dy) + Kx(1,2)*I(x,y+dy) + Kx(2,2)*I(x+dx,y+dy))

and similarly for Ny.  Shouldn’t the indexes used on Kx be the other way
around?  Isn’t the convention for matrices A<sub>row,column</sub>?  (And
matrices conventially begin their indexes at 1, too.)


I noticed this while reviewing Erik’s filters-light-02-f.svg test.
Since I wasn’t really familiar with lighting filters, I implemented
feSpecularLighting/feDistantLight in canvas to see what the results
should be:

http://mcc.id.au/temp/2009/feSpecularLighting-feDistantLight-canvas.html

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Tuesday, 11 August 2009 04:32:39 UTC