SGENPT-MIX - Sega Genesis Pseudo Transparency Mixer shader

Omg… v7 already. :grinning: Here is my test with version 5.

PS1-Undither-BoxBlur.slang + sgenpt-mix.slang + yee64.slang

PS1-Undither-BoxBlur.slang is something like first pass to smooth some regions and sgenpt-mix.slang is to finalise image. yee64.slang also add some blur.

So far is my best EarthWormJim result.

shaders = "3"
shader0 = "shaders_slang/dithering/shaders/ps1dither/PS1-Undither-BoxBlur.slang"
filter_linear0 = "true"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "shaders_slang/shaders/sgenpt-mix.slang"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
shader2 = "shaders_slang/crt/shaders/yee64.slang"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = ""
float_framebuffer2 = "false"
srgb_framebuffer2 = "false"
parameters = "SGPT_SHARPNESS;SGPT_BLEND_OPTION;SGPT_BLEND_LEVEL"
SGPT_SHARPNESS = "0.000000"
SGPT_BLEND_OPTION = "2.000000"
SGPT_BLEND_LEVEL = "0.000000"

PS. Grabbed version 7 and left for testing :grin:

3 Likes

I still hadn’t seen that sawtooth on the V6. :open_mouth: And those windows in the Eternal Champions … they were difficult to filter without destroying other details. This is evolving very fast!

3 Likes

Version 8 released: sgenpt-mix-v8 (glsl and slang)

What’s new:

  • Added a fifth option called Both - Soft;
  • Some code cleanups;
  • Got rid of two of those blend level knobs. Now it’s just one blend level knob to tweak and it works with all options. I think it’s simpler and easier to tweak. So, it’s back to just three params.
6 Likes

I think this is one of the best dithering shader to date, nice work.

2 Likes

I’m testing the V8 now, and I noticed that the ‘’ x ‘’ in the square of life marker is very good in both mode & both soft!

But Sonic’s nose and the lines on the floor are very faded, the shadows are like that too. Is this related to linear gamma or is it something else?

It is happening in both mode, and it is most noticeable in both soft mode.

Both mode V6


Both soft mode V8

In Streets of Rage 2, the fog appears to be very bright, as if it were lit in both mode of v8.

Both mode V6:


Both mode V8:

2 Likes

Thanks for the feedback.

Let me explain:

Sonic images: yes, the faded nose and lines are because of the sawtooth reduction code and linear gamma implemented after v6.

SOR2 images: it’s because of linear gamma.

I can add the old Both code as a sixth option and a linear gamma (on/off) switch if you prefer. But, if gamma isn’t linear, the “X” will be wrong again.

1 Like

It would be great if I could turn this off for some games. Sonic 1, 2, 3 & K the waterfalls were great with linear gamma on (especially in Hydrocity).

2 Likes

OK, here’s Version 8b: sgenpt-mix-v8b (glsl and slang)

What’s new:

  • Added option to original ‘Both’ (it’s number 4);
  • Added a switch to turn Linear Gamma ON/OFF.

For now on, I’ll only update the first pass. Second pass will be updated when necessary only.

6 Likes

Added some blur and glow to final image. Now all levels looks awesome. Something like SNES graphics.

