Saturday 15 October 2011

JClampy's Shadow Mask's for MAME/MESS HLSL Filter!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update 27-10-2011 ~ Just fine tuning some settings

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ok, this is a WIP so I will update my blog as I get further progress with this.

I will not explain how all this works as it is very complicated. If anyone wants to help find settings for resolutions then make contact with me, either here or this thread here. It is quite difficult and involved, so not for the feint of heart. On average it can take one hour to find settings for one resolution.

I have a square screen, not a widescreen, so cannot test for widescreen displays. If you use a widescreen and can't get desired effects then you will have to use MAME's 'Border Artwork' feature to get the game image displayed in a correct aspect ratio window.

These settings work, so if they do not work for you then;
1. You are not doing something right!
2. You are using 'Aperture4xZoom.png' while not outputing game at a 4x zoomed resolution. Or 'Aperture3xZoom.png' while not outputing game at a 3x zoomed resolution.
3. You are not using correctly matched 'shadow_mask_usize' & shadow_mask_vsize' settings for the resolution you are outputting at.
4. Double check all MAME & HLSL settings, maybe delete all individual game ini and cfg files if you have too?
5. Your graphic card must be compatible with Shader Version 3.0 to use HLSL
6. You are not doing something right!

First you need my "JClampy's NEW aperture" files;
Aperture to be used with 4x magnification http://www.mediafire.com/?5n79r8noxbf9vr6
Aperture to be used with 3x magnification http://www.mediafire.com/?buuwcc1dcxy4xt7

You need to extract the NEW Shadow Mask .png files to your MAME or MESS artwork folder. Then you need to use these following settings;

mame.ini
effect             none      (old visual effects off)
scale_effect    none      (old visual effects off)
switchres           1        (enable resolution settings)
sleep                0        (power saving sleep mode off)
keepaspect        1        (maintain aspect ratios)
prescale            1        (no software prescale)
hwstretch          0        (hardware stretching off)
filter                 0        (bilinear filtering off)
artwork_crop      0        (crop border artwork off)


320x240 original game resolution output to 1280x960 4x magnification:
mame.ini
aspect ratio      4:3       (correct aspect ratio)
resolution    1280x960   (4x magnification resolution)
view         pixel aspect  (keep to games aspect ratio)

hlsl.ini
hlsl_prescale_x     4      (4x zoom)
hlsl_prescale_y     4      (4x zoom)
hlsl_snap_width     1280   (rendered snapshots resolution width at correct output ratio for game pixels to shadow mask alignment)
hlsl_snap_height     960    (rendered snapshots resolution height at correct output ratio for game pixels to shadow mask alignment)
shadow_mask_alpha        0.150000 (my personal preference)
shadow_mask_texture        JClampyAperture4xPatternC.png
shadow_mask_x_count       256
shadow_mask_y_count       128
shadow_mask_usize         0.465000
shadow_mask_vsize         0.500000


320x256 original game resolution output to 1280x1024 4x magnification:


mame.ini
aspect ratio      5:4        (correct aspect ratio)
resolution    1280x1024  (4x magnification resolution)
view         pixel aspect   (keep to games aspect ratio)

hlsl.ini
hlsl_prescale_x     4      (4x zoom)
hlsl_prescale_y     4      (4x zoom)
hlsl_snap_width     1280   (rendered snapshots resolution width at correct output ratio for game pixels to shadow mask alignment)
hlsl_snap_height    1024   (rendered snapshots resolution height at correct output ratio for game pixels to shadow mask alignment)
shadow_mask_alpha       0.150000    (my personal preference)
shadow_mask_texture      JClampyAperture4xPatternC.png
shadow_mask_x_count      256
shadow_mask_y_count      256
shadow_mask_usize        0.460000
shadow_mask_vsize        0.440000


288x216 original game resolution output to 1152x864 4x magnification:
mame.ini
aspect ratio      4:3       (correct aspect ratio)
resolution    1152x864   (4x magnification resolution)
view         pixel aspect  (keep to games aspect ratio)

hlsl.ini
hlsl_prescale_x     4      (4x zoom)
hlsl_prescale_y     4      (4x zoom)
hlsl_snap_width     1152   (rendered snapshots resolution width at correct output ratio for game pixels to shadow mask alignment)
hlsl_snap_height     864    (rendered snapshots resolution height at correct output ratio for game pixels to shadow mask alignment)
shadow_mask_alpha        0.150000 (my personal preference)
shadow_mask_texture        JClampyAperture4xPatternC.png
shadow_mask_x_count       256
shadow_mask_y_count       128
shadow_mask_usize         0.455000
shadow_mask_vsize         0.487500


256x192 original game resolution output to 1024x768 4x magnification:
mame.ini
aspect ratio      4:3       (correct aspect ratio)
resolution    1024x768   (4x magnification resolution)
view         pixel aspect  (keep to games aspect ratio)

hlsl.ini
hlsl_prescale_x     4      (4x zoom)
hlsl_prescale_y     4      (4x zoom)
hlsl_snap_width     1024   (rendered snapshots resolution width at correct output ratio for game pixels to shadow mask alignment)
hlsl_snap_height     768    (rendered snapshots resolution height at correct output ratio for game pixels to shadow mask alignment)
shadow_mask_alpha        0.150000 (my personal preference)
shadow_mask_texture        JClampyAperture4xPatternC.png
shadow_mask_x_count       256
shadow_mask_y_count       128
shadow_mask_usize         0.445000
shadow_mask_vsize         0.480000


320x240 original game resolution output to 960x720 3x magnification:
(shown in example screenshot using border artwork)
mame.ini
aspect ratio      5:4       (correct aspect ratio)
resolution    1280x1024   (output resolution including border artwork)
view         pixel aspect  (keep to games aspect ratio)

hlsl.ini
hlsl_prescale_x     3      (3x zoom)
hlsl_prescale_y     3      (3x zoom)
hlsl_snap_width     960   (rendered snapshots resolution width at correct output ratio for game pixels to shadow mask alignment)
hlsl_snap_height     720    (rendered snapshots resolution height at correct output ratio for game pixels to shadow mask alignment)
shadow_mask_alpha        0.150000 (my personal preference)
shadow_mask_texture        JClampyAperture3xPatternC.png
shadow_mask_x_count       128
shadow_mask_y_count       64
shadow_mask_usize         0.750000
shadow_mask_vsize         0.707500

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Finding correct settings is a long, difficult, and slow process. If you
think you could help with this process then please contact me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please do not steal or use my work or settings without crediting me.
Otherwise I will take everything offline for my personal use only.


Special credit/thanks to Ryan Holtz aka 'Just Desserts', Bat Country Entertainment, cgwg and all those involved in creating and maintaining the HLSL filter for MAME and MESS.

No comments:

Post a Comment