Author Topic: How to make quality better in sw mode...  (Read 3604 times)

Offline entis

  • byte
  • *
  • Posts: 32
    • View Profile
How to make quality better in sw mode...
« on: January 29, 2008, 04:33:53 pm »
Hi,

Are there some flags, tricks in jpct that will help me to make scene looks better (make pixels smaller...)... I saw the Bloodridge game and as I understood it uses sw mode only but there are some kind of "High quality" mode and in this mode it looks much better... Does anyone know how to make such a "High quality" mode in sw mode?

Thanks.

Offline Jonas

  • byte
  • *
  • Posts: 41
    • View Profile
Re: How to make quality better in sw mode...
« Reply #1 on: January 29, 2008, 08:13:40 pm »
You could use oversampling(see framebuffer samplingmodes..) or just render a higher resolution.

Simple things should be simple, complex things should be possible - Alan Kay

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How to make quality better in sw mode...
« Reply #2 on: January 29, 2008, 08:34:46 pm »
In addition, Bloodridge uses the MipMapper-class that is available in the download section as a separate download. MipMapping can reduce texture aliasing in some scenes and my improve overall image quality.

Offline Hrolf

  • int
  • **
  • Posts: 84
    • View Profile
Re: How to make quality better in sw mode...
« Reply #3 on: January 30, 2008, 07:07:31 am »
Here's the code I used in Bloodridge;

Code: [Select]
/*****************************************************************************
 ****************************************************************************/
  public void switchRenderQuality(boolean on)
  {
    m_hiResRender=on;
renderBuffer.dispose();
    if (m_hiResRender)
    {
    bufferWidth*=2;
    bufferHeight*=2;
}
else
{
    bufferWidth/=2;
    bufferHeight/=2;
    }
    renderBuffer=new FrameBuffer(bufferWidth, bufferHeight, FrameBuffer.SAMPLINGMODE_NORMAL);
    renderBuffer.enableRenderer(IRenderer.RENDERER_SOFTWARE);
      renderBuffer.setBoundingBoxMode(FrameBuffer.BOUNDINGBOX_NOT_USED);
      renderBuffer.optimizeBufferAccess();
  }