* render/bgfx: Improved clearing and blending. Added prescale support. Fixes MT07586, MT07587, MT08084.
* render/bgfx: Fixed blend and tint handling. (Fixes Github #1953).
* render/bgfx/blendreader.cpp: Support non-separated blend mode specification for BGFX effects.
* render/bgfx: Reworked how horizontally-padded screen textures are handled. Likely fixes MT08512 and MT08505.
* render/bgfx: Ensure that a texture's width margin is updated in all cases.
* render/d3d/d3dhlsl.cpp: Fixed tinting in HLSL post-processing mode.
* render/d3d/d3dhlsl.cpp: Avoid most redundant state-setting calls. Reduces D3D API calls by about 90% on fruit machine drivers.
* render/d3d/d3dhlsl.cpp: Assign SourceDims and QuadDims uniforms to only those effects that use them.
* machine/laserdsc.cpp: Always add video quad to screen container, adjust tint based on m_videoenable instead.
* Remove broken scanline uniform from post_pass
* Add 3D LUT to HLSL
* Allow individual LUTs for screen and UI
* WIP: Port 3D LUT to BGFX
* Finish porting LUT to BGFX
* Add individual phosphor color conversion for HLSL
new file: hlsl/chroma.fx
Shader for converting xyY3 to sRGB
modified: hlsl/phosphor.fx
Minor changes to emphasize idea that phosphors are color
agnostic
modified: hlsl/post.fx
Conversion from signal RGB to xyY3
modified: src/osd/modules/render/d3d/d3dhlsl.cpp
modified: src/osd/modules/render/d3d/d3dhlsl.h
modified: src/osd/windows/winmain.cpp
modified: src/osd/windows/winmain.h
* Add phosphor examples and update presets
* Port phosphor color shaders to BGFX
* Fix missing newlines at EOF
On branch scanline
Changes to be committed:
modified: hlsl/post.fx
Remove scanline effect
new file: hlsl/scanline.fx
Separate scanline effect into its own shader
modified: src/osd/modules/render/d3d/d3dhlsl.cpp
Add scanline effect
modified: src/osd/modules/render/d3d/d3dhlsl.h
Add scanline effect
hlsl/phosphor.fx: Remove hacks
ini/presets/raster.ini, ini/presets/vector-mono.ini,
ini/presets/vector.ini: Tweak presets
src/osd/modules/render/d3d/d3dcomm.h,
src/osd/modules/render/d3d/d3dhlsl.cpp,
src/osd/modules/render/drawd3d.cpp: Change cache texture format to
floating point for precise for phosphor and ghosting shaders.
hlsl/phosphor.fx: Scale parameter into tau or gamma.
src/osd/modules/render/d3d/d3dhlsl.cpp:
src/osd/modules/render/d3d/d3dhlsl.h:
src/osd/windows/winmain.cpp:
src/osd/windows/winmain.h: Combine tau and beta sliders into one
slider labeled 'Time Constant'.
hlsl/phosphor.fx: Do LCD persistence effect using boolean LCD.
LCD persistence is monochrome and thus does not have separate components
like phosphor persistence.
src/osd/modules/render/d3d/d3dhlsl.cpp: Add slider for LCD
games.
src/osd/modules/render/d3d/d3dhlsl.h: (BP) Add options for LCD
games.
src/osd/windows/winmain.cpp: (BP) Add options for LCD games.
src/osd/windows/winmain.h: (BP) Add options for LCD games.
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.
multi-window use.
hlsl/phosphor.fx: Update semantics.
src/osd/modules/render/d3d/d3dhlsl.cpp: Implement
shaders::delta_time member function.
src/osd/modules/render/d3d/d3dhlsl.h: Add acc_t and delta_t
members for use by shaders::delta_time. Member function returns the
amount of time since itself has been called, for use by time-dependent
shaders.
hlsl/phosphor.fx: Add calculation time passed to be used by
shader.
src/osd/modules/render/d3d/d3dhlsl.cpp: Make pixel shader
calculate the current pixel by factoring in the amount of time which has
passed since the last rendering.
* fixed target texture dimension when -intoverscan is used (this fixes the appereance of scanline and shadow mask)
* added target_scale and screen_count uniforms
* rounded corners now remain aligned with screen bounds when -intoverscan is used (single screen only)
* added simple procedural texture for vectors with rounded line ends and beam smoothness
* added optional -vector_beam_smooth option
* removed -antialias option, antialiasing is now always applied, except for plain D3D
- vector_length_ratio is now independent from screen size
- changed vector_length_ratio range from [0.0, 1000.0] to [0.0, 1.0]
- updated display name and description of vector_length_scale vector_length_ratio
- if specified all textures (.png) within the same directoy of the given texture will be selectable via slider in the UI
- also added slider for "shadow mask tile mode" to HLSL chain
- separated curvature parameter into distortion, cubic_distortion and distort_corner
- distortion and cubic_distortion can be negative, to compensate each other
- distort_corner is intependent from the image distortion
- reduced raster bloom level to 8
- extended vector bloom level to 15
- changed vector bloom to be less blocky
- removed bloom_lvl9_weight and bloom_lvl10_weight options
- options are reset to loaded preset when game is closed
- changed default values of options to result in no effects activated
- init_slider_list() does not returns but sets g_slider_list directly
- removed unnecessary oriented_vector_texcoords
- implemented proper texture coordinates for vector quad primitive
- vector screen is now processed in texture coordinates
- revered workaround for raster screen, which is again processed in
texture coordinates
- known issue: cocktail mode for vector screen looks wrong
- split into primary.fx into 3 techniques for vector buffer, screen and
UI pass
- moved register_texture() for shaders outside of texture_info creation
- added render_primitive parameter to register_texture(); currently
unused
- removed other unused register_texture() definition
- calculation of bloom dimensions is now done only once, when render
target is created
- reduced blur width for non-vector screens
- implemented shadow u/v option for source tile mode
- HLSL now uses NPOT sized target surfaces (breaks compatibility with
graphics cards based on R300/R400/NV30 and older)
- HLSL target surfaces now have the size of the screen canvas
- removed HLSL pre-scale factor
- HLSL now uses a sharp bilinear interpolation to pre-scale textures to
screen canvas size, based on [Themaister's] implementation
- improved overall performance (based on the previously required
pre-scale factor, you might notice a 5-50% speed-up depending on your
graphics card, more if you used a higher pre-scale factor)
- improved shadow mask quality (pixel-perfect) in screen-mode
- fixed half source texel offset of bloom level alignment
- removed ./hlsl/artwork_support folder
- all shaders after pre-scale are now based on screen coordinate
(workaground, till both raster and vector pass can work on texture
coordinates)
- disabled distortion shader for more than one screen and for artworks
in full mode, does not affect artworks in copped mode (workaground, till
both raster and vector pass can work on texture coordinates)
- moved compute_texture_size() from texture_info to texture_manager (nw)
- fixed target dimensions of bloom levels, which results in a much
better alignment especially for game with very low resolution (therefore
current bloom settings might look a little less intense than before)
- small cleanups (nw)
- changed the amount of scanline darkness, a setting of 1.0 now becomes
fully black (to get the same result as before half your current setting)
- scanline height now depends on the brightness of the underlying color
- the amount of the scanline brightness and overdrive now depends on the
scanline darkness
- renamed 'Scanline Screen Height' to 'Scanline Screen Scale' and
'Scanline Indiv. Height' to 'Scanline Height'
- merged YIQ encode and decode pass into one NTSC pass
- added options for most NTSC settings
- reduced sample count to 64
- changed default O value to 0
- fit NTSC signal jitter between a reasonable limit of 0 and 1
- fit A and B value between a reasonable limit of -1 and 1
- fit scanline jitter between a reasonable limit of 0 and 1
- added hum bar simulation based on [MooglyGuy's] GLSL port of the mame
shader pipeline
- added monochrome-chessboard.png
- added slot-mask-aligned.png (to simulate a TFT LCD)
- fixed half texel offset
- readded usage of A value in encode/decode pass
- readded jitter of B value in encode/decode pass
- readded usage of P value in encode pass
- fixed not set O value uniform for decode pass
- removed duplicate YIQ option definition
- changed default of O value back to 1.0
- color converge is now independent from ratio
- the radial converge now "translates" the most outer pixel as thay
would be translated by the linar converge with the same amount
- color converge is now limited to a maximum of 10
- added color converge pass to vector rendering