Fix terminal model Z fighting

This commit is contained in:
Shadowfacts 2021-03-28 14:41:19 -04:00
parent 87f2e4aa4d
commit 2da707fcbd
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()) {
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.spriteColor(0, -1, -1, -1, -1)
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.square(facing, 3/16f, 2/16f, 13/16f, 3/16f, 0f)
emitter.spriteBake(0, screenSprite, MutableQuadView.BAKE_LOCK_UV)