#version 410 in vec3 col; in vec3 nor; in vec2 uv; uniform float partIndex_highlightColor; uniform float partIndex_misc; out vec3 colV; // ramped color from vertex color out vec4 miscV; // four vals: stripe width, stripe rate out vec2 uvV; // ramped uv from vertex uv #include "commonDeclare.glsl" void main(void) { #include "commonProjection.glsl" // viewPosV = (cameraMatrix * vec4(worldPosV, 1.0)).xyz; //viewPosV.z += 0.05; //transformedPos = projectionMatrix * vec4(viewPosV, 1.0); transformedPos.z -= 0.00001; gl_Position = transformedPos; vec4 highlightColor = texture(partValues, vec2(partIndex_highlightColor, partSlot)); vec4 partMisc = texture(partValues, vec2(partIndex_misc, partSlot)); colV = mix(col, highlightColor.rgb, highlightColor.a); uvV = uv; miscV = partMisc; }