1$input a_position, a_normal 2$output v_normal 3 4/* 5 * Copyright 2019-2019 Attila Kocsis. All rights reserved. 6 * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 7 */ 8 9#include <bgfx_shader.sh> 10 11void main() 12{ 13 gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); 14 15 vec3 normal = a_normal.xyz*2.0 - 1.0; 16 v_normal = mul(u_model[0], vec4(normal, 0.0) ).xyz; 17} 18