2019-06-19 09:09:21 +00:00
|
|
|
#version 450 core
|
|
|
|
|
|
|
|
#include "color_convert_generic.glsl"
|
|
|
|
#include "upsample_ayuv.glsl"
|
|
|
|
#include "swizzle.glsl"
|
|
|
|
|
|
|
|
layout(location = 0) in vec2 inTexCoord;
|
|
|
|
|
2019-11-26 07:11:25 +00:00
|
|
|
layout(set = 0, binding = 0) uniform reorder {
|
2019-06-19 09:09:21 +00:00
|
|
|
ivec4 in_reorder_idx;
|
|
|
|
ivec4 out_reorder_idx;
|
|
|
|
ivec2 texSize;
|
|
|
|
ColorMatrices matrices;
|
|
|
|
};
|
2019-11-26 07:11:25 +00:00
|
|
|
layout(set = 0, binding = 1) uniform sampler2D inTexture0;
|
2019-06-19 09:09:21 +00:00
|
|
|
|
|
|
|
layout(location = 0) out vec4 outColor0;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec4 yuva = upsample_AYUV (inTexture0, inTexCoord, in_reorder_idx);
|
|
|
|
vec4 rgba = vec4(1.0);
|
|
|
|
rgba.a = yuva.a;
|
|
|
|
rgba.rgb = color_convert_texel (yuva.xyz, matrices);
|
2019-06-20 04:36:02 +00:00
|
|
|
outColor0 = swizzle(rgba, out_reorder_idx);
|
2019-06-19 09:09:21 +00:00
|
|
|
}
|