libretro / glsl-shaders

This repo is for glsl shaders converted by hand from libretro's common-shaders repo, since some don't play nicely with the cg2glsl script.
932 stars 224 forks source link

Dual Screen to Cocktail Shader #141

Open djleone1 opened 3 years ago

djleone1 commented 3 years ago

Love all the work here! I looked at some of the GLSL shader code and am not really understanding how to create my own, so I thought I'd ask if someone here could help me with this request.

Could someone create a shader that will take a dual screen side-by-side image and make it cocktail (or let me know if one already exists and I've missed it)? This would involve taking the left half of the image and centering it on the lower (P1 side) of the screen, and taking the right half of the image, rotating it 180 degrees, and centering it on the upper (P2 side) of the screen. Example...

How the original looks on my cocktail screen:

---------------------------------
|                               |
|                               |
|                               |
---------------------------------
|               |               |
|      P1       |       P2      |
|               |               |
---------------------------------
|                               |
|                               |
|                               |
---------------------------------

Desired Shader Output:

---------------------------------
|                               |
|                               |
|               P2              |
|   (rotated 180d to face P2)   |
|                               |
|-------------------------------|
|                               |
|                               |
|               P1              |
|                               |
|                               |
---------------------------------

Thanks in advance!

hizzlekizzle commented 3 years ago

Can you post a native-res screenshot of a game this would be applied to? It will be necessary for testing if I decide to attempt it.

djleone1 commented 3 years ago

The two games I'm interested in using this for with mame2003-plus are balonfgt and vstennis. My system is down at the moment (doing a bunch of soldering work) but if you need me to send screenshots I will do that as soon as I get it back up and running.

Also, I was thinking - the normal cocktail_portrait shader almost does exactly what I want, but instead of copying the whole image to the bottom and top of the screen, if it could copy the left half of the image to the bottom and the right half of the image to the top, that would be exactly what is needed for these 2 games.

djleone1 commented 3 years ago

The first 3 images below are a few examples (Vs. Balloon Fight, Vs. Baseball, and Vs. Tennis). They are all screenshots I took with my selected 9:16 aspect ratio (due to my rotated screen, I select an aspect ratio that gives me the appropriate dimensions for the image so it doesn't look stretched). balonfgt vsbball vstennis2

Next, I've included a screenshot of Vs. Tennis with "Core provided" aspect ratio, in case you need that. vstennis

Finally, a photoshop mock-up of the desired shader result. desired

Thanks for your help!