Pixel resolving and blurring ?

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
kristian
Just popping in
Just popping in
Posts: 12
Joined: Wed Apr 13, 2005 17:25

Pixel resolving and blurring ?

Postby kristian » Fri Apr 22, 2005 14:31

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 ?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Pixel resolving and blurring ?

Postby lindquist » Fri Apr 22, 2005 14:59

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.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 9 guests