Added support for shaders written in non-legacy GLSL.

This commit is contained in:
binary1248 2018-05-20 14:06:24 +02:00
parent 1dcad60878
commit db7e683688
No known key found for this signature in database
GPG key ID: E5E52A5D6082224A
18 changed files with 690 additions and 74 deletions

View file

@ -1,8 +1,16 @@
attribute vec2 positionAttribute;
attribute vec4 colorAttribute;
attribute vec2 texCoordAttribute;
uniform mat4 modelViewProjectionMatrix;
varying vec4 frontColor;
varying vec3 normal;
void main()
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_FrontColor = gl_Color;
normal = vec3(gl_MultiTexCoord0.xy, 1.0);
gl_Position = modelViewProjectionMatrix * vec4(positionAttribute, 0.0, 1.0);
frontColor = colorAttribute;
normal = vec3(texCoordAttribute, 1.0);
}