Use these settings with mask 10
shadowMask = "10.000000"
slotmask = "1.000000"
slotmask1 = "1.000000"
slotwidth = "4.000000"
double_slot = "2.000000"
Use these settings with mask 10
shadowMask = "10.000000"
slotmask = "1.000000"
slotmask1 = "1.000000"
slotwidth = "4.000000"
double_slot = "2.000000"
Lottes mask 1 is a TV style shadow mask, mask 2 is an aperture grille which you can turn to slot mask like guest’s Trinitron masks. Ideally mask 3 would be an arcade monitor (which I’m trying to achieve, not TV) but…I don’t like it.
mask 3 doesn’t really resemble any CRT mask but it kinda works at a distance.
I think mask 10 needs HDR to look bright enough, or a ridiculous amount of bloom. Not surprising, it results in a full 75% reduction in the active subpixels (only 1/4th are on at any given time) when it’s at 100% strength.
Yeah I use 0.60 bloom and 1.10 bright boost because my monitor has a luminance of 300 cd/m2, at least the double would be needed to have an optimal image. I’m quite happy, still.
Hey @guest.r
First of all, thanks for your excellent WinUAE CRT shaders you posted to the English Amiga Board forums a while ago. I’ve been using CRT-A2080-HiRes-SmartRes with great satisfaction (with increasing the sharpness settings a bit), I just love it!
I’ve stumbled upon this thread by sheer luck when looking for some good (S)VGA shaders for DOSBox, and since you only seem to be active here these days, I thought I’d take the opportunity to contact you through this forum.
First of all, while CRT-A2080-HiRes-SmartRes is awesome, it doesn’t handle interlaced modes quite correctly when movement is involved (e.g. smooth scrolling credit screens in 640x512 keep jumping around a bit; still images are fine though). Your other shader CRT-Guest-SM-Hires-SmartRes-Interlace handles these situations perfectly well, so I was wondering if it would be possible to add the same good interlace support to CRT-A2080, as I really prefer the look of that shader personally? While this is not super important, it makes a difference in some demos and game intros that use hi-res interlaced. (As a stretch goal, it would be also nice to have an option for interlace flicker for that extra retro feeling, but that’s really really down on my wishlist )
Have you considered porting your new work back to WinUAE or DOSBox Staging? Especially in DOSBox land, we’re in dire need of some good subtle VGA and SVGA shaders.
I understand if you don’t want to touch those old shaders and don’t care about DirectX & HLSL anymore, but I thought there’s no harm in asking! In any case, you’ve done more than enough already with those stellar WinUAE shaders of yours, so thanks again! Cheers!
Hey there!
NP to contact me here, i check this thread quite often. I’m also glad you like the shader. It’s not as sophisticated as the newer Retroarch ‘GDV’, but i also use it with WinUAE.
You can check my github page, as i added the ‘interlace’ version. ‘Flickering’ interlacing can’t be done with WinUAE atm., since it lacks a frame counting uniform variable. Toni has mentioned that a new shader implementation is on the (distant) TODO list though, but i understand i could be a real pita to implement since it would definitely break existing configs or be at least a separate addon. But maybe there is a way…I might continue to develop nicer shaders with WinUAE if this happens.
DOSBox is definitely easier to run as a standalone emulator, although afaik the main fork doesn’t support shaders, not sure about frontends. I think cool shader support comes with this version:
dunno if there is anything newer.
The problem, as always, is that the shader support is rudimentary and doesn’t involve easier tweaking of variables, or preset support. In general i didn’t intend to develop more dosbox shaders, although some can be found in the fs-uae thread for the discontinued ykhwong fork. I guess i might also do some more stuff if there is a new fork with cool shader handling (at least similat to bsnes or mame).
I did a lot of crt shader development recently with ‘gdv’ progression, took most of my developing ‘resources’. Developing a complex shader for a simple environment is sometimes quite hard though as it can get quite slow and hard to tweak, some things are impossible to implement etc. I might find some motivation if a shader environment is advanced, although for now it’s a nice niche option to run DOSBox for example with Retroarch for the enhancing effects.
Anyway, i’m glad for the fedback and last but not least, the WinUAE github page:
Best wishes,
guest.r
While having the shader support built-in is obviously preferred, you can run many RetroArch shaders (including guest.r’s excellent work) on top of other programs via shaderglass and I know some of libretro’s shaders have been ported to Reshade, as well.
Thanks for that, it’s working great! In the meantime I realised that tweaking the sharpness of your A2080 shader was a mistake; when using your defaults (and if the image is properly antialiased) all sharp edges just melt away, as if by magic, just like on my 14" Philips monitor back in the day! I remember I was quite disappointed when I got my first PC with a much higher quality monitor, everything looked so blocky suddenly and I couldn’t understand why…
Here’s a few pics of your shader in action together with the mask+glow ReShade effects; as far as I’m concerned, I don’t think I need anything better, I’m in emulated Amiga heaven now! I only dialed back the brightboost a bit because there was too much highlight-crushing going on (e.g. most of the detail of the hair highlights on the Einstein portrait was lost) and just compensated it by increasing my monitor contrast. Now we’re cooking on gas!
Hmm, I was convinced I saw interlace-flicker in some demos in WinUAE, but I must be confusing it with VICE, as that definitely can do it. Funny how back in the 80s/90s everyone wanted to get rid of the flicker, but now it’s a highly prized emulator feature for nostalgic reasons!
Yeah that’s true, I’m using DOSBox Staging which is kind of a soft-fork of mainline DOSBox SVN that has rudimentary shader support (single-pass GLSL only, no oversampling, and no presets, like you said). Some nice bloke ported a bunch of single-pass shaders over, but it’s a pain to adjust the parameters…
Man, GDV looks so cool! Although I’m more after the slighly defocused slot-mask Amiga monitor look, this is the best shader I’ve seen in this style! You’ve put so much subtle detail in it, it’s awesome.
I’ve perused the RetroArch shader architecture docs the other day and seems like they’ve given it a lot of thought, indeed. Don’t expect anything like that to come to DOSBox land anytime soon… But I’ve also realised that trying to emulate VGA/SVGA on 1080p is a fool’s errand; DOSBox Staging’s default “sharp bilinear” scaling filter is all you need for 320x200, then 2x integer scale for 640x480 and that’s it! Anything else I’ve looked at just makes the picture quality a lot worse (at least on 1080p), and to be honest, there is no “magic” in emulating double-scanned VGA…
For EGA games, I spent whole yesterday tweaking crt-hyllian-updated in conjunction with your ReShade glow+mask filter, and I managed to come up with something that I like. It’s remarkable how it’s quite hard to push the Hyllian shader into aliasing/moire territory even with non-integer ratios – just look at the checkerboard-pattern and the subtle 640x350 scanlines on white background on the Spellcasting screenshot, it’s flawless.
Anyway, probably enough of me derailing the thread already. Nice chat & keep up the good work! Cheers!
Not really sure what’s causing the black crush here? Didn’t seem to be an issue with previous versions?
shaders = "12"
shader0 = "shaders_slang/misc/grade.slang"
filter_linear0 = "false"
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/stock.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "StockPass"
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/guest/advanced/afterglow0.slang"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "AfterglowPass"
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/crt/shaders/guest/advanced/pre-shaders-afterglow.slang"
filter_linear3 = "false"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "true"
alias3 = "PrePass"
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/crt/shaders/guest/advanced/avg-lum.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "true"
alias4 = "AvgLumPass"
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/guest/advanced/linearize.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "LinearizePass"
float_framebuffer5 = "true"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/guest/advanced/gaussian_horizontal.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = ""
float_framebuffer6 = "true"
srgb_framebuffer6 = "false"
scale_type_x6 = "absolute"
scale_x6 = "800"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/guest/advanced/gaussian_vertical.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "GlowPass"
float_framebuffer7 = "true"
srgb_framebuffer7 = "false"
scale_type_x7 = "absolute"
scale_x7 = "800"
scale_type_y7 = "absolute"
scale_y7 = "600"
shader8 = "shaders_slang/crt/shaders/guest/advanced/bloom_horizontal.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = ""
float_framebuffer8 = "true"
srgb_framebuffer8 = "false"
scale_type_x8 = "absolute"
scale_x8 = "800"
scale_type_y8 = "absolute"
scale_y8 = "600"
shader9 = "shaders_slang/crt/shaders/guest/advanced/bloom_vertical.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = "BloomPass"
float_framebuffer9 = "true"
srgb_framebuffer9 = "false"
scale_type_x9 = "source"
scale_x9 = "1.000000"
scale_type_y9 = "source"
scale_y9 = "1.000000"
shader10 = "shaders_slang/crt/shaders/guest/advanced/crt-guest-advanced.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = ""
float_framebuffer10 = "false"
srgb_framebuffer10 = "false"
scale_type_x10 = "viewport"
scale_x10 = "1.000000"
scale_type_y10 = "viewport"
scale_y10 = "1.000000"
shader11 = "shaders_slang/crt/shaders/guest/advanced/deconvergence.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = ""
float_framebuffer11 = "false"
srgb_framebuffer11 = "false"
scale_type_x11 = "viewport"
scale_x11 = "1.000000"
scale_type_y11 = "viewport"
scale_y11 = "1.000000"
g_crtgamut = "0.000000"
g_vignette = "0.000000"
glow = "0.000000"
brightboost = "0.500000"
brightboost1 = "0.500000"
beam_min = "1.600000"
beam_max = "1.500000"
shadowMask = "2.000000"
maskDark = "0.000000"
maskLight = "1.000000"
mask_layout = "1.000000"
mclip = "0.000000"
gamma_out = "2.000001"
post_br = "1.999999"
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
SamplerLUT1 = "shaders_slang/crt/shaders/guest/advanced/lut/trinitron-lut.png"
SamplerLUT1_linear = "true"
SamplerLUT1_wrap_mode = "clamp_to_border"
SamplerLUT1_mipmap = "false"
SamplerLUT2 = "shaders_slang/crt/shaders/guest/advanced/lut/inv-trinitron-lut.png"
SamplerLUT2_linear = "true"
SamplerLUT2_wrap_mode = "clamp_to_border"
SamplerLUT2_mipmap = "false"
SamplerLUT3 = "shaders_slang/crt/shaders/guest/advanced/lut/nec-lut.png"
SamplerLUT3_linear = "true"
SamplerLUT3_wrap_mode = "clamp_to_border"
SamplerLUT3_mipmap = "false"
SamplerLUT4 = "shaders_slang/crt/shaders/guest/advanced/lut/ntsc-lut.png"
SamplerLUT4_linear = "true"
SamplerLUT4_wrap_mode = "clamp_to_border"
SamplerLUT4_mipmap = "false"
You need to set the 10th pass float framebuffer to “true”. It’s an issue with older presets and new shader files.
What’s wrong with https://github.com/realnc/dosbox-core You can use the guest advanced HD shader with that:
Thanks for the tip. Well, I don’t think anything is wrong with it if it suits your needs I personally strongly prefer regular standalone emulators for a variety of reasons (much easier to tweak things by writing configs, for a start), and I only use them sitting in front of my PC monitor, so I wouldn’t benefit much from RetroArch anyway (except for the advanced shader support, yes, that’s the only thing, everything else about it is however a drawback to me). DOSBox Staging has a number of improvements over DOSBox SVN – for example the patch I contributed to it that restricts the output in fullscreen to a smaller area (I prefer to have the physical dimensions of the image match that of a 14/15" CRT). There’s lots of little things like that, but I get it, not everybody likes to tweak things to the last minute detail.
Having said that, that VGA preset of yours looks quite nice, indeed! Although when I scale it down to 1120x840 or 1024x768 (this is how I play VGA games), most of the effect is lost. I’d also dial the bloom back quite a bit, I don’t think VGA monitors from the early/mid-90s had this much bloom.
CRT shaders benefit from more pixels. Especially when you’re trying to emulate VGA resolutions. I would say it’s pretty much impossible to get any sort of convincing CRT effect with 840 lines. Even 1080p has issues. 3 LCD lines per 1 CRT line is about the minimum you can get away with. So for 640x400 VGA, that means 1200p, and for 640x480 it’s 1440p.
As a side note, dosbox-core supports conf files now and it syncs them with the core options You create a .conf
file for your game, and then simply add that conf file to your retroarch DOS playlist. For example, here is Ultima VII.conf
:
[dos]
xms = true
ems = false
umb = false
[cpu]
cycles = fixed 15000
[autoexec]
@echo off
mount c drive_c
mixer sb 50:50 /noshow
c:
cd ultima71
ultima7.com
exit
You can then add that file to your playlist and also download some thumbnails for it:
Any conf options you specify will then be respected by the core options UI and appear “[Locked]”:
If you really can’t live without making the screen smaller, you can then reduce the image size in the shader. guest-advanced-hd has overscan settings. You can reduce X and Y overscan to negative values, which will shrink the image. Or you can do that through retroarch itself (Settings->Video->Scaling.)
Btw, I’m not saying that this is better than using a stand-alone dosbox. Just saying that you can do things you may not have been aware of
Well, my experience says it’s very much possible Check my screenshots a few posts above; the EGA shots are 1024x768 (x3.2, aspect-ratio corrected) and the Amiga ones 1120*896 (x3.5). I really like those results. Admittedly, I’m not fan of very strong scanlines (neither my Amiga nor VGA monitor had them). Even the high-res 640x350 EGA examples are quite nice in my opinion; all I need is a subtle hint of scanlines, and my eyesight won’t get any better after 40, so…
Btw, I really liked your VGA/SVGA results in this other thread. But when I resized them to my “preferred resolutions”, only a slight glow fx and some blurred pixel grid overlay remained. So I tried to recreate that subtle effect with crt-easymode today, and it’s not half bad. Just to give the large solidly filled areas a little bit of texture. Some examples at 960x720 and 1120x840, respectively. (I use 960x720 quite often with oldschool RPGs because then I have my game window at the left half of the screen, and the other half is occupied by my mapping tool.)
Good to know, and I appreciate the heads up! It’s great to have so many options these days, so everybody can find something that suits their needs and quirky personalities (in my case, haha). Have a good one!
EDIT: Actually, I’ve changed my mind and I now don’t like my VGA attempt, after all… You just can’t simulate a VGA CRT at this resolution, best to stick to raw pixels. Well, that went quickly!
Not that this maybe your thing but I really like just plain ‘integer scaled’ scanlines at low resolutions. This I seem to remember is what Snes9X on Windows had back in the late 90’s. You might try scanlines\integer-scaling-scanlines.slangp it’s a super simple shader and you’ll need integer scaling on in Settings->Video->Scaling. I know you don’t want to use RA but this shader is so simple you can very easily port it even into CPU code for a particular emulator as snes9X had. As I say it may not be your thing though.
@Rincewind that’s a few nice looking screenshots with the subtle scanlines, well done.
Many of the retroarch cores have really come up to par with the standalone emulators in the past few years.
Did you try the P-UAE libretro core for Amiga? It’s quite neat if you get to grips with the many options this core provides in its options menu and sonninos has really been making this a worthy contender.
Also with regards to DOSBOX, I would really suggest you try the DOSBOX-Pure libretro core. It’s maintained by someone who really knows what he’s doing and has many features that go way ahead of the standalone version (think proper v-sync support!)
For these cores you could simply apply the things RealNC already mentioned, e.g. set scaling to 3.5 times in RA video options and, last but not least, apply guest.r latest shader on it.
I see where you’re coming from with the subtle scanlines approach, maybe it’s a thing that has to do with the difference between PAL and NTSC mode on monitors, the scanlines used to be much more subtle for PAL. I’m sure these could be replicated in RA and maybe a bit more. And as you noticed guest.r is quite frequently here and always willing to listen and improve things.
I think the scanline thing has more to do with Consumer set vs computer monitor than NTSC vs PAL. ( I do agree that NTSC vs PAL scanlines are probably different)
As usually I can notice scanlines on most consumer sets, but it’s nigh impossible to see my scanlines on my actual CRT monitors.
Amiga monitors are different. They support 15khz input, where progressive scan leaves every other scanline empty. VGA monitors only support 31khz input or higher. Low resolutions are line-doubled, and thus all scanlines appear filled.
This is a CRT monitor without line-doubling (the 31khz requirement is reached though horizontal res increase):
This is basically how an Amiga monitor works with low-res content.
This is the same monitor but with line-doubling, which is how VGA monitors are driven:
So as you can see, there can’t ever be black scanlines in 320x200 or 320x240 DOS games on a CRT monitor. But there will be with Amiga games on a 15khz monitor.