Trying to make organic glow

So I’m a big fan of Solid12345’s shader pack, and have been using it to great effect with dosbox emulation, amongst the other usual things.

One of his shaders, the Makvision one, does a great job replicating 80s RGB computer monitors, but with one big shortcoming–the glow output, which I imagine is from the CRTEasymodehalation pass, is structured in the chain in such a way that the glow is pixellated within one row past the object’s edge.

I grew up using 80s monitors, and I know the glow isn’t pixellated, it is organic. So I figured it would be easy to re-order the shader chain so the glow output was after the other filters to keep it organic.

If only it were.

When I moved the glow pass further down the chain, instead of organic glow I got a double image output, side by side, with the second image on the right being a negative image.

WTF?

I’m not a coder, but I can pick up on simpler things. Here’s the file I’m trying to change:

shaders = “15” shader0 = “…\shaders_cg\Analog Shader Pack\480P\linearize.cg” filter_linear0 = “false” wrap_mode0 = “clamp_to_border” mipmap_input0 = “false” alias0 = “” float_framebuffer0 = “false” srgb_framebuffer0 = “true” scale_type_x0 = “source” scale_x0 = “1.000000” scale_type_y0 = “source” scale_y0 = “1.000000” shader1 = “…\shaders_cg\Analog Shader Pack\480P\blur_horiz.cg” filter_linear1 = “false” wrap_mode1 = “clamp_to_border” mipmap_input1 = “false” alias1 = “” float_framebuffer1 = “false” srgb_framebuffer1 = “true” scale_type_x1 = “source” scale_x1 = “1.000000” scale_type_y1 = “source” scale_y1 = “1.000000” shader2 = “…\shaders_cg\Analog Shader Pack\480P\blur_vert.cg” filter_linear2 = “false” wrap_mode2 = “clamp_to_border” mipmap_input2 = “false” alias2 = “” float_framebuffer2 = “false” srgb_framebuffer2 = “true” scale_type_x2 = “source” scale_x2 = “1.000000” scale_type_y2 = “source” scale_y2 = “1.000000” shader3 = “…\shaders_cg\Analog Shader Pack\480P\threshold.cg” filter_linear3 = “false” wrap_mode3 = “clamp_to_border” mipmap_input3 = “false” alias3 = “” float_framebuffer3 = “false” srgb_framebuffer3 = “true” scale_type_x3 = “source” scale_x3 = “1.000000” scale_type_y3 = “source” scale_y3 = “1.000000” shader4 = “…\shaders_cg\Analog Shader Pack\480P\crt-easymode-halation.cg” filter_linear4 = “true” wrap_mode4 = “clamp_to_border” mipmap_input4 = “false” alias4 = “” float_framebuffer4 = “false” srgb_framebuffer4 = “false” scale_type_x4 = “source” scale_x4 = “1.000000” scale_type_y4 = “source” scale_y4 = “1.000000” shader5 = “…\shaders_cg\Analog Shader Pack\480P\blurs\blur3fast-horizontal.cg” filter_linear5 = “false” wrap_mode5 = “clamp_to_border” frame_count_mod5 = “2” mipmap_input5 = “false” alias5 = “” float_framebuffer5 = “true” srgb_framebuffer5 = “false” scale_type_x5 = “absolute” scale_x5 = “1280” scale_type_y5 = “source” scale_y5 = “1.000000” shader6 = “…\shaders_cg\Analog Shader Pack\480P\blurs\blur3x3.cg” filter_linear6 = “false” wrap_mode6 = “clamp_to_border” mipmap_input6 = “false” alias6 = “” float_framebuffer6 = “false” srgb_framebuffer6 = “false” scale_type_x6 = “source” scale_x6 = “0.500000” scale_type_y6 = “source” scale_y6 = “1.000000” shader7 = “…\shaders_cg\stock.cg” filter_linear7 = “false” wrap_mode7 = “clamp_to_border” mipmap_input7 = “false” alias7 = “” float_framebuffer7 = “false” srgb_framebuffer7 = “false” shader8 = “…\shaders_cg\Analog Shader Pack\480P\advanced-aa.cg” filter_linear8 = “false” wrap_mode8 = “clamp_to_border” mipmap_input8 = “false” alias8 = “” float_framebuffer8 = “false” srgb_framebuffer8 = “false” shader9 = “…\shaders_cg\Analog Shader Pack\480P\crt-easymode.cg” filter_linear9 = “false” wrap_mode9 = “clamp_to_border” mipmap_input9 = “false” alias9 = “” float_framebuffer9 = “false” srgb_framebuffer9 = “false” shader10 = “…\shaders_cg\Analog Shader Pack\480P\image-adjustment.cg” filter_linear10 = “true” wrap_mode10 = “clamp_to_border” mipmap_input10 = “false” alias10 = “” float_framebuffer10 = “false” srgb_framebuffer10 = “false” scale_type_x10 = “source” scale_x10 = “1.000000” scale_type_y10 = “source” scale_y10 = “1.000000” shader11 = “…\shaders_cg\Analog Shader Pack\480P\stock.cg” filter_linear11 = “false” wrap_mode11 = “clamp_to_border” mipmap_input11 = “false” alias11 = “” float_framebuffer11 = “false” srgb_framebuffer11 = “false” shader12 = “…\shaders_cg\Analog Shader Pack\480P\flicker.cg” wrap_mode12 = “clamp_to_border” mipmap_input12 = “false” alias12 = “” float_framebuffer12 = “false” srgb_framebuffer12 = “false” shader13 = “…\shaders_cg\stock.cg” filter_linear13 = “true” wrap_mode13 = “clamp_to_border” mipmap_input13 = “false” alias13 = “” float_framebuffer13 = “false” srgb_framebuffer13 = “false” shader14 = “…\shaders_cg\Analog Shader Pack\COMPONENT\crt-lottes.cg” filter_linear14 = “true” wrap_mode14 = “clamp_to_border” mipmap_input14 = “false” alias14 = “” float_framebuffer14 = “false” srgb_framebuffer14 = “false” parameters = “GAMMA_INPUT;GAMMA_OUTPUT;SHARPNESS_H;SHARPNESS_V;MASK_TYPE;MASK_STRENGTH_MIN;MASK_STRENGTH_MAX;MASK_SIZE;SCANLINE_STRENGTH_MIN;SCANLINE_STRENGTH_MAX;SCANLINE_BEAM_MIN;SCANLINE_BEAM_MAX;GEOM_CURVATURE;GEOM_WARP;GEOM_CORNER_SIZE;GEOM_CORNER_SMOOTH;INTERLACING_TOGGLE;HALATION;DIFFUSION;BRIGHTNESS;AA_RESOLUTION_X;AA_RESOLUTION_Y;SHARPNESS_H;SHARPNESS_V;MASK_STRENGTH;MASK_DOT_WIDTH;MASK_DOT_HEIGHT;MASK_STAGGER;MASK_SIZE;SCANLINE_STRENGTH;SCANLINE_BEAM_WIDTH_MIN;SCANLINE_BEAM_WIDTH_MAX;SCANLINE_BRIGHT_MIN;SCANLINE_BRIGHT_MAX;SCANLINE_CUTOFF;GAMMA_INPUT;GAMMA_OUTPUT;BRIGHT_BOOST;DILATION;target_gamma;monitor_gamma;overscan_percent_x;overscan_percent_y;saturation;contrast;luminance;bright_boost;R;G;B;ZOOM;XPOS;YPOS;V_OSMASK;H_OSMASK;percent;SHARPEN_FACTOR;hardScan;hardPix;warpX;warpY;maskDark;maskLight;scaleInLinearGamma;shadowMask;brightboost” GAMMA_INPUT = “2.730000” GAMMA_OUTPUT = “2.500000” SHARPNESS_H = “0.000000” SHARPNESS_V = “0.000000” MASK_TYPE = “3.000000” MASK_STRENGTH_MIN = “0.000000” MASK_STRENGTH_MAX = “0.000000” MASK_SIZE = “1.000000” SCANLINE_STRENGTH_MIN = “0.000000” SCANLINE_STRENGTH_MAX = “0.000000” SCANLINE_BEAM_MIN = “1.000000” SCANLINE_BEAM_MAX = “1.000000” GEOM_CURVATURE = “0.090000” GEOM_WARP = “0.000000” GEOM_CORNER_SIZE = “0.000000” GEOM_CORNER_SMOOTH = “150.000000” INTERLACING_TOGGLE = “0.000000” HALATION = “0.510000” DIFFUSION = “0.350000” BRIGHTNESS = “1.200000” AA_RESOLUTION_X = “0.000000” AA_RESOLUTION_Y = “0.000000” SHARPNESS_H = “0.500000” SHARPNESS_V = “1.000000” MASK_STRENGTH = “0.100000” MASK_DOT_WIDTH = “1.000000” MASK_DOT_HEIGHT = “1.000000” MASK_STAGGER = “1.000000” MASK_SIZE = “1.000000” SCANLINE_STRENGTH = “1.000000” SCANLINE_BEAM_WIDTH_MIN = “1.500000” SCANLINE_BEAM_WIDTH_MAX = “1.500000” SCANLINE_BRIGHT_MIN = “0.350000” SCANLINE_BRIGHT_MAX = “0.650000” SCANLINE_CUTOFF = “400.000000” GAMMA_INPUT = “2.000000” GAMMA_OUTPUT = “1.800000” BRIGHT_BOOST = “1.050000” DILATION = “1.000000” target_gamma = “2.500000” monitor_gamma = “2.000000” overscan_percent_x = “0.000000” overscan_percent_y = “0.000000” saturation = “1.000000” contrast = “1.250000” luminance = “0.900000” bright_boost = “0.000000” R = “0.900000” G = “0.850000” B = “1.200000” ZOOM = “1.000000” XPOS = “0.000000” YPOS = “0.000000” V_OSMASK = “0.000000” H_OSMASK = “0.002000” percent = “0.9300000” SHARPEN_FACTOR = “3.000000” hardScan = “-12.000000” hardPix = “-12.000000” warpX = “0.020000” warpY = “0.041000” maskDark = “0.800000” maskLight = “2.000000” scaleInLinearGamma = “1.000000” shadowMask = “1.000000” brightboost = “1.000000”

