shadows around actors as well as terrain

This commit is contained in:
minjaesong
2024-11-24 17:01:54 +09:00
parent 5bf60cfa82
commit 8cf4b5d9a9
7 changed files with 102 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
#ifdef GL_ES
precision mediump float;
#endif
in vec4 v_color;
in vec4 v_generic;
in vec2 v_texCoords;
uniform sampler2D u_texture;
out vec4 fragColor;
vec4 mult = vec4(0.0, 0.0, 0.0, 1.0);
void main() {
vec4 incol = texture(u_texture, v_texCoords);
vec4 outcol = vec4(incol.rgb, pow(incol.a, 1.4142));
fragColor = mult * outcol;
}

View File

@@ -0,0 +1,18 @@
#ifdef GL_ES
precision mediump float;
#endif
in vec4 v_color;
in vec4 v_generic;
in vec2 v_texCoords;
uniform sampler2D u_texture;
out vec4 fragColor;
vec4 mult = vec4(0.0, 0.0, 0.0, 0.703);
void main() {
vec4 incol = texture(u_texture, v_texCoords);
vec4 outcol = vec4(incol.rgb, pow(incol.a, 1.4142));
fragColor = mult * outcol;
}