Commit Graph

1560 Commits

Author SHA1 Message Date
Gregory Hainaut 95c374bbcc glsl: Round 0.95+ to 1 for texel colors
It improves SotC blooming. Suikoden seems to be fine too.
2015-07-30 18:21:01 +02:00
Gregory Hainaut 01a1b1a5e6 gsdx-ogl: add the code to handle point and line in SW blending 2015-07-30 18:21:01 +02:00
Gregory Hainaut a85894e159 gsdx-ogl: move texture shuffle and fbmask into a dedicated function
DrawPrims is really too big now
2015-07-30 18:21:01 +02:00
Gregory Hainaut b632b2a478 gsdx-linux: add a new combo box to select the blend accuracy level 2015-07-30 18:21:00 +02:00
Gregory Hainaut 5c1b8986c6 gsdx-ogl: use SW blending when no barrier is required
Speed penality is small (only GPU) but it is more accurate
2015-07-30 18:21:00 +02:00
Gregory Hainaut 8c8fe633a5 gsdx-ogl: merge 3 accurate* option into a nice combobox
It is much easier to configure this way
2015-07-30 18:21:00 +02:00
Gregory Hainaut 8da63cf95a gsdx-ogl: try to enable sw blending for sprite rendering
The idea is that sprites are often use for post-processing effect (ofc except 2D games)

Most of the time post-processing supports SW blending with a small speed penality. SW
blending is more accurate so it is better to use it.
2015-07-30 18:21:00 +02:00
Gregory Hainaut f4e881ad30 gsdx: always set texture shuffle flag
Avoid bad effects in 16 bits RT games
2015-07-30 09:15:04 +02:00
Miguel A. Colón Vélez e4ab71abf3 Add authors comment that suggest public-domain license.
Sourceforge was dead for more than a week therefore add the license
information. I could not find the original TGM source (dead link) so I'm not
even sure if this still applies or if the glsl was totally rewritten. None
of the glsl files have a copyright header so it's hard to tell.
2015-07-27 14:21:29 -04:00
Gregory Hainaut f2c77ffa08 gsdx:tc: detect texture shuffle in previous frame
GoW2 uses the effect at the start of a new frame and therefore need the
state of the previous frame. (Note 1 issue remains)

Ricky need to be tested.
2015-07-26 10:14:07 +02:00
Gregory Hainaut cb4af8fe83 gsdx-ogl: small optimization for the GPU
Gain: 1% at 4x on SotC (it partially compensates recent additions)

When the color is constant and equal to 128, the MODULATE mode is
equivalent to the DECAL mode. It saves 5 instructions on the FS.
2015-07-21 08:19:36 +02:00
Gregory Hainaut 7ca463bf75 gsdx: NaN is likely not well supported for S & T
Add also a comment to explain the NaN issue on Q
2015-07-21 08:19:36 +02:00
Gregory Hainaut 223b7daa1d gsdx-ogl: fix fbmask regression
I forget to remove an useless 255.0f factor
2015-07-19 23:55:27 +02:00
Gregory Hainaut a54e636364 gsdx-linux: add a tooltip for the filtering option 2015-07-19 23:27:45 +02:00
Gregory Hainaut 5c740ff41e gsdx-ogl: wipeout AlphaStencil & Alpha hack
Accurate options do a better jobs. Technically it can still
be useful for old gpu/driver that doesn't support the GL4.5 extension.

On Windows, you can still rely on Dx

On linux, free driver support it (except Intel)
2015-07-19 22:43:48 +02:00
Gregory Hainaut 759e75091a gsdx-gui: yes openGL support correctly 8 bits texture 2015-07-19 17:29:25 +02:00
Gregory Hainaut 6719fc89a6 gsdx-sw: Nan is not well supported in Vertex
It fixes the bad light on Silent Hill with the SW renderer.

Full story
if Q is NaN, m_vt.m_eq.q becomes wrongly true
/Q will wrongly be optimized in the "Vertex Shader" of the SW

Note: Add an assert for the STQ handler

Code path is quite hot so no need to add extra check for nothing
2015-07-19 16:41:05 +02:00
Gregory Hainaut 7f76883b98 Merge pull request #658 from ssakash/patch-34
Add Accurate Frame Buffer mask for Windows [GUI] and remove some old options.
2015-07-19 09:07:13 +02:00
Gregory Hainaut 38c086008d glsl: round blending as SW renderer
Better tone on God of War with ultra accurate mode
2015-07-18 17:16:46 +02:00
Gregory Hainaut 88cd333839 gsdx-ogl: don't enable both HW&SW blending 2015-07-18 16:15:52 +02:00
Gregory Hainaut c4e165067d glsl: use signed integer when working with substraction...
It mostly fixes rendering of GoW with ultra blending

Color is still a bit wrong but rounding is likely incorrect
2015-07-18 14:41:03 +02:00
Gregory Hainaut c701ab4368 glsl: don't use normalized value for color range
Globally shader uses less intruction (except blending part)

