patch TinyRenderer so it software-renders in an OpenGL texture, for testing
fix texture support: flip texture to make OpenGL happy (lower-left is origin) add path prefix to .obj loader, so materials/textures are loaded ok.
This commit is contained in:
13
data/floor.mtl
Normal file
13
data/floor.mtl
Normal file
@@ -0,0 +1,13 @@
|
||||
newmtl floor
|
||||
Ns 10.0000
|
||||
Ni 1.5000
|
||||
d 1.0000
|
||||
Tr 0.0000
|
||||
Tf 1.0000 1.0000 1.0000
|
||||
illum 2
|
||||
Ka 0.0000 0.0000 0.0000
|
||||
Kd 0.5880 0.5880 0.5880
|
||||
Ks 0.0000 0.0000 0.0000
|
||||
Ke 0.0000 0.0000 0.0000
|
||||
map_Ka floor_diffuse.jpg
|
||||
map_Kd cube.tga
|
||||
18
data/floor.obj
Normal file
18
data/floor.obj
Normal file
@@ -0,0 +1,18 @@
|
||||
o
|
||||
mtllib floor.mtl
|
||||
v -1 -1 -1
|
||||
v 1 -1 -1
|
||||
v 1 -1 1
|
||||
v -1 -1 1
|
||||
|
||||
vt 0 0
|
||||
vt .25 0
|
||||
vt .25 .25
|
||||
vt 0 .25
|
||||
|
||||
vn 0 1 0
|
||||
usemtl floor
|
||||
|
||||
f 3/3/1 2/2/1 1/1/1
|
||||
f 4/4/1 3/3/1 1/1/1
|
||||
|
||||
BIN
data/floor_diffuse.jpg
Normal file
BIN
data/floor_diffuse.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
data/floor_diffuse.tga
Normal file
BIN
data/floor_diffuse.tga
Normal file
Binary file not shown.
BIN
data/floor_nm_tangent.tga
Normal file
BIN
data/floor_nm_tangent.tga
Normal file
Binary file not shown.
Reference in New Issue
Block a user