pcsx2/plugins/GSdx/res/glsl
Gregory Hainaut 419dfe0544 glsl: redo color/alpha management correction
Please test it!

GS supports 3 formats for the output:

32 bits: normal case
=> no change

24 bits: like 32 bits but without alpha channel
=> mask alpha channel (ie don't write it anymore)
=> Always uses 1.0f as blending coefficient

16 bits: RGB5A1, emulated by a 32 bits openGL texture. I think it will be more correct to use
a real 16 bits GL texture. Unfortunately it would cost several (slow) target conversions.
Anyway as a current solution
=>  apply a mask of 0xF8 on color when SW blending is used (improve Castlevania shadow)
unfortunately normal blending mode still uses the full range of colors!

This commit also corrects a couple of blending factor. 128/255 is equivalent to 1.0f in PS2, whereas GPU uses 1.0f. So the blending factor must be 255/128 instead of 2

Note: disable CRC hack and enable accurate_colclip to see Castlevania shadow ^^
(issue #380).
Note2: SW renderer is darker on Castlevania. I don't know why maybe linked to the 16 bits format poorly emulated
2015-05-26 16:49:43 +02:00
..
convert.glsl glsl: correct the alternate implementation of ps_main1 2015-05-24 13:43:36 +02:00
fxaa.fx glsl: move shader into a separate directory 2015-04-19 18:49:02 +02:00
interlace.glsl glsl: move shader into a separate directory 2015-04-19 18:49:02 +02:00
merge.glsl glsl: move shader into a separate directory 2015-04-19 18:49:02 +02:00
shadeboost.glsl glsl: move shader into a separate directory 2015-04-19 18:49:02 +02:00
tfx_fs.glsl glsl: redo color/alpha management correction 2015-05-26 16:49:43 +02:00
tfx_fs_subroutine.glsl glsl: move shader into a separate directory 2015-04-19 18:49:02 +02:00
tfx_vgs.glsl glsl: drop useless ifndef 2015-05-08 19:28:17 +02:00