Commit Graph

376 Commits

Author SHA1 Message Date
Gregory Hainaut e56f75fe9a gsdx hw:move vertices fixup for texture shuffle in RendererHw
Bonus: fix m_vt value
2019-02-22 16:57:59 +01:00
lightningterror e55fcae981 gsdx d3d11: re-normalize coordinate when TEX0 is invalid. 2019-02-20 13:49:57 +01:00
Gregory Hainaut 29aef04fbf gsdx ogl: re-normalize coordinate when TEX0 is invalid
Fix #258
Fix #695
2019-02-20 13:49:57 +01:00
lightningterror 8cb6d255ca fxaa.fx: Purge d3d9 shader code.
Looks like I forgot this one.
2019-02-19 15:36:15 +01:00
lightningterror 119ab90657 gsdx: Reuse same selected renderer image/banner for ps1 emu compatibility as ps2.
There's no need to have duplicate images that basically do the same
thing. Update the gui to reflect latest changes and use the same images
on both. It will reduce plugin size.
Remove old images and update VS project files.
2019-02-13 12:30:00 +01:00
lightningterror dabc99f466 gsdx-ogl: Small colclip improvements.
1. Allow hrd colclip to also run on the unsupported
cases which should be pretty rare.

2. Remove colclip from high sw blending.

3. Disable the hdr colclip shader which may not be
actually required to run.

Idea by Gregory
2019-02-08 14:53:15 +01:00
lightningterror 4ab29eb280 gsdx: Remove some useless dx9 comments. 2019-01-26 16:13:07 +01:00
lightningterror f28f03803f tfx.fx: Correct a couple more blending factors.
Chane 0.5 to 128.0f/255.0f which is 0.50196078431.
Just to be safe it's accurate.
2019-01-18 06:10:41 +01:00
lightningterror fa4ae7800b tfx.fx: Adjust some blending factors
255.0f / 128.0f gives us 1.9921875.
128.0f / 255.0f gives us 0.50196078431.
Which are more accurate.
Fixes regression in dbz bt3 where characters appeared darker.
2019-01-14 17:01:17 +01:00
lightningterror 86327b52a9 convert.fx: Update main4 shader to better support hdr colclip. 2019-01-12 09:53:51 +01:00
lightningterror 8a57d7f470 GSdx-d3d11: Remove colclip and negative blend algo.
Code was old and inefficient. HDR colclip will do a better job.
2019-01-12 09:53:51 +01:00
lightningterror 4a0697fda2 tfx.fx: Remove commented out code in clamp_wrap_uv function. 2018-12-20 18:41:30 +01:00
KrossX 83d293d41c gsdx-d3d11: Port OSD shader from OGL 2018-12-20 15:32:04 +01:00
Kojin 5713993777 convert.fx: Add color support to IA
Support color input in vs and ps.
Skipping dx9.
2018-12-20 15:32:04 +01:00
lightningterror cdeacafd27 tfx.fx: Remove datst (DATE), and RTCopy.
Code was never hit on D3D11. D3D11 uses stencil operations.
Also Remove VS_RTCOPY which was used only by d3d9.

Remove RTCopy Sampler from the shader.

