Forums > Javascript

[jsui] Sketch.copypixels and FSAA

Aug 18 2010 | 2:19 pm

I have an impression that Sketch.copypixels(…) copies twice as much with FSAA on. The effect is only apparent when copying a portion of source picture to an antialiased sketch (e.g. jsui’s own sketch).

I guess this is due to subsampling but then why it only affects width/height and not offset (either source or destination’s)?

I have very similar problem with Sketch.glscissor() which is supposed to work with window coordinates, but with FSAA on I have to double all the paramters (my solution is to use the following):

Sketch.prototype.glscissor_m = function(x,y,w,h) {
  if (this.fsaa)

(I guess I need to make a similar "patch" for copypixels…)

Aug 18 2010 | 2:22 pm


Sketch.prototype.copypixels_m = function(src,dx,dy,sx,sy,w,h) {
  if (this.fsaa) { w /= 2; h /= 2; }

I could also be more blunt and mask the original methods altogether, but I’m not so I don’t…

Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Javascript