1 varying vec3 worldNormal; 2 3 // This is where actual shader code begins 4 void main() { 5 vec4 worldPos = UNI_model * ATTRIB_position; 6 gl_Position = UNI_proj * worldPos; 7 8 mat3 model3 = mat3(UNI_model[0].xyz, UNI_model[1].xyz, UNI_model[2].xyz); 9 worldNormal = model3 * ATTRIB_normal; 10 } 11