-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca0379c
commit 36cb37e
Showing
84 changed files
with
204 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions
13
Game Engine/Tetris3D/Assets/Shaders/GLSLShaders/OpaqueShader.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#version 330 core | ||
out vec4 FragColor; | ||
|
||
in vec3 FragPos; | ||
in vec2 TexCoords; | ||
|
||
uniform vec3 objectColor; | ||
uniform sampler2D texture1; | ||
|
||
void main() | ||
{ | ||
FragColor = texture(texture1, TexCoords) * vec4(objectColor, 1.0); | ||
} |
17 changes: 17 additions & 0 deletions
17
Game Engine/Tetris3D/Assets/Shaders/GLSLShaders/OpaqueShader.vert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#version 330 core | ||
layout (location = 0) in vec3 aPos; | ||
layout (location = 2) in vec2 aTexCoords; | ||
|
||
out vec3 FragPos; | ||
out vec2 TexCoords; | ||
|
||
uniform mat4 model; | ||
uniform mat4 view; | ||
uniform mat4 projection; | ||
|
||
void main() | ||
{ | ||
FragPos = vec3(model * vec4(aPos, 1.0)); | ||
TexCoords = aTexCoords; | ||
gl_Position = projection * view * vec4(FragPos, 1.0); | ||
} |
55 changes: 55 additions & 0 deletions
55
Game Engine/Tetris3D/Assets/Shaders/GLSLShaders/PhongShader.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#version 330 core | ||
|
||
in vec3 tnorm; | ||
in vec4 eyeCoords; | ||
in vec2 TexCoords; | ||
|
||
layout(location = 0) out vec4 FragColor; | ||
|
||
uniform vec3 objectColor; | ||
uniform sampler2D texture1; | ||
|
||
struct LightInfo { | ||
vec4 Position; // Light position in eye coords. | ||
vec3 La; // Ambient light intensity | ||
vec3 Ld; // Diffuse light intensity | ||
vec3 Ls; // Specular light intensity | ||
}; | ||
uniform LightInfo Light[2]; | ||
|
||
struct MaterialInfo { | ||
vec3 Ka; // Ambient reflectivity | ||
vec3 Kd; // Diffuse reflectivity | ||
vec3 Ks; // Specular reflectivity | ||
float Shininess; // Specular shininess factor | ||
}; | ||
uniform MaterialInfo Material; | ||
|
||
void main() | ||
{ | ||
// Light 1 | ||
vec3 s1 = normalize(vec3(Light[0].Position - eyeCoords)); | ||
vec3 v1 = normalize(-eyeCoords.xyz); | ||
vec3 r1 = reflect(-s1, tnorm); | ||
float sDotN1 = max(dot(s1,tnorm), 0.0); | ||
vec3 ambient1 = Light[0].La * Material.Ka; | ||
vec3 diffuse1 = Light[0].Ld * Material.Kd * sDotN1; | ||
vec3 spec1= vec3(0.0); | ||
if(sDotN1 > 0.0) | ||
spec1 = Light[0].Ls * Material.Ks * pow(max(dot(r1, v1), 0.0), Material.Shininess); | ||
|
||
// Light 2 | ||
vec3 s2 = normalize(vec3(Light[1].Position - eyeCoords)); | ||
vec3 v2 = normalize(-eyeCoords.xyz); | ||
vec3 r2 = reflect(-s2, tnorm ); | ||
float sDotN2 = max(dot(s2,tnorm), 0.0 ); | ||
vec3 ambient2 = Light[1].La * Material.Ka; | ||
vec3 diffuse2 = Light[1].Ld * Material.Kd * sDotN2; | ||
vec3 spec2 = vec3(0.0); | ||
if(sDotN2 > 0.0) | ||
spec2 = Light[1].Ls * Material.Ks * pow(max(dot(r2, v2), 0.0), Material.Shininess); | ||
|
||
vec3 LightIntensity = ambient1 + diffuse1 + spec1 + ambient2 + diffuse2 + spec2; | ||
|
||
FragColor = texture(texture1, TexCoords) * vec4(LightIntensity * objectColor, 1.0); | ||
} |
23 changes: 23 additions & 0 deletions
23
Game Engine/Tetris3D/Assets/Shaders/GLSLShaders/PhongShader.vert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#version 330 core | ||
|
||
layout (location = 0) in vec3 VertexPosition; | ||
layout (location = 1) in vec3 VertexNormal; | ||
layout (location = 2) in vec2 aTexCoords; | ||
|
||
out vec2 TexCoords; | ||
out vec3 tnorm; | ||
out vec4 eyeCoords; | ||
|
||
uniform mat4 ModelViewMatrix; | ||
uniform mat3 NormalMatrix; | ||
uniform mat4 ProjectionMatrix; | ||
uniform mat4 MVP; | ||
|
||
void main() | ||
{ | ||
tnorm = normalize(NormalMatrix * VertexNormal); | ||
eyeCoords = ModelViewMatrix * vec4(VertexPosition,1.0); | ||
|
||
TexCoords = aTexCoords; | ||
gl_Position = MVP * vec4(VertexPosition,1.0); | ||
} |
13 changes: 13 additions & 0 deletions
13
Game Engine/Tetris3D/Assets/Shaders/GLSLShaders/TransparencyShader.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#version 330 core | ||
out vec4 FragColor; | ||
|
||
in vec3 FragPos; | ||
in vec2 TexCoords; | ||
|
||
uniform vec3 objectColor; | ||
uniform sampler2D texture1; | ||
|
||
void main() | ||
{ | ||
FragColor = texture(texture1, TexCoords) * vec4(objectColor, 0.5); | ||
} |
17 changes: 17 additions & 0 deletions
17
Game Engine/Tetris3D/Assets/Shaders/GLSLShaders/TransparencyShader.vert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#version 330 core | ||
layout (location = 0) in vec3 aPos; | ||
layout (location = 2) in vec2 aTexCoords; | ||
|
||
out vec3 FragPos; | ||
out vec2 TexCoords; | ||
|
||
uniform mat4 model; | ||
uniform mat4 view; | ||
uniform mat4 projection; | ||
|
||
void main() | ||
{ | ||
FragPos = vec3(model * vec4(aPos, 1.0)); | ||
TexCoords = aTexCoords; | ||
gl_Position = projection * view * vec4(FragPos, 1.0); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+598 Bytes
Game Engine/Tetris3D/Assets/Sprites/gp_buttons/counterclockwise.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# Visit https://www.glfw.org/docs/latest/group__keys.html | ||
# To know what id | ||
# | ||
|
||
[Keyboard] | ||
Right0=262 | ||
Left0=263 | ||
HardDrop0=265 | ||
Drop0=264 | ||
RotateR0=77 | ||
RotateL0=44 | ||
Hold0=46 | ||
Right1=68 | ||
Left1=65 | ||
HardDrop1=87 | ||
Drop1=83 | ||
RotateR1=67 | ||
RotateL1=86 | ||
Hold1=66 | ||
Pause=257 | ||
|
||
# id | Xbox 360 | ||
# 0 | A | ||
# 1 | B | ||
# 2 | X | ||
# 3 | Y | ||
# 4 | LB | ||
# 5 | RB | ||
# 6 | Select | ||
# 7 | Start | ||
# 8 | L3 | ||
# 9 | R3 | ||
# 10 | Dpad Up | ||
# 11 | Dpad Right | ||
# 12 | Dpad Down | ||
# 13 | Dpad Left | ||
[Gamepad] | ||
Right=11 | ||
Left=13 | ||
HardDrop=10 | ||
Drop=12 | ||
RotateR=0 | ||
RotateL=1 | ||
Hold=4 | ||
HoldAlt=5 | ||
Pause=7 | ||
|
||
# id | Xbox | ||
# 0 | Left Axis X | ||
# 1 | Left Axis Y | ||
# 2 | Right Axis X | ||
# 3 | Right Axis Y | ||
# 4 | LT | ||
# 5 | RT | ||
[Axis] | ||
Horizontal=0 | ||
Vertical=1 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.