From b4b65439293f160f195e8fec9124e6a1bc43881b Mon Sep 17 00:00:00 2001 From: ImJezze Date: Thu, 5 May 2016 20:58:42 +0200 Subject: Equalized options of HLSL and BGFX HLSL chain - removed POT texture size from shadow mask in HLSL, U/V size is now simply the percentage of the actual texture size - adjusted display names of options --- bgfx/chains/hlsl.json | 25 ++++----- ini/presets/gba.ini | 8 +-- ini/presets/lcd.ini | 8 +-- ini/presets/raster.ini | 8 +-- ini/presets/vector.ini | 8 +-- src/osd/modules/render/d3d/d3dhlsl.cpp | 98 +++++++++++++++++----------------- src/osd/modules/render/drawd3d.cpp | 14 ++--- 7 files changed, 83 insertions(+), 86 deletions(-) diff --git a/bgfx/chains/hlsl.json b/bgfx/chains/hlsl.json index c0b5e11c601..d3007eb285b 100644 --- a/bgfx/chains/hlsl.json +++ b/bgfx/chains/hlsl.json @@ -77,9 +77,9 @@ { "type": "color", "name": "scale", "text": "Signal Scale, ", "default": [ 0.95, 0.95, 0.95 ], "max": [ 2.00, 2.00, 2.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "raster" }, { "type": "float", "name": "saturation", "text": "Color Saturation", "default": 1.20, "max": 4.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "raster" }, - { "type": "vec2", "name": "converge_red", "text": "Red Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, - { "type": "vec2", "name": "converge_green", "text": "Green Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, - { "type": "vec2", "name": "converge_blue", "text": "Blue Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, + { "type": "vec2", "name": "converge_red", "text": "Red Linear Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, + { "type": "vec2", "name": "converge_green", "text": "Green Linear Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, + { "type": "vec2", "name": "converge_blue", "text": "Blue Linear Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, { "type": "vec2", "name": "radial_converge_red", "text": "Red Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, { "type": "vec2", "name": "radial_converge_green", "text": "Green Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, { "type": "vec2", "name": "radial_converge_blue", "text": "Blue Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, @@ -90,10 +90,11 @@ { "type": "float", "name": "scanline_alpha", "text": "Scanline Amount", "default": 0.50, "max": 1.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "scanline_scale", "text": "Overall Scanline Scale", "default": 1.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "scanline_bright_scale", "text": "Scanline Brightness Scale", "default": 2.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "scanline_height", "text": "Individual Scanline Scale", "default": 1.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "scanline_variation", "text": "Scanline Variation", "default": 1.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "scanline_bright_scale", "text": "Scanline Brightness Scale", "default": 2.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "scanline_bright_offset", "text": "Scanline Brightness Offset", "default": 4.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "scanline_jitter_amount", "text": "Scanline Jitter Amount", "default": 0.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "scanline_height", "text": "Individual Scanline Scale", "default": 1.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "scanline_variation", "text": "Scanline Variation", "default": 1.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "intenum", "name": "shadow_tile_mode", "text": "Shadow Mask Tile Mode", "default": 0, "max": 1, "min": 0, "step": 1, "format": "%s", "screen": "any", "strings": [ "Screen", "Source" ] }, @@ -108,13 +109,13 @@ { "type": "color", "name": "floor", "text": "Signal Floor, ", "default": [ 0.05, 0.05, 0.05 ], "max": [ 1.00, 1.00, 1.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "color", "name": "power", "text": "Signal Exponent, ", "default": [ 1.00, 1.00, 1.00 ], "max": [ 4.00, 4.00, 4.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "distortion", "text": "Screen Distortion Amount", "default": 0.05, "max": 2.00, "min": -2.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "cubic_distortion", "text": "Screen Cubic Distortion Amount", "default": 0.00, "max": 2.00, "min": -2.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "distort_corner", "text": "Distorted Corner Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "round_corner", "text": "Rounded Corner Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "smooth_border", "text": "Smooth Border Amount", "default": 0.03, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "vignetting", "text": "Vignetting Amount", "default": 0.08, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "reflection", "text": "Reflection Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" } + { "type": "float", "name": "distortion", "text": "Quadric Distortion Amount", "default": 0.05, "max": 2.00, "min": -2.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "cubic_distortion", "text": "Cubic Distortion Amount", "default": 0.00, "max": 2.00, "min": -2.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "distort_corner", "text": "Distorted Corner Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "round_corner", "text": "Rounded Corner Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "smooth_border", "text": "Smooth Border Amount", "default": 0.03, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "vignetting", "text": "Vignetting Amount", "default": 0.08, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "reflection", "text": "Reflection Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" } ], // parameters (optional): A list of procedurally-generated parameters that can be bound to entry uniforms. diff --git a/ini/presets/gba.ini b/ini/presets/gba.ini index 40b1274b52f..d895acafd6c 100644 --- a/ini/presets/gba.ini +++ b/ini/presets/gba.ini @@ -4,10 +4,10 @@ shadow_mask_tile_mode 1 shadow_mask_alpha 0.75 shadow_mask_texture slot-mask-aligned.png -shadow_mask_x_count 2 -shadow_mask_y_count 2 -shadow_mask_usize 0.1875 -shadow_mask_vsize 0.1875 +shadow_mask_x_count 4 +shadow_mask_y_count 4 +shadow_mask_usize 0.5 +shadow_mask_vsize 0.5 shadow_mask_uoffset 0.0 shadow_mask_voffset 0.0 distortion 0.0 diff --git a/ini/presets/lcd.ini b/ini/presets/lcd.ini index 40b1274b52f..d895acafd6c 100644 --- a/ini/presets/lcd.ini +++ b/ini/presets/lcd.ini @@ -4,10 +4,10 @@ shadow_mask_tile_mode 1 shadow_mask_alpha 0.75 shadow_mask_texture slot-mask-aligned.png -shadow_mask_x_count 2 -shadow_mask_y_count 2 -shadow_mask_usize 0.1875 -shadow_mask_vsize 0.1875 +shadow_mask_x_count 4 +shadow_mask_y_count 4 +shadow_mask_usize 0.5 +shadow_mask_vsize 0.5 shadow_mask_uoffset 0.0 shadow_mask_voffset 0.0 distortion 0.0 diff --git a/ini/presets/raster.ini b/ini/presets/raster.ini index 302ef5904fa..ddaee6cd802 100644 --- a/ini/presets/raster.ini +++ b/ini/presets/raster.ini @@ -4,10 +4,10 @@ shadow_mask_tile_mode 0 shadow_mask_alpha 0.35 shadow_mask_texture shadow-mask.png -shadow_mask_x_count 6 -shadow_mask_y_count 4 -shadow_mask_usize 0.1875 -shadow_mask_vsize 0.25 +shadow_mask_x_count 12 +shadow_mask_y_count 6 +shadow_mask_usize 0.5 +shadow_mask_vsize 0.5 shadow_mask_uoffset 0.0 shadow_mask_voffset 0.0 distortion 0.0 diff --git a/ini/presets/vector.ini b/ini/presets/vector.ini index f7311cceb38..fa52c7cace4 100644 --- a/ini/presets/vector.ini +++ b/ini/presets/vector.ini @@ -14,10 +14,10 @@ hlsl_oversampling 0 shadow_mask_tile_mode 0 shadow_mask_alpha 0.5 shadow_mask_texture shadow-mask.png -shadow_mask_x_count 6 -shadow_mask_y_count 4 -shadow_mask_usize 0.1875 -shadow_mask_vsize 0.25 +shadow_mask_x_count 12 +shadow_mask_y_count 6 +shadow_mask_usize 0.5 +shadow_mask_vsize 0.5 shadow_mask_uoffset 0.0 shadow_mask_voffset 0.0 distortion 0.0 diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index fef873f4309..72c172b898d 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -888,8 +888,8 @@ int shaders::create_resources(bool reset, std::vector& sliders) texture.palette = nullptr; texture.seqid = 0; - // now create it (no prescale, but wrap) - shadow_texture = new texture_info(d3d->get_texture_manager(), &texture, 1, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32) | PRIMFLAG_TEXWRAP_MASK); + // now create it (no prescale, no wrap) + shadow_texture = new texture_info(d3d->get_texture_manager(), &texture, 1, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32)); } const char *fx_dir = downcast(machine->options()).screen_post_fx_dir(); @@ -2359,42 +2359,42 @@ slider_desc shaders::s_sliders[] = { "Vector Length Attenuation", 0, 50, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_VECTOR, SLIDER_VECTOR_ATTENUATION, 0.01f, "%1.2f", {} }, { "Vector Attenuation Length Limit", 1, 500, 1000, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_VECTOR, SLIDER_VECTOR_LENGTH_MAX, 1.0f, "%4f", {} }, { "Shadow Mask Tile Mode", 0, 0, 1, 1, SLIDER_INT_ENUM, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_TILE_MODE, 0, "%s", { "Screen", "Source" } }, - { "Shadow Mask Darkness", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_ALPHA, 0.01f, "%1.2f", {} }, - { "Shadow Mask X Count", 1, 1, 1024, 1, SLIDER_INT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_X_COUNT, 0, "%d", {} }, - { "Shadow Mask Y Count", 1, 1, 1024, 1, SLIDER_INT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_Y_COUNT, 0, "%d", {} }, - { "Shadow Mask Pixel Count X", 1, 1, 64, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_U_SIZE, 0.03125f, "%2.5f", {} }, - { "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 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", {} }, - { "Image Vignetting", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_VIGNETTING, 0.01f, "%1.2f", {} }, - { "Scanline Darkness", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_ALPHA, 0.01f, "%1.2f", {} }, - { "Scanline Screen Scale", 0, 100, 400, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_SCALE, 0.01f, "%1.2f", {} }, - { "Scanline Height", 0, 100, 400, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_HEIGHT, 0.01f, "%1.2f", {} }, - { "Scanline Height Variation", 0, 100, 400, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_VARIATION, 0.01f, "%1.2f", {} }, - { "Scanline Brightness", 0, 100, 200, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_BRIGHT_SCALE, 0.01f, "%1.2f", {} }, - { "Scanline Brightness Overdrive", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_BRIGHT_OFFSET, 0.01f, "%1.2f", {} }, - { "Scanline Jitter", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_JITTER, 0.01f, "%1.2f", {} }, - { "Hum Bar Darkness", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_HUM_BAR_ALPHA, 0.01f, "%2.2f", {} }, + { "Shadow Mask Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_ALPHA, 0.01f, "%1.2f", {} }, + { "Shadow Mask Pixel X Count", 1, 1, 1024, 1, SLIDER_INT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_X_COUNT, 0, "%d", {} }, + { "Shadow Mask Pixel Y Count", 1, 1, 1024, 1, SLIDER_INT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_Y_COUNT, 0, "%d", {} }, + { "Shadow Mask U Size", 1, 1, 32, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_U_SIZE, 0.03125f, "%2.5f", {} }, + { "Shadow Mask V Size", 1, 1, 32, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_V_SIZE, 0.03125f, "%2.5f", {} }, + { "Shadow Mask U Offset", -100, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_U_OFFSET, 0.01f, "%1.2f", {} }, + { "Shadow Mask V Offset", -100, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_V_OFFSET, 0.01f, "%1.2f", {} }, + { "Quadric Distortion Amount", -200, 0, 200, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_DISTORTION, 0.01f, "%2.2f", {} }, + { "Cubic Distortion Amount", -200, 0, 200, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_CUBIC_DISTORTION, 0.01f, "%2.2f", {} }, + { "Distorted Corner Amount", 0, 0, 200, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_DISTORT_CORNER, 0.01f, "%1.2f", {} }, + { "Rounded Corner Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_ROUND_CORNER, 0.01f, "%1.2f", {} }, + { "Smooth Border Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SMOOTH_BORDER, 0.01f, "%1.2f", {} }, + { "Reflection Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_REFLECTION, 0.01f, "%1.2f", {} }, + { "Vignetting Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_VIGNETTING, 0.01f, "%1.2f", {} }, + { "Scanline Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_ALPHA, 0.01f, "%1.2f", {} }, + { "Overall Scanline Scale", 0, 100, 400, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_SCALE, 0.01f, "%1.2f", {} }, + { "Individual Scanline Scale", 0, 100, 400, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_HEIGHT, 0.01f, "%1.2f", {} }, + { "Scanline Variation", 0, 100, 400, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_VARIATION, 0.01f, "%1.2f", {} }, + { "Scanline Brightness Scale", 0, 100, 200, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_BRIGHT_SCALE, 0.01f, "%1.2f", {} }, + { "Scanline Brightness Offset", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_BRIGHT_OFFSET, 0.01f, "%1.2f", {} }, + { "Scanline Jitter Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_SCANLINE_JITTER, 0.01f, "%1.2f", {} }, + { "Hum Bar Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_HUM_BAR_ALPHA, 0.01f, "%2.2f", {} }, { "Defocus", 0, 0, 100, 1, SLIDER_VEC2, SLIDER_SCREEN_TYPE_ANY, SLIDER_DEFOCUS, 0.1f, "%2.1f", {} }, - { "Position Offset X,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_CONVERGE_X, 0.1f, "%3.1f", {} }, - { "Position Offset Y,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_CONVERGE_Y, 0.1f, "%3.1f", {} }, - { "Convergence X,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_RADIAL_CONVERGE_X, 0.1f, "%3.1f", {} }, - { "Convergence Y,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_RADIAL_CONVERGE_Y, 0.1f, "%3.1f", {} }, - { "Red Input Percent in", -400, 0, 400, 5, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_RED_RATIO, 0.005f, "%2.3f", {} }, - { "Green Input Percent in", -400, 0, 400, 5, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_GREEN_RATIO, 0.005f, "%2.3f", {} }, - { "Blue Input Percent in", -400, 0, 400, 5, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_BLUE_RATIO, 0.005f, "%2.3f", {} }, - { "Saturation", 0, 100, 400, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SATURATION, 0.1f, "%2.2f", {} }, - { "DC Offset,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_OFFSET, 0.01f, "%2.2f", {} }, - { "Scale,", -200, 100, 200, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_SCALE, 0.01f, "%2.2f", {} }, - { "Gamma,", -80, 0, 80, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_POWER, 0.1f, "%2.2f", {} }, - { "Floor,", 0, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_FLOOR, 0.01f, "%2.2f", {} }, - { "Phosphor Life,", 0, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_PHOSPHOR, 0.01f, "%2.2f", {} }, + { "Linear Convergence X,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_CONVERGE_X, 0.1f, "%3.1f",{} }, + { "Linear Convergence Y,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_CONVERGE_Y, 0.1f, "%3.1f", {} }, + { "Radial Convergence X,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_RADIAL_CONVERGE_X, 0.1f, "%3.1f", {} }, + { "Radial Convergence Y,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_RADIAL_CONVERGE_Y, 0.1f, "%3.1f", {} }, + { "Red Output from", -400, 0, 400, 5, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_RED_RATIO, 0.005f, "%2.3f", {} }, + { "Green Output from", -400, 0, 400, 5, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_GREEN_RATIO, 0.005f, "%2.3f", {} }, + { "Blue Output from", -400, 0, 400, 5, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_BLUE_RATIO, 0.005f, "%2.3f", {} }, + { "Color Saturation", 0, 1000, 4000, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_SATURATION, 0.01f, "%2.2f", {} }, + { "Signal Offset,", -100, 0, 100, 1, SLIDER_COLOR, SLIDER_SCREEN_TYPE_ANY, SLIDER_OFFSET, 0.01f, "%2.2f", {} }, + { "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,", 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", {} }, @@ -2407,18 +2407,18 @@ slider_desc shaders::s_sliders[] = { "Bloom Level 6 Scale", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_BLOOM_LVL6_SCALE, 0.01f, "%1.2f", {} }, { "Bloom Level 7 Scale", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_BLOOM_LVL7_SCALE, 0.01f, "%1.2f", {} }, { "Bloom Level 8 Scale", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_ANY, SLIDER_BLOOM_LVL8_SCALE, 0.01f, "%1.2f", {} }, - { "NTSC processing", 0, 0, 1, 1, SLIDER_INT_ENUM, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_ENABLE, 0, "%s", { "Off", "On" } }, - { "Signal Jitter", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_JITTER, 0.01f, "%1.2f", {} }, - { "A Value", -100, 50, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_A_VALUE, 0.01f, "%1.2f", {} }, - { "B Value", -100, 50, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_B_VALUE, 0.01f, "%1.2f", {} }, - { "Incoming Pixel Clock Scaling", -300, 100, 300, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_P_VALUE, 0.01f, "%1.2f", {} }, - { "Outgoing Color Carrier Phase", -300, 0, 300, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_O_VALUE, 0.01f, "%1.2f", {} }, - { "Color Carrier Frequency", 0, 35795, 60000, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_CC_VALUE, 0.001f, "%1.4f", {} }, - { "Y Notch", 0, 100, 600, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_N_VALUE, 0.01f, "%1.4f", {} }, - { "Y Frequency", 0, 600, 600, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_Y_VALUE, 0.01f, "%1.4f", {} }, - { "I Frequency", 0, 120, 600, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_I_VALUE, 0.01f, "%1.4f", {} }, - { "Q Frequency", 0, 60, 600, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_Q_VALUE, 0.01f, "%1.4f", {} }, - { "Scanline Duration", 0, 5260, 10000, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_SCAN_TIME, 0.01f, "%1.2f", {} }, + { "NTSC Processing", 0, 0, 1, 1, SLIDER_INT_ENUM, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_ENABLE, 0, "%s", { "Off", "On" } }, + { "NTSC Frame Jitter Offset", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_JITTER, 0.01f, "%1.2f", {} }, + { "NTSC A Value", -100, 50, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_A_VALUE, 0.01f, "%1.2f", {} }, + { "NTSC B Value", -100, 50, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_B_VALUE, 0.01f, "%1.2f", {} }, + { "NTSC Incoming Phase Pixel Clock Scale",-300, 100, 300, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_P_VALUE, 0.01f, "%1.2f", {} }, + { "NTSC Outgoing Phase Offset", -300, 0, 300, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_O_VALUE, 0.01f, "%1.2f", {} }, + { "NTSC Color Carrier (Hz)", 0, 35795, 60000, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_CC_VALUE, 0.001f, "%1.4f", {} }, + { "NTSC Color Notch Filter Width", 0, 100, 600, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_N_VALUE, 0.01f, "%1.4f", {} }, + { "NTSC Y Signal Bandwidth (Hz)", 0, 600, 600, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_Y_VALUE, 0.01f, "%1.4f", {} }, + { "NTSC I Signal Bandwidth (Hz)", 0, 120, 600, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_I_VALUE, 0.01f, "%1.4f", {} }, + { "NTSC Q Signal Bandwidth (Hz)", 0, 60, 600, 5, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_Q_VALUE, 0.01f, "%1.4f", {} }, + { "NTSC Scanline Duration (uSec)", 0, 5260, 10000, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_LCD_OR_RASTER, SLIDER_NTSC_SCAN_TIME, 0.01f, "%1.2f", {} }, { nullptr, 0, 0, 0, 0, 0, 0, -1, 0, nullptr, {} } }; diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp index 6c682a80409..9d41a91ec02 100644 --- a/src/osd/modules/render/drawd3d.cpp +++ b/src/osd/modules/render/drawd3d.cpp @@ -40,8 +40,6 @@ extern void mtlog_add(const char *event); // CONSTANTS //============================================================ -#define ENABLE_BORDER_PIX (1) - enum { TEXTURE_TYPE_PLAIN, @@ -2265,14 +2263,12 @@ void texture_info::compute_size(int texwidth, int texheight) bool shaders_enabled = m_renderer->get_shaders()->enabled(); bool wrap_texture = (m_flags & PRIMFLAG_TEXWRAP_MASK) == PRIMFLAG_TEXWRAP_MASK; - bool border_texture = ENABLE_BORDER_PIX && !wrap_texture; - bool surface_texture = m_type == TEXTURE_TYPE_SURFACE; - // skip border when shaders are enabled and we're not creating a surface (UI) texture - if (!shaders_enabled || surface_texture) + // skip border when shaders are enabled + if (!shaders_enabled) { // if we're not wrapping, add a 1-2 pixel border on all sides - if (border_texture) + if (!wrap_texture) { // note we need 2 pixels in X for YUY textures m_xborderpix = (PRIMFLAG_GET_TEXFORMAT(m_flags) == TEXFORMAT_YUY16) ? 2 : 1; @@ -2283,8 +2279,8 @@ void texture_info::compute_size(int texwidth, int texheight) finalwidth += 2 * m_xborderpix; finalheight += 2 * m_yborderpix; - // take texture size as given when shaders are enabled and we're not creating a surface (UI) texture, still update wrapped textures - if (!shaders_enabled || surface_texture || wrap_texture) + // take texture size as given when shaders are enabled + if (!shaders_enabled) { compute_size_subroutine(finalwidth, finalheight, &finalwidth, &finalheight); -- cgit v1.2.3