A lot of changes in almost all files

This commit is contained in:
MihailRis 2022-02-28 02:30:15 +03:00 • committed by GitHub
parent cd3e737385
commit bc9d29cf68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 3485 additions and 476 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

View file

@ -2,6 +2,9 @@
layout (location = 0) in vec2 v_position;
uniform float u_ar;
uniform float u_scale;
void main(){
gl_Position = vec4(v_position, 0.0, 1.0);
gl_Position = vec4(v_position.x * u_ar * u_scale, v_position.y * u_scale, 0.0, 1.0);
}

View file

@ -10,8 +10,8 @@ uniform vec3 u_fogColor;
void main(){
vec4 tex_color = texture(u_texture0, a_texCoord);
if (tex_color.a < 0.5)
discard;
//if (tex_color.a < 0.5)
// discard;
float depth = (a_distance/256.0)*(a_distance/256.0)*256.0;
f_color = mix(a_color * tex_color, vec4(u_fogColor,1.0), min(1.0, depth/256.0));
f_color = mix(a_color * tex_color, vec4(u_fogColor,1.0), min(1.0, depth/256.0/1.0f));
}

View file

@ -12,10 +12,12 @@ uniform mat4 u_model;
uniform mat4 u_proj;
uniform mat4 u_view;
uniform vec3 u_skyLightColor;
uniform vec3 u_cameraPos;
uniform float u_gamma;
void main(){
vec4 viewmodelpos = u_view * u_model * vec4(v_position, 1.0);
vec2 pos2d = (u_model * vec4(v_position, 1.0)).xz-u_cameraPos.xz;
vec4 viewmodelpos = u_view * u_model * vec4(v_position+vec3(0,pow(length(pos2d)*0.0, 3.0),0), 1.0);
a_color = vec4(pow(v_light.rgb, vec3(u_gamma)),1.0f);
a_texCoord = v_texCoord;
a_color.rgb += u_skyLightColor * v_light.a*0.5;