/** * QUIK: User Interface Kit * Copyright (C) 2023 Halit Utku Maden, et al. */ #version 130 in vec2 v2Position; /**< The vertex position.*/ in float fZIndex; /**< The z index. */ in vec2 v2TexPos; /**< The texture coorindates. */ in float fTexLayer; /**< The texture layer for 3D textures. */ in vec4 v4Color; /**< The vertex color. */ out vec2 fv2TexPos; out float ffTexLayer; out vec4 fv4Color; uniform mat4 m4Transforms; /**< The view matrix. */ uniform float fMaxZ; /**< Highest Z coordinate. */ const mat4 m4BaseTransforms = mat4( vec4( 2.0, 0.0, 0.0, 0.0), vec4( 0.0, -2.0, 0.0, 0.0), vec4( 0.0, 0.0, 1.0, 0.0), vec4(-1.0, 1.0, 0.0, 1.0) ); void main(void) { vec4 v = vec4(v2Position, fZIndex/fMaxZ, 1); gl_Position = m4Transforms * v; fv2TexPos = v2TexPos; fv4Color = v4Color; ffTexLayer = fTexLayer; }