VoxelEngine/vertex.glsl

22 lines
621 B
Text
Raw Normal View History

2017-08-27 12:51:26 +02:00
#version 410
uniform mat4 projModelViewMatrix;
uniform mat3 normalMatrix;
uniform mat3 rotMatrix;
layout(location = 0) in vec3 in_position;
layout(location = 1) in vec3 MyInColor;
layout(location = 2) in vec3 MyInSize;
layout(location = 0) out vec3 colorgeo;
layout(location = 1) out vec3 sizegeo;
void main()
{
colorgeo = MyInColor;
sizegeo = MyInSize;
gl_ClipDistance[0] = 100;
//gl_Position = projModelViewMatrix * vec4(rotMatrix *in_position, 1.0);
//gl_Position = vec4(rotMatrix *(projModelViewMatrix * vec4(in_position, 1.0)).xyz,1.0);
gl_Position = vec4(rotMatrix * in_position, 1.0);
}