Initial commit

This commit is contained in:
ilshat.safiullin committed 2018-06-15 00:41:30 +05:00
commit a9454741d4
13 files changed
+55764

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

+5
View File
@@ -0,0 +1,5 @@
{
"lines": [
{"start": [-500, -500], "end": [500, 500], "color": [0.25, 0, 0.4]}
]
}
File diff suppressed because it is too large. Load diff
+10
View File
@@ -0,0 +1,10 @@
{
"lines": [
{"start": [-500, -500], "end": [500, 500], "color": [0.25, 0, 0.4]},
{"start": [-500, 500], "end": [500, -500], "color": [0.1, 0.7, 0.4]},
{"start": [-400, -400], "end": [400, -400], "color": [0.3, 0.3, 0.0]},
{"start": [400, -400], "end": [400, 400], "color": [0.0, 0.3, 0.15]},
{"start": [400, 400], "end": [-400, 400], "color": [0.2, 0.6, 0.9]},
{"start": [-400, 400], "end": [-400, -400], "color": [0.5, 0.3, 0.1]}
]
}
+11
View File
@@ -0,0 +1,11 @@
#version 460 core
in vec2 fragmentTextureCoordinates;
uniform sampler2D sampler;
out vec4 color;
void main() {
color = texture(sampler, fragmentTextureCoordinates);
}
+15
View File
@@ -0,0 +1,15 @@
#version 460 core
layout(location = 0) in vec3 position;
layout(location = 1) in vec2 textureCoordinates;
uniform mat4 modelTransform;
uniform mat4 viewTransform;
uniform mat4 projectionTransform;
out vec2 fragmentTextureCoordinates;
void main() {
gl_Position = projectionTransform * viewTransform * modelTransform * vec4(position, 1.0f);
fragmentTextureCoordinates = vec2(textureCoordinates.x, 1.0f - textureCoordinates.y);
}
+17
View File
@@ -0,0 +1,17 @@
#version 460 core
in vec3 fNormal;
in vec2 fTextureCoordinates;
in vec3 fColor;
uniform sampler2D sampler;
out vec4 color;
const vec3 lightDirection = normalize(vec3(0.0f, 0.0f, -1.0f));
void main() {
vec3 sampleColor = texture(sampler, fTextureCoordinates).rgb;
float intensity = clamp(dot(lightDirection, -normalize(fNormal)), 0.0f, 1.0f);
color = vec4(intensity * sampleColor * fColor + vec3(0.15f, 0.15f, 0.15f), 1.0f);
}
+21
View File
@@ -0,0 +1,21 @@
#version 460 core
layout(location = 0) in vec3 vPosition;
layout(location = 1) in vec3 vNormal;
layout(location = 2) in vec2 vTextureCoordinates;
layout(location = 3) in vec3 vColor;
uniform mat4 modelTransform;
uniform mat4 viewTransform;
uniform mat4 projectionTransform;
out vec3 fNormal;
out vec2 fTextureCoordinates;
out vec3 fColor;
void main() {
gl_Position = projectionTransform * viewTransform * modelTransform * vec4(vPosition, 1.0f);
fNormal = vNormal;
fTextureCoordinates = vTextureCoordinates;
fColor = vColor;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB