Starchasers / OCGlasses

mod for minecraft and addon for Open Computers
zlib License
30 stars 17 forks source link

setVisibleThroughObjects does not work on transparent widgets #91

Open itsmeow opened 4 years ago

itsmeow commented 4 years ago

Describe the bug If you set something to be visible through objects, it does not work with transparent widgets. Tested with Cube3D and Text3D

In which environment did the Bug appear? Multiplayer server

To Reproduce Steps to reproduce the behavior:

  1. Use code below
  2. Put wall in front of cube
  3. See lack of visibility through wall.

Expected behavior When set to true, 3d widgets with transparency should be visible through walls.

Screenshots / Code Snippet If applicable, add the code you used and screenshots of how your setup looks like

local component = require("component")
cube = component.glasses.addCube3D()
cube.setVisibleThroughObjects(true)
cube.addColor(1, 0, 0, 0.6)
cube.addTranslation(-5, 1, 0) -- put a wall on the -X direction

Without transparency: image With transparency: image image

Minecraft:

ben-mkiv commented 4 years ago

unfortunately this cant be fixed easily, i could make them visible behind walls BUT minecraft doesn't do depth sorting, so stuff would just overlap each other depending on what was drawn first.

if this will ever be fixed then after adding manual depth sorting for openglasses widgets, so i'll leave the bug open as enhancement