mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Performance:
- Remove expensive inverse() from all vertex shaders (terrain, WMO, M2, water, character)
- Add uniform location caching to avoid repeated glGetUniformLocation calls
- Add proper frustum culling for WMO groups using AABB intersection
- Add distance-based culling for WMO and M2 instances
- Add cleanup of unused M2/WMO models when tiles unload
Collision & Movement:
- Add M2 doodad collision detection (fences, boxes, etc.)
- Reduce character eye height (5.0 -> 1.8) and collision radius (2.5 -> 0.5)
- Enable WoW-style movement speed by default (14 units/sec run, 5 walk, 9 back)
- Fix emote grammar ("You waves." -> "You wave.")
Misc:
- Rename window title to "Wowee"
28 lines
615 B
GLSL
28 lines
615 B
GLSL
#version 330 core
|
|
|
|
layout(location = 0) in vec3 aPosition;
|
|
layout(location = 1) in vec3 aNormal;
|
|
layout(location = 2) in vec2 aTexCoord;
|
|
layout(location = 3) in vec2 aLayerUV;
|
|
|
|
out vec3 FragPos;
|
|
out vec3 Normal;
|
|
out vec2 TexCoord;
|
|
out vec2 LayerUV;
|
|
|
|
uniform mat4 uModel;
|
|
uniform mat4 uView;
|
|
uniform mat4 uProjection;
|
|
|
|
void main() {
|
|
vec4 worldPos = uModel * vec4(aPosition, 1.0);
|
|
FragPos = worldPos.xyz;
|
|
|
|
// Terrain uses identity model matrix, so normal passes through directly
|
|
Normal = aNormal;
|
|
|
|
TexCoord = aTexCoord;
|
|
LayerUV = aLayerUV;
|
|
|
|
gl_Position = uProjection * uView * worldPos;
|
|
}
|