2011-11-30 21:42:41 +00:00
|
|
|
//#version 420 // Keep it for editor detection
|
2011-11-21 22:36:03 +00:00
|
|
|
|
2012-01-02 20:08:11 +00:00
|
|
|
struct vertex_basic
|
|
|
|
{
|
|
|
|
vec4 p;
|
|
|
|
vec2 t;
|
|
|
|
};
|
|
|
|
|
2011-11-30 21:42:41 +00:00
|
|
|
#ifdef FRAGMENT_SHADER
|
2012-01-02 20:08:11 +00:00
|
|
|
layout(location = 0) in vertex_basic PSin;
|
2011-11-21 22:36:03 +00:00
|
|
|
|
2011-12-07 22:05:46 +00:00
|
|
|
layout(location = 0) out vec4 SV_Target0;
|
2011-11-30 21:42:41 +00:00
|
|
|
|
2013-04-19 19:16:26 +00:00
|
|
|
#ifdef DISABLE_GL42
|
|
|
|
layout(std140) uniform cb10
|
|
|
|
#else
|
|
|
|
layout(std140, binding = 10) uniform cb10
|
|
|
|
#endif
|
2011-11-21 22:36:03 +00:00
|
|
|
{
|
2011-11-30 21:42:41 +00:00
|
|
|
vec4 BGColor;
|
2011-11-21 22:36:03 +00:00
|
|
|
};
|
|
|
|
|
2013-05-25 14:28:16 +00:00
|
|
|
#ifdef DISABLE_GL42
|
|
|
|
uniform sampler2D TextureSampler;
|
|
|
|
#else
|
2011-11-30 21:42:41 +00:00
|
|
|
layout(binding = 0) uniform sampler2D TextureSampler;
|
2013-05-25 14:28:16 +00:00
|
|
|
#endif
|
2011-11-30 21:42:41 +00:00
|
|
|
|
|
|
|
void ps_main0()
|
2011-11-21 22:36:03 +00:00
|
|
|
{
|
2012-01-02 20:08:11 +00:00
|
|
|
vec4 c = texture(TextureSampler, PSin.t);
|
2011-12-07 22:05:46 +00:00
|
|
|
c.a = min(c.a * 2, 1.0);
|
2011-11-30 21:42:41 +00:00
|
|
|
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
|
|
|
{
|
2012-01-02 20:08:11 +00:00
|
|
|
vec4 c = texture(TextureSampler, PSin.t);
|
2011-11-21 22:36:03 +00:00
|
|
|
c.a = BGColor.a;
|
2011-11-30 21:42:41 +00:00
|
|
|
SV_Target0 = c;
|
2011-11-21 22:36:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|