VOGONS

Common searches


VIDEO - Direct3D patch (Host)

Topic actions

Reply 160 of 173, by VileR

User metadata
Rank l33t
Rank
l33t
gulikoza wrote:

the next version of the patch will also support forcing full updates from the shader, so the alpha-feedback shaders (as posted by leileilol above) will work correctly.

Nice... anyone have the exact curve for phosphor persistence/decay on an old IBM 5151 monitor? 😀

Your screenshot reminds me: if input dimensions will now be passed to the shaders, I wonder if there's an easy way to mimic real VGA behavior, and decide whether or not to doublescan based on the resolution (so 320x200, etc. will be scaled 2x before going through the shader, but 640x480 or text modes won't). Could be nice to let the shader do it automagically.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 161 of 173, by Laukku

User metadata
Rank Newbie
Rank
Newbie
VileRancour wrote:

Your screenshot reminds me: if input dimensions will now be passed to the shaders, I wonder if there's an easy way to mimic real VGA behavior, and decide whether or not to doublescan based on the resolution (so 320x200, etc. will be scaled 2x before going through the shader, but 640x480 or text modes won't). Could be nice to let the shader do it automagically.

Well, scaler=normal2x works reasonably well. Without "forced", DOSBox only uses scaling for low resolutions like 320x200.

My YouTube account, with miscellanous DOS game stuff: http://www.youtube.com/user/LaukkuTheGreit

Reply 162 of 173, by kolano

User metadata
Rank Oldbie
Rank
Oldbie

Yes, I was noticing the other day that some scalers seem to not run if fed in large enough input. The output of a 640x400+ image through a forced scaler (i.e. 1280x800+) seemed to be big enough that shaders weren't working for me, at least in Ykhwong's build.

Eyecandy: Turn your computer into an expensive lava lamp.

Reply 163 of 173, by leileilol

User metadata
Rank l33t++
Rank
l33t++
VileRancour wrote:

Nice... anyone have the exact curve for phosphor persistence/decay on an old IBM 5151 monitor? 😀

I wish I knew. For my shader hack, I was going by memory of a CRT of a old portable computer.

apsosig.png
long live PCem

Reply 164 of 173, by VileR

User metadata
Rank l33t
Rank
l33t

Does DirectX 10/11 majorly boost performance for shaders? I have a Geforce GT-240, nothing fancy, and under XP the CRT shader got choppy on full frame updates. Just installed Win7-x64 on exactly the same hardware, and now it's *a lot* better (aside from some minor tearing)... nice surprise I guess.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 165 of 173, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

The updated D3D patch has been picked up by ykhwong. In this version, a shader can force full 60/70Hz updates from Dosbox: only the shader runs on every retrace, not the scalers and internal rendering so the speed hit shouldn't be too bad. Updates can be forced from any shader by including:

bool forceupdate : FORCEUPDATE = true;

somewhere at the top of the shader.

http://www.si-gamer.net/gulikoza

Reply 166 of 173, by Targaff

User metadata
Rank Member
Rank
Member

gulikoza: I note from the changelog in the last ykhwong version that there's an option "support dynamically changing pixelshader= option from cli", which I assume means the CLI from within Dosbox. Correct me if I'm wrong on this assumption, of course, but if not, what command would I use to do this? It may be I'm missing something completely obvious, I just couldn't find anything specific about it.

Intel CC820 | PIII 667 | 2x128MB SDRAM | 3Dfx Voodoo 5 5500 @ Dell P790 | Creative SB PCI128 | Fujitsu MPC3064AT 6GB + QUANTUM FIREBALLlct10 10 GB | SAMSUNG DVD-ROM SD-608 | IOMEGA ZIP 100 | Realtek RTL8139C | Agere Win Modem

Reply 167 of 173, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

It's the same as any other config change from command line, like core=normal. So you type pixelshader=xxxx.
This has actually worked before, but the pixelshader was only changed at the next video mode switch, but now it will switch immediately.

http://www.si-gamer.net/gulikoza

Reply 168 of 173, by Targaff

User metadata
Rank Member
Rank
Member

Oh okay, got it. I was overcomplicating things - trying to find an equivalent to a SET command. Thanks!

Edit: I made a batch file because I'm crap at remembering filenames. It needs Horst's INPUT tool, though, since I couldn't get CHOICE to do what I wanted.

@echo off if [%1]==[] goto menu set psopt=%1 goto command :menu cls ECHO. ECHO 1 - CRT.D3D.Bright ECHO 2 - Dot'n'Bloom ECHO 3 - […]
Show full quote

