SweetFX – Border

002The SweetFX Border effect places a border around the image. This can be used to place black borders at the top and bottom of the image to produce a letterbox appearance similar to that seen in 2.35:1 aspect ratio movies when viewed on a 16:9 aspect ratio HDTV.

Border does not change the resolution of the game. It merely “chops off” a portion of the image and fills it with a specified border color, so any vital game information display within the border area will be covered up by the border itself.

#define USE_BORDER 1 will enable the border according to values of border_width and border_color specified in the Border settings in SweetFX_settings.txt.


 / Border settings /
#define border_width float2(0,32) //[0 to 2048, 0 to 2048] (X,Y)-width of the border. Measured in pixels.
#define border_color float3(0, 0, 0) //[0 to 255, 0 to 255, 0 to 255] What color the border should be. In integer RGB colors, meaning 0,0,0 is black and 255,255,255 is full white.

A top border will automatically have a corresponding bottom border, and a left border will automatically have a corresponding right border. Horizontal and vertical borders may be enabled separately or together.

#define border_width float2(0,32)
                            | |
                     vertical horizontal
                      width     width

 0 = no border.
 Size is in pixels. Smaller values produce smaller borders. 0 to 2048 each.

Border_width specifies whether or not to add vertical and horizontal borders, and if so, how large should they be. Keep in mind that if border_width is set to (0,0), then no borders will be displayed even if USE_BORDER is set to 1 because the borders will have no size.

Image Cropping

The image will be cropped. The game will not be resized to accommodate the border. This means that borders will chop off portions of the image and result in a loss of display information. For example, in 002 below, the horizontal borders have been set to 150 pixels. Due to this size, the in-game HUD information cannot be viewed.

Border Sizes

Both vertical and both horizontal borders will be of the same size. If the horizontal border is set to 32 pixels, then it will be 32 pixels at the top and 32 pixels at the bottom for a total of 64 cropped image pixels. The image is still present, but it is obstructed by the border.

Border Colors

Borders may have any RGB color other than the default black. Border color is adjusted by specifying 0 to 255 per RGB value. The same color is applied to all borders.

#define border_color float3(0, 0, 0)
                            |  |  |
                          Red  |  Blue

0,0,0 is black, and 255,255,255 is full white.

Below are screenshots from the game Fallout: New Vegas.

001 Default


Using the default settings, a 32-pixel black border appears at the top, and a 32-pixel black border appears at the bottom.

#define border_width float2(0,32)
#define border_color float3(0, 0, 0)

The default border settings produce a black border on the top and bottom of the image. The size of each border is 32 pixels, which, when summed, means that 64 pixels of image information is lost beneath the border.

002 Thick Horizontal Borders


002. 150-pixel horizontal borders. All HUD information, such as the life bar located in the left-bottom area of the screen, is covered up by the border.

#define border_width float2(0,150)
#define border_color float3(0, 0, 0)

003 Thick Horizontal and Vertical Borders


003. All borders are 150-pixels in size. Note that the game resolution is the same. Borders do not resize the image. They merely cover it up.

#define border_width float2(150,150)
#define border_color float3(0, 0, 0)

004 Vertical Borders


004. Two 32-pixel vertical borders on the sides of the image.

#define border_width float2(32,0)
#define border_color float3(0, 0, 0)

005 Lime-Green Border


005. Changing the border color in this example produces a 32-pixel lime-green border around the image.

#define border_width float2(32,32)
#define border_color float3(0, 255, 0)

006 Purple Border


006. 32-pixel purple borders located at the top and bottom of the image.

#define border_width float2(0,32)
#define border_color float3(128, 0, 64)

We can use the GIMP color chooser to select a color and copy the RGB values into the SweetFX_settings.txt file.

SweetFX Effects

, ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: