/* * Copyright (C) 2018, 2022 Tomasz Kramkowski * SPDX-License-Identifier: MIT */ void main() { gl_Position = proj * view * model * vec4(pos, 1.0); o.pos = vec3(view * model * vec4(pos, 1.0)); o.uv = uv; // TODO: Try to work out how to only do this ONCE in C or see if it matters o.norm = mat3(transpose(inverse(view * model))) * norm; o.lipos = vec3(view * vec4(light, 1.0)); }