Dashboard/Quik/res/gl21.vert

25 lines
685 B
GLSL
Raw Normal View History

2023-06-30 18:35:24 +02:00
/**
* QUIK: User Interface Kit
* Copyright (C) 2023 Halit Utku Maden, et al.
*/
2023-09-22 20:23:59 +02:00
#version 120
2023-06-30 18:35:24 +02:00
attribute vec2 v2Position; /**< The vertex position.*/
attribute int iZIndex; /**< The z index. */
attribute vec2 v2TexPos; /**< The texture coorindates. */
attribute vec4 v4Color; /**< The vertex color. */
varying vec2 fv2TexPos;
varying vec4 fv4Color;
uniform mat4 m4Transforms; /**< The view matrix. */
uniform int iMaxZ; /**< Highest Z coordinate. */
void main(void)
{
vec4 v = vec4(v2Position, float(iZIndex)/float(iMaxZ), 1);
gl_Position = v * m4Transforms;
fv2TexPos = v2TexPos;
2023-09-22 20:23:59 +02:00
fv4Color = v4Color;
2023-06-30 18:35:24 +02:00
}