/** * QUIK: User Interface Kit * Copyright (C) 2023 Halit Utku Maden, et al. */ #version 120 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; fv4Color = v4Color; }