Author Topic: Undersampling  (Read 2957 times)

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Undersampling
« on: March 17, 2005, 03:19:42 pm »
Helge,

Is there a way to set variable framebuffer sampling rate ?
It would be nice to have something that looks cleaner than
SAMPLINGMODE_OGUS but runs smoother than SAMPLINGMODE_NORMAL.
For most users  it might be an option to increase performance on slow CPUs.
Regards,
Andrei

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11747
    • View Profile
    • http://www.jpct.net
Undersampling
« Reply #1 on: March 18, 2005, 02:55:18 pm »
No, that's not possible ATM, i'm afraid. I also think that it would look strange to use a 0.75 factor and upsample that for example. Like the scaling a TFT does in these cases... barely usable IMHO.

Offline raft

  • quad
  • ******
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Undersampling
« Reply #2 on: October 23, 2005, 10:47:44 pm »
for the ones who use software renderer, using a small sized FrameBuffer and then scaling it to screen may be a better alternative to under sampling.

i didnt make any comprehensive tests but it seems this way peforms better than under sampling. furthermore one can use any sampling ratio. i remember i read something like sun graphics engineers suggest scaling images on the fly (i dont know why)

btw, assuming all others the same, can we say rendering time is proportional to FrameBuffer's area ?

Code: [Select]
r a f t

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11747
    • View Profile
    • http://www.jpct.net
Undersampling
« Reply #3 on: October 25, 2005, 12:45:17 am »
Quote from: "raft"
i didnt make any comprehensive tests but it seems this way peforms better than under sampling. furthermore one can use any sampling ratio.
Undersampling simply renders at half the resolution and doubles  the rendered pixels in x- and y-direction. Maybe scaling is faster because it can benefit from hardware support, but i somehow doubt it, because it's a non-accelerated BufferedImage.

Quote from: "raft"
btw, assuming all others the same, can we say rendering time is proportional to FrameBuffer's area ?
Yes, roughly.

Offline raft

  • quad
  • ******
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Undersampling
« Reply #4 on: November 06, 2005, 01:54:35 pm »
Quote from: "EgonOlsen"
Undersampling simply renders at half the resolution and doubles  the rendered pixels in x- and y-direction. Maybe scaling is faster because it can benefit from hardware support, but i somehow doubt it, because it's a non-accelerated BufferedImage.


on my box (both redhat and win xp), scaling runs almost 10% faster then undersampling. swing uses VolatileImage (accelerated) by default for back buffer, but the result doesnt change even if i disable double buffering. strange :?: (btw, i dont if copying from a non-accelerated image to an accelerated one offers any improvement)

anyway, i preferred the undesampling way since it makes things (like 2d blitting) much easier. and 50% undesampling makes almost a 50% speed impovement so i see no point in using other scaling ratios

Code: [Select]
r a f t