27 lines
No EOL
521 B
GLSL
27 lines
No EOL
521 B
GLSL
#version 450
|
|
|
|
layout (location = 0) in vec3 in_position;
|
|
|
|
layout (set = 0, binding = 0) uniform CameraProperties
|
|
{
|
|
mat4 view;
|
|
mat4 proj;
|
|
mat4 vp;
|
|
|
|
mat4 inv_view;
|
|
mat4 inv_proj;
|
|
} globals;
|
|
|
|
layout (location = 0) out vec3 out_uvw;
|
|
|
|
void main()
|
|
{
|
|
out_uvw = in_position;
|
|
|
|
// Convert cubemap coordinates into Vulkan coordinate space
|
|
out_uvw.xy *= -1.0;
|
|
|
|
// Remove translation from view matrix
|
|
mat4 view_mat = mat4(mat3(globals.view));
|
|
gl_Position = globals.proj * view_mat * vec4(in_position, 1.0);
|
|
} |