summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* HLSL Color Transforms and 3D LUT (#4043) Westley M. Martinez2018-10-074-78/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-142-40/+176
| | | | | | | | | | | | | 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
* Revert "New phosphor persistence shaders for HLSL" R. Belmont2017-01-052-200/+11
|
* Change cached texture format to floating point. Westley M. Martinez2017-01-041-8/+1
| | | | | | | | | | | | 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.
* Add LCD ghosting shader for Direct3D Westley M. Martinez2017-01-022-25/+180
| | | | | | | | | | | | | | | | | hlsl/ghosting.fx: Add LCD ghosting shader hlsl/phosphor.fx: Remove LCD logic ini/presets/gameboy.ini, ini/presets/gba.ini, ini/presets/lcd-matrix.ini, ini/presets/lcd.ini, ini/presets/raster.ini, ini/presets/vector.ini: Update presets src/osd/modules/render/d3d/d3dhlsl.cpp, src/osd/modules/render/d3d/d3dhlsl.h: Add LCD shader and sliders. Allow sliders to be adjusted for R, G, and B components. src/osd/windows/winmain.cpp, src/osd/windows/winmain.h: Add LCD ghosting options.# Please enter the commit message for your changes. Lines starting
* Tweak phosphor parameter scaling, update presets. Westley M. Martinez2016-12-301-1/+1
|
* Scale and phosphor persistence sliders. Westley M. Martinez2016-12-301-8/+11
| | | | | | | | | | 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'.
* Add gamma correction for proper impulse response. Westley M. Martinez2016-12-301-1/+5
|
* Remove phosphor burn-in. Westley M. Martinez2016-12-301-0/+7
|
* Implement LCD persistence shader. Westley M. Martinez2016-12-291-5/+12
| | | | | | | | | | | | | | | | 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.
* Implement new phosphor shader. Westley M. Martinez2016-12-291-9/+29
| | | | | | | | | | | | | | | | | 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.
* Fix phosphor shader to work properly for multi-screen games and Westley M. Martinez2016-12-121-5/+5
| | | | | | | | | | | | | | 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.
* Fix phosphor persistence shader behavior based on time. Westley M. Martinez2016-12-111-4/+8
| | | | | | | | | 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.
* Reduced defocus effect to one pass (HLSL/BGFX) Jezze2016-10-221-24/+26
| | | | | - removed second defocus pass - limited defocus stength to a maximum of 2.0
* Disabled clearing of render targets in several passes (HLSL) Jezze2016-10-222-22/+23
| | | | - which was quite a performance overhead and not necessary because the shaders fill every texel of a target without blending
* Fixed aspect ratio of rounded corners (nw) Jezze2016-09-291-11/+12
|
* Fixed several small issues in HLSL/BGFX Jezze2016-09-285-37/+70
| | | | | | * 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-132-10/+11
|
* Small shader corrections (nw) ImJezze2016-06-203-6/+6
|
* Fixed scanlines if the screen output is less than twice the size of the host ↵ ImJezze2016-06-061-2/+8
| | | | source
* Procedural texture for vectors in HLSL ImJezze2016-06-052-17/+54
| | | | | | * 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
* Normalized vector attenuation settings ImJezze2016-05-221-15/+13
| | | | | | - 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
* 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
|
* Refactored BGFX distortion pass (nw) ImJezze2016-04-191-4/+4
| | | | - also removed vector hack
* Refactored distortion pass ImJezze2016-04-191-11/+28
| | | | | | - 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
* Removed hacks for vector screens from shaders (nw) ImJezze2016-04-136-64/+19
| | | | | - added handling of texture coordinates for vector screens to core render - added handling of orientation/rotation for vector screens to D3D renderer
* Get NTSC working in both bgfx and d3d, nw therealmogminer@gmail.com2016-03-291-17/+9
|
* Refactored Bloom ImJezze2016-03-281-125/+199
| | | | | | | - 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
* Added oversampling option ImJezze2016-03-251-2/+0
| | | | - and some cleanup
* Scanline Variation ImJezze2016-03-151-3/+4
| | | | - added option for scanline variation
* Cleanup (nw) ImJezze2016-03-131-2/+2
| | | | | | | - 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
* 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-1210-145/+133
| | | | | | | | - 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-282-24/+84
| | | | | | | | | - 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
* Bloom refactoring ImJezze2016-02-253-37/+44
| | | | | | | - 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-2011-763/+141
| | | | | | | | | | | | | | | | | | | | | | - 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 Bloom Level Alignment ImJezze2016-02-073-19/+22
| | | | | | | - 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)
* Improved Scanline Simulation ImJezze2016-02-072-20/+32
| | | | | | | | | | - 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'
* Fixed missing const (nw) ImJezze2016-01-261-0/+1
|
* Cleanup (nw) ImJezze2016-01-261-13/+14
|
* NTSC Refactoring and Options ImJezze2016-01-254-219/+134
| | | | | | | | | | | | | | - 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 YIQ passes ImJezze2016-01-092-74/+115
| | | | | | | | | | - 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
* Refactored color converge ImJezze2016-01-091-40/+52
| | | | | | | | - 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
* Refactoring (nw) ImJezze2016-01-032-72/+76
| | | | - restructured bloom level size and weight uniforms
* Refactoring ImJezze2015-12-315-65/+33
| | | | | | | | | | | | - 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-3116-217/+122
| | | | - removed unused pincushion.fx