Much improved cube map visualization
Now displays all six cube map faces as a single cross
This commit is contained in:
parent
50e4972d02
commit
bfdf821d31
5 changed files with 57 additions and 20 deletions
|
|
@ -1,7 +1,5 @@
|
|||
#version 450
|
||||
|
||||
layout (location = 0) in vec3 inPos;
|
||||
|
||||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
mat4 projection;
|
||||
|
|
@ -9,16 +7,11 @@ layout (binding = 0) uniform UBO
|
|||
mat4 model;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) out vec3 outUVW;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
layout (location = 0) out vec2 outUV;
|
||||
|
||||
void main()
|
||||
{
|
||||
outUVW = inPos;
|
||||
gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
|
||||
outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
||||
gl_Position = vec4(outUV.xy * 2.0f - 1.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue