Camera and proper rendering
This commit is contained in:
parent
3040800275
commit
a8adf662ff
48 changed files with 65391 additions and 22367 deletions
BIN
resources/models/Corvette/CorvetteOBJ.idx
Normal file
BIN
resources/models/Corvette/CorvetteOBJ.idx
Normal file
Binary file not shown.
15
resources/models/Corvette/CorvetteOBJ.json
Normal file
15
resources/models/Corvette/CorvetteOBJ.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"ID": "CorvetteOBJ",
|
||||
"Meshes": [
|
||||
{
|
||||
"ID": "cube_0",
|
||||
"MaterialID": "CorvetteOBJ-mat-1",
|
||||
"OffsetVertex": 0,
|
||||
"VertexSize": 452640,
|
||||
"OffsetIndex": 0,
|
||||
"IndexSize": 151488
|
||||
}
|
||||
],
|
||||
"VertexPath": "resources/models/Corvette/CorvetteOBJ.vtx",
|
||||
"IndexPath": "resources/models/Corvette/CorvetteOBJ.idx"
|
||||
}
|
||||
4
resources/models/Corvette/CorvetteOBJ.mtl
Normal file
4
resources/models/Corvette/CorvetteOBJ.mtl
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Made in Blockbench 5.1.4
|
||||
newmtl m_64480dc7-fc68-f52d-eb18-7368900ee2a3
|
||||
map_Kd corvetteclass.png
|
||||
newmtl none
|
||||
46293
resources/models/Corvette/CorvetteOBJ.obj
Normal file
46293
resources/models/Corvette/CorvetteOBJ.obj
Normal file
File diff suppressed because it is too large
Load diff
BIN
resources/models/Corvette/CorvetteOBJ.vtx
Normal file
BIN
resources/models/Corvette/CorvetteOBJ.vtx
Normal file
Binary file not shown.
32
resources/models/Corvette/CorvetteOBJ_mat.json
Normal file
32
resources/models/Corvette/CorvetteOBJ_mat.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
{
|
||||
"ID": "CorvetteOBJ-mat-0",
|
||||
"TexturePath": "",
|
||||
"DiffuseColour": {
|
||||
"X": 0.6,
|
||||
"Y": 0.6,
|
||||
"Z": 0.6,
|
||||
"W": 1.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "CorvetteOBJ-mat-1",
|
||||
"TexturePath": "resources\\models\\Corvette\\corvetteclass.png",
|
||||
"DiffuseColour": {
|
||||
"X": 0.6,
|
||||
"Y": 0.6,
|
||||
"Z": 0.6,
|
||||
"W": 1.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "CorvetteOBJ-mat-2",
|
||||
"TexturePath": "",
|
||||
"DiffuseColour": {
|
||||
"X": 0.6,
|
||||
"Y": 0.6,
|
||||
"Z": 0.6,
|
||||
"W": 1.0
|
||||
}
|
||||
}
|
||||
]
|
||||
BIN
resources/models/Corvette/corvetteclass.png
Normal file
BIN
resources/models/Corvette/corvetteclass.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
BIN
resources/models/Metro/OBJ/MetroCarLeadDefault.png
Normal file
BIN
resources/models/Metro/OBJ/MetroCarLeadDefault.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
resources/models/Metro/OBJ/MetroLeadCar.idx
Normal file
BIN
resources/models/Metro/OBJ/MetroLeadCar.idx
Normal file
Binary file not shown.
15
resources/models/Metro/OBJ/MetroLeadCar.json
Normal file
15
resources/models/Metro/OBJ/MetroLeadCar.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"ID": "MetroLeadCar",
|
||||
"Meshes": [
|
||||
{
|
||||
"ID": "DoorForward_0",
|
||||
"MaterialID": "MetroLeadCar-mat-1",
|
||||
"OffsetVertex": 0,
|
||||
"VertexSize": 186900,
|
||||
"OffsetIndex": 0,
|
||||
"IndexSize": 58032
|
||||
}
|
||||
],
|
||||
"VertexPath": "resources/models/Metro/OBJ/MetroLeadCar.vtx",
|
||||
"IndexPath": "resources/models/Metro/OBJ/MetroLeadCar.idx"
|
||||
}
|
||||
4
resources/models/Metro/OBJ/MetroLeadCar.mtl
Normal file
4
resources/models/Metro/OBJ/MetroLeadCar.mtl
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Made in Blockbench 5.1.4
|
||||
newmtl m_6a204395-c016-b66d-c397-a01625c2ee08
|
||||
map_Kd MetroCarLeadDefault.png
|
||||
newmtl none
|
||||
18541
resources/models/Metro/OBJ/MetroLeadCar.obj
Normal file
18541
resources/models/Metro/OBJ/MetroLeadCar.obj
Normal file
File diff suppressed because it is too large
Load diff
BIN
resources/models/Metro/OBJ/MetroLeadCar.vtx
Normal file
BIN
resources/models/Metro/OBJ/MetroLeadCar.vtx
Normal file
Binary file not shown.
32
resources/models/Metro/OBJ/MetroLeadCar_mat.json
Normal file
32
resources/models/Metro/OBJ/MetroLeadCar_mat.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
{
|
||||
"ID": "MetroLeadCar-mat-0",
|
||||
"TexturePath": "",
|
||||
"DiffuseColour": {
|
||||
"X": 0.6,
|
||||
"Y": 0.6,
|
||||
"Z": 0.6,
|
||||
"W": 1.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "MetroLeadCar-mat-1",
|
||||
"TexturePath": "resources\\models\\Metro\\OBJ\\MetroCarLeadDefault.png",
|
||||
"DiffuseColour": {
|
||||
"X": 0.6,
|
||||
"Y": 0.6,
|
||||
"Z": 0.6,
|
||||
"W": 1.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "MetroLeadCar-mat-2",
|
||||
"TexturePath": "",
|
||||
"DiffuseColour": {
|
||||
"X": 0.6,
|
||||
"Y": 0.6,
|
||||
"Z": 0.6,
|
||||
"W": 1.0
|
||||
}
|
||||
}
|
||||
]
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB |
|
|
@ -1,4 +0,0 @@
|
|||
# Made in Blockbench 5.1.4
|
||||
newmtl m_1306cabb-1c39-88cc-7a28-6065072778b2
|
||||
map_Kd SloopBluePaintedSpruce.png
|
||||
newmtl none
|
||||
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"ID": "cube",
|
||||
"Meshes": [
|
||||
{
|
||||
"ID": "cubemtl_0",
|
||||
"MaterialID": "cube-mat-1",
|
||||
"OffsetVertex": 0,
|
||||
"VertexSize": 480,
|
||||
"OffsetIndex": 0,
|
||||
"IndexSize": 144
|
||||
}
|
||||
],
|
||||
"VertexPath": "resources/models/cube/cube.vtx",
|
||||
"IndexPath": "resources/models/cube/cube.idx"
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
newmtl cubemtl
|
||||
Kd 0.00 0.00 0.00
|
||||
Ka 0.59 0.45 0.35
|
||||
Ks 0.59 0.45 0.35
|
||||
map_Kd cube.png
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
mtllib cube.mtl
|
||||
o cube
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 -0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v -0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
|
||||
vt 0.000000 1.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.000000 0.500000
|
||||
vt 0.250000 0.500000
|
||||
|
||||
vt 0.250000 1.000000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.250000 0.500000
|
||||
vt 0.500000 0.500000
|
||||
|
||||
vt 0.500000 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.500000 0.500000
|
||||
vt 0.750000 0.500000
|
||||
|
||||
vt 0.750000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
|
||||
vt 0.000000 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.000000 0.500000
|
||||
vt 0.250000 0.500000
|
||||
|
||||
vt 0.250000 0.500000
|
||||
vt 0.500000 0.500000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.500000 0.000000
|
||||
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
|
||||
g cubemtl
|
||||
usemtl cubemtl
|
||||
f 1/3/1 2/1/1 4/4/1
|
||||
f 2/1/1 3/2/1 4/4/1
|
||||
|
||||
f 5/8/2 6/6/2 8/7/2
|
||||
f 6/6/2 7/5/2 8/7/2
|
||||
|
||||
f 9/11/3 10/9/3 12/12/3
|
||||
f 10/9/3 12/12/3 11/10/3
|
||||
|
||||
f 13/15/4 14/13/4 15/16/4
|
||||
f 14/13/4 16/14/4 15/16/4
|
||||
|
||||
f 17/19/5 18/17/5 19/20/5
|
||||
f 18/17/5 20/18/5 19/20/5
|
||||
|
||||
f 21/24/6 22/22/6 24/23/6
|
||||
f 22/22/6 23/21/6 24/23/6
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
|
|
@ -1,22 +0,0 @@
|
|||
[
|
||||
{
|
||||
"ID": "cube-mat-0",
|
||||
"TexturePath": "",
|
||||
"DiffuseColour": {
|
||||
"X": 0.6,
|
||||
"Y": 0.6,
|
||||
"Z": 0.6,
|
||||
"W": 1.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "cube-mat-1",
|
||||
"TexturePath": "resources/models/cube/cube.png",
|
||||
"DiffuseColour": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"w": 1.0
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -12,11 +12,11 @@ struct Material{
|
|||
uint padding[2];
|
||||
};
|
||||
|
||||
layout(set = 1, binding = 0) readonly buffer MaterialUniform{
|
||||
layout(set = 2, binding = 0) readonly buffer MaterialUniform{
|
||||
Material materials[];
|
||||
} matUniform;
|
||||
|
||||
layout(set = 2, binding = 0) uniform sampler2D textSampler[MAX_TEXTURES];
|
||||
layout(set = 3, binding = 0) uniform sampler2D textSampler[MAX_TEXTURES];
|
||||
|
||||
layout(push_constant) uniform pc{
|
||||
layout(offset = 64) uint materialIdx;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
layout(location = 0) in vec3 inPos;
|
||||
layout(location = 1) in vec2 inTextCoords;
|
||||
|
||||
layout(location = 0) out vec2 outTextCoords;
|
||||
|
||||
|
||||
|
|
@ -9,12 +10,16 @@ layout(set = 0, binding = 0) uniform ProjUniform{
|
|||
mat4 matrix;
|
||||
} projUniform;
|
||||
|
||||
layout(set = 1, binding = 0) uniform ViewUniform{
|
||||
mat4 matrix;
|
||||
} viewUniform;
|
||||
|
||||
layout(push_constant) uniform pc{
|
||||
mat4 modelMatrix;
|
||||
} push_constants;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projUniform.matrix * push_constants.modelMatrix * vec4(inPos,1);
|
||||
gl_Position = projUniform.matrix * viewUniform.matrix * push_constants.modelMatrix * vec4(inPos,1);
|
||||
outTextCoords = inTextCoords;
|
||||
}
|
||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue