summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
AgeCommit message (Collapse)Author
2019-12-03VideoCommon/TextureConverterShaderGen: Convert over to fmtLioncash
Easily the most straightforward to convert over, given the lack of significant formatting arguments.
2019-07-18EFB2Tex: Set alpha channel of Z24X8 copies to 1Stenzek
Matches EFB2RAM.
2019-05-30VideoCommon: Remove unnecessary memset on ShaderUid instances.Lioncash
Zero-initialization zeroes out all members and padding bits, so this is safe to do. While we're at it, also add static assertions that enforce the necessary requirements of a UID type explicitly within the ShaderUid class. This way, we can remove several memset calls around the shader generation code that makes sure the underlying UID data is zeroed out. Now our ShaderUid class enforces this for us, so we don't need to care about it at the usage sites.
2019-04-20ShaderGen: Use interface blocks when geometry shaders are supportedStenzek
We don't use explicit locations in OpenGL currently, so this breaks when we use alternative names in the geometry shaders.
2019-02-19Move most backend functionality to VideoCommonStenzek
2019-02-17TextureConverterShader: Write EFB2Tex XFB copies with alpha value of 1Stenzek
This way we don't end up with artifacts of the EFB's alpha values in frame dumps. XFB copies loaded from RAM also set the alpha to 1, so this will match.
2018-05-22EFB2RAM: Apply copy filter as a float coefficient after samplingStenzek
Using 8-bit integer math here lead to precision loss for depth copies, which broke various effects in games, e.g. lens flare in MK:DD. It's unlikely the console implements this as a floating-point multiply (fixed-point perhaps), but since we have the float round trip in our EFB2RAM shaders anyway, it's not going to make things any worse. If we do rewrite our shaders to use integer math completely, then it might be worth switching this conversion back to integers. However, the range of the values (format) should be known, or we should expand all values out to 24-bits first.
2018-05-03TextureConversionShader: Don't sample from adjacent rows when not neededStenzek
2018-05-02TextureConversionShader: Fix compile errors in OpenGL ESStenzek
2018-04-29Implement EFB copy filter and gamma in hardware backendsStenzek
Also makes y_scale a dynamic parameter for EFB copies, as it doesn't make sense to keep it as part of the uid, otherwise we're generating redundant shaders.
2017-12-19Reimplement EFB copy for intensity formatsEmmanuel Gil Peyrot
This is the direct continuation of #5887, and removes the last usage of the colmat matrix in EFB copy conversion shaders.
2017-12-12Fix GLES GPU texture conversion shaderJonathan Hamilton
GLES doesn't support C-style array initialisers, so stuff like: Type var[2] = { VALUE_A, VALUE_B }; isn't supported in GLES (it was added in GL_ARB_shading_language_420pack). The texture conversion shader used this, so would fail to compile on GLES.
2017-12-06TextureConverterShaderGen: Make generated shaders HLSL-compatibleStenzek
2017-12-02VideoCommon: Reimplement texture format conversionEmmanuel Gil Peyrot
This fixes the rendering of the scan visor in Metroid Prime 2: Echoes, as seen in https://fifoci.dolphin-emu.org/dff/mp2-scanner/ The alpha channel was off-by-one on Ivy Bridge due to the rounding after multiplication with colmat. This commit removes this matrix altogether in most cases, making them simple GLSL swizzles.
2017-12-02VideoCommon: Create a namespace for TextureConversionShaderGen.degasus
2017-12-02VideoBackends: Use VideoCommon shader generators for efb2tex copies.Markus Wick
This will generate one shader per copy format. For now, it is the same shader with the colmat hard coded. So it should already improve the GPU performance a bit, but a rewrite of the shader generator is suggested. Half of the patch is done by linkmauve1: VideoCommon: Reorganise the shader writes.