summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/primary.fx (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Swapped R and B channels in lut-default.png, and adjusted D3D9 ↵ MooglyGuy2023-03-201-5/+1
| | | | | | LUT-application behaviour. (#11004) [Ryan Holtz] * lut-default.png: Swapped red and blue channels (fixes GitHub #11001). * render/d3d/d3dlsl.cpp: Changed screen LUT application to be applied during the color convolution pass on raster systems.
* Major D3D and BGFX code refactoring and bug fixes: (#10858) [Ryan Holtz] MooglyGuy2023-01-291-0/+32
| | | | | | | | | | | * 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-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fixed several small issues in HLSL/BGFX Jezze2016-09-281-1/+0
| | | | | | * 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)
* Removed hacks for vector screens from shaders (nw) ImJezze2016-04-131-2/+0
| | | | | - added handling of texture coordinates for vector screens to core render - added handling of orientation/rotation for vector screens to D3D renderer
* Refactoring of render targes and vector texture coordinates ImJezze2016-03-121-4/+4
| | | | | | | | - 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
* Cleanup primary.fx ImJezze2016-02-281-23/+83
| | | | | | | | | - 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
* Quality and Performance improvements ImJezze2016-02-201-9/+14
| | | | | | | | | | | | | | | | | | | | | | - 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)
* Cleanup (nw) ImJezze2015-12-311-7/+9
| | | | - removed unused pincushion.fx
* Refactoring, Fixes and Cleanup ImJezze2015-09-261-3/+14
| | | | | | | | | | | | | | | | | - 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-5/+9
| | | | | | | | | | | | | | - 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
* Refactoring ImJezze2015-07-111-6/+5
| | | | | | | | - separated downsample pass and bloom pass into two function calls - removed/replaced simple.fx by using primary.fx to render on screen - changed PostPass parameter of primary.fx to boolean - simplified bloom.fx and downsample.fx, Prescale parameter is now set correctly from outside depending on raster/vector rendering
* added licenses to hlsl files (nw) Miodrag Milanovic2015-05-121-0/+2
|
* minor shader cleanup, nw Ryan Holtz2013-08-281-7/+4
|
* MAME Testers bugs fixed: 5201, 5202 Ryan Holtz2013-05-221-0/+1
| | | | | | | | - 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
* d3dhlsl.c: Add preliminary vector post-processing. [MooglyGuy] Ryan Holtz2013-01-211-1/+2
|
* Internal HLSL cleanup - removed aux texcoords, restored software vertex ↵ Ryan Holtz2011-05-241-5/+1
| | | | processing due to low-end cards not doing hardware vertex processing, removed unnecessary tristrip->trilist splitting. Restores D3D functionality on integrated chipsets and marginal cards. [Ryan Holtz, Ashura-X]
* Initial shader import (nw) Ryan Holtz2011-05-161-0/+97
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.