How to add letterbox in windowed mode?

share shaders here
Post Reply
  • Author
  • Message
Offline
Posts: 1
Joined: 02 Jun 2015, 21:57

How to add letterbox in windowed mode?

I am looking to add a letterbox effect to my game. I followed the guide from this thread http://enbdev.com/enbseries/forum/viewt ... f=7&t=2113 and got nowhere. My game is at 5:4, at an odd native resolution, and I cannot get letterbox to work. My game is in windowed mode, at native resolution with both "ForceBorderless" and 'ForceBorderlessFullscreen" marked true in enblocal.ini. I have to run windowed, because thats the only way I was able to get my game CTD free. In my enbeffect.fx, I added these two sets of code

Code: Select all

#define LETTERBOX_BARS      0   // Enable Matso's cinematic bars (black bars at top and bottom).

float fLetterboxOffset = 8.0;      // size of screen to be blacken (in %)

float2 fvTexelSize = float2(1.0 / 1280.0, 1.0 / 1024.0);   // Enter you're display resolution here.

Code: Select all

_oC0.xyz=color.xyz;

#if (LETTERBOX_BARS==1)
   float offset = fLetterboxOffset * 0.01;
   float2 sspos = fvTexelSize * vPos;
   if (sspos.y <= offset || sspos.y >= (1.0 - offset)) _oC0.rgb = 0.0;
#endif
I added them where the earlier thread told me to. Whats the damage?
(Here is my enbeffect.fx file, https://www.mediafire.com/?d7dzfrjz0wlazv5 )

I'm open to all suggestions. It shouldn't matter, but if for whatever reason you need it here is my modwat.ch, http://modwat.ch/cjeffcoatjr
Sorry if this whole thing is in the wrong subforum, this is my first time on the ENB forums.

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: How to add letterbox in windowed mode?

edit
#define LETTERBOX_BARS 0
to
#define LETTERBOX_BARS 1
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube
Post Reply