You can try using the feedback shader, like I just added to the slang version:
[QUOTE=hunterk;47032]You can try using the feedback shader, like I just added to the slang version: https://github.com/libretro/slang-shaders/blob/master/handheld/console-border/gba-4x.slangp[/QUOTE] Tried it, but the same thing happens. Either I have motion blur, or I have color correction.
I’m not an expert on this, but there’s something about color on the float4 value in the motion blur .cg file (in my previous post). Can it be that it’s canceling out the color correction from the other passes?
I think the problem is that the non-feedback motion blur shaders sample previous unfiltered frames (i.e., no color correction). The feedback shader samples a previous filtered frame (i.e., with the color correction applied). However, I forgot that the Cg feedback needs something added to the preset that slang does not. Here’s what it should look like:
shaders = "4" shader0 = "../../motionblur/shaders/feedback.cg" scale_type0 = source scale0 = 1.0 filter_linear0 = false feedback_pass = 0 shader1 = "../shaders/color/gba-color.cg filter_linear1 = false shader2 = "../shaders/lcd_cgwg/lcd-grid.cg" filter_linear2 = "false" wrap_mode2 = "clamp_to_border" scale_type_x2 = "source" scale_x2 = "4.000000" scale_type_y2 = "source" scale_y2 = "4.000000" shader3 = "shader-files/gb-pass-5.cg" filter_linear3 = "true" wrap_mode3 = "clamp_to_border" parameters = "SCALE;OUT_X;OUT_Y;GRID_STRENGTH;mixfactor" GRID_STRENGTH = "0.150000" SCALE = "1.0" OUT_X = "3200.0" OUT_Y = "1600.0" mixfactor = "0.50" textures = "BORDER" BORDER = "resources/gba-border-square-4x.png" BORDER_linear = "true" BORDER_wrap_mode = "clamp_to_border" BORDER_mipmap = "false"
EDIT: well, maybe not because this one–using motionblur-simple–seems to work fine for me, too:
shaders = "4" shader0 = "../../motionblur/shaders/motionblur-simple.cg" scale_type0 = source scale0 = 1.0 filter_linear0 = false shader1 = "../shaders/color/gba-color.cg filter_linear1 = false shader2 = "../shaders/lcd_cgwg/lcd-grid.cg" filter_linear2 = "false" wrap_mode2 = "clamp_to_border" scale_type_x2 = "source" scale_x2 = "4.000000" scale_type_y2 = "source" scale_y2 = "4.000000" shader3 = "shader-files/gb-pass-5.cg" filter_linear3 = "true" wrap_mode3 = "clamp_to_border" parameters = "SCALE;OUT_X;OUT_Y;GRID_STRENGTH;mixfactor" GRID_STRENGTH = "0.150000" SCALE = "1.0" OUT_X = "3200.0" OUT_Y = "1600.0" mixfactor = "0.50" textures = "BORDER" BORDER = "resources/gba-border-square-4x.png" BORDER_linear = "true" BORDER_wrap_mode = "clamp_to_border" BORDER_mipmap = "false"
I don’t know what I did, but when I tried to use this code, well… this happened.
In any case, I managed to make it work. I used this preset and inserted the GBA border in it.
I’ll try to figure out what I did wrong with your code though.
Thanks for the assistance
EDIT: I figured it out. Apparently, there was something wrong with the gba-color.cg file I was using. I swapped it for the one contained in “shaders_cg\handheld\shaders\color” and it worked like a charm.
Again, thank you!
[B]–FINAL EDIT–: I figured out the source of the whole problem. Turns out it all goes back to my utter lack of knowledge on how to edit .cgp files.
I didn’t change the numbers on the parameters when I added a new pass so that they would actually correlate to the shaders.
In other words, I changed shader0 to shader1, but didn’t change alias0 to alias1, scale_x0 to scale_x1, and so on. After fixing this, I was able to successfully add a motion blur pass to OP’s .cgp files.[/B]
Borders with background pictures made by damageinc86: The mega link is down.
Thanks!! All of you did a great job with these shaders.
Glad you like them.
I’ll remove the link as I don’t have a copy for those.
Would it be possible to convert GBA-LUT to slang? I love the way it looks but sadly it doesn’t seem to work with Vulkan.
You would have to ask the author of this shader in his thread:
I’m not able to convert those shaders myself. I tried making a glsl/vulkan version but ran into issues with several of the converted ones.
Thank you for these great Handheld Shaders. Is there a way to disable the screen glare? I find this effect very distracting while playing.
You’ll have to erase it on the png picture.
I don´t see that effect on the GBA PNG.
edit: Just found it
I’ve just installed and set these shaders and I’ve gotta say that they look pretty nice! There are a few problems that I’d like to point out, though:
The somewhat muted colors on the LCD grid shaders are a bit of a problem for games whose palettes were built around the backlit GBA SP or the DS, such as Kirby and the Amazing Mirror.
The DS shaders seem to be scaled pretty oddly on my monitor compared to the other shaders (I have a 15.6’’ Dell Inspiron 15 laptop). To be more specific, using the 4x variants cause the image to clip past what my monitor is capable of displaying, meaning I can only see half of each screen, while the 2x and 3x variants position the screens in such a way that the middle of the DS border cuts through them (the two video feeds appear to be oriented in such a way that they are directly adjacent with each other, similarly to how they are oriented with the standard LCD shader).
For some reason the Game Gear shaders make RetroArch slow down significantly, both in the RGUI and when playing a game (I assume this is due to the graphics for the Game Gear border being uncompressed); I haven’t seen this issue with the WonderSwan shaders or the Neo Geo Pocket Color ones because I haven’t installed any games to use them with yet.
Aside from these issues, I’m mostly satisfied with how these shaders look on my computer. Keep up the good work!
For the DS shader, there should be a core option to increase the separation between the two images to fit the border better.
Dunno about the game gear slowdown. I haven’t noticed any issues with it but I also haven’t used it much.
You’re probably using a particular resolution (768p for that Dell?). I could only test with my 1080p screen here.
The only particular thing the Game Gear shader does is stretching the horizontal resolution by 1.2 as the pixels aren’t square. Not sure if that’s enough to make a difference and if you need to force performance in your Video drivers or energy profiles.
Alright, I’ve finally gotten around to following your suggestion and it’s worked like a charm! There is some apparent overscan with New Super Mario Bros. and Mario Kart DS, but they’re just minor problems that don’t bug me too much.
I still haven’t figured out why the Game Bear borders slow down RetroArch so badly for me or how to fix the problem; for now, I’ll just have to make do with other shaders.
In regards to my laptop’s resolution, the label by the scratchpad says “15.6’’ Full HD Display” and lists HDMI compatibility as a feature, so I assume it’s a 1080p display. Not sure what kind of role that plays in the Game Gear shader issues, though.
Only the AMD file works with my card but every shader comes out looking like the GB shader. Replacing the lcd-grid.cg with the “v2” one in the standard files made it work for me, in case anyone is having a similar problem. Fantastic stuff!
2 things. Is it possible to remove the screen reflection? And any solution to rotates WS?
By “screen reflections”, are you talking about the tiny bit of glare in the upper-right corner of each shader? Because that’s part of the original border asset. If you want to get rid of that, you’ll have to either edit the border yourself or replace it with a border that doesn’t have the glare present (similarly to Tatsuya79’s described process for replacing the black GBC border with the purple one).
Just updated the megalink to be current. The files are in the resources folder.