wooo stuff yay

This commit is contained in:
kin fuyuki 2026-02-20 02:29:05 -03:00
commit d1bb9d8c67
No known key found for this signature in database
GPG key ID: 0E4E8E519FB71401
91 changed files with 17403 additions and 42 deletions

View file

@ -0,0 +1,36 @@
#version 330 core
attribute vec3 vertexPosition;
attribute vec2 vertexTexCoord;
attribute vec4 vertexColor;
attribute vec3 vertexNormal;
out vec2 fragTexCoord;
out vec3 fragWorldPos;
out vec3 normal;
out vec3 pos;
out int level;
uniform mat4 mvp;
uniform mat4 modelmat;
void main() {
fragTexCoord = vertexTexCoord;
vec3 vpos=vertexPosition;
if (vpos.y>1.0) vpos.y=0.99;
else if (vpos.y<0.0) vpos.y=0.01;
vpos.x*=4.0;vpos.z*=4.0;
gl_Position = mvp * vec4(vpos, 1.0);
normal = mat3(modelmat) * vertexNormal;
pos = (modelmat * vec4(vertexPosition, 1.0)).xyz;
if (pos.y>=-0.01&&pos.y<=1.01){
vec3 n = normalize(normal);
if(abs(n.x)>abs(n.y)&&abs(n.x)>abs(n.z))
fragTexCoord.y=-fragTexCoord.y;
else{
if (n.z > 0.5)
fragTexCoord.y -= 0.1; // Positive Z
fragTexCoord.y-=0.00002;
}
}
}