diff options
Diffstat (limited to 'src/osd/windows/d3dhlsl.h')
-rw-r--r-- | src/osd/windows/d3dhlsl.h | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/src/osd/windows/d3dhlsl.h b/src/osd/windows/d3dhlsl.h index 52bad0062ad..7d508ddb2a1 100644 --- a/src/osd/windows/d3dhlsl.h +++ b/src/osd/windows/d3dhlsl.h @@ -48,7 +48,7 @@ // CONSTANTS //============================================================ -#define HLSL_VECTOR (0) +#define HLSL_VECTOR (0) //============================================================ // TYPE DEFINITIONS @@ -91,6 +91,8 @@ struct hlsl_options float floor[3]; float phosphor[3]; float saturation; + + // NTSC bool yiq_enable; float yiq_cc; float yiq_a; @@ -103,6 +105,12 @@ struct hlsl_options float yiq_q; float yiq_scan_time; int yiq_phase_count; + + // Vectors + float vector_time_scale; + float vector_time_period; + float vector_length_scale; + float vector_length_ratio; }; class hlsl_info @@ -113,23 +121,26 @@ public: ~hlsl_info(); void init(d3d_base *d3dintf, win_window_info *window); - void init_fsfx_quad(void *vertbuf); bool enabled() { return master_enable; } void toggle(); - bool vector_enabled() { return vector_enable && (bool)HLSL_VECTOR; } - d3d_render_target* get_vector_target(d3d_info *d3d); - void create_vector_target(d3d_info *d3d, render_primitive *prim); + bool vector_enabled() { return master_enable && vector_enable && (bool)HLSL_VECTOR; } + d3d_render_target* get_vector_target(); + void create_vector_target(render_primitive *prim); + + void begin_frame(); + void end_frame(); + + void begin_draw(); + void end_draw(); - void begin(); void init_effect_info(d3d_poly_info *poly); void render_quad(d3d_poly_info *poly, int vertnum); - void end(); bool register_texture(d3d_texture_info *texture); bool register_prescaled_texture(d3d_texture_info *texture); - bool add_render_target(d3d_info* d3d, d3d_texture_info* info, int width, int height, int xprescale, int yprescale); + bool add_render_target(d3d_info* d3d, d3d_texture_info* info, int width, int height, int xprescale, int yprescale, bool bloom = false); bool add_cache_target(d3d_info* d3d, d3d_texture_info* info, int width, int height, int xprescale, int yprescale, int screen_index); void window_save(); @@ -139,8 +150,7 @@ public: void avi_update_snap(d3d_surface *surface); void render_snapshot(d3d_surface *surface); void record_texture(); - - void frame_complete(); + void init_fsfx_quad(void *vertbuf); void set_texture(d3d_texture_info *texture); d3d_render_target * find_render_target(d3d_texture_info *info); @@ -155,6 +165,11 @@ public: slider_state *init_slider_list(); private: + void blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, + D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count, + int dstw, int dsth); + void blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, + D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count); void enumerate_screens(); void end_avi_recording(); @@ -186,6 +201,9 @@ private: bitmap_argb32 shadow_bitmap; // shadow mask bitmap for post-processing shader d3d_texture_info * shadow_texture; // shadow mask texture for post-processing shader hlsl_options * options; // current uniform state + D3DPRIMITIVETYPE vecbuf_type; + UINT32 vecbuf_index; + UINT32 vecbuf_count; avi_file * avi_output_file; // AVI file bitmap_rgb32 avi_snap; // AVI snapshot @@ -197,6 +215,9 @@ private: d3d_surface * avi_final_target; // AVI upscaled surface d3d_texture * avi_final_texture; // AVI upscaled texture + d3d_surface * black_surface; // black dummy surface + d3d_texture * black_texture; // black dummy texture + bool render_snap; // whether or not to take HLSL post-render snapshot bool snap_rendered; // whether we just rendered our HLSL post-render shot or not d3d_surface * snap_copy_target; // snapshot destination surface in system memory @@ -223,6 +244,8 @@ private: d3d_effect * yiq_encode_effect; // pointer to the YIQ encoder effect object d3d_effect * yiq_decode_effect; // pointer to the YIQ decoder effect object #if HLSL_VECTOR + d3d_effect * bloom_effect; // pointer to the bloom composite effect + d3d_effect * downsample_effect; // pointer to the bloom downsample effect d3d_effect * vector_effect; // pointer to the vector-effect object #endif d3d_vertex * fsfx_vertices; // pointer to our full-screen-quad object |