trunk/src/osd/windows/d3dhlsl.c
| r23470 | r23471 | |
| 88 | 88 | |
| 89 | 89 | namespace d3d |
| 90 | 90 | { |
| 91 | |
| 91 | 92 | hlsl_options shaders::s_hlsl_presets[4] = |
| 92 | 93 | { |
| 93 | 94 | { // 25% Shadow mask, 50% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation |
| r23470 | r23471 | |
| 110 | 111 | { 0.25f,0.25f,0.25f}, |
| 111 | 112 | 1.2f, |
| 112 | 113 | false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, |
| 113 | | 0.0f, 0.1f, 0.9f, 4.0f, |
| 114 | 0.9f, 4.0f, |
| 114 | 115 | 1.0f, 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f |
| 115 | 116 | }, |
| 116 | 117 | { // 25% Shadow mask, 0% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation |
| r23470 | r23471 | |
| 133 | 134 | { 0.25f,0.25f,0.25f}, |
| 134 | 135 | 1.2f, |
| 135 | 136 | false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, |
| 136 | | 0.0f, 0.1f, 0.9f, 4.0f, |
| 137 | 0.9f, 4.0f, |
| 137 | 138 | 1.0f, 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f |
| 138 | 139 | }, |
| 139 | 140 | { // 25% Shadow mask, 0% Scanlines, 0% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation |
| r23470 | r23471 | |
| 156 | 157 | { 0.25f,0.25f,0.25f}, |
| 157 | 158 | 1.2f, |
| 158 | 159 | false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, |
| 159 | | 0.0f, 0.1f, 0.9f, 4.0f, |
| 160 | 0.9f, 4.0f, |
| 160 | 161 | 1.0f, 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f |
| 161 | 162 | }, |
| 162 | 163 | { // 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 |
| r23470 | r23471 | |
| 179 | 180 | { 0.7f, 0.7f, 0.7f}, |
| 180 | 181 | 0.8f, |
| 181 | 182 | false, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, |
| 182 | | 0.0f, 0.1f, 0.9f, 4.0f, |
| 183 | 0.9f, 4.0f, |
| 183 | 184 | 1.0f, 0.21f, 0.19f, 0.17f, 0.15f, 0.14f, 0.13f, 0.12f, 0.11f, 0.10f, 0.09f |
| 184 | 185 | }, |
| 185 | 186 | }; |
| r23470 | r23471 | |
| 929 | 930 | sscanf(buf, "yiq_phase_count %d\n", &options->yiq_phase_count); |
| 930 | 931 | |
| 931 | 932 | ini_file.gets(buf, 1024); |
| 932 | | sscanf(buf, "vector_time_scale %f\n", &options->vector_time_scale); |
| 933 | | |
| 934 | | ini_file.gets(buf, 1024); |
| 935 | | sscanf(buf, "vector_time_period %f\n", &options->vector_time_period); |
| 936 | | |
| 937 | | ini_file.gets(buf, 1024); |
| 938 | 933 | sscanf(buf, "vector_length_scale %f\n", &options->vector_length_scale); |
| 939 | 934 | |
| 940 | 935 | ini_file.gets(buf, 1024); |
| r23470 | r23471 | |
| 993 | 988 | options->yiq_q = winoptions.screen_yiq_q(); |
| 994 | 989 | options->yiq_scan_time = winoptions.screen_yiq_scan_time(); |
| 995 | 990 | options->yiq_phase_count = winoptions.screen_yiq_phase_count(); |
| 996 | | options->vector_time_scale = winoptions.screen_vector_time_scale(); |
| 997 | | options->vector_time_period = winoptions.screen_vector_time_period(); |
| 998 | 991 | options->vector_length_scale = winoptions.screen_vector_length_scale(); |
| 999 | 992 | options->vector_length_ratio = winoptions.screen_vector_length_ratio(); |
| 1000 | 993 | options->vector_bloom_scale = winoptions.screen_vector_bloom_scale(); |
| r23470 | r23471 | |
| 2217 | 2210 | (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->get_height()); |
| 2218 | 2211 | } |
| 2219 | 2212 | |
| 2220 | | float time_params[2] = { poly->get_line_time(), options->vector_time_scale }; |
| 2213 | float time_params[2] = { 0.0f, 0.0f }; |
| 2221 | 2214 | float length_params[3] = { poly->get_line_length(), options->vector_length_scale, options->vector_length_ratio }; |
| 2222 | 2215 | (*d3dintf->effect.set_vector)(curr_effect, "TimeParams", 2, time_params); |
| 2223 | 2216 | (*d3dintf->effect.set_vector)(curr_effect, "LengthParams", 3, length_params); |
| r23470 | r23471 | |
| 2735 | 2728 | file.printf("yiq_q %f\n", options->yiq_q); |
| 2736 | 2729 | file.printf("yiq_scan_time %f\n", options->yiq_scan_time); |
| 2737 | 2730 | file.printf("yiq_phase_count %d\n", options->yiq_phase_count); |
| 2738 | | file.printf("vector_time_scale %f\n", options->vector_time_scale); |
| 2739 | | file.printf("vector_time_period %f\n", options->vector_time_period); |
| 2740 | 2731 | file.printf("vector_length_scale %f\n", options->vector_length_scale); |
| 2741 | 2732 | file.printf("vector_length_ratio %f\n", options->vector_length_ratio); |
| 2742 | 2733 | } |
| r23470 | r23471 | |
| 3001 | 2992 | return slider_set(&(((hlsl_options*)arg)->defocus[1]), 0.5f, "%2.1f", string, newval); |
| 3002 | 2993 | } |
| 3003 | 2994 | |
| 3004 | | static INT32 slider_post_defocus_x(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3005 | | { |
| 3006 | | ((hlsl_options*)arg)->params_dirty = true; |
| 3007 | | return slider_set(&(((hlsl_options*)arg)->defocus[2]), 0.5f, "%2.1f", string, newval); |
| 3008 | | } |
| 3009 | | |
| 3010 | | static INT32 slider_post_defocus_y(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3011 | | { |
| 3012 | | ((hlsl_options*)arg)->params_dirty = true; |
| 3013 | | return slider_set(&(((hlsl_options*)arg)->defocus[3]), 0.5f, "%2.1f", string, newval); |
| 3014 | | } |
| 3015 | | |
| 3016 | 2995 | static INT32 slider_red_converge_x(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3017 | 2996 | { |
| 3018 | 2997 | ((hlsl_options*)arg)->params_dirty = true; |
| r23470 | r23471 | |
| 3235 | 3214 | return slider_set(&(((hlsl_options*)arg)->saturation), 0.01f, "%2.2f", string, newval); |
| 3236 | 3215 | } |
| 3237 | 3216 | |
| 3217 | static INT32 slider_vector_attenuation(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3218 | { |
| 3219 | ((hlsl_options*)arg)->params_dirty = true; |
| 3220 | return slider_set(&(((hlsl_options*)arg)->vector_length_scale), 0.01f, "%1.2f", string, newval); |
| 3221 | } |
| 3222 | |
| 3223 | static INT32 slider_vector_length_max(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3224 | { |
| 3225 | ((hlsl_options*)arg)->params_dirty = true; |
| 3226 | return slider_set(&(((hlsl_options*)arg)->vector_length_ratio), 1.0f, "%4f", string, newval); |
| 3227 | } |
| 3228 | |
| 3229 | static INT32 slider_vector_bloom_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3230 | { |
| 3231 | ((hlsl_options*)arg)->params_dirty = true; |
| 3232 | return slider_set(&(((hlsl_options*)arg)->vector_bloom_scale), 0.001f, "%1.3f", string, newval); |
| 3233 | } |
| 3234 | |
| 3235 | static INT32 slider_raster_bloom_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3236 | { |
| 3237 | ((hlsl_options*)arg)->params_dirty = true; |
| 3238 | return slider_set(&(((hlsl_options*)arg)->raster_bloom_scale), 0.001f, "%1.3f", string, newval); |
| 3239 | } |
| 3240 | |
| 3241 | static INT32 slider_bloom_lvl0_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3242 | { |
| 3243 | ((hlsl_options*)arg)->params_dirty = true; |
| 3244 | return slider_set(&(((hlsl_options*)arg)->bloom_level0_weight), 0.01f, "%1.2f", string, newval); |
| 3245 | } |
| 3246 | |
| 3247 | static INT32 slider_bloom_lvl1_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3248 | { |
| 3249 | ((hlsl_options*)arg)->params_dirty = true; |
| 3250 | return slider_set(&(((hlsl_options*)arg)->bloom_level1_weight), 0.01f, "%1.2f", string, newval); |
| 3251 | } |
| 3252 | |
| 3253 | static INT32 slider_bloom_lvl2_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3254 | { |
| 3255 | ((hlsl_options*)arg)->params_dirty = true; |
| 3256 | return slider_set(&(((hlsl_options*)arg)->bloom_level2_weight), 0.01f, "%1.2f", string, newval); |
| 3257 | } |
| 3258 | |
| 3259 | static INT32 slider_bloom_lvl3_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3260 | { |
| 3261 | ((hlsl_options*)arg)->params_dirty = true; |
| 3262 | return slider_set(&(((hlsl_options*)arg)->bloom_level3_weight), 0.01f, "%1.2f", string, newval); |
| 3263 | } |
| 3264 | |
| 3265 | static INT32 slider_bloom_lvl4_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3266 | { |
| 3267 | ((hlsl_options*)arg)->params_dirty = true; |
| 3268 | return slider_set(&(((hlsl_options*)arg)->bloom_level4_weight), 0.01f, "%1.2f", string, newval); |
| 3269 | } |
| 3270 | |
| 3271 | static INT32 slider_bloom_lvl5_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3272 | { |
| 3273 | ((hlsl_options*)arg)->params_dirty = true; |
| 3274 | return slider_set(&(((hlsl_options*)arg)->bloom_level5_weight), 0.01f, "%1.2f", string, newval); |
| 3275 | } |
| 3276 | |
| 3277 | static INT32 slider_bloom_lvl6_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3278 | { |
| 3279 | ((hlsl_options*)arg)->params_dirty = true; |
| 3280 | return slider_set(&(((hlsl_options*)arg)->bloom_level6_weight), 0.01f, "%1.2f", string, newval); |
| 3281 | } |
| 3282 | |
| 3283 | static INT32 slider_bloom_lvl7_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3284 | { |
| 3285 | ((hlsl_options*)arg)->params_dirty = true; |
| 3286 | return slider_set(&(((hlsl_options*)arg)->bloom_level7_weight), 0.01f, "%1.2f", string, newval); |
| 3287 | } |
| 3288 | |
| 3289 | static INT32 slider_bloom_lvl8_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3290 | { |
| 3291 | ((hlsl_options*)arg)->params_dirty = true; |
| 3292 | return slider_set(&(((hlsl_options*)arg)->bloom_level8_weight), 0.01f, "%1.2f", string, newval); |
| 3293 | } |
| 3294 | |
| 3295 | static INT32 slider_bloom_lvl9_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3296 | { |
| 3297 | ((hlsl_options*)arg)->params_dirty = true; |
| 3298 | return slider_set(&(((hlsl_options*)arg)->bloom_level9_weight), 0.01f, "%1.2f", string, newval); |
| 3299 | } |
| 3300 | |
| 3301 | static INT32 slider_bloom_lvl10_scale(running_machine &machine, void *arg, astring *string, INT32 newval) |
| 3302 | { |
| 3303 | ((hlsl_options*)arg)->params_dirty = true; |
| 3304 | return slider_set(&(((hlsl_options*)arg)->bloom_level10_weight), 0.01f, "%1.2f", string, newval); |
| 3305 | } |
| 3306 | |
| 3238 | 3307 | //============================================================ |
| 3239 | 3308 | // init_slider_list |
| 3240 | 3309 | //============================================================ |
| 3241 | 3310 | |
| 3311 | shaders::slider_desc shaders::s_sliders[] = |
| 3312 | { |
| 3313 | { "Shadow Mask Darkness", 0, 0, 100, 1, slider_shadow_mask_alpha }, |
| 3314 | { "Shadow Mask X Count", 1, 320, 1024, 1, slider_shadow_mask_x_count }, |
| 3315 | { "Shadow Mask Y Count", 1, 240, 1024, 1, slider_shadow_mask_y_count }, |
| 3316 | { "Shadow Mask Pixel Count X", 1, 6, 64, 1, slider_shadow_mask_usize }, |
| 3317 | { "Shadow Mask Pixel Count Y", 1, 7, 64, 1, slider_shadow_mask_vsize }, |
| 3318 | { "Shadow Mask Pixel Count Y", 1, 7, 64, 1, slider_shadow_mask_vsize }, |
| 3319 | { "Shadow Mask Pixel Count Y", 1, 7, 64, 1, slider_shadow_mask_vsize }, |
| 3320 | { "Shadow Mask Pixel Count Y", 1, 7, 64, 1, slider_shadow_mask_vsize }, |
| 3321 | { "Screen Curvature", 0, 3, 100, 1, slider_curvature }, |
| 3322 | { "Image Pincushion", 0, 3, 100, 1, slider_pincushion }, |
| 3323 | { "Scanline Darkness", 0, 100, 100, 1, slider_scanline_alpha }, |
| 3324 | { "Scanline Screen Height", 1, 20, 80, 1, slider_scanline_scale }, |
| 3325 | { "Scanline Indiv. Height", 1, 20, 80, 1, slider_scanline_height }, |
| 3326 | { "Scanline Brightness", 0, 20, 40, 1, slider_scanline_bright_scale }, |
| 3327 | { "Scanline Brightness Overdrive", 0, 0, 20, 1, slider_scanline_bright_offset }, |
| 3328 | { "Scanline Jitter", 0, 0, 40, 1, slider_scanline_offset }, |
| 3329 | { "Defocus X", 0, 0, 64, 1, slider_defocus_x }, |
| 3330 | { "Defocus Y", 0, 0, 64, 1, slider_defocus_y }, |
| 3331 | { "Red Position Offset X", -1500, 3, 1500, 1, slider_red_converge_x }, |
| 3332 | { "Red Position Offset Y", -1500, 0, 1500, 1, slider_red_converge_y }, |
| 3333 | { "Green Position Offset X", -1500, 0, 1500, 1, slider_green_converge_x }, |
| 3334 | { "Green Position Offset Y", -1500, 3, 1500, 1, slider_green_converge_y }, |
| 3335 | { "Blue Position Offset X", -1500, 3, 1500, 1, slider_blue_converge_x }, |
| 3336 | { "Blue Position Offset Y", -1500, 3, 1500, 1, slider_blue_converge_y }, |
| 3337 | { "Red Convergence X", -1500, 0, 1500, 1, slider_red_radial_converge_x }, |
| 3338 | { "Red Convergence Y", -1500, 0, 1500, 1, slider_red_radial_converge_y }, |
| 3339 | { "Green Convergence X", -1500, 0, 1500, 1, slider_green_radial_converge_x }, |
| 3340 | { "Green Convergence Y", -1500, 0, 1500, 1, slider_green_radial_converge_y }, |
| 3341 | { "Blue Convergence X", -1500, 0, 1500, 1, slider_blue_radial_converge_x }, |
| 3342 | { "Blue Convergence Y", -1500, 0, 1500, 1, slider_blue_radial_converge_y }, |
| 3343 | { "Red Output from Red Input", -400, 0, 400, 5, slider_red_from_r }, |
| 3344 | { "Red Output from Green Input", -400, 0, 400, 5, slider_red_from_g }, |
| 3345 | { "Red Output from Blue Input", -400, 0, 400, 5, slider_red_from_b }, |
| 3346 | { "Green Output from Red Input", -400, 0, 400, 5, slider_green_from_r }, |
| 3347 | { "Green Output from Green Input", -400, 0, 400, 5, slider_green_from_g }, |
| 3348 | { "Green Output from Blue Input", -400, 0, 400, 5, slider_green_from_b }, |
| 3349 | { "Blue Output from Red Input", -400, 0, 400, 5, slider_blue_from_r }, |
| 3350 | { "Blue Output from Green Input", -400, 0, 400, 5, slider_blue_from_g }, |
| 3351 | { "Blue Output from Blue Input", -400, 0, 400, 5, slider_blue_from_b }, |
| 3352 | { "Saturation", 0, 140, 400, 1, slider_saturation }, |
| 3353 | { "Red DC Offset", -100, 0, 100, 1, slider_red_offset }, |
| 3354 | { "Green DC Offset", -100, 0, 100, 1, slider_green_offset }, |
| 3355 | { "Blue DC Offset", -100, 0, 100, 1, slider_blue_offset }, |
| 3356 | { "Red Scale", -200, 95, 200, 1, slider_red_scale }, |
| 3357 | { "Green Scale", -200, 95, 200, 1, slider_green_scale }, |
| 3358 | { "Blue Scale", -200, 95, 200, 1, slider_blue_scale }, |
| 3359 | { "Red Gamma", -80, 16, 80, 1, slider_red_power }, |
| 3360 | { "Green Gamma", -80, 16, 80, 1, slider_green_power }, |
| 3361 | { "Blue Gamma", -80, 16, 80, 1, slider_blue_power }, |
| 3362 | { "Red Floor", 0, 5, 100, 1, slider_red_floor }, |
| 3363 | { "Green Floor", 0, 5, 100, 1, slider_green_floor }, |
| 3364 | { "Blue Floor", 0, 5, 100, 1, slider_blue_floor }, |
| 3365 | { "Red Phosphor Life", 0, 40, 100, 1, slider_red_phosphor_life }, |
| 3366 | { "Green Phosphor Life", 0, 40, 100, 1, slider_green_phosphor_life }, |
| 3367 | { "Blue Phosphor Life", 0, 40, 100, 1, slider_blue_phosphor_life }, |
| 3368 | { "Vector Length Attenuation", 0, 80, 100, 1, slider_vector_attenuation }, |
| 3369 | { "Vector Attenuation Length Limit", 1, 500, 1000, 1, slider_vector_length_max }, |
| 3370 | { "Vector Bloom Scale", 0, 300, 1000, 5, slider_vector_bloom_scale }, |
| 3371 | { "Raster Bloom Scale", 0, 225, 1000, 5, slider_raster_bloom_scale }, |
| 3372 | { "Bloom Level 0 Scale", 0, 100, 100, 1, slider_bloom_lvl0_scale }, |
| 3373 | { "Bloom Level 1 Scale", 0, 21, 100, 1, slider_bloom_lvl1_scale }, |
| 3374 | { "Bloom Level 2 Scale", 0, 19, 100, 1, slider_bloom_lvl2_scale }, |
| 3375 | { "Bloom Level 3 Scale", 0, 17, 100, 1, slider_bloom_lvl3_scale }, |
| 3376 | { "Bloom Level 4 Scale", 0, 15, 100, 1, slider_bloom_lvl4_scale }, |
| 3377 | { "Bloom Level 5 Scale", 0, 14, 100, 1, slider_bloom_lvl5_scale }, |
| 3378 | { "Bloom Level 6 Scale", 0, 13, 100, 1, slider_bloom_lvl6_scale }, |
| 3379 | { "Bloom Level 7 Scale", 0, 12, 100, 1, slider_bloom_lvl7_scale }, |
| 3380 | { "Bloom Level 8 Scale", 0, 11, 100, 1, slider_bloom_lvl8_scale }, |
| 3381 | { "Bloom Level 9 Scale", 0, 10, 100, 1, slider_bloom_lvl9_scale }, |
| 3382 | { "Bloom Level 10 Scale", 0, 9, 100, 1, slider_bloom_lvl10_scale }, |
| 3383 | { NULL, 0, 0, 0, 0, NULL }, |
| 3384 | }; |
| 3385 | |
| 3242 | 3386 | slider_state *shaders::init_slider_list() |
| 3243 | 3387 | { |
| 3244 | 3388 | if (!master_enable || !d3dintf->post_fx_available) |
| r23470 | r23471 | |
| 3249 | 3393 | |
| 3250 | 3394 | slider_state *listhead = NULL; |
| 3251 | 3395 | slider_state **tailptr = &listhead; |
| 3252 | | astring string; |
| 3253 | 3396 | |
| 3254 | | *tailptr = slider_alloc(window->machine(), "Shadow Mask Darkness", 0, 0, 100, 1, slider_shadow_mask_alpha, (void*)options); tailptr = &(*tailptr)->next; |
| 3255 | | *tailptr = slider_alloc(window->machine(), "Shadow Mask X Count", 1, 640, 1024, 1, slider_shadow_mask_x_count, (void*)options); tailptr = &(*tailptr)->next; |
| 3256 | | *tailptr = slider_alloc(window->machine(), "Shadow Mask Y Count", 1, 480, 1024, 1, slider_shadow_mask_y_count, (void*)options); tailptr = &(*tailptr)->next; |
| 3257 | | *tailptr = slider_alloc(window->machine(), "Shadow Mask Pixel Count X", 1, 3, 32, 1, slider_shadow_mask_usize, (void*)options); tailptr = &(*tailptr)->next; |
| 3258 | | *tailptr = slider_alloc(window->machine(), "Shadow Mask Pixel Count Y", 1, 3, 32, 1, slider_shadow_mask_vsize, (void*)options); tailptr = &(*tailptr)->next; |
| 3259 | | *tailptr = slider_alloc(window->machine(), "Screen Curvature", 0, 0, 100, 1, slider_curvature, (void*)options); tailptr = &(*tailptr)->next; |
| 3260 | | *tailptr = slider_alloc(window->machine(), "Image Pincushion", 0, 0, 100, 1, slider_pincushion, (void*)options); tailptr = &(*tailptr)->next; |
| 3261 | | *tailptr = slider_alloc(window->machine(), "Scanline Darkness", 0, 0, 100, 1, slider_scanline_alpha, (void*)options); tailptr = &(*tailptr)->next; |
| 3262 | | *tailptr = slider_alloc(window->machine(), "Scanline Screen Height", 1, 20, 80, 1, slider_scanline_scale, (void*)options); tailptr = &(*tailptr)->next; |
| 3263 | | *tailptr = slider_alloc(window->machine(), "Scanline Indiv. Height", 1, 10, 80, 1, slider_scanline_height, (void*)options); tailptr = &(*tailptr)->next; |
| 3264 | | *tailptr = slider_alloc(window->machine(), "Scanline Brightness", 0, 20, 40, 1, slider_scanline_bright_scale, (void*)options); tailptr = &(*tailptr)->next; |
| 3265 | | *tailptr = slider_alloc(window->machine(), "Scanline Brightness Overdrive", 0, 12, 20, 1, slider_scanline_bright_offset, (void*)options); tailptr = &(*tailptr)->next; |
| 3266 | | *tailptr = slider_alloc(window->machine(), "Scanline Jitter", 0, 0, 40, 1, slider_scanline_offset, (void*)options); tailptr = &(*tailptr)->next; |
| 3267 | | *tailptr = slider_alloc(window->machine(), "Defocus X", 0, 0, 64, 1, slider_defocus_x, (void*)options); tailptr = &(*tailptr)->next; |
| 3268 | | *tailptr = slider_alloc(window->machine(), "Defocus Y", 0, 0, 64, 1, slider_defocus_y, (void*)options); tailptr = &(*tailptr)->next; |
| 3269 | | *tailptr = slider_alloc(window->machine(), "Phosphor Defocus X", 0, 0, 64, 1, slider_post_defocus_x, (void*)options); tailptr = &(*tailptr)->next; |
| 3270 | | *tailptr = slider_alloc(window->machine(), "Phosphor Defocus Y", 0, 0, 64, 1, slider_post_defocus_y, (void*)options); tailptr = &(*tailptr)->next; |
| 3271 | | *tailptr = slider_alloc(window->machine(), "Red Position Offset X", -1500, 0, 1500, 1, slider_red_converge_x, (void*)options); tailptr = &(*tailptr)->next; |
| 3272 | | *tailptr = slider_alloc(window->machine(), "Red Position Offset Y", -1500, 0, 1500, 1, slider_red_converge_y, (void*)options); tailptr = &(*tailptr)->next; |
| 3273 | | *tailptr = slider_alloc(window->machine(), "Green Position Offset X", -1500, 0, 1500, 1, slider_green_converge_x, (void*)options); tailptr = &(*tailptr)->next; |
| 3274 | | *tailptr = slider_alloc(window->machine(), "Green Position Offset Y", -1500, 0, 1500, 1, slider_green_converge_y, (void*)options); tailptr = &(*tailptr)->next; |
| 3275 | | *tailptr = slider_alloc(window->machine(), "Blue Position Offset X", -1500, 0, 1500, 1, slider_blue_converge_x, (void*)options); tailptr = &(*tailptr)->next; |
| 3276 | | *tailptr = slider_alloc(window->machine(), "Blue Position Offset Y", -1500, 0, 1500, 1, slider_blue_converge_y, (void*)options); tailptr = &(*tailptr)->next; |
| 3277 | | *tailptr = slider_alloc(window->machine(), "Red Convergence X", -1500, 0, 1500, 1, slider_red_radial_converge_x, (void*)options); tailptr = &(*tailptr)->next; |
| 3278 | | *tailptr = slider_alloc(window->machine(), "Red Convergence Y", -1500, 0, 1500, 1, slider_red_radial_converge_y, (void*)options); tailptr = &(*tailptr)->next; |
| 3279 | | *tailptr = slider_alloc(window->machine(), "Green Convergence X", -1500, 0, 1500, 1, slider_green_radial_converge_x, (void*)options); tailptr = &(*tailptr)->next; |
| 3280 | | *tailptr = slider_alloc(window->machine(), "Green Convergence Y", -1500, 0, 1500, 1, slider_green_radial_converge_y, (void*)options); tailptr = &(*tailptr)->next; |
| 3281 | | *tailptr = slider_alloc(window->machine(), "Blue Convergence X", -1500, 0, 1500, 1, slider_blue_radial_converge_x, (void*)options); tailptr = &(*tailptr)->next; |
| 3282 | | *tailptr = slider_alloc(window->machine(), "Blue Convergence Y", -1500, 0, 1500, 1, slider_blue_radial_converge_y, (void*)options); tailptr = &(*tailptr)->next; |
| 3283 | | *tailptr = slider_alloc(window->machine(), "Red Output from Red Input", -400, 0, 400, 5, slider_red_from_r, (void*)options); tailptr = &(*tailptr)->next; |
| 3284 | | *tailptr = slider_alloc(window->machine(), "Red Output from Green Input", -400, 0, 400, 5, slider_red_from_g, (void*)options); tailptr = &(*tailptr)->next; |
| 3285 | | *tailptr = slider_alloc(window->machine(), "Red Output from Blue Input", -400, 0, 400, 5, slider_red_from_b, (void*)options); tailptr = &(*tailptr)->next; |
| 3286 | | *tailptr = slider_alloc(window->machine(), "Green Output from Red Input", -400, 0, 400, 5, slider_green_from_r, (void*)options); tailptr = &(*tailptr)->next; |
| 3287 | | *tailptr = slider_alloc(window->machine(), "Green Output from Green Input", -400, 0, 400, 5, slider_green_from_g, (void*)options); tailptr = &(*tailptr)->next; |
| 3288 | | *tailptr = slider_alloc(window->machine(), "Green Output from Blue Input", -400, 0, 400, 5, slider_green_from_b, (void*)options); tailptr = &(*tailptr)->next; |
| 3289 | | *tailptr = slider_alloc(window->machine(), "Blue Output from Red Input", -400, 0, 400, 5, slider_blue_from_r, (void*)options); tailptr = &(*tailptr)->next; |
| 3290 | | *tailptr = slider_alloc(window->machine(), "Blue Output from Green Input", -400, 0, 400, 5, slider_blue_from_g, (void*)options); tailptr = &(*tailptr)->next; |
| 3291 | | *tailptr = slider_alloc(window->machine(), "Blue Output from Blue Input", -400, 0, 400, 5, slider_blue_from_b, (void*)options); tailptr = &(*tailptr)->next; |
| 3292 | | *tailptr = slider_alloc(window->machine(), "Red DC Offset", -100, 0, 100, 1, slider_red_offset, (void*)options); tailptr = &(*tailptr)->next; |
| 3293 | | *tailptr = slider_alloc(window->machine(), "Green DC Offset", -100, 0, 100, 1, slider_green_offset, (void*)options); tailptr = &(*tailptr)->next; |
| 3294 | | *tailptr = slider_alloc(window->machine(), "Blue DC Offset", -100, 0, 100, 1, slider_blue_offset, (void*)options); tailptr = &(*tailptr)->next; |
| 3295 | | *tailptr = slider_alloc(window->machine(), "Red Scale", -200, 100, 200, 1, slider_red_scale, (void*)options); tailptr = &(*tailptr)->next; |
| 3296 | | *tailptr = slider_alloc(window->machine(), "Green Scale", -200, 100, 200, 1, slider_green_scale, (void*)options); tailptr = &(*tailptr)->next; |
| 3297 | | *tailptr = slider_alloc(window->machine(), "Blue Scale", -200, 100, 200, 1, slider_blue_scale, (void*)options); tailptr = &(*tailptr)->next; |
| 3298 | | *tailptr = slider_alloc(window->machine(), "Red Power", -80, 20, 80, 1, slider_red_power, (void*)options); tailptr = &(*tailptr)->next; |
| 3299 | | *tailptr = slider_alloc(window->machine(), "Green Power", -80, 20, 80, 1, slider_green_power, (void*)options); tailptr = &(*tailptr)->next; |
| 3300 | | *tailptr = slider_alloc(window->machine(), "Blue Power", -80, 20, 80, 1, slider_blue_power, (void*)options); tailptr = &(*tailptr)->next; |
| 3301 | | *tailptr = slider_alloc(window->machine(), "Red Floor", 0, 0, 100, 1, slider_red_floor, (void*)options); tailptr = &(*tailptr)->next; |
| 3302 | | *tailptr = slider_alloc(window->machine(), "Green Floor", 0, 0, 100, 1, slider_green_floor, (void*)options); tailptr = &(*tailptr)->next; |
| 3303 | | *tailptr = slider_alloc(window->machine(), "Blue Floor", 0, 0, 100, 1, slider_blue_floor, (void*)options); tailptr = &(*tailptr)->next; |
| 3304 | | *tailptr = slider_alloc(window->machine(), "Red Phosphor Life", 0, 0, 100, 1, slider_red_phosphor_life, (void*)options); tailptr = &(*tailptr)->next; |
| 3305 | | *tailptr = slider_alloc(window->machine(), "Green Phosphor Life", 0, 0, 100, 1, slider_green_phosphor_life, (void*)options); tailptr = &(*tailptr)->next; |
| 3306 | | *tailptr = slider_alloc(window->machine(), "Blue Phosphor Life", 0, 0, 100, 1, slider_blue_phosphor_life, (void*)options); tailptr = &(*tailptr)->next; |
| 3307 | | *tailptr = slider_alloc(window->machine(), "Saturation", 0, 100, 400, 1, slider_saturation, (void*)options); tailptr = &(*tailptr)->next; |
| 3397 | for (int index = 0; s_sliders[index].name != NULL; index++) |
| 3398 | { |
| 3399 | slider_desc *slider = &s_sliders[index]; |
| 3400 | *tailptr = slider_alloc(window->machine(), slider->name, slider->minval, slider->defval, slider->maxval, slider->step, slider->adjustor, (void*)options); |
| 3401 | tailptr = &(*tailptr)->next; |
| 3402 | } |
| 3308 | 3403 | |
| 3309 | 3404 | return listhead; |
| 3310 | 3405 | } |
trunk/src/osd/windows/winmain.c
| r23470 | r23471 | |
| 350 | 350 | { WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh", "240", OPTION_INTEGER, "shadow mask height, in phosphor dots" }, |
| 351 | 351 | { WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)", "0.09375", OPTION_FLOAT, "shadow mask texture size in U direction" }, |
| 352 | 352 | { WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)", "0.109375", OPTION_FLOAT, "shadow mask texture size in V direction" }, |
| 353 | | { WINOPTION_CURVATURE";fs_curv(0.0-4.0)", "0.0", OPTION_FLOAT, "screen curvature amount" }, |
| 353 | { WINOPTION_CURVATURE";fs_curv(0.0-4.0)", "0.03", OPTION_FLOAT, "screen curvature amount" }, |
| 354 | 354 | /* Beam-related values below this line*/ |
| 355 | | { WINOPTION_PINCUSHION";fs_pin(0.0-4.0)", "0.0", OPTION_FLOAT, "pincushion amount" }, |
| 356 | | { WINOPTION_SCANLINE_AMOUNT";fs_scanam(0.0-4.0)", "0.0", OPTION_FLOAT, "overall alpha scaling value for scanlines" }, |
| 355 | { WINOPTION_PINCUSHION";fs_pin(0.0-4.0)", "0.03", OPTION_FLOAT, "pincushion amount" }, |
| 356 | { WINOPTION_SCANLINE_AMOUNT";fs_scanam(0.0-4.0)", "1.0", OPTION_FLOAT, "overall alpha scaling value for scanlines" }, |
| 357 | 357 | { WINOPTION_SCANLINE_SCALE";fs_scansc(0.0-4.0)", "1.0", OPTION_FLOAT, "overall height scaling value for scanlines" }, |
| 358 | | { WINOPTION_SCANLINE_HEIGHT";fs_scanh(0.0-4.0)", "0.7", OPTION_FLOAT, "individual height scaling value for scanlines" }, |
| 358 | { WINOPTION_SCANLINE_HEIGHT";fs_scanh(0.0-4.0)", "1.0", OPTION_FLOAT, "individual height scaling value for scanlines" }, |
| 359 | 359 | { WINOPTION_SCANLINE_BRIGHT_SCALE";fs_scanbs(0.0-2.0)", "1.0", OPTION_FLOAT, "overall brightness scaling value for scanlines (multiplicative)" }, |
| 360 | 360 | { WINOPTION_SCANLINE_BRIGHT_OFFSET";fs_scanbo(0.0-1.0)", "0.0", OPTION_FLOAT, "overall brightness offset value for scanlines (additive)" }, |
| 361 | 361 | { WINOPTION_SCANLINE_OFFSET";fs_scanjt(0.0-4.0)", "0.0", OPTION_FLOAT, "overall interlace jitter scaling value for scanlines" }, |
| 362 | 362 | { WINOPTION_DEFOCUS";fs_focus", "0.0,0.0", OPTION_STRING, "overall defocus value in screen-relative coords" }, |
| 363 | | { WINOPTION_CONVERGE_X";fs_convx", "0.0,0.0,0.0",OPTION_STRING, "convergence in screen-relative X direction" }, |
| 364 | | { WINOPTION_CONVERGE_Y";fs_convy", "0.0,0.0,0.0",OPTION_STRING, "convergence in screen-relative Y direction" }, |
| 363 | { WINOPTION_CONVERGE_X";fs_convx", "0.3,0.0,-0.3",OPTION_STRING, "convergence in screen-relative X direction" }, |
| 364 | { WINOPTION_CONVERGE_Y";fs_convy", "0.0,0.3,-0.3",OPTION_STRING, "convergence in screen-relative Y direction" }, |
| 365 | 365 | { WINOPTION_RADIAL_CONVERGE_X";fs_rconvx", "0.0,0.0,0.0",OPTION_STRING, "radial convergence in screen-relative X direction" }, |
| 366 | 366 | { WINOPTION_RADIAL_CONVERGE_Y";fs_rconvy", "0.0,0.0,0.0",OPTION_STRING, "radial convergence in screen-relative Y direction" }, |
| 367 | 367 | /* RGB colorspace convolution below this line */ |
| 368 | 368 | { WINOPTION_RED_RATIO";fs_redratio", "1.0,0.0,0.0",OPTION_STRING, "red output signal generated by input signal" }, |
| 369 | 369 | { WINOPTION_GRN_RATIO";fs_grnratio", "0.0,1.0,0.0",OPTION_STRING, "green output signal generated by input signal" }, |
| 370 | 370 | { WINOPTION_BLU_RATIO";fs_bluratio", "0.0,0.0,1.0",OPTION_STRING, "blue output signal generated by input signal" }, |
| 371 | | { WINOPTION_SATURATION";fs_sat(0.0-4.0)", "1.0", OPTION_FLOAT, "saturation scaling value" }, |
| 371 | { WINOPTION_SATURATION";fs_sat(0.0-4.0)", "1.4", OPTION_FLOAT, "saturation scaling value" }, |
| 372 | 372 | { WINOPTION_OFFSET";fs_offset", "0.0,0.0,0.0",OPTION_STRING, "signal offset value (additive)" }, |
| 373 | | { WINOPTION_SCALE";fs_scale", "1.0,1.0,1.0",OPTION_STRING, "signal scaling value (multiplicative)" }, |
| 374 | | { WINOPTION_POWER";fs_power", "1.0,1.0,1.0",OPTION_STRING, "signal power value (exponential)" }, |
| 375 | | { WINOPTION_FLOOR";fs_floor", "0.0,0.0,0.0",OPTION_STRING, "signal floor level" }, |
| 376 | | { WINOPTION_PHOSPHOR";fs_phosphor", "0.0,0.0,0.0",OPTION_STRING, "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" }, |
| 373 | { WINOPTION_SCALE";fs_scale", "0.95,0.95,0.95",OPTION_STRING, "signal scaling value (multiplicative)" }, |
| 374 | { WINOPTION_POWER";fs_power", "0.8,0.8,0.8",OPTION_STRING, "signal power value (exponential)" }, |
| 375 | { WINOPTION_FLOOR";fs_floor", "0.05,0.05,0.05",OPTION_STRING, "signal floor level" }, |
| 376 | { WINOPTION_PHOSPHOR";fs_phosphor", "0.4,0.4,0.4",OPTION_STRING, "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" }, |
| 377 | 377 | /* NTSC simulation below this line */ |
| 378 | 378 | { NULL, NULL, OPTION_HEADER, "NTSC POST-PROCESSING OPTIONS" }, |
| 379 | 379 | { WINOPTION_YIQ_ENABLE";yiq", "0", OPTION_BOOLEAN, "enable YIQ-space HLSL post-processing" }, |
| r23470 | r23471 | |
| 392 | 392 | { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, |
| 393 | 393 | /* Vector simulation below this line */ |
| 394 | 394 | { NULL, NULL, OPTION_HEADER, "VECTOR POST-PROCESSING OPTIONS" }, |
| 395 | | { WINOPTION_VECTOR_TIME_SCALE";vectime", "0.0", OPTION_FLOAT, "How much the fade rate affects vector fade" }, |
| 396 | | { WINOPTION_VECTOR_TIME_PERIOD";vecperiod", "0.0", OPTION_FLOAT, "Vector fade rate versus screen refresh rate" }, |
| 397 | 395 | { WINOPTION_VECTOR_LENGTH_SCALE";veclength", "0.8", OPTION_FLOAT, "How much length affects vector fade" }, |
| 398 | 396 | { WINOPTION_VECTOR_LENGTH_RATIO";vecsize", "500.0", OPTION_FLOAT, "Vector fade length (4.0 - vectors fade the most at and above 4 pixels, etc.)" }, |
| 399 | 397 | /* Bloom below this line */ |