Files
test/source/blender/gpu/shaders/gpu_shader_3D_vert.glsl
Mike Erwin 8dcf7a46a2 OpenGL: fix GPU_SHADER_SIMPLE_LIGHTING_SMOOTH_COLOR
The fragment shader expects a normal, but the vertex shader was not providing one.

Fix: added a new vertex shader that has normals + smooth color interpolation.

I also split gpu_shader_3D_vert in two:
- one with just position
- one with position + normal

For each of the builtin shaders, we should be able to look at the GLSL and tell exactly what it's doing. Using #defines and #ifdefs for rendering options makes the shaders hard to read and easy to break.
2017-04-16 15:04:07 -04:00

14 lines
191 B
GLSL

uniform mat4 ModelViewProjectionMatrix;
#if __VERSION__ == 120
attribute vec3 pos;
#else
in vec3 pos;
#endif
void main()
{
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
}