And here’s what I tried changing it to:

shaders = “15” shader0 = “…\shaders_cg\Analog Shader Pack\480P\linearize.cg” filter_linear0 = “false” wrap_mode0 = “clamp_to_border” mipmap_input0 = “false” alias0 = “” float_framebuffer0 = “false” srgb_framebuffer0 = “true” scale_type_x0 = “source” scale_x0 = “1.000000” scale_type_y0 = “source” scale_y0 = “1.000000” shader1 = “…\shaders_cg\Analog Shader Pack\480P\blur_horiz.cg” filter_linear1 = “false” wrap_mode1 = “clamp_to_border” mipmap_input1 = “false” alias1 = “” float_framebuffer1 = “false” srgb_framebuffer1 = “true” scale_type_x1 = “source” scale_x1 = “1.000000” scale_type_y1 = “source” scale_y1 = “1.000000” shader2 = “…\shaders_cg\Analog Shader Pack\480P\blur_vert.cg” filter_linear2 = “false” wrap_mode2 = “clamp_to_border” mipmap_input2 = “false” alias2 = “” float_framebuffer2 = “false” srgb_framebuffer2 = “true” scale_type_x2 = “source” scale_x2 = “1.000000” scale_type_y2 = “source” scale_y2 = “1.000000” shader3 = “…\shaders_cg\Analog Shader Pack\480P\threshold.cg” filter_linear3 = “false” wrap_mode3 = “clamp_to_border” mipmap_input3 = “false” alias3 = “” float_framebuffer3 = “false” srgb_framebuffer3 = “true” scale_type_x3 = “source” scale_x3 = “1.000000” scale_type_y3 = “source” scale_y3 = “1.000000” shader4 = “…\shaders_cg\Analog Shader Pack\480P\blurs\blur3fast-horizontal.cg” filter_linear4 = “false” wrap_mode4 = “clamp_to_border” frame_count_mod4 = “2” mipmap_input4 = “false” alias4 = “” float_framebuffer4 = “true” srgb_framebuffer4 = “false” scale_type_x4 = “absolute” scale_x4 = “1280” scale_type_y4 = “source” scale_y4 = “1.000000” shader5 = “…\shaders_cg\Analog Shader Pack\480P\blurs\blur3x3.cg” filter_linear5 = “false” wrap_mode5 = “clamp_to_border” mipmap_input5 = “false” alias5 = “” float_framebuffer5 = “false” srgb_framebuffer5 = “false” scale_type_x5 = “source” scale_x5 = “0.500000” scale_type_y5 = “source” scale_y5 = “1.000000” shader6 = “…\shaders_cg\stock.cg” filter_linear6 = “false” wrap_mode6 = “clamp_to_border” mipmap_input6 = “false” alias6 = “” float_framebuffer6 = “false” srgb_framebuffer6 = “false” shader7 = “…\shaders_cg\Analog Shader Pack\480P\advanced-aa.cg” filter_linear7 = “false” wrap_mode7 = “clamp_to_border” mipmap_input7 = “false” alias7 = “” float_framebuffer7 = “false” srgb_framebuffer7 = “false” shader8 = “…\shaders_cg\Analog Shader Pack\480P\crt-easymode.cg” filter_linear8 = “false” wrap_mode8 = “clamp_to_border” mipmap_input8 = “false” alias8 = “” float_framebuffer8 = “false” srgb_framebuffer8 = “false” shader9 = “…\shaders_cg\Analog Shader Pack\480P\image-adjustment.cg” filter_linear9 = “true” wrap_mode9 = “clamp_to_border” mipmap_input9 = “false” alias9 = “” float_framebuffer9 = “false” srgb_framebuffer9 = “false” scale_type_x9 = “source” scale_x9 = “1.000000” scale_type_y9 = “source” scale_y9 = “1.000000” shader10 = “…\shaders_cg\Analog Shader Pack\480P\stock.cg” filter_linear10 = “false” wrap_mode10 = “clamp_to_border” mipmap_input10 = “false” alias10 = “” float_framebuffer10 = “false” srgb_framebuffer10 = “false” shader11 = “…\shaders_cg\Analog Shader Pack\480P\flicker.cg” wrap_mode11 = “clamp_to_border” mipmap_input11 = “false” alias11 = “” float_framebuffer11 = “false” srgb_framebuffer11 = “false” shader12 = “…\shaders_cg\stock.cg” filter_linear12 = “true” wrap_mode12 = “clamp_to_border” mipmap_input12 = “false” alias12 = “” float_framebuffer12 = “false” srgb_framebuffer12 = “false” shader13 = “…\shaders_cg\Analog Shader Pack\COMPONENT\crt-lottes.cg” filter_linear13 = “true” wrap_mode13 = “clamp_to_border” mipmap_input13 = “false” alias13 = “” float_framebuffer13 = “false” srgb_framebuffer13 = “false” shader14 = “…\shaders_cg\Analog Shader Pack\480P\crt-easymode-halation.cg” filter_linear14 = “true” wrap_mode14 = “clamp_to_border” mipmap_input14 = “false” alias14 = “” float_framebuffer14 = “false” srgb_framebuffer14 = “false” scale_type_x14 = “source” scale_x14 = “1.000000” scale_type_y14 = “source” scale_y14 = “1.000000” parameters = “GAMMA_INPUT;GAMMA_OUTPUT;SHARPNESS_H;SHARPNESS_V;MASK_TYPE;MASK_STRENGTH_MIN;MASK_STRENGTH_MAX;MASK_SIZE;SCANLINE_STRENGTH_MIN;SCANLINE_STRENGTH_MAX;SCANLINE_BEAM_MIN;SCANLINE_BEAM_MAX;GEOM_CURVATURE;GEOM_WARP;GEOM_CORNER_SIZE;GEOM_CORNER_SMOOTH;INTERLACING_TOGGLE;HALATION;DIFFUSION;BRIGHTNESS;AA_RESOLUTION_X;AA_RESOLUTION_Y;SHARPNESS_H;SHARPNESS_V;MASK_STRENGTH;MASK_DOT_WIDTH;MASK_DOT_HEIGHT;MASK_STAGGER;MASK_SIZE;SCANLINE_STRENGTH;SCANLINE_BEAM_WIDTH_MIN;SCANLINE_BEAM_WIDTH_MAX;SCANLINE_BRIGHT_MIN;SCANLINE_BRIGHT_MAX;SCANLINE_CUTOFF;GAMMA_INPUT;GAMMA_OUTPUT;BRIGHT_BOOST;DILATION;target_gamma;monitor_gamma;overscan_percent_x;overscan_percent_y;saturation;contrast;luminance;bright_boost;R;G;B;ZOOM;XPOS;YPOS;V_OSMASK;H_OSMASK;percent;SHARPEN_FACTOR;hardScan;hardPix;warpX;warpY;maskDark;maskLight;scaleInLinearGamma;shadowMask;brightboost” GAMMA_INPUT = “2.730000” GAMMA_OUTPUT = “2.500000” SHARPNESS_H = “0.000000” SHARPNESS_V = “0.000000” MASK_TYPE = “3.000000” MASK_STRENGTH_MIN = “0.000000” MASK_STRENGTH_MAX = “0.000000” MASK_SIZE = “1.000000” SCANLINE_STRENGTH_MIN = “0.000000” SCANLINE_STRENGTH_MAX = “0.000000” SCANLINE_BEAM_MIN = “1.000000” SCANLINE_BEAM_MAX = “1.000000” GEOM_CURVATURE = “0.090000” GEOM_WARP = “0.000000” GEOM_CORNER_SIZE = “0.000000” GEOM_CORNER_SMOOTH = “150.000000” INTERLACING_TOGGLE = “0.000000” HALATION = “0.510000” DIFFUSION = “0.350000” BRIGHTNESS = “1.200000” AA_RESOLUTION_X = “0.000000” AA_RESOLUTION_Y = “0.000000” SHARPNESS_H = “0.500000” SHARPNESS_V = “1.000000” MASK_STRENGTH = “0.100000” MASK_DOT_WIDTH = “1.000000” MASK_DOT_HEIGHT = “1.000000” MASK_STAGGER = “1.000000” MASK_SIZE = “1.000000” SCANLINE_STRENGTH = “1.000000” SCANLINE_BEAM_WIDTH_MIN = “1.500000” SCANLINE_BEAM_WIDTH_MAX = “1.500000” SCANLINE_BRIGHT_MIN = “0.350000” SCANLINE_BRIGHT_MAX = “0.650000” SCANLINE_CUTOFF = “400.000000” GAMMA_INPUT = “2.000000” GAMMA_OUTPUT = “1.800000” BRIGHT_BOOST = “1.050000” DILATION = “1.000000” target_gamma = “2.500000” monitor_gamma = “2.000000” overscan_percent_x = “0.000000” overscan_percent_y = “0.000000” saturation = “1.000000” contrast = “1.250000” luminance = “0.900000” bright_boost = “0.000000” R = “0.900000” G = “0.850000” B = “1.200000” ZOOM = “1.000000” XPOS = “0.000000” YPOS = “0.000000” V_OSMASK = “0.000000” H_OSMASK = “0.002000” percent = “0.9300000” SHARPEN_FACTOR = “3.000000” hardScan = “-12.000000” hardPix = “-12.000000” warpX = “0.020000” warpY = “0.041000” maskDark = “0.800000” maskLight = “2.000000” scaleInLinearGamma = “1.000000” shadowMask = “1.000000” brightboost = “1.000000”

