VOGONS


First post, by konrad

User metadata
Rank Newbie
Rank
Newbie

hi people,

i've been using gulikoza's hlsl port of cgwg's glsl crt shader on dosbox for some time and i'm really loving it (http://www.si-gamer.net/gulikoza/).
however the shader's taken quite a few steps forward since gulikoza first ported it and since my knowledge on shader language is absolutely zero
i was hoping that someone with the skills and motivation would be willing to port the latest version over to dosbox (hlsl) 😅

actually the latest versions of the shader use multipass for added fx. i have no idea if that would be supported under dosbox as of this moment.

the latest non-multipass version (as far as i know) can be found in this archive: http://www.mediafire.com/?7noofxmsowlzik4

i think this is the latest version of the shader which is multipass: http://www.mediafire.com/?5q5zad1k3w84vaw

all version are here: http://www.mediafire.com/?awpl15dspshis#myfiles

here's hoping this awesome feature will be added to the official dosbox in the near future! (maybe even glsl support to make things easier?:))

cheers

Reply 1 of 18, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

I'll take a look.

The HQx shader is multipass so in theory it is possible, but the code is heavily customized just for it so it's not as easy as dropping it in...

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

Reply 2 of 18, by konrad

User metadata
Rank Newbie
Rank
Newbie

awesome man!

i'll keep my fingers crossed 😀

if porting the multipass version is lots of work though i'm not sure if it's really worth the effort
to be honest. far as i know the only interesting effect for dos games those add would be the
"halation"...kind of a bloom around bright areas (which does look kinda nice)

the "tv blur" effect i believe is snes specific (something to do with hi-res fake transparency?).

so maybe the non-multipass version would be preferable?

halation off:

metroid-no-hal.png

halation on:

metroid-hal.png

Reply 3 of 18, by leileilol

User metadata
Rank l33t++
Rank
l33t++

The halation would simulate a dirty old CRT that needs cleaning 😀

Be interesting to also see this in PCem, pcem has a bunch of dummied out Direct3D output code in it already for starters

apsosig.png
long live PCem

Reply 4 of 18, by Laukku

User metadata
Rank Newbie
Rank
Newbie

The halation is necessary to create the illusion of the eye-piercing glow of CRTs 😜

I'm also a big fan of the CRT shader, porting the updated version would be super cool even if it was the single-pass version.

Anyone seen this, btw? http://www.youtube.com/watch?v=d1qEP2vMe-I

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

Reply 6 of 18, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Unfortunately the new shader cannot be ported to DOSBox. It requires the input image size value in the shader and currently the D3D patch does not provide that. Although it's pretty trivial to add it, it wouldn't work with current dosbox builds and I wonder if it's really worth it (the old one might need it too, but I somehow managed to work around it, although not mathematically entirely correct) . The new shader does not really do things that differently (except for the barrel distortion code) so there would be little improvement.
I'll probably add the required code if I update the D3D patch someday.

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

Reply 7 of 18, by konrad

User metadata
Rank Newbie
Rank
Newbie

that's too bad:(

not sure if i'm imagining things but the new versions crt effect looks a bit more natural to me when i use it with snes9x...but maybe that's because of the input image size issue you mentioned?
and of course the softened edges and rounded corners are a nice touch in combination with barrel distortion. 😉

well hopefully some day then:)

thanks anyway for checking it out!

Reply 8 of 18, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

That code can be pretty much copy/pasted from the new shader. Just replace the scanlineWeights() function and add the stuff between #ifdef OVERSAMPLE. Or I can do this 😀. Basically it would work with the old barrel distortion and no interlace (which was not that common on PC anyway)...

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

Reply 12 of 18, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

The screenshot is still there...
The updated shaders are also done and attached. You need the newer D3D patch, which is at the moment available in the Glide test version. The blend version does a little bit of alpha blending to simulate phosphor decay.

Attachments

  • Filename
    CRT-Geom.zip
    File size
    8.23 KiB
    Downloads
    417 downloads
    File license
    Fair use/fair dealing exception

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

Reply 13 of 18, by konrad

User metadata
Rank Newbie
Rank
Newbie

ah, my bad...i wasn't logged in so i didn't see the attachment:D
cool stuff! looks very nice. maybe the phosphor effect is a tad strong though...?

i guess the new d3d patch still doesn't support multipass/halation, right?

Reply 14 of 18, by konrad

User metadata
Rank Newbie
Rank
Newbie

btw. the effect i get from "CRT-geom-blend.fx" looks a bit different from your screenshot. the edges in your shot are pretty sharp while i get this "merged pixel" effect that seems to round everything out a bit...which i like actually. just wondering if that's the way it's intended?:)

Reply 15 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++
konrad wrote:

ah, my bad...i wasn't logged in so i didn't see the attachment:D

i see attachments when not logged in. Never seen anything like that on other sites too. That would be rather strange if one couldn't see attachments when not logged in.

Reply 16 of 18, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Well, there wasn't any real testing done to see if the effect is accurate at all, I set the value high on purpose to see the effect results.
You can easily change it by modifying the last line of the shader:

    // Color the texel.
return half4(mul_res, 0.75);

The second number (0.75) is the alpha value...
No, no multipass yet 😀

The edges? They are smoothed in the screenshot as well, see the red triangles or the "KEYBOARD MODE" text. It is controlled by the "border smoothness parameter"

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

Reply 17 of 18, by konrad

User metadata
Rank Newbie
Rank
Newbie

@robertmo
nope, definitely can't see the screenshot attachment when logged out...dunno why.

@gulikoza
what i meant was the edges of the pixels. they look more "squared off" and sharp in your screenshot...or maybe i'm just imagining things:D do you use any kind of scaling?

EDIT: yeah ok, i just tried hardware3x scaling and that makes it look more like your screenshot. without scaling the pixels "merge" more and the scanlines become much more obvious