MAMEWorld >> EmuChat
Index   Flat Mode Flat  

Darkfalz
Lurker
Reged: 01/15/04
Posts: 17
Send PM
Re: Demystifying hlsl shadow masks.
03/03/16 05:47 PM


> > Shadow mask settings for me look different per game resolution and per host PC
> > resolution (differing amounts of vertical moire type patterns etc.). So it seems to
> > be impossible to get them "right".
>
> It is normal behaviour that shadowmasks look different, on different host PC
> resolutions. General rule: the higher your display resolution, the better the
> shadowmask will look, because you have more pixels left to mimic the shadowmask
> (without scaling it). Also it is possible, to get them "right". If you want better
> quality shadowmasks, try to increase the x/y prescale factors of the HLSL section. A
> value of "5" (five) gives a nice, good average and if your graphics card can handle
> it, you can even try higher values.
>
> I am pretty sure, that in the next release the prescale factors, will be abandoned
> anyways.
>
> > Is there a guide or default that explains all these settings and how to get them
> > "right"? hlsl.txt isn't of much help.
>
> The docs are currently rewritten and i assume there will be better docs very soon.
>
> > shadow_mask_tile_mode 0
> > shadow_mask_alpha 0.0
> > shadow_mask_texture shadow-mask.png
> > shadow_mask_x_count 6
> > shadow_mask_y_count 4
> > shadow_mask_usize 0.1875
> > shadow_mask_vsize 0.25
> > shadow_mask_uoffset 0.0
> > shadow_mask_voffset 0.0
>
> shadow_mask_tile_mode is used for the LCD Gameboy shader.
>
> shadow_mask_alpha
>
> is the value for the transparency of the shadowmask. A value of 1.0 is 100% opaque
> and 0.30 is a good value to start.
>
> shadow_mask_texture
>
> is the name of the texture, that will be used to create the shadowmask. These three
> shadowmask files are located in the subfolder “artwork” of a MAME install and are
> used for raster games and colored vector games:
>
> adapture-grill.png
> shadow-mask.png
> slot-mask.png
>
> Each file represents a different shadowmask.
>
> shadow_mask_x_count
> shadow_mask_y_count
> shadow_mask_usize
> shadow_mask_vsize
>
> These parameters are used to ensure proper alignment and tiling of the texture that
> is used to generate the shadowmask. HLSL shadowmasks are image-based and are not
> procedural textures, like mostly used in the OpenGL based pendant shaders.
> Therefore it is very important and essential to use correct values.
>
> The following values should be used for the different HLSL shadowmasks:
>
> ------------- shadow-mask settings ----------------
>
> shadow_mask_texture shadow-mask.png
> shadow_mask_x_count 6
> shadow_mask_y_count 4
> shadow_mask_usize 0.1875
> shadow_mask_vsize 0.25
>
> --------------- slot-mask settings ----------------
>
> shadow_mask_texture slot-mask.png
> shadow_mask_x_count 6
> shadow_mask_y_count 6
> shadow_mask_usize 0.1875
> shadow_mask_vsize 0.1875
>
> ------------- adapture-grill settings -------------
>
> shadow_mask_texture adapture-grill.png
> shadow_mask_x_count 6
> shadow_mask_y_count 6
> shadow_mask_usize 0.1875
> shadow_mask_vsize 0.1875
>
>
> shadow_mask_uoffset
> shadow_mask_voffset
>
> These values move the shadowmask in sub-pixel range Only useful for developing and
> investigating. Leave it at Zero (default).

Thanks for this. It looks better with prescale, but still moire - might be unavoidable with only a 768 display as I am testing currently. I read something about an auto-prescale option in future which would be great. My integrated graphics can only manage up to 3, NVIDIA GPU about 6 is okay.







Entire thread
Subject Posted by Posted on
* Demystifying hlsl shadow masks. Darkfalz 02/26/16 04:05 PM
. * Re: Demystifying hlsl shadow masks. Jezze  02/26/16 06:32 PM
. * Re: Demystifying hlsl shadow masks. uman  02/26/16 04:46 PM
. * Re: Demystifying hlsl shadow masks. Darkfalz  03/03/16 05:47 PM
. * Re: Demystifying hlsl shadow masks. Traso  03/07/16 11:32 PM
. * Re: Demystifying hlsl shadow masks. R. Belmont  02/26/16 06:26 PM
. * Re: Demystifying hlsl shadow masks. Darkfalz  03/03/16 06:05 PM
. * Re: Demystifying hlsl shadow masks. Jezze  03/03/16 07:17 PM
. * Re: Demystifying hlsl shadow masks. uman  02/26/16 08:12 PM

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