Added Sound; Only supports WAV for now
This commit is contained in:
1 parent
1a8320feab
commit
e7cd6d8132
39 files changed
+299
-40
No files matched your search
@@ -2,7 +2,7 @@
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
||||
Ns 100
|
||||
Ns 10
|
||||
Ka 0.8 0.8 0.8
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
||||
Ns 100
|
||||
Ns 10
|
||||
Ka 0.8 0.8 0.8
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
||||
Ns 100
|
||||
Ns 10
|
||||
Ka 0.8 0.8 0.8
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
||||
Ns 100
|
||||
Ns 10
|
||||
Ka 0.8 0.8 0.8
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
||||
Ns 100
|
||||
Ns 10
|
||||
Ka 0.8 0.8 0.8
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
||||
Ns 100
|
||||
Ns 10
|
||||
Ka 0.8 0.8 0.8
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
|
||||
@@ -106,7 +106,7 @@ void main() {
|
||||
vec3 lightDir = normalize(light[i].pos - fragPos);
|
||||
vec3 norm = normalize(normals);
|
||||
float diff = max(dot(norm, lightDir), 0.0);
|
||||
vec3 diffuse = light[i].color * (diff * matDiff) * (light[i].strength / 2.0f);
|
||||
vec3 diffuse = light[i].color * diff * matDiff * (light[i].strength / 2.0f);
|
||||
|
||||
vec3 viewDir = normalize(camera.pos - fragPos);
|
||||
vec3 reflectDir = reflect(-lightDir, norm);
|
||||
@@ -121,18 +121,18 @@ void main() {
|
||||
vec3 lightDir = normalize(light[i].pos - fragPos);
|
||||
vec3 norm = normalize(normals);
|
||||
float diff = max(dot(norm, lightDir), 0.0);
|
||||
vec3 diffuse = light[i].color * (diff * matDiff);
|
||||
vec3 diffuse = light[i].color * diff * matDiff * light[i].strength;
|
||||
|
||||
vec3 viewDir = normalize(camera.pos - fragPos);
|
||||
vec3 reflectDir = reflect(-lightDir, norm);
|
||||
float spec = pow(max(dot(viewDir, reflectDir), 0.0), material.specPower);
|
||||
vec3 specular = light[i].color * spec * matSpec;
|
||||
vec3 specular = light[i].color * spec * matSpec * (light[i].strength / 2.5f);
|
||||
|
||||
float length = length(light[i].pos - fragPos);
|
||||
float att = 1.0 / (1.0 + 0.09 * length + 0.032 * (length * length));
|
||||
float att = clamp(10.0 / length, 0.0, 1.0) * light[i].strength;
|
||||
|
||||
float shadow = calcShadowPoint(i, norm, lightDir);
|
||||
color += (((diffuse + specular) * (1.0 - shadow)) * att) * light[i].strength;
|
||||
color += ((diffuse + specular) * (1.0 - shadow) * att);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -91,7 +91,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
std::set<std::string> extensions;
|
||||
extensions.insert({ "obj", "png", "jpg", "shader", "ttf" });
|
||||
extensions.insert({ "shader", "obj", "png", "jpg", "ttf", "wav" });
|
||||
|
||||
unsigned int dirCount = 0;
|
||||
const std::filesystem::path workingDir = std::filesystem::current_path();
|
||||
@@ -99,6 +99,8 @@ int main(int argc, char* argv[]) {
|
||||
if (!currDir.is_directory())
|
||||
continue;
|
||||
std::string filename = currDir.path().filename().string().append(".nfpack");
|
||||
/*if (filename == "base.nfpack")
|
||||
Error("Cannot create a pack called base.nfpack!");*/
|
||||
Log("Creating pack \"" + filename + (std::string)"\"");
|
||||
std::vector<std::string> packFilenames;
|
||||
std::string currFileExtension;
|
||||
|
||||
Reference in new issue
Block a user