This commit is contained in:
2022-07-10 00:38:46 +02:00
commit cce94bcb3f
24 changed files with 20530 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#version 330 core
out vec4 FragColor;
varying vec2 val;
void main() {
float radius = 1.0f;
float radius2 = 0.5f;
float smoothing = 0.005f;
float dist = sqrt(dot(val,val));
if (dist > radius || dist < radius2) {
discard;
}
float sm = smoothstep(radius, radius - smoothing, dist);
float sm2 = smoothstep(radius2, radius2 + smoothing, dist);
float alpha = sm * sm2;
FragColor = vec4(1.0, 0.0, 0.0, alpha);
}

View File

@@ -0,0 +1,16 @@
#version 330 core
//precision highp float;
layout (location = 0) in vec4 aPos;
layout (location = 1) in vec2 value;
uniform mat4 transform;
uniform mat4 proj;
uniform mat4 view;
varying vec2 val;
void main() {
gl_Position = proj*view*transform* aPos;
val = value;
}

View File

@@ -0,0 +1,7 @@
#version 330 core
out vec4 FragColor;
in vec3 ourColor;
void main() {
FragColor = vec4(ourColor , 1.0);
}

View File

@@ -0,0 +1,7 @@
#version 330 core
out vec4 FragColor;
uniform vec4 Color;
void main() {
FragColor = Color;
}

View File

@@ -0,0 +1,12 @@
#version 330 core
out vec4 FragColor;
in vec3 ourColor;
in vec2 TextureCords;
uniform sampler2D Texture;
void main() {
FragColor = texture(Texture, TextureCords) * vec4(ourColor, 1.0);
}

View File

@@ -0,0 +1,11 @@
#version 330 core
out vec4 FragColor;
in vec3 ourColor;
in vec2 TextureCords;
uniform sampler2D Texture;
void main() {
FragColor = texture(Texture, TextureCords) * vec4(ourColor, 1.0);
}

View File

@@ -0,0 +1,10 @@
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aColor;
out vec3 ourColor;
void main() {
gl_Position = vec4(aPos, 1.0);
ourColor = aColor;
}

View File

@@ -0,0 +1,6 @@
#version 330
layout (location = 0) in vec3 aPos;
void main() {
gl_Position = vec4(aPos, 1.0);
}

View File

@@ -0,0 +1,14 @@
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aColor;
layout (location = 2) in vec2 aTextureCords;
out vec3 ourColor;
out vec2 TextureCords;
void main() {
gl_Position = vec4(aPos, 1.0);
ourColor = aColor;
TextureCords = aTextureCords;
}

View File

@@ -0,0 +1,15 @@
#version 330 core
layout (location =0 ) in vec3 aPos;
layout (location = 1) in vec3 aColor;
layout (location = 2) in vec2 aTextureCords;
out vec3 ourColor;
out vec2 TextureCords;
uniform mat4 transform;
void main() {
gl_Position = transform * vec4(aPos, 1.0);
ourColor = aColor;
TextureCords = aTextureCords;
}

BIN
assets/textures/wall.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB