Skip to content

Commit 0c556e7

Browse files
committed
Added a skybox. Small changes to the entity and subsequent classes.
1 parent 7735bd8 commit 0c556e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+574
-190
lines changed

data/models/test.mtl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Blender MTL File: 'test.blend'
2+
# Material Count: 1
3+
4+
newmtl None
5+
Ns 500
6+
Ka 0.8 0.8 0.8
7+
Kd 0.8 0.8 0.8
8+
Ks 0.8 0.8 0.8
9+
d 1
10+
illum 2

data/shaders/skyboxFrag.glsl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#version 330 core
2+
3+
out vec4 FragColor;
4+
5+
in vec3 TexCoords;
6+
7+
uniform samplerCube cubemap;
8+
9+
void main()
10+
{
11+
FragColor = texture(cubemap, TexCoords);
12+
}

data/shaders/skyboxVert.glsl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#version 330 core
2+
3+
layout (location = 0) in vec3 aPos;
4+
5+
out vec3 TexCoords;
6+
7+
uniform mat4 pvMatrix;
8+
9+
void main()
10+
{
11+
gl_Position = pvMatrix * vec4(aPos, 1.0);
12+
TexCoords = aPos;
13+
}

data/textures/light.png

16.2 KB
Loading

data/textures/skybox_back.png

310 KB
Loading

data/textures/skybox_bottom.png

246 KB
Loading

data/textures/skybox_front.png

457 KB
Loading

data/textures/skybox_left.png

367 KB
Loading

data/textures/skybox_right.png

445 KB
Loading

data/textures/skybox_top.png

365 KB
Loading

0 commit comments

Comments
 (0)