Lightweight LUT-Based Scanline Glow Concept + Prototype GLSL

I downloaded the latest slang shader zip file from the official Libretro repository https://github.com/libretro/slang-shaders

It’s under the reshade folder.

EDIT: Below are my presets for the above shader effects, try them on 2D games especially Super Mario World (SNES), Sonic (Megadrive) and Super Mario (NES).

Download the zip file ( https://www.dropbox.com/s/xnxqezh410x26fm/blendoverlay-shenglong.zip?dl=0 ) and extract it to your RetroArch shaders folder, start a game and load a preset.

The zip file contains the files below, please note the forum compresses images to .jpg, you will need to convert them back to .png. The manual process for the files below is: create a folder called ‘textures’, download the texture files from this post into the the textures folder, convert images to .png, copy the preset text from the pastbin website and save the files in the same level as the textures folder.

Fabric texture gtu-v050+blendoverlay-fabric.slangp

fabric


Fabric2 texture gtu-v050+blendoverlay-fabric2.slangp

fabricv2


Fabric3 texture gtu-v050+blendoverlay-fabric3.slangp

fabricv3


Yarn texture gtu-v050+blendoverlay-yarn.slangp

yarn

2 Likes

Dot pitch texture is missing in your archive. Can you please upload it?

Apologies for that, I excluded the dot pitch effect out on purpose as I thought it didn’t look quite right just yet, which is ironic because I wanted this type of shader (very light weight using a PNG texture) to re-create the @Birm 199x effect, which you have a variation of in your initial post in the other CRT screen shot thread.

I’ve found the blendoverlay shader works amazing with rough, inconsistent textures to create unique arty farty visuals.

I have updated the zip file to include the greyscale-slotmask preset and png for you to play with.

1 Like

Thanks. It works marvelous. Even if it doesn’t look right yet I’m fine with it as I don’t see any glitches or artifacts.

I’ve added “image-adjustment” shader at the end of your chain to bump up luminance to 1.20 as it’s too dark for me.

Anyway this texture overlay just solve my main problem and complain for PSX shading. It’s inconsistency of CRT shaders as many games change their resolution throughout the game. This is especially obvious with FMVs as usually they play on lower resolution compare to a main game.

Just check Silent Hill

I leave this for a reference.

Another example of how good this shader chain is. Although it still requires some more tweaking.

I’m trying to add some diffusion and halation to the picture but haven’t succeeded yet. Can’t get to work “vector-glow” correctly and “crt-easymod-halation” has some problems as well.

1 Like

Glad it’s serving a purpose for you. As the shader fills the screen with an overlay, it’s resolution independent so it doesn’t matter what resolution the game is running at. When combining with other shaders I find adding this as a last pass gives you less problems. You can make the dot pitch smaller by messing with the size paarameters or you can create a new texture with closer grids. I like a bit of bloom too, keep playing and let us know if you find some interesting presets.

Amazing! Are these shaders avalaible in GLSL or CG?

slang only at the moment, but I can convert it to GLSL.

1 Like

It would be great. :grinning: To avoid video driver change if anyone are using OpenGL.

Just wondering: could this be improved by adding more luminance values and “scanline widths” for those values? If you had 31 different luminance values and 31 different scanline widths, would that result in a color bars test image with no banding?

Since you can’t have a fraction of a pixel, it’s going to only be able to have as many bands as there are pixels in a scanline, if that makes sense. That is, with an infinite number of pixels to work with, I think so, yeah.

ah, yeah. I was thinking you would need to vary both the actual width of the scanline in pixels and the transparency(?) of the scanline in order to mimic that many “scanline widths.” Otherwise you’d need a monitor that could go to 31x scale :laughing:

anyway, just wondering if that would get rid of the banding in the color bars test pattern since there are 31 shades in the test pattern. This might also enhance the dynamics of the image/give the image greater depth.

hmm, yeah, possibly combined with transparency. However, I think you might need to do some weird perceptual mojo whenever you dropped a pixel (i.e., when you lose a pixel, I think the transparency would need to drop some, too, in a sort of sawtooth graph).

1 Like

If you, torridgristle, or anyone else wants to take this idea and run with it, please feel free; it’s beyond my current abilities. Just wanted to float the idea.

2 Likes

That tweak fixed the same problem I was having but only with Mode 7 games on any Snes emulator. Thank you so much.