MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

John Mars
MAME Fan
Reged: 11/06/15
Posts: 7
Send PM


slot mask.png
#369302 - 09/01/17 05:50 PM


Using BGFX with slot mask gives a pretty accurate result in games like Ms Pacman, but attached is a closeup of the original. The RGB lines in each pixel is clearly defined. But the BGFX version closeup is barely defined. Can this be set to match up closer to the original using BGFX or HLSL?

Original:

https://drive.google.com/file/d/0ByNyeLyB5pBgMTJaLWpWT0pRRTg/view?usp=sharing

Mame BGFX using crt-geom-deluxe and slot-mask.png:

https://drive.google.com/file/d/0ByNyeLyB5pBgdldVR1h6ekFUNzg/view?usp=sharing

Edited by John Mars (09/01/17 06:01 PM)



anikom15
Instigator/Local CRT Guru
Reged: 04/11/16
Posts: 287
Send PM


Re: slot mask.png new [Re: John Mars]
#369304 - 09/01/17 06:23 PM


You can't get the above with the current artwork. It's not high enough resolution. What you should be concerned about is how it looks at viewing distance rather than up close.



John Mars
MAME Fan
Reged: 11/06/15
Posts: 7
Send PM


Re: slot mask.png new [Re: anikom15]
#369305 - 09/01/17 06:40 PM


I recreated the slot-mask.png at a higher resolution, but looks pretty much the same. I guess the coding itself cant recreate the higher resolution.



anikom15
Instigator/Local CRT Guru
Reged: 04/11/16
Posts: 287
Send PM


Re: slot mask.png new [Re: John Mars]
#369309 - 09/01/17 08:44 PM


I'm not familiar with that mediocre CRT deluxe shader, but HLSL will allow you to scale the art texture in any way you see fit. Let me know if you need any help doing that.

You will want to configure the shadow mask so it is about the same size as a real shadow mask or smaller. What resolution is your screen, and what are the actual dimensions of your screen?



John Mars
MAME Fan
Reged: 11/06/15
Posts: 7
Send PM


Re: slot mask.png new [Re: anikom15]
#369325 - 09/02/17 02:24 AM


> I'm not familiar with that mediocre CRT deluxe shader, but HLSL will allow you to
> scale the art texture in any way you see fit. Let me know if you need any help doing
> that.
>
> You will want to configure the shadow mask so it is about the same size as a real
> shadow mask or smaller. What resolution is your screen, and what are the actual
> dimensions of your screen?

My screen is a 24" LED with a resolution of 1920x1200. I liked the deluxe shader since it enabled a perfect amount of a curved screen, and also the glow along the edges of the graphics like the CRTs had. Im open to HLSL. I tried so many different options in the past, but was never able to get the pixels even close to what the originals were like in the photo I posted. If you provide help, i'd greatly appreciate it.



anikom15
Instigator/Local CRT Guru
Reged: 04/11/16
Posts: 287
Send PM


Re: slot mask.png new [Re: John Mars]
#369354 - 09/03/17 12:51 AM


Note that a 'dot' here means one cluster of red, green, and blue subdots. Using trigonometry the dimensions of your display is around 517 mm x 323 mm. Let's say three pixels of your screen make up one dot. That would give you a total of 640 dots across 517 mm, giving you a dot pitch of 0.8 mm. This is pretty large. Typical dot pitches range from 0.4 to 0.2 mm.

You can't really make your shadow mask any smaller than three pixels per dot because you will get some distortion because you're now blending the individual red, green, and blue texels. So you can either turn the shadow mask off or deal with a more blown up look. Here are the HLSL settings you would use:

shadow_mask_texture slot-mask.png
shadow_mask_x_count 24
shadow_mask_y_count 24
shadow_mask_usize 1.0
shadow_mask_vsize 1.0

This will downsample slot-mask.png by two (the image size is 48x48). slot-mask.png uses six pixels for each dot so you will use three pixels per dot. You won't want to use more than five pixels per dot because that's the point where your shadow mask resolution will be below the game's resolution, assuming 320x240. To figure out this point just divide the effective screen resolution by the game resolution, e.g. 1600 / 320 = 5 and 1200 / 240 = 5.


Let me know if you have any other questions.



R.Coltrane
MAME user since 0.11
Reged: 08/07/05
Posts: 495
Send PM


Re: slot mask.png new [Re: anikom15]
#369366 - 09/03/17 03:15 PM


And please, post some screenshots of your results with the shader applied to Ms. Pacman here as well



John Mars
MAME Fan
Reged: 11/06/15
Posts: 7
Send PM


