mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-02 00:14:30 +08:00
fix: 透明像素遮挡问题
This commit is contained in:
1 parent
f8c9a2349c
commit
7fcefd62c4
4 files changed
+12
-15
No files matched your search
@@ -292,12 +292,8 @@ export class MapHeroRenderer implements IMapHeroRenderer {
|
||||
entity.block.useSpecifiedFrame(0);
|
||||
}
|
||||
|
||||
async waitMoveEnd(waitFollower: boolean): Promise<void> {
|
||||
if (waitFollower) {
|
||||
await Promise.all(this.entities.map(v => v.promise));
|
||||
return;
|
||||
}
|
||||
await this.heroEntity.promise;
|
||||
async waitMoveEnd(): Promise<void> {
|
||||
await Promise.all(this.entities.map(v => v.promise));
|
||||
this.entities.forEach(v => this.endEntityMoving(v));
|
||||
}
|
||||
|
||||
@@ -485,8 +481,8 @@ class MapHeroHook implements Partial<IHeroStateHooks> {
|
||||
return this.hero.move(direction, time);
|
||||
}
|
||||
|
||||
onEndMove(waitFollower: boolean): Promise<void> {
|
||||
return this.hero.waitMoveEnd(waitFollower);
|
||||
onEndMove(): Promise<void> {
|
||||
return this.hero.waitMoveEnd();
|
||||
}
|
||||
|
||||
onJumpHero(
|
||||
|
||||
@@ -10,6 +10,9 @@ uniform sampler2DArray u_sampler;
|
||||
|
||||
void main() {
|
||||
vec4 texColor = texture(u_sampler, v_texCoord.xyz);
|
||||
outColor = vec4(texColor.rgb, texColor.a * v_texCoord.a);
|
||||
float alpha = texColor.a * v_texCoord.a;
|
||||
// todo: 透明像素应该如何解决??
|
||||
if (alpha < 0.1) discard;
|
||||
outColor = vec4(texColor.rgb, alpha);
|
||||
// outColor = vec4(texColor.a * 0.001, v_texCoord.x * 6.0, v_texCoord.y * 0.0, v_texCoord.a);
|
||||
}
|
||||
Reference in new issue
Block a user