feat(client): 手持物品渲染 + 动物方块模型 + 实体贴图 alpha test

- 手持非放置物品(工具/食物):实体图集物品图标小四边形(原版倾斜角,
  双面、alpha test),随挥动动画平移;可放置方块仍为六面立方体
- 动物(牛/猪/羊/鸡)改为方块组合模型(身体+头+腿),按原版皮肤布局
  取子矩形贴图,水平面向相机;修复动物 VAO 未捕获 EBO 导致的驱动崩溃
- 僵尸/村民/掉落物广告牌开启 alpha test(透明区域不再显黑块)
This commit is contained in:
NianGao Dev
2026-08-16 23:23:30 +08:00
parent 5d0524ca52
commit b0b632df05
7 changed files with 394 additions and 35 deletions

View File

@@ -88,7 +88,7 @@ func (r *Renderer) DrawBillboard(x, y, z float32, h, w float32, uv [4]float32, f
offLoc := gl.GetUniformLocation(r.prog, gl.Str("uOffset\x00"))
gl.Uniform3f(offLoc, x, y, z)
cutLoc := gl.GetUniformLocation(r.prog, gl.Str("uCutout\x00"))
gl.Uniform1f(cutLoc, 0)
gl.Uniform1f(cutLoc, 1) // alpha test:剔除实体贴图透明区域(否则透明像素显黑块)
tintLoc := gl.GetUniformLocation(r.prog, gl.Str("uTint\x00"))
if flash {
gl.Uniform4f(tintLoc, 2.5, 2.5, 2.5, 1) // 受击白闪