* 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
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.
- added distortion pass, which is applied after the bloom pass
- moved vignetting, curvature, round corners and reflection effect to
distortion pass
- disabled distortion pass for multi screens and activated artworks due
to not yet fixed misalignments
- disabled scanlines for vector rendering in post pass shader
- removed prescale knowledge from downsample, bloom and post pass shader
- fixed half pixel offset in most shaders
- fixed position of reflection effect when screen is rotated or flipped
- fixed roundness of round corners in any aspect ratio
- fixed shadow mask bleeding (nearly completly)
- added bounds() and screen_bounds() getter to layout_view
- added current_view() getter to render_target
- some cleanup and refactoring
- removed position offset in post.fx
- fixed texture offset caused by 0th level of bloom.fx
- fixed texture offset caused by focus.fx
- changed Passthrough parameter in phosphor.fx to boolean
- simplified defocus pass function and calling it twice
- removed CU_PHOSPHOR_IGNORE (Passthrough) uniform, which was only used
in phosphor pass function and is now directly set
- added CU_TARGET_DIMS (TargetDims) uniform based on the current render
target
- fixed missing Prescal parameter in downsample pass function
- some code cleanup
- HLSL changes: [MooglyGuy]
* Upped vertex buffer size to 64k verts, fixes assert in
starwars and alphaone, please include the printed error
message in any subsequent encounterings of the assert.
* Improved vector rendering (beam width 1.5 suggested)
* Ducked raster bloom default to 0.225 to reduce washout
openly, for there was nothing left to see with" [MooglyGuy]
* Enabled vector bloom and associated .ini controls
* Added raster bloom and associated .ini controls, each bloom "level" is the
linear weight of successively half-sized render targets
* Removed D3D8 mode
* Mass renaming in D3D renderer to use namespaces, initial planning step to
HAL-based renderer implementation on Windows (i.e., GL on Windows)
* Converted d3d_info, d3d_poly_info, and d3d_texture_info into classes
* Added batching of vectors for possible speed increase
* Minor cleanup of shader state setting
Country Entertainment]
- Created two flags, -hlsl_ini_write and -hlsl_ini_read. The former enables
custom HLSL INI writing explicitly, the other enables loading of the same.
- Fixed disappearing aperture effect when using custom INI files.
- Fixed diagonal seam on some games, for serious real this time
- Fixed phosphor simulation, now works as expected
Attempting to fix the HLSL 'blurriness' reported by a few people. Now HLSL will auto-prescale to the nearest texture size that is greater than the target screen size on both axes and is also an even multiple of the raw bitmap's size.
- Switched to point-sampling through most of the shader chain to avoid non-intentional pixel smearing
- Corrected alignment and scaling on the shadow mask and scanlines; dramatically reduces rainbow banding at non-oversampled resolutions.
Focus: 8-sample blur that averages 7 samples around a center sample.
Phosphor: Not currently used, treated as a pass-through by drawd3d.c, but could be used to implement additional convolutions in a second pass.
Pincushion: Used (when commented in in drawd3d.c) to pincushion an entire full-screen texture but not otherwise apply any convolutions.
Post: The meat and potatoes. It does scanlines, it does aperture masking, it does dot crawl, it does chroma subsampling, it does YIQ colorspace convolution, it does RGB colorspace convolution, it does pincushioning, it walks, it talks, it does the dishes, it'll screw your wife for you, and if you don't have a wife it will find one for you, get you married to her, and screw her for you, IT IS THAT GOOD, LADIES AND GENTLEMEN.
Primary: Simple passthrough for UI and artwork.