Fix terminal model Z fighting

This commit is contained in:
Shadowfacts 2021-03-28 14:41:19 -04:00
parent 12e055d645
commit c278d137ef
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 38 additions and 1 deletions

View File

@ -71,11 +71,48 @@ class ScreenDeviceModel(
for (dir in Direction.values()) { for (dir in Direction.values()) {
if (dir == facing) { if (dir == facing) {
emitter.square(facing, 0f, 0f, 1f, 1f, QuadEmitter.CULL_FACE_EPSILON * 10) // screen border
emitter.square(facing, 0f, 0f, 3/16f, 3/16f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV) emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)
emitter.spriteColor(0, -1, -1, -1, -1) emitter.spriteColor(0, -1, -1, -1, -1)
emitter.emit() emitter.emit()
emitter.square(facing, 13/16f, 0f, 1f, 3/16f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)
emitter.spriteColor(0, -1, -1, -1, -1)
emitter.emit()
emitter.square(facing, 13/16f, 13/16f, 1f, 1f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)
emitter.spriteColor(0, -1, -1, -1, -1)
emitter.emit()
emitter.square(facing, 0f, 13/16f, 3/16f, 1f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)
emitter.spriteColor(0, -1, -1, -1, -1)
emitter.emit()
emitter.square(facing, 3/16f, 0f, 13/16f, 2/16f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)
emitter.spriteColor(0, -1, -1, -1, -1)
emitter.emit()
emitter.square(facing, 3/16f, 14/16f, 13/16f, 1f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)
emitter.spriteColor(0, -1, -1, -1, -1)
emitter.emit()
emitter.square(facing, 0f, 3/16f, 2/16f, 13/16f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)
emitter.spriteColor(0, -1, -1, -1, -1)
emitter.emit()
emitter.square(facing, 14/16f, 3/16f, 1f, 13/16f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)
emitter.spriteColor(0, -1, -1, -1, -1)
emitter.emit()
// screen
emitter.material(PhysicalConnectivityClient.screenMaterial) emitter.material(PhysicalConnectivityClient.screenMaterial)
emitter.square(facing, 3/16f, 2/16f, 13/16f, 3/16f, 0f) emitter.square(facing, 3/16f, 2/16f, 13/16f, 3/16f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV) emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)