diff options
author | 2016-12-16 12:35:58 -0800 | |
---|---|---|
committer | 2016-12-29 14:57:28 -0800 | |
commit | 0b6f935443d2fa048a9b2f9db8b00cf6cb8e7078 (patch) | |
tree | 25f40a0e82b5142c3249aae70fbba1a05bcb00c1 /src/osd/windows | |
parent | 1fafe7706cbfcfc6e39c23c3c713fbb102557cbe (diff) |
Implement new phosphor shader.
hlsl/phosphor.fx: Make changes to the pixel shader. New
uniforms: Mode, Tau, Beta, Gamma. Remove Phosphor. Mode selects the
mode for phosphor simulation: off (no decay), exponential, inverse
power. Tau is the time constant for exp. decay. Beta and Gamma are
constants for inv-pow.
src/osd/modules/render/d3d/d3dhlsl.cpp: Provide uniforms and add
sliders for new options.
src/osd/modules/render/d3d/d3dhlsl.h: (BP) Provide new options.
src/osd/windows/winmain.cpp: (BP) Provide new options.
src/osd/windows/winmain.h: (BP) Provide new options.
Diffstat (limited to 'src/osd/windows')
-rw-r--r-- | src/osd/windows/winmain.cpp | 5 | ||||
-rw-r--r-- | src/osd/windows/winmain.h | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp index b146e8b6357..d93852f9bf0 100644 --- a/src/osd/windows/winmain.cpp +++ b/src/osd/windows/winmain.cpp @@ -215,7 +215,10 @@ const options_entry windows_options::s_option_entries[] = { 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_PHOSPHOR_MODE";fs_phosphor_mode", "0", OPTION_STRING, "phosphorescence decay mode (0: off, 1: exponential, 2: inverse-power)" }, + { WINOPTION_PHOSPHOR_TAU";fs_phosphor_tau", "0.026,0.026,0.026", OPTION_STRING, "exponential time constant" }, + { WINOPTION_PHOSPHOR_BETA";fs_phosphor_beta", "0.7,0.7,0.7", OPTION_STRING, "inverse power order" }, + { WINOPTION_PHOSPHOR_GAMMA";fs_phosphor_gamma", "300,300,300", OPTION_STRING, "inverse power time constant" }, /* NTSC simulation below this line */ { nullptr, nullptr, OPTION_HEADER, "NTSC POST-PROCESSING OPTIONS" }, { WINOPTION_YIQ_ENABLE";yiq", "0", OPTION_BOOLEAN, "enables YIQ-space HLSL post-processing" }, diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h index 1c40a346d34..b939b115b83 100644 --- a/src/osd/windows/winmain.h +++ b/src/osd/windows/winmain.h @@ -68,7 +68,10 @@ #define WINOPTION_SCALE "scale" #define WINOPTION_POWER "power" #define WINOPTION_FLOOR "floor" -#define WINOPTION_PHOSPHOR "phosphor_life" +#define WINOPTION_PHOSPHOR_MODE "phosphor_mode" +#define WINOPTION_PHOSPHOR_TAU "phosphor_tau" +#define WINOPTION_PHOSPHOR_BETA "phosphor_beta" +#define WINOPTION_PHOSPHOR_GAMMA "phosphor_gamma" #define WINOPTION_SATURATION "saturation" #define WINOPTION_YIQ_ENABLE "yiq_enable" #define WINOPTION_YIQ_JITTER "yiq_jitter" @@ -197,7 +200,10 @@ public: const char *screen_scale() const { return value(WINOPTION_SCALE); } const char *screen_power() const { return value(WINOPTION_POWER); } const char *screen_floor() const { return value(WINOPTION_FLOOR); } - const char *screen_phosphor() const { return value(WINOPTION_PHOSPHOR); } + int screen_phosphor_mode() const { return int_value(WINOPTION_PHOSPHOR_MODE); } + const char* screen_phosphor_tau() const { return value(WINOPTION_PHOSPHOR_TAU); } + const char* screen_phosphor_beta() const { return value(WINOPTION_PHOSPHOR_BETA); } + const char* screen_phosphor_gamma() const { return value(WINOPTION_PHOSPHOR_GAMMA); } float screen_saturation() const { return float_value(WINOPTION_SATURATION); } // full screen options |