Add dependencies, play around with clouds/transparency layer

This commit is contained in:
2021-09-01 03:04:41 +01:00
parent db5c27a3ed
commit 82551328a1
10 changed files with 96 additions and 54 deletions
+16
View File
@@ -0,0 +1,16 @@
#version 430 core
uniform vec3 lightPos;
uniform vec4 lumRad;
uniform sampler2D screenTexture;
in vec2 vTexPos;
out vec4 fColor;
void main()
{
//vec3 dField = ( texture(screenTexture,vTexPos).xyz - lightPos ) / lumRad.a;
//vec3 c = pow (1 - min(1, dot(dField,dField)) , 2) * lumRad.rgb ;
vec3 dField = ( texture(screenTexture,vTexPos).xyz - lightPos ) / lumRad.a;
vec3 c = pow (1 - min(1, dot(dField,dField)) , 2) * lumRad.rgb ;
fColor = vec4(c,0);
//fColor = vec4(lumRad.rgb,0);
//fColor = vec4(1,1,1,0);
}
+9
View File
@@ -0,0 +1,9 @@
#version 430 core
layout (location = 0) in vec2 pos;
layout (location = 1) in vec2 texPos;
out vec2 vTexPos;
void main()
{
gl_Position = vec4(pos,0,1);
vTexPos = texPos;
}
+11
View File
@@ -0,0 +1,11 @@
#version 430 core
in vec3 vTexPos;
in vec3 vPos;
layout (location=0) out vec4 fCol;
layout (location=1) out vec4 fPos;
uniform sampler2DArray tilesetSampler;
void main()
{
fCol = texture(tilesetSampler, vTexPos);
fPos = vec4(vPos,1);
}
+12
View File
@@ -0,0 +1,12 @@
#version 430 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 texPos;
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
out vec3 vTexPos;
out vec3 vPos;
void main()
{
gl_Position = theMat * vec4(pos,1.0) ;
vTexPos = texPos;
vPos = pos;
}