#version 120 attribute vec4 vColor; attribute float vSize; attribute vec4 vPosition; uniform mat4 projectionM = mat4(1.0); uniform mat4 cameraM = mat4(1.0); uniform mat4 worldM = mat4(1.0); uniform mat4 modelM = mat4(1.0); uniform mat4 objectM = mat4(1.0); varying vec4 color; uniform float time = 1; void main() { gl_Position = projectionM * cameraM * worldM * modelM * objectM * vPosition; color = vec4(vColor.rgb, 1.0); return; } #version 120 varying vec4 color; uniform float Ambient; void main() { gl_FragColor = min(color, vec4(1.0)); }
ShaderInfo shaders [] = { { GL_VERTEX_SHADER, "vertex.glsl"}, { GL_FRAGMENT_SHADER, "fragment.glsl"}, { GL_NONE, NULL} }; switch (shaderScheme_G) { case 1: shaders[0].filename = "vertexA.glsl"; shaders[1].filename = "fragmentA.glsl"; break; }