summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/post.fx (follow)
Commit message (Collapse)AuthorAgeFilesLines
* More D3D HLSL regression fixes: (#11002) [Ryan Holtz] MooglyGuy2023-03-201-1/+1
| | | | | * hlsl/post.fx: Fixed double-drawing of screen data with D3D9 HLSL and screen scale/offset. * render/d3d/d3dhlsl.cpp: Fixed screen-container search function (fixes GitHub #10872). * render/d3d/d3dhlsl.cpp: Fixed downsample pass, fixes blocky vector bloom.
* Major D3D and BGFX code refactoring and bug fixes: (#10858) [Ryan Holtz] MooglyGuy2023-01-291-3/+1
| | | | | | | | | | | * 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.
* HLSL Color Transforms and 3D LUT (#4043) Westley M. Martinez2018-10-071-55/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: Move scanline to occur before defocus W. M. Martinez2018-09-141-40/+4
| | | | | | | | | | | | | 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
* Disabled clearing of render targets in several passes (HLSL) Jezze2016-10-221-15/+14
| | | | - which was quite a performance overhead and not necessary because the shaders fill every texel of a target without blending
* Fixed several small issues in HLSL/BGFX Jezze2016-09-281-9/+13
| | | | | | * 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)
* - already fixed scanline issue also applied for swapped orientation (nw) Jezze2016-08-131-3/+7
|
* Small shader corrections (nw) ImJezze2016-06-201-2/+2
|
* Fixed scanlines if the screen output is less than twice the size of the host ↵ ImJezze2016-06-061-2/+8
| | | | source
* Fixed half texel offset of 'source' shadow mask tile mode ImJezze2016-05-051-1/+3
|
* Added "selection" parameter to chain input sampler ImJezze2016-04-241-1/+0
| | | | | - 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
* Small fixes (nw) ImJezze2016-04-221-9/+9
| | | | | - fixed not used u_humbar_hertz_rate parameter - fixed half pixel shift of the shadow mask along the screen diagonal
* Implemented handling for u_screen_scale and u_screen_offset (nw) ImJezze2016-04-211-1/+1
|
* Removed hacks for vector screens from shaders (nw) ImJezze2016-04-131-15/+6
| | | | | - added handling of texture coordinates for vector screens to core render - added handling of orientation/rotation for vector screens to D3D renderer
* Scanline Variation ImJezze2016-03-151-3/+4
| | | | - added option for scanline variation
* Fixed mask orientation for vector screen ImJezze2016-03-121-3/+12
|
* Fixed rotated source tile mode ImJezze2016-03-121-3/+3
| | | | - and corrected aperture texture name
* Refactoring of render targes and vector texture coordinates ImJezze2016-03-121-49/+50
| | | | | | | | - 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
* Bloom refactoring ImJezze2016-02-251-16/+22
| | | | | | | - 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
* Quality and Performance improvements ImJezze2016-02-201-42/+30
| | | | | | | | | | | | | | | | | | | | | | - 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)
* Improved Scanline Simulation ImJezze2016-02-071-10/+16
| | | | | | | | | | - 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'
* NTSC Refactoring and Options ImJezze2016-01-251-7/+23
| | | | | | | | | | | | | | - 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)
* Refactoring ImJezze2015-12-311-21/+9
| | | | | | | | | | | | - replaced shader parameters OrientationSwapXY xor RotationSwapXY by SwapXY - made shader parameters SourceDims, SourceRect, TargetDims, ScreenDims, QuadDims and SwapXY available for all shaders - color convolution, defocus and phosphor pass will now be skipped if all influencing parameters are 0 - removed unused bloom_texture and bloom_target arrays from cache_target class - fixed half texel offset in prescale.fx
* Cleanup (nw) ImJezze2015-12-311-5/+7
| | | | - removed unused pincushion.fx
* Cleanup (nw) ImJezze2015-12-261-3/+3
| | | | | | - renamed shadow_mask_type to shadow_mask_tile_mode - renamed bloom_type to bloom_blend_mode - implemented "Source" shadow mask tile mode for artwork_support/post.fx
* Extended Shadow Mask and Bloom functionality ImJezze2015-12-251-6/+14
| | | | | | | | | | | | - added shadow mask type option to choose between "Screen" and "Source" tile mode ("Screen" is the default as before) - added bloom type option to choose between "Addition" and "Darken" blend mode ("Addition" is the default as before) - the alpha channel of a shadow mask is now filled with the background color of the screen by the amount of the inverted alpha value - added monochrome-matrix.png which can be used in combination with "Source" tile mode and "Darken" blend mode to simulate a STN LCD, for example
* Fixed HLSL for LCD screen type ImJezze2015-12-241-3/+2
| | | | | | - fixed wrong detection of vector screen, which meant that a LCD screen was also detected as vector screen - re-enabled scan-line and other CRT related sliders for LCD screens
* Changed screen adjustment for HLSL ImJezze2015-11-171-1/+31
| | | | | | | | - screen adjustment (scale, offset) can now be handled by the respective render API itself (default behavior is as before) - D3D (if HLSL) is activated handles screen adjustment by itself within the shader, which fixes the odd behavior of some effects (e.g. round corners) when screen scale and offset is used
* Cleanup ImJezze2015-11-071-2/+3
| | | | | | - removed duplicate prescale fields - made visibility of HLSL options depending on screen type - disabled scanlines for LCD screen type
* Artwork Support ImJezze2015-10-181-2/+10
| | | | | | | - added special post.fx and distortion.fx shader, which support enabled artworks, but they cannot apply some of the previously implemented corrections (e.g. bloom staircase artifacts when screen is curved, elliptic rounded corners when aspect ratio is not 4:3)
* Refactoring, Fixes and Cleanup ImJezze2015-09-261-228/+19
| | | | | | | | | | | | | | | | | - 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
* Refactoring and Fixes ImJezze2015-08-021-7/+5
| | | | | | | | | | | | | | - 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
* Vector curvature correction ImJezze2015-07-191-23/+45
| | | | | - corrected vector curvature on x-axis when screen dims and render target dims differ (there is still a difference on y-axis)
* Post Pass effects for Vector rendering ImJezze2015-07-121-2/+6
| | | | | | - added support for post pass effects for vector rendering (does not work properly in full screen mode, yet) - made texture_info::compute_size_subroutine() function public static
* Fixed misaligned scanlines with odd resolutions ImJezze2015-05-301-1/+1
| | | | | - fixed misaligned scanline with odd resolutions caused by centered coordinates
* Merge pull request #190 from ImJezze/master David Haywood2015-05-271-42/+43
|\ | | | | Changed vignetting and fixed rounded corners
| * Quick fix ImJezze2015-05-241-0/+3
| | | | | | | | - something was messed up on the last commit
| * Fixed roundness of rouned corners ImJezze2015-05-241-29/+29
| | | | | | | | | | | | | | - fixed roundness of rounded corners; the default aspect ratio of 4:3 should not be stretched anymore when the source has another ratio - disabled blurring of rounded corners - some cleanup
| * Changed vignetting simulation ImJezze2015-05-221-15/+13
| | | | | | | | | | - removed screen ratio influence - changed radius, blur and intensity
* | update in agreement with ImJezze (nw) Miodrag Milanovic2015-05-241-1/+1
|/
* Fixed black border ImJezze2015-05-151-21/+19
| | | | | - fixed black border on the right and bottom side of the screen, caused by the previously added rounded corners
* added licenses to hlsl files (nw) Miodrag Milanovic2015-05-121-0/+2
|
* Fixed Curvature zoom ImJezze2015-05-101-8/+14
| | | | - fixed curvature zoom to fit the screen size in any aspect ratio
* Fixed automatic Shadow Mask rotation ImJezze2015-05-091-0/+1
| | | | - added missing RotationSwapXY shader paramter
* Fixed automatic Shadow Mask rotation ImJezze2015-05-091-22/+38
| | | | | | - fixed usage of OrientationSwapXY shader parameter - added RotationSwapXY shader parameters to consider the user defined screen rotation
* HLSL shader improvements ImJezze2015-05-031-77/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - changed shadow mask implementation, shadow count XY now represent the number of pixel the shadow UV sized tiles will take on the screen - implemented rotation of the shadow mask texture depending on the default landscape or portrait view of the screen - removed prescale and pixel border of the shadow mask texture - added option to change the shadow UV offset, to reduce the color bleeding of the shadow mask - adjusted presets to work with the changed mask implementation - reduced defocus offset - improved downsampling for better blurring - improved alignment of bloom layers (raster and vector) - applied bloom effect to the render output of screenshot and AVI recording - changed curvature effect to fit screen size - changed scanlines to be not rendered into bloom layers - changed shadow mask to be not rendered into bloom layers - changed color floor to not light the bloom layers - changed shadow mask to not dark the color floor - added image vignetting simulation and option - added round screen corner simulation and option - added screen light reflection simulation and option - made usage of unused brightness offset (additive) - removed unused pincushion option - removed duplicate shadow count Y options - removed artwork/adapture.png - added artwork/adapture-grill.png - added artwork/shadow-mask.png - added artwork/slot-mask.png - added hlsl/simple.fx - removed unused shaders::blit() function - added shaders::screen_pass() function, which handles the (raster-)rendering on screen, into screenshot and AVI recording - added effect:set_bool() function
* This revert (r26927), as requested by author, fixes the regression of ↵ Scott Stone2014-01-241-104/+104
| | | | missing graphics for vector games using HLSL. Also reverted patch in code (r27063) to deal with "roundf" for pre-vs2013 compilers - which is no longer needed. (nw)
* - Fix for pixel gaps between multi-screen games in HLSL mode. [MooglyGuy] Ryan Holtz2014-01-041-104/+104
|
* more HLSL cleanup, part e of pi (nw) Ryan Holtz2013-08-301-40/+32
|
* uniform consolidation, nw Ryan Holtz2013-08-291-8/+8
|