<?xml version="1.0" encoding="UTF-8" ?>
<shader>
	<fragment><![CDATA[
		#version 150

		uniform vec4 path_Tint;
		uniform vec4 path_Fill;

		smooth in vec2 frag_ControlPoint;

		out vec4 path_FragColor;

		void main()
		{
			float u = frag_ControlPoint.s;
			float v = frag_ControlPoint.t;
			
			if ((u * u) - v > 0.0)
				discard;
			
			path_FragColor = path_Fill * path_Tint;
		}
	]]></fragment>
	<vertex><![CDATA[
		#version 150

		uniform mat4 path_Projection;
		uniform mat4 path_View;
		uniform mat4 path_World;
		uniform float path_CurveFactor;

		in vec2 path_Position;
		in vec2 path_ControlPoint;

		smooth out vec2 frag_ControlPoint;

		void main()
		{
			vec4 p = path_View * path_World * vec4(path_Position, 0.0, 1.0);
			
			if (path_CurveFactor > 0)
			{
				float z = (p.z + path_CurveFactor) / path_CurveFactor;
				p.y -= z * z;
			}
						
			gl_Position = path_Projection * p;
			
			frag_ControlPoint = path_ControlPoint;
		}
	]]></vertex>
</shader>