Anyone have any ideas?

The shader pack is called “Analog Shader Pack 3.”

I guess to further elaborate my point, I’ve learned through messing with shader chains in Reshade, using ported Retroarch shaders, that depending on the spot in the multipass chain will determine if subsequent effects are applied or not.

So, if you place an effect after another, the previous effect and all others before it won’t apply to the future one.

So my reasoning is, if crt-easymode-halation.cg is placed after crt-lottes.cg, then lottes shouldn’t pixellize easymode-halation.

In theory.

In practice, this doesn’t work and produces the bizzare madness of negative color, etc.

What do I mean by organic glow? I mean natural glow, such as in this picture:

Notice how it looks “real” rather than one color gradation difference from the neighboring 320x200 pixel chain.

This is what I’m trying to accomplish by re-ordering the shaders.

Any individual shader in RetroArch can refer back to any previous pass, so it’s probably a matter of moving the shader where you want to move it and then changing the pass reference in the other shader(s) to point to the right place in the chain.

While the analog shader pack looks nice–and I don’t say this to disparage the many hours of work solid12345 put into it–I can’t personally support it as-is because it is so labyrinthine, with no real indication as to what shaders have been modified and where/how. I believe he has been working on a new version using slang shaders that will be entirely preset-based, which should make the whole thing able to be included in the shader repo and should be much easier for me/us to support.