You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

voxelvert.vert.glsl 473B

12345678910111213141516171819
  1. #version 430
  2. layout(location = 0) in vec3 position;
  3. layout(location = 1) in vec3 texCoord;
  4. layout(location = 2) in vec3 lightData;
  5. uniform mat4 proj, view, model; //transform matrix
  6. out vec3 texCoordInterp;
  7. out vec3 lightDataInterp;
  8. out vec4 eyeSpacePos;
  9. void main() {
  10. vec4 eyeSpacePosVert = view * model * vec4(position, 1.0);
  11. gl_Position = proj * eyeSpacePosVert;
  12. texCoordInterp = texCoord;
  13. lightDataInterp = lightData;
  14. eyeSpacePos = eyeSpacePosVert;
  15. }