Previous 199869 Revisions Next

r41775 Sunday 8th November, 2015 at 21:46:08 UTC by Jezze
Fixed reset of HLSL settings

- fixed bug that resets the HLSL settings when the screen size has
changed
- removed hardcoded HLSL presets
- updates HLSL readme
[docs]hlsl.txt
[src/osd/modules/render]drawd3d.c drawd3d.h
[src/osd/modules/render/d3d]d3dhlsl.c d3dhlsl.h
[src/osd/windows]winmain.c winmain.h

trunk/docs/hlsl.txt
r250286r250287
1010hlslpath                [path]          Path to the .fx files that are in use.  (default: hlsl)
1111hlsl_prescale_x         [horizontal]    HLSL pre-scale override factor for X.  (0 for auto)
1212hlsl_prescale_y         [vertical]      HLSL pre-scale override factor for Y.  (0 for auto)
13hlsl_preset             -1 through 3    HLSL preset to use.  (default: -1)
14hlsl_write              [filename]      Enable HLSL AVI writing.   (huge disk bandwidth suggested)
13hlsl_write              [filename]      Enables HLSL AVI writing.  (huge disk bandwidth suggested)
1514hlsl_snap_width         [width]         HLSL upscaled-snapshot width.  (default: 2048)
16hlsl_snap_height       [height]        HLSL upscaled-snapshot height.  (default: 1536)
15hlsl_snap_height        [height]        HLSL upscaled-snapshot height.  (default: 1536)
1716
1817
1918Surface/Color Processing Parameters
r250286r250287
2221Name                    Values      Description
2322shadow_mask_alpha       0.0 to 1.0      The ovearll darkness of each shadow mask pixel.
2423shadow_mask_texture     [filename]      A PNG that defines the shadow mask for each pixel.
25shadow_mask_x_count     1+              The count of shadow mask elements, X (usually 640-ish).
26shadow_mask_y_count     1+              The count of shadow mask elements, Y (usually 480-ish).
27shadow_mask_usize       0.0 to 1.0      These parameters define the *in-use* pixel count on the
28shadow_mask_vsize       0.0 to 1.0      X and Y axes of the shadow mask texture.
29curvature               0.0 to 1.0      Screen curvature. Affects borders and shadow mask.
30pincushion              0.0 to 1.0      Image curvature. Affects the source image only.
24shadow_mask_x_count     1+              The number of pixels one shadow mask tile uses on screen.
25shadow_mask_y_count     1+              This stretches the shadow mask tiles on X and Y axis.
26shadow_mask_usize       0.0 to 1.0      The size of one shadow mask tile in U/V coordinate.
27shadow_mask_vsize       0.0 to 1.0      The shadow mask textures always has a size of power-of-two.
28shadow_mask_voffset    -1.0 to 1.0      The offset of the shadow mask texture in U/V coordinates.
29shadow_mask_voffset    -1.0 to 1.0      An offset of 1.0 repressents one pixel on screen.
30curvature               0.0 to 1.0      Curvature amount of the screen.
31round_corner            0.0 to 1.0      Rounded corners amount of the screen.
32smooth_border           0.0 to 1.0      Smooth borders amount of the screen.
33reflection              0.0 to 1.0      Refelection amount of the screen highlight.
34vignetting              0.0 to 1.0      Vignetting amount of the image.
3135scanline_alpha          0.0 to 1.0      The overall darkness of each scanline furrow.
3236scanline_size           0.0 to 4.0      The overall height of each scanline.
3337scanline_height         [height]        Individual height scaling value for scanlines.
r250286r250287
97101Bloom Post-Processing Options
98102-----------------------------
99103Name                    Default Values  Description
100vector_bloom_scale      0.300           Intensity factor for vector bloom.  (0.000-1.000)
101raster_bloom_scale      0.225           Intensity factor for raster bloom.  (0.000-1.000)
104bloom_scale             0.500           Bloom intensity factor.  (0.000-2.000)
105bloom_overdrive         0.00,0.00,0.00  Bloom overdrive factor to bright full saturated colors.  (0.000-2.000)
102106bloom_lvl0_weight       1.00            Bloom level 0  (full-size target) weight.  (0.00-1.00)
103107bloom_lvl1_weight       0.21            Bloom level 1  (half-size target) weight.  (0.00-1.00)
104108bloom_lvl2_weight       0.19            Bloom level 2  (quarter-size target) weight.  (0.00-1.00)
trunk/src/osd/modules/render/d3d/d3dhlsl.c
r250286r250287
5454
5555namespace d3d
5656{
57hlsl_options shaders::s_hlsl_presets[4] =
58{
59   {   // 25% Shadow mask, 50% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation
60      true,
61      0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f,
62      0.03f, 0.0f, 0.0f, 0.0f, 0.0f,
63      0.5f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f,
64      { 0.0f, 0.0f },
65      { 0.0f, 0.0f, 0.0f },
66      { 0.0f, 0.0f, 0.0f },
67      { 0.0f, 0.0f, 0.0f },
68      { 0.0f, 0.0f, 0.0f },
69      { 1.0f, 0.0f, 0.0f },
70      { 0.0f, 1.0f, 0.0f },
71      { 0.0f, 0.0f, 1.0f },
72      { 0.0f, 0.0f, 0.0f },
73      { 1.0f, 1.0f, 1.0f },
74      { 0.9f, 0.9f, 0.9f },
75      { 0.05f,0.05f,0.05f},
76      { 0.25f,0.25f,0.25f},
77      1.2f,
78      false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
79      0.9f, 4.0f,
80      1.0f,
81      { 0.0f, 0.0f, 0.0f },
82      0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
83   },
84   {   // 25% Shadow mask, 0% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation
85      true,
86      0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f,
87      0.03f, 0.0f, 0.0f, 0.0f, 0.0f,
88      0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f,
89      { 0.0f, 0.0f },
90      { 0.0f, 0.0f, 0.0f },
91      { 0.0f, 0.0f, 0.0f },
92      { 0.0f, 0.0f, 0.0f },
93      { 0.0f, 0.0f, 0.0f },
94      { 1.0f, 0.0f, 0.0f },
95      { 0.0f, 1.0f, 0.0f },
96      { 0.0f, 0.0f, 1.0f },
97      { 0.0f, 0.0f, 0.0f },
98      { 1.0f, 1.0f, 1.0f },
99      { 0.9f, 0.9f, 0.9f },
100      { 0.05f,0.05f,0.05f},
101      { 0.25f,0.25f,0.25f},
102      1.2f,
103      false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
104      0.9f, 4.0f,
105      1.0f,
106      { 0.0f, 0.0f, 0.0f },
107      0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
108   },
109   {   // 25% Shadow mask, 0% Scanlines, 0% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation
110      true,
111      0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f,
112      0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
113      0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f,
114      { 0.0f, 0.0f },
115      { 0.0f, 0.0f, 0.0f },
116      { 0.0f, 0.0f, 0.0f },
117      { 0.0f, 0.0f, 0.0f },
118      { 0.0f, 0.0f, 0.0f },
119      { 1.0f, 0.0f, 0.0f },
120      { 0.0f, 1.0f, 0.0f },
121      { 0.0f, 0.0f, 1.0f },
122      { 0.0f, 0.0f, 0.0f },
123      { 1.0f, 1.0f, 1.0f },
124      { 0.9f, 0.9f, 0.9f },
125      { 0.05f,0.05f,0.05f},
126      { 0.25f,0.25f,0.25f},
127      1.2f,
128      false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
129      0.9f, 4.0f,
130      1.0f,
131      { 0.0f, 0.0f, 0.0f },
132      0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
133   },
134   {   // 25% Shadow mask, 100% Scanlines, 15% Pincushion, 3 defocus, 24-degree Tint Out, 1.5 Exponent, 5% Floor, 70% Phosphor Return, 80% Saturation, Bad Convergence
135      true,
136      0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f,
137      0.15f, 0.0f, 0.0f, 0.0f, 0.0f,
138      1.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.5f,
139      { 3.0f, 3.0f },
140      { 0.5f,-0.33f,0.7f },
141      { 0.0f,-1.0f, 0.5f },
142      { 0.0f, 0.2f, 0.3f },
143      { 0.0f, 0.2f, 0.0f },
144      { 0.8f, 0.2f, 0.0f },
145      { 0.0f, 0.8f, 0.2f},
146      { 0.2f, 0.0f, 0.8f},
147      { 0.0f, 0.0f, 0.0f },
148      { 1.0f, 1.0f, 1.0f },
149      { 1.5f, 1.5f, 1.5f },
150      { 0.05f,0.05f,0.05f},
151      { 0.7f, 0.7f, 0.7f},
152      0.8f,
153      false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
154      0.9f, 4.0f,
155      1.0f,
156      { 0.0f, 0.0f, 0.0f },
157      0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
158   },
159};
16057
161
16258//============================================================
16359//  PROTOTYPES
16460//============================================================
16561
166static void get_vector(const char *data, int count, float *out, int report_error);
62static void get_vector(const char *data, int count, float *out, bool report_error);
16763
16864
16965//============================================================
r250286r250287
20197
20298shaders::~shaders()
20399{
204   global_free(options);
205100   cache_target *currcache = cachehead;
206101   while(cachehead != NULL)
207102   {
r250286r250287
751646   this->d3dintf = d3dintf;
752647   this->machine = machine;
753648   this->d3d = renderer;
649   this->options = renderer->get_shaders_options();
754650
755651   windows_options &winoptions = downcast<windows_options &>(machine->options());
756652
r250286r250287
759655   hlsl_prescale_y = winoptions.d3d_hlsl_prescale_y();
760656   snap_width = winoptions.d3d_snap_width();
761657   snap_height = winoptions.d3d_snap_height();
762   preset = winoptions.d3d_hlsl_preset();
763658
764   if (preset < -1 || preset > 3)
659   if (!options->params_init)
765660   {
766      preset = -1;
767   }
768
769   options = (hlsl_options*)global_alloc_clear(hlsl_options);
770
771   // unsafe
772   strcpy(options->shadow_mask_texture, winoptions.screen_shadow_mask_texture());
773
774   if (preset == -1)
775   {
661      strncpy(options->shadow_mask_texture, winoptions.screen_shadow_mask_texture(), sizeof(options->shadow_mask_texture));
776662      options->shadow_mask_alpha = winoptions.screen_shadow_mask_alpha();
777663      options->shadow_mask_count_x = winoptions.screen_shadow_mask_count_x();
778664      options->shadow_mask_count_y = winoptions.screen_shadow_mask_count_y();
r250286r250287
805691      get_vector(winoptions.screen_floor(), 3, options->floor, TRUE);
806692      get_vector(winoptions.screen_phosphor(), 3, options->phosphor, TRUE);
807693      options->saturation = winoptions.screen_saturation();
694      options->yiq_enable = winoptions.screen_yiq_enable();
695      options->yiq_cc = winoptions.screen_yiq_cc();
696      options->yiq_a = winoptions.screen_yiq_a();
697      options->yiq_b = winoptions.screen_yiq_b();
698      options->yiq_o = winoptions.screen_yiq_o();
699      options->yiq_p = winoptions.screen_yiq_p();
700      options->yiq_n = winoptions.screen_yiq_n();
701      options->yiq_y = winoptions.screen_yiq_y();
702      options->yiq_i = winoptions.screen_yiq_i();
703      options->yiq_q = winoptions.screen_yiq_q();
704      options->yiq_scan_time = winoptions.screen_yiq_scan_time();
705      options->yiq_phase_count = winoptions.screen_yiq_phase_count();
706      options->vector_length_scale = winoptions.screen_vector_length_scale();
707      options->vector_length_ratio = winoptions.screen_vector_length_ratio();
708      options->bloom_scale = winoptions.screen_bloom_scale();
709      get_vector(winoptions.screen_bloom_overdrive(), 3, options->bloom_overdrive, TRUE);
710      options->bloom_level0_weight = winoptions.screen_bloom_lvl0_weight();
711      options->bloom_level1_weight = winoptions.screen_bloom_lvl1_weight();
712      options->bloom_level2_weight = winoptions.screen_bloom_lvl2_weight();
713      options->bloom_level3_weight = winoptions.screen_bloom_lvl3_weight();
714      options->bloom_level4_weight = winoptions.screen_bloom_lvl4_weight();
715      options->bloom_level5_weight = winoptions.screen_bloom_lvl5_weight();
716      options->bloom_level6_weight = winoptions.screen_bloom_lvl6_weight();
717      options->bloom_level7_weight = winoptions.screen_bloom_lvl7_weight();
718      options->bloom_level8_weight = winoptions.screen_bloom_lvl8_weight();
719      options->bloom_level9_weight = winoptions.screen_bloom_lvl9_weight();
720      options->bloom_level10_weight = winoptions.screen_bloom_lvl10_weight();
721
722      options->params_init = true;
808723   }
809   else
810   {
811      options = &s_hlsl_presets[preset];
812   }
813724
814   options->yiq_enable = winoptions.screen_yiq_enable();
815   options->yiq_cc = winoptions.screen_yiq_cc();
816   options->yiq_a = winoptions.screen_yiq_a();
817   options->yiq_b = winoptions.screen_yiq_b();
818   options->yiq_o = winoptions.screen_yiq_o();
819   options->yiq_p = winoptions.screen_yiq_p();
820   options->yiq_n = winoptions.screen_yiq_n();
821   options->yiq_y = winoptions.screen_yiq_y();
822   options->yiq_i = winoptions.screen_yiq_i();
823   options->yiq_q = winoptions.screen_yiq_q();
824   options->yiq_scan_time = winoptions.screen_yiq_scan_time();
825   options->yiq_phase_count = winoptions.screen_yiq_phase_count();
826   options->vector_length_scale = winoptions.screen_vector_length_scale();
827   options->vector_length_ratio = winoptions.screen_vector_length_ratio();
828   options->bloom_scale = winoptions.screen_bloom_scale();
829   get_vector(winoptions.screen_bloom_overdrive(), 3, options->bloom_overdrive, TRUE);
830   options->bloom_level0_weight = winoptions.screen_bloom_lvl0_weight();
831   options->bloom_level1_weight = winoptions.screen_bloom_lvl1_weight();
832   options->bloom_level2_weight = winoptions.screen_bloom_lvl2_weight();
833   options->bloom_level3_weight = winoptions.screen_bloom_lvl3_weight();
834   options->bloom_level4_weight = winoptions.screen_bloom_lvl4_weight();
835   options->bloom_level5_weight = winoptions.screen_bloom_lvl5_weight();
836   options->bloom_level6_weight = winoptions.screen_bloom_lvl6_weight();
837   options->bloom_level7_weight = winoptions.screen_bloom_lvl7_weight();
838   options->bloom_level8_weight = winoptions.screen_bloom_lvl8_weight();
839   options->bloom_level9_weight = winoptions.screen_bloom_lvl9_weight();
840   options->bloom_level10_weight = winoptions.screen_bloom_lvl10_weight();
841
842725   options->params_dirty = true;
843726
844727   g_slider_list = init_slider_list();
r250286r250287
21041987
21051988   initialized = false;
21061989
1990   options = NULL;
1991
21071992   cache_target *currcache = cachehead;
21081993   while(cachehead != NULL)
21091994   {
r250286r250287
22352120//  get_vector
22362121//============================================================
22372122
2238static void get_vector(const char *data, int count, float *out, int report_error)
2123static void get_vector(const char *data, int count, float *out, bool report_error)
22392124{
22402125   if (count > 3 &&
22412126      sscanf(data, "%f,%f,%f,%f", &out[0], &out[1], &out[2], &out[3]) < 4 && report_error)
trunk/src/osd/modules/render/d3d/d3dhlsl.h
r250286r250287
184184/* in the future this will be moved into an OSD/emu shared buffer */
185185struct hlsl_options
186186{
187   bool                    params_init;
187188   bool                    params_dirty;
188189   float                   shadow_mask_alpha;
189190   char                    shadow_mask_texture[1024];
r250286r250287
376377   int                     preset;                     // preset, if relevant
377378   bitmap_argb32           shadow_bitmap;              // shadow mask bitmap for post-processing shader
378379   texture_info *          shadow_texture;             // shadow mask texture for post-processing shader
379   hlsl_options *          options;                    // current uniform state
380   hlsl_options *          options;                    // current options
380381   D3DPRIMITIVETYPE        vecbuf_type;
381382   UINT32                  vecbuf_index;
382383   UINT32                  vecbuf_count;
r250286r250287
427428   texture_info *          curr_texture;
428429   render_target *         curr_render_target;
429430   poly_info *             curr_poly;
430
431public:
432431   render_target *         targethead;
433432   cache_target *          cachehead;
434433
435434   static slider_desc      s_sliders[];
436   static hlsl_options     s_hlsl_presets[4];
437435};
438436
439437}
trunk/src/osd/modules/render/drawd3d.c
r250286r250287
808808{
809809   // if a device exists, free it
810810   if (m_device != NULL)
811   {
811812      device_delete();
813   }
812814
815   // create shader options only once
816   if (m_shaders_options == NULL)
817   {
818      m_shaders_options = (hlsl_options*)global_alloc_clear(hlsl_options);
819   }
820
813821   // verify the caps
814822   int verify = device_verify_caps();
815823   if (verify == 2)
r250286r250287
818826      return 1;
819827   }
820828   if (verify == 1)
829   {
821830      osd_printf_warning("Warning: Device may not perform well for Direct3D rendering\n");
831   }
822832
823833   // verify texture formats
824834   HRESULT result = (*d3dintf->d3d.check_device_format)(d3dintf, m_adapter, D3DDEVTYPE_HAL, m_pixformat, 0, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8);
r250286r250287
9991009
10001010renderer::~renderer()
10011011{
1012   if (m_shaders_options != NULL)
1013   {
1014      global_free(m_shaders_options);
1015   }
1016   m_shaders_options = NULL;
1017
10021018   device_delete();
10031019}
10041020
r250286r250287
10551071{
10561072   int retval = 0;
10571073
1058   m_shaders = global_alloc_clear(shaders);
1059   // FIXME: Dynamic cast
1074   m_shaders = (shaders*)global_alloc_clear(shaders);
10601075   m_shaders->init(d3dintf, &window().machine(), this);
10611076
10621077   DWORD tempcaps;
trunk/src/osd/modules/render/drawd3d.h
r250286r250287
178178   texture_info *          get_vector_texture() { return m_texture_manager->get_vector_texture(); }
179179
180180   shaders *               get_shaders() { return m_shaders; }
181   hlsl_options *          get_shaders_options() { return m_shaders_options; }
181182
182183private:
183184   int                     m_adapter;                  // ordinal adapter number
r250286r250287
220221
221222   void *                  m_hlsl_buf;                 // HLSL vertex data
222223   shaders *               m_shaders;                  // HLSL interface
224   hlsl_options *          m_shaders_options;          // HLSL options
223225
224226   texture_manager *       m_texture_manager;          // texture manager
225227
trunk/src/osd/windows/winmain.c
r250286r250287
274274   // performance options
275275   { NULL,                                           NULL,       OPTION_HEADER,     "WINDOWS PERFORMANCE OPTIONS" },
276276   { WINOPTION_PRIORITY "(-15-1)",                   "0",        OPTION_INTEGER,    "thread priority for the main game thread; range from -15 to 1" },
277   { WINOPTION_PROFILE,                              "0",        OPTION_INTEGER,    "enable profiling, specifying the stack depth to track" },
277   { WINOPTION_PROFILE,                              "0",        OPTION_INTEGER,    "enables profiling, specifying the stack depth to track" },
278278
279279   // video options
280280   { NULL,                                           NULL,       OPTION_HEADER,     "WINDOWS VIDEO OPTIONS" },
281   { WINOPTION_MENU,                                 "0",        OPTION_BOOLEAN,    "enable menu bar if available by UI implementation" },
281   { WINOPTION_MENU,                                 "0",        OPTION_BOOLEAN,    "enables menu bar if available by UI implementation" },
282282
283283   // DirectDraw-specific options
284284   { NULL,                                           NULL,       OPTION_HEADER,     "DIRECTDRAW-SPECIFIC OPTIONS" },
285   { WINOPTION_HWSTRETCH ";hws",                     "1",        OPTION_BOOLEAN,    "enable hardware stretching" },
285   { WINOPTION_HWSTRETCH ";hws",                     "1",        OPTION_BOOLEAN,    "enables hardware stretching" },
286286
287287   // post-processing options
288288   { NULL,                                                     NULL,        OPTION_HEADER,     "DIRECT3D POST-PROCESSING OPTIONS" },
289   { WINOPTION_HLSL_ENABLE";hlsl",                             "0",         OPTION_BOOLEAN,    "enable HLSL post-processing (PS3.0 required)" },
289   { WINOPTION_HLSL_ENABLE";hlsl",                             "0",         OPTION_BOOLEAN,    "enables HLSL post-processing (PS3.0 required)" },
290290   { WINOPTION_HLSLPATH,                                       "hlsl",      OPTION_STRING,     "path to hlsl files" },
291291   { WINOPTION_HLSL_PRESCALE_X,                                "0",         OPTION_INTEGER,    "HLSL pre-scale override factor for X (0 for auto)" },
292292   { WINOPTION_HLSL_PRESCALE_Y,                                "0",         OPTION_INTEGER,    "HLSL pre-scale override factor for Y (0 for auto)" },
293   { WINOPTION_HLSL_PRESET";(-1-3)",                           "-1",        OPTION_INTEGER,    "HLSL preset to use (0-3)" },
294   { WINOPTION_HLSL_WRITE,                                     NULL,        OPTION_STRING,     "enable HLSL AVI writing (huge disk bandwidth suggested)" },
293   { WINOPTION_HLSL_WRITE,                                     NULL,        OPTION_STRING,     "enables HLSL AVI writing (huge disk bandwidth suggested)" },
295294   { WINOPTION_HLSL_SNAP_WIDTH,                                "2048",      OPTION_STRING,     "HLSL upscaled-snapshot width" },
296295   { WINOPTION_HLSL_SNAP_HEIGHT,                               "1536",      OPTION_STRING,     "HLSL upscaled-snapshot height" },
297296   { WINOPTION_SHADOW_MASK_ALPHA";fs_shadwa(0.0-1.0)",         "0.0",       OPTION_FLOAT,      "shadow mask alpha-blend value (1.0 is fully blended, 0.0 is no mask)" },
298297   { WINOPTION_SHADOW_MASK_TEXTURE";fs_shadwt(0.0-1.0)",       "aperture.png", OPTION_STRING,  "shadow mask texture name" },
299   { WINOPTION_SHADOW_MASK_COUNT_X";fs_shadww",                "6",         OPTION_INTEGER,    "shadow mask width, in phosphor dots" },
300   { WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh",                "6",         OPTION_INTEGER,    "shadow mask height, in phosphor dots" },
301   { WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)",         "0.1875",    OPTION_FLOAT,      "shadow mask texture size in U direction" },
302   { WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)",         "0.1875",    OPTION_FLOAT,      "shadow mask texture size in V direction" },
303   { WINOPTION_SHADOW_MASK_UOFFSET";fs_shadwou(-1.0-1.0)",     "0.0",       OPTION_FLOAT,      "shadow mask texture offset in U direction" },
304   { WINOPTION_SHADOW_MASK_VOFFSET";fs_shadwov(-1.0-1.0)",     "0.0",       OPTION_FLOAT,      "shadow mask texture offset in V direction" },
298   { WINOPTION_SHADOW_MASK_COUNT_X";fs_shadww",                "6",         OPTION_INTEGER,    "shadow mask tile width, in screen dimensions" },
299   { WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh",                "6",         OPTION_INTEGER,    "shadow mask tile height, in screen dimensions" },
300   { WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)",         "0.1875",    OPTION_FLOAT,      "shadow mask texture width, in U/V dimensions" },
301   { WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)",         "0.1875",    OPTION_FLOAT,      "shadow mask texture height, in U/V dimensions" },
302   { WINOPTION_SHADOW_MASK_UOFFSET";fs_shadwou(-1.0-1.0)",     "0.0",       OPTION_FLOAT,      "shadow mask texture offset, in U direction" },
303   { WINOPTION_SHADOW_MASK_VOFFSET";fs_shadwov(-1.0-1.0)",     "0.0",       OPTION_FLOAT,      "shadow mask texture offset, in V direction" },
305304   { WINOPTION_CURVATURE";fs_curv(0.0-1.0)",                   "0.0",       OPTION_FLOAT,      "screen curvature amount" },
306305   { WINOPTION_ROUND_CORNER";fs_rndc(0.0-1.0)",                "0.0",       OPTION_FLOAT,      "screen round corner amount" },
307306   { WINOPTION_SMOOTH_BORDER";fs_smob(0.0-1.0)",               "0.0",       OPTION_FLOAT,      "screen smooth border amount" },
r250286r250287
331330   { WINOPTION_PHOSPHOR";fs_phosphor",                         "0.4,0.4,0.4",OPTION_STRING,    "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" },
332331   /* NTSC simulation below this line */
333332   { NULL,                                                     NULL,        OPTION_HEADER,     "NTSC POST-PROCESSING OPTIONS" },
334   { WINOPTION_YIQ_ENABLE";yiq",                               "0",         OPTION_BOOLEAN,    "enable YIQ-space HLSL post-processing" },
333   { WINOPTION_YIQ_ENABLE";yiq",                               "0",         OPTION_BOOLEAN,    "enables YIQ-space HLSL post-processing" },
335334   { WINOPTION_YIQ_CCVALUE";yiqcc",                            "3.59754545",OPTION_FLOAT,      "Color Carrier frequency for NTSC signal processing" },
336335   { WINOPTION_YIQ_AVALUE";yiqa",                              "0.5",       OPTION_FLOAT,      "A value for NTSC signal processing" },
337336   { WINOPTION_YIQ_BVALUE";yiqb",                              "0.5",       OPTION_FLOAT,      "B value for NTSC signal processing" },
r250286r250287
367366
368367   // full screen options
369368   { NULL,                                           NULL,       OPTION_HEADER,     "FULL SCREEN OPTIONS" },
370   { WINOPTION_TRIPLEBUFFER ";tb",                   "0",        OPTION_BOOLEAN,    "enable triple buffering" },
369   { WINOPTION_TRIPLEBUFFER ";tb",                   "0",        OPTION_BOOLEAN,    "enables triple buffering" },
371370   { WINOPTION_FULLSCREENBRIGHTNESS ";fsb(0.1-2.0)", "1.0",      OPTION_FLOAT,      "brightness value in full screen mode" },
372371   { WINOPTION_FULLSCREENCONTRAST ";fsc(0.1-2.0)",   "1.0",      OPTION_FLOAT,      "contrast value in full screen mode" },
373372   { WINOPTION_FULLSCREENGAMMA ";fsg(0.1-3.0)",      "1.0",      OPTION_FLOAT,      "gamma value in full screen mode" },
374373
375374   // input options
376375   { NULL,                                           NULL,       OPTION_HEADER,     "INPUT DEVICE OPTIONS" },
377   { WINOPTION_GLOBAL_INPUTS ";global_inputs",       "0",        OPTION_BOOLEAN,    "enable global inputs" },
378   { WINOPTION_DUAL_LIGHTGUN ";dual",                "0",        OPTION_BOOLEAN,    "enable dual lightgun input" },
376   { WINOPTION_GLOBAL_INPUTS ";global_inputs",       "0",        OPTION_BOOLEAN,    "enables global inputs" },
377   { WINOPTION_DUAL_LIGHTGUN ";dual",                "0",        OPTION_BOOLEAN,    "enables dual lightgun input" },
379378
380379   { NULL }
381380};
trunk/src/osd/windows/winmain.h
r250286r250287
3333#define WINOPTION_HLSLPATH                  "hlslpath"
3434#define WINOPTION_HLSL_PRESCALE_X           "hlsl_prescale_x"
3535#define WINOPTION_HLSL_PRESCALE_Y           "hlsl_prescale_y"
36#define WINOPTION_HLSL_PRESET               "hlsl_preset"
3736#define WINOPTION_HLSL_WRITE                "hlsl_write"
3837#define WINOPTION_HLSL_SNAP_WIDTH           "hlsl_snap_width"
3938#define WINOPTION_HLSL_SNAP_HEIGHT          "hlsl_snap_height"
r250286r250287
137136   const char *d3d_hlsl_write() const { return value(WINOPTION_HLSL_WRITE); }
138137   int d3d_hlsl_prescale_x() const { return int_value(WINOPTION_HLSL_PRESCALE_X); }
139138   int d3d_hlsl_prescale_y() const { return int_value(WINOPTION_HLSL_PRESCALE_Y); }
140   int d3d_hlsl_preset() const { return int_value(WINOPTION_HLSL_PRESET); }
141139   int d3d_snap_width() const { return int_value(WINOPTION_HLSL_SNAP_WIDTH); }
142140   int d3d_snap_height() const { return int_value(WINOPTION_HLSL_SNAP_HEIGHT); }
143141   float screen_shadow_mask_alpha() const { return float_value(WINOPTION_SHADOW_MASK_ALPHA); }


Previous 199869 Revisions Next


© 1997-2024 The MAME Team