summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp34
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.h8
-rw-r--r--src/osd/windows/winmain.cpp4
-rw-r--r--src/osd/windows/winmain.h8
4 files changed, 41 insertions, 13 deletions
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index 4ee6fcbd5ac..000fd254fe0 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -680,7 +680,9 @@ void shaders::init(d3d_base *d3dintf, running_machine *machine, renderer_d3d9 *r
options->shadow_mask_v_size = winoptions.screen_shadow_mask_v_size();
options->shadow_mask_u_offset = winoptions.screen_shadow_mask_u_offset();
options->shadow_mask_v_offset = winoptions.screen_shadow_mask_v_offset();
- options->curvature = winoptions.screen_curvature();
+ options->distortion = winoptions.screen_distortion();
+ options->cubic_distortion = winoptions.screen_cubic_distortion();
+ options->distort_corner = winoptions.screen_distort_corner();
options->round_corner = winoptions.screen_round_corner();
options->smooth_border = winoptions.screen_smooth_border();
options->reflection = winoptions.screen_reflection();
@@ -989,7 +991,9 @@ int shaders::create_resources(bool reset, std::vector<ui_menu_item>& sliders)
post_effect->add_uniform("Floor", uniform::UT_VEC3, uniform::CU_POST_FLOOR);
distortion_effect->add_uniform("VignettingAmount", uniform::UT_FLOAT, uniform::CU_POST_VIGNETTING);
- distortion_effect->add_uniform("CurvatureAmount", uniform::UT_FLOAT, uniform::CU_POST_CURVATURE);
+ distortion_effect->add_uniform("DistortionAmount", uniform::UT_FLOAT, uniform::CU_POST_DISTORTION);
+ distortion_effect->add_uniform("CubicDistortionAmount", uniform::UT_FLOAT, uniform::CU_POST_CUBIC_DISTORTION);
+ distortion_effect->add_uniform("DistortCornerAmount", uniform::UT_FLOAT, uniform::CU_POST_DISTORT_CORNER);
distortion_effect->add_uniform("RoundCornerAmount", uniform::UT_FLOAT, uniform::CU_POST_ROUND_CORNER);
distortion_effect->add_uniform("SmoothBorderAmount", uniform::UT_FLOAT, uniform::CU_POST_SMOOTH_BORDER);
distortion_effect->add_uniform("ReflectionAmount", uniform::UT_FLOAT, uniform::CU_POST_REFLECTION);
@@ -1496,7 +1500,9 @@ int shaders::distortion_pass(d3d_render_target *rt, int source_index, poly_info
// skip distortion if no influencing settings
if (options->reflection == 0 &&
options->vignetting == 0 &&
- options->curvature == 0 &&
+ options->distortion == 0 &&
+ options->cubic_distortion == 0 &&
+ options->distort_corner == 0 &&
options->round_corner == 0 &&
options->smooth_border == 0)
{
@@ -2277,7 +2283,9 @@ enum slider_option
SLIDER_SHADOW_MASK_V_SIZE,
SLIDER_SHADOW_MASK_U_OFFSET,
SLIDER_SHADOW_MASK_V_OFFSET,
- SLIDER_CURVATURE,
+ SLIDER_DISTORTION,
+ SLIDER_CUBIC_DISTORTION,
+ SLIDER_DISTORT_CORNER,
SLIDER_ROUND_CORNER,
SLIDER_SMOOTH_BORDER,
SLIDER_REFLECTION,
@@ -2352,7 +2360,9 @@ slider_desc shaders::s_sliders[] =
{ "Shadow Mask Pixel Count Y", 1, 1, 64, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_V_SIZE, 0.03125f, "%2.5f", {} },
{ "Shadow Mask Offset X", -100, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_U_OFFSET, 0.01f, "%1.2f", {} },
{ "Shadow Mask Offset Y", -100, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_V_OFFSET, 0.01f, "%1.2f", {} },
- { "Screen Curvature", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_CURVATURE, 0.01f, "%2.2f", {} },
+ { "Screen Distortion", -100, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_DISTORTION, 0.01f, "%2.2f", {} },
+ { "Screen Distortion (Cubic)", -100, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_CUBIC_DISTORTION, 0.01f, "%2.2f", {} },
+ { "Screen Distort Corner", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_DISTORT_CORNER, 0.01f, "%1.2f", {} },
{ "Screen Round Corner", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_ROUND_CORNER, 0.01f, "%1.2f", {} },
{ "Screen Smooth Border", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SMOOTH_BORDER, 0.01f, "%1.2f", {} },
{ "Screen Reflection", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_REFLECTION, 0.01f, "%1.2f", {} },
@@ -2421,7 +2431,9 @@ void *shaders::get_slider_option(int id, int index)
case SLIDER_SHADOW_MASK_V_SIZE: return &(options->shadow_mask_v_size);
case SLIDER_SHADOW_MASK_U_OFFSET: return &(options->shadow_mask_u_offset);
case SLIDER_SHADOW_MASK_V_OFFSET: return &(options->shadow_mask_v_offset);
- case SLIDER_CURVATURE: return &(options->curvature);
+ case SLIDER_DISTORTION: return &(options->distortion);
+ case SLIDER_CUBIC_DISTORTION: return &(options->cubic_distortion);
+ case SLIDER_DISTORT_CORNER: return &(options->distort_corner);
case SLIDER_ROUND_CORNER: return &(options->round_corner);
case SLIDER_SMOOTH_BORDER: return &(options->smooth_border);
case SLIDER_REFLECTION: return &(options->reflection);
@@ -2756,8 +2768,14 @@ void uniform::update()
case CU_POST_VIGNETTING:
m_shader->set_float("VignettingAmount", options->vignetting);
break;
- case CU_POST_CURVATURE:
- m_shader->set_float("CurvatureAmount", options->curvature);
+ case CU_POST_DISTORTION:
+ m_shader->set_float("DistortionAmount", options->distortion);
+ break;
+ case CU_POST_CUBIC_DISTORTION:
+ m_shader->set_float("CubicDistortionAmount", options->cubic_distortion);
+ break;
+ case CU_POST_DISTORT_CORNER:
+ m_shader->set_float("DistortCornerAmount", options->distort_corner);
break;
case CU_POST_ROUND_CORNER:
m_shader->set_float("RoundCornerAmount", options->round_corner);
diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h
index 738d77330f7..8851531678e 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.h
+++ b/src/osd/modules/render/d3d/d3dhlsl.h
@@ -81,7 +81,9 @@ public:
CU_PHOSPHOR_IGNORE,
CU_POST_VIGNETTING,
- CU_POST_CURVATURE,
+ CU_POST_DISTORTION,
+ CU_POST_CUBIC_DISTORTION,
+ CU_POST_DISTORT_CORNER,
CU_POST_ROUND_CORNER,
CU_POST_SMOOTH_BORDER,
CU_POST_REFLECTION,
@@ -197,7 +199,9 @@ struct hlsl_options
float shadow_mask_v_size;
float shadow_mask_u_offset;
float shadow_mask_v_offset;
- float curvature;
+ float distortion;
+ float cubic_distortion;
+ float distort_corner;
float round_corner;
float smooth_border;
float reflection;
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp
index ba3e6af9c4a..7edb996fb0a 100644
--- a/src/osd/windows/winmain.cpp
+++ b/src/osd/windows/winmain.cpp
@@ -170,7 +170,9 @@ const options_entry windows_options::s_option_entries[] =
{ WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)", "0.25", 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_DISTORTION";fs_dist(-1.0-1.0)", "0.0", OPTION_FLOAT, "screen distortion amount" },
+ { WINOPTION_CUBIC_DISTORTION";fs_cubedist(-1.0-1.0)", "0.0", OPTION_FLOAT, "screen cubic distortion amount" },
+ { WINOPTION_DISTORT_CORNER";fs_distc(0.0-1.0)", "0.0", OPTION_FLOAT, "screen distort corner 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" },
{ WINOPTION_REFLECTION";fs_ref(0.0-1.0)", "0.0", OPTION_FLOAT, "screen reflection amount" },
diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h
index 94d422a545b..48559039d0f 100644
--- a/src/osd/windows/winmain.h
+++ b/src/osd/windows/winmain.h
@@ -42,7 +42,9 @@
#define WINOPTION_SHADOW_MASK_UOFFSET "shadow_mask_uoffset"
#define WINOPTION_SHADOW_MASK_VOFFSET "shadow_mask_voffset"
#define WINOPTION_REFLECTION "reflection"
-#define WINOPTION_CURVATURE "curvature"
+#define WINOPTION_DISTORTION "distortion"
+#define WINOPTION_CUBIC_DISTORTION "cubic_distortion"
+#define WINOPTION_DISTORT_CORNER "distort_corner"
#define WINOPTION_ROUND_CORNER "round_corner"
#define WINOPTION_SMOOTH_BORDER "smooth_border"
#define WINOPTION_VIGNETTING "vignetting"
@@ -149,7 +151,9 @@ public:
float screen_scanline_jitter() const { return float_value(WINOPTION_SCANLINE_JITTER); }
float screen_hum_bar_alpha() const { return float_value(WINOPTION_HUM_BAR_ALPHA); }
float screen_reflection() const { return float_value(WINOPTION_REFLECTION); }
- float screen_curvature() const { return float_value(WINOPTION_CURVATURE); }
+ float screen_distortion() const { return float_value(WINOPTION_DISTORTION); }
+ float screen_cubic_distortion() const { return float_value(WINOPTION_CUBIC_DISTORTION); }
+ float screen_distort_corner() const { return float_value(WINOPTION_DISTORT_CORNER); }
float screen_round_corner() const { return float_value(WINOPTION_ROUND_CORNER); }
float screen_smooth_border() const { return float_value(WINOPTION_SMOOTH_BORDER); }
float screen_vignetting() const { return float_value(WINOPTION_VIGNETTING); }