@echo off
if [%1]==[] goto menu
set psopt=%1
goto command
:menu
cls
ECHO.
ECHO 1 - CRT.D3D.Bright
ECHO 2 - Dot'n'Bloom
ECHO 3 - SuperEagle
ECHO 4 - TV
ECHO 5 - None
ECHO 6 - Other
ECHO.
INPUT "Select a shader, then press ENTER: " psopt /L1 /C /N
:command
if %psopt%==1 pixelshader=CRT.D3D.Bright.fx
if %psopt%==2 pixelshader=DotnBloom.D3D.fx
if %psopt%==3 pixelshader=SuperEagle.fx
if %psopt%==4 pixelshader=TV.fx
if %psopt%==5 pixelshader=
if %psopt%==6 goto custom
if [%psopt%]==[] goto menu
goto end
:custom
ECHO.
INPUT "Type shader name (with .fx), then press ENTER: " psopt /C
pixelshader=%psopt%
:end
ECHO.
set psopt=

Intel CC820 | PIII 667 | 2x128MB SDRAM | 3Dfx Voodoo 5 5500 @ Dell P790 | Creative SB PCI128 | Fujitsu MPC3064AT 6GB + QUANTUM FIREBALLlct10 10 GB | SAMSUNG DVD-ROM SD-608 | IOMEGA ZIP 100 | Realtek RTL8139C | Agere Win Modem

Reply 169 of 173, by Mr_Blastman

User metadata
Rank Member
Rank
Member

I'm curious... does anyone know how I'd go about adding curvature to the DotnBloom.D3D.fx shader?

And likewise... Adding bloom to the CRT.D3D.fx shader?

I have an old Tandy with a CM-5 monitor and frankly, no matter the shader I use, bloom is needed to accurately simulate the phosphor glow. I just can't find any shader that combines bloom with curvature/scanlines etc.

Thanks.

Reply 170 of 173, by Mr_Blastman

User metadata
Rank Member
Rank
Member

So I have tried a few things and have found success! Though it is still a work in progress, I am getting closer. Behold, Halation in Dosbox!!!!!!!

dosboxexe_DX9_20140504_010309_zps191bc8a6.png

and

dosboxexe_DX9_20140504_010325_zpsefa5a676.png

It is by no means perfect. Especially in Tandy mode. I'm still trying to figure out a way to add more "blue" to the image to closer match how a CM-5 color monitor displays.

How did I do this?

I used a couple of things as Dosbox alone is incapable of it. First, you have to use DOSBox Daum.

Why?

Direct 3D support!

http://ykhwong.x-y.net/

The pixelshader I am using it in is the CRT.D3D.br.fx

This is largely irrelevant, actually--as it is up to your own preference how bad or good you want the simulated "monitor" to look, but the .br variant brightens it up a little bit which to me is nice. It also tightens the scanlines which is essential. It isn't perfect, but it is nice.

The next part of the puzzle is... Sweet FX . Yeah, I went there. I threw Sweet FX into Dosbox. But not just ANY Sweet FX. No, there is a special one. One made by a guy named Boulotaur.

http://forums.guru3d.com/showpost.php?p=4581604

His version is older @ 1.4 but it has some additional features with another one (sadly) taken out called explosion. I wish it was in there but whatever. I think with explosion I could get even closer with RGB emulation in Dosbox.

Anyways, the special technique in question is called Gaussian Blur. Enable it by setting USE_GAUSSIAN to 1.

Then go down below and tweak, tweak tweak! I also have enabled HDR and Bloom. The end result I'm looking for is something of a late 1980's era VGA monitor from a budget brand (Anyone remember Compudyne?) and a Tandy CM-5 RGB monitor. I have one of those monitors and a Tandy 1000 RL to make comparisons with so that helps. Still, getting the color just right will take some more time.

I kept hitting dead ends thinking it wasn't possible. But for someone as old as I am, I distinctly remember that ghostly glow on CRT monitors and you just can't game properly without it.

More info here:
http://forum.arcadecontrols.com/index.php/top … c,132366.0.html

I hope this is helpful to a few of you out there looking for classic gaming nirvana like I have been. Thanks to everyone who made all these tools!

Reply 171 of 173, by leileilol

User metadata
Rank l33t++
Rank
l33t++

.........or you could have just wrote another halation pass on the CRT shader instead of adding an unneccessary D3D9 shader passthrough chain. By the way have you noticed the additional input latency?

apsosig.png
long live PCem

Reply 172 of 173, by Mr_Blastman

User metadata
Rank Member
Rank
Member
leileilol wrote:

.........or you could have just wrote another halation pass on the CRT shader instead of adding an unneccessary D3D9 shader passthrough chain. By the way have you noticed the additional input latency?

I haven't noticed any additional input latency at all. I do run into issues if I run dosbox fullscreen with games like System Shock. In a window--it runs flawless. If I run in fullscreen I start getting slowdown.

It isn't my computer--I have an I7 3770K so I have plenty of horsepower.

I don't understand shaders at all. Otherwise I'd of tried to put in a halation pass. I don't know where to start. It is greek to me. I thought I read somewhere that Dosbox doesn't support multipass shader rendering?

Reply 173 of 173, by kolano

User metadata
Rank Oldbie
Rank
Oldbie

I believe multiple passes can be programmed into a single shader, but DOSBox doesn't support multipass shaders like other emulators that do which allow multiple shader files to be combined add-hoc.

Eyecandy: Turn your computer into an expensive lava lamp.