It would also allow to improve the rounding of color
2015-07-18 14:41:03 +02:00
Gregory Hainaut 57394a03e0 partially revert: glsl: disable computing of extra alpha coeff in SW blending
It generates undefined data in screen. Maybe blending isn't switch off properly.
I need to investigate it.
2015-07-18 14:41:03 +02:00
Gregory Hainaut 5f5266ba45 gsdx-ogl-debug: don't optimize alpha channel in dump
Allow to dump AEM part of the shader
2015-07-18 14:40:57 +02:00
Gregory Hainaut 036cb229a3 glsl: add various comment for future idea
For example GL4 GPU supports special bit operation
2015-07-18 14:40:57 +02:00
Gregory Hainaut 6c1c857024 gsdx-ogl-debug: properly detect start of instruction in dump 2015-07-18 14:40:46 +02:00
Akash 37897eb922 add accurate framebuffer mask for windows. 2015-07-18 11:24:00 +05:30
Akash 7c4f3d28ce remove is_gsopen stuffs since old GUI is deprecated. 2015-07-18 10:50:34 +05:30
Gregory Hainaut 698dda2310 gsdx-ogl: remove subroutine from the gui too 2015-07-17 22:28:59 +02:00
Gregory Hainaut 36e83b42ce glsl: round texture and fragment color as the SW renderer
GS uses integer value and does integer operation too.

This commit trunc the sampled texture, the interpoled fragment color
and the product of the 2.

It impacts negatively the perf of about 3/4% (GPU) but it fixes rendering on
suikoden and potentially some others games too.
2015-07-17 21:08:49 +02:00
Gregory Hainaut 5f247a6e16 glsl: rewrite tfx function to ease future update
No need to put lots of ifdef, compiler will optimize everything
It increases a bit the readability
2015-07-17 21:08:49 +02:00
Gregory Hainaut ea9e608288 gsdx-ogl: fix texture palette mask 2015-07-17 21:08:49 +02:00
Gregory Hainaut b4c04ed00a gsdx-ogl: wipeout subroutine code
Code was completey bitrotten
Code was a partial test (and yet 500 lines already)
Shader is more and more complex and multithreading support greatly
reduce the cost of shader switch
2015-07-17 21:08:49 +02:00
Gregory Hainaut e3751f6cd9 glsl: disable computing of extra alpha coeff in SW blending
Hum, I'm curious of the impact to enable only this code when it is actually used.
2015-07-17 21:08:49 +02:00
Gregory Hainaut 784822a5c2 glsl: redo blending management to use A/B/C/D directly
1/ Code is much more readable
2/ It will allow to round differently the operation in the future
2015-07-17 21:08:49 +02:00
Gregory Hainaut e245b27c97 gsdx-ogl-debug: allow to dump various ps shader
Nvidia allows to get the ASM of the shader of the compiled shader. It is useful
to check the performance.

It also allow me to compile most of shader code path for QA

Dump is enabled in linux replayer + debug_glsl_shader = 2
2015-07-17 21:08:48 +02:00
Jonathan Li 6c300288f9 gsdx: windows: Make GSReplay work for OpenGL
On Windows, GSReplay does not work with the OpenGL hardware and software
renderer. Make it work.
2015-07-15 20:40:47 +01:00
Gregory Hainaut 6ed137dc9c gsdx-ogl: log openGL driver version 2015-07-13 12:35:55 +02:00
Gregory Hainaut c9d6ce3b63 Merge pull request #653 from PCSX2/texture-shuffle-again
gsdx: texture shuffle detection
2015-07-12 18:48:00 +02:00
Gregory Hainaut 8be32e4661 gsdx-tc: fix a memory leak when depth isn't fully supported
Fix issue #642
2015-07-12 17:57:42 +02:00
Gregory Hainaut f6f28042bd gsdx: texture shuffle detection
Don't check rt 32 bits state, it give false positive on suikoden
2015-07-12 15:21:04 +02:00
Gregory Hainaut c660ea858b gsdx: move some CRC hacks to full level 2015-07-11 15:14:11 +02:00
Gregory Hainaut 5f8d3b9e4b gsdx-tc: remains in the memory
avoid a crash with kungfu panda
2015-07-11 14:35:35 +02:00
Gregory Hainaut a4bad8fdbc gsdx-ogl: avoid a bad conflict between accurate option 2015-07-11 14:35:35 +02:00
Gregory Hainaut 15b934eb2a gsdx-ogl: remove useless colclip message 2015-07-11 14:35:35 +02:00
Gregory Hainaut 91fbe6f108 gsdx-ogl: add some code to fix black netting on some renderings
Code is not yet enabled because it requires extensive test

The idea is to replace point by a 1 pixels sprite with the help of
a geometry shader. In 4x, point will be replaced by a 4x4 sprite.
2015-07-11 14:35:35 +02:00
Gregory Hainaut 5e7ce63ed1 glsl: add a geometry shader to upscale GS_POINT
The purpose is to avoid upscaling issue on POINT rendering (black netting on some FMVs)
2015-07-11 14:35:34 +02:00
Gregory Hainaut 2ccf108534 gsdx-ogl: add back a selector for the Geometry Shader 2015-07-11 14:35:34 +02:00
Gregory Hainaut 7f7f6c3b51 Merge pull request #640 from turtleli/gs-frame-title-fixes
GS frame title fixes
2015-07-11 09:47:27 +02:00
Gregory Hainaut 5ed45b6806 Merge pull request #644 from PCSX2/improve-texshuffle-detection
Improve texshuffle detection
2015-07-11 09:34:33 +02:00