Code cleanup
Skybox now rotates with the camera, fixed depth issues
This commit is contained in:
parent
68b2e0fcfe
commit
fe46cef0a7
5 changed files with 142 additions and 192 deletions
|
|
@ -6,6 +6,8 @@ layout (binding = 0) uniform UBO
|
|||
{
|
||||
mat4 projection;
|
||||
mat4 model;
|
||||
mat4 normal;
|
||||
mat4 view;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) out vec3 outUVW;
|
||||
|
|
@ -13,5 +15,7 @@ layout (location = 0) out vec3 outUVW;
|
|||
void main()
|
||||
{
|
||||
outUVW = inPos;
|
||||
gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
|
||||
// Remove translation from view matrix
|
||||
mat4 viewMat = mat4(mat3(ubo.view));
|
||||
gl_Position = ubo.projection * viewMat * ubo.model * vec4(inPos.xyz, 1.0);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue