Office progress

Added vents button and hallway interactable
Corrected buttons hitboxes
This commit is contained in:
2026-03-22 16:26:53 -03:00
parent b8713898e5
commit d1d117caaf
13 changed files with 421 additions and 108 deletions

View File

@@ -0,0 +1,29 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D u_texture;
varying vec2 fragmentTexCoord;
void main() {
float dir;
vec2 coords;
float offset;
float pixelDistanceX;
float pixelDistanceY;
pixelDistanceX = distance(fragmentTexCoord.x, 0.5);
pixelDistanceY = distance(fragmentTexCoord.y, 0.5);
offset = (pixelDistanceX * 0.1) * pixelDistanceY;
if (fragmentTexCoord.y <= 0.5) {
dir = 1.0;
} else {
dir = -1.0;
}
coords = vec2(fragmentTexCoord.x, fragmentTexCoord.y + pixelDistanceX * (offset * 8.0 * dir));
gl_FragColor = vec4(texture2D(u_texture, coords).rgb, 1.0);
}

View File

@@ -0,0 +1,12 @@
attribute vec4 a_position;
attribute vec4 a_color;
attribute vec2 a_texCoord0;
uniform mat4 u_projTrans;
varying vec2 fragmentTexCoord;
void main() {
fragmentTexCoord = a_texCoord0;
gl_Position = u_projTrans * a_position;
}