Implemented rotating cube.

This commit is contained in:
2024-09-15 14:46:16 +02:00
parent bcdabba916
commit 5f8a4656fe
13 changed files with 379 additions and 7 deletions

BIN
assets/bitmaps/cube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

12
assets/meshes/cube.mtl Normal file
View File

@@ -0,0 +1,12 @@
# Blender 4.1.1 MTL File: 'None'
# www.blender.org
newmtl Material
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2

View File

@@ -0,0 +1,23 @@
#version 460
layout(set = 1, binding = 0)
uniform Parameters
{
mat4 u_worldToView;
mat4 u_viewToClip;
};
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 * vec4(i_position, 1.0);
o_texCoord = i_texCoord;
}