Update tutorial resource files
This commit is contained in:
parent
d0b0a84984
commit
9d1851be17
BIN
resources/SmallDungeon_80x50.xp
Executable file
BIN
resources/SmallDungeon_80x50.xp
Executable file
Binary file not shown.
@ -1,12 +1,12 @@
|
|||||||
#version 330 core
|
#version 330 core
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
|
||||||
in vec2 TexCoords;
|
in vec2 TexCoords;
|
||||||
|
|
||||||
uniform sampler2D screenTexture;
|
uniform sampler2D screenTexture;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 col = texture(screenTexture, TexCoords).rgb;
|
vec3 col = texture(screenTexture, TexCoords).rgb;
|
||||||
FragColor = vec4(col, 1.0);
|
FragColor = vec4(col, 1.0);
|
||||||
}
|
}
|
@ -1,11 +1,11 @@
|
|||||||
#version 330 core
|
#version 330 core
|
||||||
layout (location = 0) in vec2 aPos;
|
layout (location = 0) in vec2 aPos;
|
||||||
layout (location = 1) in vec2 aTexCoords;
|
layout (location = 1) in vec2 aTexCoords;
|
||||||
|
|
||||||
out vec2 TexCoords;
|
out vec2 TexCoords;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
TexCoords = aTexCoords;
|
TexCoords = aTexCoords;
|
||||||
gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0);
|
gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0);
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
#version 330 core
|
#version 330 core
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
|
||||||
in vec3 ourColor;
|
in vec3 ourColor;
|
||||||
in vec2 TexCoord;
|
in vec2 TexCoord;
|
||||||
in vec3 ourBackground;
|
in vec3 ourBackground;
|
||||||
|
|
||||||
// texture sampler
|
// texture sampler
|
||||||
uniform sampler2D texture1;
|
uniform sampler2D texture1;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 original = texture(texture1, TexCoord);
|
vec4 original = texture(texture1, TexCoord);
|
||||||
if (original.r < 0.1f || original.g < 0.1f || original.b < 0.1f) discard;
|
if (original.r < 0.1f || original.g < 0.1f || original.b < 0.1f) discard;
|
||||||
vec4 fg = original * vec4(ourColor, 1.f);
|
vec4 fg = original * vec4(ourColor, 1.f);
|
||||||
FragColor = fg;
|
FragColor = fg;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
#version 330 core
|
#version 330 core
|
||||||
layout (location = 0) in vec3 aPos;
|
layout (location = 0) in vec3 aPos;
|
||||||
layout (location = 1) in vec3 aColor;
|
layout (location = 1) in vec3 aColor;
|
||||||
layout (location = 2) in vec3 bColor;
|
layout (location = 2) in vec3 bColor;
|
||||||
layout (location = 3) in vec2 aTexCoord;
|
layout (location = 3) in vec2 aTexCoord;
|
||||||
|
|
||||||
out vec3 ourColor;
|
out vec3 ourColor;
|
||||||
out vec3 ourBackground;
|
out vec3 ourBackground;
|
||||||
out vec2 TexCoord;
|
out vec2 TexCoord;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = vec4(aPos, 1.0);
|
gl_Position = vec4(aPos, 1.0);
|
||||||
ourColor = aColor;
|
ourColor = aColor;
|
||||||
ourBackground = bColor;
|
ourBackground = bColor;
|
||||||
TexCoord = vec2(aTexCoord.x, aTexCoord.y);
|
TexCoord = vec2(aTexCoord.x, aTexCoord.y);
|
||||||
}
|
}
|
@ -1,16 +1,16 @@
|
|||||||
#version 330 core
|
#version 330 core
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
|
||||||
in vec3 ourColor;
|
in vec3 ourColor;
|
||||||
in vec2 TexCoord;
|
in vec2 TexCoord;
|
||||||
in vec3 ourBackground;
|
in vec3 ourBackground;
|
||||||
|
|
||||||
// texture sampler
|
// texture sampler
|
||||||
uniform sampler2D texture1;
|
uniform sampler2D texture1;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 original = texture(texture1, TexCoord);
|
vec4 original = texture(texture1, TexCoord);
|
||||||
vec4 fg = original.r > 0.1f || original.g > 0.1f || original.b > 0.1f ? original * vec4(ourColor, 1.f) : vec4(ourBackground, 1.f);
|
vec4 fg = original.r > 0.1f || original.g > 0.1f || original.b > 0.1f ? original * vec4(ourColor, 1.f) : vec4(ourBackground, 1.f);
|
||||||
FragColor = fg;
|
FragColor = fg;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
#version 330 core
|
#version 330 core
|
||||||
layout (location = 0) in vec3 aPos;
|
layout (location = 0) in vec3 aPos;
|
||||||
layout (location = 1) in vec3 aColor;
|
layout (location = 1) in vec3 aColor;
|
||||||
layout (location = 2) in vec3 bColor;
|
layout (location = 2) in vec3 bColor;
|
||||||
layout (location = 3) in vec2 aTexCoord;
|
layout (location = 3) in vec2 aTexCoord;
|
||||||
|
|
||||||
out vec3 ourColor;
|
out vec3 ourColor;
|
||||||
out vec3 ourBackground;
|
out vec3 ourBackground;
|
||||||
out vec2 TexCoord;
|
out vec2 TexCoord;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = vec4(aPos, 1.0);
|
gl_Position = vec4(aPos, 1.0);
|
||||||
ourColor = aColor;
|
ourColor = aColor;
|
||||||
ourBackground = bColor;
|
ourBackground = bColor;
|
||||||
TexCoord = vec2(aTexCoord.x, aTexCoord.y);
|
TexCoord = vec2(aTexCoord.x, aTexCoord.y);
|
||||||
}
|
}
|
@ -1,26 +1,26 @@
|
|||||||
#version 330 core
|
#version 330 core
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
|
||||||
in vec2 TexCoords;
|
in vec2 TexCoords;
|
||||||
|
|
||||||
uniform sampler2D screenTexture;
|
uniform sampler2D screenTexture;
|
||||||
uniform vec3 screenSize;
|
uniform vec3 screenSize;
|
||||||
uniform bool screenBurn;
|
uniform bool screenBurn;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 col = texture(screenTexture, TexCoords).rgb;
|
vec3 col = texture(screenTexture, TexCoords).rgb;
|
||||||
float scanLine = mod(gl_FragCoord.y, 2.0) * 0.25;
|
float scanLine = mod(gl_FragCoord.y, 2.0) * 0.25;
|
||||||
vec3 scanColor = col.rgb - scanLine;
|
vec3 scanColor = col.rgb - scanLine;
|
||||||
|
|
||||||
if (col.r < 0.1f && col.g < 0.1f && col.b < 0.1f) {
|
if (col.r < 0.1f && col.g < 0.1f && col.b < 0.1f) {
|
||||||
if (screenBurn) {
|
if (screenBurn) {
|
||||||
float dist = (1.0 - distance(vec2(gl_FragCoord.x / screenSize.x, gl_FragCoord.y / screenSize.y), vec2(0.5,0.5))) * 0.2;
|
float dist = (1.0 - distance(vec2(gl_FragCoord.x / screenSize.x, gl_FragCoord.y / screenSize.y), vec2(0.5,0.5))) * 0.2;
|
||||||
FragColor = vec4(0.0, dist, dist, 1.0);
|
FragColor = vec4(0.0, dist, dist, 1.0);
|
||||||
} else {
|
} else {
|
||||||
FragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
FragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FragColor = vec4(scanColor, 1.0);
|
FragColor = vec4(scanColor, 1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,11 +1,11 @@
|
|||||||
#version 330 core
|
#version 330 core
|
||||||
layout (location = 0) in vec2 aPos;
|
layout (location = 0) in vec2 aPos;
|
||||||
layout (location = 1) in vec2 aTexCoords;
|
layout (location = 1) in vec2 aTexCoords;
|
||||||
|
|
||||||
out vec2 TexCoords;
|
out vec2 TexCoords;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
TexCoords = aTexCoords;
|
TexCoords = aTexCoords;
|
||||||
gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0);
|
gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0);
|
||||||
}
|
}
|
||||||
|
BIN
resources/wfc-demo1.xp
Executable file
BIN
resources/wfc-demo1.xp
Executable file
Binary file not shown.
BIN
resources/wfc-demo2.xp
Executable file
BIN
resources/wfc-demo2.xp
Executable file
Binary file not shown.
BIN
resources/wfc-populated.xp
Executable file
BIN
resources/wfc-populated.xp
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user