Implemented scene loading. (Still problems with depth testing, WIP).

This commit is contained in:
2024-09-30 17:37:50 +02:00
parent e92f414e02
commit c904353baf
19 changed files with 225 additions and 19 deletions

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -0,0 +1,7 @@
nodes:
- type: mesh
translation: [0, 0, 0]
mesh: meshes/cube.obj
- type: mesh
translation: [1, 0, -10]
mesh: meshes/cube.obj

View File

@@ -0,0 +1,29 @@
#version 460
layout(set = 1, binding = 0)
uniform PerSceneParameters
{
mat4 u_worldToView;
mat4 u_viewToClip;
};
layout(set = 1, binding = 1)
uniform PerModelParameters
{
mat4 u_modelToWorld;
};
layout(location = 0)
in vec3 i_position;
layout(location = 1)
in vec2 i_texCoord;
layout(location = 0)
out vec2 o_texCoord;
void main()
{
gl_Position = u_viewToClip * u_worldToView * u_modelToWorld * vec4(i_position, 1.0);
o_texCoord = i_texCoord;
}