[Vulkan] Builtin shaders and shaders offline compilation script
[platform/core/uifw/dali-core.git] / dali / graphics / vulkan / shaders / border-visual-anti-aliasing-shader.vert
1 #version 430
2
3 // in variables
4 layout( location = 0 ) in vec2 aPosition;
5 layout( location = 0 ) in vec2 aDrift;
6
7 // uniforms
8 layout( set = 0, binding = 0, std140 ) uniform VertexData
9 {
10   mat4 uMvpMatrix;
11   vec3 uSize;
12   float borderSize;
13 };
14
15 // out variables
16 layout( location = 0 ) out float vAlpha;
17
18 void main()
19 {
20   vec2 position = aPosition*(uSize.xy+vec2(0.75)) + aDrift*(borderSize+1.5);
21   gl_Position = uMvpMatrix * vec4(position, 0.0, 1.0);
22   vAlpha = min( abs(aDrift.x), abs(aDrift.y) )*(borderSize+1.5);
23 }