shaders = "13"
shader0 = "shaders_slang/shaders/sgenpt-mix.slang"
filter_linear0 = "true"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "shaders_slang/blurs/sharpsmoother.slang"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.000000"
shader2 = "shaders_slang/blurs/smart-blur.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = ""
float_framebuffer2 = "false"
srgb_framebuffer2 = "false"
scale_type_x2 = "source"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "shaders_slang/stock.slang"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "Reference"
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
scale_type_x3 = "source"
scale_x3 = "1.000000"
scale_type_y3 = "source"
scale_y3 = "1.000000"
shader4 = "shaders_slang/blurs/kawase/kawase0.slang"
filter_linear4 = "true"
wrap_mode4 = "mirrored_repeat"
mipmap_input4 = "false"
alias4 = ""
float_framebuffer4 = "false"
srgb_framebuffer4 = "true"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/blurs/kawase/linearize.slang"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = ""
float_framebuffer5 = "false"
srgb_framebuffer5 = "true"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/blurs/kawase/kawase1.slang"
filter_linear6 = "true"
wrap_mode6 = "mirrored_repeat"
mipmap_input6 = "false"
alias6 = ""
float_framebuffer6 = "false"
srgb_framebuffer6 = "true"
scale_type_x6 = "source"
scale_x6 = "1.000000"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/blurs/kawase/kawase1.slang"
filter_linear7 = "true"
wrap_mode7 = "mirrored_repeat"
mipmap_input7 = "false"
alias7 = ""
float_framebuffer7 = "false"
srgb_framebuffer7 = "true"
scale_type_x7 = "source"
scale_x7 = "1.000000"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "shaders_slang/blurs/kawase/kawase2.slang"
filter_linear8 = "true"
wrap_mode8 = "mirrored_repeat"
mipmap_input8 = "false"
alias8 = ""
float_framebuffer8 = "false"
srgb_framebuffer8 = "true"
scale_type_x8 = "source"
scale_x8 = "1.000000"
scale_type_y8 = "source"
scale_y8 = "1.000000"
shader9 = "shaders_slang/blurs/kawase/kawase3.slang"
filter_linear9 = "true"
wrap_mode9 = "mirrored_repeat"
mipmap_input9 = "false"
alias9 = ""
float_framebuffer9 = "false"
srgb_framebuffer9 = "true"
scale_type_x9 = "source"
scale_x9 = "1.000000"
scale_type_y9 = "source"
scale_y9 = "1.000000"
shader10 = "shaders_slang/blurs/kawase/delinearize.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = ""
float_framebuffer10 = "false"
srgb_framebuffer10 = "false"
shader11 = "shaders_slang/blurs/kawase/screen_combine.slang"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = ""
float_framebuffer11 = "false"
srgb_framebuffer11 = "false"
shader12 = "shaders_slang/crt/shaders/yee64.slang"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = ""
float_framebuffer12 = "false"
srgb_framebuffer12 = "false"
parameters = "SGPT_SHARPNESS;SGPT_BLEND_OPTION;SGPT_BLEND_LEVEL;max_w;min_w;smoot;lumad;mtric;SB_RED_THRESHOLD;SB_GREEN_THRESHOLD;SB_BLUE_THRESHOLD;bloom_threshold"
SGPT_SHARPNESS = "1.000000"
SGPT_BLEND_OPTION = "1.000000"
SGPT_BLEND_LEVEL = "1.000000"
max_w = "0.100000"
min_w = "-0.070000"
smoot = "0.550000"
lumad = "0.300000"
mtric = "0.700000"
SB_RED_THRESHOLD = "0.200000"
SB_GREEN_THRESHOLD = "0.200000"
SB_BLUE_THRESHOLD = "0.200000"
bloom_threshold = "0.000000"
6 Likes

The colors of your preset are very beautiful! I usually use only bilateral or smart-blur.

Here I am using mdapt, smart-blur and sgenpt-mix in both blend 0:

Smart-blur for Emerald Hill background mountains:

Sgenpt-mix filtering the vertical lines in the Hill Top mountains

Mdapt for transparent tubes in Chemical Plant, sgenpt-mix makes the mdapt vertical lines more uniform, so I can increase the error prevention even more, because the sgenpt-mix in blend 0 is better than closing the mdapt color metric too much

4 Likes

Looks fantastic, could you share the preset?

1 Like

You’re artists!

I like these presets that combine independent crafted shaders to create a final coherent beautiful final output screen!

We really need a thread called “Show off what naked shaders can do!”

7 Likes

Yes I Can. But I’m not on my PC right now, when I get home from work I’ll post it here. I have a preset with multipass sgenpt-mix that looks great on Bonanza Bros Genesis version!

Here’s what I promised, I just know how to share it that way, sorry.

The Sonic 2 preset made by me: https://anonymousfiles.io/8VcY1SBA/

And here is the sgenpt-mix multipass preset I’m using on Bonanza Bros from Mega Drive / Genesis: https://anonymousfiles.io/IoT1bEMW/

1 Like

Thank you for sharing the presets! Much appreciated!

2 Likes

Multipass is more than successful here! Pass 1 on both blend level 0.3, pass 2 on cb level 0.7 for the life bar:

1 Like

More:

3 Likes

Well, does anyone here know if it is possible to use sgenpt-mix with ntsc adaptive? I try to put it in 1x first, but it results in a purple screen. I think that both mode with blend 0 could close dither better in Master System games, at the same time that I would get an image close to what I saw on old TV’s.

You probably can it’s just a matter of setting the preset up correctly, ymmv.

I really don’t know why it gets purple.

I wouldn’t combine those two, because their blend are equivalent. Choose one to use.