2024-07-30 11:42:36 +00:00
|
|
|
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
|
|
|
// SPDX-License-Identifier: GPL-3.0+
|
2023-07-20 13:23:09 +00:00
|
|
|
|
2011-11-30 21:42:41 +00:00
|
|
|
//#version 420 // Keep it for editor detection
|
2011-11-21 22:36:03 +00:00
|
|
|
|
2013-05-27 16:53:38 +00:00
|
|
|
#ifdef FRAGMENT_SHADER
|
2011-11-21 22:36:03 +00:00
|
|
|
|
2021-11-30 10:35:45 +00:00
|
|
|
in vec4 PSin_p;
|
|
|
|
in vec2 PSin_t;
|
|
|
|
in vec4 PSin_c;
|
|
|
|
|
2021-10-20 07:52:05 +00:00
|
|
|
uniform vec4 BGColor;
|
2016-06-05 14:42:52 +00:00
|
|
|
|
2023-03-26 10:09:42 +00:00
|
|
|
layout(binding = 0) uniform sampler2D TextureSampler;
|
|
|
|
|
2011-12-07 22:05:46 +00:00
|
|
|
layout(location = 0) out vec4 SV_Target0;
|
2011-11-30 21:42:41 +00:00
|
|
|
|
|
|
|
void ps_main0()
|
2011-11-21 22:36:03 +00:00
|
|
|
{
|
2023-04-13 03:23:31 +00:00
|
|
|
vec4 c = texture(TextureSampler, PSin_t);
|
|
|
|
// Note: clamping will be done by fixed unit
|
|
|
|
c.a *= 2.0f;
|
|
|
|
SV_Target0 = c;
|
2011-11-21 22:36:03 +00:00
|
|
|
}
|
|
|
|
|
2011-11-30 21:42:41 +00:00
|
|
|
void ps_main1()
|
2011-11-21 22:36:03 +00:00
|
|
|
{
|
2023-04-13 03:23:31 +00:00
|
|
|
vec4 c = texture(TextureSampler, PSin_t);
|
|
|
|
c.a = BGColor.a;
|
|
|
|
SV_Target0 = c;
|
2011-11-21 22:36:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|