VIDEO - Direct3D patch (Host)

Here you can discuss the development of patches.

Re: Direct3D patch (Host)

Postby VileRancour » 2013-1-24 @ 04:09

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.
User avatar
VileRancour
Oldbie
 
Posts: 1554
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: Direct3D patch (Host)

Postby Laukku » 2013-1-24 @ 09:57

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
User avatar
Laukku
Newbie
 
Posts: 48
Joined: 2011-8-31 @ 06:27

Re: Direct3D patch (Host)

Postby kolano » 2013-1-24 @ 18:04

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.
User avatar
kolano
Oldbie
 
Posts: 518
Joined: 2010-12-26 @ 21:03

Re: Direct3D patch (Host)

Postby leileilol » 2013-2-21 @ 00:26

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.
User avatar
leileilol
l33t++
 
Posts: 8771
Joined: 2006-12-16 @ 18:03

Re: Direct3D patch (Host)

Postby VileRancour » 2013-5-29 @ 20:38

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.
User avatar
VileRancour
Oldbie
 
Posts: 1554
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: Direct3D patch (Host)

Postby gulikoza » 2013-7-28 @ 07:26

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:

Code: Select all
bool forceupdate : FORCEUPDATE = true;


somewhere at the top of the shader.
User avatar
gulikoza
Oldbie
 
Posts: 1698
Joined: 2004-6-25 @ 14:53

Re: Direct3D patch (Host)

Postby Targaff » 2013-10-30 @ 04:42

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
User avatar
Targaff
Member
 
Posts: 244
Joined: 2002-11-19 @ 17:40

Re: Direct3D patch (Host)

Postby gulikoza » 2013-10-30 @ 04:51

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.
User avatar
gulikoza
Oldbie
 
Posts: 1698
Joined: 2004-6-25 @ 14:53

Re: Direct3D patch (Host)

Postby Targaff » 2013-10-30 @ 05:06

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 - 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
User avatar
Targaff
Member
 
Posts: 244
Joined: 2002-11-19 @ 17:40

Re: Direct3D patch (Host)

Postby Mr_Blastman » 2014-4-18 @ 05:00

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.
User avatar
Mr_Blastman
Newbie
 
Posts: 88
Joined: 2005-7-26 @ 02:53

Re: Direct3D patch (Host)

Postby Mr_Blastman » 2014-5-04 @ 01:20

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!!!!!!!

Image

and

Image

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.p ... 366.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!
User avatar
Mr_Blastman
Newbie
 
Posts: 88
Joined: 2005-7-26 @ 02:53

Re: Direct3D patch (Host)

Postby leileilol » 2014-5-06 @ 01:39

.........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?
User avatar
leileilol
l33t++
 
Posts: 8771
Joined: 2006-12-16 @ 18:03

Re: Direct3D patch (Host)

Postby Mr_Blastman » 2014-5-07 @ 01:28

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?
User avatar
Mr_Blastman
Newbie
 
Posts: 88
Joined: 2005-7-26 @ 02:53

Re: Direct3D patch (Host)

Postby kolano » 2014-5-07 @ 07:03

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.
User avatar
kolano
Oldbie
 
Posts: 518
Joined: 2010-12-26 @ 21:03

Previous

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests