#version 100 precision mediump int; precision highp float; attribute vec4 position; attribute vec3 normal; attribute vec4 tangent; attribute vec2 uv0; attribute vec2 uv1; uniform mat4 wMat; uniform mat4 wvpMat; uniform vec4 spotlightDir0; uniform vec4 spotlightDir1; uniform vec4 spotlightDir2; varying vec3 oNorm; varying vec3 oTang; varying vec3 oBinormal; varying vec3 oSpDir0; varying vec3 oSpDir1; varying vec3 oSpDir2; varying vec4 oWp; varying vec4 oUv0; void main() { oWp = wMat * position; gl_Position = wvpMat * position; oUv0.xy = uv0; oUv0.zw = uv1; oTang = tangent.xyz; oBinormal = cross(tangent.xyz, normal); oNorm = normal; oSpDir0 = (wMat * spotlightDir0).xyz; oSpDir1 = (wMat * spotlightDir1).xyz; oSpDir2 = (wMat * spotlightDir2).xyz; }