Re: slot mask.png new [Re: R.Coltrane]
#369372 - 09/03/17 05:52 PM Attachment: 0000.png 2012 KB (0 downloads)


> And please, post some screenshots of your results with the shader applied to Ms.
> Pacman here as well

Here's the result. Click on the photo 2x to get the original resolution:

[ATTACHED IMAGE - CLICK FOR FULL SIZE]

Attachment

Edited by John Mars (09/03/17 06:00 PM)



anikom15
Instigator/Local CRT Guru
Reged: 04/11/16
Posts: 287
Send PM


Re: slot mask.png new [Re: John Mars]
#369374 - 09/03/17 06:08 PM


You might get better results by increasing shadow mask alpha.

I use 0.25 shadow mask alpha, 0.5 scan line alpha and 0.225 bloom scale.



John Mars
MAME Fan
Reged: 11/06/15
Posts: 7
Send PM


Re: slot mask.png new [Re: anikom15]
#369385 - 09/03/17 08:23 PM Attachment: 0001.png 2116 KB (0 downloads)


> You might get better results by increasing shadow mask alpha.
>
> I use 0.25 shadow mask alpha, 0.5 scan line alpha and 0.225 bloom scale.

This is what I get now:

[ATTACHED IMAGE - CLICK FOR FULL SIZE]

Attachment

Edited by John Mars (09/03/17 08:26 PM)



John Mars
MAME Fan
Reged: 11/06/15
Posts: 7
Send PM


Re: slot mask.png new [Re: John Mars]
#369387 - 09/03/17 08:28 PM


By the way, this is the ini:

#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlslpath hlsl
hlsl_enable 1
hlsl_oversampling 0
hlsl_write
hlsl_snap_width 1920
hlsl_snap_height 1200
shadow_mask_tile_mode 0
shadow_mask_alpha 0.25
shadow_mask_texture slot-mask.png
shadow_mask_x_count 24
shadow_mask_y_count 24
shadow_mask_usize 1.0
shadow_mask_vsize 1.0
shadow_mask_uoffset 0.0
shadow_mask_voffset 0.0
distortion 0.07
cubic_distortion 0.1
distort_corner 0.10
round_corner 0.10
smooth_border 0.03
reflection 0.00
vignetting 0.05
scanline_alpha 0.5
scanline_size 1.00
scanline_height 0.95
scanline_variation 1.0
scanline_bright_scale 1.20
scanline_bright_offset 0.55
scanline_jitter 0.05
hum_bar_alpha 0.0
defocus 0.50,0.0
converge_x 0.2,0.0,-0.1
converge_y 0.0,0.0,0.0
radial_converge_x 0.2,0.0,-0.2
radial_converge_y 0.0,0.0,0.0
red_ratio 0.80,0.10,0.10
grn_ratio 0.10,0.80,0.10
blu_ratio 0.10,0.10,0.80
saturation 1.40
offset -0.03,-0.01,0.03
scale 0.97,0.99,1.0
power 1.30,1.35,1.30
floor 0.00,0.00,0.00
phosphor_life 0.45,0.35,0.40

#
# NTSC POST-PROCESSING OPTIONS
#
yiq_enable 0
yiq_jitter 0.0
yiq_cc 3.57954545
yiq_a 0.5
yiq_b 0.5
yiq_o 0.0
yiq_p 1.0
yiq_n 1.0
yiq_y 6.0
yiq_i 1.2
yiq_q 0.6
yiq_scan_time 52.6
yiq_phase_count 2

#
# VECTOR POST-PROCESSING OPTIONS
#
vector_beam_smooth 0.0
vector_length_scale 0.5
vector_length_ratio 0.5

#
# BLOOM POST-PROCESSING OPTIONS
#
bloom_blend_mode 0
bloom_scale 0.225
bloom_overdrive 1.0,1.0,1.0
bloom_lvl0_weight 1.0
bloom_lvl1_weight 0.21
bloom_lvl2_weight 0.19
bloom_lvl3_weight 0.17
bloom_lvl4_weight 0.15
bloom_lvl5_weight 0.14
bloom_lvl6_weight 0.13
bloom_lvl7_weight 0.12
bloom_lvl8_weight 0.11



anikom15
Instigator/Local CRT Guru
Reged: 04/11/16
Posts: 287
Send PM


Re: slot mask.png new [Re: John Mars]
#369412 - 09/04/17 06:02 AM


I think shadow mask alpha might be too low. Anyway, play around with it and see what you can do. I hope you understand how to set the scaling for shadow mask textures. If not, I can elaborate. It's a little confusing at first.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 449 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2205