diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/osd/modules/render/d3d/d3dcomm.h | 14 | ||||
-rw-r--r-- | src/osd/modules/render/d3d/d3dhlsl.cpp | 125 | ||||
-rw-r--r-- | src/osd/modules/render/d3d/d3dhlsl.h | 15 | ||||
-rw-r--r-- | src/osd/modules/render/drawd3d.cpp | 27 | ||||
-rw-r--r-- | src/osd/windows/winmain.cpp | 6 | ||||
-rw-r--r-- | src/osd/windows/winmain.h | 12 |
6 files changed, 41 insertions, 158 deletions
diff --git a/src/osd/modules/render/d3d/d3dcomm.h b/src/osd/modules/render/d3d/d3dcomm.h index 98a720988c0..38b93adb7ac 100644 --- a/src/osd/modules/render/d3d/d3dcomm.h +++ b/src/osd/modules/render/d3d/d3dcomm.h @@ -220,7 +220,7 @@ class d3d_render_target { public: // construction/destruction - d3d_render_target(): target_width(0), target_height(0), width(0), height(0), screen_index(0), bloom_count(0), cache_index(0) + d3d_render_target(): target_width(0), target_height(0), width(0), height(0), screen_index(0), bloom_count(0) { for (int index = 0; index < MAX_BLOOM_COUNT; index++) { @@ -234,16 +234,16 @@ public: source_surface[index] = nullptr; target_texture[index] = nullptr; target_surface[index] = nullptr; - cache_texture[index] = nullptr; - cache_surface[index] = nullptr; } + + cache_texture = nullptr; + cache_surface = nullptr; } ~d3d_render_target(); bool init(renderer_d3d9 *d3d, int source_width, int source_height, int target_width, int target_height, int screen_index); int next_index(int index) { return ++index > 1 ? 0 : index; } - int next_cache_index() { cache_index = ++cache_index > 1 ? 0 : cache_index; return cache_index; } // real target dimension int target_width; @@ -260,8 +260,8 @@ public: IDirect3DSurface9 *source_surface[2]; IDirect3DTexture9 *source_texture[2]; - IDirect3DSurface9 *cache_surface[2]; - IDirect3DTexture9 *cache_texture[2]; + IDirect3DSurface9 *cache_surface; + IDirect3DTexture9 *cache_texture; IDirect3DSurface9 *bloom_surface[MAX_BLOOM_COUNT]; IDirect3DTexture9 *bloom_texture[MAX_BLOOM_COUNT]; @@ -269,8 +269,6 @@ public: float bloom_dims[MAX_BLOOM_COUNT][2]; int bloom_count; - - int cache_index; }; #endif diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index 17861ef3ce1..a6cfad8cae9 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -169,9 +169,9 @@ shaders::shaders() : snap_copy_target(nullptr), snap_copy_texture(nullptr), snap_target(nullptr), snap_texture(nullptr), snap_width(0), snap_height(0), initialized(false), backbuffer(nullptr), curr_effect(nullptr), default_effect(nullptr), prescale_effect(nullptr), post_effect(nullptr), distortion_effect(nullptr), - focus_effect(nullptr), phosphor_effect(nullptr), ghosting_effect(nullptr), deconverge_effect(nullptr), - color_effect(nullptr), ntsc_effect(nullptr), bloom_effect(nullptr), downsample_effect(nullptr), - vector_effect(nullptr), curr_texture(nullptr), curr_render_target(nullptr), curr_poly(nullptr), + focus_effect(nullptr), phosphor_effect(nullptr), deconverge_effect(nullptr), color_effect(nullptr), + ntsc_effect(nullptr), bloom_effect(nullptr), downsample_effect(nullptr), vector_effect(nullptr), + curr_texture(nullptr), curr_render_target(nullptr), curr_poly(nullptr), d3dx_create_effect_from_file_ptr(nullptr) { } @@ -518,15 +518,7 @@ bool shaders::init(d3d_base *d3dintf, running_machine *machine, renderer_d3d9 *r get_vector(winoptions.screen_scale(), 3, options->scale, true); get_vector(winoptions.screen_power(), 3, options->power, true); get_vector(winoptions.screen_floor(), 3, options->floor, true); - options->phosphor_mode = winoptions.screen_phosphor_mode(); - get_vector(winoptions.screen_phosphor_time(), 3, - options->phosphor_time, true); - get_vector(winoptions.screen_phosphor_beta(), 3, - options->phosphor_beta, true); - get_vector(winoptions.screen_lcd_rise_time(), 3, - options->lcd_rise_time, true); - get_vector(winoptions.screen_lcd_fall_time(), 3, - options->lcd_fall_time, true); + get_vector(winoptions.screen_phosphor(), 3, options->phosphor, true); options->saturation = winoptions.screen_saturation(); options->yiq_enable = winoptions.screen_yiq_enable(); options->yiq_jitter = winoptions.screen_yiq_jitter(); @@ -717,7 +709,6 @@ int shaders::create_resources() distortion_effect = new effect(this, d3d->get_device(), "distortion.fx", fx_dir); prescale_effect = new effect(this, d3d->get_device(), "prescale.fx", fx_dir); phosphor_effect = new effect(this, d3d->get_device(), "phosphor.fx", fx_dir); - ghosting_effect = new effect(this, d3d->get_device(), "ghosting.fx", fx_dir); focus_effect = new effect(this, d3d->get_device(), "focus.fx", fx_dir); deconverge_effect = new effect(this, d3d->get_device(), "deconverge.fx", fx_dir); color_effect = new effect(this, d3d->get_device(), "color.fx", fx_dir); @@ -731,7 +722,6 @@ int shaders::create_resources() !distortion_effect->is_valid() || !prescale_effect->is_valid() || !phosphor_effect->is_valid() || - !ghosting_effect->is_valid() || !focus_effect->is_valid() || !deconverge_effect->is_valid() || !color_effect->is_valid() || @@ -743,13 +733,12 @@ int shaders::create_resources() return 1; } - effect *effects[14] = { + effect *effects[13] = { default_effect, post_effect, distortion_effect, prescale_effect, phosphor_effect, - ghosting_effect, focus_effect, deconverge_effect, color_effect, @@ -760,7 +749,7 @@ int shaders::create_resources() vector_effect }; - for (int i = 0; i < 14; i++) + for (int i = 0; i < 13; i++) { effects[i]->add_uniform("SourceDims", uniform::UT_VEC2, uniform::CU_SOURCE_DIMS); effects[i]->add_uniform("TargetDims", uniform::UT_VEC2, uniform::CU_TARGET_DIMS); @@ -797,12 +786,7 @@ int shaders::create_resources() focus_effect->add_uniform("Defocus", uniform::UT_VEC2, uniform::CU_FOCUS_SIZE); - phosphor_effect->add_uniform("Mode", uniform::UT_INT, uniform::CU_PHOSPHOR_MODE); - phosphor_effect->add_uniform("TimeConstant", uniform::UT_VEC3, uniform::CU_PHOSPHOR_TIME); - phosphor_effect->add_uniform("Beta", uniform::UT_VEC3, uniform::CU_PHOSPHOR_BETA); - - ghosting_effect->add_uniform("LCDRise", uniform::UT_FLOAT, uniform::CU_LCD_RISE_TIME); - ghosting_effect->add_uniform("LCDFall", uniform::UT_FLOAT, uniform::CU_LCD_FALL_TIME); + phosphor_effect->add_uniform("Phosphor", uniform::UT_VEC3, uniform::CU_PHOSPHOR_LIFE); post_effect->add_uniform("ShadowAlpha", uniform::UT_FLOAT, uniform::CU_POST_SHADOW_ALPHA); post_effect->add_uniform("ShadowCount", uniform::UT_VEC2, uniform::CU_POST_SHADOW_COUNT); @@ -855,7 +839,6 @@ void shaders::begin_draw() distortion_effect->set_technique("DefaultTechnique"); prescale_effect->set_technique("DefaultTechnique"); phosphor_effect->set_technique("DefaultTechnique"); - ghosting_effect->set_technique("DefaultTechnique"); focus_effect->set_technique("DefaultTechnique"); deconverge_effect->set_technique("DefaultTechnique"); color_effect->set_technique("DefaultTechnique"); @@ -1085,64 +1068,31 @@ int shaders::defocus_pass(d3d_render_target *rt, int source_index, poly_info *po int shaders::phosphor_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum) { int next_index = source_index; - auto stype = machine->first_screen()->screen_type(); - // skip if screen doesn't use phosphors - if ((stype != SCREEN_TYPE_RASTER && stype != SCREEN_TYPE_VECTOR) || - options->phosphor_mode == 0) + // skip phosphor if no influencing settings + if (options->phosphor[0] == 0.0f && options->phosphor[1] == 0.0f && options->phosphor[2] == 0.0f) { return next_index; } + // Shader needs time between last update curr_effect = phosphor_effect; curr_effect->update_uniforms(); curr_effect->set_texture("Diffuse", rt->target_texture[next_index]); - curr_effect->set_texture("LastPass", rt->cache_texture[rt->cache_index]); + curr_effect->set_texture("LastPass", rt->cache_texture); curr_effect->set_bool("Passthrough", false); curr_effect->set_float("DeltaTime", delta_time()); - rt->next_cache_index(); - blit(rt->cache_surface[rt->cache_index], false, D3DPT_TRIANGLELIST, 0, 2); - - // copy cached texture to target texture - curr_effect->update_uniforms(); - curr_effect->set_texture("Diffuse", rt->cache_texture[rt->cache_index]); - curr_effect->set_texture("LastPass", rt->cache_texture[rt->cache_index]); - curr_effect->set_bool("Passthrough", true); - + next_index = rt->next_index(next_index); blit(rt->target_surface[next_index], false, D3DPT_TRIANGLELIST, 0, 2); - return next_index; -} - -int shaders::ghosting_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum) -{ - int next_index = source_index; - auto stype = machine->first_screen()->screen_type(); - - if (stype != SCREEN_TYPE_LCD || - (options->lcd_rise_time == 0 && options->lcd_fall_time == 0)) - { - return next_index; - } - - curr_effect = ghosting_effect; + // Pass along our phosphor'd screen curr_effect->update_uniforms(); curr_effect->set_texture("Diffuse", rt->target_texture[next_index]); - curr_effect->set_texture("LastPass", rt->cache_texture[rt->cache_index]); - curr_effect->set_bool("Passthrough", false); - curr_effect->set_float("DeltaTime", delta_time()); - - rt->next_cache_index(); - blit(rt->cache_surface[rt->cache_index], false, D3DPT_TRIANGLELIST, 0, 2); - - // copy cached texture to target texture - curr_effect->update_uniforms(); - curr_effect->set_texture("Diffuse", rt->cache_texture[rt->cache_index]); - curr_effect->set_texture("LastPass", rt->cache_texture[rt->cache_index]); + curr_effect->set_texture("LastPass", rt->target_texture[next_index]); curr_effect->set_bool("Passthrough", true); - blit(rt->target_surface[next_index], false, D3DPT_TRIANGLELIST, 0, 2); + blit(rt->cache_surface, false, D3DPT_TRIANGLELIST, 0, 2); return next_index; } @@ -1414,10 +1364,8 @@ void shaders::render_quad(poly_info *poly, int vertnum) next_index = deconverge_pass(rt, next_index, poly, vertnum); // handled in bgfx next_index = defocus_pass(rt, next_index, poly, vertnum); next_index = phosphor_pass(rt, next_index, poly, vertnum); - next_index = ghosting_pass(rt, next_index, poly, vertnum); // create bloom textures - // This may be phosphor or ghosting, depending on screen type int phosphor_index = next_index; next_index = post_pass(rt, next_index, poly, vertnum, true); next_index = downsample_pass(rt, next_index, poly, vertnum); @@ -1495,10 +1443,8 @@ void shaders::render_quad(poly_info *poly, int vertnum) next_index = deconverge_pass(rt, next_index, poly, vertnum); next_index = defocus_pass(rt, next_index, poly, vertnum); next_index = phosphor_pass(rt, next_index, poly, vertnum); - next_index = ghosting_pass(rt, next_index, poly, vertnum); // create bloom textures - // This may be phosphor or ghosting, depending on screen type int phosphor_index = next_index; next_index = post_pass(rt, next_index, poly, vertnum, true); next_index = downsample_pass(rt, next_index, poly, vertnum); @@ -1789,11 +1735,6 @@ void shaders::delete_resources() delete phosphor_effect; phosphor_effect = nullptr; } - if (ghosting_effect != nullptr) - { - delete ghosting_effect; - ghosting_effect = nullptr; - } if (focus_effect != nullptr) { delete focus_effect; @@ -2008,11 +1949,7 @@ enum slider_option SLIDER_SCALE, SLIDER_POWER, SLIDER_FLOOR, - SLIDER_PHOSPHOR_MODE, - SLIDER_PHOSPHOR_TIME, - SLIDER_PHOSPHOR_BETA, - SLIDER_LCD_RISE_TIME, - SLIDER_LCD_FALL_TIME, + SLIDER_PHOSPHOR, SLIDER_BLOOM_BLEND_MODE, SLIDER_BLOOM_SCALE, SLIDER_BLOOM_OVERDRIVE, @@ -2045,7 +1982,6 @@ enum slider_screen_type SLIDER_SCREEN_TYPE_RASTER = 1, SLIDER_SCREEN_TYPE_VECTOR = 2, SLIDER_SCREEN_TYPE_LCD = 4, - SLIDER_SCREEN_TYPE_RASTER_OR_VECTOR = SLIDER_SCREEN_TYPE_RASTER | SLIDER_SCREEN_TYPE_VECTOR, SLIDER_SCREEN_TYPE_LCD_OR_RASTER = SLIDER_SCREEN_TYPE_RASTER | SLIDER_SCREEN_TYPE_LCD, SLIDER_SCREEN_TYPE_ANY = SLIDER_SCREEN_TYPE_RASTER | SLIDER_SCREEN_TYPE_VECTOR | SLIDER_SCREEN_TYPE_LCD }; @@ -2091,11 +2027,7 @@ slider_desc shaders::s_sliders[] = { "Signal Scale,", -200, 100, 200, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_SCALE, 0.01f, "%2.2f", {} }, { "Signal Exponent,", -800, 0, 800, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_POWER, 0.01f, "%2.2f", {} }, { "Signal Floor,", 0, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_FLOOR, 0.01f, "%2.2f", {} }, - { "Phosphor Persistence Mode,", 0, 0, 2, 1, SLIDER_INT_ENUM, SLIDER_SCREEN_TYPE_RASTER_OR_VECTOR, SLIDER_PHOSPHOR_MODE, 0, "%s", { "Off", "Exponential", "Inverse Power" } }, - { "Phosphor Persistence Time Constant,",1, 5000, 10000,10, SLIDER_COLOR, SLIDER_SCREEN_TYPE_RASTER_OR_VECTOR, SLIDER_PHOSPHOR_TIME, 0.0001f, "%4.4f", {} }, - { "Phosphor Persistence beta,", 50, 100, 200, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_RASTER_OR_VECTOR, SLIDER_PHOSPHOR_BETA, 0.01f, "%2.2f", {} }, - { "LCD Rise Time Constant,", 0, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_LCD, SLIDER_LCD_RISE_TIME, 0.01f, "%2.2f", {} }, - { "LCD Fall Time Constant,", 0, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_LCD, SLIDER_LCD_FALL_TIME, 0.01f, "%2.2f", {} }, + { "Phosphor Persistence,", 0, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_PHOSPHOR, 0.01f, "%2.2f", {} }, { "Bloom Blend Mode", 0, 0, 1, 1, SLIDER_INT_ENUM, SLIDER_SCREEN_TYPE_ANY, SLIDER_BLOOM_BLEND_MODE, 0, "%s", { "Brighten", "Darken" } }, { "Bloom Scale", 0, 0, 2000, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_BLOOM_SCALE, 0.001f, "%1.3f", {} }, { "Bloom Overdrive,", 0, 0, 2000, 5, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_BLOOM_OVERDRIVE, 0.001f, "%1.3f", {} }, @@ -2167,11 +2099,7 @@ void *shaders::get_slider_option(int id, int index) case SLIDER_SCALE: return &(options->scale[index]); case SLIDER_POWER: return &(options->power[index]); case SLIDER_FLOOR: return &(options->floor[index]); - case SLIDER_PHOSPHOR_MODE: return &(options->phosphor_mode); - case SLIDER_PHOSPHOR_TIME: return &(options->phosphor_time[index]); - case SLIDER_PHOSPHOR_BETA: return &(options->phosphor_beta[index]); - case SLIDER_LCD_RISE_TIME: return &(options->lcd_rise_time[index]); - case SLIDER_LCD_FALL_TIME: return &(options->lcd_fall_time[index]); + case SLIDER_PHOSPHOR: return &(options->phosphor[index]); case SLIDER_BLOOM_BLEND_MODE: return &(options->bloom_blend_mode); case SLIDER_BLOOM_SCALE: return &(options->bloom_scale); case SLIDER_BLOOM_OVERDRIVE: return &(options->bloom_overdrive[index]); @@ -2458,21 +2386,8 @@ void uniform::update() m_shader->set_vector("Defocus", 2, &options->defocus[0]); break; - case CU_PHOSPHOR_MODE: - m_shader->set_int("Mode", options->phosphor_mode); - break; - case CU_PHOSPHOR_TIME: - m_shader->set_vector("TimeConstant", 3, options->phosphor_time); - break; - case CU_PHOSPHOR_BETA: - m_shader->set_vector("Beta", 3, options->phosphor_beta); - break; - - case CU_LCD_RISE_TIME: - m_shader->set_vector("LCDRise", 3, options->lcd_rise_time); - break; - case CU_LCD_FALL_TIME: - m_shader->set_vector("LCDFall", 3, options->lcd_fall_time); + case CU_PHOSPHOR_LIFE: + m_shader->set_vector("Phosphor", 3, options->phosphor); break; case CU_POST_REFLECTION: diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h index 6c94be09793..ed25d2c52e8 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.h +++ b/src/osd/modules/render/d3d/d3dhlsl.h @@ -77,12 +77,7 @@ public: CU_FOCUS_SIZE, - CU_PHOSPHOR_MODE, - CU_PHOSPHOR_TIME, - CU_PHOSPHOR_BETA, - - CU_LCD_RISE_TIME, - CU_LCD_FALL_TIME, + CU_PHOSPHOR_LIFE, CU_POST_VIGNETTING, CU_POST_DISTORTION, @@ -208,11 +203,7 @@ struct hlsl_options float scale[3]; float power[3]; float floor[3]; - int phosphor_mode; - float phosphor_time[3]; - float phosphor_beta[3]; - float lcd_rise_time[3]; - float lcd_fall_time[3]; + float phosphor[3]; float saturation; // NTSC @@ -341,7 +332,6 @@ private: int deconverge_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum); int defocus_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum); int phosphor_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum); - int ghosting_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum); int post_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum, bool prepare_bloom); int downsample_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum); int bloom_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum); @@ -391,7 +381,6 @@ private: effect * distortion_effect; // pointer to the distortion-effect object effect * focus_effect; // pointer to the focus-effect object effect * phosphor_effect; // pointer to the phosphor-effect object - effect * ghosting_effect; // pointer te the LCD ghosting effect object effect * deconverge_effect; // pointer to the deconvergence-effect object effect * color_effect; // pointer to the color-effect object effect * ntsc_effect; // pointer to the NTSC effect object diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp index 4cc547b5181..d0a1ce6c9d1 100644 --- a/src/osd/modules/render/drawd3d.cpp +++ b/src/osd/modules/render/drawd3d.cpp @@ -1120,13 +1120,6 @@ bool renderer_d3d9::device_verify_caps() success = false; } - result = d3dintf->d3dobj->CheckDeviceFormat(m_adapter, D3DDEVTYPE_HAL, m_pixformat, 0, D3DRTYPE_TEXTURE, D3DFMT_A16B16G16R16F); - if (FAILED(result)) - { - osd_printf_error("Direct3D Error: Your graphics card does not support the A16B16G16R16F texture format.\n"); - success = false; - } - if (!success) { osd_printf_error("This feature or features are required to use the Direct3D renderer. Please\n"); @@ -2669,13 +2662,13 @@ d3d_render_target::~d3d_render_target() if (target_surface[index] != nullptr) target_surface[index]->Release(); + } - if (cache_texture[index] != nullptr) - cache_texture[index]->Release(); + if (cache_texture != nullptr) + cache_texture->Release(); - if (cache_surface[index] != nullptr) - cache_surface[index]->Release(); - } + if (cache_surface != nullptr) + cache_surface->Release(); } @@ -2708,13 +2701,13 @@ bool d3d_render_target::init(renderer_d3d9 *d3d, int source_width, int source_he return false; target_texture[index]->GetSurfaceLevel(0, &target_surface[index]); + } - result = d3d->get_device()->CreateTexture(target_width, target_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A16B16G16R16F, D3DPOOL_DEFAULT, &cache_texture[index], nullptr); - if (FAILED(result)) - return false; + result = d3d->get_device()->CreateTexture(target_width, target_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &cache_texture, nullptr); + if (FAILED(result)) + return false; - cache_texture[index]->GetSurfaceLevel(0, &cache_surface[index]); - } + cache_texture->GetSurfaceLevel(0, &cache_surface); auto win = d3d->assert_window(); diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp index 902e4eb8ccd..b146e8b6357 100644 --- a/src/osd/windows/winmain.cpp +++ b/src/osd/windows/winmain.cpp @@ -215,11 +215,7 @@ 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_MODE";fs_phosphor_mode", "0", OPTION_STRING, "phosphorescence decay mode (0: off, 1: exponential, 2: inverse-power)" }, - { WINOPTION_PHOSPHOR_TIME";fs_phosphor_time", "0.5,0.5,0.5", OPTION_STRING, "exponential time constant" }, - { WINOPTION_PHOSPHOR_BETA";fs_phosphor_beta", "1.0,1.0,1.0", OPTION_STRING, "inverse power order" }, - { WINOPTION_LCD_RISE_TIME";fs_lcd_rise_time", "0.0,0.0,0.0", OPTION_STRING, "LCD persistence rise time constant" }, - { WINOPTION_LCD_FALL_TIME";fs_lcd_fall_time", "0.0,0.0,0.0", OPTION_STRING, "LCD persistence fall time constant" }, + { WINOPTION_PHOSPHOR";fs_phosphor", "0.0,0.0,0.0", OPTION_STRING, "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" }, /* 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 c9391aeb75d..1c40a346d34 100644 --- a/src/osd/windows/winmain.h +++ b/src/osd/windows/winmain.h @@ -68,11 +68,7 @@ #define WINOPTION_SCALE "scale" #define WINOPTION_POWER "power" #define WINOPTION_FLOOR "floor" -#define WINOPTION_PHOSPHOR_MODE "phosphor_mode" -#define WINOPTION_PHOSPHOR_TIME "phosphor_time" -#define WINOPTION_PHOSPHOR_BETA "phosphor_beta" -#define WINOPTION_LCD_RISE_TIME "lcd_rise_time" -#define WINOPTION_LCD_FALL_TIME "lcd_fall_time" +#define WINOPTION_PHOSPHOR "phosphor_life" #define WINOPTION_SATURATION "saturation" #define WINOPTION_YIQ_ENABLE "yiq_enable" #define WINOPTION_YIQ_JITTER "yiq_jitter" @@ -201,11 +197,7 @@ 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); } - int screen_phosphor_mode() const { return int_value(WINOPTION_PHOSPHOR_MODE); } - const char* screen_phosphor_time() const { return value(WINOPTION_PHOSPHOR_TIME); } - const char* screen_phosphor_beta() const { return value(WINOPTION_PHOSPHOR_BETA); } - const char* screen_lcd_rise_time() const { return value(WINOPTION_LCD_RISE_TIME); } - const char* screen_lcd_fall_time() const { return value(WINOPTION_LCD_FALL_TIME); } + const char *screen_phosphor() const { return value(WINOPTION_PHOSPHOR); } float screen_saturation() const { return float_value(WINOPTION_SATURATION); } // full screen options |