Handheld Border Shaders


#61

Hi,

As I use a Linux box with KMS mode I can’t use .cgp shaders. I extracted Bloodtype’s and Tatsuya79’s NDS images and using them as an overlay instead. However, this just gives me a black screen and sky-high CPU usage. Not sure what is going wrong as I managed this just fine with arcade game images from the similar Arcade overlay shader pack.

Any ideas what to do?


#62

You should still be able to use these shaders in KMS via GLSL. Just fetch them from the online updater.


#63

I mean specifically a shader with a border for DS or DSI. Can’t find any…

P


#64

Update:

-added Game Boy parameters made by Hunterk. You can change the contrast and other things in the shader options.

-High contrast version of the Game Boy Pocket shader. I tried to make a black and white variant to get something higher contrast while keeping the greys in order. GB-pocket-x / GB-pocket-high-contrast-x

-Some preset renaming.


#65

These shaders are absolutely amazing, Tasuya79. Blown away.

Can you please re-up the purple GBC border? The mega link is dead. Thanks!


#66

Glad you enjoy them. :slight_smile:

I’ve updated the link for the purple GBC. The file didn’t move, don’t know what Mega did.


#67

They really are beautiful. Any reason they’re not included in RA? They’d benefit just about everyone who wants to emulate these systems.


#68

They are. You can find them in shaders\handheld\console-border.

But they’ve been blurred a bit and have some banding on the light effect because of the size constraint on github repo.


#69

Oh, silly me.

Is that a hard Github limit? That’s a bummer.


#70

That’s a choice I think. They don’t want the shader download to get too big.


#71

Awesome shaders !! I run Lakka on Raspberry Pi 3, do these shaders work on the Pi ? Is there a way to configure RA to automatically choose the GBC shader for GBC games, and the DMG shader (the green/yellow one) for regular GB games even if they both run on the same emu core ? And do i need to enable or disable integer scaling ?


#72

I’m not familiar with the Pi but it’s probably too weak for those.

There’s no solution yet in retroarch to differentiate several machines emulated by the same core. There is per-game overrides but that’s a bit complicated to make for a huge collection of games. I just put a cgp file in the shader root folder and press N or M to select the shader I want in that case.

Integer scaling should be OFF and display ratio in 16:9 (if your screen is) to show the full border image. The scaling of the game picture is done by the shader itself at integer scale.


#73

Thank you for your answer, i’ll try directly on the Pi. As i understand, these shaders are already provided with the Lakka distribution in the “handheld/console-border” directory but i’m not sure if they are already in the GLSL format for the Pi to support them. I will check that when i get home. I have a 19" LCD monitor with a 1280x1024 resolution so no 16:9 for me, hopefully it will scale well.

Too bad that RA can’t differentiate between GB and GBC for shader preferences. Can a shader preference be associated with a playlist ?


#74

Not yet but this is a thing we have discussed.


#75

I just tried selecting these shaders on my Raspberry Pi 3 Lakka bartop and i either have no changes or a black screen. The shaders are already in GLSL format but i can’t get them to work. How can i find what causes this issue ?


#76

I managed to make the dmg-2x preset work up the the 5th pass by removing the code responsible for the motion blur in the first pass, but of course it is very slow. Can you describe what each pass does ? A Pi version, if feasible, would require to remove lots of options.


#77

first pass sets up the integer scaling, does the motion blur and sets up the pixel grid. The second pass does some blurring of the pixels, passes 3 and 4 do gaussian blurring of the image for making the shadow effect and pass 5 puts them all together. You could probably hack out passes 2, 3 and 4.


#78

How exactly do I add motion blur to the GBA shaders? I managed to actually add it, but for some reason, no matter where I position it within the GBA border .cgp config (GBA-standard-4x.cgp, in this case), it cancels out the color correction. The motion blur .cg I’m using is as follows:

struct previous
{
   uniform sampler2D texture;
   float2 tex_coord;
};


struct input
{
    float2 video_size;
    float2 texture_size;
    float2 output_size;
    float frame_count;
    float frame_direction;
    float frame_rotation;
    sampler2D texture : TEXUNIT0;
};


struct tex_coords
{
   float2 tex;
   float2 prev;
   float2 prev1;
   float2 prev2;
   float2 prev3;
   float2 prev4;
   float2 prev5;
   float2 prev6;
};


void main_vertex
(
   float4 position : POSITION,
   out float4 oPosition : POSITION,
   uniform float4x4 modelViewProj,
   float2 tex : TEXCOORD,


   previous PREV,
   previous PREV1,
   previous PREV2,
   previous PREV3,
   previous PREV4,
   previous PREV5,
   previous PREV6,
   out tex_coords coords
)
{
   oPosition = mul(modelViewProj, position);
   coords = tex_coords(tex, PREV.tex_coord,
      PREV1.tex_coord,
      PREV2.tex_coord,
      PREV3.tex_coord,
      PREV4.tex_coord,
      PREV5.tex_coord,
      PREV6.tex_coord);
}


struct output 
{
  float4 col    : COLOR;
};


output main_fragment(tex_coords coords,
uniform input IN,
      previous PREV,
      previous PREV1,
      previous PREV2,
      previous PREV3,
      previous PREV4,
      previous PREV5,
      previous PREV6
)
{
   float4 color = tex2D(PREV6.texture, coords.prev6);
   color = (color + tex2D(PREV5.texture, coords.prev5)) / 2.0;
   color = (color + tex2D(PREV4.texture, coords.prev4)) / 2.0;
   color = (color + tex2D(PREV3.texture, coords.prev3)) / 2.0;
   color = (color + tex2D(PREV2.texture, coords.prev2)) / 2.0;
   color = (color + tex2D(PREV1.texture, coords.prev1)) / 2.0;
   color = (color + tex2D(PREV.texture, coords.prev)) / 2.0;
   color = (color + tex2D(IN.texture, coords.tex)) / 2.0;




   output OUT;
   OUT.col = color;
   return OUT;
}


By the way, any chance of a white GBA version for the overlay?


#79

[QUOTE=DuoDynamo;47027]By the way, any chance of a white GBA version for the overlay? [/QUOTE] I can’t find a white one at the moment but there is a whitish, transparent purple one here.


#80

You’ve got the “Platinum” version SixWingedFreak made from BlueAmnesiac picture here that would be the closest to a white model.

No clue about motion-blur, I’m not using it.