tfx rtcopy
2018-12-20 14:42:56 +01:00
lightningterror fce3918562
GSdx: Purge Direct3D9 Render entirely. (#2762)
And the time has come to say good bye (good riddance?), this build removes Direct3D9 entirely from GSdx. D3D9 is/was holding us back in some D3D11 fixes that we want to further implement.
The last build that supports D3D9 is v1.5.0-dev-2779-g1a61148b0 for anyone still interested.

"Press F to pay respect.
2018-12-20 00:54:51 +01:00
Kojin 0353273733 tfx.fx: Update Vertex and Geometry shaders to support the new
depth sample state.

Note this breaks D3D9 but we will be purging it shortly after
so there's nothing to worry about.
2018-12-19 19:59:23 +01:00
KrossX 3b11164637 tfx.fx: Add tfx shaders to support depth sampling.
Add clamp wrap uv depth,
Add sample depth.

Sample shaders depth fmt 1 and 2 are based on convert shaders.
2018-12-19 19:59:23 +01:00
lightningterror 59752120d6 tfx.fx: Add support for dfmt to pick the shader for 16bit alpha output. 2018-12-18 12:55:23 +01:00
KrossX 013c47950d tfx.tx: Add support for Tales of Abyss and Urban Chaos HLE shader.
Add sample_depth function, note only Tales of Abyss and Urban Chaos
depth sampling is supported, full depth fmt will need to wait a little
longer.
2018-12-13 22:14:49 +01:00
lightningterror abb1cc5fe7 tfx.fx: Add shaders support for PS_DEPTH_FMT on channel shuffle.
Red, blue and gXbY channels support it.
2018-12-13 01:47:10 +01:00
lightningterror c7aca64642 GSdx-d3d: Add support for ChannelShuffle in PS constant buffer.
Needed for GXBY channel.
2018-12-13 01:47:10 +01:00
KrossX d38bd9c950 tfx.fx: Port channel shuffle shaders from OpenGL.
Port RGBA shaders to support channel shuffle on Direct3D11.
2018-12-13 01:47:10 +01:00
lightningterror 80af99bb44 GSdx-ogl: Switch shader numbers main18 and main19.
Allows us to port feedback write (DoMerge function) to D3D11 without
adding dummy shaders for osd.
2018-12-10 18:31:59 +01:00
KrossX c3a1cc3801 convert.fx port main10-16 shaders from Opengl to Direct3d11.
Adds support to do depth conversion through the shaders.
2018-12-10 00:17:04 +01:00
lightningterror c8f52b0ba3 GSdx-ogl: Move rgb channel 7 to empty slot 5. 2018-11-25 04:06:04 +01:00
KrossX df307bed02 GSdx-d3d: Add macro to support ScalingFactor in shaders. 2018-10-19 11:36:23 +02:00
lightningterror b360c07253 glsl, fx: Update point sampler comment. 2018-10-09 09:07:45 +02:00
KrossX 5719c6c3c0 glsl: remove signed int cast side (masks and offsets are unsigned to begin with.
Issue #2617
2018-10-04 20:47:03 +02:00
KrossX 2d094cbc3b tfx.fs: Remove whitespaces. 2018-10-03 15:21:46 +02:00
KrossX 9d562a454b GSdx: Limit Wrap negative UV when PS_FST is 0 only. 2018-10-03 15:21:46 +02:00
KrossX 629d2bd425 GSdx: Wrap negative UV on region repeat wrap mode.
Makes UV coord be on the range [0, SIZE) before applying mask and
offset. This fixes Xenosaga's hair for example, which has negative UV
coords.
2018-10-01 22:38:22 +02:00
KrossX e90c87a8ef GSdx-d3d: Keep fract in [0;1] range port from OpenGL.
Fixes texture flickering in Oni on d3d11.

Commit:
a8968257db
2018-09-28 02:33:58 +02:00
lightningterror 728fa2c1a4 GSdx-d3d: tfx.fx correct texture shuffle shaders.
Some values were incorrect, now I'm no expert but looking at the code
and behavior seemed a bit wrong compared to gl.

Improves d3d rendering on Sonic Unleashed, the purple screen is gone
matching it with gl visuals.
2018-09-17 14:26:08 +02:00
lightningterror f40c1de919 GSdx: GPU accelerate 8 bits texture conversion port from OpenGL to Direct3D11.
Commit:
d29e375f72

Only native res is supported currently, but it's still great progress.
Someone needs to port the ScalingFactor to D3D from commit:
6121677aa1

Credits to KrossX for porting the shader.
2018-09-13 19:56:59 +02:00
Jonathan Li e4dd0069ca gsdx:windows: Don't refer to D3D10
Direct3D11 is used even if the user's GPU only supports Direct3D feature
level 10.0.
2018-08-29 00:48:16 +01:00
lightningterror 122f730608 glsl: Replace leftover tabs with spaces in shaderboost.
I believe all glsl files are cleaned up now.
2018-08-27 14:01:25 +02:00
lightningterror 1aeec47b30 glsl: Replace leftover tabs with spaces in tfx_fs. 2018-08-22 20:12:53 +02:00
lightningterror d7cdbf6f27 Gsdx: Point Sampler changes.
Re add point sampler to OpenGL. Fixes graphical issues when
Allow 8-bit textures is enabled on AMD gpus.
Issue: https://forums.pcsx2.net/Thread-GSDX-Hardware-mode-Bug-Report-Allow-8-bit-Texture

Adjust the code to be easier to read, and execute the gl code only on amd - suggested by Gregory.

Remove useless ATI_SUCKS define in tfx shader.It wasn't used anywhere outside of the shader.
2018-08-22 20:12:53 +02:00
lightningterror 6eb385fd9b GSdx-d3d: s/sample_4a/sample_4_index/ 2018-08-21 13:56:06 +02:00
lightningterror 188a1f1416 GSdx-d3d: Drop an useless min in FS - port from GL.
Commit: a1957a685d

GPU will clamp color anyway. It reduces the number of instruction of 25%
(4->3).
2018-08-21 13:56:06 +02:00
lightningterror 6ef793545d GSdx:Port better support of palette from GL to D3D10/11.
Port from commit b0af54d3

Fixes shadows in Star Ocean 3.

Note: It works properly on native res only just like on GL.
Upscaling will cause some issues.

Only Direct3D10/11 supports it, D3D9 doesn't support integer operations
so we can't reuse the code.
2018-05-30 14:47:06 +02:00
Jonathan Li 8f6a3d9fe8 gsdx: remove DirectCompute backend
It hasn't been accessible since OpenCL was added, and it was barely
updated since it was introduced.
2018-05-06 02:01:22 +01:00
Gregory Hainaut c5d35d434c glsl: reduce geometry shader complexity
output 1 strip of 2 triangles instead of 2 strips of 1 triangle.

Potentially it would reduce the geometry shader overhead. And it
might avoid a middle line in sprite in some AMD GPU/driver/OS
bad combination
2017-07-12 22:04:03 +02:00
Gregory Hainaut 38010432ee gsdx ogl: handle float integral coordinate for depth sampling
Fix depth effect regression on Nemo (issue #1979)
2017-07-12 22:03:47 +02:00
Jonathan Li 45ac69a1f6 gsdx:d3d11: Fix sprite geometry shader
Sprites always use flat shading.

Fixes #1980
2017-07-02 22:54:36 +01:00
Gregory Hainaut 2d0a61fc8d gsdx ogl: use load resource to load shader
* Windows behavior must be checked
* remove glsl_source.h

v2: fix missing include
Big thanks to Turtleli

v3:
fix indentation in gsdx-res.xml
add dependency in cmake
remove old res/glsl/fxaa.fx symlink
add tfx.cl for OpenCL support on Linux

v4, v5
fix cmake indentation
2017-04-12 18:09:06 +02:00
FlatOutPS2 557b672232 GSdx: Unscale Point and Line Direct3D11 port
Ports the "Unscale Point and Line" hack to the Direct3D11 Hardware renderer.

And enables the "Unscale Point and Line" hack for Custom Resolutions with Direct3D11 and OpenGL.
2017-04-01 11:16:25 +02:00
FlatOutPS2 975441dfe9 GSdx: Direct3D port of HPO special/V2
Adds a port of the new Half-pixel Offset options for the Direct3D
Hardware renderers.
2017-04-01 11:16:25 +02:00
Jonathan Li ba94643f0f gsdx:linux: Fix missing logo on some Linux distros
The pixdata format loader has been removed from recent versions of
gdk2-pixbuf, so the logo doesn't load. Avoid preprocessing the data and
leave the logo as an embedded bitmap file.
2017-03-30 17:45:49 +01:00