That should not possibly happen. Your crtglow_gauss.cgp is likely just broken.
Lol I get it. That’s because I had downloaded all the shader files one by one, by right clicking ‘Save As…’ It adds uneeded html markup to the .cgp file
Omg I love how it looks ! Probably a bit too glowy/blurry though, but I lçvoe it
Comparison between crt-cgwg and crtglow_gauss :
SM http://screenshotcomparison.com/comparison/77121
Zelda http://screenshotcomparison.com/comparison/77131
For reference : crt-cgwg crtglow_gauss crt-hyllian
I still like cgwg scanlines a bit more because the scanlines are not only horizontal but vertical. They seem a little bit more accurate to me, I don’t know why, thats subjective off course
EDIT : yea, crt-cgwg is still king imo. Why not add glow/bloom to crt-cgwg and be done with it
The vertical lines are just a faux dotmask. You can added it any shader with just a couple of lines copied from cgwg’s CRT shader. Here’s a separate shader pass that will do it (also just added it to the common-shaders repo):
/* COMPATIBILITY
- HLSL compilers
- Cg compilers
*/
/*
Dot Mask
Author: cgwg
License: GPL
Note: This shader is just the dotmask code from cgwg's CRT shader.
*/
struct input
{
float2 video_size;
float2 texture_size;
float2 output_size;
float frame_count;
float frame_direction;
float frame_rotation;
sampler2D texture : TEXUNIT0;
};
void main_vertex
(
float4 position : POSITION,
out float4 oPosition : POSITION,
uniform float4x4 modelViewProj,
float4 color : COLOR,
out float4 oColor : COLOR,
float2 texCoord : TEXCOORD,
out float2 oTexCoord : TEXCOORD,
uniform input IN
)
{
oPosition = mul(modelViewProj, position);
oColor = color;
oTexCoord = texCoord;
}
#define mod_factor texCoord.x * IN.texture_size.x * IN.output_size.x / IN.video_size.x
float4 main_fragment (in float2 texCoord : TEXCOORD, uniform input IN) : COLOR
{
float3 res = tex2D(IN.texture, texCoord);
// dot-mask emulation:
// Output pixels are alternately tinted green and magenta.
float3 dotMaskWeights = lerp(
float3(1.0, 0.7, 1.0),
float3(0.7, 1.0, 0.7),
floor(fmod(mod_factor, 2.0))
);
res *= dotMaskWeights;
return float4(res, 1.0);
}
And in crt-hyllian you can enable it by uncommenting the PHOSPHOR option inside the shader.
I disabled it in the glow version because I though a clean image would be better. But, it’s there to your taste.
Added an NTSC + crt-glow preset (8 shader passes :V). Surprisingly enough runs fullspeed on my puny HD3000 at reduced resolutions.
Thanks for your replies guys
I’d love to try the ntsc preset Maister but I’m getting a blank screen with scanlines when loading it. So I tried to load again the ‘crtglow_gauss.cgp’ preset and now I’m getting this :
I tried to redownload the entire shaders repository and make sure everything was configured properly but it’s just the same
EDIT : yup ok, something is wrong in the new ‘resolve.cg’. Reverting it back to the previous version solved the above weird colour issue for me EDIT : … but I still get a blank screen with the new ntsc preset
Maister, I have an idea for the threshold part of the glowing algorithm. Instead a hard decision on which parts will glow or not, why not glow everything but with different weights depending on intensity? I made this in threshold.cg:
#define BLOOM_STRENGTH 0.5
float4 main_fragment(float2 tex : TEXCOORD0, uniform sampler2D s0 : TEXUNIT0, uniform input IN) : COLOR
{
float3 color = 1.0 * tex2D(s0, tex).rgb;
// return float4(saturate(OVERDRIVE * (color - THRESHOLD)), 1.0);
return float4(color * color * BLOOM_STRENGTH, 1.0);
}
The glow decay with the square of the color intensity. Some games have some animations where the intensity varies in time (see Super Nova logo screen, for example). In these games, hard decision makes the glowing disappear instantly. With a varying glow, it vanishes smoothly.
Or even use the cube to decay faster, but not instantly: color * color * color.
Are you using intel video? maybe clarkdale? I have a similar issue
I changed to PASSPREV to work with NTSC shader as well (shader pass alias support is even more recent :p). You need an updated build to be able to use it since I recently fixed a critical bug with PASSPREV shader support.
EDIT: Looking at that image, it’s definitely the PASSPREV bug I had when developing crt-glow. Get an updated build and it should work just fine.
Hyllian: Yes, I’ve tried doing something like that before but it didn’t always turn out great. Maybe I can add back the pow() based approach now, since there have been lots of changes since then. And we have shader parameters to fine-tweak.
Yup I downloaded a very recent RetroArch build (maybe you should sticky this in the OP) and now it works fine
This shader was very dark to begin with, I tweaked it a bit and got the next, I share the files with my settings.
-Dilation was set to 0.0, by some reason the pixels are already too fat. -Sharpness was deleted. -Output gamma set to 3.0 (brighter image) -Glow was more subtle and spread. -Blue tint was adjusted. -Among other things that I had already don on crt-hyllian.
enjoy!
raw…crt-hyllian…crt-hyllilan+bloom (hunterk’s).crt-glow (default)…crt-glow (tweaked) …………
Here’s the zip with the modifications.
So is there anyway to stop the scanlines almost disappearing on bright back ground, the Konami logo at the start of games is a good example of how the scanlines are barely visible!..
Is there a way to put snes-hires shader into play with this shader? I want to use it with the sega genesis, which is known for using these kind of hacks severely.
The next didn’t work for me. It seems to break when enabling the resolve shader.
I also want to try the motion-blur shader, what should I use, motionblur-blue.cg?
shaders = 7
shader0 = ".\cg\snes-hires-blend.cg"
filter_linear0 = false
scale_type0 = source
scale0 = 1.0
shader1 = "./crt-hyllian-glow/linearize.cg"
filter_linear1 = false
srgb_framebuffer1 = true
shader2 = "./crt-hyllian-glow/crt-hyllian.cg"
filter_linear2 = false
scale_type2 = viewport
scale2 = 1.0
srgb_framebuffer2 = true
shader3 = "./crt-hyllian-glow/threshold.cg"
filter_linear3 = false
srgb_framebuffer3 = true
shader4 = "./crt-hyllian-glow/blur_horiz.cg"
mipmap_input4 = true
filter_linear4 = true
scale_type4 = source
scale4 = 0.25
srgb_framebuffer4 = true
shader5 = "./crt-hyllian-glow/blur_vert.cg"
filter_linear5 = true
srgb_framebuffer5 = true
shader6 = "./crt-hyllian-glow/resolve2.cg"
filter_linear6 = true
in resolve2.cg, you need to change the CRT-PASS #define from PASS2 to whichever pass. In this case, PASS3. If you add another shader before it, it’ll be PASS4, etc.
Worked great, thank you! but settings didn’t get loaded:
(...)
shader6 = "./crt-hyllian-glow/resolve3.cg"
filter_linear6 = true
parameters = "GAMMA;DILATION_STRENGTH;SHARPNESS;RED_BOOST;GREEN_BOOST;SCANLINES_STRENGTH;BEAM_MIN_WIDTH;BEAM_MAX_WIDTH;COLOR_BOOST;BEAM_WIDTH_SENSITIVITY;CRT_TV_BLUE_TINT;GLOW_WHITEPOINT;GLOW_ROLLOFF;BLOOM_STRENGTH;SOURCE_BOOST"
GAMMA = "2.0000000"
DILATION_STRENGTH = "0.000000"
SHARPNESS = "1.000000"
RED_BOOST = "1.00000"
GREEN_BOOST = "1.100000"
SCANLINES_STRENGTH = "0.800000"
BEAM_MIN_WIDTH = "0.100000"
BEAM_MAX_WIDTH = "0.400000"
COLOR_BOOST = "1.500000"
BEAM_WIDTH_SENSITIVITY = "0.450000"
CRT_TV_BLUE_TINT = "1.30000"
GLOW_WHITEPOINT = "1.000000"
GLOW_ROLLOFF = "5.00000"
BLOOM_STRENGTH = "0.03000"
SOURCE_BOOST = "1.000000"
as for now I made a copy of cg-hyllian.cg with modified settings on it.
BTW, a question (one more, yes I know), snes-hires should go before or after linearize? I put it after and added srgb_framebuffer1 = true, am I doing wrong?