added models and stuff
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB |
@@ -1,16 +0,0 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl Scene_-_Root
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd diffuse.jpg
|
||||
map_Bump normal.png
|
||||
map_Ks specular.jpg
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 MiB |
@@ -1,3 +0,0 @@
|
||||
Model by Berk Gedik, from: https://sketchfab.com/3d-models/survival-guitar-backpack-low-poly-799f8c4511f84fab8c3f12887f7e6b36
|
||||
|
||||
Modified material assignment (Joey de Vries) for easier load in OpenGL model loading chapter, and renamed albedo to diffuse and metallic to specular to match non-PBR lighting setup.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.4 MiB |
12
resources/c4/C4Fixed.mtl
Normal file
12
resources/c4/C4Fixed.mtl
Normal file
@@ -0,0 +1,12 @@
|
||||
# Blender 3.6.0 MTL File: 'None'
|
||||
# www.blender.org
|
||||
|
||||
newmtl 01_-_Default.001
|
||||
Ns 10.000005
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd Corvette_C4_Base_Color.png
|
||||
3095
resources/c4/C4Fixed.obj
Normal file
3095
resources/c4/C4Fixed.obj
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/c4/Corvette_C4_Base_Color.png
Normal file
BIN
resources/c4/Corvette_C4_Base_Color.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 MiB |
@@ -29,6 +29,7 @@ void main() {
|
||||
vec3 norm = normalize(Normal);
|
||||
vec3 lightDir = normalize(-lightDirection);
|
||||
vec3 viewDir = normalize(viewPosition - Position);
|
||||
vec3 halfwayDir = normalize(lightDir + viewDir);
|
||||
|
||||
vec3 ambient = lightAmbient * (diffuseColor * phongAmbient);
|
||||
|
||||
@@ -37,9 +38,11 @@ void main() {
|
||||
|
||||
vec3 reflectDir = reflect(-lightDir, norm);
|
||||
float effectiveShininess = max(phongShininess, 1.0);
|
||||
float spec = pow(max(dot(viewDir, reflectDir), 0.0), effectiveShininess);
|
||||
float spec = pow(max(dot(norm, halfwayDir), 0.0), effectiveShininess);
|
||||
vec3 specular = lightSpecular * (spec * specularColor * phongSpecular);
|
||||
|
||||
vec3 result = ambient + diffuse + specular;
|
||||
FragColor = vec4(result, 1.0);
|
||||
|
||||
float gamma = 2.2;
|
||||
FragColor.rgb = pow(result.rgb, vec3(1.0/gamma));
|
||||
}
|
||||
Reference in New Issue
Block a user