In my toying around with pixel-wise depth-of-field blur, I am
encountering a need for pixel jitter. I want to run
vwrays -fd -vf tempvf -x 740 -y 480 | rcalc -id6
-e `vwright i < tempvf`
[expressions to modify $1..$6, the ray origin and direction]
-od | rtrace -fdc -x 740 -y 480 @opts scene.oct > img.pic
but there is no facility to incorporate pixel jitter, as defined
in rpict(1), save the use of the variables returned by vwright:
···
------------
Nt: view type ('v'==1,'l'==2,'a'==3,'h'==4,'c'==5)
Npx: view point x value
Npy: view point y value
Npz: view point z value
Ndx: view direction x value (normalized)
Ndy: view direction y value (normalized)
Ndz: view direction z value (normalized)
Nux: view up vector x value (normalized)
Nuy: view up vector y value (normalized)
Nuz: view up vector z value (normalized)
Nh: view horizontal size
Nv: view vertical size
Ns: view shift
Nl: view lift
No: view fore clipping distance
Na: view aft clipping distance
Nhx: derived horizontal image vector x value (normalized)
Nhy: derived horizontal image vector y value (normalized)
Nhz: derived horizontal image vector z value (normalized)
Nhn: derived horizontal image vector multiplier
Nvx: derived vertical image vector x value (normalized)
Nvy: derived vertical image vector y value (normalized)
Nvz: derived vertical image vector z value (normalized)
Nvn: derived vertical image vector multiplier
------------
My question is: how do I use these variables to incorporate pixel
jitter into these renderings? I do not know how to scale the
Nhx,Nhy,Nhz and Nvx,Nvy,Nvz vectors to jitter over one pixel's
width. Do I multiply by Nh,Nv and divide by 740 and 480,
respectively? Or does it depend on the view type?
Mark