#version 450

layout(location = 0) in vec3 in_Position;
layout(location = 1) in vec3 in_Normal;
//layout(location = 2) in vec2 in_TexCoord;

layout(binding = 2) uniform uniforms
{
  mat4 modelToWorld;
  mat4 worldToView;
  mat4 projectionMatrix;
} uni;

layout(location = 0) out float shade;

void main(void)
{
	shade = (mat3(uni.worldToView * uni.modelToWorld) * in_Normal).z; // Fake shading
	gl_Position = uni.projectionMatrix * uni.worldToView * uni.modelToWorld * vec4(in_Position, 1.0);

	// Vulkan Y axis fix. Always put this at end until the global fix can be used.
	gl_Position.y = -gl_Position.y;
}

