25 lines
470 B
GLSL
25 lines
470 B
GLSL
#version 450
|
|
#extension GL_GOOGLE_include_directive : enable
|
|
|
|
layout (set = 0, binding = 0) uniform UniformBufferObject
|
|
{
|
|
mat4 proj;
|
|
mat4 view;
|
|
} ubo;
|
|
|
|
|
|
layout(location = 0) in vec3 inPosition;
|
|
|
|
layout (location = 0) out vec3 outUVW;
|
|
|
|
#include "include/tocubemap.glsl"
|
|
void main()
|
|
{
|
|
outUVW = tocubemap(inPosition);
|
|
|
|
mat4 viewNoTranslation = mat4(mat3(ubo.view));
|
|
|
|
vec4 pos = ubo.proj * viewNoTranslation * vec4(inPosition.xyz, 1.0);
|
|
gl_Position = pos.xyww;
|
|
}
|