mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
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
This commit is contained in:
parent
2a3bd8b8d0
commit
b06d506fd5
@ -10,10 +10,9 @@ yiq_enable 0/1 Enables YIQ-colorspace post-processing.
|
||||
hlslpath [path] Path to the .fx files that are in use. (default: hlsl)
|
||||
hlsl_prescale_x [horizontal] HLSL pre-scale override factor for X. (0 for auto)
|
||||
hlsl_prescale_y [vertical] HLSL pre-scale override factor for Y. (0 for auto)
|
||||
hlsl_preset -1 through 3 HLSL preset to use. (default: -1)
|
||||
hlsl_write [filename] Enable HLSL AVI writing. (huge disk bandwidth suggested)
|
||||
hlsl_write [filename] Enables HLSL AVI writing. (huge disk bandwidth suggested)
|
||||
hlsl_snap_width [width] HLSL upscaled-snapshot width. (default: 2048)
|
||||
hlsl_snap_height [height] HLSL upscaled-snapshot height. (default: 1536)
|
||||
hlsl_snap_height [height] HLSL upscaled-snapshot height. (default: 1536)
|
||||
|
||||
|
||||
Surface/Color Processing Parameters
|
||||
@ -22,12 +21,17 @@ Surface/Color Processing Parameters
|
||||
Name Values Description
|
||||
shadow_mask_alpha 0.0 to 1.0 The ovearll darkness of each shadow mask pixel.
|
||||
shadow_mask_texture [filename] A PNG that defines the shadow mask for each pixel.
|
||||
shadow_mask_x_count 1+ The count of shadow mask elements, X (usually 640-ish).
|
||||
shadow_mask_y_count 1+ The count of shadow mask elements, Y (usually 480-ish).
|
||||
shadow_mask_usize 0.0 to 1.0 These parameters define the *in-use* pixel count on the
|
||||
shadow_mask_vsize 0.0 to 1.0 X and Y axes of the shadow mask texture.
|
||||
curvature 0.0 to 1.0 Screen curvature. Affects borders and shadow mask.
|
||||
pincushion 0.0 to 1.0 Image curvature. Affects the source image only.
|
||||
shadow_mask_x_count 1+ The number of pixels one shadow mask tile uses on screen.
|
||||
shadow_mask_y_count 1+ This stretches the shadow mask tiles on X and Y axis.
|
||||
shadow_mask_usize 0.0 to 1.0 The size of one shadow mask tile in U/V coordinate.
|
||||
shadow_mask_vsize 0.0 to 1.0 The shadow mask textures always has a size of power-of-two.
|
||||
shadow_mask_voffset -1.0 to 1.0 The offset of the shadow mask texture in U/V coordinates.
|
||||
shadow_mask_voffset -1.0 to 1.0 An offset of 1.0 repressents one pixel on screen.
|
||||
curvature 0.0 to 1.0 Curvature amount of the screen.
|
||||
round_corner 0.0 to 1.0 Rounded corners amount of the screen.
|
||||
smooth_border 0.0 to 1.0 Smooth borders amount of the screen.
|
||||
reflection 0.0 to 1.0 Refelection amount of the screen highlight.
|
||||
vignetting 0.0 to 1.0 Vignetting amount of the image.
|
||||
scanline_alpha 0.0 to 1.0 The overall darkness of each scanline furrow.
|
||||
scanline_size 0.0 to 4.0 The overall height of each scanline.
|
||||
scanline_height [height] Individual height scaling value for scanlines.
|
||||
@ -97,8 +101,8 @@ vector_length_ratio 500.0 Vector fade length (4.0 - vectors fade t
|
||||
Bloom Post-Processing Options
|
||||
-----------------------------
|
||||
Name Default Values Description
|
||||
vector_bloom_scale 0.300 Intensity factor for vector bloom. (0.000-1.000)
|
||||
raster_bloom_scale 0.225 Intensity factor for raster bloom. (0.000-1.000)
|
||||
bloom_scale 0.500 Bloom intensity factor. (0.000-2.000)
|
||||
bloom_overdrive 0.00,0.00,0.00 Bloom overdrive factor to bright full saturated colors. (0.000-2.000)
|
||||
bloom_lvl0_weight 1.00 Bloom level 0 (full-size target) weight. (0.00-1.00)
|
||||
bloom_lvl1_weight 0.21 Bloom level 1 (half-size target) weight. (0.00-1.00)
|
||||
bloom_lvl2_weight 0.19 Bloom level 2 (quarter-size target) weight. (0.00-1.00)
|
||||
|
@ -54,116 +54,12 @@ static file_error open_next(d3d::renderer *d3d, emu_file &file, const char *temp
|
||||
|
||||
namespace d3d
|
||||
{
|
||||
hlsl_options shaders::s_hlsl_presets[4] =
|
||||
{
|
||||
{ // 25% Shadow mask, 50% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation
|
||||
true,
|
||||
0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f,
|
||||
0.03f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.5f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f,
|
||||
{ 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 1.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 1.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 1.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 1.0f, 1.0f, 1.0f },
|
||||
{ 0.9f, 0.9f, 0.9f },
|
||||
{ 0.05f,0.05f,0.05f},
|
||||
{ 0.25f,0.25f,0.25f},
|
||||
1.2f,
|
||||
false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
|
||||
0.9f, 4.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
|
||||
},
|
||||
{ // 25% Shadow mask, 0% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation
|
||||
true,
|
||||
0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f,
|
||||
0.03f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f,
|
||||
{ 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 1.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 1.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 1.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 1.0f, 1.0f, 1.0f },
|
||||
{ 0.9f, 0.9f, 0.9f },
|
||||
{ 0.05f,0.05f,0.05f},
|
||||
{ 0.25f,0.25f,0.25f},
|
||||
1.2f,
|
||||
false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
|
||||
0.9f, 4.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
|
||||
},
|
||||
{ // 25% Shadow mask, 0% Scanlines, 0% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation
|
||||
true,
|
||||
0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f,
|
||||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.0f,
|
||||
{ 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 1.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 1.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 1.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 1.0f, 1.0f, 1.0f },
|
||||
{ 0.9f, 0.9f, 0.9f },
|
||||
{ 0.05f,0.05f,0.05f},
|
||||
{ 0.25f,0.25f,0.25f},
|
||||
1.2f,
|
||||
false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
|
||||
0.9f, 4.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
|
||||
},
|
||||
{ // 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
|
||||
true,
|
||||
0.25f, { "adapture-grill.png" }, 6, 6, 0.1875f, 0.1875f, 0.0f, 0.0f,
|
||||
0.15f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
1.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.5f,
|
||||
{ 3.0f, 3.0f },
|
||||
{ 0.5f,-0.33f,0.7f },
|
||||
{ 0.0f,-1.0f, 0.5f },
|
||||
{ 0.0f, 0.2f, 0.3f },
|
||||
{ 0.0f, 0.2f, 0.0f },
|
||||
{ 0.8f, 0.2f, 0.0f },
|
||||
{ 0.0f, 0.8f, 0.2f},
|
||||
{ 0.2f, 0.0f, 0.8f},
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 1.0f, 1.0f, 1.0f },
|
||||
{ 1.5f, 1.5f, 1.5f },
|
||||
{ 0.05f,0.05f,0.05f},
|
||||
{ 0.7f, 0.7f, 0.7f},
|
||||
0.8f,
|
||||
false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0,
|
||||
0.9f, 4.0f,
|
||||
1.0f,
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
//============================================================
|
||||
// PROTOTYPES
|
||||
//============================================================
|
||||
|
||||
static void get_vector(const char *data, int count, float *out, int report_error);
|
||||
static void get_vector(const char *data, int count, float *out, bool report_error);
|
||||
|
||||
|
||||
//============================================================
|
||||
@ -201,7 +97,6 @@ shaders::shaders()
|
||||
|
||||
shaders::~shaders()
|
||||
{
|
||||
global_free(options);
|
||||
cache_target *currcache = cachehead;
|
||||
while(cachehead != NULL)
|
||||
{
|
||||
@ -751,6 +646,7 @@ void shaders::init(base *d3dintf, running_machine *machine, d3d::renderer *rende
|
||||
this->d3dintf = d3dintf;
|
||||
this->machine = machine;
|
||||
this->d3d = renderer;
|
||||
this->options = renderer->get_shaders_options();
|
||||
|
||||
windows_options &winoptions = downcast<windows_options &>(machine->options());
|
||||
|
||||
@ -759,20 +655,10 @@ void shaders::init(base *d3dintf, running_machine *machine, d3d::renderer *rende
|
||||
hlsl_prescale_y = winoptions.d3d_hlsl_prescale_y();
|
||||
snap_width = winoptions.d3d_snap_width();
|
||||
snap_height = winoptions.d3d_snap_height();
|
||||
preset = winoptions.d3d_hlsl_preset();
|
||||
|
||||
if (preset < -1 || preset > 3)
|
||||
{
|
||||
preset = -1;
|
||||
}
|
||||
|
||||
options = (hlsl_options*)global_alloc_clear(hlsl_options);
|
||||
|
||||
// unsafe
|
||||
strcpy(options->shadow_mask_texture, winoptions.screen_shadow_mask_texture());
|
||||
|
||||
if (preset == -1)
|
||||
if (!options->params_init)
|
||||
{
|
||||
strncpy(options->shadow_mask_texture, winoptions.screen_shadow_mask_texture(), sizeof(options->shadow_mask_texture));
|
||||
options->shadow_mask_alpha = winoptions.screen_shadow_mask_alpha();
|
||||
options->shadow_mask_count_x = winoptions.screen_shadow_mask_count_x();
|
||||
options->shadow_mask_count_y = winoptions.screen_shadow_mask_count_y();
|
||||
@ -805,39 +691,36 @@ void shaders::init(base *d3dintf, running_machine *machine, d3d::renderer *rende
|
||||
get_vector(winoptions.screen_floor(), 3, options->floor, TRUE);
|
||||
get_vector(winoptions.screen_phosphor(), 3, options->phosphor, TRUE);
|
||||
options->saturation = winoptions.screen_saturation();
|
||||
}
|
||||
else
|
||||
{
|
||||
options = &s_hlsl_presets[preset];
|
||||
}
|
||||
options->yiq_enable = winoptions.screen_yiq_enable();
|
||||
options->yiq_cc = winoptions.screen_yiq_cc();
|
||||
options->yiq_a = winoptions.screen_yiq_a();
|
||||
options->yiq_b = winoptions.screen_yiq_b();
|
||||
options->yiq_o = winoptions.screen_yiq_o();
|
||||
options->yiq_p = winoptions.screen_yiq_p();
|
||||
options->yiq_n = winoptions.screen_yiq_n();
|
||||
options->yiq_y = winoptions.screen_yiq_y();
|
||||
options->yiq_i = winoptions.screen_yiq_i();
|
||||
options->yiq_q = winoptions.screen_yiq_q();
|
||||
options->yiq_scan_time = winoptions.screen_yiq_scan_time();
|
||||
options->yiq_phase_count = winoptions.screen_yiq_phase_count();
|
||||
options->vector_length_scale = winoptions.screen_vector_length_scale();
|
||||
options->vector_length_ratio = winoptions.screen_vector_length_ratio();
|
||||
options->bloom_scale = winoptions.screen_bloom_scale();
|
||||
get_vector(winoptions.screen_bloom_overdrive(), 3, options->bloom_overdrive, TRUE);
|
||||
options->bloom_level0_weight = winoptions.screen_bloom_lvl0_weight();
|
||||
options->bloom_level1_weight = winoptions.screen_bloom_lvl1_weight();
|
||||
options->bloom_level2_weight = winoptions.screen_bloom_lvl2_weight();
|
||||
options->bloom_level3_weight = winoptions.screen_bloom_lvl3_weight();
|
||||
options->bloom_level4_weight = winoptions.screen_bloom_lvl4_weight();
|
||||
options->bloom_level5_weight = winoptions.screen_bloom_lvl5_weight();
|
||||
options->bloom_level6_weight = winoptions.screen_bloom_lvl6_weight();
|
||||
options->bloom_level7_weight = winoptions.screen_bloom_lvl7_weight();
|
||||
options->bloom_level8_weight = winoptions.screen_bloom_lvl8_weight();
|
||||
options->bloom_level9_weight = winoptions.screen_bloom_lvl9_weight();
|
||||
options->bloom_level10_weight = winoptions.screen_bloom_lvl10_weight();
|
||||
|
||||
options->yiq_enable = winoptions.screen_yiq_enable();
|
||||
options->yiq_cc = winoptions.screen_yiq_cc();
|
||||
options->yiq_a = winoptions.screen_yiq_a();
|
||||
options->yiq_b = winoptions.screen_yiq_b();
|
||||
options->yiq_o = winoptions.screen_yiq_o();
|
||||
options->yiq_p = winoptions.screen_yiq_p();
|
||||
options->yiq_n = winoptions.screen_yiq_n();
|
||||
options->yiq_y = winoptions.screen_yiq_y();
|
||||
options->yiq_i = winoptions.screen_yiq_i();
|
||||
options->yiq_q = winoptions.screen_yiq_q();
|
||||
options->yiq_scan_time = winoptions.screen_yiq_scan_time();
|
||||
options->yiq_phase_count = winoptions.screen_yiq_phase_count();
|
||||
options->vector_length_scale = winoptions.screen_vector_length_scale();
|
||||
options->vector_length_ratio = winoptions.screen_vector_length_ratio();
|
||||
options->bloom_scale = winoptions.screen_bloom_scale();
|
||||
get_vector(winoptions.screen_bloom_overdrive(), 3, options->bloom_overdrive, TRUE);
|
||||
options->bloom_level0_weight = winoptions.screen_bloom_lvl0_weight();
|
||||
options->bloom_level1_weight = winoptions.screen_bloom_lvl1_weight();
|
||||
options->bloom_level2_weight = winoptions.screen_bloom_lvl2_weight();
|
||||
options->bloom_level3_weight = winoptions.screen_bloom_lvl3_weight();
|
||||
options->bloom_level4_weight = winoptions.screen_bloom_lvl4_weight();
|
||||
options->bloom_level5_weight = winoptions.screen_bloom_lvl5_weight();
|
||||
options->bloom_level6_weight = winoptions.screen_bloom_lvl6_weight();
|
||||
options->bloom_level7_weight = winoptions.screen_bloom_lvl7_weight();
|
||||
options->bloom_level8_weight = winoptions.screen_bloom_lvl8_weight();
|
||||
options->bloom_level9_weight = winoptions.screen_bloom_lvl9_weight();
|
||||
options->bloom_level10_weight = winoptions.screen_bloom_lvl10_weight();
|
||||
options->params_init = true;
|
||||
}
|
||||
|
||||
options->params_dirty = true;
|
||||
|
||||
@ -2104,6 +1987,8 @@ void shaders::delete_resources(bool reset)
|
||||
|
||||
initialized = false;
|
||||
|
||||
options = NULL;
|
||||
|
||||
cache_target *currcache = cachehead;
|
||||
while(cachehead != NULL)
|
||||
{
|
||||
@ -2235,7 +2120,7 @@ void shaders::delete_resources(bool reset)
|
||||
// get_vector
|
||||
//============================================================
|
||||
|
||||
static void get_vector(const char *data, int count, float *out, int report_error)
|
||||
static void get_vector(const char *data, int count, float *out, bool report_error)
|
||||
{
|
||||
if (count > 3 &&
|
||||
sscanf(data, "%f,%f,%f,%f", &out[0], &out[1], &out[2], &out[3]) < 4 && report_error)
|
||||
|
@ -184,6 +184,7 @@ class renderer;
|
||||
/* in the future this will be moved into an OSD/emu shared buffer */
|
||||
struct hlsl_options
|
||||
{
|
||||
bool params_init;
|
||||
bool params_dirty;
|
||||
float shadow_mask_alpha;
|
||||
char shadow_mask_texture[1024];
|
||||
@ -376,7 +377,7 @@ private:
|
||||
int preset; // preset, if relevant
|
||||
bitmap_argb32 shadow_bitmap; // shadow mask bitmap for post-processing shader
|
||||
texture_info * shadow_texture; // shadow mask texture for post-processing shader
|
||||
hlsl_options * options; // current uniform state
|
||||
hlsl_options * options; // current options
|
||||
D3DPRIMITIVETYPE vecbuf_type;
|
||||
UINT32 vecbuf_index;
|
||||
UINT32 vecbuf_count;
|
||||
@ -427,13 +428,10 @@ private:
|
||||
texture_info * curr_texture;
|
||||
render_target * curr_render_target;
|
||||
poly_info * curr_poly;
|
||||
|
||||
public:
|
||||
render_target * targethead;
|
||||
cache_target * cachehead;
|
||||
|
||||
static slider_desc s_sliders[];
|
||||
static hlsl_options s_hlsl_presets[4];
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -808,7 +808,15 @@ int renderer::device_create(HWND device_hwnd)
|
||||
{
|
||||
// if a device exists, free it
|
||||
if (m_device != NULL)
|
||||
{
|
||||
device_delete();
|
||||
}
|
||||
|
||||
// create shader options only once
|
||||
if (m_shaders_options == NULL)
|
||||
{
|
||||
m_shaders_options = (hlsl_options*)global_alloc_clear(hlsl_options);
|
||||
}
|
||||
|
||||
// verify the caps
|
||||
int verify = device_verify_caps();
|
||||
@ -818,7 +826,9 @@ int renderer::device_create(HWND device_hwnd)
|
||||
return 1;
|
||||
}
|
||||
if (verify == 1)
|
||||
{
|
||||
osd_printf_warning("Warning: Device may not perform well for Direct3D rendering\n");
|
||||
}
|
||||
|
||||
// verify texture formats
|
||||
HRESULT result = (*d3dintf->d3d.check_device_format)(d3dintf, m_adapter, D3DDEVTYPE_HAL, m_pixformat, 0, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8);
|
||||
@ -999,6 +1009,12 @@ int renderer::device_create_resources()
|
||||
|
||||
renderer::~renderer()
|
||||
{
|
||||
if (m_shaders_options != NULL)
|
||||
{
|
||||
global_free(m_shaders_options);
|
||||
}
|
||||
m_shaders_options = NULL;
|
||||
|
||||
device_delete();
|
||||
}
|
||||
|
||||
@ -1055,8 +1071,7 @@ int renderer::device_verify_caps()
|
||||
{
|
||||
int retval = 0;
|
||||
|
||||
m_shaders = global_alloc_clear(shaders);
|
||||
// FIXME: Dynamic cast
|
||||
m_shaders = (shaders*)global_alloc_clear(shaders);
|
||||
m_shaders->init(d3dintf, &window().machine(), this);
|
||||
|
||||
DWORD tempcaps;
|
||||
|
@ -178,6 +178,7 @@ public:
|
||||
texture_info * get_vector_texture() { return m_texture_manager->get_vector_texture(); }
|
||||
|
||||
shaders * get_shaders() { return m_shaders; }
|
||||
hlsl_options * get_shaders_options() { return m_shaders_options; }
|
||||
|
||||
private:
|
||||
int m_adapter; // ordinal adapter number
|
||||
@ -220,6 +221,7 @@ private:
|
||||
|
||||
void * m_hlsl_buf; // HLSL vertex data
|
||||
shaders * m_shaders; // HLSL interface
|
||||
hlsl_options * m_shaders_options; // HLSL options
|
||||
|
||||
texture_manager * m_texture_manager; // texture manager
|
||||
|
||||
|
@ -274,34 +274,33 @@ const options_entry windows_options::s_option_entries[] =
|
||||
// performance options
|
||||
{ NULL, NULL, OPTION_HEADER, "WINDOWS PERFORMANCE OPTIONS" },
|
||||
{ WINOPTION_PRIORITY "(-15-1)", "0", OPTION_INTEGER, "thread priority for the main game thread; range from -15 to 1" },
|
||||
{ WINOPTION_PROFILE, "0", OPTION_INTEGER, "enable profiling, specifying the stack depth to track" },
|
||||
{ WINOPTION_PROFILE, "0", OPTION_INTEGER, "enables profiling, specifying the stack depth to track" },
|
||||
|
||||
// video options
|
||||
{ NULL, NULL, OPTION_HEADER, "WINDOWS VIDEO OPTIONS" },
|
||||
{ WINOPTION_MENU, "0", OPTION_BOOLEAN, "enable menu bar if available by UI implementation" },
|
||||
{ WINOPTION_MENU, "0", OPTION_BOOLEAN, "enables menu bar if available by UI implementation" },
|
||||
|
||||
// DirectDraw-specific options
|
||||
{ NULL, NULL, OPTION_HEADER, "DIRECTDRAW-SPECIFIC OPTIONS" },
|
||||
{ WINOPTION_HWSTRETCH ";hws", "1", OPTION_BOOLEAN, "enable hardware stretching" },
|
||||
{ WINOPTION_HWSTRETCH ";hws", "1", OPTION_BOOLEAN, "enables hardware stretching" },
|
||||
|
||||
// post-processing options
|
||||
{ NULL, NULL, OPTION_HEADER, "DIRECT3D POST-PROCESSING OPTIONS" },
|
||||
{ WINOPTION_HLSL_ENABLE";hlsl", "0", OPTION_BOOLEAN, "enable HLSL post-processing (PS3.0 required)" },
|
||||
{ WINOPTION_HLSL_ENABLE";hlsl", "0", OPTION_BOOLEAN, "enables HLSL post-processing (PS3.0 required)" },
|
||||
{ WINOPTION_HLSLPATH, "hlsl", OPTION_STRING, "path to hlsl files" },
|
||||
{ WINOPTION_HLSL_PRESCALE_X, "0", OPTION_INTEGER, "HLSL pre-scale override factor for X (0 for auto)" },
|
||||
{ WINOPTION_HLSL_PRESCALE_Y, "0", OPTION_INTEGER, "HLSL pre-scale override factor for Y (0 for auto)" },
|
||||
{ WINOPTION_HLSL_PRESET";(-1-3)", "-1", OPTION_INTEGER, "HLSL preset to use (0-3)" },
|
||||
{ WINOPTION_HLSL_WRITE, NULL, OPTION_STRING, "enable HLSL AVI writing (huge disk bandwidth suggested)" },
|
||||
{ WINOPTION_HLSL_WRITE, NULL, OPTION_STRING, "enables HLSL AVI writing (huge disk bandwidth suggested)" },
|
||||
{ WINOPTION_HLSL_SNAP_WIDTH, "2048", OPTION_STRING, "HLSL upscaled-snapshot width" },
|
||||
{ WINOPTION_HLSL_SNAP_HEIGHT, "1536", OPTION_STRING, "HLSL upscaled-snapshot height" },
|
||||
{ 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)" },
|
||||
{ WINOPTION_SHADOW_MASK_TEXTURE";fs_shadwt(0.0-1.0)", "aperture.png", OPTION_STRING, "shadow mask texture name" },
|
||||
{ WINOPTION_SHADOW_MASK_COUNT_X";fs_shadww", "6", OPTION_INTEGER, "shadow mask width, in phosphor dots" },
|
||||
{ WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh", "6", OPTION_INTEGER, "shadow mask height, in phosphor dots" },
|
||||
{ WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture size in U direction" },
|
||||
{ WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture size in V direction" },
|
||||
{ WINOPTION_SHADOW_MASK_UOFFSET";fs_shadwou(-1.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask texture offset in U direction" },
|
||||
{ WINOPTION_SHADOW_MASK_VOFFSET";fs_shadwov(-1.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask texture offset in V direction" },
|
||||
{ WINOPTION_SHADOW_MASK_COUNT_X";fs_shadww", "6", OPTION_INTEGER, "shadow mask tile width, in screen dimensions" },
|
||||
{ WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh", "6", OPTION_INTEGER, "shadow mask tile height, in screen dimensions" },
|
||||
{ WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture width, in U/V dimensions" },
|
||||
{ WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture height, in U/V dimensions" },
|
||||
{ WINOPTION_SHADOW_MASK_UOFFSET";fs_shadwou(-1.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask texture offset, in U direction" },
|
||||
{ WINOPTION_SHADOW_MASK_VOFFSET";fs_shadwov(-1.0-1.0)", "0.0", OPTION_FLOAT, "shadow mask texture offset, in V direction" },
|
||||
{ WINOPTION_CURVATURE";fs_curv(0.0-1.0)", "0.0", OPTION_FLOAT, "screen curvature amount" },
|
||||
{ WINOPTION_ROUND_CORNER";fs_rndc(0.0-1.0)", "0.0", OPTION_FLOAT, "screen round corner amount" },
|
||||
{ WINOPTION_SMOOTH_BORDER";fs_smob(0.0-1.0)", "0.0", OPTION_FLOAT, "screen smooth border amount" },
|
||||
@ -331,7 +330,7 @@ const options_entry windows_options::s_option_entries[] =
|
||||
{ WINOPTION_PHOSPHOR";fs_phosphor", "0.4,0.4,0.4",OPTION_STRING, "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" },
|
||||
/* NTSC simulation below this line */
|
||||
{ NULL, NULL, OPTION_HEADER, "NTSC POST-PROCESSING OPTIONS" },
|
||||
{ WINOPTION_YIQ_ENABLE";yiq", "0", OPTION_BOOLEAN, "enable YIQ-space HLSL post-processing" },
|
||||
{ WINOPTION_YIQ_ENABLE";yiq", "0", OPTION_BOOLEAN, "enables YIQ-space HLSL post-processing" },
|
||||
{ WINOPTION_YIQ_CCVALUE";yiqcc", "3.59754545",OPTION_FLOAT, "Color Carrier frequency for NTSC signal processing" },
|
||||
{ WINOPTION_YIQ_AVALUE";yiqa", "0.5", OPTION_FLOAT, "A value for NTSC signal processing" },
|
||||
{ WINOPTION_YIQ_BVALUE";yiqb", "0.5", OPTION_FLOAT, "B value for NTSC signal processing" },
|
||||
@ -367,15 +366,15 @@ const options_entry windows_options::s_option_entries[] =
|
||||
|
||||
// full screen options
|
||||
{ NULL, NULL, OPTION_HEADER, "FULL SCREEN OPTIONS" },
|
||||
{ WINOPTION_TRIPLEBUFFER ";tb", "0", OPTION_BOOLEAN, "enable triple buffering" },
|
||||
{ WINOPTION_TRIPLEBUFFER ";tb", "0", OPTION_BOOLEAN, "enables triple buffering" },
|
||||
{ WINOPTION_FULLSCREENBRIGHTNESS ";fsb(0.1-2.0)", "1.0", OPTION_FLOAT, "brightness value in full screen mode" },
|
||||
{ WINOPTION_FULLSCREENCONTRAST ";fsc(0.1-2.0)", "1.0", OPTION_FLOAT, "contrast value in full screen mode" },
|
||||
{ WINOPTION_FULLSCREENGAMMA ";fsg(0.1-3.0)", "1.0", OPTION_FLOAT, "gamma value in full screen mode" },
|
||||
|
||||
// input options
|
||||
{ NULL, NULL, OPTION_HEADER, "INPUT DEVICE OPTIONS" },
|
||||
{ WINOPTION_GLOBAL_INPUTS ";global_inputs", "0", OPTION_BOOLEAN, "enable global inputs" },
|
||||
{ WINOPTION_DUAL_LIGHTGUN ";dual", "0", OPTION_BOOLEAN, "enable dual lightgun input" },
|
||||
{ WINOPTION_GLOBAL_INPUTS ";global_inputs", "0", OPTION_BOOLEAN, "enables global inputs" },
|
||||
{ WINOPTION_DUAL_LIGHTGUN ";dual", "0", OPTION_BOOLEAN, "enables dual lightgun input" },
|
||||
|
||||
{ NULL }
|
||||
};
|
||||
|
@ -33,7 +33,6 @@
|
||||
#define WINOPTION_HLSLPATH "hlslpath"
|
||||
#define WINOPTION_HLSL_PRESCALE_X "hlsl_prescale_x"
|
||||
#define WINOPTION_HLSL_PRESCALE_Y "hlsl_prescale_y"
|
||||
#define WINOPTION_HLSL_PRESET "hlsl_preset"
|
||||
#define WINOPTION_HLSL_WRITE "hlsl_write"
|
||||
#define WINOPTION_HLSL_SNAP_WIDTH "hlsl_snap_width"
|
||||
#define WINOPTION_HLSL_SNAP_HEIGHT "hlsl_snap_height"
|
||||
@ -137,7 +136,6 @@ public:
|
||||
const char *d3d_hlsl_write() const { return value(WINOPTION_HLSL_WRITE); }
|
||||
int d3d_hlsl_prescale_x() const { return int_value(WINOPTION_HLSL_PRESCALE_X); }
|
||||
int d3d_hlsl_prescale_y() const { return int_value(WINOPTION_HLSL_PRESCALE_Y); }
|
||||
int d3d_hlsl_preset() const { return int_value(WINOPTION_HLSL_PRESET); }
|
||||
int d3d_snap_width() const { return int_value(WINOPTION_HLSL_SNAP_WIDTH); }
|
||||
int d3d_snap_height() const { return int_value(WINOPTION_HLSL_SNAP_HEIGHT); }
|
||||
float screen_shadow_mask_alpha() const { return float_value(WINOPTION_SHADOW_MASK_ALPHA); }
|
||||
|
Loading…
Reference in New Issue
Block a user