mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 04:24:29 +00:00
Rewrite shaders to use OpenGL ES3 syntax
Signed-off-by: renderexpert <expert@renderconsulting.co.uk>
This commit is contained in:
committed by
Konstantin Pastbin
parent
9b3507211f
commit
6d0daf6fe7
@@ -1,14 +1,26 @@
|
||||
in vec4 a_position;
|
||||
in vec2 a_normal;
|
||||
in vec2 a_colorTexCoords;
|
||||
layout (location = 0) in vec4 a_position;
|
||||
layout (location = 1) in vec2 a_normal;
|
||||
layout (location = 2) in vec2 a_colorTexCoords;
|
||||
|
||||
uniform mat4 u_modelView;
|
||||
uniform mat4 u_projection;
|
||||
uniform mat4 u_pivotTransform;
|
||||
layout (location = 0) out vec2 v_colorTexCoords;
|
||||
|
||||
uniform float u_arrowHalfWidth;
|
||||
|
||||
out vec2 v_colorTexCoords;
|
||||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
mat4 u_modelView;
|
||||
mat4 u_projection;
|
||||
mat4 u_pivotTransform;
|
||||
vec4 u_routeParams;
|
||||
vec4 u_color;
|
||||
vec4 u_maskColor;
|
||||
vec4 u_outlineColor;
|
||||
vec4 u_fakeColor;
|
||||
vec4 u_fakeOutlineColor;
|
||||
vec2 u_fakeBorders;
|
||||
vec2 u_pattern;
|
||||
vec2 u_angleCosSin;
|
||||
float u_arrowHalfWidth;
|
||||
float u_opacity;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
@@ -19,9 +31,7 @@ void main()
|
||||
transformedAxisPos = calcLineTransformedAxisPos(transformedAxisPos, a_position.xy + norm,
|
||||
u_modelView, length(norm));
|
||||
}
|
||||
|
||||
v_colorTexCoords = a_colorTexCoords;
|
||||
|
||||
vec4 pos = vec4(transformedAxisPos, a_position.z, 1.0) * u_projection;
|
||||
gl_Position = applyPivotTransform(pos, u_pivotTransform, 0.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user