Files
comaps/libs/shaders/GL/arrow3d.vsh.glsl
Alexander Borsuk 76ffc99abd New cpp folder structure
Signed-off-by: Alexander Borsuk <me@alex.bio>
2025-08-14 20:52:04 +07:00

19 lines
406 B
GLSL

attribute vec3 a_pos;
attribute vec3 a_normal;
uniform mat4 u_transform;
uniform mat4 u_normalTransform;
varying vec3 v_normal;
void main()
{
vec4 position = u_transform * vec4(a_pos, 1.0);
v_normal = normalize((u_normalTransform * vec4(a_normal, 0.0)).xyz);
gl_Position = position;
#ifdef VULKAN
gl_Position.y = -gl_Position.y;
gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5;
#endif
}