Page 1 of 1

Pixel resolving and blurring ?

Posted: Fri Apr 22, 2005 14:31
by kristian
At release 2.0 Crazy Eddie wrote this line in the changelog:

Bug Fix: All imagery aligned to whole pixels resolving twinkling and blurring issues.

What is "whole pixels resolving" ? and what where the blurring issues ?

Where in the code did he change that ?

Re: Pixel resolving and blurring ?

Posted: Fri Apr 22, 2005 14:59
by lindquist
the CEGUIConfig.h has this setting:

Code: Select all

//////////////////////////////////////////////////////////////////////////
// Comment this line to remove the alignment of elements to pixel
// boundaries.  This may give you a performance boost at the expense
// of visual quality
//////////////////////////////////////////////////////////////////////////
#define CEGUI_ALIGN_ELEMENTS_TO_PIXELS 1


and then in CEGUIBase.h:

Code: Select all

/*!
\brief
   Macro used to return a float value rounded to the nearest integer.

   This macro is used throughout the library to ensure that elements are
   kept at integer pixel positions on the display.

\param x
   Expression to be rounded to nearest whole number

\return
   \a x after having been rounded
*/
#if defined(CEGUI_ALIGN_ELEMENTS_TO_PIXELS)
#   define PixelAligned(x)   ( (float)(int)(( x ) + 0.5f) )
#else
#   define PixelAligned(x)   ( x )
#endif


so... it means that everything is aligned to nearest-integer coordinates when renderered.

try commenting out the config... it makes quite a difference! there are screenshots in some of the older help-threads I think.