mirror of
https://github.com/holub/mame
synced 2025-07-02 00:29:37 +03:00
- Added better .ini defaults for HLSL, and hooked up bloom sliders. [MooglyGuy]
(nw) "Tell that Dave to be cool! Say 'Dave be cool'! Tell that Dave to chill! Chill that Dave out!!"
This commit is contained in:
parent
ce42f1b9e2
commit
bb629f90d3
@ -88,6 +88,7 @@ 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
|
||||
@ -110,7 +111,7 @@ hlsl_options shaders::s_hlsl_presets[4] =
|
||||
{ 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.0f, 0.1f, 0.9f, 4.0f,
|
||||
0.9f, 4.0f,
|
||||
1.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
|
||||
@ -133,7 +134,7 @@ hlsl_options shaders::s_hlsl_presets[4] =
|
||||
{ 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.0f, 0.1f, 0.9f, 4.0f,
|
||||
0.9f, 4.0f,
|
||||
1.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
|
||||
@ -156,7 +157,7 @@ hlsl_options shaders::s_hlsl_presets[4] =
|
||||
{ 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.0f, 0.1f, 0.9f, 4.0f,
|
||||
0.9f, 4.0f,
|
||||
1.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
|
||||
@ -179,7 +180,7 @@ hlsl_options shaders::s_hlsl_presets[4] =
|
||||
{ 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.0f, 0.1f, 0.9f, 4.0f,
|
||||
0.9f, 4.0f,
|
||||
1.0f, 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f
|
||||
},
|
||||
};
|
||||
@ -928,12 +929,6 @@ void shaders::init(base *d3dintf, win_window_info *window)
|
||||
ini_file.gets(buf, 1024);
|
||||
sscanf(buf, "yiq_phase_count %d\n", &options->yiq_phase_count);
|
||||
|
||||
ini_file.gets(buf, 1024);
|
||||
sscanf(buf, "vector_time_scale %f\n", &options->vector_time_scale);
|
||||
|
||||
ini_file.gets(buf, 1024);
|
||||
sscanf(buf, "vector_time_period %f\n", &options->vector_time_period);
|
||||
|
||||
ini_file.gets(buf, 1024);
|
||||
sscanf(buf, "vector_length_scale %f\n", &options->vector_length_scale);
|
||||
|
||||
@ -993,8 +988,6 @@ void shaders::init(base *d3dintf, win_window_info *window)
|
||||
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_time_scale = winoptions.screen_vector_time_scale();
|
||||
options->vector_time_period = winoptions.screen_vector_time_period();
|
||||
options->vector_length_scale = winoptions.screen_vector_length_scale();
|
||||
options->vector_length_ratio = winoptions.screen_vector_length_ratio();
|
||||
options->vector_bloom_scale = winoptions.screen_vector_bloom_scale();
|
||||
@ -2217,7 +2210,7 @@ void shaders::render_quad(poly_info *poly, int vertnum)
|
||||
(*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->get_height());
|
||||
}
|
||||
|
||||
float time_params[2] = { poly->get_line_time(), options->vector_time_scale };
|
||||
float time_params[2] = { 0.0f, 0.0f };
|
||||
float length_params[3] = { poly->get_line_length(), options->vector_length_scale, options->vector_length_ratio };
|
||||
(*d3dintf->effect.set_vector)(curr_effect, "TimeParams", 2, time_params);
|
||||
(*d3dintf->effect.set_vector)(curr_effect, "LengthParams", 3, length_params);
|
||||
@ -2735,8 +2728,6 @@ void shaders::delete_resources(bool reset)
|
||||
file.printf("yiq_q %f\n", options->yiq_q);
|
||||
file.printf("yiq_scan_time %f\n", options->yiq_scan_time);
|
||||
file.printf("yiq_phase_count %d\n", options->yiq_phase_count);
|
||||
file.printf("vector_time_scale %f\n", options->vector_time_scale);
|
||||
file.printf("vector_time_period %f\n", options->vector_time_period);
|
||||
file.printf("vector_length_scale %f\n", options->vector_length_scale);
|
||||
file.printf("vector_length_ratio %f\n", options->vector_length_ratio);
|
||||
}
|
||||
@ -3001,18 +2992,6 @@ static INT32 slider_defocus_y(running_machine &machine, void *arg, astring *stri
|
||||
return slider_set(&(((hlsl_options*)arg)->defocus[1]), 0.5f, "%2.1f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_post_defocus_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->defocus[2]), 0.5f, "%2.1f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_post_defocus_y(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->defocus[3]), 0.5f, "%2.1f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_converge_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
@ -3235,10 +3214,175 @@ static INT32 slider_saturation(running_machine &machine, void *arg, astring *str
|
||||
return slider_set(&(((hlsl_options*)arg)->saturation), 0.01f, "%2.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_vector_attenuation(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_length_scale), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_vector_length_max(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_length_ratio), 1.0f, "%4f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_vector_bloom_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_bloom_scale), 0.001f, "%1.3f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_raster_bloom_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->raster_bloom_scale), 0.001f, "%1.3f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl0_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level0_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl1_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level1_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl2_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level2_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl3_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level3_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl4_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level4_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl5_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level5_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl6_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level6_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl7_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level7_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl8_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level8_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl9_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level9_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl10_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level10_weight), 0.01f, "%1.2f", string, newval);
|
||||
}
|
||||
|
||||
//============================================================
|
||||
// init_slider_list
|
||||
//============================================================
|
||||
|
||||
shaders::slider_desc shaders::s_sliders[] =
|
||||
{
|
||||
{ "Shadow Mask Darkness", 0, 0, 100, 1, slider_shadow_mask_alpha },
|
||||
{ "Shadow Mask X Count", 1, 320, 1024, 1, slider_shadow_mask_x_count },
|
||||
{ "Shadow Mask Y Count", 1, 240, 1024, 1, slider_shadow_mask_y_count },
|
||||
{ "Shadow Mask Pixel Count X", 1, 6, 64, 1, slider_shadow_mask_usize },
|
||||
{ "Shadow Mask Pixel Count Y", 1, 7, 64, 1, slider_shadow_mask_vsize },
|
||||
{ "Shadow Mask Pixel Count Y", 1, 7, 64, 1, slider_shadow_mask_vsize },
|
||||
{ "Shadow Mask Pixel Count Y", 1, 7, 64, 1, slider_shadow_mask_vsize },
|
||||
{ "Shadow Mask Pixel Count Y", 1, 7, 64, 1, slider_shadow_mask_vsize },
|
||||
{ "Screen Curvature", 0, 3, 100, 1, slider_curvature },
|
||||
{ "Image Pincushion", 0, 3, 100, 1, slider_pincushion },
|
||||
{ "Scanline Darkness", 0, 100, 100, 1, slider_scanline_alpha },
|
||||
{ "Scanline Screen Height", 1, 20, 80, 1, slider_scanline_scale },
|
||||
{ "Scanline Indiv. Height", 1, 20, 80, 1, slider_scanline_height },
|
||||
{ "Scanline Brightness", 0, 20, 40, 1, slider_scanline_bright_scale },
|
||||
{ "Scanline Brightness Overdrive", 0, 0, 20, 1, slider_scanline_bright_offset },
|
||||
{ "Scanline Jitter", 0, 0, 40, 1, slider_scanline_offset },
|
||||
{ "Defocus X", 0, 0, 64, 1, slider_defocus_x },
|
||||
{ "Defocus Y", 0, 0, 64, 1, slider_defocus_y },
|
||||
{ "Red Position Offset X", -1500, 3, 1500, 1, slider_red_converge_x },
|
||||
{ "Red Position Offset Y", -1500, 0, 1500, 1, slider_red_converge_y },
|
||||
{ "Green Position Offset X", -1500, 0, 1500, 1, slider_green_converge_x },
|
||||
{ "Green Position Offset Y", -1500, 3, 1500, 1, slider_green_converge_y },
|
||||
{ "Blue Position Offset X", -1500, 3, 1500, 1, slider_blue_converge_x },
|
||||
{ "Blue Position Offset Y", -1500, 3, 1500, 1, slider_blue_converge_y },
|
||||
{ "Red Convergence X", -1500, 0, 1500, 1, slider_red_radial_converge_x },
|
||||
{ "Red Convergence Y", -1500, 0, 1500, 1, slider_red_radial_converge_y },
|
||||
{ "Green Convergence X", -1500, 0, 1500, 1, slider_green_radial_converge_x },
|
||||
{ "Green Convergence Y", -1500, 0, 1500, 1, slider_green_radial_converge_y },
|
||||
{ "Blue Convergence X", -1500, 0, 1500, 1, slider_blue_radial_converge_x },
|
||||
{ "Blue Convergence Y", -1500, 0, 1500, 1, slider_blue_radial_converge_y },
|
||||
{ "Red Output from Red Input", -400, 0, 400, 5, slider_red_from_r },
|
||||
{ "Red Output from Green Input", -400, 0, 400, 5, slider_red_from_g },
|
||||
{ "Red Output from Blue Input", -400, 0, 400, 5, slider_red_from_b },
|
||||
{ "Green Output from Red Input", -400, 0, 400, 5, slider_green_from_r },
|
||||
{ "Green Output from Green Input", -400, 0, 400, 5, slider_green_from_g },
|
||||
{ "Green Output from Blue Input", -400, 0, 400, 5, slider_green_from_b },
|
||||
{ "Blue Output from Red Input", -400, 0, 400, 5, slider_blue_from_r },
|
||||
{ "Blue Output from Green Input", -400, 0, 400, 5, slider_blue_from_g },
|
||||
{ "Blue Output from Blue Input", -400, 0, 400, 5, slider_blue_from_b },
|
||||
{ "Saturation", 0, 140, 400, 1, slider_saturation },
|
||||
{ "Red DC Offset", -100, 0, 100, 1, slider_red_offset },
|
||||
{ "Green DC Offset", -100, 0, 100, 1, slider_green_offset },
|
||||
{ "Blue DC Offset", -100, 0, 100, 1, slider_blue_offset },
|
||||
{ "Red Scale", -200, 95, 200, 1, slider_red_scale },
|
||||
{ "Green Scale", -200, 95, 200, 1, slider_green_scale },
|
||||
{ "Blue Scale", -200, 95, 200, 1, slider_blue_scale },
|
||||
{ "Red Gamma", -80, 16, 80, 1, slider_red_power },
|
||||
{ "Green Gamma", -80, 16, 80, 1, slider_green_power },
|
||||
{ "Blue Gamma", -80, 16, 80, 1, slider_blue_power },
|
||||
{ "Red Floor", 0, 5, 100, 1, slider_red_floor },
|
||||
{ "Green Floor", 0, 5, 100, 1, slider_green_floor },
|
||||
{ "Blue Floor", 0, 5, 100, 1, slider_blue_floor },
|
||||
{ "Red Phosphor Life", 0, 40, 100, 1, slider_red_phosphor_life },
|
||||
{ "Green Phosphor Life", 0, 40, 100, 1, slider_green_phosphor_life },
|
||||
{ "Blue Phosphor Life", 0, 40, 100, 1, slider_blue_phosphor_life },
|
||||
{ "Vector Length Attenuation", 0, 80, 100, 1, slider_vector_attenuation },
|
||||
{ "Vector Attenuation Length Limit", 1, 500, 1000, 1, slider_vector_length_max },
|
||||
{ "Vector Bloom Scale", 0, 300, 1000, 5, slider_vector_bloom_scale },
|
||||
{ "Raster Bloom Scale", 0, 225, 1000, 5, slider_raster_bloom_scale },
|
||||
{ "Bloom Level 0 Scale", 0, 100, 100, 1, slider_bloom_lvl0_scale },
|
||||
{ "Bloom Level 1 Scale", 0, 21, 100, 1, slider_bloom_lvl1_scale },
|
||||
{ "Bloom Level 2 Scale", 0, 19, 100, 1, slider_bloom_lvl2_scale },
|
||||
{ "Bloom Level 3 Scale", 0, 17, 100, 1, slider_bloom_lvl3_scale },
|
||||
{ "Bloom Level 4 Scale", 0, 15, 100, 1, slider_bloom_lvl4_scale },
|
||||
{ "Bloom Level 5 Scale", 0, 14, 100, 1, slider_bloom_lvl5_scale },
|
||||
{ "Bloom Level 6 Scale", 0, 13, 100, 1, slider_bloom_lvl6_scale },
|
||||
{ "Bloom Level 7 Scale", 0, 12, 100, 1, slider_bloom_lvl7_scale },
|
||||
{ "Bloom Level 8 Scale", 0, 11, 100, 1, slider_bloom_lvl8_scale },
|
||||
{ "Bloom Level 9 Scale", 0, 10, 100, 1, slider_bloom_lvl9_scale },
|
||||
{ "Bloom Level 10 Scale", 0, 9, 100, 1, slider_bloom_lvl10_scale },
|
||||
{ NULL, 0, 0, 0, 0, NULL },
|
||||
};
|
||||
|
||||
slider_state *shaders::init_slider_list()
|
||||
{
|
||||
if (!master_enable || !d3dintf->post_fx_available)
|
||||
@ -3249,62 +3393,13 @@ slider_state *shaders::init_slider_list()
|
||||
|
||||
slider_state *listhead = NULL;
|
||||
slider_state **tailptr = &listhead;
|
||||
astring string;
|
||||
|
||||
*tailptr = slider_alloc(window->machine(), "Shadow Mask Darkness", 0, 0, 100, 1, slider_shadow_mask_alpha, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Shadow Mask X Count", 1, 640, 1024, 1, slider_shadow_mask_x_count, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Shadow Mask Y Count", 1, 480, 1024, 1, slider_shadow_mask_y_count, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Shadow Mask Pixel Count X", 1, 3, 32, 1, slider_shadow_mask_usize, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Shadow Mask Pixel Count Y", 1, 3, 32, 1, slider_shadow_mask_vsize, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Screen Curvature", 0, 0, 100, 1, slider_curvature, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Image Pincushion", 0, 0, 100, 1, slider_pincushion, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Scanline Darkness", 0, 0, 100, 1, slider_scanline_alpha, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Scanline Screen Height", 1, 20, 80, 1, slider_scanline_scale, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Scanline Indiv. Height", 1, 10, 80, 1, slider_scanline_height, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Scanline Brightness", 0, 20, 40, 1, slider_scanline_bright_scale, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Scanline Brightness Overdrive", 0, 12, 20, 1, slider_scanline_bright_offset, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Scanline Jitter", 0, 0, 40, 1, slider_scanline_offset, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Defocus X", 0, 0, 64, 1, slider_defocus_x, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Defocus Y", 0, 0, 64, 1, slider_defocus_y, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Phosphor Defocus X", 0, 0, 64, 1, slider_post_defocus_x, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Phosphor Defocus Y", 0, 0, 64, 1, slider_post_defocus_y, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Position Offset X", -1500, 0, 1500, 1, slider_red_converge_x, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Position Offset Y", -1500, 0, 1500, 1, slider_red_converge_y, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Position Offset X", -1500, 0, 1500, 1, slider_green_converge_x, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Position Offset Y", -1500, 0, 1500, 1, slider_green_converge_y, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Position Offset X", -1500, 0, 1500, 1, slider_blue_converge_x, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Position Offset Y", -1500, 0, 1500, 1, slider_blue_converge_y, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Convergence X", -1500, 0, 1500, 1, slider_red_radial_converge_x, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Convergence Y", -1500, 0, 1500, 1, slider_red_radial_converge_y, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Convergence X", -1500, 0, 1500, 1, slider_green_radial_converge_x, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Convergence Y", -1500, 0, 1500, 1, slider_green_radial_converge_y, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Convergence X", -1500, 0, 1500, 1, slider_blue_radial_converge_x, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Convergence Y", -1500, 0, 1500, 1, slider_blue_radial_converge_y, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Output from Red Input", -400, 0, 400, 5, slider_red_from_r, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Output from Green Input", -400, 0, 400, 5, slider_red_from_g, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Output from Blue Input", -400, 0, 400, 5, slider_red_from_b, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Output from Red Input", -400, 0, 400, 5, slider_green_from_r, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Output from Green Input", -400, 0, 400, 5, slider_green_from_g, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Output from Blue Input", -400, 0, 400, 5, slider_green_from_b, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Output from Red Input", -400, 0, 400, 5, slider_blue_from_r, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Output from Green Input", -400, 0, 400, 5, slider_blue_from_g, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Output from Blue Input", -400, 0, 400, 5, slider_blue_from_b, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red DC Offset", -100, 0, 100, 1, slider_red_offset, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green DC Offset", -100, 0, 100, 1, slider_green_offset, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue DC Offset", -100, 0, 100, 1, slider_blue_offset, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Scale", -200, 100, 200, 1, slider_red_scale, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Scale", -200, 100, 200, 1, slider_green_scale, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Scale", -200, 100, 200, 1, slider_blue_scale, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Power", -80, 20, 80, 1, slider_red_power, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Power", -80, 20, 80, 1, slider_green_power, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Power", -80, 20, 80, 1, slider_blue_power, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Floor", 0, 0, 100, 1, slider_red_floor, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Floor", 0, 0, 100, 1, slider_green_floor, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Floor", 0, 0, 100, 1, slider_blue_floor, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Red Phosphor Life", 0, 0, 100, 1, slider_red_phosphor_life, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Green Phosphor Life", 0, 0, 100, 1, slider_green_phosphor_life, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Blue Phosphor Life", 0, 0, 100, 1, slider_blue_phosphor_life, (void*)options); tailptr = &(*tailptr)->next;
|
||||
*tailptr = slider_alloc(window->machine(), "Saturation", 0, 100, 400, 1, slider_saturation, (void*)options); tailptr = &(*tailptr)->next;
|
||||
for (int index = 0; s_sliders[index].name != NULL; index++)
|
||||
{
|
||||
slider_desc *slider = &s_sliders[index];
|
||||
*tailptr = slider_alloc(window->machine(), slider->name, slider->minval, slider->defval, slider->maxval, slider->step, slider->adjustor, (void*)options);
|
||||
tailptr = &(*tailptr)->next;
|
||||
}
|
||||
|
||||
return listhead;
|
||||
}
|
||||
|
@ -110,8 +110,6 @@ struct hlsl_options
|
||||
int yiq_phase_count;
|
||||
|
||||
// Vectors
|
||||
float vector_time_scale;
|
||||
float vector_time_period;
|
||||
float vector_length_scale;
|
||||
float vector_length_ratio;
|
||||
|
||||
@ -182,6 +180,16 @@ public:
|
||||
// slider-related functions
|
||||
slider_state *init_slider_list();
|
||||
|
||||
struct slider_desc
|
||||
{
|
||||
const char * name;
|
||||
int minval;
|
||||
int defval;
|
||||
int maxval;
|
||||
int step;
|
||||
INT32 (*adjustor)(running_machine &, void *, astring *, INT32);
|
||||
};
|
||||
|
||||
private:
|
||||
void blit(surface *dst, texture *src, surface *new_dst,
|
||||
D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count,
|
||||
@ -274,6 +282,7 @@ public:
|
||||
render_target * targethead;
|
||||
cache_target * cachehead;
|
||||
|
||||
static slider_desc s_sliders[];
|
||||
static hlsl_options s_hlsl_presets[4];
|
||||
};
|
||||
|
||||
|
@ -350,30 +350,30 @@ const options_entry windows_options::s_option_entries[] =
|
||||
{ WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh", "240", OPTION_INTEGER, "shadow mask height, in phosphor dots" },
|
||||
{ WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)", "0.09375", OPTION_FLOAT, "shadow mask texture size in U direction" },
|
||||
{ WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)", "0.109375", OPTION_FLOAT, "shadow mask texture size in V direction" },
|
||||
{ WINOPTION_CURVATURE";fs_curv(0.0-4.0)", "0.0", OPTION_FLOAT, "screen curvature amount" },
|
||||
{ WINOPTION_CURVATURE";fs_curv(0.0-4.0)", "0.03", OPTION_FLOAT, "screen curvature amount" },
|
||||
/* Beam-related values below this line*/
|
||||
{ WINOPTION_PINCUSHION";fs_pin(0.0-4.0)", "0.0", OPTION_FLOAT, "pincushion amount" },
|
||||
{ WINOPTION_SCANLINE_AMOUNT";fs_scanam(0.0-4.0)", "0.0", OPTION_FLOAT, "overall alpha scaling value for scanlines" },
|
||||
{ WINOPTION_PINCUSHION";fs_pin(0.0-4.0)", "0.03", OPTION_FLOAT, "pincushion amount" },
|
||||
{ WINOPTION_SCANLINE_AMOUNT";fs_scanam(0.0-4.0)", "1.0", OPTION_FLOAT, "overall alpha scaling value for scanlines" },
|
||||
{ WINOPTION_SCANLINE_SCALE";fs_scansc(0.0-4.0)", "1.0", OPTION_FLOAT, "overall height scaling value for scanlines" },
|
||||
{ WINOPTION_SCANLINE_HEIGHT";fs_scanh(0.0-4.0)", "0.7", OPTION_FLOAT, "individual height scaling value for scanlines" },
|
||||
{ WINOPTION_SCANLINE_HEIGHT";fs_scanh(0.0-4.0)", "1.0", OPTION_FLOAT, "individual height scaling value for scanlines" },
|
||||
{ WINOPTION_SCANLINE_BRIGHT_SCALE";fs_scanbs(0.0-2.0)", "1.0", OPTION_FLOAT, "overall brightness scaling value for scanlines (multiplicative)" },
|
||||
{ WINOPTION_SCANLINE_BRIGHT_OFFSET";fs_scanbo(0.0-1.0)", "0.0", OPTION_FLOAT, "overall brightness offset value for scanlines (additive)" },
|
||||
{ WINOPTION_SCANLINE_OFFSET";fs_scanjt(0.0-4.0)", "0.0", OPTION_FLOAT, "overall interlace jitter scaling value for scanlines" },
|
||||
{ WINOPTION_DEFOCUS";fs_focus", "0.0,0.0", OPTION_STRING, "overall defocus value in screen-relative coords" },
|
||||
{ WINOPTION_CONVERGE_X";fs_convx", "0.0,0.0,0.0",OPTION_STRING, "convergence in screen-relative X direction" },
|
||||
{ WINOPTION_CONVERGE_Y";fs_convy", "0.0,0.0,0.0",OPTION_STRING, "convergence in screen-relative Y direction" },
|
||||
{ WINOPTION_CONVERGE_X";fs_convx", "0.3,0.0,-0.3",OPTION_STRING, "convergence in screen-relative X direction" },
|
||||
{ WINOPTION_CONVERGE_Y";fs_convy", "0.0,0.3,-0.3",OPTION_STRING, "convergence in screen-relative Y direction" },
|
||||
{ WINOPTION_RADIAL_CONVERGE_X";fs_rconvx", "0.0,0.0,0.0",OPTION_STRING, "radial convergence in screen-relative X direction" },
|
||||
{ WINOPTION_RADIAL_CONVERGE_Y";fs_rconvy", "0.0,0.0,0.0",OPTION_STRING, "radial convergence in screen-relative Y direction" },
|
||||
/* RGB colorspace convolution below this line */
|
||||
{ WINOPTION_RED_RATIO";fs_redratio", "1.0,0.0,0.0",OPTION_STRING, "red output signal generated by input signal" },
|
||||
{ WINOPTION_GRN_RATIO";fs_grnratio", "0.0,1.0,0.0",OPTION_STRING, "green output signal generated by input signal" },
|
||||
{ WINOPTION_BLU_RATIO";fs_bluratio", "0.0,0.0,1.0",OPTION_STRING, "blue output signal generated by input signal" },
|
||||
{ WINOPTION_SATURATION";fs_sat(0.0-4.0)", "1.0", OPTION_FLOAT, "saturation scaling value" },
|
||||
{ WINOPTION_SATURATION";fs_sat(0.0-4.0)", "1.4", OPTION_FLOAT, "saturation scaling value" },
|
||||
{ WINOPTION_OFFSET";fs_offset", "0.0,0.0,0.0",OPTION_STRING, "signal offset value (additive)" },
|
||||
{ WINOPTION_SCALE";fs_scale", "1.0,1.0,1.0",OPTION_STRING, "signal scaling value (multiplicative)" },
|
||||
{ WINOPTION_POWER";fs_power", "1.0,1.0,1.0",OPTION_STRING, "signal power value (exponential)" },
|
||||
{ WINOPTION_FLOOR";fs_floor", "0.0,0.0,0.0",OPTION_STRING, "signal floor level" },
|
||||
{ WINOPTION_PHOSPHOR";fs_phosphor", "0.0,0.0,0.0",OPTION_STRING, "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" },
|
||||
{ WINOPTION_SCALE";fs_scale", "0.95,0.95,0.95",OPTION_STRING, "signal scaling value (multiplicative)" },
|
||||
{ WINOPTION_POWER";fs_power", "0.8,0.8,0.8",OPTION_STRING, "signal power value (exponential)" },
|
||||
{ WINOPTION_FLOOR";fs_floor", "0.05,0.05,0.05",OPTION_STRING, "signal floor level" },
|
||||
{ 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" },
|
||||
@ -392,8 +392,6 @@ const options_entry windows_options::s_option_entries[] =
|
||||
{ WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" },
|
||||
/* Vector simulation below this line */
|
||||
{ NULL, NULL, OPTION_HEADER, "VECTOR POST-PROCESSING OPTIONS" },
|
||||
{ WINOPTION_VECTOR_TIME_SCALE";vectime", "0.0", OPTION_FLOAT, "How much the fade rate affects vector fade" },
|
||||
{ WINOPTION_VECTOR_TIME_PERIOD";vecperiod", "0.0", OPTION_FLOAT, "Vector fade rate versus screen refresh rate" },
|
||||
{ WINOPTION_VECTOR_LENGTH_SCALE";veclength", "0.8", OPTION_FLOAT, "How much length affects vector fade" },
|
||||
{ WINOPTION_VECTOR_LENGTH_RATIO";vecsize", "500.0", OPTION_FLOAT, "Vector fade length (4.0 - vectors fade the most at and above 4 pixels, etc.)" },
|
||||
/* Bloom below this line */
|
||||
|
@ -129,8 +129,6 @@
|
||||
#define WINOPTION_YIQ_QVALUE "yiq_q"
|
||||
#define WINOPTION_YIQ_SCAN_TIME "yiq_scan_time"
|
||||
#define WINOPTION_YIQ_PHASE_COUNT "yiq_phase_count"
|
||||
#define WINOPTION_VECTOR_TIME_SCALE "vector_time_scale"
|
||||
#define WINOPTION_VECTOR_TIME_PERIOD "vector_time_period"
|
||||
#define WINOPTION_VECTOR_LENGTH_SCALE "vector_length_scale"
|
||||
#define WINOPTION_VECTOR_LENGTH_RATIO "vector_length_ratio"
|
||||
#define WINOPTION_VECTOR_BLOOM_SCALE "vector_bloom_scale"
|
||||
@ -254,8 +252,6 @@ public:
|
||||
float screen_yiq_q() const { return float_value(WINOPTION_YIQ_QVALUE); }
|
||||
float screen_yiq_scan_time() const { return float_value(WINOPTION_YIQ_SCAN_TIME); }
|
||||
int screen_yiq_phase_count() const { return int_value(WINOPTION_YIQ_PHASE_COUNT); }
|
||||
float screen_vector_time_scale() const { return float_value(WINOPTION_VECTOR_TIME_SCALE); }
|
||||
float screen_vector_time_period() const { return float_value(WINOPTION_VECTOR_TIME_PERIOD); }
|
||||
float screen_vector_length_scale() const { return float_value(WINOPTION_VECTOR_LENGTH_SCALE); }
|
||||
float screen_vector_length_ratio() const { return float_value(WINOPTION_VECTOR_LENGTH_RATIO); }
|
||||
float screen_vector_bloom_scale() const { return float_value(WINOPTION_VECTOR_BLOOM_SCALE); }
|
||||
|
Loading…
Reference in New Issue
Block a user