Added OBJ suport
73
.vscode/settings.json
vendored
@ -4,6 +4,77 @@
|
|||||||
"*.js": "javascript",
|
"*.js": "javascript",
|
||||||
"*.c": "c",
|
"*.c": "c",
|
||||||
"*.scene": "yaml",
|
"*.scene": "yaml",
|
||||||
"iostream": "cpp"
|
"iostream": "cpp",
|
||||||
|
"any": "cpp",
|
||||||
|
"array": "cpp",
|
||||||
|
"atomic": "cpp",
|
||||||
|
"bit": "cpp",
|
||||||
|
"*.tcc": "cpp",
|
||||||
|
"bitset": "cpp",
|
||||||
|
"cctype": "cpp",
|
||||||
|
"charconv": "cpp",
|
||||||
|
"chrono": "cpp",
|
||||||
|
"cinttypes": "cpp",
|
||||||
|
"clocale": "cpp",
|
||||||
|
"cmath": "cpp",
|
||||||
|
"compare": "cpp",
|
||||||
|
"concepts": "cpp",
|
||||||
|
"condition_variable": "cpp",
|
||||||
|
"cstdarg": "cpp",
|
||||||
|
"cstddef": "cpp",
|
||||||
|
"cstdint": "cpp",
|
||||||
|
"cstdio": "cpp",
|
||||||
|
"cstdlib": "cpp",
|
||||||
|
"cstring": "cpp",
|
||||||
|
"ctime": "cpp",
|
||||||
|
"cwchar": "cpp",
|
||||||
|
"cwctype": "cpp",
|
||||||
|
"deque": "cpp",
|
||||||
|
"forward_list": "cpp",
|
||||||
|
"list": "cpp",
|
||||||
|
"map": "cpp",
|
||||||
|
"set": "cpp",
|
||||||
|
"string": "cpp",
|
||||||
|
"unordered_map": "cpp",
|
||||||
|
"unordered_set": "cpp",
|
||||||
|
"vector": "cpp",
|
||||||
|
"exception": "cpp",
|
||||||
|
"algorithm": "cpp",
|
||||||
|
"functional": "cpp",
|
||||||
|
"iterator": "cpp",
|
||||||
|
"memory": "cpp",
|
||||||
|
"memory_resource": "cpp",
|
||||||
|
"numeric": "cpp",
|
||||||
|
"optional": "cpp",
|
||||||
|
"random": "cpp",
|
||||||
|
"ratio": "cpp",
|
||||||
|
"regex": "cpp",
|
||||||
|
"string_view": "cpp",
|
||||||
|
"system_error": "cpp",
|
||||||
|
"tuple": "cpp",
|
||||||
|
"type_traits": "cpp",
|
||||||
|
"utility": "cpp",
|
||||||
|
"format": "cpp",
|
||||||
|
"fstream": "cpp",
|
||||||
|
"initializer_list": "cpp",
|
||||||
|
"iomanip": "cpp",
|
||||||
|
"iosfwd": "cpp",
|
||||||
|
"istream": "cpp",
|
||||||
|
"limits": "cpp",
|
||||||
|
"mutex": "cpp",
|
||||||
|
"new": "cpp",
|
||||||
|
"numbers": "cpp",
|
||||||
|
"ostream": "cpp",
|
||||||
|
"semaphore": "cpp",
|
||||||
|
"shared_mutex": "cpp",
|
||||||
|
"span": "cpp",
|
||||||
|
"sstream": "cpp",
|
||||||
|
"stdexcept": "cpp",
|
||||||
|
"stop_token": "cpp",
|
||||||
|
"streambuf": "cpp",
|
||||||
|
"text_encoding": "cpp",
|
||||||
|
"thread": "cpp",
|
||||||
|
"typeinfo": "cpp",
|
||||||
|
"variant": "cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,183 +1,46 @@
|
|||||||
#include "ModelComponent.h"
|
#include "ModelComponent.h"
|
||||||
#include "stb_image.h"
|
#include "stb_image.h"
|
||||||
|
#define TINYOBJLOADER_IMPLEMENTATION
|
||||||
|
#include "tiny_obj_loader.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <map>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
// Constructor: initialize material defaults, create default cube mesh, and load default textures.
|
// Constructor: initialize default values.
|
||||||
ModelComponent::ModelComponent()
|
ModelComponent::ModelComponent()
|
||||||
: diffuseColor(1.0f, 1.0f, 1.0f),
|
: modelPath("./assets/models/sponza.obj"),
|
||||||
|
diffuseColor(1.0f, 1.0f, 1.0f),
|
||||||
specularColor(1.0f, 1.0f, 1.0f),
|
specularColor(1.0f, 1.0f, 1.0f),
|
||||||
shininess(32.0f),
|
shininess(32.0f)
|
||||||
VAO(0), VBO(0), EBO(0),
|
|
||||||
diffuseTexture(0), normalTexture(0)
|
|
||||||
{
|
{
|
||||||
// Clear any previous data.
|
// Load the model on construction.
|
||||||
vertices.clear();
|
LoadModel(modelPath);
|
||||||
indices.clear();
|
|
||||||
|
|
||||||
// Create 24 vertices for a cube.
|
|
||||||
// Front face (z = 0.5)
|
|
||||||
Vertex v;
|
|
||||||
v.Normal = glm::vec3(0, 0, 1);
|
|
||||||
v.Tangent = glm::vec3(1, 0, 0);
|
|
||||||
// Top-left
|
|
||||||
v.Position = glm::vec3(-0.5f, 0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-left
|
|
||||||
v.Position = glm::vec3(-0.5f, -0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-right
|
|
||||||
v.Position = glm::vec3( 0.5f, -0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Top-right
|
|
||||||
v.Position = glm::vec3( 0.5f, 0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
|
|
||||||
// Right face (x = 0.5)
|
|
||||||
v.Normal = glm::vec3(1, 0, 0);
|
|
||||||
v.Tangent = glm::vec3(0, 0, -1);
|
|
||||||
// Top-left
|
|
||||||
v.Position = glm::vec3(0.5f, 0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-left
|
|
||||||
v.Position = glm::vec3(0.5f, -0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-right
|
|
||||||
v.Position = glm::vec3(0.5f, -0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Top-right
|
|
||||||
v.Position = glm::vec3(0.5f, 0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
|
|
||||||
// Back face (z = -0.5)
|
|
||||||
v.Normal = glm::vec3(0, 0, -1);
|
|
||||||
v.Tangent = glm::vec3(-1, 0, 0);
|
|
||||||
// Top-left
|
|
||||||
v.Position = glm::vec3( 0.5f, 0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-left
|
|
||||||
v.Position = glm::vec3( 0.5f, -0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-right
|
|
||||||
v.Position = glm::vec3(-0.5f, -0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Top-right
|
|
||||||
v.Position = glm::vec3(-0.5f, 0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
|
|
||||||
// Left face (x = -0.5)
|
|
||||||
v.Normal = glm::vec3(-1, 0, 0);
|
|
||||||
v.Tangent = glm::vec3(0, 0, 1);
|
|
||||||
// Top-left
|
|
||||||
v.Position = glm::vec3(-0.5f, 0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-left
|
|
||||||
v.Position = glm::vec3(-0.5f, -0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-right
|
|
||||||
v.Position = glm::vec3(-0.5f, -0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Top-right
|
|
||||||
v.Position = glm::vec3(-0.5f, 0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
|
|
||||||
// Top face (y = 0.5)
|
|
||||||
v.Normal = glm::vec3(0, 1, 0);
|
|
||||||
v.Tangent = glm::vec3(1, 0, 0);
|
|
||||||
// Top-left
|
|
||||||
v.Position = glm::vec3(-0.5f, 0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-left
|
|
||||||
v.Position = glm::vec3(-0.5f, 0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-right
|
|
||||||
v.Position = glm::vec3( 0.5f, 0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Top-right
|
|
||||||
v.Position = glm::vec3( 0.5f, 0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
|
|
||||||
// Bottom face (y = -0.5)
|
|
||||||
v.Normal = glm::vec3(0, -1, 0);
|
|
||||||
v.Tangent = glm::vec3(1, 0, 0);
|
|
||||||
// Top-left
|
|
||||||
v.Position = glm::vec3(-0.5f, -0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-left
|
|
||||||
v.Position = glm::vec3(-0.5f, -0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(0.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Bottom-right
|
|
||||||
v.Position = glm::vec3( 0.5f, -0.5f, -0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 0.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
// Top-right
|
|
||||||
v.Position = glm::vec3( 0.5f, -0.5f, 0.5f);
|
|
||||||
v.TexCoords = glm::vec2(1.0f, 1.0f);
|
|
||||||
vertices.push_back(v);
|
|
||||||
|
|
||||||
// Define indices: 6 faces, 2 triangles per face, 3 indices per triangle.
|
|
||||||
indices = {
|
|
||||||
0, 1, 2, 0, 2, 3, // Front face
|
|
||||||
4, 5, 6, 4, 6, 7, // Right face
|
|
||||||
8, 9, 10, 8, 10, 11, // Back face
|
|
||||||
12, 13, 14, 12, 14, 15, // Left face
|
|
||||||
16, 17, 18, 16, 18, 19, // Top face
|
|
||||||
20, 21, 22, 20, 22, 23 // Bottom face
|
|
||||||
};
|
|
||||||
|
|
||||||
// Setup mesh with the new vertex/index data.
|
|
||||||
SetupMesh();
|
|
||||||
|
|
||||||
// Load default textures.
|
|
||||||
if(!LoadDiffuseTexture("./assets/bricks.png")) {
|
|
||||||
std::cout << "Warning: Failed to load default diffuse texture 'bricks.png'\n";
|
|
||||||
}
|
|
||||||
if(!LoadNormalTexture("./assets/normal.png")) {
|
|
||||||
std::cout << "Warning: Failed to load default normal texture 'normal.png'\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelComponent::~ModelComponent() {
|
ModelComponent::~ModelComponent() {
|
||||||
if(VAO) glDeleteVertexArrays(1, &VAO);
|
// Clean up each submesh.
|
||||||
if(VBO) glDeleteBuffers(1, &VBO);
|
for (auto &mesh : meshes) {
|
||||||
if(EBO) glDeleteBuffers(1, &EBO);
|
if(mesh.VAO) glDeleteVertexArrays(1, &mesh.VAO);
|
||||||
if(diffuseTexture) glDeleteTextures(1, &diffuseTexture);
|
if(mesh.VBO) glDeleteBuffers(1, &mesh.VBO);
|
||||||
if(normalTexture) glDeleteTextures(1, &normalTexture);
|
if(mesh.EBO) glDeleteBuffers(1, &mesh.EBO);
|
||||||
|
if(mesh.diffuseTexture) glDeleteTextures(1, &mesh.diffuseTexture);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelComponent::SetupMesh() {
|
void ModelComponent::SetupMesh(SubMesh &mesh) {
|
||||||
glGenVertexArrays(1, &VAO);
|
glGenVertexArrays(1, &mesh.VAO);
|
||||||
glGenBuffers(1, &VBO);
|
glGenBuffers(1, &mesh.VBO);
|
||||||
glGenBuffers(1, &EBO);
|
glGenBuffers(1, &mesh.EBO);
|
||||||
|
|
||||||
glBindVertexArray(VAO);
|
glBindVertexArray(mesh.VAO);
|
||||||
|
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, VBO);
|
glBindBuffer(GL_ARRAY_BUFFER, mesh.VBO);
|
||||||
glBufferData(GL_ARRAY_BUFFER, vertices.size() * sizeof(Vertex), &vertices[0], GL_STATIC_DRAW);
|
glBufferData(GL_ARRAY_BUFFER, mesh.vertices.size() * sizeof(Vertex), &mesh.vertices[0], GL_STATIC_DRAW);
|
||||||
|
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, EBO);
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh.EBO);
|
||||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, indices.size() * sizeof(GLuint), &indices[0], GL_STATIC_DRAW);
|
glBufferData(GL_ELEMENT_ARRAY_BUFFER, mesh.indices.size() * sizeof(GLuint), &mesh.indices[0], GL_STATIC_DRAW);
|
||||||
|
|
||||||
// Vertex attributes:
|
// Vertex attributes:
|
||||||
// Positions.
|
// Positions.
|
||||||
@ -196,16 +59,15 @@ void ModelComponent::SetupMesh() {
|
|||||||
glBindVertexArray(0);
|
glBindVertexArray(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadDiffuseTexture loads a diffuse texture from file.
|
bool ModelComponent::LoadDiffuseTexture(const std::string &filepath, GLuint &textureID) {
|
||||||
bool ModelComponent::LoadDiffuseTexture(const std::string &filepath) {
|
|
||||||
int w, h, channels;
|
int w, h, channels;
|
||||||
unsigned char* data = stbi_load(filepath.c_str(), &w, &h, &channels, 0);
|
unsigned char* data = stbi_load(filepath.c_str(), &w, &h, &channels, 0);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
std::cout << "Failed to load diffuse texture: " << filepath << std::endl;
|
std::cout << "Failed to load diffuse texture: " << filepath << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
glGenTextures(1, &diffuseTexture);
|
glGenTextures(1, &textureID);
|
||||||
glBindTexture(GL_TEXTURE_2D, diffuseTexture);
|
glBindTexture(GL_TEXTURE_2D, textureID);
|
||||||
GLenum format = (channels == 3) ? GL_RGB : GL_RGBA;
|
GLenum format = (channels == 3) ? GL_RGB : GL_RGBA;
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, format, w, h, 0, format, GL_UNSIGNED_BYTE, data);
|
glTexImage2D(GL_TEXTURE_2D, 0, format, w, h, 0, format, GL_UNSIGNED_BYTE, data);
|
||||||
glGenerateMipmap(GL_TEXTURE_2D);
|
glGenerateMipmap(GL_TEXTURE_2D);
|
||||||
@ -217,30 +79,133 @@ bool ModelComponent::LoadDiffuseTexture(const std::string &filepath) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadNormalTexture loads a normal map texture from file.
|
|
||||||
bool ModelComponent::LoadNormalTexture(const std::string &filepath) {
|
bool ModelComponent::LoadNormalTexture(const std::string &filepath) {
|
||||||
int w, h, channels;
|
// Similar to LoadDiffuseTexture but for normalTexture; not used in this submesh example.
|
||||||
unsigned char* data = stbi_load(filepath.c_str(), &w, &h, &channels, 0);
|
return true;
|
||||||
if (!data) {
|
}
|
||||||
std::cout << "Failed to load normal texture: " << filepath << std::endl;
|
|
||||||
|
// Loads a model using tiny_obj_loader and groups faces by material.
|
||||||
|
bool ModelComponent::LoadModel(const std::string &filepath) {
|
||||||
|
modelPath = filepath;
|
||||||
|
tinyobj::attrib_t attrib;
|
||||||
|
std::vector<tinyobj::shape_t> shapes;
|
||||||
|
std::vector<tinyobj::material_t> materials;
|
||||||
|
std::string warn, err;
|
||||||
|
|
||||||
|
// Get the directory of the OBJ file.
|
||||||
|
std::string baseDir = "";
|
||||||
|
size_t lastSlash = filepath.find_last_of("/\\");
|
||||||
|
if (lastSlash != std::string::npos) {
|
||||||
|
baseDir = filepath.substr(0, lastSlash + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err, filepath.c_str(), baseDir.c_str());
|
||||||
|
if (!warn.empty()) {
|
||||||
|
std::cout << "[Warning] " << warn << std::endl;
|
||||||
|
}
|
||||||
|
if (!err.empty()) {
|
||||||
|
std::cerr << "[Error] " << err << std::endl;
|
||||||
|
}
|
||||||
|
if (!ret) {
|
||||||
|
std::cerr << "[Error] Failed to load/parse OBJ file: " << filepath << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
glGenTextures(1, &normalTexture);
|
|
||||||
glBindTexture(GL_TEXTURE_2D, normalTexture);
|
// Clear any existing submeshes.
|
||||||
GLenum format = (channels == 3) ? GL_RGB : GL_RGBA;
|
meshes.clear();
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, format, w, h, 0, format, GL_UNSIGNED_BYTE, data);
|
|
||||||
glGenerateMipmap(GL_TEXTURE_2D);
|
// For each shape in the OBJ file.
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
for (size_t s = 0; s < shapes.size(); s++) {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
// Use a map to group faces by material ID.
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
std::map<int, SubMesh> submeshMap;
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
size_t index_offset = 0;
|
||||||
stbi_image_free(data);
|
// Iterate over each face.
|
||||||
|
for (size_t f = 0; f < shapes[s].mesh.num_face_vertices.size(); f++) {
|
||||||
|
std::cout << "[Info] AssetManager: Loading Mesh: "<< i << std::endl;
|
||||||
|
int fv = shapes[s].mesh.num_face_vertices[f];
|
||||||
|
// Get material ID for this face.
|
||||||
|
int matID = -1;
|
||||||
|
if (shapes[s].mesh.material_ids.size() > f)
|
||||||
|
matID = shapes[s].mesh.material_ids[f];
|
||||||
|
// If submesh for this material does not exist, create it.
|
||||||
|
if (submeshMap.find(matID) == submeshMap.end())
|
||||||
|
submeshMap[matID] = SubMesh();
|
||||||
|
|
||||||
|
SubMesh ¤tMesh = submeshMap[matID];
|
||||||
|
// Process each vertex in the face.
|
||||||
|
for (size_t v = 0; v < fv; v++) {
|
||||||
|
tinyobj::index_t idx = shapes[s].mesh.indices[index_offset + v];
|
||||||
|
Vertex vertex;
|
||||||
|
// Position.
|
||||||
|
vertex.Position = glm::vec3(
|
||||||
|
attrib.vertices[3 * idx.vertex_index + 0],
|
||||||
|
attrib.vertices[3 * idx.vertex_index + 1],
|
||||||
|
attrib.vertices[3 * idx.vertex_index + 2]
|
||||||
|
);
|
||||||
|
// Normal.
|
||||||
|
if (idx.normal_index >= 0 && 3 * idx.normal_index + 2 < attrib.normals.size()) {
|
||||||
|
vertex.Normal = glm::vec3(
|
||||||
|
attrib.normals[3 * idx.normal_index + 0],
|
||||||
|
attrib.normals[3 * idx.normal_index + 1],
|
||||||
|
attrib.normals[3 * idx.normal_index + 2]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
vertex.Normal = glm::vec3(0.0f);
|
||||||
|
}
|
||||||
|
// Texture Coordinates.
|
||||||
|
if (idx.texcoord_index >= 0 && 2 * idx.texcoord_index + 1 < attrib.texcoords.size()) {
|
||||||
|
vertex.TexCoords = glm::vec2(
|
||||||
|
attrib.texcoords[2 * idx.texcoord_index + 0],
|
||||||
|
attrib.texcoords[2 * idx.texcoord_index + 1]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
vertex.TexCoords = glm::vec2(0.0f);
|
||||||
|
}
|
||||||
|
// Tangent not provided.
|
||||||
|
vertex.Tangent = glm::vec3(0.0f);
|
||||||
|
|
||||||
|
// Add vertex and index.
|
||||||
|
currentMesh.vertices.push_back(vertex);
|
||||||
|
currentMesh.indices.push_back(static_cast<GLuint>(currentMesh.vertices.size() - 1));
|
||||||
|
}
|
||||||
|
index_offset += fv;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For each group (submesh) in this shape, set material properties and create buffers.
|
||||||
|
for (auto &pair : submeshMap) {
|
||||||
|
int matID = pair.first;
|
||||||
|
SubMesh &subMesh = pair.second;
|
||||||
|
// If there is a valid material, assign its properties.
|
||||||
|
if (matID >= 0 && matID < static_cast<int>(materials.size())) {
|
||||||
|
tinyobj::material_t mat = materials[matID];
|
||||||
|
subMesh.diffuseColor = glm::vec3(mat.diffuse[0], mat.diffuse[1], mat.diffuse[2]);
|
||||||
|
subMesh.specularColor = glm::vec3(mat.specular[0], mat.specular[1], mat.specular[2]);
|
||||||
|
subMesh.shininess = mat.shininess;
|
||||||
|
if (!mat.diffuse_texname.empty()) {
|
||||||
|
std::string texturePath = baseDir + mat.diffuse_texname;
|
||||||
|
LoadDiffuseTexture(texturePath, subMesh.diffuseTexture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Setup the OpenGL buffers for this submesh.
|
||||||
|
SetupMesh(subMesh);
|
||||||
|
// Add submesh to our model.
|
||||||
|
meshes.push_back(subMesh);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the mesh using its VAO.
|
// Draws the entire model by drawing each submesh.
|
||||||
void ModelComponent::Draw() {
|
void ModelComponent::Draw() {
|
||||||
glBindVertexArray(VAO);
|
for (auto &mesh : meshes) {
|
||||||
glDrawElements(GL_TRIANGLES, static_cast<GLsizei>(indices.size()), GL_UNSIGNED_INT, 0);
|
// Bind the appropriate texture if available.
|
||||||
|
if(mesh.diffuseTexture) {
|
||||||
|
glActiveTexture(GL_TEXTURE0);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, mesh.diffuseTexture);
|
||||||
|
}
|
||||||
|
glBindVertexArray(mesh.VAO);
|
||||||
|
glDrawElements(GL_TRIANGLES, static_cast<GLsizei>(mesh.indices.size()), GL_UNSIGNED_INT, 0);
|
||||||
glBindVertexArray(0);
|
glBindVertexArray(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,36 +14,50 @@ struct Vertex {
|
|||||||
glm::vec3 Tangent;
|
glm::vec3 Tangent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Structure representing a sub-mesh (a group of faces sharing the same material)
|
||||||
|
struct SubMesh {
|
||||||
|
std::vector<Vertex> vertices;
|
||||||
|
std::vector<GLuint> indices;
|
||||||
|
glm::vec3 diffuseColor;
|
||||||
|
glm::vec3 specularColor;
|
||||||
|
float shininess;
|
||||||
|
GLuint diffuseTexture;
|
||||||
|
GLuint VAO, VBO, EBO;
|
||||||
|
|
||||||
|
SubMesh()
|
||||||
|
: diffuseColor(1.0f,1.0f,1.0f),
|
||||||
|
specularColor(1.0f,1.0f,1.0f),
|
||||||
|
shininess(32.0f),
|
||||||
|
diffuseTexture(0),
|
||||||
|
VAO(0), VBO(0), EBO(0)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
class ModelComponent {
|
class ModelComponent {
|
||||||
public:
|
public:
|
||||||
ModelComponent();
|
ModelComponent();
|
||||||
~ModelComponent();
|
~ModelComponent();
|
||||||
|
|
||||||
// Material properties.
|
// Base model path.
|
||||||
|
std::string modelPath;
|
||||||
|
// Submeshes
|
||||||
|
std::vector<SubMesh> meshes;
|
||||||
|
|
||||||
|
// Functions.
|
||||||
|
bool LoadModel(const std::string &filepath);
|
||||||
|
void Draw();
|
||||||
|
|
||||||
|
// Texture loading.
|
||||||
|
bool LoadDiffuseTexture(const std::string &filepath, GLuint &textureID);
|
||||||
|
bool LoadNormalTexture(const std::string &filepath);
|
||||||
|
|
||||||
|
// Setup mesh for a submesh.
|
||||||
|
void SetupMesh(SubMesh &mesh);
|
||||||
|
|
||||||
|
// (Optional) Global material properties if needed.
|
||||||
glm::vec3 diffuseColor;
|
glm::vec3 diffuseColor;
|
||||||
glm::vec3 specularColor;
|
glm::vec3 specularColor;
|
||||||
float shininess;
|
float shininess;
|
||||||
|
|
||||||
// Mesh data.
|
|
||||||
std::vector<Vertex> vertices;
|
|
||||||
std::vector<GLuint> indices;
|
|
||||||
|
|
||||||
// OpenGL buffers.
|
|
||||||
GLuint VAO, VBO, EBO;
|
|
||||||
|
|
||||||
// Texture handles.
|
|
||||||
GLuint diffuseTexture;
|
|
||||||
GLuint normalTexture;
|
|
||||||
|
|
||||||
// Set up the mesh by creating VAO, VBO, and EBO.
|
|
||||||
void SetupMesh();
|
|
||||||
|
|
||||||
// Load textures from file.
|
|
||||||
bool LoadDiffuseTexture(const std::string &filepath);
|
|
||||||
bool LoadNormalTexture(const std::string &filepath);
|
|
||||||
|
|
||||||
// Draw the mesh.
|
|
||||||
void Draw();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MODEL_COMPONENT_H
|
#endif // MODEL_COMPONENT_H
|
||||||
|
4
Makefile
@ -1,12 +1,12 @@
|
|||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CXX := g++
|
CXX := g++
|
||||||
CXXFLAGS := -std=c++20 -Wall -Wextra -O2 -I/c/msys64/mingw64/include -Ivendor/imgui-docking -Ivendor/stb
|
CXXFLAGS := -std=c++20 -Wall -Wextra -O2 -I/c/msys64/mingw64/include -Ivendor/imgui-docking -Ivendor/stb -Ivendor/tini_obj
|
||||||
|
|
||||||
# Use this to link against the correct import lib
|
# Use this to link against the correct import lib
|
||||||
LDFLAGS := -Llib -lglfw3 -lopengl32 -lglew32 -lglu32
|
LDFLAGS := -Llib -lglfw3 -lopengl32 -lglew32 -lglu32
|
||||||
|
|
||||||
# Source and build directories (including vendor folder)
|
# Source and build directories (including vendor folder)
|
||||||
SRC_DIRS := . Editor Engine vendor/imgui-docking Engine/Components Engine/Entity
|
SRC_DIRS := . Editor Engine vendor/imgui-docking Engine/Components Engine/Entity Engine/utils
|
||||||
BUILD_DIR := build
|
BUILD_DIR := build
|
||||||
|
|
||||||
# Find all source files
|
# Find all source files
|
||||||
|
BIN
Three-Labs.exe
306
assets/models/sponza.mtl
Normal file
@ -0,0 +1,306 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 25
|
||||||
|
|
||||||
|
newmtl Material__25
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/lion.tga
|
||||||
|
map_Disp textures/lion_ddn.tga
|
||||||
|
map_Ka textures/lion.tga
|
||||||
|
|
||||||
|
newmtl Material__298
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/background.tga
|
||||||
|
map_Disp textures/background_ddn.tga
|
||||||
|
map_Ka textures/background.tga
|
||||||
|
|
||||||
|
newmtl Material__47
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
|
||||||
|
newmtl Material__57
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/vase_plant.tga
|
||||||
|
map_d textures/vase_plant_mask.tga
|
||||||
|
map_Ka textures/vase_plant.tga
|
||||||
|
|
||||||
|
newmtl arch
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_arch_diff.tga
|
||||||
|
map_Ka textures/sponza_arch_diff.tga
|
||||||
|
map_Disp textures/sponza_arch_ddn.tga
|
||||||
|
|
||||||
|
newmtl bricks
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/spnza_bricks_a_diff.tga
|
||||||
|
map_Disp textures/spnza_bricks_a_ddn.tga
|
||||||
|
map_Ka textures/spnza_bricks_a_diff.tga
|
||||||
|
|
||||||
|
newmtl ceiling
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_ceiling_a_diff.tga
|
||||||
|
map_Ka textures/sponza_ceiling_a_diff.tga
|
||||||
|
map_Disp textures/sponza_ceiling_a_ddn.tga
|
||||||
|
|
||||||
|
newmtl chain
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/chain_texture.tga
|
||||||
|
map_d textures/chain_texture_mask.tga
|
||||||
|
map_Disp textures/chain_texture_ddn.tga
|
||||||
|
map_Ka textures/chain_texture.tga
|
||||||
|
|
||||||
|
newmtl column_a
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_column_a_diff.tga
|
||||||
|
map_Disp textures/sponza_column_a_ddn.tga
|
||||||
|
map_Ka textures/sponza_column_a_diff.tga
|
||||||
|
|
||||||
|
newmtl column_b
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_column_b_diff.tga
|
||||||
|
map_Disp textures/sponza_column_b_ddn.tga
|
||||||
|
map_Ka textures/sponza_column_b_diff.tga
|
||||||
|
|
||||||
|
newmtl column_c
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_column_c_diff.tga
|
||||||
|
map_Disp textures/sponza_column_c_ddn.tga
|
||||||
|
map_Ka textures/sponza_column_c_diff.tga
|
||||||
|
|
||||||
|
newmtl details
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_details_diff.tga
|
||||||
|
map_Ka textures/sponza_details_diff.tga
|
||||||
|
map_Disp textures/sponza_details_ddn.tga
|
||||||
|
|
||||||
|
newmtl fabric_a
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_fabric_diff.tga
|
||||||
|
map_Ka textures/sponza_fabric_diff.tga
|
||||||
|
map_Disp textures/sponza_fabric_ddn.tga
|
||||||
|
|
||||||
|
newmtl fabric_c
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_curtain_diff.tga
|
||||||
|
map_Ka textures/sponza_curtain_diff.tga
|
||||||
|
map_Disp textures/sponza_curtain_ddn.tga
|
||||||
|
|
||||||
|
|
||||||
|
newmtl fabric_d
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_fabric_blue_diff.tga
|
||||||
|
map_Ka textures/sponza_fabric_blue_diff.tga
|
||||||
|
map_Disp textures/sponza_fabric_ddn.tga
|
||||||
|
|
||||||
|
|
||||||
|
newmtl fabric_e
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_fabric_green_diff.tga
|
||||||
|
map_Ka textures/sponza_fabric_green_diff.tga
|
||||||
|
map_Disp textures/sponza_fabric_ddn.tga
|
||||||
|
|
||||||
|
|
||||||
|
newmtl fabric_f
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_curtain_green_diff.tga
|
||||||
|
map_Ka textures/sponza_curtain_green_diff.tga
|
||||||
|
map_Disp textures/sponza_curtain_ddn.tga
|
||||||
|
|
||||||
|
newmtl fabric_g
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_curtain_blue_diff.tga
|
||||||
|
map_Ka textures/sponza_curtain_blue_diff.tga
|
||||||
|
map_Disp textures/sponza_curtain_ddn.tga
|
||||||
|
|
||||||
|
|
||||||
|
newmtl flagpole
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_flagpole_diff.tga
|
||||||
|
map_Ka textures/sponza_flagpole_diff.tga
|
||||||
|
map_Disp textures/sponza_flagpole_ddn.tga
|
||||||
|
|
||||||
|
newmtl floor
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_floor_a_diff.tga
|
||||||
|
map_Ka textures/sponza_floor_a_diff.tga
|
||||||
|
map_Disp textures/sponza_floor_a_ddn.tga
|
||||||
|
|
||||||
|
newmtl leaf
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_thorn_diff.tga
|
||||||
|
map_d textures/sponza_thorn_mask.tga
|
||||||
|
map_Disp textures/sponza_thorn_ddn.tga
|
||||||
|
map_Ka textures/sponza_thorn_diff.tga
|
||||||
|
|
||||||
|
newmtl roof
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/sponza_roof_diff.tga
|
||||||
|
map_Ka textures/sponza_roof_diff.tga
|
||||||
|
map_Disp textures/sponza_roof_ddn.tga
|
||||||
|
|
||||||
|
newmtl vase
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/vase_dif.tga
|
||||||
|
map_Ka textures/vase_dif.tga
|
||||||
|
map_Disp textures/vase_ddn.tga
|
||||||
|
|
||||||
|
newmtl vase_hanging
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/vase_hanging.tga
|
||||||
|
map_Ka textures/vase_hanging.tga
|
||||||
|
map_Disp textures/vase_hanging_ddn.tga
|
||||||
|
|
||||||
|
newmtl vase_round
|
||||||
|
Ns 7.843137
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.470400 0.470400 0.470400
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd textures/vase_round.tga
|
||||||
|
map_Disp textures/vase_round_ddn.tga
|
||||||
|
map_Ka textures/vase_round.tga
|
BIN
assets/models/textures/Thumbs.db
Normal file
BIN
assets/models/textures/background.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/background_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/chain_texture.tga
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/models/textures/chain_texture_ddn.tga
Normal file
After Width: | Height: | Size: 768 KiB |
BIN
assets/models/textures/lion.tga
Normal file
After Width: | Height: | Size: 4.0 MiB |
BIN
assets/models/textures/lion2_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/lion_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/spnza_bricks_a_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/spnza_bricks_a_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_arch_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_arch_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_ceiling_a_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_ceiling_a_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_column_a_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_column_a_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_column_b_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_column_b_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_column_c_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_column_c_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_curtain_blue_diff.tga
Normal file
After Width: | Height: | Size: 12 MiB |
BIN
assets/models/textures/sponza_curtain_ddn.tga
Normal file
After Width: | Height: | Size: 12 MiB |
BIN
assets/models/textures/sponza_curtain_diff.tga
Normal file
After Width: | Height: | Size: 12 MiB |
BIN
assets/models/textures/sponza_curtain_green_diff.tga
Normal file
After Width: | Height: | Size: 12 MiB |
BIN
assets/models/textures/sponza_details_ddn.tga
Normal file
After Width: | Height: | Size: 4.0 MiB |
BIN
assets/models/textures/sponza_details_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_fabric_blue_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_fabric_ddn.tga
Normal file
After Width: | Height: | Size: 4.0 MiB |
BIN
assets/models/textures/sponza_fabric_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_fabric_green_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_flagpole_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_flagpole_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_floor_a_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_floor_a_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_roof_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_roof_diff.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/sponza_thorn_ddn.tga
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
assets/models/textures/sponza_thorn_diff.tga
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
assets/models/textures/vase_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/vase_dif.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/vase_hanging.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/vase_hanging_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/vase_plant.tga
Normal file
After Width: | Height: | Size: 4.0 MiB |
BIN
assets/models/textures/vase_round.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/models/textures/vase_round_ddn.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |