working on loading materials
This commit is contained in:
BIN
resources/20200527_165845.jpg
Normal file
BIN
resources/20200527_165845.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 MiB |
@@ -4,6 +4,7 @@ const int MAX_LIGHTS = 10;
|
||||
|
||||
layout(location = 0) in vec3 v_Normal;
|
||||
layout(location = 1) in vec4 v_Position;
|
||||
layout(location = 2) in vec2 v_Uv;
|
||||
|
||||
layout(location = 0) out vec4 o_Target;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -2,9 +2,11 @@
|
||||
|
||||
layout(location = 0) in vec4 a_Pos;
|
||||
layout(location = 1) in vec4 a_Normal;
|
||||
layout(location = 2) in vec2 a_Uv;
|
||||
|
||||
layout(location = 0) out vec3 v_Normal;
|
||||
layout(location = 1) out vec4 v_Position;
|
||||
layout(location = 2) out vec2 v_Uv;
|
||||
|
||||
layout(set = 0, binding = 0) uniform Globals {
|
||||
mat4 u_ViewProj;
|
||||
@@ -16,6 +18,7 @@ layout(set = 1, binding = 0) uniform Entity {
|
||||
};
|
||||
|
||||
void main() {
|
||||
v_Uv = a_Uv;
|
||||
v_Normal = mat3(u_World) * vec3(a_Normal.xyz);
|
||||
v_Position = u_World * vec4(a_Pos);
|
||||
gl_Position = u_ViewProj * v_Position;
|
||||
|
||||
Binary file not shown.
13
resources/test-textured.mtl
Normal file
13
resources/test-textured.mtl
Normal file
@@ -0,0 +1,13 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl Material
|
||||
Ns 323.999994
|
||||
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
|
||||
map_Kd 20200527_165845.jpg
|
||||
21524
resources/test-textured.obj
Normal file
21524
resources/test-textured.obj
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user